From a8289d174d4daa5a68311c06e84ebfeae46daa0d Mon Sep 17 00:00:00 2001 From: johngrantuk Date: Tue, 7 May 2024 12:34:10 +0100 Subject: [PATCH] test: Add package for testing. --- .DS_Store | Bin 0 -> 8196 bytes package/README.md | 887 + package/dist/index.d.ts | 44976 ++++++++++++++++++++++++++++++++ package/dist/index.esm.js | 515 + package/dist/index.esm.js.map | 1 + package/dist/index.js | 515 + package/dist/index.js.map | 1 + package/dist/index.umd.js | 515 + package/dist/index.umd.js.map | 1 + package/package.json | 107 + 10 files changed, 47518 insertions(+) create mode 100644 .DS_Store create mode 100644 package/README.md create mode 100644 package/dist/index.d.ts create mode 100644 package/dist/index.esm.js create mode 100644 package/dist/index.esm.js.map create mode 100644 package/dist/index.js create mode 100644 package/dist/index.js.map create mode 100644 package/dist/index.umd.js create mode 100644 package/dist/index.umd.js.map create mode 100644 package/package.json diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ede9ed305c2a32054d83071860eb407c6279527a GIT binary patch literal 8196 zcmeHMYit!o6rQs!?JiyD6k1v2f)|Ps@hWZ6LR*AOduymXT6$aB(!yo$-31o5yJdIp zEm|9IOpFhFM1L7ye>D<~37|%!i810M8XrLt_@Rl35q|iHe~gKVo|)N8prwC|X?*M? zGw04Zb7tn8`OeOsy@U{G&l`<|XoL_ME2Fduo2wKiXLVYULQVxzKz%|Sk|QSZ$j#)? zw9yeG@<8N)$ODlFA`e6!_$PP(?`&4&8SZ@{joQcqkq7>l9$?RhI95iJAuS5ZA0626 z6aZ;CvU$PZmfmL4`U2p-v!N8Nv(& z`0A(^=fepk1&!Ls1Ca-&dw}KcRU}JvVq?8LfA_QF{#e#_vpC|7?3iu&K|{k?kjl#E zR8-29a+SO%eb60G2YQhA+jVc4_4-`b&X#`b*hck3R0nO+h3oO_1cbT4# zG()R>G`B0~Iz67rDoY5b&a7m_EJH=E`UYWlrw*30lYi@1X*s*0> z&zWjkvtVJZs_sU=I)Sy{GQIwB%Lon*>3+_149ht%P_TR}Yny$JK5EuT? zWJAc1$x_lpQe+$1hu_F1$fM*ba-5tb?~~KyEAlnDNPZ%}0YC*PFc+$z7V2OTXs{es z!#ZezR%nA1^uSK&g<;qSS;&C_qu@aRc__fWa6dc%55hz6Bs>kz!gKIEya2Dl2{;L- z;2roBK7-HU3pfwo!S`?hF2XNTxim+rkg6pr)ksUEmC`z?MQWAWqzzK1v_l$@Mx;Gr z_fjdwMoQ*|{QXF0c!FSzg-;Oa#MNUgwx#RNt?KrFO^ltJFQTgMnniIIYU^)rzl2Hw z;}UW&j|UzESA-4^0*;R<=slw?zII7$sd`;0G^d7aKSqyvRAwPSE5+y)>Pi`-ht3h* zRqBm0#tp3y-9+pb86%ZSysI|G)+!i}v`lmpv2}_}L3CQx4GKmkEf?KQ>Sl#K6e!{S zSSoghjL}8^Hqf6V-;xXDXYxCOem*QjsIP(sSPvUv3+#Yygn1hJVJ~DrN3b)fJ1_=E zz=wNa65(Ei``{Qn0*}Gt@B~8s83a9p{EP4s9EX?THFzD~gty>rI1L}bNANLxf_XaeY}Yw}BUo5ek}7xxlXJ_%+M9D0dGO?b<^8e16zyHtjuA=244@4fAO%FhMDxGS_6-!tA)Wun@9ml#4 zD=TbVQBbae4Nu3B@^l>Or9TYucN~W@on%Ohf+7dYtbYi=*SEj^jvd|q(fxmj`2T_X F|4)_3oG}0Z literal 0 HcmV?d00001 diff --git a/package/README.md b/package/README.md new file mode 100644 index 000000000..92c096487 --- /dev/null +++ b/package/README.md @@ -0,0 +1,887 @@ +# Balancer Javascript SDK + +A JavaScript SDK which provides commonly used utilties for interacting with Balancer Protocol V2. + +## How to run the examples (Javascript)? + +**In order to run the examples provided, you need to follow the next steps:** + +1. ```git clone https://github.com/balancer-labs/balancer-sdk.git``` +2. ```cd balancer-sdk``` +3. ```cd balancer-js``` +4. Create a .env file in the balancer-js folder +5. In the .env file you will need to define and initialize the following variables + + We have defined both Alchemy and Infura, because some of the examples use Infura, others use Alchemy. However, feel free to modify accordingly and use your favourite one. + ALCHEMY_URL=[ALCHEMY HTTPS ENDPOINT] + INFURA=[Infura API KEY] + TRADER_KEY=[MetaMask PRIVATE KEY] + Some examples also require the following Tenderly config parameters to be defined: + TENDERLY_ACCESS_KEY=[TENDERLY API ACCESS KEY] + TENDERLY_PROJECT=[TENDERLY PROJECT NAME] + TENDERLY_USER=[TENDERLY USERNAME] + +6. Run 'npm run node', this runs a local Hardhat Network +7. Open a new terminal +8. cd to balancer-js +9. Install ts-node using: ```npm install ts-node``` +10. Install tsconfig-paths using: ```npm install --save-dev tsconfig-paths``` +11. Generate contracts using: ```npm run typechain:generate``` +12. Run one of the provided examples (eg: npm run examples:run -- examples/join.ts) + +## Installation + +## Getting Started + +```js +import { BalancerSDK, BalancerSdkConfig, Network } from '@balancer-labs/sdk'; + +const config: BalancerSdkConfig = { + network: Network.MAINNET, + rpcUrl: `https://mainnet.infura.io/v3/${process.env.INFURA}`, +}; +const balancer = new BalancerSDK(config); +``` + +In some examples we present a way to make end to end trades against mainnet state. To run them you will need to setup a localhost test node using tools like ganache, hardhat, anvil. + +Installation instructions for: + +- [Hardhat](https://hardhat.org/getting-started/#installation) + + To start a MAINNET forked node: + + - Set env var: `ALCHEMY_URL=[ALCHEMY HTTPS ENDPOINT for MAINNET]` + - Run: `npm run node` + + To start a GOERLI forked node: + + - Set env var: `ALCHEMY_URL_GOERLI=[ALCHEMY HTTPS ENDPOINT for GOERLI]` + - Run: `npm run node:goerli` + +- [Anvil](https://github.com/foundry-rs/foundry/tree/master/anvil#installation) - use with caution, still experimental. + + To start a forked node: + + ``` + anvil -f FORKABLE_RPC_URL (optional pinned block: --fork-block-number XXX) + ``` + +## Swaps Module + +Exposes complete functionality for token swapping. An example of using the module with data fetched from the subgraph: + +```js +// Uses SOR to find optimal route for a trading pair and amount +const route = balancer.swaps.findRouteGivenIn({ + tokenIn, + tokenOut, + amount, + gasPrice, + maxPools, +}); + +// Prepares transaction attributes based on the route +const transactionAttributes = balancer.swaps.buildSwap({ + userAddress, + swapInfo: route, + kind: 0, // 0 - givenIn, 1 - givenOut + deadline, + maxSlippage, +}); + +// Extract parameters required for sendTransaction +const { to, data, value } = transactionAttributes; + +// Execution with ethers.js +const transactionResponse = await signer.sendTransaction({ to, data, value }); +``` + +## SwapsService + +The SwapsService provides function to query and make swaps using Balancer V2 liquidity. + +```js +const swaps = new swapService({ + network: Network; + rpcUrl: string; +}); +``` + +## Examples + +You can run each example with `npm run examples:run -- examples/exampleName.ts` + +### #queryBatchSwap + +The Balancer Vault provides a [method to simulate a call to batchSwap](https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/vault/contracts/interfaces/IVault.sol#L644). +This function performs no checks on the sender or recipient or token balances or approvals. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute eth_call instead of eth_sendTransaction. + +@param batchSwap - BatchSwap information used for query. +@param batchSwap.kind - either exactIn or exactOut. +@param batchSwap.swaps - sequence of swaps. +@param batchSwap.assets - array contains the addresses of all assets involved in the swaps. +@returns Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. + +```js +swaps.queryBatchSwap(batchSwap: { + kind: SwapType, + swaps: BatchSwapStep[], + assets: string[] +}): Promise +``` + +[Example](./examples/queryBatchSwap.ts) + +### #encodeBatchSwap + +Static method to encode a [batch swap](https://dev.balancer.fi/references/contracts/apis/the-vault#batch-swaps). + +_NB: This method doesn't execute a batchSwap -- it returns an [ABI byte string](https://docs.soliditylang.org/en/latest/abi-spec.html) containing the data of the function call on a contract, which can then be sent to the network (ex. [sendTransaction](https://web3js.readthedocs.io/en/v1.2.11/web3-eth.html#sendtransaction)). to be executed. See example for more info._ + +```js +/** + * @param {BatchSwap} batchSwap - BatchSwap information used for query. + * @param {SwapType} batchSwap.kind - either exactIn or exactOut + * @param {BatchSwapSteps[]} batchSwap.swaps - sequence of swaps + * @param {string[]} batchSwap.assets - array contains the addresses of all assets involved in the swaps + * @param {FundManagement} batchSwap.funds - object containing information about where funds should be taken/sent + * @param {number[]} batchSwap.limits - limits for each token involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the minimum amount of tokens to receive (by passing a negative value) is specified + * @param {string} batchSwap.deadline - time (in Unix timestamp) after which it will no longer attempt to make a trade + * @returns {string} encodedBatchSwapData - Returns an ABI byte string containing the data of the function call on a contract +*/ +Swaps.encodeBatchSwap(batchSwap: { + kind: SwapType, + swaps: BatchSwapStep[], + assets: string[], + funds: FundManagement, + limits: number[], + deadline: string +}): string +``` + +[Example](./examples/batchSwap.ts) + +### Swap Service: Flash Swaps + +A [Flash Swap](https://dev.balancer.fi/resources/swaps/flash-swaps) is a special type of [batch swap](https://dev.balancer.fi/resources/swaps/batch-swaps) where the caller doesn't need to own or provide any of the input tokens -- the caller is essentially taking a "flash loan" (an uncollateralized loan) from the Balancer Vault. The full amount of the input token must be returned to the Vault by the end of the batch (plus any swap fees), however any excess of an output tokens can be sent to any address. + +IMPORTANT: A "simple" flash swap is an arbitrage executed with only two tokens and two pools, +swapping in the first pool and then back in the second pool for a profit. For more +complex flash swaps, you will have to use batch swap directly. + +Gotchas: + +- Both pools must have both assets (tokens) for swaps to work +- No pool token balances can be zero +- If the flash swap isn't profitable, the internal flash loan will fail. + +### #encodeSimpleFlashSwap + +Static method to encode a simple flash swap [method for a batchSwap](https://dev.balancer.fi/resources/swaps/flash-swaps). + +_NB: This method doesn't execute any swaps -- it returns an [ABI byte string](https://docs.soliditylang.org/en/latest/abi-spec.html) containing the data of the function call on a contract, which can then be sent to the network (ex. [sendTransaction](https://web3js.readthedocs.io/en/v1.2.11/web3-eth.html#sendtransaction)). to be executed. See example for more info._ + +```js +/** + * @param {SimpleFlashSwapParameters} params - BatchSwap information used for query. + * @param {string} params.flashLoanAmount - initial input amount for the flash loan (first asset) + * @param {string[]} params.poolIds - array of Balancer pool ids + * @param {string[]} params.assets - array of token addresses + * @param {string} params.walletAddress - array of token addresses + * @returns {string} encodedBatchSwapData - Returns an ABI byte string containing the data of the function call on a contract +*/ +Swaps.encodeSimpleFlashSwap(simpleFlashSwap: { + flashLoanAmount: string, + poolIds: string[], + assets: string[] + walletAddress: string[] +}): string +``` + +[Example](./examples/flashSwap.ts) + +### #querySimpleFlashSwap + +Method to test if a simple flash swap is valid and see potential profits. + +```js +/** + * @param {SimpleFlashSwapParameters} params - BatchSwap information used for query. + * @param {string} params.flashLoanAmount - initial input amount for the flash loan (first asset) + * @param {string[]} params.poolIds - array of Balancer pool ids + * @param {string[]} params.assets - array of token addresses + * @returns {Promise<{profits: Record, isProfitable: boolean}>} Returns an ethersjs transaction response +*/ +swaps.querySimpleFlashSwap(batchSwap: { + kind: SwapType, + swaps: BatchSwapStep[], + assets: string[] +}): string +``` + +[Example](./examples/querySimpleFlashSwap.ts) + +## Pricing + +Spot Price functionality allowing user to query spot price for token pair. + +### calcSpotPrice + +Find Spot Price for pair in specific pool. + +```js +const balancer = new BalancerSDK(sdkConfig); +const pool = await balancer.pools.find(poolId); +const spotPrice = await pool.calcSpotPrice( + ADDRESSES[network].DAI.address, + ADDRESSES[network].BAL.address +); +``` + +### #getSpotPrice + +Find Spot Price for a token pair - finds most liquid path and uses this as reference SP. + +```js +const pricing = new Pricing(sdkConfig); +``` + +@param { string } tokenIn Token in address. +@param { string } tokenOut Token out address. +@param { SubgraphPoolBase[] } pools Optional - Pool data. Will be fetched via dataProvider if not supplied. +@returns { string } Spot price. + +```js +async getSpotPrice( + tokenIn: string, + tokenOut: string, + pools: SubgraphPoolBase[] = [] +): Promise +``` + +[Example](./examples/spotPrice.ts) + +## Simulating pool joins and exists + +The Balancer Vault provides a [method to simulate join or exit calls to a pool](https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/standalone-utils/contracts/BalancerQueries.sol#L91). +These function allows you to perform a dry run before sending an actual transaction, without checking the sender / recipient or token balances / approvals. Note that this function is not 'view' (due to implementation details): the client code must explicitly execute `eth_call` instead of `eth_sendTransaction`. + +### Simulating joins + +There are two ways to join a pool: + +1. `joinExactIn`: Joining the pool with known token amounts. This is the most commonly used method. +2. `joinExactOut`: Asking the pool for the expected liquidity when we know how much BPT we want back. + +In this documentation, we will focus on the first method (`joinExactIn`) for joining a pool with known token amounts. + +```js +const pool = await sdk.pools.find(poolId); +const maxAmountsIn = pool.tokenList.map( + (t) => forEachTokenSpecifyAmountYouWantToJoinWith +); +const queryParams = pool.buildQueryJoinExactIn({ maxAmountsIn }); +const response = await balancerContracts.balancerHelpers.queryJoin( + ...queryParams +); +const { bptOut, amountsIn } = response; +``` + +`response` will return: + +- `bptOut`: The expected pool token amount returned by the pool. +- `amountsIn`: The same as maxAmountsIn + +### Simulating exits + +There are three ways to exit a pool: + +1. `exitToSingleToken`: Exiting liquidity to a single underlying token is the simplest method. However, if the amount of liquidity being exited is a significant portion of the pool's total liquidity, it may result in price slippage. +2. `exitProportionally`: Exiting liquidity proportionally to all pool tokens. This is the most commonly used method. However `ComposableStable` pool type doesn't support it. +3. `exitExactOut`: Asking the pool for the expected pool token amount when we know how much token amounts we want back. + +In this example, we will focus on the first method (`exitProportionally`). + +```js +const pool = await sdk.pools.find(poolId); +const queryParams = pool.buildQueryJoinExactIn({ bptIn }); +const response = await balancerContracts.balancerHelpers.queryJoin( + ...queryParams +); +const { bptIn, amountsOut } = response; +``` + +`response` will return: + +- `amountsOut`: Token amounts returned by the pool. +- `bptIn`: The same as intput bptIn + +More examples: https://github.com/balancer-labs/balancer-sdk/blob/master/balancer-js/examples/pools/queries.ts + +## Joining Pools + +### Joining with pool tokens + +Exposes Join functionality allowing user to join pools with its pool tokens. + +```js +const balancer = new BalancerSDK(sdkConfig); +const pool = await balancer.pools.find(poolId); +const { to, functionName, attributes, data } = pool.buildJoin(params); +``` + +#### #buildJoin + +Builds join pool transaction parameters with exact tokens in and minimum BPT out based on slippage tolerance + +```js +/** + * @param joiner Account address joining pool + * @param tokensIn Token addresses provided for joining pool (same length and order as amountsIn) + * @param amountsIn Token amounts provided for joining pool in EVM scale + * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5% + * @returns transaction request ready to send with signer.sendTransaction + */ +buildJoin: ( + joiner: string, + tokensIn: string[], + amountsIn: string[], + slippage: string +) => JoinPoolAttributes; +``` + +where `JoinPoolAttributes` is: + +```js +/** + * Join with exact tokens in transaction parameters + * @param to Address that will execute the transaction (vault address) + * @param functionName Function name to be called (joinPool) + * @param attributes Transaction attributes ready to be encoded + * @param data Encoded transaction data + * @param value (Optional) ETH amount that must be informed when joining with ETH + * @param minBptOut Minimum BPT amoutn out of join transaction considering slippage tolerance + * @param expectedBptOut Expected BPT amount out of join transaction + * @param priceImpact Price impact of join transaction + */ +export interface JoinPoolAttributes { + to: string; + functionName: string; + attributes: JoinPool; + data: string; + value?: BigNumber; + minBPTOut: string; + expectedBPTOut: string; + priceImpact: string; +} +``` + +[Example](./examples/join.ts) + +### #buildInitJoin (Weighted Pool) + +Builds a init join transaction for weighted pool. + +```js +/** + * @param joiner - The address of the joiner of the pool + * @param poolId - The id of the pool + * @param tokensIn - array with the address of the tokens + * @param amountsIn - array with the amount of each token + * @returns a InitJoinPoolAttributes object, which can be directly inserted in the transaction to init join a weighted pool + */ +buildInitJoin({ + joiner, + poolId, + tokensIn, + amountsIn, +}) => InitJoinPoolAttributes +``` + +[Example](./examples/pools/weighted/init-join.ts) +Available pool types: + +- Weighted +- ComposableStable ([Example](./examples/pools/composable-stable/init-join.ts)) + +### Joining nested pools + +Exposes Join functionality allowing user to join a pool that has pool tokens that are BPTs of other pools, e.g.: + +``` + CS0 + / \ + CS1 CS2 + / \ / \ + DAI USDC USDT FRAX + +Can join with tokens: DAI, USDC, USDT, FRAX, CS1_BPT, CS2_BPT +``` + +```js +/** + * Builds generalised join transaction + * + * @param poolId Pool id + * @param tokens Token addresses + * @param amounts Token amounts in EVM scale + * @param userAddress User address + * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%. + * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen + * @param simulationType Simulation type (VaultModel, Tenderly or Static) + * @param authorisation Optional auhtorisation call to be added to the chained transaction + * @returns transaction data ready to be sent to the network along with min and expected BPT amounts out. + */ +async generalisedJoin( + poolId: string, + tokens: string[], + amounts: string[], + userAddress: string, + slippage: string, + signer: JsonRpcSigner, + simulationType: SimulationType, + authorisation?: string +): Promise<{ + to: string; + encodedCall: string; + minOut: string; + expectedOut: string; + priceImpact: string; +}> +``` + +[Example](./examples/joinGeneralised.ts) + +## Exit Pool + +Exposes Exit functionality allowing user to exit pools. + +```js +const balancer = new BalancerSDK(sdkConfig); +const pool = await balancer.pools.find(poolId); +const { to, functionName, attributes, data } = pool.buildExitExactBPTIn(params); +``` + +### #buildExitExactBPTIn + +Builds an exit transaction with exact BPT in and minimum token amounts out based on slippage tolerance. + +```js +/** + * Build exit pool transaction parameters with exact BPT in and minimum token amounts out based on slippage tolerance + * @param exiter Account address exiting pool + * @param bptIn BPT provided for exiting pool in EVM scale + * @param slippage Maximum slippage tolerance in bps. i.e. 50 = 5% + * @param shouldUnwrapNativeAsset Indicates whether wrapped native asset should be unwrapped after exit. Defaults to false. + * @param singleTokenOut Optional: token address that if provided will exit to given token + * @returns transaction request ready to send with signer.sendTransaction + */ +buildExitExactBPTIn: ( + exiter: string, + bptIn: string, + slippage: string, + shouldUnwrapNativeAsset?: boolean, + singleTokenOut?: string +) => ExitExactBPTInAttributes; +``` + +where `ExitExactBPTInAttributes` is: + +```js +/** + * Exit exact BPT in transaction parameters + * @param to Address that will execute the transaction (vault address) + * @param functionName Function name to be called (exitPool) + * @param attributes Transaction attributes ready to be encoded + * @param data Encoded transaction data + * @param expectedAmountsOut Expected amounts out of exit transaction + * @param minAmountsOut Minimum amounts out of exit transaction considering slippage tolerance + */ +export interface ExitExactBPTInAttributes extends ExitPoolAttributes { + to: string; + functionName: string; + attributes: ExitPool; + data: string; + expectedAmountsOut: string[]; + minAmountsOut: string[]; +} +``` + +[Example](./examples/exitExactBPTIn.ts)

+Available pool types: + +- Weighted [Example](./examples/exitExactBPTIn.ts) +- Composable Stable [Example](./examples/pools/composable-stable/exit.ts) + - OBS: **Only ComposableStable >V2 supports proportional exits** +- Meta Stable +- Stable + +### #buildExitExactTokensOut + +Builds an exit transaction with exact tokens out and maximum BPT in based on slippage tolerance. + +```js +/** + * Build exit pool transaction parameters with exact tokens out and maximum BPT in based on slippage tolerance + * @param exiter Account address exiting pool + * @param tokensOut Tokens provided for exiting pool (same length and order as amountsOut) + * @param amountsOut Amounts provided for exiting pool in EVM scale + * @param slippage Maximum slippage tolerance in bps. i.e. 50 = 5% + * @returns transaction request ready to send with signer.sendTransaction + */ +buildExitExactTokensOut: ( + exiter: string, + tokensOut: string[], + amountsOut: string[], + slippage: string +) => ExitExactTokensOutAttributes; +``` + +where `ExitExactTokensOutAttributes` is: + +```js +/** + * Exit exact tokens out transaction parameters + * @param to Address that will execute the transaction (vault address) + * @param functionName Function name to be called (exitPool) + * @param attributes Transaction attributes ready to be encoded + * @param data Encoded transaction data + * @param expectedBPTIn Expected BPT into exit transaction + * @param maxBPTIn Max BPT into exit transaction considering slippage tolerance + */ +export interface ExitExactTokensOutAttributes extends ExitPoolAttributes { + to: string; + functionName: string; + attributes: ExitPool; + data: string; + expectedBPTIn: string; + maxBPTIn: string; +} +``` + +[Example](./examples/exitExactTokensOut.ts) +

+Available pool types: + +- Weighted [Example](./examples/exitExactTokensOut.ts) +- Composable Stable +- Meta Stable +- Stable + +### Exiting nested pools + +Exposes Exit functionality allowing user to exit a pool that has pool tokens that are BPTs of other pools, e.g.: + +``` + CS0 + / \ + CS1 CS2 + / \ / \ + DAI USDC USDT FRAX + +Can exit with CS0_BPT proportionally to: DAI, USDC, USDT and FRAX +``` + +```js +/** + * Builds generalised exit transaction + * + * @param poolId Pool id + * @param amount Token amount in EVM scale + * @param userAddress User address + * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%. + * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen + * @param simulationType Simulation type (VaultModel, Tenderly or Static) + * @param authorisation Optional auhtorisation call to be added to the chained transaction + * @param unwrapTokens Determines if wrapped tokens should be unwrapped. Default = false + * @returns transaction data ready to be sent to the network along with tokens, min and expected amounts out. + */ +async generalisedExit( + poolId: string, + amount: string, + userAddress: string, + slippage: string, + signer: JsonRpcSigner, + simulationType: SimulationType, + authorisation?: string, + unwrapTokens = false +): Promise<{ + to: string; + encodedCall: string; + tokensOut: string[]; + expectedAmountsOut: string[]; + minAmountsOut: string[]; + priceImpact: string; +}> +``` + +[Example](./examples/exitGeneralised.ts) + +# Factory + +### Creating Pools + +### WeightedPool + +Builds a transaction to create a weighted pool. + +```js +/** + * Builds a transaction for a weighted pool create operation. + * @param factoryAddress - The address of the factory for weighted pool (contract address) + * @param name - The name of the pool + * @param symbol - The symbol of the pool + * @param tokenAddresses - The token's addresses + * @param weights The weights for each token, ordered + * @param swapFee - The swapFee for the owner of the pool in string or number format(100% is "1.00" or 1, 10% is "0.1" or 0.1, 1% is "0.01" or 0.01) + * @param owner - The address of the owner of the pool + * @returns a TransactionRequest object, which can be directly inserted in the transaction to create a weighted pool + */ +create({ + factoryAddress, + name, + symbol, + tokenAddresses, + weights, + swapFee, + owner, +}) => { + to?: string; + data: BytesLike; +} +``` + +[Example](./examples/pools/weighted/create-and-init-join.ts) + +### Composable Stable Pool + +Builds a transaction to create a composable stable pool. + +```js +/** + * Builds a transaction for a composable pool create operation. + * @param contractAddress - The address of the factory for composable stable pool (contract address) + * @param name - The name of the pool + * @param symbol - The symbol of the pool + * @param swapFee - The swapFee for the owner of the pool in string or number format(100% is "1.00" or 1, 10% is "0.1" or 0.1, 1% is "0.01" or 0.01) + * @param tokenAddresses - The token's addresses + * @param rateProviders The addresses of the rate providers for each token, ordered + * @param tokenRateCacheDurations the Token Rate Cache Duration of each token + * @param owner - The address of the owner of the pool + * @param amplificationParameter The amplification parameter(must be greater than 1) + * @param exemptFromYieldProtocolFeeFlags array containing boolean for each token exemption from yield protocol fee flags + * @returns a TransactionRequest object, which can be directly inserted in the transaction to create a composable stable pool + */ +create({ + factoryAddress, + name, + symbol, + tokenAddresses, + amplificationParameter, + rateProviders, + tokenRateCacheDurations, + exemptFromYieldProtocolFeeFlags, + swapFee, + owner, +}) => { + to?: string; + data: BytesLike; +} +``` + +[Example](./examples/pools/composable-stable/create-and-init-join.ts) + +### Linear Pool + +Builds a transaction to create a linear pool. + +```js + /** + * + * @param name The name of the pool + * @param symbol The symbol of the pool (BPT name) + * @param mainToken The unwrapped token + * @param wrappedToken The wrapped token + * @param upperTarget The maximum balance of the unwrapped(main) token (normal number, no need to fix to 18 decimals) + * @param swapFeeEvm The swap fee of the pool + * @param owner The address of the owner of the pool + * @param protocolId The protocolId, to check the available value + */ + create({ + name, + symbol, + mainToken, + wrappedToken, + upperTarget, + swapFeeEvm, + owner, + protocolId, + }: LinearCreatePoolParameters) => { + to?: string; + data: BytesLike; + } +``` + +[Example](./examples/pools/linear/create.ts) + +## RelayerService + +Relayers are (user opt-in, audited) contracts that can make calls to the vault (with the transaction “sender” being any arbitrary address) and use the sender’s ERC20 vault allowance, internal balance or BPTs on their behalf. + +```js +const relayer = new relayerService( + swapsService: SwapsService; + rpcUrl: string; +); +``` + +## Pools Impermanent Loss + +> impermanent loss (IL) describes the percentage by which a pool is worth less than what one would have if they had instead just held the tokens outside the pool + +#### Service + +![class-diagram](IL-class.png) + +#### Algorithm + +Using the variation delta formula: + +![img.png](img.png) + +where **𝚫Pi** represents the difference between the price for a single token at the date of joining the pool and the current price. + +```javascript +// retrieves pool's tokens +tokens = pool.tokens; +// get weights for tokens +weights = tokens.map((token) => token.weight); +// retrieves current price for tokens +exitPrices = tokens.map((token) => tokenPrices.find(token.address)); +// retrieves historical price for tokens +entryPrices = tokens.map((token) => + tokenPrices.findBy('timestamp', { + address: token.address, + timestamp: timestamp, + }) +); +// retrieves list of pool's assets with prices delta and weights +assets = tokens.map((token) => ({ + priceDelta: this.getDelta( + entryPrices[token.address], + exitPrices[token.address] + ), + weight: weights[i], +})); + +poolValueDelta = assets.reduce( + (result, asset) => + result * Math.pow(Math.abs(asset.priceDelta + 1), asset.weight), + 1 +); +holdValueDelta = assets.reduce( + (result, asset) => result + Math.abs(asset.priceDelta + 1) * asset.weight, + 0 +); + +const IL = poolValueDelta / holdValueDelta - 1; +``` + +#### Usage + +```javascript +async impermanentLoss( + timestamp: number, // the UNIX timestamp from which the IL is desired + pool: Pool // the pool on which the IL must be calculated +): Promise +``` + +```javascript +const pool = await sdk.pools.find(poolId); +const joins = (await sdk.data.findByUser(userAddress)).filter( + (it) => it.type === 'Join' && it.poolId === poolId +); +const join = joins[0]; +const IL = await pools.impermanentLoss(join.timestamp, pool); +``` + +[Example](./examples/pools/impermanentLoss.ts) + +## Claim Tokens + +### Service + +![classes](./claim-incentives-class.png) + +### Claim Tokens for a veBAL Holders + +#### Pseudocode + +- **Get Claimable Rewards** + +```javascript +const defaultClaimableTokens = [ + '0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2', // bb-a-USD v1 + '0xA13a9247ea42D743238089903570127DdA72fE44', // bb-a-USD v2 + '0xba100000625a3754423978a60c9317c58a424e3D', // BAL +] + +const claimableTokens: string[] = userDefinedClaimableTokens ?? defaultClaimableTokens; + +const balances = await ClaimService.getClaimableVeBalTokens(userAddress, claimableTokens) { + return await this.feeDistributor.callStatic.claimTokens(userAddress,claimableTokens); +} + +const txData = await getClaimableVeBalTokens.buildClaimVeBalTokensRequest(userAddress, claimableTokens) { + data = feeDistributorContract.claimBalances(userAddress, claimableTokens); + to = feeDistributorContract.encodeFunctionData('claimTokens', [userAddress, claimableTokens]) +} + +//on client +signer.request(txData).then(() => { ... }); + +``` + +### Claim Pools Incentives + +#### Pseudocode + +- **Get Claimable Rewards** + +```javascript +gauges = LiquidityGaugesRepository.fetch(); +claimableTokensPerGauge = LiquidityGaugesMulticallRepository.getClaimableTokens(gauges, accountAddress) { + if (MAINNET) { + claimableTokens = this.multicall.aggregate('claimable_tokens', gauges, accountAddress); + claimableReward = gauge.rewardData.forEach(this.multicall.aggregate('claimable_reward', gauges, accountAddress, rewardToken); + return aggregate(claimableReward, claimableTokens); + } else { + return gauge.rewardData.forEach(this.multicall.aggregate('claimable_reward', gauges, accountAddress, rewardToken); + } +}; + +``` + +- **Claim Rewards** + +it returns encoded callable data to be fed to a signer and then to send to the gauge contract. + +```javascript +if (MAINNET) { + const callData = balancerMinterInterface.encodeFunctionData('mintMany', [ + gaugeAddresses, + ]); + return { to: balancerMinterAddress, data: callData }; +} else { + const callData = gaugeClaimHelperInterface.encodeFunctionData( + 'claimRewardsFromGauges', + [gaugeAddresses, userAddress] + ); + return { to: gaugeClaimHelperAddress, data: callData }; +} +``` + +## Licensing + +[GNU General Public License Version 3 (GPL v3)](../../LICENSE). diff --git a/package/dist/index.d.ts b/package/dist/index.d.ts new file mode 100644 index 000000000..a9bde138a --- /dev/null +++ b/package/dist/index.d.ts @@ -0,0 +1,44976 @@ +import { BigNumberish, BigNumber } from '@ethersproject/bignumber'; +import { Contract } from '@ethersproject/contracts'; +import { SubgraphPoolBase, SubgraphToken, PoolDataService, TokenPriceService, SwapInfo, SOR, WeightedPool as WeightedPool$1, StablePool as StablePool$1, LinearPool as LinearPool$1, MetaStablePool, PhantomStablePool, ComposableStablePool as ComposableStablePool$1, SwapTypes, SwapV2 } from '@balancer-labs/sor'; +export { PoolFilter, SOR, SubgraphPoolBase, SwapInfo, SwapOptions, SwapTypes, SwapV2, stableBPTForTokensZeroPriceImpact, weightedBPTForTokensZeroPriceImpact } from '@balancer-labs/sor'; +import { Listener, Provider, TransactionReceipt, JsonRpcSigner, JsonRpcProvider } from '@ethersproject/providers'; +import { Event, EventFilter, BigNumberish as BigNumberish$1, BigNumber as BigNumber$1, BaseContract, Signer, CallOverrides, Overrides, ContractTransaction, BytesLike, PopulatedTransaction, utils, PayableOverrides } from 'ethers'; +import { FunctionFragment, Result, EventFragment, Interface, LogDescription } from '@ethersproject/abi'; +import { GraphQLClient } from 'graphql-request'; +import * as Dom from 'graphql-request/dist/types.dom'; +import { Signer as Signer$1, TypedDataSigner } from '@ethersproject/abstract-signer'; +import { BytesLike as BytesLike$1 } from '@ethersproject/bytes'; + +declare class BasePoolEncoder { + /** + * Encodes the userData parameter for exiting any Pool in recovery mode, by removing tokens in return for + * an exact amount of BPT + * @param bptAmountIn - the amount of BPT to be burned + */ + static recoveryModeExit: (bptAmountIn: BigNumberish) => string; +} + +declare enum StablePoolJoinKind { + INIT = 0, + EXACT_TOKENS_IN_FOR_BPT_OUT = 1, + TOKEN_IN_FOR_EXACT_BPT_OUT = 2 +} +declare enum StablePhantomPoolJoinKind { + INIT = 0, + COLLECT_PROTOCOL_FEES = 1 +} +declare enum StablePoolExitKind { + EXACT_BPT_IN_FOR_ONE_TOKEN_OUT = 0, + EXACT_BPT_IN_FOR_TOKENS_OUT = 1, + BPT_IN_FOR_EXACT_TOKENS_OUT = 2 +} +declare class StablePoolEncoder { + /** + * Cannot be constructed. + */ + private constructor(); + /** + * Encodes the userData parameter for providing the initial liquidity to a StablePool + * @param initialBalances - the amounts of tokens to send to the pool to form the initial balances + */ + static joinInit: (amountsIn: BigNumberish[]) => string; + /** + * Encodes the userData parameter for collecting protocol fees for StablePhantomPool + */ + static joinCollectProtocolFees: () => string; + /** + * Encodes the userData parameter for joining a StablePool with exact token inputs + * @param amountsIn - the amounts each of token to deposit in the pool as liquidity + * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens + */ + static joinExactTokensInForBPTOut: (amountsIn: BigNumberish[], minimumBPT: BigNumberish) => string; + /** + * Encodes the userData parameter for joining a StablePool with to receive an exact amount of BPT + * @param bptAmountOut - the amount of BPT to be minted + * @param enterTokenIndex - the index of the token to be provided as liquidity + */ + static joinTokenInForExactBPTOut: (bptAmountOut: BigNumberish, enterTokenIndex: number) => string; + /** + * Encodes the userData parameter for exiting a StablePool by removing a single token in return for an exact amount of BPT + * @param bptAmountIn - the amount of BPT to be burned + * @param enterTokenIndex - the index of the token to removed from the pool + */ + static exitExactBPTInForOneTokenOut: (bptAmountIn: BigNumberish, exitTokenIndex: number) => string; + /** + * Encodes the userData parameter for exiting a StablePool by removing tokens in return for an exact amount of BPT + * @param bptAmountIn - the amount of BPT to be burned + */ + static exitExactBPTInForTokensOut: (bptAmountIn: BigNumberish) => string; + /** + * Encodes the userData parameter for exiting a StablePool by removing exact amounts of tokens + * @param amountsOut - the amounts of each token to be withdrawn from the pool + * @param maxBPTAmountIn - the minimum acceptable BPT to burn in return for withdrawn tokens + */ + static exitBPTInForExactTokensOut: (amountsOut: BigNumberish[], maxBPTAmountIn: BigNumberish) => string; +} + +declare enum WeightedPoolJoinKind { + INIT = 0, + EXACT_TOKENS_IN_FOR_BPT_OUT = 1, + TOKEN_IN_FOR_EXACT_BPT_OUT = 2, + ALL_TOKENS_IN_FOR_EXACT_BPT_OUT = 3 +} +declare enum WeightedPoolExitKind { + EXACT_BPT_IN_FOR_ONE_TOKEN_OUT = 0, + EXACT_BPT_IN_FOR_TOKENS_OUT = 1, + BPT_IN_FOR_EXACT_TOKENS_OUT = 2, + MANAGEMENT_FEE_TOKENS_OUT = 3 +} +declare class WeightedPoolEncoder { + /** + * Cannot be constructed. + */ + private constructor(); + /** + * Encodes the userData parameter for providing the initial liquidity to a WeightedPool + * @param initialBalances - the amounts of tokens to send to the pool to form the initial balances + */ + static joinInit: (amountsIn: BigNumberish[]) => string; + /** + * Encodes the userData parameter for joining a WeightedPool with exact token inputs + * @param amountsIn - the amounts each of token to deposit in the pool as liquidity + * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens + */ + static joinExactTokensInForBPTOut: (amountsIn: BigNumberish[], minimumBPT: BigNumberish) => string; + /** + * Encodes the userData parameter for joining a WeightedPool with a single token to receive an exact amount of BPT + * @param bptAmountOut - the amount of BPT to be minted + * @param enterTokenIndex - the index of the token to be provided as liquidity + */ + static joinTokenInForExactBPTOut: (bptAmountOut: BigNumberish, enterTokenIndex: number) => string; + /** + * Encodes the userData parameter for joining a WeightedPool proportionally to receive an exact amount of BPT + * @param bptAmountOut - the amount of BPT to be minted + */ + static joinAllTokensInForExactBPTOut: (bptAmountOut: BigNumberish) => string; + /** + * Encodes the userData parameter for exiting a WeightedPool by removing a single token in return for an exact amount of BPT + * @param bptAmountIn - the amount of BPT to be burned + * @param enterTokenIndex - the index of the token to removed from the pool + */ + static exitExactBPTInForOneTokenOut: (bptAmountIn: BigNumberish, exitTokenIndex: number) => string; + /** + * Encodes the userData parameter for exiting a WeightedPool by removing tokens in return for an exact amount of BPT + * @param bptAmountIn - the amount of BPT to be burned + */ + static exitExactBPTInForTokensOut: (bptAmountIn: BigNumberish) => string; + /** + * Encodes the userData parameter for exiting a WeightedPool by removing exact amounts of tokens + * @param amountsOut - the amounts of each token to be withdrawn from the pool + * @param maxBPTAmountIn - the minimum acceptable BPT to burn in return for withdrawn tokens + */ + static exitBPTInForExactTokensOut: (amountsOut: BigNumberish[], maxBPTAmountIn: BigNumberish) => string; +} +declare class ManagedPoolEncoder { + /** + * Cannot be constructed. + */ + private constructor(); + /** + * Encodes the userData parameter for exiting a ManagedPool for withdrawing management fees. + * This can only be done by the pool owner. + */ + static exitForManagementFees: () => string; +} + +/** + * Normalize an array of token weights to ensure they sum to `1e18` + * @param weights - an array of token weights to be normalized + * @returns an equivalent set of normalized weights + */ +declare function toNormalizedWeights(weights: BigNumber[]): BigNumber[]; +/** + * Check whether a set of weights are normalized + * @param weights - an array of potentially unnormalized weights + * @returns a boolean of whether the weights are normalized + */ +declare const isNormalizedWeights: (weights: BigNumberish[]) => boolean; + +declare enum ComposableStablePoolJoinKind { + INIT = 0, + EXACT_TOKENS_IN_FOR_BPT_OUT = 1, + TOKEN_IN_FOR_EXACT_BPT_OUT = 2 +} +declare enum ComposableStablePoolExitKind { + EXACT_BPT_IN_FOR_ONE_TOKEN_OUT = 0, + BPT_IN_FOR_EXACT_TOKENS_OUT = 1, + EXACT_BPT_IN_FOR_ALL_TOKENS_OUT = 2 +} +declare class ComposableStablePoolEncoder { + /** + * Cannot be constructed. + */ + private constructor(); + /** + * Encodes the userData parameter for providing the initial liquidity to a ComposableStablePool + * @param initialBalances - the amounts of tokens to send to the pool to form the initial balances + */ + static joinInit: (amountsIn: BigNumberish[]) => string; + /** + * Encodes the userData parameter for collecting protocol fees for StablePhantomPool + */ + static joinCollectProtocolFees: () => string; + /** + * Encodes the userData parameter for joining a ComposableStablePool with exact token inputs + * @param amountsIn - the amounts each of token to deposit in the pool as liquidity + * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens + */ + static joinExactTokensInForBPTOut: (amountsIn: BigNumberish[], minimumBPT: BigNumberish) => string; + /** + * Encodes the userData parameter for joining a ComposableStablePool with to receive an exact amount of BPT + * @param bptAmountOut - the amount of BPT to be minted + * @param enterTokenIndex - the index of the token to be provided as liquidity + */ + static joinTokenInForExactBPTOut: (bptAmountOut: BigNumberish, enterTokenIndex: number) => string; + /** + * Encodes the userData parameter for exiting a ComposableStablePool by removing a single token in return for an exact amount of BPT + * @param bptAmountIn - the amount of BPT to be burned + * @param enterTokenIndex - the index of the token to removed from the pool + */ + static exitExactBPTInForOneTokenOut: (bptAmountIn: BigNumberish, exitTokenIndex: number) => string; + /** + * Encodes the userData parameter for exiting a StablePool by removing tokens in return for an exact amount of BPT + * @param bptAmountIn - the amount of BPT to be burned + */ + static exitExactBPTInForAllTokensOut: (bptAmountIn: BigNumberish) => string; + /** + * Encodes the userData parameter for exiting a ComposableStablePool by removing exact amounts of tokens + * @param amountsOut - the amounts of each token to be withdrawn from the pool + * @param maxBPTAmountIn - the max acceptable BPT to burn in return for withdrawn tokens + */ + static exitBPTInForExactTokensOut: (amountsOut: BigNumberish[], maxBPTAmountIn: BigNumberish) => string; +} + +declare enum Network { + MAINNET = 1, + GOERLI = 5, + GÖRLI = 5, + OPTIMISM = 10, + GNOSIS = 100, + POLYGON = 137, + FANTOM = 250, + BASE = 8453, + ZKEVM = 1101, + ARBITRUM = 42161, + AVALANCHE = 43114, + SEPOLIA = 11155111 +} + +interface JoinPool { + poolId: string; + sender: string; + recipient: string; + joinPoolRequest: JoinPoolRequest$1; +} +/** + * Join with exact tokens in transaction parameters + * @param to Address that will execute the transaction (vault address) + * @param functionName Function name to be called (joinPool) + * @param attributes Transaction attributes ready to be encoded + * @param data Encoded transaction data + * @param value Optional: ETH amount in EVM scale (required when joining with ETH) + * @param minBptOut Minimum BPT amount out of join transaction considering slippage tolerance in EVM scale + * @param expectedBptOut Expected BPT amount out of join transaction in EVM scale + * @param priceImpact Price impact of join transaction in EVM scale + */ +interface JoinPoolAttributes { + to: string; + functionName: string; + attributes: JoinPool; + data: string; + value?: BigNumber; + minBPTOut: string; + expectedBPTOut: string; + priceImpact: string; +} +interface ExitPool { + poolId: string; + sender: string; + recipient: string; + exitPoolRequest: ExitPoolRequest$1; +} +interface ExitPoolAttributes { + to: string; + functionName: string; + attributes: ExitPool; + data: string; +} +/** + * Exit exact BPT in transaction parameters + * @param to Address that will execute the transaction (vault address) + * @param functionName Function name to be called (exitPool) + * @param attributes Transaction attributes ready to be encoded + * @param data Encoded transaction data + * @param expectedAmountsOut Expected amounts out of exit transaction in EVM scale + * @param minAmountsOut Minimum amounts out of exit transaction (considering slippage tolerance) in EVM scale + * @param priceImpact Price impact of exit transaction in EVM scale + */ +interface ExitExactBPTInAttributes extends ExitPoolAttributes { + expectedAmountsOut: string[]; + minAmountsOut: string[]; + priceImpact: string; +} +/** + * Exit exact tokens out transaction parameters + * @param to Address that will execute the transaction (vault address) + * @param functionName Function name to be called (exitPool) + * @param attributes Transaction attributes ready to be encoded + * @param data Encoded transaction data + * @param expectedBPTIn Expected BPT into exit transaction in EVM scale + * @param maxBPTIn Max BPT into exit transaction (considering slippage tolerance) in EVM scale + * @param priceImpact Price impact of exit transaction in EVM scale + */ +interface ExitExactTokensOutAttributes extends ExitPoolAttributes { + expectedBPTIn: string; + maxBPTIn: string; + priceImpact: string; +} + +interface TypedEvent = any, TArgsObject = any> extends Event { + args: TArgsArray & TArgsObject; +} +interface TypedEventFilter<_TEvent extends TypedEvent> extends EventFilter { +} +interface TypedListener { + (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +} +type __TypechainArgsArray = T extends TypedEvent ? U : never; +interface OnEvent { + (eventFilter: TypedEventFilter, listener: TypedListener): TRes; + (eventName: string, listener: Listener): TRes; +} +type PromiseOrValue = T | Promise; + +declare namespace IPoolSwapStructs$b { + type SwapRequestStruct = { + kind: PromiseOrValue; + tokenIn: PromiseOrValue; + tokenOut: PromiseOrValue; + amount: PromiseOrValue; + poolId: PromiseOrValue; + lastChangeBlock: PromiseOrValue; + from: PromiseOrValue; + to: PromiseOrValue; + userData: PromiseOrValue; + }; + type SwapRequestStructOutput = [ + number, + string, + string, + BigNumber$1, + string, + BigNumber$1, + string, + string, + string + ] & { + kind: number; + tokenIn: string; + tokenOut: string; + amount: BigNumber$1; + poolId: string; + lastChangeBlock: BigNumber$1; + from: string; + to: string; + userData: string; + }; +} +interface AaveLinearPoolInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "disableRecoveryMode()": FunctionFragment; + "enableRecoveryMode()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getBptIndex()": FunctionFragment; + "getDomainSeparator()": FunctionFragment; + "getMainIndex()": FunctionFragment; + "getMainToken()": FunctionFragment; + "getNextNonce(address)": FunctionFragment; + "getOwner()": FunctionFragment; + "getPausedState()": FunctionFragment; + "getPoolId()": FunctionFragment; + "getProtocolFeesCollector()": FunctionFragment; + "getRate()": FunctionFragment; + "getScalingFactors()": FunctionFragment; + "getSwapFeePercentage()": FunctionFragment; + "getTargets()": FunctionFragment; + "getVault()": FunctionFragment; + "getVirtualSupply()": FunctionFragment; + "getWrappedIndex()": FunctionFragment; + "getWrappedToken()": FunctionFragment; + "getWrappedTokenRate()": FunctionFragment; + "inRecoveryMode()": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "initialize()": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": FunctionFragment; + "pause()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "setSwapFeePercentage(uint256)": FunctionFragment; + "setTargets(uint256,uint256)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "unpause()": FunctionFragment; + "version()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "allowance" | "approve" | "balanceOf" | "decimals" | "decreaseAllowance" | "disableRecoveryMode" | "enableRecoveryMode" | "getActionId" | "getAuthorizer" | "getBptIndex" | "getDomainSeparator" | "getMainIndex" | "getMainToken" | "getNextNonce" | "getOwner" | "getPausedState" | "getPoolId" | "getProtocolFeesCollector" | "getRate" | "getScalingFactors" | "getSwapFeePercentage" | "getTargets" | "getVault" | "getVirtualSupply" | "getWrappedIndex" | "getWrappedToken" | "getWrappedTokenRate" | "inRecoveryMode" | "increaseAllowance" | "initialize" | "name" | "nonces" | "onExitPool" | "onJoinPool" | "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)" | "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)" | "pause" | "permit" | "queryExit" | "queryJoin" | "setSwapFeePercentage" | "setTargets" | "symbol" | "totalSupply" | "transfer" | "transferFrom" | "unpause" | "version"): FunctionFragment; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "disableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "enableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getBptIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getDomainSeparator", values?: undefined): string; + encodeFunctionData(functionFragment: "getMainIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getMainToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getNextNonce", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getOwner", values?: undefined): string; + encodeFunctionData(functionFragment: "getPausedState", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolId", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeesCollector", values?: undefined): string; + encodeFunctionData(functionFragment: "getRate", values?: undefined): string; + encodeFunctionData(functionFragment: "getScalingFactors", values?: undefined): string; + encodeFunctionData(functionFragment: "getSwapFeePercentage", values?: undefined): string; + encodeFunctionData(functionFragment: "getTargets", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "getVirtualSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedTokenRate", values?: undefined): string; + encodeFunctionData(functionFragment: "inRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "initialize", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "onExitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onJoinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)", values: [ + IPoolSwapStructs$b.SwapRequestStruct, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)", values: [ + IPoolSwapStructs$b.SwapRequestStruct, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData(functionFragment: "permit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryExit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryJoin", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "setSwapFeePercentage", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setTargets", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unpause", values?: undefined): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "enableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBptIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDomainSeparator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMainIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMainToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getNextNonce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPausedState", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeesCollector", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getScalingFactors", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTargets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVirtualSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedTokenRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "inRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onExitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onJoinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryExit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setTargets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "PausedStateChanged(bool)": EventFragment; + "RecoveryModeStateChanged(bool)": EventFragment; + "SwapFeePercentageChanged(uint256)": EventFragment; + "TargetsSet(address,uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PausedStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RecoveryModeStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SwapFeePercentageChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TargetsSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +interface ApprovalEventObject$d { + owner: string; + spender: string; + value: BigNumber$1; +} +type ApprovalEvent$d = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject$d>; +type ApprovalEventFilter$d = TypedEventFilter; +interface PausedStateChangedEventObject$a { + paused: boolean; +} +type PausedStateChangedEvent$a = TypedEvent<[ + boolean +], PausedStateChangedEventObject$a>; +type PausedStateChangedEventFilter$a = TypedEventFilter; +interface RecoveryModeStateChangedEventObject$6 { + enabled: boolean; +} +type RecoveryModeStateChangedEvent$6 = TypedEvent<[ + boolean +], RecoveryModeStateChangedEventObject$6>; +type RecoveryModeStateChangedEventFilter$6 = TypedEventFilter; +interface SwapFeePercentageChangedEventObject$9 { + swapFeePercentage: BigNumber$1; +} +type SwapFeePercentageChangedEvent$9 = TypedEvent<[ + BigNumber$1 +], SwapFeePercentageChangedEventObject$9>; +type SwapFeePercentageChangedEventFilter$9 = TypedEventFilter; +interface TargetsSetEventObject$5 { + token: string; + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; +} +type TargetsSetEvent$5 = TypedEvent<[ + string, + BigNumber$1, + BigNumber$1 +], TargetsSetEventObject$5>; +type TargetsSetEventFilter$5 = TypedEventFilter; +interface TransferEventObject$d { + from: string; + to: string; + value: BigNumber$1; +} +type TransferEvent$d = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject$d>; +type TransferEventFilter$d = TypedEventFilter; +declare namespace AaveLinearPool { + type ConstructorArgsStruct = { + vault: PromiseOrValue; + name: PromiseOrValue; + symbol: PromiseOrValue; + mainToken: PromiseOrValue; + wrappedToken: PromiseOrValue; + assetManager: PromiseOrValue; + upperTarget: PromiseOrValue; + swapFeePercentage: PromiseOrValue; + pauseWindowDuration: PromiseOrValue; + bufferPeriodDuration: PromiseOrValue; + owner: PromiseOrValue; + version: PromiseOrValue; + }; + type ConstructorArgsStructOutput = [ + string, + string, + string, + string, + string, + string, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + string, + string + ] & { + vault: string; + name: string; + symbol: string; + mainToken: string; + wrappedToken: string; + assetManager: string; + upperTarget: BigNumber$1; + swapFeePercentage: BigNumber$1; + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + owner: string; + version: string; + }; +} +interface AaveLinearPool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: AaveLinearPoolInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getBptIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getDomainSeparator(overrides?: CallOverrides): Promise<[string]>; + getMainIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getMainToken(overrides?: CallOverrides): Promise<[string]>; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + getOwner(overrides?: CallOverrides): Promise<[string]>; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeesCollector(overrides?: CallOverrides): Promise<[string]>; + getRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getScalingFactors(overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getSwapFeePercentage(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise<[string]>; + getVirtualSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getWrappedIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getWrappedToken(overrides?: CallOverrides): Promise<[string]>; + getWrappedTokenRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + inRecoveryMode(overrides?: CallOverrides): Promise<[boolean]>; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise<[string]>; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$b.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$b.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise<[string]>; + }; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$b.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$b.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + disableRecoveryMode(overrides?: CallOverrides): Promise; + enableRecoveryMode(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsOut: BigNumber$1[]; + dueProtocolFees: BigNumber$1[]; + }>; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsIn: BigNumber$1[]; + dueProtocolFees: BigNumber$1[]; + }>; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$b.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$b.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: CallOverrides): Promise; + pause(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptIn: BigNumber$1; + amountsOut: BigNumber$1[]; + }>; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptOut: BigNumber$1; + amountsIn: BigNumber$1[]; + }>; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: CallOverrides): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + unpause(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$d; + Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$d; + "PausedStateChanged(bool)"(paused?: null): PausedStateChangedEventFilter$a; + PausedStateChanged(paused?: null): PausedStateChangedEventFilter$a; + "RecoveryModeStateChanged(bool)"(enabled?: null): RecoveryModeStateChangedEventFilter$6; + RecoveryModeStateChanged(enabled?: null): RecoveryModeStateChangedEventFilter$6; + "SwapFeePercentageChanged(uint256)"(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$9; + SwapFeePercentageChanged(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$9; + "TargetsSet(address,uint256,uint256)"(token?: PromiseOrValue | null, lowerTarget?: null, upperTarget?: null): TargetsSetEventFilter$5; + TargetsSet(token?: PromiseOrValue | null, lowerTarget?: null, upperTarget?: null): TargetsSetEventFilter$5; + "Transfer(address,address,uint256)"(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$d; + Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$d; + }; + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$b.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$b.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$b.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$b.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + }; +} + +interface AaveLinearPoolFactoryInterface extends utils.Interface { + functions: { + "create(string,string,address,address,uint256,uint256,address,uint256,bytes32)": FunctionFragment; + "disable()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getCreationCode()": FunctionFragment; + "getCreationCodeContracts()": FunctionFragment; + "getLastCreatedPool()": FunctionFragment; + "getPauseConfiguration()": FunctionFragment; + "getPoolVersion()": FunctionFragment; + "getProtocolFeePercentagesProvider()": FunctionFragment; + "getVault()": FunctionFragment; + "isDisabled()": FunctionFragment; + "isPoolFromFactory(address)": FunctionFragment; + "version()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "create" | "disable" | "getActionId" | "getAuthorizer" | "getCreationCode" | "getCreationCodeContracts" | "getLastCreatedPool" | "getPauseConfiguration" | "getPoolVersion" | "getProtocolFeePercentagesProvider" | "getVault" | "isDisabled" | "isPoolFromFactory" | "version"): FunctionFragment; + encodeFunctionData(functionFragment: "create", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "disable", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCode", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCodeContracts", values?: undefined): string; + encodeFunctionData(functionFragment: "getLastCreatedPool", values?: undefined): string; + encodeFunctionData(functionFragment: "getPauseConfiguration", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolVersion", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeePercentagesProvider", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "isDisabled", values?: undefined): string; + encodeFunctionData(functionFragment: "isPoolFromFactory", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + decodeFunctionResult(functionFragment: "create", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disable", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCodeContracts", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLastCreatedPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPauseConfiguration", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolVersion", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeePercentagesProvider", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isDisabled", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isPoolFromFactory", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + events: { + "AaveLinearPoolCreated(address,uint256)": EventFragment; + "FactoryDisabled()": EventFragment; + "PoolCreated(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "AaveLinearPoolCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FactoryDisabled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolCreated"): EventFragment; +} +interface AaveLinearPoolCreatedEventObject { + pool: string; + protocolId: BigNumber$1; +} +type AaveLinearPoolCreatedEvent = TypedEvent<[ + string, + BigNumber$1 +], AaveLinearPoolCreatedEventObject>; +type AaveLinearPoolCreatedEventFilter = TypedEventFilter; +interface FactoryDisabledEventObject$6 { +} +type FactoryDisabledEvent$6 = TypedEvent<[], FactoryDisabledEventObject$6>; +type FactoryDisabledEventFilter$6 = TypedEventFilter; +interface PoolCreatedEventObject$6 { + pool: string; +} +type PoolCreatedEvent$6 = TypedEvent<[string], PoolCreatedEventObject$6>; +type PoolCreatedEventFilter$6 = TypedEventFilter; +interface AaveLinearPoolFactory extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: AaveLinearPoolFactoryInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getCreationCode(overrides?: CallOverrides): Promise<[string]>; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise<[string]>; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise<[string]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + isDisabled(overrides?: CallOverrides): Promise<[boolean]>; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + version(overrides?: CallOverrides): Promise<[string]>; + }; + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + callStatic: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: CallOverrides): Promise; + disable(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + filters: { + "AaveLinearPoolCreated(address,uint256)"(pool?: PromiseOrValue | null, protocolId?: PromiseOrValue | null): AaveLinearPoolCreatedEventFilter; + AaveLinearPoolCreated(pool?: PromiseOrValue | null, protocolId?: PromiseOrValue | null): AaveLinearPoolCreatedEventFilter; + "FactoryDisabled()"(): FactoryDisabledEventFilter$6; + FactoryDisabled(): FactoryDisabledEventFilter$6; + "PoolCreated(address)"(pool?: PromiseOrValue | null): PoolCreatedEventFilter$6; + PoolCreated(pool?: PromiseOrValue | null): PoolCreatedEventFilter$6; + }; + estimateGas: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; +} + +interface AaveWrappingInterface extends utils.Interface { + functions: { + "approveVault(address,uint256)": FunctionFragment; + "getVault()": FunctionFragment; + "unwrapAaveStaticToken(address,address,address,uint256,bool,uint256)": FunctionFragment; + "wrapAaveDynamicToken(address,address,address,uint256,bool,uint256)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "approveVault" | "getVault" | "unwrapAaveStaticToken" | "wrapAaveDynamicToken"): FunctionFragment; + encodeFunctionData(functionFragment: "approveVault", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "unwrapAaveStaticToken", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "wrapAaveDynamicToken", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + decodeFunctionResult(functionFragment: "approveVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrapAaveStaticToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrapAaveDynamicToken", data: BytesLike): Result; + events: {}; +} +interface AaveWrapping extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: AaveWrappingInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + approveVault(token: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getVault(overrides?: CallOverrides): Promise<[string]>; + unwrapAaveStaticToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, toUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapAaveDynamicToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, fromUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; + approveVault(token: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getVault(overrides?: CallOverrides): Promise; + unwrapAaveStaticToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, toUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapAaveDynamicToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, fromUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + approveVault(token: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + unwrapAaveStaticToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, toUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + wrapAaveDynamicToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, fromUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + approveVault(token: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getVault(overrides?: CallOverrides): Promise; + unwrapAaveStaticToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, toUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapAaveDynamicToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, fromUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + approveVault(token: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getVault(overrides?: CallOverrides): Promise; + unwrapAaveStaticToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, toUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapAaveDynamicToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, fromUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +interface AuthoriserInterface extends utils.Interface { + functions: { + "DEFAULT_ADMIN_ROLE()": FunctionFragment; + "canPerform(bytes32,address,address)": FunctionFragment; + "getRoleAdmin(bytes32)": FunctionFragment; + "getRoleMember(bytes32,uint256)": FunctionFragment; + "getRoleMemberCount(bytes32)": FunctionFragment; + "grantRole(bytes32,address)": FunctionFragment; + "grantRoles(bytes32[],address)": FunctionFragment; + "grantRolesToMany(bytes32[],address[])": FunctionFragment; + "hasRole(bytes32,address)": FunctionFragment; + "renounceRole(bytes32,address)": FunctionFragment; + "revokeRole(bytes32,address)": FunctionFragment; + "revokeRoles(bytes32[],address)": FunctionFragment; + "revokeRolesFromMany(bytes32[],address[])": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DEFAULT_ADMIN_ROLE" | "canPerform" | "getRoleAdmin" | "getRoleMember" | "getRoleMemberCount" | "grantRole" | "grantRoles" | "grantRolesToMany" | "hasRole" | "renounceRole" | "revokeRole" | "revokeRoles" | "revokeRolesFromMany"): FunctionFragment; + encodeFunctionData(functionFragment: "DEFAULT_ADMIN_ROLE", values?: undefined): string; + encodeFunctionData(functionFragment: "canPerform", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "getRoleAdmin", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getRoleMember", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getRoleMemberCount", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "grantRole", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "grantRoles", values: [PromiseOrValue[], PromiseOrValue]): string; + encodeFunctionData(functionFragment: "grantRolesToMany", values: [PromiseOrValue[], PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "hasRole", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "renounceRole", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "revokeRole", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "revokeRoles", values: [PromiseOrValue[], PromiseOrValue]): string; + encodeFunctionData(functionFragment: "revokeRolesFromMany", values: [PromiseOrValue[], PromiseOrValue[]]): string; + decodeFunctionResult(functionFragment: "DEFAULT_ADMIN_ROLE", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "canPerform", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRoleAdmin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRoleMember", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRoleMemberCount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "grantRolesToMany", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "renounceRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "revokeRoles", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "revokeRolesFromMany", data: BytesLike): Result; + events: { + "RoleAdminChanged(bytes32,bytes32,bytes32)": EventFragment; + "RoleGranted(bytes32,address,address)": EventFragment; + "RoleRevoked(bytes32,address,address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; +} +interface RoleAdminChangedEventObject { + role: string; + previousAdminRole: string; + newAdminRole: string; +} +type RoleAdminChangedEvent = TypedEvent<[ + string, + string, + string +], RoleAdminChangedEventObject>; +type RoleAdminChangedEventFilter = TypedEventFilter; +interface RoleGrantedEventObject { + role: string; + account: string; + sender: string; +} +type RoleGrantedEvent = TypedEvent<[ + string, + string, + string +], RoleGrantedEventObject>; +type RoleGrantedEventFilter = TypedEventFilter; +interface RoleRevokedEventObject { + role: string; + account: string; + sender: string; +} +type RoleRevokedEvent = TypedEvent<[ + string, + string, + string +], RoleRevokedEventObject>; +type RoleRevokedEventFilter = TypedEventFilter; +interface Authoriser extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: AuthoriserInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<[string]>; + canPerform(actionId: PromiseOrValue, account: PromiseOrValue, arg2: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + getRoleAdmin(role: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getRoleMember(role: PromiseOrValue, index: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getRoleMemberCount(role: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + grantRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + grantRoles(roles: PromiseOrValue[], account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + grantRolesToMany(roles: PromiseOrValue[], accounts: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + hasRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + renounceRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + revokeRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + revokeRoles(roles: PromiseOrValue[], account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + revokeRolesFromMany(roles: PromiseOrValue[], accounts: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; + canPerform(actionId: PromiseOrValue, account: PromiseOrValue, arg2: PromiseOrValue, overrides?: CallOverrides): Promise; + getRoleAdmin(role: PromiseOrValue, overrides?: CallOverrides): Promise; + getRoleMember(role: PromiseOrValue, index: PromiseOrValue, overrides?: CallOverrides): Promise; + getRoleMemberCount(role: PromiseOrValue, overrides?: CallOverrides): Promise; + grantRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + grantRoles(roles: PromiseOrValue[], account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + grantRolesToMany(roles: PromiseOrValue[], accounts: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + hasRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: CallOverrides): Promise; + renounceRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + revokeRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + revokeRoles(roles: PromiseOrValue[], account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + revokeRolesFromMany(roles: PromiseOrValue[], accounts: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; + canPerform(actionId: PromiseOrValue, account: PromiseOrValue, arg2: PromiseOrValue, overrides?: CallOverrides): Promise; + getRoleAdmin(role: PromiseOrValue, overrides?: CallOverrides): Promise; + getRoleMember(role: PromiseOrValue, index: PromiseOrValue, overrides?: CallOverrides): Promise; + getRoleMemberCount(role: PromiseOrValue, overrides?: CallOverrides): Promise; + grantRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: CallOverrides): Promise; + grantRoles(roles: PromiseOrValue[], account: PromiseOrValue, overrides?: CallOverrides): Promise; + grantRolesToMany(roles: PromiseOrValue[], accounts: PromiseOrValue[], overrides?: CallOverrides): Promise; + hasRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: CallOverrides): Promise; + renounceRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: CallOverrides): Promise; + revokeRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: CallOverrides): Promise; + revokeRoles(roles: PromiseOrValue[], account: PromiseOrValue, overrides?: CallOverrides): Promise; + revokeRolesFromMany(roles: PromiseOrValue[], accounts: PromiseOrValue[], overrides?: CallOverrides): Promise; + }; + filters: { + "RoleAdminChanged(bytes32,bytes32,bytes32)"(role?: PromiseOrValue | null, previousAdminRole?: PromiseOrValue | null, newAdminRole?: PromiseOrValue | null): RoleAdminChangedEventFilter; + RoleAdminChanged(role?: PromiseOrValue | null, previousAdminRole?: PromiseOrValue | null, newAdminRole?: PromiseOrValue | null): RoleAdminChangedEventFilter; + "RoleGranted(bytes32,address,address)"(role?: PromiseOrValue | null, account?: PromiseOrValue | null, sender?: PromiseOrValue | null): RoleGrantedEventFilter; + RoleGranted(role?: PromiseOrValue | null, account?: PromiseOrValue | null, sender?: PromiseOrValue | null): RoleGrantedEventFilter; + "RoleRevoked(bytes32,address,address)"(role?: PromiseOrValue | null, account?: PromiseOrValue | null, sender?: PromiseOrValue | null): RoleRevokedEventFilter; + RoleRevoked(role?: PromiseOrValue | null, account?: PromiseOrValue | null, sender?: PromiseOrValue | null): RoleRevokedEventFilter; + }; + estimateGas: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; + canPerform(actionId: PromiseOrValue, account: PromiseOrValue, arg2: PromiseOrValue, overrides?: CallOverrides): Promise; + getRoleAdmin(role: PromiseOrValue, overrides?: CallOverrides): Promise; + getRoleMember(role: PromiseOrValue, index: PromiseOrValue, overrides?: CallOverrides): Promise; + getRoleMemberCount(role: PromiseOrValue, overrides?: CallOverrides): Promise; + grantRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + grantRoles(roles: PromiseOrValue[], account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + grantRolesToMany(roles: PromiseOrValue[], accounts: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + hasRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: CallOverrides): Promise; + renounceRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + revokeRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + revokeRoles(roles: PromiseOrValue[], account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + revokeRolesFromMany(roles: PromiseOrValue[], accounts: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; + canPerform(actionId: PromiseOrValue, account: PromiseOrValue, arg2: PromiseOrValue, overrides?: CallOverrides): Promise; + getRoleAdmin(role: PromiseOrValue, overrides?: CallOverrides): Promise; + getRoleMember(role: PromiseOrValue, index: PromiseOrValue, overrides?: CallOverrides): Promise; + getRoleMemberCount(role: PromiseOrValue, overrides?: CallOverrides): Promise; + grantRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + grantRoles(roles: PromiseOrValue[], account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + grantRolesToMany(roles: PromiseOrValue[], accounts: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + hasRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: CallOverrides): Promise; + renounceRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + revokeRole(role: PromiseOrValue, account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + revokeRoles(roles: PromiseOrValue[], account: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + revokeRolesFromMany(roles: PromiseOrValue[], accounts: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +declare namespace IVault$3 { + type ExitPoolRequestStruct = { + assets: PromiseOrValue[]; + minAmountsOut: PromiseOrValue[]; + userData: PromiseOrValue; + toInternalBalance: PromiseOrValue; + }; + type ExitPoolRequestStructOutput = [ + string[], + BigNumber$1[], + string, + boolean + ] & { + assets: string[]; + minAmountsOut: BigNumber$1[]; + userData: string; + toInternalBalance: boolean; + }; + type JoinPoolRequestStruct = { + assets: PromiseOrValue[]; + maxAmountsIn: PromiseOrValue[]; + userData: PromiseOrValue; + fromInternalBalance: PromiseOrValue; + }; + type JoinPoolRequestStructOutput = [ + string[], + BigNumber$1[], + string, + boolean + ] & { + assets: string[]; + maxAmountsIn: BigNumber$1[]; + userData: string; + fromInternalBalance: boolean; + }; +} +interface BalancerHelpersInterface extends utils.Interface { + functions: { + "queryExit(bytes32,address,address,(address[],uint256[],bytes,bool))": FunctionFragment; + "queryJoin(bytes32,address,address,(address[],uint256[],bytes,bool))": FunctionFragment; + "vault()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "queryExit" | "queryJoin" | "vault"): FunctionFragment; + encodeFunctionData(functionFragment: "queryExit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + IVault$3.ExitPoolRequestStruct + ]): string; + encodeFunctionData(functionFragment: "queryJoin", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + IVault$3.JoinPoolRequestStruct + ]): string; + encodeFunctionData(functionFragment: "vault", values?: undefined): string; + decodeFunctionResult(functionFragment: "queryExit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "vault", data: BytesLike): Result; + events: {}; +} +interface BalancerHelpers extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: BalancerHelpersInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$3.ExitPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$3.JoinPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + vault(overrides?: CallOverrides): Promise<[string]>; + }; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$3.ExitPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$3.JoinPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + vault(overrides?: CallOverrides): Promise; + callStatic: { + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$3.ExitPoolRequestStruct, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptIn: BigNumber$1; + amountsOut: BigNumber$1[]; + }>; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$3.JoinPoolRequestStruct, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptOut: BigNumber$1; + amountsIn: BigNumber$1[]; + }>; + vault(overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$3.ExitPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$3.JoinPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + vault(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$3.ExitPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$3.JoinPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + vault(overrides?: CallOverrides): Promise; + }; +} + +interface BalancerMinterInterface extends utils.Interface { + functions: { + "allowed_to_mint_for(address,address)": FunctionFragment; + "getBalancerToken()": FunctionFragment; + "getBalancerTokenAdmin()": FunctionFragment; + "getDomainSeparator()": FunctionFragment; + "getGaugeController()": FunctionFragment; + "getMinterApproval(address,address)": FunctionFragment; + "getNextNonce(address)": FunctionFragment; + "mint(address)": FunctionFragment; + "mintFor(address,address)": FunctionFragment; + "mintMany(address[])": FunctionFragment; + "mintManyFor(address[],address)": FunctionFragment; + "mint_for(address,address)": FunctionFragment; + "mint_many(address[8])": FunctionFragment; + "minted(address,address)": FunctionFragment; + "setMinterApproval(address,bool)": FunctionFragment; + "setMinterApprovalWithSignature(address,bool,address,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "toggle_approve_mint(address)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "allowed_to_mint_for" | "getBalancerToken" | "getBalancerTokenAdmin" | "getDomainSeparator" | "getGaugeController" | "getMinterApproval" | "getNextNonce" | "mint" | "mintFor" | "mintMany" | "mintManyFor" | "mint_for" | "mint_many" | "minted" | "setMinterApproval" | "setMinterApprovalWithSignature" | "toggle_approve_mint"): FunctionFragment; + encodeFunctionData(functionFragment: "allowed_to_mint_for", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getBalancerToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getBalancerTokenAdmin", values?: undefined): string; + encodeFunctionData(functionFragment: "getDomainSeparator", values?: undefined): string; + encodeFunctionData(functionFragment: "getGaugeController", values?: undefined): string; + encodeFunctionData(functionFragment: "getMinterApproval", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getNextNonce", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "mint", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "mintFor", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "mintMany", values: [PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "mintManyFor", values: [PromiseOrValue[], PromiseOrValue]): string; + encodeFunctionData(functionFragment: "mint_for", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "mint_many", values: [PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "minted", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setMinterApproval", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setMinterApprovalWithSignature", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "toggle_approve_mint", values: [PromiseOrValue]): string; + decodeFunctionResult(functionFragment: "allowed_to_mint_for", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBalancerToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBalancerTokenAdmin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDomainSeparator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getGaugeController", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMinterApproval", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getNextNonce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mintFor", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mintMany", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mintManyFor", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint_for", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint_many", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "minted", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setMinterApproval", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setMinterApprovalWithSignature", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "toggle_approve_mint", data: BytesLike): Result; + events: { + "Minted(address,address,uint256)": EventFragment; + "MinterApprovalSet(address,address,bool)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Minted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "MinterApprovalSet"): EventFragment; +} +interface MintedEventObject { + recipient: string; + gauge: string; + minted: BigNumber$1; +} +type MintedEvent = TypedEvent<[ + string, + string, + BigNumber$1 +], MintedEventObject>; +type MintedEventFilter = TypedEventFilter; +interface MinterApprovalSetEventObject { + user: string; + minter: string; + approval: boolean; +} +type MinterApprovalSetEvent = TypedEvent<[ + string, + string, + boolean +], MinterApprovalSetEventObject>; +type MinterApprovalSetEventFilter = TypedEventFilter; +interface BalancerMinter extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: BalancerMinterInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + allowed_to_mint_for(minter: PromiseOrValue, user: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + getBalancerToken(overrides?: CallOverrides): Promise<[string]>; + getBalancerTokenAdmin(overrides?: CallOverrides): Promise<[string]>; + getDomainSeparator(overrides?: CallOverrides): Promise<[string]>; + getGaugeController(overrides?: CallOverrides): Promise<[string]>; + getMinterApproval(minter: PromiseOrValue, user: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + getNextNonce(user: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + mint(gauge: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mintFor(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mintMany(gauges: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mintManyFor(gauges: PromiseOrValue[], user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mint_for(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mint_many(gauges: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + minted(user: PromiseOrValue, gauge: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + setMinterApproval(minter: PromiseOrValue, approval: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setMinterApprovalWithSignature(minter: PromiseOrValue, approval: PromiseOrValue, user: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + toggle_approve_mint(minter: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + allowed_to_mint_for(minter: PromiseOrValue, user: PromiseOrValue, overrides?: CallOverrides): Promise; + getBalancerToken(overrides?: CallOverrides): Promise; + getBalancerTokenAdmin(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getGaugeController(overrides?: CallOverrides): Promise; + getMinterApproval(minter: PromiseOrValue, user: PromiseOrValue, overrides?: CallOverrides): Promise; + getNextNonce(user: PromiseOrValue, overrides?: CallOverrides): Promise; + mint(gauge: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mintFor(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mintMany(gauges: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mintManyFor(gauges: PromiseOrValue[], user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mint_for(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mint_many(gauges: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + minted(user: PromiseOrValue, gauge: PromiseOrValue, overrides?: CallOverrides): Promise; + setMinterApproval(minter: PromiseOrValue, approval: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setMinterApprovalWithSignature(minter: PromiseOrValue, approval: PromiseOrValue, user: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + toggle_approve_mint(minter: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + allowed_to_mint_for(minter: PromiseOrValue, user: PromiseOrValue, overrides?: CallOverrides): Promise; + getBalancerToken(overrides?: CallOverrides): Promise; + getBalancerTokenAdmin(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getGaugeController(overrides?: CallOverrides): Promise; + getMinterApproval(minter: PromiseOrValue, user: PromiseOrValue, overrides?: CallOverrides): Promise; + getNextNonce(user: PromiseOrValue, overrides?: CallOverrides): Promise; + mint(gauge: PromiseOrValue, overrides?: CallOverrides): Promise; + mintFor(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: CallOverrides): Promise; + mintMany(gauges: PromiseOrValue[], overrides?: CallOverrides): Promise; + mintManyFor(gauges: PromiseOrValue[], user: PromiseOrValue, overrides?: CallOverrides): Promise; + mint_for(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: CallOverrides): Promise; + mint_many(gauges: PromiseOrValue[], overrides?: CallOverrides): Promise; + minted(user: PromiseOrValue, gauge: PromiseOrValue, overrides?: CallOverrides): Promise; + setMinterApproval(minter: PromiseOrValue, approval: PromiseOrValue, overrides?: CallOverrides): Promise; + setMinterApprovalWithSignature(minter: PromiseOrValue, approval: PromiseOrValue, user: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + toggle_approve_mint(minter: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: { + "Minted(address,address,uint256)"(recipient?: PromiseOrValue | null, gauge?: null, minted?: null): MintedEventFilter; + Minted(recipient?: PromiseOrValue | null, gauge?: null, minted?: null): MintedEventFilter; + "MinterApprovalSet(address,address,bool)"(user?: PromiseOrValue | null, minter?: PromiseOrValue | null, approval?: null): MinterApprovalSetEventFilter; + MinterApprovalSet(user?: PromiseOrValue | null, minter?: PromiseOrValue | null, approval?: null): MinterApprovalSetEventFilter; + }; + estimateGas: { + allowed_to_mint_for(minter: PromiseOrValue, user: PromiseOrValue, overrides?: CallOverrides): Promise; + getBalancerToken(overrides?: CallOverrides): Promise; + getBalancerTokenAdmin(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getGaugeController(overrides?: CallOverrides): Promise; + getMinterApproval(minter: PromiseOrValue, user: PromiseOrValue, overrides?: CallOverrides): Promise; + getNextNonce(user: PromiseOrValue, overrides?: CallOverrides): Promise; + mint(gauge: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mintFor(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mintMany(gauges: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mintManyFor(gauges: PromiseOrValue[], user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mint_for(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mint_many(gauges: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + minted(user: PromiseOrValue, gauge: PromiseOrValue, overrides?: CallOverrides): Promise; + setMinterApproval(minter: PromiseOrValue, approval: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setMinterApprovalWithSignature(minter: PromiseOrValue, approval: PromiseOrValue, user: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + toggle_approve_mint(minter: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + allowed_to_mint_for(minter: PromiseOrValue, user: PromiseOrValue, overrides?: CallOverrides): Promise; + getBalancerToken(overrides?: CallOverrides): Promise; + getBalancerTokenAdmin(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getGaugeController(overrides?: CallOverrides): Promise; + getMinterApproval(minter: PromiseOrValue, user: PromiseOrValue, overrides?: CallOverrides): Promise; + getNextNonce(user: PromiseOrValue, overrides?: CallOverrides): Promise; + mint(gauge: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mintFor(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mintMany(gauges: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mintManyFor(gauges: PromiseOrValue[], user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mint_for(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + mint_many(gauges: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + minted(user: PromiseOrValue, gauge: PromiseOrValue, overrides?: CallOverrides): Promise; + setMinterApproval(minter: PromiseOrValue, approval: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setMinterApprovalWithSignature(minter: PromiseOrValue, approval: PromiseOrValue, user: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + toggle_approve_mint(minter: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +type PoolDataQueryConfigStruct = { + loadTokenBalanceUpdatesAfterBlock: PromiseOrValue; + loadTotalSupply: PromiseOrValue; + loadSwapFees: PromiseOrValue; + loadLinearWrappedTokenRates: PromiseOrValue; + loadLinearTargets: PromiseOrValue; + loadNormalizedWeights: PromiseOrValue; + loadScalingFactors: PromiseOrValue; + loadAmps: PromiseOrValue; + loadRates: PromiseOrValue; + blockNumber: PromiseOrValue; + totalSupplyTypes: PromiseOrValue[]; + swapFeeTypes: PromiseOrValue[]; + linearPoolIdxs: PromiseOrValue[]; + weightedPoolIdxs: PromiseOrValue[]; + scalingFactorPoolIdxs: PromiseOrValue[]; + ampPoolIdxs: PromiseOrValue[]; + ratePoolIdxs: PromiseOrValue[]; +}; +type PoolStatusQueryConfigStruct = { + loadInRecoveryMode: PromiseOrValue; + loadIsPaused: PromiseOrValue; +}; +interface BalancerPoolDataQueriesInterface extends utils.Interface { + functions: { + "getAmpForPools(address[])": FunctionFragment; + "getInRecoveryModeForPools(address[])": FunctionFragment; + "getIsPausedForPools(address[])": FunctionFragment; + "getLinearTargetsForPools(address[])": FunctionFragment; + "getNormalizedWeightsForPools(address[])": FunctionFragment; + "getPoolData(bytes32[],(bool,bool,bool,bool,bool,bool,bool,bool,bool,uint256,uint8[],uint8[],uint256[],uint256[],uint256[],uint256[],uint256[]))": FunctionFragment; + "getPoolStatus(bytes32[],(bool,bool))": FunctionFragment; + "getPoolTokenBalancesWithUpdatesAfterBlock(bytes32[],uint256)": FunctionFragment; + "getRateForPools(address[])": FunctionFragment; + "getScalingFactorsForPools(address[])": FunctionFragment; + "getSwapFeePercentageForPools(address[],uint8[])": FunctionFragment; + "getTotalSupplyForPools(address[],uint8[])": FunctionFragment; + "getWrappedTokenRateForLinearPools(address[])": FunctionFragment; + "vault()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "getAmpForPools" | "getInRecoveryModeForPools" | "getIsPausedForPools" | "getLinearTargetsForPools" | "getNormalizedWeightsForPools" | "getPoolData" | "getPoolStatus" | "getPoolTokenBalancesWithUpdatesAfterBlock" | "getRateForPools" | "getScalingFactorsForPools" | "getSwapFeePercentageForPools" | "getTotalSupplyForPools" | "getWrappedTokenRateForLinearPools" | "vault"): FunctionFragment; + encodeFunctionData(functionFragment: "getAmpForPools", values: [PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "getInRecoveryModeForPools", values: [PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "getIsPausedForPools", values: [PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "getLinearTargetsForPools", values: [PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "getNormalizedWeightsForPools", values: [PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "getPoolData", values: [PromiseOrValue[], PoolDataQueryConfigStruct]): string; + encodeFunctionData(functionFragment: "getPoolStatus", values: [PromiseOrValue[], PoolStatusQueryConfigStruct]): string; + encodeFunctionData(functionFragment: "getPoolTokenBalancesWithUpdatesAfterBlock", values: [PromiseOrValue[], PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getRateForPools", values: [PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "getScalingFactorsForPools", values: [PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "getSwapFeePercentageForPools", values: [PromiseOrValue[], PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "getTotalSupplyForPools", values: [PromiseOrValue[], PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "getWrappedTokenRateForLinearPools", values: [PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "vault", values?: undefined): string; + decodeFunctionResult(functionFragment: "getAmpForPools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getInRecoveryModeForPools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getIsPausedForPools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLinearTargetsForPools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getNormalizedWeightsForPools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolData", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolStatus", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolTokenBalancesWithUpdatesAfterBlock", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRateForPools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getScalingFactorsForPools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getSwapFeePercentageForPools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTotalSupplyForPools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedTokenRateForLinearPools", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "vault", data: BytesLike): Result; + events: {}; +} +interface BalancerPoolDataQueries extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: BalancerPoolDataQueriesInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + getAmpForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getInRecoveryModeForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise<[boolean[]]>; + getIsPausedForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise<[boolean[]]>; + getLinearTargetsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise<[BigNumber$1[][]]>; + getNormalizedWeightsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise<[BigNumber$1[][]]>; + getPoolData(poolIds: PromiseOrValue[], config: PoolDataQueryConfigStruct, overrides?: CallOverrides): Promise<[ + BigNumber$1[][], + BigNumber$1[], + BigNumber$1[], + BigNumber$1[], + BigNumber$1[][], + BigNumber$1[][], + BigNumber$1[][], + BigNumber$1[], + BigNumber$1[], + BigNumber$1[] + ] & { + balances: BigNumber$1[][]; + totalSupplies: BigNumber$1[]; + swapFees: BigNumber$1[]; + linearWrappedTokenRates: BigNumber$1[]; + linearTargets: BigNumber$1[][]; + weights: BigNumber$1[][]; + scalingFactors: BigNumber$1[][]; + amps: BigNumber$1[]; + rates: BigNumber$1[]; + ignoreIdxs: BigNumber$1[]; + }>; + getPoolStatus(poolIds: PromiseOrValue[], config: PoolStatusQueryConfigStruct, overrides?: CallOverrides): Promise<[ + boolean[], + boolean[] + ] & { + isPaused: boolean[]; + inRecoveryMode: boolean[]; + }>; + getPoolTokenBalancesWithUpdatesAfterBlock(poolIds: PromiseOrValue[], blockNumber: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1[][]]>; + getRateForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getScalingFactorsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise<[BigNumber$1[][]]>; + getSwapFeePercentageForPools(poolAddresses: PromiseOrValue[], swapFeeTypes: PromiseOrValue[], overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getTotalSupplyForPools(poolAddresses: PromiseOrValue[], totalSupplyTypes: PromiseOrValue[], overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getWrappedTokenRateForLinearPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + vault(overrides?: CallOverrides): Promise<[string]>; + }; + getAmpForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getInRecoveryModeForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getIsPausedForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getLinearTargetsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getNormalizedWeightsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getPoolData(poolIds: PromiseOrValue[], config: PoolDataQueryConfigStruct, overrides?: CallOverrides): Promise<[ + BigNumber$1[][], + BigNumber$1[], + BigNumber$1[], + BigNumber$1[], + BigNumber$1[][], + BigNumber$1[][], + BigNumber$1[][], + BigNumber$1[], + BigNumber$1[], + BigNumber$1[] + ] & { + balances: BigNumber$1[][]; + totalSupplies: BigNumber$1[]; + swapFees: BigNumber$1[]; + linearWrappedTokenRates: BigNumber$1[]; + linearTargets: BigNumber$1[][]; + weights: BigNumber$1[][]; + scalingFactors: BigNumber$1[][]; + amps: BigNumber$1[]; + rates: BigNumber$1[]; + ignoreIdxs: BigNumber$1[]; + }>; + getPoolStatus(poolIds: PromiseOrValue[], config: PoolStatusQueryConfigStruct, overrides?: CallOverrides): Promise<[ + boolean[], + boolean[] + ] & { + isPaused: boolean[]; + inRecoveryMode: boolean[]; + }>; + getPoolTokenBalancesWithUpdatesAfterBlock(poolIds: PromiseOrValue[], blockNumber: PromiseOrValue, overrides?: CallOverrides): Promise; + getRateForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getScalingFactorsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getSwapFeePercentageForPools(poolAddresses: PromiseOrValue[], swapFeeTypes: PromiseOrValue[], overrides?: CallOverrides): Promise; + getTotalSupplyForPools(poolAddresses: PromiseOrValue[], totalSupplyTypes: PromiseOrValue[], overrides?: CallOverrides): Promise; + getWrappedTokenRateForLinearPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + vault(overrides?: CallOverrides): Promise; + callStatic: { + getAmpForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getInRecoveryModeForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getIsPausedForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getLinearTargetsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getNormalizedWeightsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getPoolData(poolIds: PromiseOrValue[], config: PoolDataQueryConfigStruct, overrides?: CallOverrides): Promise<[ + BigNumber$1[][], + BigNumber$1[], + BigNumber$1[], + BigNumber$1[], + BigNumber$1[][], + BigNumber$1[][], + BigNumber$1[][], + BigNumber$1[], + BigNumber$1[], + BigNumber$1[] + ] & { + balances: BigNumber$1[][]; + totalSupplies: BigNumber$1[]; + swapFees: BigNumber$1[]; + linearWrappedTokenRates: BigNumber$1[]; + linearTargets: BigNumber$1[][]; + weights: BigNumber$1[][]; + scalingFactors: BigNumber$1[][]; + amps: BigNumber$1[]; + rates: BigNumber$1[]; + ignoreIdxs: BigNumber$1[]; + }>; + getPoolStatus(poolIds: PromiseOrValue[], config: PoolStatusQueryConfigStruct, overrides?: CallOverrides): Promise<[ + boolean[], + boolean[] + ] & { + isPaused: boolean[]; + inRecoveryMode: boolean[]; + }>; + getPoolTokenBalancesWithUpdatesAfterBlock(poolIds: PromiseOrValue[], blockNumber: PromiseOrValue, overrides?: CallOverrides): Promise; + getRateForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getScalingFactorsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getSwapFeePercentageForPools(poolAddresses: PromiseOrValue[], swapFeeTypes: PromiseOrValue[], overrides?: CallOverrides): Promise; + getTotalSupplyForPools(poolAddresses: PromiseOrValue[], totalSupplyTypes: PromiseOrValue[], overrides?: CallOverrides): Promise; + getWrappedTokenRateForLinearPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + vault(overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + getAmpForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getInRecoveryModeForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getIsPausedForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getLinearTargetsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getNormalizedWeightsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getPoolData(poolIds: PromiseOrValue[], config: PoolDataQueryConfigStruct, overrides?: CallOverrides): Promise; + getPoolStatus(poolIds: PromiseOrValue[], config: PoolStatusQueryConfigStruct, overrides?: CallOverrides): Promise; + getPoolTokenBalancesWithUpdatesAfterBlock(poolIds: PromiseOrValue[], blockNumber: PromiseOrValue, overrides?: CallOverrides): Promise; + getRateForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getScalingFactorsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getSwapFeePercentageForPools(poolAddresses: PromiseOrValue[], swapFeeTypes: PromiseOrValue[], overrides?: CallOverrides): Promise; + getTotalSupplyForPools(poolAddresses: PromiseOrValue[], totalSupplyTypes: PromiseOrValue[], overrides?: CallOverrides): Promise; + getWrappedTokenRateForLinearPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + vault(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + getAmpForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getInRecoveryModeForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getIsPausedForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getLinearTargetsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getNormalizedWeightsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getPoolData(poolIds: PromiseOrValue[], config: PoolDataQueryConfigStruct, overrides?: CallOverrides): Promise; + getPoolStatus(poolIds: PromiseOrValue[], config: PoolStatusQueryConfigStruct, overrides?: CallOverrides): Promise; + getPoolTokenBalancesWithUpdatesAfterBlock(poolIds: PromiseOrValue[], blockNumber: PromiseOrValue, overrides?: CallOverrides): Promise; + getRateForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getScalingFactorsForPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + getSwapFeePercentageForPools(poolAddresses: PromiseOrValue[], swapFeeTypes: PromiseOrValue[], overrides?: CallOverrides): Promise; + getTotalSupplyForPools(poolAddresses: PromiseOrValue[], totalSupplyTypes: PromiseOrValue[], overrides?: CallOverrides): Promise; + getWrappedTokenRateForLinearPools(poolAddresses: PromiseOrValue[], overrides?: CallOverrides): Promise; + vault(overrides?: CallOverrides): Promise; + }; +} + +interface BalancerRelayerInterface extends utils.Interface { + functions: { + "getLibrary()": FunctionFragment; + "getVault()": FunctionFragment; + "multicall(bytes[])": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "getLibrary" | "getVault" | "multicall"): FunctionFragment; + encodeFunctionData(functionFragment: "getLibrary", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "multicall", values: [PromiseOrValue[]]): string; + decodeFunctionResult(functionFragment: "getLibrary", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result; + events: {}; +} +interface BalancerRelayer extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: BalancerRelayerInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + getLibrary(overrides?: CallOverrides): Promise<[string]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + multicall(data: PromiseOrValue[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; + getLibrary(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + multicall(data: PromiseOrValue[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + getLibrary(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + multicall(data: PromiseOrValue[], overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + getLibrary(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + multicall(data: PromiseOrValue[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + getLibrary(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + multicall(data: PromiseOrValue[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +declare namespace IVault$2 { + type BatchSwapStepStruct = { + poolId: PromiseOrValue; + assetInIndex: PromiseOrValue; + assetOutIndex: PromiseOrValue; + amount: PromiseOrValue; + userData: PromiseOrValue; + }; + type BatchSwapStepStructOutput = [ + string, + BigNumber$1, + BigNumber$1, + BigNumber$1, + string + ] & { + poolId: string; + assetInIndex: BigNumber$1; + assetOutIndex: BigNumber$1; + amount: BigNumber$1; + userData: string; + }; + type FundManagementStruct = { + sender: PromiseOrValue; + fromInternalBalance: PromiseOrValue; + recipient: PromiseOrValue; + toInternalBalance: PromiseOrValue; + }; + type FundManagementStructOutput = [ + string, + boolean, + string, + boolean + ] & { + sender: string; + fromInternalBalance: boolean; + recipient: string; + toInternalBalance: boolean; + }; + type ExitPoolRequestStruct = { + assets: PromiseOrValue[]; + minAmountsOut: PromiseOrValue[]; + userData: PromiseOrValue; + toInternalBalance: PromiseOrValue; + }; + type ExitPoolRequestStructOutput = [ + string[], + BigNumber$1[], + string, + boolean + ] & { + assets: string[]; + minAmountsOut: BigNumber$1[]; + userData: string; + toInternalBalance: boolean; + }; + type JoinPoolRequestStruct = { + assets: PromiseOrValue[]; + maxAmountsIn: PromiseOrValue[]; + userData: PromiseOrValue; + fromInternalBalance: PromiseOrValue; + }; + type JoinPoolRequestStructOutput = [ + string[], + BigNumber$1[], + string, + boolean + ] & { + assets: string[]; + maxAmountsIn: BigNumber$1[]; + userData: string; + fromInternalBalance: boolean; + }; + type UserBalanceOpStruct = { + kind: PromiseOrValue; + asset: PromiseOrValue; + amount: PromiseOrValue; + sender: PromiseOrValue; + recipient: PromiseOrValue; + }; + type UserBalanceOpStructOutput = [ + number, + string, + BigNumber$1, + string, + string + ] & { + kind: number; + asset: string; + amount: BigNumber$1; + sender: string; + recipient: string; + }; + type SingleSwapStruct = { + poolId: PromiseOrValue; + kind: PromiseOrValue; + assetIn: PromiseOrValue; + assetOut: PromiseOrValue; + amount: PromiseOrValue; + userData: PromiseOrValue; + }; + type SingleSwapStructOutput = [ + string, + number, + string, + string, + BigNumber$1, + string + ] & { + poolId: string; + kind: number; + assetIn: string; + assetOut: string; + amount: BigNumber$1; + userData: string; + }; +} +declare namespace VaultActions { + type OutputReferenceStruct = { + index: PromiseOrValue; + key: PromiseOrValue; + }; + type OutputReferenceStructOutput = [BigNumber$1, BigNumber$1] & { + index: BigNumber$1; + key: BigNumber$1; + }; +} +interface BatchRelayerLibraryInterface extends utils.Interface { + functions: { + "approveVault(address,uint256)": FunctionFragment; + "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256,uint256,(uint256,uint256)[])": FunctionFragment; + "exitPool(bytes32,uint8,address,address,(address[],uint256[],bytes,bool),(uint256,uint256)[])": FunctionFragment; + "gaugeClaimRewards(address[])": FunctionFragment; + "gaugeDeposit(address,address,address,uint256)": FunctionFragment; + "gaugeMint(address[],uint256)": FunctionFragment; + "gaugeSetMinterApproval(bool,address,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "gaugeWithdraw(address,address,address,uint256)": FunctionFragment; + "getEntrypoint()": FunctionFragment; + "getVault()": FunctionFragment; + "joinPool(bytes32,uint8,address,address,(address[],uint256[],bytes,bool),uint256,uint256)": FunctionFragment; + "manageUserBalance((uint8,address,uint256,address,address)[],uint256)": FunctionFragment; + "peekChainedReferenceValue(uint256)": FunctionFragment; + "setRelayerApproval(address,bool,bytes)": FunctionFragment; + "stakeETH(address,uint256,uint256)": FunctionFragment; + "stakeETHAndWrap(address,uint256,uint256)": FunctionFragment; + "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256,uint256,uint256)": FunctionFragment; + "unwrapAaveStaticToken(address,address,address,uint256,bool,uint256)": FunctionFragment; + "unwrapCompoundV2(address,address,address,uint256,uint256)": FunctionFragment; + "unwrapERC4626(address,address,address,uint256,uint256)": FunctionFragment; + "unwrapEuler(address,address,address,uint256,uint256)": FunctionFragment; + "unwrapGearbox(address,address,address,uint256,uint256)": FunctionFragment; + "unwrapReaperVaultToken(address,address,address,uint256,uint256)": FunctionFragment; + "unwrapShareToken(address,address,address,uint256,uint256)": FunctionFragment; + "unwrapTetu(address,address,address,uint256,uint256)": FunctionFragment; + "unwrapUnbuttonToken(address,address,address,uint256,uint256)": FunctionFragment; + "unwrapWstETH(address,address,uint256,uint256)": FunctionFragment; + "unwrapYearn(address,address,address,uint256,uint256)": FunctionFragment; + "vaultPermit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "vaultPermitDAI(address,address,uint256,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "wrapAaveDynamicToken(address,address,address,uint256,bool,uint256)": FunctionFragment; + "wrapCompoundV2(address,address,address,uint256,uint256)": FunctionFragment; + "wrapERC4626(address,address,address,uint256,uint256)": FunctionFragment; + "wrapEuler(address,address,address,address,uint256,uint256)": FunctionFragment; + "wrapGearbox(address,address,address,uint256,uint256)": FunctionFragment; + "wrapReaperVaultToken(address,address,address,uint256,uint256)": FunctionFragment; + "wrapShareToken(address,address,address,uint256,uint256)": FunctionFragment; + "wrapStETH(address,address,uint256,uint256)": FunctionFragment; + "wrapTetu(address,address,address,uint256,uint256)": FunctionFragment; + "wrapUnbuttonToken(address,address,address,uint256,uint256)": FunctionFragment; + "wrapYearn(address,address,address,uint256,uint256)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "approveVault" | "batchSwap" | "exitPool" | "gaugeClaimRewards" | "gaugeDeposit" | "gaugeMint" | "gaugeSetMinterApproval" | "gaugeWithdraw" | "getEntrypoint" | "getVault" | "joinPool" | "manageUserBalance" | "peekChainedReferenceValue" | "setRelayerApproval" | "stakeETH" | "stakeETHAndWrap" | "swap" | "unwrapAaveStaticToken" | "unwrapCompoundV2" | "unwrapERC4626" | "unwrapEuler" | "unwrapGearbox" | "unwrapReaperVaultToken" | "unwrapShareToken" | "unwrapTetu" | "unwrapUnbuttonToken" | "unwrapWstETH" | "unwrapYearn" | "vaultPermit" | "vaultPermitDAI" | "wrapAaveDynamicToken" | "wrapCompoundV2" | "wrapERC4626" | "wrapEuler" | "wrapGearbox" | "wrapReaperVaultToken" | "wrapShareToken" | "wrapStETH" | "wrapTetu" | "wrapUnbuttonToken" | "wrapYearn"): FunctionFragment; + encodeFunctionData(functionFragment: "approveVault", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "batchSwap", values: [ + PromiseOrValue, + IVault$2.BatchSwapStepStruct[], + PromiseOrValue[], + IVault$2.FundManagementStruct, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + VaultActions.OutputReferenceStruct[] + ]): string; + encodeFunctionData(functionFragment: "exitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + IVault$2.ExitPoolRequestStruct, + VaultActions.OutputReferenceStruct[] + ]): string; + encodeFunctionData(functionFragment: "gaugeClaimRewards", values: [PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "gaugeDeposit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "gaugeMint", values: [PromiseOrValue[], PromiseOrValue]): string; + encodeFunctionData(functionFragment: "gaugeSetMinterApproval", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "gaugeWithdraw", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "getEntrypoint", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "joinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + IVault$2.JoinPoolRequestStruct, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "manageUserBalance", values: [IVault$2.UserBalanceOpStruct[], PromiseOrValue]): string; + encodeFunctionData(functionFragment: "peekChainedReferenceValue", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setRelayerApproval", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "stakeETH", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "stakeETHAndWrap", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "swap", values: [ + IVault$2.SingleSwapStruct, + IVault$2.FundManagementStruct, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unwrapAaveStaticToken", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unwrapCompoundV2", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unwrapERC4626", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unwrapEuler", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unwrapGearbox", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unwrapReaperVaultToken", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unwrapShareToken", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unwrapTetu", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unwrapUnbuttonToken", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unwrapWstETH", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unwrapYearn", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "vaultPermit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "vaultPermitDAI", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "wrapAaveDynamicToken", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "wrapCompoundV2", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "wrapERC4626", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "wrapEuler", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "wrapGearbox", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "wrapReaperVaultToken", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "wrapShareToken", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "wrapStETH", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "wrapTetu", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "wrapUnbuttonToken", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "wrapYearn", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + decodeFunctionResult(functionFragment: "approveVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "batchSwap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gaugeClaimRewards", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gaugeDeposit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gaugeMint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gaugeSetMinterApproval", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gaugeWithdraw", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getEntrypoint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "joinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "manageUserBalance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "peekChainedReferenceValue", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setRelayerApproval", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "stakeETH", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "stakeETHAndWrap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrapAaveStaticToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrapCompoundV2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrapERC4626", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrapEuler", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrapGearbox", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrapReaperVaultToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrapShareToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrapTetu", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrapUnbuttonToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrapWstETH", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unwrapYearn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "vaultPermit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "vaultPermitDAI", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrapAaveDynamicToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrapCompoundV2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrapERC4626", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrapEuler", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrapGearbox", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrapReaperVaultToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrapShareToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrapStETH", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrapTetu", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrapUnbuttonToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "wrapYearn", data: BytesLike): Result; + events: {}; +} +interface BatchRelayerLibrary extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: BatchRelayerLibraryInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + approveVault(token: PromiseOrValue, amount: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + batchSwap(kind: PromiseOrValue, swaps: IVault$2.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault$2.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, value: PromiseOrValue, outputReferences: VaultActions.OutputReferenceStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + exitPool(poolId: PromiseOrValue, kind: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$2.ExitPoolRequestStruct, outputReferences: VaultActions.OutputReferenceStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeClaimRewards(gauges: PromiseOrValue[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeDeposit(gauge: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeMint(gauges: PromiseOrValue[], outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeSetMinterApproval(approval: PromiseOrValue, user: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeWithdraw(gauge: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + getEntrypoint(overrides?: CallOverrides): Promise<[string]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + joinPool(poolId: PromiseOrValue, kind: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$2.JoinPoolRequestStruct, value: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + manageUserBalance(ops: IVault$2.UserBalanceOpStruct[], value: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + peekChainedReferenceValue(ref: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1] & { + value: BigNumber$1; + }>; + setRelayerApproval(relayer: PromiseOrValue, approved: PromiseOrValue, authorisation: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + stakeETH(recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + stakeETHAndWrap(recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + swap(singleSwap: IVault$2.SingleSwapStruct, funds: IVault$2.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, value: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapAaveStaticToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, toUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapCompoundV2(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapERC4626(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapEuler(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapGearbox(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, dieselAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapReaperVaultToken(vaultToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapShareToken(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapTetu(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapUnbuttonToken(wrapperToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapWstETH(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapYearn(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + vaultPermit(token: PromiseOrValue, owner: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + vaultPermitDAI(token: PromiseOrValue, holder: PromiseOrValue, nonce: PromiseOrValue, expiry: PromiseOrValue, allowed: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapAaveDynamicToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, fromUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapCompoundV2(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapERC4626(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapEuler(wrappedToken: PromiseOrValue, eulerProtocol: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapGearbox(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, mainAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapReaperVaultToken(vaultToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapShareToken(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapStETH(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapTetu(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapUnbuttonToken(wrapperToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, uAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapYearn(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; + approveVault(token: PromiseOrValue, amount: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + batchSwap(kind: PromiseOrValue, swaps: IVault$2.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault$2.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, value: PromiseOrValue, outputReferences: VaultActions.OutputReferenceStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + exitPool(poolId: PromiseOrValue, kind: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$2.ExitPoolRequestStruct, outputReferences: VaultActions.OutputReferenceStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeClaimRewards(gauges: PromiseOrValue[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeDeposit(gauge: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeMint(gauges: PromiseOrValue[], outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeSetMinterApproval(approval: PromiseOrValue, user: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeWithdraw(gauge: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + getEntrypoint(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + joinPool(poolId: PromiseOrValue, kind: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$2.JoinPoolRequestStruct, value: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + manageUserBalance(ops: IVault$2.UserBalanceOpStruct[], value: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + peekChainedReferenceValue(ref: PromiseOrValue, overrides?: CallOverrides): Promise; + setRelayerApproval(relayer: PromiseOrValue, approved: PromiseOrValue, authorisation: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + stakeETH(recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + stakeETHAndWrap(recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + swap(singleSwap: IVault$2.SingleSwapStruct, funds: IVault$2.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, value: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapAaveStaticToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, toUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapCompoundV2(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapERC4626(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapEuler(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapGearbox(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, dieselAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapReaperVaultToken(vaultToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapShareToken(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapTetu(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapUnbuttonToken(wrapperToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapWstETH(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapYearn(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + vaultPermit(token: PromiseOrValue, owner: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + vaultPermitDAI(token: PromiseOrValue, holder: PromiseOrValue, nonce: PromiseOrValue, expiry: PromiseOrValue, allowed: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapAaveDynamicToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, fromUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapCompoundV2(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapERC4626(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapEuler(wrappedToken: PromiseOrValue, eulerProtocol: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapGearbox(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, mainAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapReaperVaultToken(vaultToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapShareToken(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapStETH(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapTetu(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapUnbuttonToken(wrapperToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, uAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapYearn(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + approveVault(token: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + batchSwap(kind: PromiseOrValue, swaps: IVault$2.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault$2.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, value: PromiseOrValue, outputReferences: VaultActions.OutputReferenceStruct[], overrides?: CallOverrides): Promise; + exitPool(poolId: PromiseOrValue, kind: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$2.ExitPoolRequestStruct, outputReferences: VaultActions.OutputReferenceStruct[], overrides?: CallOverrides): Promise; + gaugeClaimRewards(gauges: PromiseOrValue[], overrides?: CallOverrides): Promise; + gaugeDeposit(gauge: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + gaugeMint(gauges: PromiseOrValue[], outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + gaugeSetMinterApproval(approval: PromiseOrValue, user: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + gaugeWithdraw(gauge: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + getEntrypoint(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + joinPool(poolId: PromiseOrValue, kind: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$2.JoinPoolRequestStruct, value: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + manageUserBalance(ops: IVault$2.UserBalanceOpStruct[], value: PromiseOrValue, overrides?: CallOverrides): Promise; + peekChainedReferenceValue(ref: PromiseOrValue, overrides?: CallOverrides): Promise; + setRelayerApproval(relayer: PromiseOrValue, approved: PromiseOrValue, authorisation: PromiseOrValue, overrides?: CallOverrides): Promise; + stakeETH(recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + stakeETHAndWrap(recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + swap(singleSwap: IVault$2.SingleSwapStruct, funds: IVault$2.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, value: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + unwrapAaveStaticToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, toUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + unwrapCompoundV2(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + unwrapERC4626(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + unwrapEuler(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + unwrapGearbox(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, dieselAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + unwrapReaperVaultToken(vaultToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + unwrapShareToken(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + unwrapTetu(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + unwrapUnbuttonToken(wrapperToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + unwrapWstETH(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + unwrapYearn(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + vaultPermit(token: PromiseOrValue, owner: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + vaultPermitDAI(token: PromiseOrValue, holder: PromiseOrValue, nonce: PromiseOrValue, expiry: PromiseOrValue, allowed: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + wrapAaveDynamicToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, fromUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + wrapCompoundV2(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + wrapERC4626(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + wrapEuler(wrappedToken: PromiseOrValue, eulerProtocol: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + wrapGearbox(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, mainAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + wrapReaperVaultToken(vaultToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + wrapShareToken(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + wrapStETH(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + wrapTetu(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + wrapUnbuttonToken(wrapperToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, uAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + wrapYearn(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + approveVault(token: PromiseOrValue, amount: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + batchSwap(kind: PromiseOrValue, swaps: IVault$2.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault$2.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, value: PromiseOrValue, outputReferences: VaultActions.OutputReferenceStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + exitPool(poolId: PromiseOrValue, kind: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$2.ExitPoolRequestStruct, outputReferences: VaultActions.OutputReferenceStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeClaimRewards(gauges: PromiseOrValue[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeDeposit(gauge: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeMint(gauges: PromiseOrValue[], outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeSetMinterApproval(approval: PromiseOrValue, user: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeWithdraw(gauge: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + getEntrypoint(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + joinPool(poolId: PromiseOrValue, kind: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$2.JoinPoolRequestStruct, value: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + manageUserBalance(ops: IVault$2.UserBalanceOpStruct[], value: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + peekChainedReferenceValue(ref: PromiseOrValue, overrides?: CallOverrides): Promise; + setRelayerApproval(relayer: PromiseOrValue, approved: PromiseOrValue, authorisation: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + stakeETH(recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + stakeETHAndWrap(recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + swap(singleSwap: IVault$2.SingleSwapStruct, funds: IVault$2.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, value: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapAaveStaticToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, toUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapCompoundV2(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapERC4626(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapEuler(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapGearbox(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, dieselAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapReaperVaultToken(vaultToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapShareToken(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapTetu(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapUnbuttonToken(wrapperToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapWstETH(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapYearn(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + vaultPermit(token: PromiseOrValue, owner: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + vaultPermitDAI(token: PromiseOrValue, holder: PromiseOrValue, nonce: PromiseOrValue, expiry: PromiseOrValue, allowed: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapAaveDynamicToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, fromUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapCompoundV2(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapERC4626(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapEuler(wrappedToken: PromiseOrValue, eulerProtocol: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapGearbox(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, mainAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapReaperVaultToken(vaultToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapShareToken(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapStETH(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapTetu(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapUnbuttonToken(wrapperToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, uAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapYearn(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + approveVault(token: PromiseOrValue, amount: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + batchSwap(kind: PromiseOrValue, swaps: IVault$2.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault$2.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, value: PromiseOrValue, outputReferences: VaultActions.OutputReferenceStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + exitPool(poolId: PromiseOrValue, kind: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$2.ExitPoolRequestStruct, outputReferences: VaultActions.OutputReferenceStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeClaimRewards(gauges: PromiseOrValue[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeDeposit(gauge: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeMint(gauges: PromiseOrValue[], outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeSetMinterApproval(approval: PromiseOrValue, user: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + gaugeWithdraw(gauge: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + getEntrypoint(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + joinPool(poolId: PromiseOrValue, kind: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$2.JoinPoolRequestStruct, value: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + manageUserBalance(ops: IVault$2.UserBalanceOpStruct[], value: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + peekChainedReferenceValue(ref: PromiseOrValue, overrides?: CallOverrides): Promise; + setRelayerApproval(relayer: PromiseOrValue, approved: PromiseOrValue, authorisation: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + stakeETH(recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + stakeETHAndWrap(recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + swap(singleSwap: IVault$2.SingleSwapStruct, funds: IVault$2.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, value: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapAaveStaticToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, toUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapCompoundV2(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapERC4626(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapEuler(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapGearbox(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, dieselAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapReaperVaultToken(vaultToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapShareToken(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapTetu(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapUnbuttonToken(wrapperToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapWstETH(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + unwrapYearn(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + vaultPermit(token: PromiseOrValue, owner: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + vaultPermitDAI(token: PromiseOrValue, holder: PromiseOrValue, nonce: PromiseOrValue, expiry: PromiseOrValue, allowed: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapAaveDynamicToken(staticToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, fromUnderlying: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapCompoundV2(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapERC4626(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapEuler(wrappedToken: PromiseOrValue, eulerProtocol: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapGearbox(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, mainAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapReaperVaultToken(vaultToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapShareToken(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapStETH(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapTetu(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapUnbuttonToken(wrapperToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, uAmount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + wrapYearn(wrappedToken: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, outputReference: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +declare namespace IPoolSwapStructs$a { + type SwapRequestStruct = { + kind: PromiseOrValue; + tokenIn: PromiseOrValue; + tokenOut: PromiseOrValue; + amount: PromiseOrValue; + poolId: PromiseOrValue; + lastChangeBlock: PromiseOrValue; + from: PromiseOrValue; + to: PromiseOrValue; + userData: PromiseOrValue; + }; + type SwapRequestStructOutput = [ + number, + string, + string, + BigNumber$1, + string, + BigNumber$1, + string, + string, + string + ] & { + kind: number; + tokenIn: string; + tokenOut: string; + amount: BigNumber$1; + poolId: string; + lastChangeBlock: BigNumber$1; + from: string; + to: string; + userData: string; + }; +} +interface ComposableStablePoolInterface extends utils.Interface { + functions: { + "DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL()": FunctionFragment; + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "disableRecoveryMode()": FunctionFragment; + "enableRecoveryMode()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getActualSupply()": FunctionFragment; + "getAmplificationParameter()": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getBptIndex()": FunctionFragment; + "getDomainSeparator()": FunctionFragment; + "getLastJoinExitData()": FunctionFragment; + "getMinimumBpt()": FunctionFragment; + "getNextNonce(address)": FunctionFragment; + "getOwner()": FunctionFragment; + "getPausedState()": FunctionFragment; + "getPoolId()": FunctionFragment; + "getProtocolFeePercentageCache(uint256)": FunctionFragment; + "getProtocolFeesCollector()": FunctionFragment; + "getProtocolSwapFeeDelegation()": FunctionFragment; + "getRate()": FunctionFragment; + "getRateProviders()": FunctionFragment; + "getScalingFactors()": FunctionFragment; + "getSwapFeePercentage()": FunctionFragment; + "getTokenRate(address)": FunctionFragment; + "getTokenRateCache(address)": FunctionFragment; + "getVault()": FunctionFragment; + "inRecoveryMode()": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "isTokenExemptFromYieldProtocolFee(address)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)": FunctionFragment; + "pause()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "setAssetManagerPoolConfig(address,bytes)": FunctionFragment; + "setSwapFeePercentage(uint256)": FunctionFragment; + "setTokenRateCacheDuration(address,uint256)": FunctionFragment; + "startAmplificationParameterUpdate(uint256,uint256)": FunctionFragment; + "stopAmplificationParameterUpdate()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "unpause()": FunctionFragment; + "updateProtocolFeePercentageCache()": FunctionFragment; + "updateTokenRateCache(address)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL" | "DOMAIN_SEPARATOR" | "allowance" | "approve" | "balanceOf" | "decimals" | "decreaseAllowance" | "disableRecoveryMode" | "enableRecoveryMode" | "getActionId" | "getActualSupply" | "getAmplificationParameter" | "getAuthorizer" | "getBptIndex" | "getDomainSeparator" | "getLastJoinExitData" | "getMinimumBpt" | "getNextNonce" | "getOwner" | "getPausedState" | "getPoolId" | "getProtocolFeePercentageCache" | "getProtocolFeesCollector" | "getProtocolSwapFeeDelegation" | "getRate" | "getRateProviders" | "getScalingFactors" | "getSwapFeePercentage" | "getTokenRate" | "getTokenRateCache" | "getVault" | "inRecoveryMode" | "increaseAllowance" | "isTokenExemptFromYieldProtocolFee" | "name" | "nonces" | "onExitPool" | "onJoinPool" | "onSwap" | "pause" | "permit" | "queryExit" | "queryJoin" | "setAssetManagerPoolConfig" | "setSwapFeePercentage" | "setTokenRateCacheDuration" | "startAmplificationParameterUpdate" | "stopAmplificationParameterUpdate" | "symbol" | "totalSupply" | "transfer" | "transferFrom" | "unpause" | "updateProtocolFeePercentageCache" | "updateTokenRateCache"): FunctionFragment; + encodeFunctionData(functionFragment: "DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL", values?: undefined): string; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "disableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "enableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getActualSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "getAmplificationParameter", values?: undefined): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getBptIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getDomainSeparator", values?: undefined): string; + encodeFunctionData(functionFragment: "getLastJoinExitData", values?: undefined): string; + encodeFunctionData(functionFragment: "getMinimumBpt", values?: undefined): string; + encodeFunctionData(functionFragment: "getNextNonce", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getOwner", values?: undefined): string; + encodeFunctionData(functionFragment: "getPausedState", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolId", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeePercentageCache", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getProtocolFeesCollector", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolSwapFeeDelegation", values?: undefined): string; + encodeFunctionData(functionFragment: "getRate", values?: undefined): string; + encodeFunctionData(functionFragment: "getRateProviders", values?: undefined): string; + encodeFunctionData(functionFragment: "getScalingFactors", values?: undefined): string; + encodeFunctionData(functionFragment: "getSwapFeePercentage", values?: undefined): string; + encodeFunctionData(functionFragment: "getTokenRate", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getTokenRateCache", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "inRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "isTokenExemptFromYieldProtocolFee", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "onExitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onJoinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap", values: [ + IPoolSwapStructs$a.SwapRequestStruct, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData(functionFragment: "permit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryExit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryJoin", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "setAssetManagerPoolConfig", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setSwapFeePercentage", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setTokenRateCacheDuration", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "startAmplificationParameterUpdate", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "stopAmplificationParameterUpdate", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unpause", values?: undefined): string; + encodeFunctionData(functionFragment: "updateProtocolFeePercentageCache", values?: undefined): string; + encodeFunctionData(functionFragment: "updateTokenRateCache", values: [PromiseOrValue]): string; + decodeFunctionResult(functionFragment: "DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "enableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActualSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAmplificationParameter", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBptIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDomainSeparator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLastJoinExitData", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMinimumBpt", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getNextNonce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPausedState", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeePercentageCache", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeesCollector", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolSwapFeeDelegation", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRateProviders", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getScalingFactors", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTokenRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTokenRateCache", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "inRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isTokenExemptFromYieldProtocolFee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onExitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onJoinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryExit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setAssetManagerPoolConfig", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setTokenRateCacheDuration", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "startAmplificationParameterUpdate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "stopAmplificationParameterUpdate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "updateProtocolFeePercentageCache", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "updateTokenRateCache", data: BytesLike): Result; + events: { + "AmpUpdateStarted(uint256,uint256,uint256,uint256)": EventFragment; + "AmpUpdateStopped(uint256)": EventFragment; + "Approval(address,address,uint256)": EventFragment; + "PausedStateChanged(bool)": EventFragment; + "ProtocolFeePercentageCacheUpdated(uint256,uint256)": EventFragment; + "RecoveryModeStateChanged(bool)": EventFragment; + "SwapFeePercentageChanged(uint256)": EventFragment; + "TokenRateCacheUpdated(uint256,uint256)": EventFragment; + "TokenRateProviderSet(uint256,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "AmpUpdateStarted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AmpUpdateStopped"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PausedStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProtocolFeePercentageCacheUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RecoveryModeStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SwapFeePercentageChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenRateCacheUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokenRateProviderSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +interface AmpUpdateStartedEventObject$1 { + startValue: BigNumber$1; + endValue: BigNumber$1; + startTime: BigNumber$1; + endTime: BigNumber$1; +} +type AmpUpdateStartedEvent$1 = TypedEvent<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 +], AmpUpdateStartedEventObject$1>; +type AmpUpdateStartedEventFilter$1 = TypedEventFilter; +interface AmpUpdateStoppedEventObject$1 { + currentValue: BigNumber$1; +} +type AmpUpdateStoppedEvent$1 = TypedEvent<[ + BigNumber$1 +], AmpUpdateStoppedEventObject$1>; +type AmpUpdateStoppedEventFilter$1 = TypedEventFilter; +interface ApprovalEventObject$c { + owner: string; + spender: string; + value: BigNumber$1; +} +type ApprovalEvent$c = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject$c>; +type ApprovalEventFilter$c = TypedEventFilter; +interface PausedStateChangedEventObject$9 { + paused: boolean; +} +type PausedStateChangedEvent$9 = TypedEvent<[ + boolean +], PausedStateChangedEventObject$9>; +type PausedStateChangedEventFilter$9 = TypedEventFilter; +interface ProtocolFeePercentageCacheUpdatedEventObject$1 { + feeType: BigNumber$1; + protocolFeePercentage: BigNumber$1; +} +type ProtocolFeePercentageCacheUpdatedEvent$1 = TypedEvent<[ + BigNumber$1, + BigNumber$1 +], ProtocolFeePercentageCacheUpdatedEventObject$1>; +type ProtocolFeePercentageCacheUpdatedEventFilter$1 = TypedEventFilter; +interface RecoveryModeStateChangedEventObject$5 { + enabled: boolean; +} +type RecoveryModeStateChangedEvent$5 = TypedEvent<[ + boolean +], RecoveryModeStateChangedEventObject$5>; +type RecoveryModeStateChangedEventFilter$5 = TypedEventFilter; +interface SwapFeePercentageChangedEventObject$8 { + swapFeePercentage: BigNumber$1; +} +type SwapFeePercentageChangedEvent$8 = TypedEvent<[ + BigNumber$1 +], SwapFeePercentageChangedEventObject$8>; +type SwapFeePercentageChangedEventFilter$8 = TypedEventFilter; +interface TokenRateCacheUpdatedEventObject { + tokenIndex: BigNumber$1; + rate: BigNumber$1; +} +type TokenRateCacheUpdatedEvent = TypedEvent<[ + BigNumber$1, + BigNumber$1 +], TokenRateCacheUpdatedEventObject>; +type TokenRateCacheUpdatedEventFilter = TypedEventFilter; +interface TokenRateProviderSetEventObject { + tokenIndex: BigNumber$1; + provider: string; + cacheDuration: BigNumber$1; +} +type TokenRateProviderSetEvent = TypedEvent<[ + BigNumber$1, + string, + BigNumber$1 +], TokenRateProviderSetEventObject>; +type TokenRateProviderSetEventFilter = TypedEventFilter; +interface TransferEventObject$c { + from: string; + to: string; + value: BigNumber$1; +} +type TransferEvent$c = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject$c>; +type TransferEventFilter$c = TypedEventFilter; +declare namespace ComposableStablePool { + type NewPoolParamsStruct = { + vault: PromiseOrValue; + protocolFeeProvider: PromiseOrValue; + name: PromiseOrValue; + symbol: PromiseOrValue; + tokens: PromiseOrValue[]; + rateProviders: PromiseOrValue[]; + tokenRateCacheDurations: PromiseOrValue[]; + exemptFromYieldProtocolFeeFlags: PromiseOrValue[]; + amplificationParameter: PromiseOrValue; + swapFeePercentage: PromiseOrValue; + pauseWindowDuration: PromiseOrValue; + bufferPeriodDuration: PromiseOrValue; + owner: PromiseOrValue; + }; + type NewPoolParamsStructOutput = [ + string, + string, + string, + string, + string[], + string[], + BigNumber$1[], + boolean[], + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + string + ] & { + vault: string; + protocolFeeProvider: string; + name: string; + symbol: string; + tokens: string[]; + rateProviders: string[]; + tokenRateCacheDurations: BigNumber$1[]; + exemptFromYieldProtocolFeeFlags: boolean[]; + amplificationParameter: BigNumber$1; + swapFeePercentage: BigNumber$1; + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + owner: string; + }; +} +interface ComposableStablePool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ComposableStablePoolInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL(overrides?: CallOverrides): Promise<[BigNumber$1]>; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getActualSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getAmplificationParameter(overrides?: CallOverrides): Promise<[ + BigNumber$1, + boolean, + BigNumber$1 + ] & { + value: BigNumber$1; + isUpdating: boolean; + precision: BigNumber$1; + }>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getBptIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getDomainSeparator(overrides?: CallOverrides): Promise<[string]>; + getLastJoinExitData(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lastJoinExitAmplification: BigNumber$1; + lastPostJoinExitInvariant: BigNumber$1; + }>; + getMinimumBpt(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + getOwner(overrides?: CallOverrides): Promise<[string]>; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeePercentageCache(feeType: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + getProtocolFeesCollector(overrides?: CallOverrides): Promise<[string]>; + getProtocolSwapFeeDelegation(overrides?: CallOverrides): Promise<[boolean]>; + getRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getRateProviders(overrides?: CallOverrides): Promise<[string[]]>; + getScalingFactors(overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getSwapFeePercentage(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getTokenRate(token: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + getTokenRateCache(token: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + rate: BigNumber$1; + oldRate: BigNumber$1; + duration: BigNumber$1; + expires: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise<[string]>; + inRecoveryMode(overrides?: CallOverrides): Promise<[boolean]>; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + isTokenExemptFromYieldProtocolFee(token: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + name(overrides?: CallOverrides): Promise<[string]>; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(swapRequest: IPoolSwapStructs$a.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTokenRateCacheDuration(token: PromiseOrValue, duration: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + startAmplificationParameterUpdate(rawEndValue: PromiseOrValue, endTime: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + stopAmplificationParameterUpdate(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + updateProtocolFeePercentageCache(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + updateTokenRateCache(token: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getActualSupply(overrides?: CallOverrides): Promise; + getAmplificationParameter(overrides?: CallOverrides): Promise<[ + BigNumber$1, + boolean, + BigNumber$1 + ] & { + value: BigNumber$1; + isUpdating: boolean; + precision: BigNumber$1; + }>; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getLastJoinExitData(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lastJoinExitAmplification: BigNumber$1; + lastPostJoinExitInvariant: BigNumber$1; + }>; + getMinimumBpt(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeePercentageCache(feeType: PromiseOrValue, overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getProtocolSwapFeeDelegation(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getRateProviders(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTokenRate(token: PromiseOrValue, overrides?: CallOverrides): Promise; + getTokenRateCache(token: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + rate: BigNumber$1; + oldRate: BigNumber$1; + duration: BigNumber$1; + expires: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + isTokenExemptFromYieldProtocolFee(token: PromiseOrValue, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(swapRequest: IPoolSwapStructs$a.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTokenRateCacheDuration(token: PromiseOrValue, duration: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + startAmplificationParameterUpdate(rawEndValue: PromiseOrValue, endTime: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + stopAmplificationParameterUpdate(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + updateProtocolFeePercentageCache(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + updateTokenRateCache(token: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + disableRecoveryMode(overrides?: CallOverrides): Promise; + enableRecoveryMode(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getActualSupply(overrides?: CallOverrides): Promise; + getAmplificationParameter(overrides?: CallOverrides): Promise<[ + BigNumber$1, + boolean, + BigNumber$1 + ] & { + value: BigNumber$1; + isUpdating: boolean; + precision: BigNumber$1; + }>; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getLastJoinExitData(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lastJoinExitAmplification: BigNumber$1; + lastPostJoinExitInvariant: BigNumber$1; + }>; + getMinimumBpt(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeePercentageCache(feeType: PromiseOrValue, overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getProtocolSwapFeeDelegation(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getRateProviders(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTokenRate(token: PromiseOrValue, overrides?: CallOverrides): Promise; + getTokenRateCache(token: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + rate: BigNumber$1; + oldRate: BigNumber$1; + duration: BigNumber$1; + expires: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: CallOverrides): Promise; + isTokenExemptFromYieldProtocolFee(token: PromiseOrValue, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1[], BigNumber$1[]]>; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1[], BigNumber$1[]]>; + onSwap(swapRequest: IPoolSwapStructs$a.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + pause(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptIn: BigNumber$1; + amountsOut: BigNumber$1[]; + }>; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptOut: BigNumber$1; + amountsIn: BigNumber$1[]; + }>; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: CallOverrides): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: CallOverrides): Promise; + setTokenRateCacheDuration(token: PromiseOrValue, duration: PromiseOrValue, overrides?: CallOverrides): Promise; + startAmplificationParameterUpdate(rawEndValue: PromiseOrValue, endTime: PromiseOrValue, overrides?: CallOverrides): Promise; + stopAmplificationParameterUpdate(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + unpause(overrides?: CallOverrides): Promise; + updateProtocolFeePercentageCache(overrides?: CallOverrides): Promise; + updateTokenRateCache(token: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: { + "AmpUpdateStarted(uint256,uint256,uint256,uint256)"(startValue?: null, endValue?: null, startTime?: null, endTime?: null): AmpUpdateStartedEventFilter$1; + AmpUpdateStarted(startValue?: null, endValue?: null, startTime?: null, endTime?: null): AmpUpdateStartedEventFilter$1; + "AmpUpdateStopped(uint256)"(currentValue?: null): AmpUpdateStoppedEventFilter$1; + AmpUpdateStopped(currentValue?: null): AmpUpdateStoppedEventFilter$1; + "Approval(address,address,uint256)"(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$c; + Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$c; + "PausedStateChanged(bool)"(paused?: null): PausedStateChangedEventFilter$9; + PausedStateChanged(paused?: null): PausedStateChangedEventFilter$9; + "ProtocolFeePercentageCacheUpdated(uint256,uint256)"(feeType?: PromiseOrValue | null, protocolFeePercentage?: null): ProtocolFeePercentageCacheUpdatedEventFilter$1; + ProtocolFeePercentageCacheUpdated(feeType?: PromiseOrValue | null, protocolFeePercentage?: null): ProtocolFeePercentageCacheUpdatedEventFilter$1; + "RecoveryModeStateChanged(bool)"(enabled?: null): RecoveryModeStateChangedEventFilter$5; + RecoveryModeStateChanged(enabled?: null): RecoveryModeStateChangedEventFilter$5; + "SwapFeePercentageChanged(uint256)"(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$8; + SwapFeePercentageChanged(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$8; + "TokenRateCacheUpdated(uint256,uint256)"(tokenIndex?: PromiseOrValue | null, rate?: null): TokenRateCacheUpdatedEventFilter; + TokenRateCacheUpdated(tokenIndex?: PromiseOrValue | null, rate?: null): TokenRateCacheUpdatedEventFilter; + "TokenRateProviderSet(uint256,address,uint256)"(tokenIndex?: PromiseOrValue | null, provider?: PromiseOrValue | null, cacheDuration?: null): TokenRateProviderSetEventFilter; + TokenRateProviderSet(tokenIndex?: PromiseOrValue | null, provider?: PromiseOrValue | null, cacheDuration?: null): TokenRateProviderSetEventFilter; + "Transfer(address,address,uint256)"(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$c; + Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$c; + }; + estimateGas: { + DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getActualSupply(overrides?: CallOverrides): Promise; + getAmplificationParameter(overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getLastJoinExitData(overrides?: CallOverrides): Promise; + getMinimumBpt(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeePercentageCache(feeType: PromiseOrValue, overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getProtocolSwapFeeDelegation(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getRateProviders(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTokenRate(token: PromiseOrValue, overrides?: CallOverrides): Promise; + getTokenRateCache(token: PromiseOrValue, overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + isTokenExemptFromYieldProtocolFee(token: PromiseOrValue, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(swapRequest: IPoolSwapStructs$a.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTokenRateCacheDuration(token: PromiseOrValue, duration: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + startAmplificationParameterUpdate(rawEndValue: PromiseOrValue, endTime: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + stopAmplificationParameterUpdate(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + updateProtocolFeePercentageCache(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + updateTokenRateCache(token: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getActualSupply(overrides?: CallOverrides): Promise; + getAmplificationParameter(overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getLastJoinExitData(overrides?: CallOverrides): Promise; + getMinimumBpt(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeePercentageCache(feeType: PromiseOrValue, overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getProtocolSwapFeeDelegation(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getRateProviders(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTokenRate(token: PromiseOrValue, overrides?: CallOverrides): Promise; + getTokenRateCache(token: PromiseOrValue, overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + isTokenExemptFromYieldProtocolFee(token: PromiseOrValue, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(swapRequest: IPoolSwapStructs$a.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTokenRateCacheDuration(token: PromiseOrValue, duration: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + startAmplificationParameterUpdate(rawEndValue: PromiseOrValue, endTime: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + stopAmplificationParameterUpdate(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + updateProtocolFeePercentageCache(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + updateTokenRateCache(token: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +interface ComposableStablePoolFactoryInterface extends utils.Interface { + functions: { + "create(string,string,address[],uint256,address[],uint256[],bool[],uint256,address,bytes32)": FunctionFragment; + "disable()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getCreationCode()": FunctionFragment; + "getCreationCodeContracts()": FunctionFragment; + "getPauseConfiguration()": FunctionFragment; + "getPoolVersion()": FunctionFragment; + "getProtocolFeePercentagesProvider()": FunctionFragment; + "getVault()": FunctionFragment; + "isDisabled()": FunctionFragment; + "isPoolFromFactory(address)": FunctionFragment; + "version()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "create" | "disable" | "getActionId" | "getAuthorizer" | "getCreationCode" | "getCreationCodeContracts" | "getPauseConfiguration" | "getPoolVersion" | "getProtocolFeePercentagesProvider" | "getVault" | "isDisabled" | "isPoolFromFactory" | "version"): FunctionFragment; + encodeFunctionData(functionFragment: "create", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue[], + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "disable", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCode", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCodeContracts", values?: undefined): string; + encodeFunctionData(functionFragment: "getPauseConfiguration", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolVersion", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeePercentagesProvider", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "isDisabled", values?: undefined): string; + encodeFunctionData(functionFragment: "isPoolFromFactory", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + decodeFunctionResult(functionFragment: "create", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disable", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCodeContracts", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPauseConfiguration", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolVersion", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeePercentagesProvider", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isDisabled", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isPoolFromFactory", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + events: { + "FactoryDisabled()": EventFragment; + "PoolCreated(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "FactoryDisabled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolCreated"): EventFragment; +} +interface FactoryDisabledEventObject$5 { +} +type FactoryDisabledEvent$5 = TypedEvent<[], FactoryDisabledEventObject$5>; +type FactoryDisabledEventFilter$5 = TypedEventFilter; +interface PoolCreatedEventObject$5 { + pool: string; +} +type PoolCreatedEvent$5 = TypedEvent<[string], PoolCreatedEventObject$5>; +type PoolCreatedEventFilter$5 = TypedEventFilter; +interface ComposableStablePoolFactory extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ComposableStablePoolFactoryInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + create(name: PromiseOrValue, symbol: PromiseOrValue, tokens: PromiseOrValue[], amplificationParameter: PromiseOrValue, rateProviders: PromiseOrValue[], tokenRateCacheDurations: PromiseOrValue[], exemptFromYieldProtocolFeeFlags: PromiseOrValue[], swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getCreationCode(overrides?: CallOverrides): Promise<[string]>; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise<[string]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + isDisabled(overrides?: CallOverrides): Promise<[boolean]>; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + version(overrides?: CallOverrides): Promise<[string]>; + }; + create(name: PromiseOrValue, symbol: PromiseOrValue, tokens: PromiseOrValue[], amplificationParameter: PromiseOrValue, rateProviders: PromiseOrValue[], tokenRateCacheDurations: PromiseOrValue[], exemptFromYieldProtocolFeeFlags: PromiseOrValue[], swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + callStatic: { + create(name: PromiseOrValue, symbol: PromiseOrValue, tokens: PromiseOrValue[], amplificationParameter: PromiseOrValue, rateProviders: PromiseOrValue[], tokenRateCacheDurations: PromiseOrValue[], exemptFromYieldProtocolFeeFlags: PromiseOrValue[], swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, salt: PromiseOrValue, overrides?: CallOverrides): Promise; + disable(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + filters: { + "FactoryDisabled()"(): FactoryDisabledEventFilter$5; + FactoryDisabled(): FactoryDisabledEventFilter$5; + "PoolCreated(address)"(pool?: PromiseOrValue | null): PoolCreatedEventFilter$5; + PoolCreated(pool?: PromiseOrValue | null): PoolCreatedEventFilter$5; + }; + estimateGas: { + create(name: PromiseOrValue, symbol: PromiseOrValue, tokens: PromiseOrValue[], amplificationParameter: PromiseOrValue, rateProviders: PromiseOrValue[], tokenRateCacheDurations: PromiseOrValue[], exemptFromYieldProtocolFeeFlags: PromiseOrValue[], swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + create(name: PromiseOrValue, symbol: PromiseOrValue, tokens: PromiseOrValue[], amplificationParameter: PromiseOrValue, rateProviders: PromiseOrValue[], tokenRateCacheDurations: PromiseOrValue[], exemptFromYieldProtocolFeeFlags: PromiseOrValue[], swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; +} + +declare namespace IPoolSwapStructs$9 { + type SwapRequestStruct = { + kind: PromiseOrValue; + tokenIn: PromiseOrValue; + tokenOut: PromiseOrValue; + amount: PromiseOrValue; + poolId: PromiseOrValue; + lastChangeBlock: PromiseOrValue; + from: PromiseOrValue; + to: PromiseOrValue; + userData: PromiseOrValue; + }; + type SwapRequestStructOutput = [ + number, + string, + string, + BigNumber$1, + string, + BigNumber$1, + string, + string, + string + ] & { + kind: number; + tokenIn: string; + tokenOut: string; + amount: BigNumber$1; + poolId: string; + lastChangeBlock: BigNumber$1; + from: string; + to: string; + userData: string; + }; +} +interface ConvergentCurvePoolInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "FEE_BOUND()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "bond()": FunctionFragment; + "bondDecimals()": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseApproval(address,uint256)": FunctionFragment; + "expiration()": FunctionFragment; + "feesBond()": FunctionFragment; + "feesUnderlying()": FunctionFragment; + "getPoolId()": FunctionFragment; + "getVault()": FunctionFragment; + "governance()": FunctionFragment; + "increaseApproval(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": FunctionFragment; + "percentFee()": FunctionFragment; + "percentFeeGov()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "solveTradeInvariant(uint256,uint256,uint256,bool)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "underlying()": FunctionFragment; + "underlyingDecimals()": FunctionFragment; + "unitSeconds()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "FEE_BOUND" | "allowance" | "approve" | "balanceOf" | "bond" | "bondDecimals" | "decimals" | "decreaseApproval" | "expiration" | "feesBond" | "feesUnderlying" | "getPoolId" | "getVault" | "governance" | "increaseApproval" | "name" | "nonces" | "onExitPool" | "onJoinPool" | "onSwap" | "percentFee" | "percentFeeGov" | "permit" | "solveTradeInvariant" | "symbol" | "totalSupply" | "transfer" | "transferFrom" | "underlying" | "underlyingDecimals" | "unitSeconds"): FunctionFragment; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "FEE_BOUND", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "bond", values?: undefined): string; + encodeFunctionData(functionFragment: "bondDecimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseApproval", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "expiration", values?: undefined): string; + encodeFunctionData(functionFragment: "feesBond", values?: undefined): string; + encodeFunctionData(functionFragment: "feesUnderlying", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolId", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "governance", values?: undefined): string; + encodeFunctionData(functionFragment: "increaseApproval", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "onExitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onJoinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap", values: [ + IPoolSwapStructs$9.SwapRequestStruct, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "percentFee", values?: undefined): string; + encodeFunctionData(functionFragment: "percentFeeGov", values?: undefined): string; + encodeFunctionData(functionFragment: "permit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "solveTradeInvariant", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "underlying", values?: undefined): string; + encodeFunctionData(functionFragment: "underlyingDecimals", values?: undefined): string; + encodeFunctionData(functionFragment: "unitSeconds", values?: undefined): string; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "FEE_BOUND", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "bond", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "bondDecimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseApproval", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "expiration", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "feesBond", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "feesUnderlying", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "governance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseApproval", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onExitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onJoinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "percentFee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "percentFeeGov", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "solveTradeInvariant", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "underlying", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "underlyingDecimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unitSeconds", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "FeeCollection(uint256,uint256,uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FeeCollection"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +interface ApprovalEventObject$b { + owner: string; + spender: string; + value: BigNumber$1; +} +type ApprovalEvent$b = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject$b>; +type ApprovalEventFilter$b = TypedEventFilter; +interface FeeCollectionEventObject { + collectedBase: BigNumber$1; + collectedBond: BigNumber$1; + remainingBase: BigNumber$1; + remainingBond: BigNumber$1; +} +type FeeCollectionEvent = TypedEvent<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 +], FeeCollectionEventObject>; +type FeeCollectionEventFilter = TypedEventFilter; +interface TransferEventObject$b { + from: string; + to: string; + value: BigNumber$1; +} +type TransferEvent$b = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject$b>; +type TransferEventFilter$b = TypedEventFilter; +interface ConvergentCurvePool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ConvergentCurvePoolInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + FEE_BOUND(overrides?: CallOverrides): Promise<[BigNumber$1]>; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + bond(overrides?: CallOverrides): Promise<[string]>; + bondDecimals(overrides?: CallOverrides): Promise<[number]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseApproval(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + expiration(overrides?: CallOverrides): Promise<[BigNumber$1]>; + feesBond(overrides?: CallOverrides): Promise<[BigNumber$1]>; + feesUnderlying(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getPoolId(overrides?: CallOverrides): Promise<[string]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + governance(overrides?: CallOverrides): Promise<[string]>; + increaseApproval(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise<[string]>; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + onExitPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, currentBalances: PromiseOrValue[], arg4: PromiseOrValue, protocolSwapFee: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, currentBalances: PromiseOrValue[], arg4: PromiseOrValue, protocolSwapFee: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(swapRequest: IPoolSwapStructs$9.SwapRequestStruct, currentBalanceTokenIn: PromiseOrValue, currentBalanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + percentFee(overrides?: CallOverrides): Promise<[BigNumber$1]>; + percentFeeGov(overrides?: CallOverrides): Promise<[BigNumber$1]>; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + solveTradeInvariant(amountX: PromiseOrValue, reserveX: PromiseOrValue, reserveY: PromiseOrValue, out: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + underlying(overrides?: CallOverrides): Promise<[string]>; + underlyingDecimals(overrides?: CallOverrides): Promise<[number]>; + unitSeconds(overrides?: CallOverrides): Promise<[BigNumber$1]>; + }; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + FEE_BOUND(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + bond(overrides?: CallOverrides): Promise; + bondDecimals(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseApproval(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + expiration(overrides?: CallOverrides): Promise; + feesBond(overrides?: CallOverrides): Promise; + feesUnderlying(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + governance(overrides?: CallOverrides): Promise; + increaseApproval(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, currentBalances: PromiseOrValue[], arg4: PromiseOrValue, protocolSwapFee: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, currentBalances: PromiseOrValue[], arg4: PromiseOrValue, protocolSwapFee: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(swapRequest: IPoolSwapStructs$9.SwapRequestStruct, currentBalanceTokenIn: PromiseOrValue, currentBalanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + percentFee(overrides?: CallOverrides): Promise; + percentFeeGov(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + solveTradeInvariant(amountX: PromiseOrValue, reserveX: PromiseOrValue, reserveY: PromiseOrValue, out: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + underlying(overrides?: CallOverrides): Promise; + underlyingDecimals(overrides?: CallOverrides): Promise; + unitSeconds(overrides?: CallOverrides): Promise; + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + FEE_BOUND(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + bond(overrides?: CallOverrides): Promise; + bondDecimals(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseApproval(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + expiration(overrides?: CallOverrides): Promise; + feesBond(overrides?: CallOverrides): Promise; + feesUnderlying(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + governance(overrides?: CallOverrides): Promise; + increaseApproval(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, currentBalances: PromiseOrValue[], arg4: PromiseOrValue, protocolSwapFee: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsOut: BigNumber$1[]; + dueProtocolFeeAmounts: BigNumber$1[]; + }>; + onJoinPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, currentBalances: PromiseOrValue[], arg4: PromiseOrValue, protocolSwapFee: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsIn: BigNumber$1[]; + dueProtocolFeeAmounts: BigNumber$1[]; + }>; + onSwap(swapRequest: IPoolSwapStructs$9.SwapRequestStruct, currentBalanceTokenIn: PromiseOrValue, currentBalanceTokenOut: PromiseOrValue, overrides?: CallOverrides): Promise; + percentFee(overrides?: CallOverrides): Promise; + percentFeeGov(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + solveTradeInvariant(amountX: PromiseOrValue, reserveX: PromiseOrValue, reserveY: PromiseOrValue, out: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + underlying(overrides?: CallOverrides): Promise; + underlyingDecimals(overrides?: CallOverrides): Promise; + unitSeconds(overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$b; + Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$b; + "FeeCollection(uint256,uint256,uint256,uint256)"(collectedBase?: null, collectedBond?: null, remainingBase?: null, remainingBond?: null): FeeCollectionEventFilter; + FeeCollection(collectedBase?: null, collectedBond?: null, remainingBase?: null, remainingBond?: null): FeeCollectionEventFilter; + "Transfer(address,address,uint256)"(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$b; + Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$b; + }; + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + FEE_BOUND(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + bond(overrides?: CallOverrides): Promise; + bondDecimals(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseApproval(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + expiration(overrides?: CallOverrides): Promise; + feesBond(overrides?: CallOverrides): Promise; + feesUnderlying(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + governance(overrides?: CallOverrides): Promise; + increaseApproval(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, currentBalances: PromiseOrValue[], arg4: PromiseOrValue, protocolSwapFee: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, currentBalances: PromiseOrValue[], arg4: PromiseOrValue, protocolSwapFee: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(swapRequest: IPoolSwapStructs$9.SwapRequestStruct, currentBalanceTokenIn: PromiseOrValue, currentBalanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + percentFee(overrides?: CallOverrides): Promise; + percentFeeGov(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + solveTradeInvariant(amountX: PromiseOrValue, reserveX: PromiseOrValue, reserveY: PromiseOrValue, out: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + underlying(overrides?: CallOverrides): Promise; + underlyingDecimals(overrides?: CallOverrides): Promise; + unitSeconds(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + FEE_BOUND(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + bond(overrides?: CallOverrides): Promise; + bondDecimals(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseApproval(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + expiration(overrides?: CallOverrides): Promise; + feesBond(overrides?: CallOverrides): Promise; + feesUnderlying(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + governance(overrides?: CallOverrides): Promise; + increaseApproval(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, currentBalances: PromiseOrValue[], arg4: PromiseOrValue, protocolSwapFee: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, currentBalances: PromiseOrValue[], arg4: PromiseOrValue, protocolSwapFee: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(swapRequest: IPoolSwapStructs$9.SwapRequestStruct, currentBalanceTokenIn: PromiseOrValue, currentBalanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + percentFee(overrides?: CallOverrides): Promise; + percentFeeGov(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + solveTradeInvariant(amountX: PromiseOrValue, reserveX: PromiseOrValue, reserveY: PromiseOrValue, out: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + underlying(overrides?: CallOverrides): Promise; + underlyingDecimals(overrides?: CallOverrides): Promise; + unitSeconds(overrides?: CallOverrides): Promise; + }; +} + +interface ERC20Interface extends utils.Interface { + functions: { + "name()": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "totalSupply()": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "decimals()": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "symbol()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "allowance(address,address)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "name" | "approve" | "totalSupply" | "transferFrom" | "decimals" | "balanceOf" | "symbol" | "transfer" | "allowance"): FunctionFragment; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +interface ApprovalEventObject$a { + owner: string; + spender: string; + value: BigNumber$1; +} +type ApprovalEvent$a = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject$a>; +type ApprovalEventFilter$a = TypedEventFilter; +interface TransferEventObject$a { + from: string; + to: string; + value: BigNumber$1; +} +type TransferEvent$a = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject$a>; +type TransferEventFilter$a = TypedEventFilter; +interface ERC20 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ERC20Interface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + name(overrides?: CallOverrides): Promise<[string]>; + approve(_spender: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + transferFrom(_from: PromiseOrValue, _to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + decimals(overrides?: CallOverrides): Promise<[number]>; + balanceOf(_owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1] & { + balance: BigNumber$1; + }>; + symbol(overrides?: CallOverrides): Promise<[string]>; + transfer(_to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + allowance(_owner: PromiseOrValue, _spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + }; + name(overrides?: CallOverrides): Promise; + approve(_spender: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transferFrom(_from: PromiseOrValue, _to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + decimals(overrides?: CallOverrides): Promise; + balanceOf(_owner: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + transfer(_to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + allowance(_owner: PromiseOrValue, _spender: PromiseOrValue, overrides?: CallOverrides): Promise; + callStatic: { + name(overrides?: CallOverrides): Promise; + approve(_spender: PromiseOrValue, _value: PromiseOrValue, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transferFrom(_from: PromiseOrValue, _to: PromiseOrValue, _value: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + balanceOf(_owner: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + transfer(_to: PromiseOrValue, _value: PromiseOrValue, overrides?: CallOverrides): Promise; + allowance(_owner: PromiseOrValue, _spender: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$a; + Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$a; + "Transfer(address,address,uint256)"(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$a; + Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$a; + }; + estimateGas: { + name(overrides?: CallOverrides): Promise; + approve(_spender: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transferFrom(_from: PromiseOrValue, _to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + decimals(overrides?: CallOverrides): Promise; + balanceOf(_owner: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + transfer(_to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + allowance(_owner: PromiseOrValue, _spender: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + name(overrides?: CallOverrides): Promise; + approve(_spender: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transferFrom(_from: PromiseOrValue, _to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + decimals(overrides?: CallOverrides): Promise; + balanceOf(_owner: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + transfer(_to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + allowance(_owner: PromiseOrValue, _spender: PromiseOrValue, overrides?: CallOverrides): Promise; + }; +} + +declare namespace IPoolSwapStructs$8 { + type SwapRequestStruct = { + kind: PromiseOrValue; + tokenIn: PromiseOrValue; + tokenOut: PromiseOrValue; + amount: PromiseOrValue; + poolId: PromiseOrValue; + lastChangeBlock: PromiseOrValue; + from: PromiseOrValue; + to: PromiseOrValue; + userData: PromiseOrValue; + }; + type SwapRequestStructOutput = [ + number, + string, + string, + BigNumber$1, + string, + BigNumber$1, + string, + string, + string + ] & { + kind: number; + tokenIn: string; + tokenOut: string; + amount: BigNumber$1; + poolId: string; + lastChangeBlock: BigNumber$1; + from: string; + to: string; + userData: string; + }; +} +interface ERC4626LinearPoolInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "disableRecoveryMode()": FunctionFragment; + "enableRecoveryMode()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getBptIndex()": FunctionFragment; + "getDomainSeparator()": FunctionFragment; + "getMainIndex()": FunctionFragment; + "getMainToken()": FunctionFragment; + "getNextNonce(address)": FunctionFragment; + "getOwner()": FunctionFragment; + "getPausedState()": FunctionFragment; + "getPoolId()": FunctionFragment; + "getProtocolFeesCollector()": FunctionFragment; + "getRate()": FunctionFragment; + "getScalingFactors()": FunctionFragment; + "getSwapFeePercentage()": FunctionFragment; + "getTargets()": FunctionFragment; + "getVault()": FunctionFragment; + "getVirtualSupply()": FunctionFragment; + "getWrappedIndex()": FunctionFragment; + "getWrappedToken()": FunctionFragment; + "getWrappedTokenRate()": FunctionFragment; + "inRecoveryMode()": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "initialize()": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": FunctionFragment; + "pause()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "setSwapFeePercentage(uint256)": FunctionFragment; + "setTargets(uint256,uint256)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "unpause()": FunctionFragment; + "version()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "allowance" | "approve" | "balanceOf" | "decimals" | "decreaseAllowance" | "disableRecoveryMode" | "enableRecoveryMode" | "getActionId" | "getAuthorizer" | "getBptIndex" | "getDomainSeparator" | "getMainIndex" | "getMainToken" | "getNextNonce" | "getOwner" | "getPausedState" | "getPoolId" | "getProtocolFeesCollector" | "getRate" | "getScalingFactors" | "getSwapFeePercentage" | "getTargets" | "getVault" | "getVirtualSupply" | "getWrappedIndex" | "getWrappedToken" | "getWrappedTokenRate" | "inRecoveryMode" | "increaseAllowance" | "initialize" | "name" | "nonces" | "onExitPool" | "onJoinPool" | "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)" | "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)" | "pause" | "permit" | "queryExit" | "queryJoin" | "setSwapFeePercentage" | "setTargets" | "symbol" | "totalSupply" | "transfer" | "transferFrom" | "unpause" | "version"): FunctionFragment; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "disableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "enableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getBptIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getDomainSeparator", values?: undefined): string; + encodeFunctionData(functionFragment: "getMainIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getMainToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getNextNonce", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getOwner", values?: undefined): string; + encodeFunctionData(functionFragment: "getPausedState", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolId", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeesCollector", values?: undefined): string; + encodeFunctionData(functionFragment: "getRate", values?: undefined): string; + encodeFunctionData(functionFragment: "getScalingFactors", values?: undefined): string; + encodeFunctionData(functionFragment: "getSwapFeePercentage", values?: undefined): string; + encodeFunctionData(functionFragment: "getTargets", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "getVirtualSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedTokenRate", values?: undefined): string; + encodeFunctionData(functionFragment: "inRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "initialize", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "onExitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onJoinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)", values: [ + IPoolSwapStructs$8.SwapRequestStruct, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)", values: [ + IPoolSwapStructs$8.SwapRequestStruct, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData(functionFragment: "permit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryExit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryJoin", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "setSwapFeePercentage", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setTargets", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unpause", values?: undefined): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "enableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBptIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDomainSeparator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMainIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMainToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getNextNonce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPausedState", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeesCollector", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getScalingFactors", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTargets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVirtualSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedTokenRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "inRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onExitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onJoinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryExit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setTargets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "PausedStateChanged(bool)": EventFragment; + "RecoveryModeStateChanged(bool)": EventFragment; + "SwapFeePercentageChanged(uint256)": EventFragment; + "TargetsSet(address,uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PausedStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RecoveryModeStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SwapFeePercentageChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TargetsSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +interface ApprovalEventObject$9 { + owner: string; + spender: string; + value: BigNumber$1; +} +type ApprovalEvent$9 = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject$9>; +type ApprovalEventFilter$9 = TypedEventFilter; +interface PausedStateChangedEventObject$8 { + paused: boolean; +} +type PausedStateChangedEvent$8 = TypedEvent<[ + boolean +], PausedStateChangedEventObject$8>; +type PausedStateChangedEventFilter$8 = TypedEventFilter; +interface RecoveryModeStateChangedEventObject$4 { + enabled: boolean; +} +type RecoveryModeStateChangedEvent$4 = TypedEvent<[ + boolean +], RecoveryModeStateChangedEventObject$4>; +type RecoveryModeStateChangedEventFilter$4 = TypedEventFilter; +interface SwapFeePercentageChangedEventObject$7 { + swapFeePercentage: BigNumber$1; +} +type SwapFeePercentageChangedEvent$7 = TypedEvent<[ + BigNumber$1 +], SwapFeePercentageChangedEventObject$7>; +type SwapFeePercentageChangedEventFilter$7 = TypedEventFilter; +interface TargetsSetEventObject$4 { + token: string; + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; +} +type TargetsSetEvent$4 = TypedEvent<[ + string, + BigNumber$1, + BigNumber$1 +], TargetsSetEventObject$4>; +type TargetsSetEventFilter$4 = TypedEventFilter; +interface TransferEventObject$9 { + from: string; + to: string; + value: BigNumber$1; +} +type TransferEvent$9 = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject$9>; +type TransferEventFilter$9 = TypedEventFilter; +declare namespace ERC4626LinearPool { + type ConstructorArgsStruct = { + vault: PromiseOrValue; + name: PromiseOrValue; + symbol: PromiseOrValue; + mainToken: PromiseOrValue; + wrappedToken: PromiseOrValue; + assetManager: PromiseOrValue; + upperTarget: PromiseOrValue; + swapFeePercentage: PromiseOrValue; + pauseWindowDuration: PromiseOrValue; + bufferPeriodDuration: PromiseOrValue; + owner: PromiseOrValue; + version: PromiseOrValue; + }; + type ConstructorArgsStructOutput = [ + string, + string, + string, + string, + string, + string, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + string, + string + ] & { + vault: string; + name: string; + symbol: string; + mainToken: string; + wrappedToken: string; + assetManager: string; + upperTarget: BigNumber$1; + swapFeePercentage: BigNumber$1; + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + owner: string; + version: string; + }; +} +interface ERC4626LinearPool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ERC4626LinearPoolInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getBptIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getDomainSeparator(overrides?: CallOverrides): Promise<[string]>; + getMainIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getMainToken(overrides?: CallOverrides): Promise<[string]>; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + getOwner(overrides?: CallOverrides): Promise<[string]>; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeesCollector(overrides?: CallOverrides): Promise<[string]>; + getRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getScalingFactors(overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getSwapFeePercentage(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise<[string]>; + getVirtualSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getWrappedIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getWrappedToken(overrides?: CallOverrides): Promise<[string]>; + getWrappedTokenRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + inRecoveryMode(overrides?: CallOverrides): Promise<[boolean]>; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise<[string]>; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$8.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$8.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise<[string]>; + }; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$8.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$8.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + disableRecoveryMode(overrides?: CallOverrides): Promise; + enableRecoveryMode(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsOut: BigNumber$1[]; + dueProtocolFees: BigNumber$1[]; + }>; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsIn: BigNumber$1[]; + dueProtocolFees: BigNumber$1[]; + }>; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$8.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$8.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: CallOverrides): Promise; + pause(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptIn: BigNumber$1; + amountsOut: BigNumber$1[]; + }>; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptOut: BigNumber$1; + amountsIn: BigNumber$1[]; + }>; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: CallOverrides): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + unpause(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$9; + Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$9; + "PausedStateChanged(bool)"(paused?: null): PausedStateChangedEventFilter$8; + PausedStateChanged(paused?: null): PausedStateChangedEventFilter$8; + "RecoveryModeStateChanged(bool)"(enabled?: null): RecoveryModeStateChangedEventFilter$4; + RecoveryModeStateChanged(enabled?: null): RecoveryModeStateChangedEventFilter$4; + "SwapFeePercentageChanged(uint256)"(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$7; + SwapFeePercentageChanged(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$7; + "TargetsSet(address,uint256,uint256)"(token?: PromiseOrValue | null, lowerTarget?: null, upperTarget?: null): TargetsSetEventFilter$4; + TargetsSet(token?: PromiseOrValue | null, lowerTarget?: null, upperTarget?: null): TargetsSetEventFilter$4; + "Transfer(address,address,uint256)"(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$9; + Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$9; + }; + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$8.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$8.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$8.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$8.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + }; +} + +interface ERC4626LinearPoolFactoryInterface extends utils.Interface { + functions: { + "create(string,string,address,address,uint256,uint256,address,uint256,bytes32)": FunctionFragment; + "disable()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getCreationCode()": FunctionFragment; + "getCreationCodeContracts()": FunctionFragment; + "getLastCreatedPool()": FunctionFragment; + "getPauseConfiguration()": FunctionFragment; + "getPoolVersion()": FunctionFragment; + "getProtocolFeePercentagesProvider()": FunctionFragment; + "getVault()": FunctionFragment; + "isDisabled()": FunctionFragment; + "isPoolFromFactory(address)": FunctionFragment; + "version()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "create" | "disable" | "getActionId" | "getAuthorizer" | "getCreationCode" | "getCreationCodeContracts" | "getLastCreatedPool" | "getPauseConfiguration" | "getPoolVersion" | "getProtocolFeePercentagesProvider" | "getVault" | "isDisabled" | "isPoolFromFactory" | "version"): FunctionFragment; + encodeFunctionData(functionFragment: "create", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "disable", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCode", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCodeContracts", values?: undefined): string; + encodeFunctionData(functionFragment: "getLastCreatedPool", values?: undefined): string; + encodeFunctionData(functionFragment: "getPauseConfiguration", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolVersion", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeePercentagesProvider", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "isDisabled", values?: undefined): string; + encodeFunctionData(functionFragment: "isPoolFromFactory", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + decodeFunctionResult(functionFragment: "create", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disable", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCodeContracts", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLastCreatedPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPauseConfiguration", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolVersion", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeePercentagesProvider", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isDisabled", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isPoolFromFactory", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + events: { + "Erc4626LinearPoolCreated(address,uint256)": EventFragment; + "FactoryDisabled()": EventFragment; + "PoolCreated(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Erc4626LinearPoolCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FactoryDisabled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolCreated"): EventFragment; +} +interface Erc4626LinearPoolCreatedEventObject { + pool: string; + protocolId: BigNumber$1; +} +type Erc4626LinearPoolCreatedEvent = TypedEvent<[ + string, + BigNumber$1 +], Erc4626LinearPoolCreatedEventObject>; +type Erc4626LinearPoolCreatedEventFilter = TypedEventFilter; +interface FactoryDisabledEventObject$4 { +} +type FactoryDisabledEvent$4 = TypedEvent<[], FactoryDisabledEventObject$4>; +type FactoryDisabledEventFilter$4 = TypedEventFilter; +interface PoolCreatedEventObject$4 { + pool: string; +} +type PoolCreatedEvent$4 = TypedEvent<[string], PoolCreatedEventObject$4>; +type PoolCreatedEventFilter$4 = TypedEventFilter; +interface ERC4626LinearPoolFactory extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ERC4626LinearPoolFactoryInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getCreationCode(overrides?: CallOverrides): Promise<[string]>; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise<[string]>; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise<[string]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + isDisabled(overrides?: CallOverrides): Promise<[boolean]>; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + version(overrides?: CallOverrides): Promise<[string]>; + }; + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + callStatic: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: CallOverrides): Promise; + disable(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + filters: { + "Erc4626LinearPoolCreated(address,uint256)"(pool?: PromiseOrValue | null, protocolId?: PromiseOrValue | null): Erc4626LinearPoolCreatedEventFilter; + Erc4626LinearPoolCreated(pool?: PromiseOrValue | null, protocolId?: PromiseOrValue | null): Erc4626LinearPoolCreatedEventFilter; + "FactoryDisabled()"(): FactoryDisabledEventFilter$4; + FactoryDisabled(): FactoryDisabledEventFilter$4; + "PoolCreated(address)"(pool?: PromiseOrValue | null): PoolCreatedEventFilter$4; + PoolCreated(pool?: PromiseOrValue | null): PoolCreatedEventFilter$4; + }; + estimateGas: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; +} + +declare namespace IPoolSwapStructs$7 { + type SwapRequestStruct = { + kind: PromiseOrValue; + tokenIn: PromiseOrValue; + tokenOut: PromiseOrValue; + amount: PromiseOrValue; + poolId: PromiseOrValue; + lastChangeBlock: PromiseOrValue; + from: PromiseOrValue; + to: PromiseOrValue; + userData: PromiseOrValue; + }; + type SwapRequestStructOutput = [ + number, + string, + string, + BigNumber$1, + string, + BigNumber$1, + string, + string, + string + ] & { + kind: number; + tokenIn: string; + tokenOut: string; + amount: BigNumber$1; + poolId: string; + lastChangeBlock: BigNumber$1; + from: string; + to: string; + userData: string; + }; +} +interface EulerLinearPoolInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "disableRecoveryMode()": FunctionFragment; + "enableRecoveryMode()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getBptIndex()": FunctionFragment; + "getDomainSeparator()": FunctionFragment; + "getMainIndex()": FunctionFragment; + "getMainToken()": FunctionFragment; + "getNextNonce(address)": FunctionFragment; + "getOwner()": FunctionFragment; + "getPausedState()": FunctionFragment; + "getPoolId()": FunctionFragment; + "getProtocolFeesCollector()": FunctionFragment; + "getRate()": FunctionFragment; + "getScalingFactors()": FunctionFragment; + "getSwapFeePercentage()": FunctionFragment; + "getTargets()": FunctionFragment; + "getVault()": FunctionFragment; + "getVirtualSupply()": FunctionFragment; + "getWrappedIndex()": FunctionFragment; + "getWrappedToken()": FunctionFragment; + "getWrappedTokenRate()": FunctionFragment; + "inRecoveryMode()": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "initialize()": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": FunctionFragment; + "pause()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "setSwapFeePercentage(uint256)": FunctionFragment; + "setTargets(uint256,uint256)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "unpause()": FunctionFragment; + "version()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "allowance" | "approve" | "balanceOf" | "decimals" | "decreaseAllowance" | "disableRecoveryMode" | "enableRecoveryMode" | "getActionId" | "getAuthorizer" | "getBptIndex" | "getDomainSeparator" | "getMainIndex" | "getMainToken" | "getNextNonce" | "getOwner" | "getPausedState" | "getPoolId" | "getProtocolFeesCollector" | "getRate" | "getScalingFactors" | "getSwapFeePercentage" | "getTargets" | "getVault" | "getVirtualSupply" | "getWrappedIndex" | "getWrappedToken" | "getWrappedTokenRate" | "inRecoveryMode" | "increaseAllowance" | "initialize" | "name" | "nonces" | "onExitPool" | "onJoinPool" | "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)" | "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)" | "pause" | "permit" | "queryExit" | "queryJoin" | "setSwapFeePercentage" | "setTargets" | "symbol" | "totalSupply" | "transfer" | "transferFrom" | "unpause" | "version"): FunctionFragment; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "disableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "enableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getBptIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getDomainSeparator", values?: undefined): string; + encodeFunctionData(functionFragment: "getMainIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getMainToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getNextNonce", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getOwner", values?: undefined): string; + encodeFunctionData(functionFragment: "getPausedState", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolId", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeesCollector", values?: undefined): string; + encodeFunctionData(functionFragment: "getRate", values?: undefined): string; + encodeFunctionData(functionFragment: "getScalingFactors", values?: undefined): string; + encodeFunctionData(functionFragment: "getSwapFeePercentage", values?: undefined): string; + encodeFunctionData(functionFragment: "getTargets", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "getVirtualSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedTokenRate", values?: undefined): string; + encodeFunctionData(functionFragment: "inRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "initialize", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "onExitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onJoinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)", values: [ + IPoolSwapStructs$7.SwapRequestStruct, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)", values: [ + IPoolSwapStructs$7.SwapRequestStruct, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData(functionFragment: "permit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryExit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryJoin", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "setSwapFeePercentage", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setTargets", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unpause", values?: undefined): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "enableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBptIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDomainSeparator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMainIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMainToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getNextNonce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPausedState", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeesCollector", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getScalingFactors", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTargets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVirtualSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedTokenRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "inRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onExitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onJoinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryExit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setTargets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "PausedStateChanged(bool)": EventFragment; + "RecoveryModeStateChanged(bool)": EventFragment; + "SwapFeePercentageChanged(uint256)": EventFragment; + "TargetsSet(address,uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PausedStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RecoveryModeStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SwapFeePercentageChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TargetsSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +interface ApprovalEventObject$8 { + owner: string; + spender: string; + value: BigNumber$1; +} +type ApprovalEvent$8 = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject$8>; +type ApprovalEventFilter$8 = TypedEventFilter; +interface PausedStateChangedEventObject$7 { + paused: boolean; +} +type PausedStateChangedEvent$7 = TypedEvent<[ + boolean +], PausedStateChangedEventObject$7>; +type PausedStateChangedEventFilter$7 = TypedEventFilter; +interface RecoveryModeStateChangedEventObject$3 { + enabled: boolean; +} +type RecoveryModeStateChangedEvent$3 = TypedEvent<[ + boolean +], RecoveryModeStateChangedEventObject$3>; +type RecoveryModeStateChangedEventFilter$3 = TypedEventFilter; +interface SwapFeePercentageChangedEventObject$6 { + swapFeePercentage: BigNumber$1; +} +type SwapFeePercentageChangedEvent$6 = TypedEvent<[ + BigNumber$1 +], SwapFeePercentageChangedEventObject$6>; +type SwapFeePercentageChangedEventFilter$6 = TypedEventFilter; +interface TargetsSetEventObject$3 { + token: string; + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; +} +type TargetsSetEvent$3 = TypedEvent<[ + string, + BigNumber$1, + BigNumber$1 +], TargetsSetEventObject$3>; +type TargetsSetEventFilter$3 = TypedEventFilter; +interface TransferEventObject$8 { + from: string; + to: string; + value: BigNumber$1; +} +type TransferEvent$8 = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject$8>; +type TransferEventFilter$8 = TypedEventFilter; +declare namespace EulerLinearPool { + type ConstructorArgsStruct = { + vault: PromiseOrValue; + name: PromiseOrValue; + symbol: PromiseOrValue; + mainToken: PromiseOrValue; + wrappedToken: PromiseOrValue; + assetManager: PromiseOrValue; + upperTarget: PromiseOrValue; + swapFeePercentage: PromiseOrValue; + pauseWindowDuration: PromiseOrValue; + bufferPeriodDuration: PromiseOrValue; + owner: PromiseOrValue; + version: PromiseOrValue; + }; + type ConstructorArgsStructOutput = [ + string, + string, + string, + string, + string, + string, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + string, + string + ] & { + vault: string; + name: string; + symbol: string; + mainToken: string; + wrappedToken: string; + assetManager: string; + upperTarget: BigNumber$1; + swapFeePercentage: BigNumber$1; + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + owner: string; + version: string; + }; +} +interface EulerLinearPool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: EulerLinearPoolInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getBptIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getDomainSeparator(overrides?: CallOverrides): Promise<[string]>; + getMainIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getMainToken(overrides?: CallOverrides): Promise<[string]>; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + getOwner(overrides?: CallOverrides): Promise<[string]>; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeesCollector(overrides?: CallOverrides): Promise<[string]>; + getRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getScalingFactors(overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getSwapFeePercentage(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise<[string]>; + getVirtualSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getWrappedIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getWrappedToken(overrides?: CallOverrides): Promise<[string]>; + getWrappedTokenRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + inRecoveryMode(overrides?: CallOverrides): Promise<[boolean]>; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise<[string]>; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$7.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$7.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise<[string]>; + }; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$7.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$7.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + disableRecoveryMode(overrides?: CallOverrides): Promise; + enableRecoveryMode(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsOut: BigNumber$1[]; + dueProtocolFees: BigNumber$1[]; + }>; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsIn: BigNumber$1[]; + dueProtocolFees: BigNumber$1[]; + }>; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$7.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$7.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: CallOverrides): Promise; + pause(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptIn: BigNumber$1; + amountsOut: BigNumber$1[]; + }>; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptOut: BigNumber$1; + amountsIn: BigNumber$1[]; + }>; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: CallOverrides): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + unpause(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$8; + Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$8; + "PausedStateChanged(bool)"(paused?: null): PausedStateChangedEventFilter$7; + PausedStateChanged(paused?: null): PausedStateChangedEventFilter$7; + "RecoveryModeStateChanged(bool)"(enabled?: null): RecoveryModeStateChangedEventFilter$3; + RecoveryModeStateChanged(enabled?: null): RecoveryModeStateChangedEventFilter$3; + "SwapFeePercentageChanged(uint256)"(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$6; + SwapFeePercentageChanged(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$6; + "TargetsSet(address,uint256,uint256)"(token?: PromiseOrValue | null, lowerTarget?: null, upperTarget?: null): TargetsSetEventFilter$3; + TargetsSet(token?: PromiseOrValue | null, lowerTarget?: null, upperTarget?: null): TargetsSetEventFilter$3; + "Transfer(address,address,uint256)"(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$8; + Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$8; + }; + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$7.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$7.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$7.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$7.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + }; +} + +interface EulerLinearPoolFactoryInterface extends utils.Interface { + functions: { + "create(string,string,address,address,uint256,uint256,address,uint256)": FunctionFragment; + "disable()": FunctionFragment; + "eulerProtocol()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getCreationCode()": FunctionFragment; + "getCreationCodeContracts()": FunctionFragment; + "getLastCreatedPool()": FunctionFragment; + "getPauseConfiguration()": FunctionFragment; + "getPoolVersion()": FunctionFragment; + "getProtocolFeePercentagesProvider()": FunctionFragment; + "getVault()": FunctionFragment; + "isDisabled()": FunctionFragment; + "isPoolFromFactory(address)": FunctionFragment; + "version()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "create" | "disable" | "eulerProtocol" | "getActionId" | "getAuthorizer" | "getCreationCode" | "getCreationCodeContracts" | "getLastCreatedPool" | "getPauseConfiguration" | "getPoolVersion" | "getProtocolFeePercentagesProvider" | "getVault" | "isDisabled" | "isPoolFromFactory" | "version"): FunctionFragment; + encodeFunctionData(functionFragment: "create", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "disable", values?: undefined): string; + encodeFunctionData(functionFragment: "eulerProtocol", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCode", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCodeContracts", values?: undefined): string; + encodeFunctionData(functionFragment: "getLastCreatedPool", values?: undefined): string; + encodeFunctionData(functionFragment: "getPauseConfiguration", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolVersion", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeePercentagesProvider", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "isDisabled", values?: undefined): string; + encodeFunctionData(functionFragment: "isPoolFromFactory", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + decodeFunctionResult(functionFragment: "create", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disable", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "eulerProtocol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCodeContracts", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLastCreatedPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPauseConfiguration", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolVersion", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeePercentagesProvider", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isDisabled", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isPoolFromFactory", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + events: { + "EulerLinearPoolCreated(address,uint256)": EventFragment; + "FactoryDisabled()": EventFragment; + "PoolCreated(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "EulerLinearPoolCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FactoryDisabled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolCreated"): EventFragment; +} +interface EulerLinearPoolCreatedEventObject { + pool: string; + protocolId: BigNumber$1; +} +type EulerLinearPoolCreatedEvent = TypedEvent<[ + string, + BigNumber$1 +], EulerLinearPoolCreatedEventObject>; +type EulerLinearPoolCreatedEventFilter = TypedEventFilter; +interface FactoryDisabledEventObject$3 { +} +type FactoryDisabledEvent$3 = TypedEvent<[], FactoryDisabledEventObject$3>; +type FactoryDisabledEventFilter$3 = TypedEventFilter; +interface PoolCreatedEventObject$3 { + pool: string; +} +type PoolCreatedEvent$3 = TypedEvent<[string], PoolCreatedEventObject$3>; +type PoolCreatedEventFilter$3 = TypedEventFilter; +interface EulerLinearPoolFactory extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: EulerLinearPoolFactoryInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + eulerProtocol(overrides?: CallOverrides): Promise<[string]>; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getCreationCode(overrides?: CallOverrides): Promise<[string]>; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise<[string]>; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise<[string]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + isDisabled(overrides?: CallOverrides): Promise<[boolean]>; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + version(overrides?: CallOverrides): Promise<[string]>; + }; + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + eulerProtocol(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + callStatic: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, overrides?: CallOverrides): Promise; + disable(overrides?: CallOverrides): Promise; + eulerProtocol(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + filters: { + "EulerLinearPoolCreated(address,uint256)"(pool?: PromiseOrValue | null, protocolId?: PromiseOrValue | null): EulerLinearPoolCreatedEventFilter; + EulerLinearPoolCreated(pool?: PromiseOrValue | null, protocolId?: PromiseOrValue | null): EulerLinearPoolCreatedEventFilter; + "FactoryDisabled()"(): FactoryDisabledEventFilter$3; + FactoryDisabled(): FactoryDisabledEventFilter$3; + "PoolCreated(address)"(pool?: PromiseOrValue | null): PoolCreatedEventFilter$3; + PoolCreated(pool?: PromiseOrValue | null): PoolCreatedEventFilter$3; + }; + estimateGas: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + eulerProtocol(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + eulerProtocol(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; +} + +declare namespace IPoolSwapStructs$6 { + type SwapRequestStruct = { + kind: PromiseOrValue; + tokenIn: PromiseOrValue; + tokenOut: PromiseOrValue; + amount: PromiseOrValue; + poolId: PromiseOrValue; + lastChangeBlock: PromiseOrValue; + from: PromiseOrValue; + to: PromiseOrValue; + userData: PromiseOrValue; + }; + type SwapRequestStructOutput = [ + number, + string, + string, + BigNumber$1, + string, + BigNumber$1, + string, + string, + string + ] & { + kind: number; + tokenIn: string; + tokenOut: string; + amount: BigNumber$1; + poolId: string; + lastChangeBlock: BigNumber$1; + from: string; + to: string; + userData: string; + }; +} +interface FXPoolInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "assimilator(address)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "collectorAddress()": FunctionFragment; + "curve()": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "derivatives(uint256)": FunctionFragment; + "emergency()": FunctionFragment; + "getPoolId()": FunctionFragment; + "getVault()": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "initialize(address[],uint256[])": FunctionFragment; + "liquidity()": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "numeraires(uint256)": FunctionFragment; + "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": FunctionFragment; + "owner()": FunctionFragment; + "paused()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "protocolPercentFee()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "reserves(uint256)": FunctionFragment; + "setCap(uint256)": FunctionFragment; + "setCollectorAddress(address)": FunctionFragment; + "setEmergency(bool)": FunctionFragment; + "setParams(uint256,uint256,uint256,uint256,uint256)": FunctionFragment; + "setPaused()": FunctionFragment; + "setProtocolPercentFee(uint256)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "totalUnclaimedFeesInNumeraire()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "viewDeposit(uint256)": FunctionFragment; + "viewParameters()": FunctionFragment; + "viewWithdraw(uint256)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "allowance" | "approve" | "assimilator" | "balanceOf" | "collectorAddress" | "curve" | "decimals" | "decreaseAllowance" | "derivatives" | "emergency" | "getPoolId" | "getVault" | "increaseAllowance" | "initialize" | "liquidity" | "name" | "nonces" | "numeraires" | "onExitPool" | "onJoinPool" | "onSwap" | "owner" | "paused" | "permit" | "protocolPercentFee" | "renounceOwnership" | "reserves" | "setCap" | "setCollectorAddress" | "setEmergency" | "setParams" | "setPaused" | "setProtocolPercentFee" | "symbol" | "totalSupply" | "totalUnclaimedFeesInNumeraire" | "transfer" | "transferFrom" | "transferOwnership" | "viewDeposit" | "viewParameters" | "viewWithdraw"): FunctionFragment; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "assimilator", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "collectorAddress", values?: undefined): string; + encodeFunctionData(functionFragment: "curve", values?: undefined): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "derivatives", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "emergency", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolId", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "initialize", values: [PromiseOrValue[], PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "liquidity", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "numeraires", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "onExitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onJoinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap", values: [ + IPoolSwapStructs$6.SwapRequestStruct, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData(functionFragment: "paused", values?: undefined): string; + encodeFunctionData(functionFragment: "permit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "protocolPercentFee", values?: undefined): string; + encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string; + encodeFunctionData(functionFragment: "reserves", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setCap", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setCollectorAddress", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setEmergency", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setParams", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "setPaused", values?: undefined): string; + encodeFunctionData(functionFragment: "setProtocolPercentFee", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "totalUnclaimedFeesInNumeraire", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "transferOwnership", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "viewDeposit", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "viewParameters", values?: undefined): string; + encodeFunctionData(functionFragment: "viewWithdraw", values: [PromiseOrValue]): string; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "assimilator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "collectorAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "curve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "derivatives", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "emergency", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "liquidity", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "numeraires", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onExitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onJoinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "paused", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "protocolPercentFee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "reserves", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setCap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setCollectorAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setEmergency", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setParams", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setPaused", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setProtocolPercentFee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalUnclaimedFeesInNumeraire", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "viewDeposit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "viewParameters", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "viewWithdraw", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "AssetIncluded(address,address,uint256)": EventFragment; + "AssimilatorIncluded(address,address,address,address)": EventFragment; + "ChangeCollectorAddress(address)": EventFragment; + "EmergencyAlarm(bool)": EventFragment; + "EmergencyWithdraw(bytes32,uint256,uint256[])": EventFragment; + "FeesAccrued(uint256)": EventFragment; + "FeesCollected(address,uint256)": EventFragment; + "OnExitPool(bytes32,uint256,uint256[])": EventFragment; + "OnJoinPool(bytes32,uint256,uint256[])": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "ParametersSet(uint256,uint256,uint256,uint256,uint256)": EventFragment; + "Paused(address)": EventFragment; + "ProtocolFeeShareUpdated(address,uint256)": EventFragment; + "Trade(address,address,address,uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + "Unpaused(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AssetIncluded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AssimilatorIncluded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ChangeCollectorAddress"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EmergencyAlarm"): EventFragment; + getEvent(nameOrSignatureOrTopic: "EmergencyWithdraw"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FeesAccrued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FeesCollected"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OnExitPool"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OnJoinPool"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ParametersSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Paused"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProtocolFeeShareUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Trade"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Unpaused"): EventFragment; +} +interface ApprovalEventObject$7 { + owner: string; + spender: string; + value: BigNumber$1; +} +type ApprovalEvent$7 = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject$7>; +type ApprovalEventFilter$7 = TypedEventFilter; +interface AssetIncludedEventObject { + numeraire: string; + reserve: string; + weight: BigNumber$1; +} +type AssetIncludedEvent = TypedEvent<[ + string, + string, + BigNumber$1 +], AssetIncludedEventObject>; +type AssetIncludedEventFilter = TypedEventFilter; +interface AssimilatorIncludedEventObject { + derivative: string; + numeraire: string; + reserve: string; + assimilator: string; +} +type AssimilatorIncludedEvent = TypedEvent<[ + string, + string, + string, + string +], AssimilatorIncludedEventObject>; +type AssimilatorIncludedEventFilter = TypedEventFilter; +interface ChangeCollectorAddressEventObject { + newCollector: string; +} +type ChangeCollectorAddressEvent = TypedEvent<[ + string +], ChangeCollectorAddressEventObject>; +type ChangeCollectorAddressEventFilter = TypedEventFilter; +interface EmergencyAlarmEventObject { + isEmergency: boolean; +} +type EmergencyAlarmEvent = TypedEvent<[ + boolean +], EmergencyAlarmEventObject>; +type EmergencyAlarmEventFilter = TypedEventFilter; +interface EmergencyWithdrawEventObject { + poolId: string; + lptAmountBurned: BigNumber$1; + amountsWithdrawn: BigNumber$1[]; +} +type EmergencyWithdrawEvent = TypedEvent<[ + string, + BigNumber$1, + BigNumber$1[] +], EmergencyWithdrawEventObject>; +type EmergencyWithdrawEventFilter = TypedEventFilter; +interface FeesAccruedEventObject { + feesCollected: BigNumber$1; +} +type FeesAccruedEvent = TypedEvent<[BigNumber$1], FeesAccruedEventObject>; +type FeesAccruedEventFilter = TypedEventFilter; +interface FeesCollectedEventObject { + recipient: string; + feesCollected: BigNumber$1; +} +type FeesCollectedEvent = TypedEvent<[ + string, + BigNumber$1 +], FeesCollectedEventObject>; +type FeesCollectedEventFilter = TypedEventFilter; +interface OnExitPoolEventObject { + poolId: string; + lptAmountBurned: BigNumber$1; + amountsWithdrawn: BigNumber$1[]; +} +type OnExitPoolEvent = TypedEvent<[ + string, + BigNumber$1, + BigNumber$1[] +], OnExitPoolEventObject>; +type OnExitPoolEventFilter = TypedEventFilter; +interface OnJoinPoolEventObject { + poolId: string; + lptAmountMinted: BigNumber$1; + amountsDeposited: BigNumber$1[]; +} +type OnJoinPoolEvent = TypedEvent<[ + string, + BigNumber$1, + BigNumber$1[] +], OnJoinPoolEventObject>; +type OnJoinPoolEventFilter = TypedEventFilter; +interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +type OwnershipTransferredEvent = TypedEvent<[ + string, + string +], OwnershipTransferredEventObject>; +type OwnershipTransferredEventFilter = TypedEventFilter; +interface ParametersSetEventObject { + alpha: BigNumber$1; + beta: BigNumber$1; + delta: BigNumber$1; + epsilon: BigNumber$1; + lambda: BigNumber$1; +} +type ParametersSetEvent = TypedEvent<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 +], ParametersSetEventObject>; +type ParametersSetEventFilter = TypedEventFilter; +interface PausedEventObject { + account: string; +} +type PausedEvent = TypedEvent<[string], PausedEventObject>; +type PausedEventFilter = TypedEventFilter; +interface ProtocolFeeShareUpdatedEventObject { + updater: string; + newProtocolPercentage: BigNumber$1; +} +type ProtocolFeeShareUpdatedEvent = TypedEvent<[ + string, + BigNumber$1 +], ProtocolFeeShareUpdatedEventObject>; +type ProtocolFeeShareUpdatedEventFilter = TypedEventFilter; +interface TradeEventObject { + trader: string; + origin: string; + target: string; + originAmount: BigNumber$1; + targetAmount: BigNumber$1; +} +type TradeEvent = TypedEvent<[ + string, + string, + string, + BigNumber$1, + BigNumber$1 +], TradeEventObject>; +type TradeEventFilter = TypedEventFilter; +interface TransferEventObject$7 { + from: string; + to: string; + value: BigNumber$1; +} +type TransferEvent$7 = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject$7>; +type TransferEventFilter$7 = TypedEventFilter; +interface UnpausedEventObject { + account: string; +} +type UnpausedEvent = TypedEvent<[string], UnpausedEventObject>; +type UnpausedEventFilter = TypedEventFilter; +interface FXPool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: FXPoolInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + assimilator(_derivative: PromiseOrValue, overrides?: CallOverrides): Promise<[string] & { + assimilator_: string; + }>; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + collectorAddress(overrides?: CallOverrides): Promise<[string]>; + curve(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + string, + string, + string + ] & { + alpha: BigNumber$1; + beta: BigNumber$1; + delta: BigNumber$1; + epsilon: BigNumber$1; + lambda: BigNumber$1; + cap: BigNumber$1; + vault: string; + fxPoolAddress: string; + poolId: string; + }>; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + derivatives(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + emergency(overrides?: CallOverrides): Promise<[boolean]>; + getPoolId(overrides?: CallOverrides): Promise<[string]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(_assets: PromiseOrValue[], _assetWeights: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + liquidity(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + total_: BigNumber$1; + individual_: BigNumber$1[]; + }>; + name(overrides?: CallOverrides): Promise<[string]>; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + numeraires(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, arg3: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, arg3: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(swapRequest: IPoolSwapStructs$6.SwapRequestStruct, arg1: PromiseOrValue, arg2: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + owner(overrides?: CallOverrides): Promise<[string]>; + paused(overrides?: CallOverrides): Promise<[boolean]>; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + protocolPercentFee(overrides?: CallOverrides): Promise<[BigNumber$1]>; + renounceOwnership(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + reserves(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + setCap(_cap: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setCollectorAddress(_collectorAddress: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setEmergency(_emergency: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setParams(_alpha: PromiseOrValue, _beta: PromiseOrValue, _feeAtHalt: PromiseOrValue, _epsilon: PromiseOrValue, _lambda: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setProtocolPercentFee(_protocolPercentFee: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + totalUnclaimedFeesInNumeraire(overrides?: CallOverrides): Promise<[BigNumber$1]>; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferOwnership(newOwner: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + viewDeposit(totalDepositNumeraire: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1, BigNumber$1[]]>; + viewParameters(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + alpha_: BigNumber$1; + beta_: BigNumber$1; + delta_: BigNumber$1; + epsilon_: BigNumber$1; + lambda_: BigNumber$1; + }>; + viewWithdraw(_curvesToBurn: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + }; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + assimilator(_derivative: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + collectorAddress(overrides?: CallOverrides): Promise; + curve(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + string, + string, + string + ] & { + alpha: BigNumber$1; + beta: BigNumber$1; + delta: BigNumber$1; + epsilon: BigNumber$1; + lambda: BigNumber$1; + cap: BigNumber$1; + vault: string; + fxPoolAddress: string; + poolId: string; + }>; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + derivatives(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + emergency(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(_assets: PromiseOrValue[], _assetWeights: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + liquidity(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + total_: BigNumber$1; + individual_: BigNumber$1[]; + }>; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + numeraires(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, arg3: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, arg3: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(swapRequest: IPoolSwapStructs$6.SwapRequestStruct, arg1: PromiseOrValue, arg2: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + owner(overrides?: CallOverrides): Promise; + paused(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + protocolPercentFee(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + reserves(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + setCap(_cap: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setCollectorAddress(_collectorAddress: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setEmergency(_emergency: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setParams(_alpha: PromiseOrValue, _beta: PromiseOrValue, _feeAtHalt: PromiseOrValue, _epsilon: PromiseOrValue, _lambda: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setProtocolPercentFee(_protocolPercentFee: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + totalUnclaimedFeesInNumeraire(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferOwnership(newOwner: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + viewDeposit(totalDepositNumeraire: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1, BigNumber$1[]]>; + viewParameters(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + alpha_: BigNumber$1; + beta_: BigNumber$1; + delta_: BigNumber$1; + epsilon_: BigNumber$1; + lambda_: BigNumber$1; + }>; + viewWithdraw(_curvesToBurn: PromiseOrValue, overrides?: CallOverrides): Promise; + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + assimilator(_derivative: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + collectorAddress(overrides?: CallOverrides): Promise; + curve(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + string, + string, + string + ] & { + alpha: BigNumber$1; + beta: BigNumber$1; + delta: BigNumber$1; + epsilon: BigNumber$1; + lambda: BigNumber$1; + cap: BigNumber$1; + vault: string; + fxPoolAddress: string; + poolId: string; + }>; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + derivatives(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + emergency(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(_assets: PromiseOrValue[], _assetWeights: PromiseOrValue[], overrides?: CallOverrides): Promise; + liquidity(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + total_: BigNumber$1; + individual_: BigNumber$1[]; + }>; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + numeraires(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, arg3: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsOut: BigNumber$1[]; + dueProtocolFeeAmounts: BigNumber$1[]; + }>; + onJoinPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, arg3: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsIn: BigNumber$1[]; + dueProtocolFeeAmounts: BigNumber$1[]; + }>; + onSwap(swapRequest: IPoolSwapStructs$6.SwapRequestStruct, arg1: PromiseOrValue, arg2: PromiseOrValue, overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + paused(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + protocolPercentFee(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: CallOverrides): Promise; + reserves(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + setCap(_cap: PromiseOrValue, overrides?: CallOverrides): Promise; + setCollectorAddress(_collectorAddress: PromiseOrValue, overrides?: CallOverrides): Promise; + setEmergency(_emergency: PromiseOrValue, overrides?: CallOverrides): Promise; + setParams(_alpha: PromiseOrValue, _beta: PromiseOrValue, _feeAtHalt: PromiseOrValue, _epsilon: PromiseOrValue, _lambda: PromiseOrValue, overrides?: CallOverrides): Promise; + setPaused(overrides?: CallOverrides): Promise; + setProtocolPercentFee(_protocolPercentFee: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + totalUnclaimedFeesInNumeraire(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + transferOwnership(newOwner: PromiseOrValue, overrides?: CallOverrides): Promise; + viewDeposit(totalDepositNumeraire: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1, BigNumber$1[]]>; + viewParameters(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + alpha_: BigNumber$1; + beta_: BigNumber$1; + delta_: BigNumber$1; + epsilon_: BigNumber$1; + lambda_: BigNumber$1; + }>; + viewWithdraw(_curvesToBurn: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$7; + Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$7; + "AssetIncluded(address,address,uint256)"(numeraire?: PromiseOrValue | null, reserve?: PromiseOrValue | null, weight?: null): AssetIncludedEventFilter; + AssetIncluded(numeraire?: PromiseOrValue | null, reserve?: PromiseOrValue | null, weight?: null): AssetIncludedEventFilter; + "AssimilatorIncluded(address,address,address,address)"(derivative?: PromiseOrValue | null, numeraire?: PromiseOrValue | null, reserve?: PromiseOrValue | null, assimilator?: null): AssimilatorIncludedEventFilter; + AssimilatorIncluded(derivative?: PromiseOrValue | null, numeraire?: PromiseOrValue | null, reserve?: PromiseOrValue | null, assimilator?: null): AssimilatorIncludedEventFilter; + "ChangeCollectorAddress(address)"(newCollector?: null): ChangeCollectorAddressEventFilter; + ChangeCollectorAddress(newCollector?: null): ChangeCollectorAddressEventFilter; + "EmergencyAlarm(bool)"(isEmergency?: null): EmergencyAlarmEventFilter; + EmergencyAlarm(isEmergency?: null): EmergencyAlarmEventFilter; + "EmergencyWithdraw(bytes32,uint256,uint256[])"(poolId?: null, lptAmountBurned?: null, amountsWithdrawn?: null): EmergencyWithdrawEventFilter; + EmergencyWithdraw(poolId?: null, lptAmountBurned?: null, amountsWithdrawn?: null): EmergencyWithdrawEventFilter; + "FeesAccrued(uint256)"(feesCollected?: null): FeesAccruedEventFilter; + FeesAccrued(feesCollected?: null): FeesAccruedEventFilter; + "FeesCollected(address,uint256)"(recipient?: null, feesCollected?: null): FeesCollectedEventFilter; + FeesCollected(recipient?: null, feesCollected?: null): FeesCollectedEventFilter; + "OnExitPool(bytes32,uint256,uint256[])"(poolId?: null, lptAmountBurned?: null, amountsWithdrawn?: null): OnExitPoolEventFilter; + OnExitPool(poolId?: null, lptAmountBurned?: null, amountsWithdrawn?: null): OnExitPoolEventFilter; + "OnJoinPool(bytes32,uint256,uint256[])"(poolId?: null, lptAmountMinted?: null, amountsDeposited?: null): OnJoinPoolEventFilter; + OnJoinPool(poolId?: null, lptAmountMinted?: null, amountsDeposited?: null): OnJoinPoolEventFilter; + "OwnershipTransferred(address,address)"(previousOwner?: PromiseOrValue | null, newOwner?: PromiseOrValue | null): OwnershipTransferredEventFilter; + OwnershipTransferred(previousOwner?: PromiseOrValue | null, newOwner?: PromiseOrValue | null): OwnershipTransferredEventFilter; + "ParametersSet(uint256,uint256,uint256,uint256,uint256)"(alpha?: null, beta?: null, delta?: null, epsilon?: null, lambda?: null): ParametersSetEventFilter; + ParametersSet(alpha?: null, beta?: null, delta?: null, epsilon?: null, lambda?: null): ParametersSetEventFilter; + "Paused(address)"(account?: null): PausedEventFilter; + Paused(account?: null): PausedEventFilter; + "ProtocolFeeShareUpdated(address,uint256)"(updater?: null, newProtocolPercentage?: null): ProtocolFeeShareUpdatedEventFilter; + ProtocolFeeShareUpdated(updater?: null, newProtocolPercentage?: null): ProtocolFeeShareUpdatedEventFilter; + "Trade(address,address,address,uint256,uint256)"(trader?: PromiseOrValue | null, origin?: PromiseOrValue | null, target?: PromiseOrValue | null, originAmount?: null, targetAmount?: null): TradeEventFilter; + Trade(trader?: PromiseOrValue | null, origin?: PromiseOrValue | null, target?: PromiseOrValue | null, originAmount?: null, targetAmount?: null): TradeEventFilter; + "Transfer(address,address,uint256)"(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$7; + Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$7; + "Unpaused(address)"(account?: null): UnpausedEventFilter; + Unpaused(account?: null): UnpausedEventFilter; + }; + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + assimilator(_derivative: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + collectorAddress(overrides?: CallOverrides): Promise; + curve(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + derivatives(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + emergency(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(_assets: PromiseOrValue[], _assetWeights: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + liquidity(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + numeraires(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, arg3: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, arg3: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(swapRequest: IPoolSwapStructs$6.SwapRequestStruct, arg1: PromiseOrValue, arg2: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + owner(overrides?: CallOverrides): Promise; + paused(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + protocolPercentFee(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + reserves(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + setCap(_cap: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setCollectorAddress(_collectorAddress: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setEmergency(_emergency: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setParams(_alpha: PromiseOrValue, _beta: PromiseOrValue, _feeAtHalt: PromiseOrValue, _epsilon: PromiseOrValue, _lambda: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setProtocolPercentFee(_protocolPercentFee: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + totalUnclaimedFeesInNumeraire(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferOwnership(newOwner: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + viewDeposit(totalDepositNumeraire: PromiseOrValue, overrides?: CallOverrides): Promise; + viewParameters(overrides?: CallOverrides): Promise; + viewWithdraw(_curvesToBurn: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + assimilator(_derivative: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + collectorAddress(overrides?: CallOverrides): Promise; + curve(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + derivatives(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + emergency(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(_assets: PromiseOrValue[], _assetWeights: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + liquidity(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + numeraires(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, arg3: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, arg1: PromiseOrValue, recipient: PromiseOrValue, arg3: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(swapRequest: IPoolSwapStructs$6.SwapRequestStruct, arg1: PromiseOrValue, arg2: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + owner(overrides?: CallOverrides): Promise; + paused(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + protocolPercentFee(overrides?: CallOverrides): Promise; + renounceOwnership(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + reserves(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + setCap(_cap: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setCollectorAddress(_collectorAddress: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setEmergency(_emergency: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setParams(_alpha: PromiseOrValue, _beta: PromiseOrValue, _feeAtHalt: PromiseOrValue, _epsilon: PromiseOrValue, _lambda: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setProtocolPercentFee(_protocolPercentFee: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + totalUnclaimedFeesInNumeraire(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferOwnership(newOwner: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + viewDeposit(totalDepositNumeraire: PromiseOrValue, overrides?: CallOverrides): Promise; + viewParameters(overrides?: CallOverrides): Promise; + viewWithdraw(_curvesToBurn: PromiseOrValue, overrides?: CallOverrides): Promise; + }; +} + +interface GaugeClaimHelperInterface extends utils.Interface { + functions: { + "CLAIM_FREQUENCY()": FunctionFragment; + "claimRewardsFromGauge(address,address)": FunctionFragment; + "claimRewardsFromGauges(address[],address)": FunctionFragment; + "getPendingRewards(address,address,address)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "CLAIM_FREQUENCY" | "claimRewardsFromGauge" | "claimRewardsFromGauges" | "getPendingRewards"): FunctionFragment; + encodeFunctionData(functionFragment: "CLAIM_FREQUENCY", values?: undefined): string; + encodeFunctionData(functionFragment: "claimRewardsFromGauge", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "claimRewardsFromGauges", values: [PromiseOrValue[], PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getPendingRewards", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + decodeFunctionResult(functionFragment: "CLAIM_FREQUENCY", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claimRewardsFromGauge", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claimRewardsFromGauges", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPendingRewards", data: BytesLike): Result; + events: {}; +} +interface GaugeClaimHelper extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: GaugeClaimHelperInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + CLAIM_FREQUENCY(overrides?: CallOverrides): Promise<[BigNumber$1]>; + claimRewardsFromGauge(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + claimRewardsFromGauges(gauges: PromiseOrValue[], user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getPendingRewards(gauge: PromiseOrValue, user: PromiseOrValue, token: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + CLAIM_FREQUENCY(overrides?: CallOverrides): Promise; + claimRewardsFromGauge(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + claimRewardsFromGauges(gauges: PromiseOrValue[], user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getPendingRewards(gauge: PromiseOrValue, user: PromiseOrValue, token: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + CLAIM_FREQUENCY(overrides?: CallOverrides): Promise; + claimRewardsFromGauge(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: CallOverrides): Promise; + claimRewardsFromGauges(gauges: PromiseOrValue[], user: PromiseOrValue, overrides?: CallOverrides): Promise; + getPendingRewards(gauge: PromiseOrValue, user: PromiseOrValue, token: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + CLAIM_FREQUENCY(overrides?: CallOverrides): Promise; + claimRewardsFromGauge(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + claimRewardsFromGauges(gauges: PromiseOrValue[], user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getPendingRewards(gauge: PromiseOrValue, user: PromiseOrValue, token: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + CLAIM_FREQUENCY(overrides?: CallOverrides): Promise; + claimRewardsFromGauge(gauge: PromiseOrValue, user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + claimRewardsFromGauges(gauges: PromiseOrValue[], user: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getPendingRewards(gauge: PromiseOrValue, user: PromiseOrValue, token: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +declare namespace IPoolSwapStructs$5 { + type SwapRequestStruct = { + kind: PromiseOrValue; + tokenIn: PromiseOrValue; + tokenOut: PromiseOrValue; + amount: PromiseOrValue; + poolId: PromiseOrValue; + lastChangeBlock: PromiseOrValue; + from: PromiseOrValue; + to: PromiseOrValue; + userData: PromiseOrValue; + }; + type SwapRequestStructOutput = [ + number, + string, + string, + BigNumber$1, + string, + BigNumber$1, + string, + string, + string + ] & { + kind: number; + tokenIn: string; + tokenOut: string; + amount: BigNumber$1; + poolId: string; + lastChangeBlock: BigNumber$1; + from: string; + to: string; + userData: string; + }; +} +interface GearboxLinearPoolInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "disableRecoveryMode()": FunctionFragment; + "enableRecoveryMode()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getBptIndex()": FunctionFragment; + "getDomainSeparator()": FunctionFragment; + "getMainIndex()": FunctionFragment; + "getMainToken()": FunctionFragment; + "getNextNonce(address)": FunctionFragment; + "getOwner()": FunctionFragment; + "getPausedState()": FunctionFragment; + "getPoolId()": FunctionFragment; + "getProtocolFeesCollector()": FunctionFragment; + "getRate()": FunctionFragment; + "getScalingFactors()": FunctionFragment; + "getSwapFeePercentage()": FunctionFragment; + "getTargets()": FunctionFragment; + "getVault()": FunctionFragment; + "getVirtualSupply()": FunctionFragment; + "getWrappedIndex()": FunctionFragment; + "getWrappedToken()": FunctionFragment; + "getWrappedTokenRate()": FunctionFragment; + "inRecoveryMode()": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "initialize()": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": FunctionFragment; + "pause()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "setSwapFeePercentage(uint256)": FunctionFragment; + "setTargets(uint256,uint256)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "unpause()": FunctionFragment; + "version()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "allowance" | "approve" | "balanceOf" | "decimals" | "decreaseAllowance" | "disableRecoveryMode" | "enableRecoveryMode" | "getActionId" | "getAuthorizer" | "getBptIndex" | "getDomainSeparator" | "getMainIndex" | "getMainToken" | "getNextNonce" | "getOwner" | "getPausedState" | "getPoolId" | "getProtocolFeesCollector" | "getRate" | "getScalingFactors" | "getSwapFeePercentage" | "getTargets" | "getVault" | "getVirtualSupply" | "getWrappedIndex" | "getWrappedToken" | "getWrappedTokenRate" | "inRecoveryMode" | "increaseAllowance" | "initialize" | "name" | "nonces" | "onExitPool" | "onJoinPool" | "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)" | "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)" | "pause" | "permit" | "queryExit" | "queryJoin" | "setSwapFeePercentage" | "setTargets" | "symbol" | "totalSupply" | "transfer" | "transferFrom" | "unpause" | "version"): FunctionFragment; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "disableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "enableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getBptIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getDomainSeparator", values?: undefined): string; + encodeFunctionData(functionFragment: "getMainIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getMainToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getNextNonce", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getOwner", values?: undefined): string; + encodeFunctionData(functionFragment: "getPausedState", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolId", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeesCollector", values?: undefined): string; + encodeFunctionData(functionFragment: "getRate", values?: undefined): string; + encodeFunctionData(functionFragment: "getScalingFactors", values?: undefined): string; + encodeFunctionData(functionFragment: "getSwapFeePercentage", values?: undefined): string; + encodeFunctionData(functionFragment: "getTargets", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "getVirtualSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedTokenRate", values?: undefined): string; + encodeFunctionData(functionFragment: "inRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "initialize", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "onExitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onJoinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)", values: [ + IPoolSwapStructs$5.SwapRequestStruct, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)", values: [ + IPoolSwapStructs$5.SwapRequestStruct, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData(functionFragment: "permit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryExit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryJoin", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "setSwapFeePercentage", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setTargets", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unpause", values?: undefined): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "enableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBptIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDomainSeparator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMainIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMainToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getNextNonce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPausedState", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeesCollector", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getScalingFactors", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTargets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVirtualSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedTokenRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "inRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onExitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onJoinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryExit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setTargets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "PausedStateChanged(bool)": EventFragment; + "RecoveryModeStateChanged(bool)": EventFragment; + "SwapFeePercentageChanged(uint256)": EventFragment; + "TargetsSet(address,uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PausedStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RecoveryModeStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SwapFeePercentageChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TargetsSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +interface ApprovalEventObject$6 { + owner: string; + spender: string; + value: BigNumber$1; +} +type ApprovalEvent$6 = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject$6>; +type ApprovalEventFilter$6 = TypedEventFilter; +interface PausedStateChangedEventObject$6 { + paused: boolean; +} +type PausedStateChangedEvent$6 = TypedEvent<[ + boolean +], PausedStateChangedEventObject$6>; +type PausedStateChangedEventFilter$6 = TypedEventFilter; +interface RecoveryModeStateChangedEventObject$2 { + enabled: boolean; +} +type RecoveryModeStateChangedEvent$2 = TypedEvent<[ + boolean +], RecoveryModeStateChangedEventObject$2>; +type RecoveryModeStateChangedEventFilter$2 = TypedEventFilter; +interface SwapFeePercentageChangedEventObject$5 { + swapFeePercentage: BigNumber$1; +} +type SwapFeePercentageChangedEvent$5 = TypedEvent<[ + BigNumber$1 +], SwapFeePercentageChangedEventObject$5>; +type SwapFeePercentageChangedEventFilter$5 = TypedEventFilter; +interface TargetsSetEventObject$2 { + token: string; + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; +} +type TargetsSetEvent$2 = TypedEvent<[ + string, + BigNumber$1, + BigNumber$1 +], TargetsSetEventObject$2>; +type TargetsSetEventFilter$2 = TypedEventFilter; +interface TransferEventObject$6 { + from: string; + to: string; + value: BigNumber$1; +} +type TransferEvent$6 = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject$6>; +type TransferEventFilter$6 = TypedEventFilter; +declare namespace GearboxLinearPool { + type ConstructorArgsStruct = { + vault: PromiseOrValue; + name: PromiseOrValue; + symbol: PromiseOrValue; + mainToken: PromiseOrValue; + wrappedToken: PromiseOrValue; + assetManager: PromiseOrValue; + upperTarget: PromiseOrValue; + swapFeePercentage: PromiseOrValue; + pauseWindowDuration: PromiseOrValue; + bufferPeriodDuration: PromiseOrValue; + owner: PromiseOrValue; + version: PromiseOrValue; + }; + type ConstructorArgsStructOutput = [ + string, + string, + string, + string, + string, + string, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + string, + string + ] & { + vault: string; + name: string; + symbol: string; + mainToken: string; + wrappedToken: string; + assetManager: string; + upperTarget: BigNumber$1; + swapFeePercentage: BigNumber$1; + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + owner: string; + version: string; + }; +} +interface GearboxLinearPool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: GearboxLinearPoolInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getBptIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getDomainSeparator(overrides?: CallOverrides): Promise<[string]>; + getMainIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getMainToken(overrides?: CallOverrides): Promise<[string]>; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + getOwner(overrides?: CallOverrides): Promise<[string]>; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeesCollector(overrides?: CallOverrides): Promise<[string]>; + getRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getScalingFactors(overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getSwapFeePercentage(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise<[string]>; + getVirtualSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getWrappedIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getWrappedToken(overrides?: CallOverrides): Promise<[string]>; + getWrappedTokenRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + inRecoveryMode(overrides?: CallOverrides): Promise<[boolean]>; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise<[string]>; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$5.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$5.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise<[string]>; + }; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$5.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$5.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + disableRecoveryMode(overrides?: CallOverrides): Promise; + enableRecoveryMode(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsOut: BigNumber$1[]; + dueProtocolFees: BigNumber$1[]; + }>; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsIn: BigNumber$1[]; + dueProtocolFees: BigNumber$1[]; + }>; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$5.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$5.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: CallOverrides): Promise; + pause(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptIn: BigNumber$1; + amountsOut: BigNumber$1[]; + }>; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptOut: BigNumber$1; + amountsIn: BigNumber$1[]; + }>; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: CallOverrides): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + unpause(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$6; + Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$6; + "PausedStateChanged(bool)"(paused?: null): PausedStateChangedEventFilter$6; + PausedStateChanged(paused?: null): PausedStateChangedEventFilter$6; + "RecoveryModeStateChanged(bool)"(enabled?: null): RecoveryModeStateChangedEventFilter$2; + RecoveryModeStateChanged(enabled?: null): RecoveryModeStateChangedEventFilter$2; + "SwapFeePercentageChanged(uint256)"(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$5; + SwapFeePercentageChanged(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$5; + "TargetsSet(address,uint256,uint256)"(token?: PromiseOrValue | null, lowerTarget?: null, upperTarget?: null): TargetsSetEventFilter$2; + TargetsSet(token?: PromiseOrValue | null, lowerTarget?: null, upperTarget?: null): TargetsSetEventFilter$2; + "Transfer(address,address,uint256)"(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$6; + Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$6; + }; + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$5.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$5.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$5.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$5.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + }; +} + +interface GearboxLinearPoolFactoryInterface extends utils.Interface { + functions: { + "create(string,string,address,address,uint256,uint256,address,uint256,bytes32)": FunctionFragment; + "disable()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getCreationCode()": FunctionFragment; + "getCreationCodeContracts()": FunctionFragment; + "getLastCreatedPool()": FunctionFragment; + "getPauseConfiguration()": FunctionFragment; + "getPoolVersion()": FunctionFragment; + "getProtocolFeePercentagesProvider()": FunctionFragment; + "getVault()": FunctionFragment; + "isDisabled()": FunctionFragment; + "isPoolFromFactory(address)": FunctionFragment; + "version()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "create" | "disable" | "getActionId" | "getAuthorizer" | "getCreationCode" | "getCreationCodeContracts" | "getLastCreatedPool" | "getPauseConfiguration" | "getPoolVersion" | "getProtocolFeePercentagesProvider" | "getVault" | "isDisabled" | "isPoolFromFactory" | "version"): FunctionFragment; + encodeFunctionData(functionFragment: "create", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "disable", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCode", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCodeContracts", values?: undefined): string; + encodeFunctionData(functionFragment: "getLastCreatedPool", values?: undefined): string; + encodeFunctionData(functionFragment: "getPauseConfiguration", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolVersion", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeePercentagesProvider", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "isDisabled", values?: undefined): string; + encodeFunctionData(functionFragment: "isPoolFromFactory", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + decodeFunctionResult(functionFragment: "create", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disable", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCodeContracts", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLastCreatedPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPauseConfiguration", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolVersion", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeePercentagesProvider", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isDisabled", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isPoolFromFactory", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + events: { + "FactoryDisabled()": EventFragment; + "GearboxLinearPoolCreated(address,uint256)": EventFragment; + "PoolCreated(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "FactoryDisabled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GearboxLinearPoolCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolCreated"): EventFragment; +} +interface FactoryDisabledEventObject$2 { +} +type FactoryDisabledEvent$2 = TypedEvent<[], FactoryDisabledEventObject$2>; +type FactoryDisabledEventFilter$2 = TypedEventFilter; +interface GearboxLinearPoolCreatedEventObject { + pool: string; + protocolId: BigNumber$1; +} +type GearboxLinearPoolCreatedEvent = TypedEvent<[ + string, + BigNumber$1 +], GearboxLinearPoolCreatedEventObject>; +type GearboxLinearPoolCreatedEventFilter = TypedEventFilter; +interface PoolCreatedEventObject$2 { + pool: string; +} +type PoolCreatedEvent$2 = TypedEvent<[string], PoolCreatedEventObject$2>; +type PoolCreatedEventFilter$2 = TypedEventFilter; +interface GearboxLinearPoolFactory extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: GearboxLinearPoolFactoryInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getCreationCode(overrides?: CallOverrides): Promise<[string]>; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise<[string]>; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise<[string]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + isDisabled(overrides?: CallOverrides): Promise<[boolean]>; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + version(overrides?: CallOverrides): Promise<[string]>; + }; + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + callStatic: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: CallOverrides): Promise; + disable(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + filters: { + "FactoryDisabled()"(): FactoryDisabledEventFilter$2; + FactoryDisabled(): FactoryDisabledEventFilter$2; + "GearboxLinearPoolCreated(address,uint256)"(pool?: PromiseOrValue | null, protocolId?: PromiseOrValue | null): GearboxLinearPoolCreatedEventFilter; + GearboxLinearPoolCreated(pool?: PromiseOrValue | null, protocolId?: PromiseOrValue | null): GearboxLinearPoolCreatedEventFilter; + "PoolCreated(address)"(pool?: PromiseOrValue | null): PoolCreatedEventFilter$2; + PoolCreated(pool?: PromiseOrValue | null): PoolCreatedEventFilter$2; + }; + estimateGas: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; +} + +interface GyroConfigInterface extends utils.Interface { + functions: { + "acceptGovernance()": FunctionFragment; + "changeGovernor(address)": FunctionFragment; + "freeze(bytes32)": FunctionFragment; + "getAddress(bytes32,address)": FunctionFragment; + "getAddress(bytes32)": FunctionFragment; + "getConfigMeta(bytes32)": FunctionFragment; + "getUint(bytes32)": FunctionFragment; + "governor()": FunctionFragment; + "hasKey(bytes32)": FunctionFragment; + "initialize(address)": FunctionFragment; + "listKeys()": FunctionFragment; + "pendingGovernor()": FunctionFragment; + "setAddress(bytes32,address)": FunctionFragment; + "setUint(bytes32,uint256)": FunctionFragment; + "unset(bytes32)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "acceptGovernance" | "changeGovernor" | "freeze" | "getAddress(bytes32,address)" | "getAddress(bytes32)" | "getConfigMeta" | "getUint" | "governor" | "hasKey" | "initialize" | "listKeys" | "pendingGovernor" | "setAddress" | "setUint" | "unset"): FunctionFragment; + encodeFunctionData(functionFragment: "acceptGovernance", values?: undefined): string; + encodeFunctionData(functionFragment: "changeGovernor", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "freeze", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAddress(bytes32,address)", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAddress(bytes32)", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getConfigMeta", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getUint", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "governor", values?: undefined): string; + encodeFunctionData(functionFragment: "hasKey", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "initialize", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "listKeys", values?: undefined): string; + encodeFunctionData(functionFragment: "pendingGovernor", values?: undefined): string; + encodeFunctionData(functionFragment: "setAddress", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setUint", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "unset", values: [PromiseOrValue]): string; + decodeFunctionResult(functionFragment: "acceptGovernance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "changeGovernor", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "freeze", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAddress(bytes32,address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAddress(bytes32)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getConfigMeta", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getUint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "governor", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasKey", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "listKeys", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pendingGovernor", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setUint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unset", data: BytesLike): Result; + events: { + "ConfigChanged(bytes32,uint256,uint256)": EventFragment; + "ConfigFrozen(bytes32)": EventFragment; + "ConfigUnset(bytes32)": EventFragment; + "GovernorChangeRequested(address)": EventFragment; + "GovernorChanged(address,address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "ConfigChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ConfigFrozen"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ConfigUnset"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GovernorChangeRequested"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GovernorChanged"): EventFragment; +} +interface ConfigChangedEventObject { + key: string; + previousValue: BigNumber$1; + newValue: BigNumber$1; +} +type ConfigChangedEvent = TypedEvent<[ + string, + BigNumber$1, + BigNumber$1 +], ConfigChangedEventObject>; +type ConfigChangedEventFilter = TypedEventFilter; +interface ConfigFrozenEventObject { + key: string; +} +type ConfigFrozenEvent = TypedEvent<[string], ConfigFrozenEventObject>; +type ConfigFrozenEventFilter = TypedEventFilter; +interface ConfigUnsetEventObject { + key: string; +} +type ConfigUnsetEvent = TypedEvent<[string], ConfigUnsetEventObject>; +type ConfigUnsetEventFilter = TypedEventFilter; +interface GovernorChangeRequestedEventObject { + newGovernor: string; +} +type GovernorChangeRequestedEvent = TypedEvent<[ + string +], GovernorChangeRequestedEventObject>; +type GovernorChangeRequestedEventFilter = TypedEventFilter; +interface GovernorChangedEventObject { + oldGovernor: string; + newGovernor: string; +} +type GovernorChangedEvent = TypedEvent<[ + string, + string +], GovernorChangedEventObject>; +type GovernorChangedEventFilter = TypedEventFilter; +interface GyroConfig extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: GyroConfigInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + acceptGovernance(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + changeGovernor(newGovernor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + freeze(key: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "getAddress(bytes32,address)"(key: PromiseOrValue, defaultValue: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + "getAddress(bytes32)"(key: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getConfigMeta(key: PromiseOrValue, overrides?: CallOverrides): Promise<[number, boolean]>; + getUint(key: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + governor(overrides?: CallOverrides): Promise<[string]>; + hasKey(key: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + initialize(_governor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + listKeys(overrides?: CallOverrides): Promise<[string[]]>; + pendingGovernor(overrides?: CallOverrides): Promise<[string]>; + setAddress(key: PromiseOrValue, newValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setUint(key: PromiseOrValue, newValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unset(key: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + acceptGovernance(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + changeGovernor(newGovernor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + freeze(key: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "getAddress(bytes32,address)"(key: PromiseOrValue, defaultValue: PromiseOrValue, overrides?: CallOverrides): Promise; + "getAddress(bytes32)"(key: PromiseOrValue, overrides?: CallOverrides): Promise; + getConfigMeta(key: PromiseOrValue, overrides?: CallOverrides): Promise<[number, boolean]>; + getUint(key: PromiseOrValue, overrides?: CallOverrides): Promise; + governor(overrides?: CallOverrides): Promise; + hasKey(key: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(_governor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + listKeys(overrides?: CallOverrides): Promise; + pendingGovernor(overrides?: CallOverrides): Promise; + setAddress(key: PromiseOrValue, newValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setUint(key: PromiseOrValue, newValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unset(key: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + acceptGovernance(overrides?: CallOverrides): Promise; + changeGovernor(newGovernor: PromiseOrValue, overrides?: CallOverrides): Promise; + freeze(key: PromiseOrValue, overrides?: CallOverrides): Promise; + "getAddress(bytes32,address)"(key: PromiseOrValue, defaultValue: PromiseOrValue, overrides?: CallOverrides): Promise; + "getAddress(bytes32)"(key: PromiseOrValue, overrides?: CallOverrides): Promise; + getConfigMeta(key: PromiseOrValue, overrides?: CallOverrides): Promise<[number, boolean]>; + getUint(key: PromiseOrValue, overrides?: CallOverrides): Promise; + governor(overrides?: CallOverrides): Promise; + hasKey(key: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(_governor: PromiseOrValue, overrides?: CallOverrides): Promise; + listKeys(overrides?: CallOverrides): Promise; + pendingGovernor(overrides?: CallOverrides): Promise; + setAddress(key: PromiseOrValue, newValue: PromiseOrValue, overrides?: CallOverrides): Promise; + setUint(key: PromiseOrValue, newValue: PromiseOrValue, overrides?: CallOverrides): Promise; + unset(key: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: { + "ConfigChanged(bytes32,uint256,uint256)"(key?: null, previousValue?: null, newValue?: null): ConfigChangedEventFilter; + ConfigChanged(key?: null, previousValue?: null, newValue?: null): ConfigChangedEventFilter; + "ConfigFrozen(bytes32)"(key?: null): ConfigFrozenEventFilter; + ConfigFrozen(key?: null): ConfigFrozenEventFilter; + "ConfigUnset(bytes32)"(key?: null): ConfigUnsetEventFilter; + ConfigUnset(key?: null): ConfigUnsetEventFilter; + "GovernorChangeRequested(address)"(newGovernor?: null): GovernorChangeRequestedEventFilter; + GovernorChangeRequested(newGovernor?: null): GovernorChangeRequestedEventFilter; + "GovernorChanged(address,address)"(oldGovernor?: null, newGovernor?: null): GovernorChangedEventFilter; + GovernorChanged(oldGovernor?: null, newGovernor?: null): GovernorChangedEventFilter; + }; + estimateGas: { + acceptGovernance(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + changeGovernor(newGovernor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + freeze(key: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "getAddress(bytes32,address)"(key: PromiseOrValue, defaultValue: PromiseOrValue, overrides?: CallOverrides): Promise; + "getAddress(bytes32)"(key: PromiseOrValue, overrides?: CallOverrides): Promise; + getConfigMeta(key: PromiseOrValue, overrides?: CallOverrides): Promise; + getUint(key: PromiseOrValue, overrides?: CallOverrides): Promise; + governor(overrides?: CallOverrides): Promise; + hasKey(key: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(_governor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + listKeys(overrides?: CallOverrides): Promise; + pendingGovernor(overrides?: CallOverrides): Promise; + setAddress(key: PromiseOrValue, newValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setUint(key: PromiseOrValue, newValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unset(key: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + acceptGovernance(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + changeGovernor(newGovernor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + freeze(key: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "getAddress(bytes32,address)"(key: PromiseOrValue, defaultValue: PromiseOrValue, overrides?: CallOverrides): Promise; + "getAddress(bytes32)"(key: PromiseOrValue, overrides?: CallOverrides): Promise; + getConfigMeta(key: PromiseOrValue, overrides?: CallOverrides): Promise; + getUint(key: PromiseOrValue, overrides?: CallOverrides): Promise; + governor(overrides?: CallOverrides): Promise; + hasKey(key: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(_governor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + listKeys(overrides?: CallOverrides): Promise; + pendingGovernor(overrides?: CallOverrides): Promise; + setAddress(key: PromiseOrValue, newValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setUint(key: PromiseOrValue, newValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unset(key: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +declare namespace IVault$1 { + type BatchSwapStepStruct = { + poolId: PromiseOrValue; + assetInIndex: PromiseOrValue; + assetOutIndex: PromiseOrValue; + amount: PromiseOrValue; + userData: PromiseOrValue; + }; + type BatchSwapStepStructOutput = [ + string, + BigNumber$1, + BigNumber$1, + BigNumber$1, + string + ] & { + poolId: string; + assetInIndex: BigNumber$1; + assetOutIndex: BigNumber$1; + amount: BigNumber$1; + userData: string; + }; + type FundManagementStruct = { + sender: PromiseOrValue; + fromInternalBalance: PromiseOrValue; + recipient: PromiseOrValue; + toInternalBalance: PromiseOrValue; + }; + type FundManagementStructOutput = [ + string, + boolean, + string, + boolean + ] & { + sender: string; + fromInternalBalance: boolean; + recipient: string; + toInternalBalance: boolean; + }; + type ExitPoolRequestStruct = { + assets: PromiseOrValue[]; + minAmountsOut: PromiseOrValue[]; + userData: PromiseOrValue; + toInternalBalance: PromiseOrValue; + }; + type ExitPoolRequestStructOutput = [ + string[], + BigNumber$1[], + string, + boolean + ] & { + assets: string[]; + minAmountsOut: BigNumber$1[]; + userData: string; + toInternalBalance: boolean; + }; + type JoinPoolRequestStruct = { + assets: PromiseOrValue[]; + maxAmountsIn: PromiseOrValue[]; + userData: PromiseOrValue; + fromInternalBalance: PromiseOrValue; + }; + type JoinPoolRequestStructOutput = [ + string[], + BigNumber$1[], + string, + boolean + ] & { + assets: string[]; + maxAmountsIn: BigNumber$1[]; + userData: string; + fromInternalBalance: boolean; + }; + type SingleSwapStruct = { + poolId: PromiseOrValue; + kind: PromiseOrValue; + assetIn: PromiseOrValue; + assetOut: PromiseOrValue; + amount: PromiseOrValue; + userData: PromiseOrValue; + }; + type SingleSwapStructOutput = [ + string, + number, + string, + string, + BigNumber$1, + string + ] & { + poolId: string; + kind: number; + assetIn: string; + assetOut: string; + amount: BigNumber$1; + userData: string; + }; +} +interface LidoRelayerInterface extends utils.Interface { + functions: { + "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": FunctionFragment; + "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": FunctionFragment; + "getStETH()": FunctionFragment; + "getVault()": FunctionFragment; + "getWstETH()": FunctionFragment; + "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": FunctionFragment; + "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "batchSwap" | "exitPool" | "getStETH" | "getVault" | "getWstETH" | "joinPool" | "swap"): FunctionFragment; + encodeFunctionData(functionFragment: "batchSwap", values: [ + PromiseOrValue, + IVault$1.BatchSwapStepStruct[], + PromiseOrValue[], + IVault$1.FundManagementStruct, + PromiseOrValue[], + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "exitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + IVault$1.ExitPoolRequestStruct + ]): string; + encodeFunctionData(functionFragment: "getStETH", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "getWstETH", values?: undefined): string; + encodeFunctionData(functionFragment: "joinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + IVault$1.JoinPoolRequestStruct + ]): string; + encodeFunctionData(functionFragment: "swap", values: [ + IVault$1.SingleSwapStruct, + IVault$1.FundManagementStruct, + PromiseOrValue, + PromiseOrValue + ]): string; + decodeFunctionResult(functionFragment: "batchSwap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getStETH", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWstETH", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "joinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; + events: {}; +} +interface LidoRelayer extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: LidoRelayerInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + batchSwap(kind: PromiseOrValue, swaps: IVault$1.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault$1.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + exitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$1.ExitPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getStETH(overrides?: CallOverrides): Promise<[string]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + getWstETH(overrides?: CallOverrides): Promise<[string]>; + joinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$1.JoinPoolRequestStruct, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + swap(singleSwap: IVault$1.SingleSwapStruct, funds: IVault$1.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; + batchSwap(kind: PromiseOrValue, swaps: IVault$1.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault$1.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + exitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$1.ExitPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getStETH(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getWstETH(overrides?: CallOverrides): Promise; + joinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$1.JoinPoolRequestStruct, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + swap(singleSwap: IVault$1.SingleSwapStruct, funds: IVault$1.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + batchSwap(kind: PromiseOrValue, swaps: IVault$1.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault$1.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, overrides?: CallOverrides): Promise; + exitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$1.ExitPoolRequestStruct, overrides?: CallOverrides): Promise; + getStETH(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getWstETH(overrides?: CallOverrides): Promise; + joinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$1.JoinPoolRequestStruct, overrides?: CallOverrides): Promise; + swap(singleSwap: IVault$1.SingleSwapStruct, funds: IVault$1.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + batchSwap(kind: PromiseOrValue, swaps: IVault$1.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault$1.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + exitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$1.ExitPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getStETH(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getWstETH(overrides?: CallOverrides): Promise; + joinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$1.JoinPoolRequestStruct, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + swap(singleSwap: IVault$1.SingleSwapStruct, funds: IVault$1.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + batchSwap(kind: PromiseOrValue, swaps: IVault$1.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault$1.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + exitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$1.ExitPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getStETH(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getWstETH(overrides?: CallOverrides): Promise; + joinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault$1.JoinPoolRequestStruct, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + swap(singleSwap: IVault$1.SingleSwapStruct, funds: IVault$1.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +declare namespace IPoolSwapStructs$4 { + type SwapRequestStruct = { + kind: PromiseOrValue; + tokenIn: PromiseOrValue; + tokenOut: PromiseOrValue; + amount: PromiseOrValue; + poolId: PromiseOrValue; + lastChangeBlock: PromiseOrValue; + from: PromiseOrValue; + to: PromiseOrValue; + userData: PromiseOrValue; + }; + type SwapRequestStructOutput = [ + number, + string, + string, + BigNumber$1, + string, + BigNumber$1, + string, + string, + string + ] & { + kind: number; + tokenIn: string; + tokenOut: string; + amount: BigNumber$1; + poolId: string; + lastChangeBlock: BigNumber$1; + from: string; + to: string; + userData: string; + }; +} +interface LinearPoolInterface$1 extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getBptIndex()": FunctionFragment; + "getMainIndex()": FunctionFragment; + "getMainToken()": FunctionFragment; + "getOwner()": FunctionFragment; + "getPausedState()": FunctionFragment; + "getPoolId()": FunctionFragment; + "getRate()": FunctionFragment; + "getScalingFactors()": FunctionFragment; + "getSwapFeePercentage()": FunctionFragment; + "getTargets()": FunctionFragment; + "getVault()": FunctionFragment; + "getVirtualSupply()": FunctionFragment; + "getWrappedIndex()": FunctionFragment; + "getWrappedToken()": FunctionFragment; + "getWrappedTokenRate()": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "initialize()": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "setAssetManagerPoolConfig(address,bytes)": FunctionFragment; + "setPaused(bool)": FunctionFragment; + "setSwapFeePercentage(uint256)": FunctionFragment; + "setTargets(uint256,uint256)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "allowance" | "approve" | "balanceOf" | "decimals" | "decreaseAllowance" | "getActionId" | "getAuthorizer" | "getBptIndex" | "getMainIndex" | "getMainToken" | "getOwner" | "getPausedState" | "getPoolId" | "getRate" | "getScalingFactors" | "getSwapFeePercentage" | "getTargets" | "getVault" | "getVirtualSupply" | "getWrappedIndex" | "getWrappedToken" | "getWrappedTokenRate" | "increaseAllowance" | "initialize" | "name" | "nonces" | "onExitPool" | "onJoinPool" | "onSwap" | "permit" | "queryExit" | "queryJoin" | "setAssetManagerPoolConfig" | "setPaused" | "setSwapFeePercentage" | "setTargets" | "symbol" | "totalSupply" | "transfer" | "transferFrom"): FunctionFragment; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getBptIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getMainIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getMainToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getOwner", values?: undefined): string; + encodeFunctionData(functionFragment: "getPausedState", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolId", values?: undefined): string; + encodeFunctionData(functionFragment: "getRate", values?: undefined): string; + encodeFunctionData(functionFragment: "getScalingFactors", values?: undefined): string; + encodeFunctionData(functionFragment: "getSwapFeePercentage", values?: undefined): string; + encodeFunctionData(functionFragment: "getTargets", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "getVirtualSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedTokenRate", values?: undefined): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "initialize", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "onExitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onJoinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap", values: [ + IPoolSwapStructs$4.SwapRequestStruct, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "permit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryExit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryJoin", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "setAssetManagerPoolConfig", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setPaused", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setSwapFeePercentage", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setTargets", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBptIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMainIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMainToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPausedState", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getScalingFactors", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTargets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVirtualSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedTokenRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onExitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onJoinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryExit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setAssetManagerPoolConfig", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setPaused", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setTargets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "PausedStateChanged(bool)": EventFragment; + "SwapFeePercentageChanged(uint256)": EventFragment; + "TargetsSet(address,uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PausedStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SwapFeePercentageChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TargetsSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +interface ApprovalEventObject$5 { + owner: string; + spender: string; + value: BigNumber$1; +} +type ApprovalEvent$5 = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject$5>; +type ApprovalEventFilter$5 = TypedEventFilter; +interface PausedStateChangedEventObject$5 { + paused: boolean; +} +type PausedStateChangedEvent$5 = TypedEvent<[ + boolean +], PausedStateChangedEventObject$5>; +type PausedStateChangedEventFilter$5 = TypedEventFilter; +interface SwapFeePercentageChangedEventObject$4 { + swapFeePercentage: BigNumber$1; +} +type SwapFeePercentageChangedEvent$4 = TypedEvent<[ + BigNumber$1 +], SwapFeePercentageChangedEventObject$4>; +type SwapFeePercentageChangedEventFilter$4 = TypedEventFilter; +interface TargetsSetEventObject$1 { + token: string; + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; +} +type TargetsSetEvent$1 = TypedEvent<[ + string, + BigNumber$1, + BigNumber$1 +], TargetsSetEventObject$1>; +type TargetsSetEventFilter$1 = TypedEventFilter; +interface TransferEventObject$5 { + from: string; + to: string; + value: BigNumber$1; +} +type TransferEvent$5 = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject$5>; +type TransferEventFilter$5 = TypedEventFilter; +interface LinearPool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: LinearPoolInterface$1; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getBptIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getMainIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getMainToken(overrides?: CallOverrides): Promise<[string]>; + getOwner(overrides?: CallOverrides): Promise<[string]>; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise<[string]>; + getRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getScalingFactors(overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getSwapFeePercentage(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise<[string]>; + getVirtualSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getWrappedIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getWrappedToken(overrides?: CallOverrides): Promise<[string]>; + getWrappedTokenRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise<[string]>; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(request: IPoolSwapStructs$4.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(request: IPoolSwapStructs$4.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1[], BigNumber$1[]]>; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1[], BigNumber$1[]]>; + onSwap(request: IPoolSwapStructs$4.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptIn: BigNumber$1; + amountsOut: BigNumber$1[]; + }>; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptOut: BigNumber$1; + amountsIn: BigNumber$1[]; + }>; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: CallOverrides): Promise; + setPaused(paused: PromiseOrValue, overrides?: CallOverrides): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: CallOverrides): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$5; + Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$5; + "PausedStateChanged(bool)"(paused?: null): PausedStateChangedEventFilter$5; + PausedStateChanged(paused?: null): PausedStateChangedEventFilter$5; + "SwapFeePercentageChanged(uint256)"(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$4; + SwapFeePercentageChanged(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$4; + "TargetsSet(address,uint256,uint256)"(token?: PromiseOrValue | null, lowerTarget?: null, upperTarget?: null): TargetsSetEventFilter$1; + TargetsSet(token?: PromiseOrValue | null, lowerTarget?: null, upperTarget?: null): TargetsSetEventFilter$1; + "Transfer(address,address,uint256)"(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$5; + Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$5; + }; + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(request: IPoolSwapStructs$4.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(request: IPoolSwapStructs$4.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +interface LiquidityGaugeV5Interface extends utils.Interface { + functions: { + "deposit(uint256)": FunctionFragment; + "deposit(uint256,address)": FunctionFragment; + "deposit(uint256,address,bool)": FunctionFragment; + "withdraw(uint256)": FunctionFragment; + "withdraw(uint256,bool)": FunctionFragment; + "claim_rewards()": FunctionFragment; + "claim_rewards(address)": FunctionFragment; + "claim_rewards(address,address)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "user_checkpoint(address)": FunctionFragment; + "set_rewards_receiver(address)": FunctionFragment; + "kick(address)": FunctionFragment; + "deposit_reward_token(address,uint256)": FunctionFragment; + "add_reward(address,address)": FunctionFragment; + "set_reward_distributor(address,address)": FunctionFragment; + "set_killed(bool)": FunctionFragment; + "claimed_reward(address,address)": FunctionFragment; + "claimable_reward(address,address)": FunctionFragment; + "claimable_reward_write(address,address)": FunctionFragment; + "claimable_tokens(address)": FunctionFragment; + "integrate_checkpoint()": FunctionFragment; + "future_epoch_time()": FunctionFragment; + "inflation_rate()": FunctionFragment; + "decimals()": FunctionFragment; + "version()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "initialize(address)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "totalSupply()": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "DOMAIN_SEPARATOR()": FunctionFragment; + "nonces(address)": FunctionFragment; + "factory()": FunctionFragment; + "lp_token()": FunctionFragment; + "is_killed()": FunctionFragment; + "reward_count()": FunctionFragment; + "reward_data(address)": FunctionFragment; + "rewards_receiver(address)": FunctionFragment; + "reward_integral_for(address,address)": FunctionFragment; + "working_balances(address)": FunctionFragment; + "working_supply()": FunctionFragment; + "integrate_inv_supply_of(address)": FunctionFragment; + "integrate_checkpoint_of(address)": FunctionFragment; + "integrate_fraction(address)": FunctionFragment; + "period()": FunctionFragment; + "reward_tokens(uint256)": FunctionFragment; + "period_timestamp(uint256)": FunctionFragment; + "integrate_inv_supply(uint256)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "deposit(uint256)" | "deposit(uint256,address)" | "deposit(uint256,address,bool)" | "withdraw(uint256)" | "withdraw(uint256,bool)" | "claim_rewards()" | "claim_rewards(address)" | "claim_rewards(address,address)" | "transferFrom" | "transfer" | "approve" | "permit" | "increaseAllowance" | "decreaseAllowance" | "user_checkpoint" | "set_rewards_receiver" | "kick" | "deposit_reward_token" | "add_reward" | "set_reward_distributor" | "set_killed" | "claimed_reward" | "claimable_reward" | "claimable_reward_write" | "claimable_tokens" | "integrate_checkpoint" | "future_epoch_time" | "inflation_rate" | "decimals" | "version" | "allowance" | "initialize" | "balanceOf" | "totalSupply" | "name" | "symbol" | "DOMAIN_SEPARATOR" | "nonces" | "factory" | "lp_token" | "is_killed" | "reward_count" | "reward_data" | "rewards_receiver" | "reward_integral_for" | "working_balances" | "working_supply" | "integrate_inv_supply_of" | "integrate_checkpoint_of" | "integrate_fraction" | "period" | "reward_tokens" | "period_timestamp" | "integrate_inv_supply"): FunctionFragment; + encodeFunctionData(functionFragment: "deposit(uint256)", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "deposit(uint256,address)", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "deposit(uint256,address,bool)", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "withdraw(uint256)", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "withdraw(uint256,bool)", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "claim_rewards()", values?: undefined): string; + encodeFunctionData(functionFragment: "claim_rewards(address)", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "claim_rewards(address,address)", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "permit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "user_checkpoint", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "set_rewards_receiver", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "kick", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "deposit_reward_token", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "add_reward", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "set_reward_distributor", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "set_killed", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "claimed_reward", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "claimable_reward", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "claimable_reward_write", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "claimable_tokens", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "integrate_checkpoint", values?: undefined): string; + encodeFunctionData(functionFragment: "future_epoch_time", values?: undefined): string; + encodeFunctionData(functionFragment: "inflation_rate", values?: undefined): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "initialize", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "factory", values?: undefined): string; + encodeFunctionData(functionFragment: "lp_token", values?: undefined): string; + encodeFunctionData(functionFragment: "is_killed", values?: undefined): string; + encodeFunctionData(functionFragment: "reward_count", values?: undefined): string; + encodeFunctionData(functionFragment: "reward_data", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "rewards_receiver", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "reward_integral_for", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "working_balances", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "working_supply", values?: undefined): string; + encodeFunctionData(functionFragment: "integrate_inv_supply_of", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "integrate_checkpoint_of", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "integrate_fraction", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "period", values?: undefined): string; + encodeFunctionData(functionFragment: "reward_tokens", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "period_timestamp", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "integrate_inv_supply", values: [PromiseOrValue]): string; + decodeFunctionResult(functionFragment: "deposit(uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deposit(uint256,address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deposit(uint256,address,bool)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdraw(uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdraw(uint256,bool)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim_rewards()", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim_rewards(address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim_rewards(address,address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "user_checkpoint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "set_rewards_receiver", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "kick", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deposit_reward_token", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "add_reward", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "set_reward_distributor", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "set_killed", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claimed_reward", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claimable_reward", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claimable_reward_write", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claimable_tokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "integrate_checkpoint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "future_epoch_time", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "inflation_rate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "lp_token", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "is_killed", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "reward_count", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "reward_data", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "rewards_receiver", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "reward_integral_for", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "working_balances", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "working_supply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "integrate_inv_supply_of", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "integrate_checkpoint_of", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "integrate_fraction", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "period", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "reward_tokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "period_timestamp", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "integrate_inv_supply", data: BytesLike): Result; + events: { + "Deposit(address,uint256)": EventFragment; + "Withdraw(address,uint256)": EventFragment; + "UpdateLiquidityLimit(address,uint256,uint256,uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + "Approval(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Deposit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdraw"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UpdateLiquidityLimit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; +} +interface DepositEventObject$1 { + provider: string; + value: BigNumber$1; +} +type DepositEvent$1 = TypedEvent<[string, BigNumber$1], DepositEventObject$1>; +type DepositEventFilter$1 = TypedEventFilter; +interface WithdrawEventObject$1 { + provider: string; + value: BigNumber$1; +} +type WithdrawEvent$1 = TypedEvent<[ + string, + BigNumber$1 +], WithdrawEventObject$1>; +type WithdrawEventFilter$1 = TypedEventFilter; +interface UpdateLiquidityLimitEventObject { + user: string; + original_balance: BigNumber$1; + original_supply: BigNumber$1; + working_balance: BigNumber$1; + working_supply: BigNumber$1; +} +type UpdateLiquidityLimitEvent = TypedEvent<[ + string, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 +], UpdateLiquidityLimitEventObject>; +type UpdateLiquidityLimitEventFilter = TypedEventFilter; +interface TransferEventObject$4 { + _from: string; + _to: string; + _value: BigNumber$1; +} +type TransferEvent$4 = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject$4>; +type TransferEventFilter$4 = TypedEventFilter; +interface ApprovalEventObject$4 { + _owner: string; + _spender: string; + _value: BigNumber$1; +} +type ApprovalEvent$4 = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject$4>; +type ApprovalEventFilter$4 = TypedEventFilter; +interface LiquidityGaugeV5 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: LiquidityGaugeV5Interface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + "deposit(uint256)"(_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "deposit(uint256,address)"(_value: PromiseOrValue, _addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "deposit(uint256,address,bool)"(_value: PromiseOrValue, _addr: PromiseOrValue, _claim_rewards: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "withdraw(uint256)"(_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "withdraw(uint256,bool)"(_value: PromiseOrValue, _claim_rewards: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "claim_rewards()"(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "claim_rewards(address)"(_addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "claim_rewards(address,address)"(_addr: PromiseOrValue, _receiver: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(_from: PromiseOrValue, _to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transfer(_to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + approve(_spender: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(_owner: PromiseOrValue, _spender: PromiseOrValue, _value: PromiseOrValue, _deadline: PromiseOrValue, _v: PromiseOrValue, _r: PromiseOrValue, _s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + increaseAllowance(_spender: PromiseOrValue, _added_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + decreaseAllowance(_spender: PromiseOrValue, _subtracted_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + user_checkpoint(addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + set_rewards_receiver(_receiver: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + kick(addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + deposit_reward_token(_reward_token: PromiseOrValue, _amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + add_reward(_reward_token: PromiseOrValue, _distributor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + set_reward_distributor(_reward_token: PromiseOrValue, _distributor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + set_killed(_is_killed: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + claimed_reward(_addr: PromiseOrValue, _token: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + claimable_reward(_user: PromiseOrValue, _reward_token: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + claimable_reward_write(_addr: PromiseOrValue, _token: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + claimable_tokens(addr: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + integrate_checkpoint(overrides?: CallOverrides): Promise<[BigNumber$1]>; + future_epoch_time(overrides?: CallOverrides): Promise<[BigNumber$1]>; + inflation_rate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + decimals(overrides?: CallOverrides): Promise<[BigNumber$1]>; + version(overrides?: CallOverrides): Promise<[string]>; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + initialize(_lp_token: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + name(overrides?: CallOverrides): Promise<[string]>; + symbol(overrides?: CallOverrides): Promise<[string]>; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + nonces(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + factory(overrides?: CallOverrides): Promise<[string]>; + lp_token(overrides?: CallOverrides): Promise<[string]>; + is_killed(overrides?: CallOverrides): Promise<[boolean]>; + reward_count(overrides?: CallOverrides): Promise<[BigNumber$1]>; + reward_data(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[ + [ + string, + string, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + token: string; + distributor: string; + period_finish: BigNumber$1; + rate: BigNumber$1; + last_update: BigNumber$1; + integral: BigNumber$1; + } + ]>; + rewards_receiver(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + reward_integral_for(arg0: PromiseOrValue, arg1: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + working_balances(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + working_supply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + integrate_inv_supply_of(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + integrate_checkpoint_of(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + integrate_fraction(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + period(overrides?: CallOverrides): Promise<[BigNumber$1]>; + reward_tokens(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + period_timestamp(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + integrate_inv_supply(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + }; + "deposit(uint256)"(_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "deposit(uint256,address)"(_value: PromiseOrValue, _addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "deposit(uint256,address,bool)"(_value: PromiseOrValue, _addr: PromiseOrValue, _claim_rewards: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "withdraw(uint256)"(_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "withdraw(uint256,bool)"(_value: PromiseOrValue, _claim_rewards: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "claim_rewards()"(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "claim_rewards(address)"(_addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "claim_rewards(address,address)"(_addr: PromiseOrValue, _receiver: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(_from: PromiseOrValue, _to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transfer(_to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + approve(_spender: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(_owner: PromiseOrValue, _spender: PromiseOrValue, _value: PromiseOrValue, _deadline: PromiseOrValue, _v: PromiseOrValue, _r: PromiseOrValue, _s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + increaseAllowance(_spender: PromiseOrValue, _added_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + decreaseAllowance(_spender: PromiseOrValue, _subtracted_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + user_checkpoint(addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + set_rewards_receiver(_receiver: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + kick(addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + deposit_reward_token(_reward_token: PromiseOrValue, _amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + add_reward(_reward_token: PromiseOrValue, _distributor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + set_reward_distributor(_reward_token: PromiseOrValue, _distributor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + set_killed(_is_killed: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + claimed_reward(_addr: PromiseOrValue, _token: PromiseOrValue, overrides?: CallOverrides): Promise; + claimable_reward(_user: PromiseOrValue, _reward_token: PromiseOrValue, overrides?: CallOverrides): Promise; + claimable_reward_write(_addr: PromiseOrValue, _token: PromiseOrValue, overrides?: CallOverrides): Promise; + claimable_tokens(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_checkpoint(overrides?: CallOverrides): Promise; + future_epoch_time(overrides?: CallOverrides): Promise; + inflation_rate(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(_lp_token: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + nonces(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + factory(overrides?: CallOverrides): Promise; + lp_token(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + reward_count(overrides?: CallOverrides): Promise; + reward_data(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[ + string, + string, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + token: string; + distributor: string; + period_finish: BigNumber$1; + rate: BigNumber$1; + last_update: BigNumber$1; + integral: BigNumber$1; + }>; + rewards_receiver(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + reward_integral_for(arg0: PromiseOrValue, arg1: PromiseOrValue, overrides?: CallOverrides): Promise; + working_balances(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + working_supply(overrides?: CallOverrides): Promise; + integrate_inv_supply_of(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_checkpoint_of(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_fraction(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + period(overrides?: CallOverrides): Promise; + reward_tokens(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + period_timestamp(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_inv_supply(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + callStatic: { + "deposit(uint256)"(_value: PromiseOrValue, overrides?: CallOverrides): Promise; + "deposit(uint256,address)"(_value: PromiseOrValue, _addr: PromiseOrValue, overrides?: CallOverrides): Promise; + "deposit(uint256,address,bool)"(_value: PromiseOrValue, _addr: PromiseOrValue, _claim_rewards: PromiseOrValue, overrides?: CallOverrides): Promise; + "withdraw(uint256)"(_value: PromiseOrValue, overrides?: CallOverrides): Promise; + "withdraw(uint256,bool)"(_value: PromiseOrValue, _claim_rewards: PromiseOrValue, overrides?: CallOverrides): Promise; + "claim_rewards()"(overrides?: CallOverrides): Promise; + "claim_rewards(address)"(_addr: PromiseOrValue, overrides?: CallOverrides): Promise; + "claim_rewards(address,address)"(_addr: PromiseOrValue, _receiver: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom(_from: PromiseOrValue, _to: PromiseOrValue, _value: PromiseOrValue, overrides?: CallOverrides): Promise; + transfer(_to: PromiseOrValue, _value: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(_spender: PromiseOrValue, _value: PromiseOrValue, overrides?: CallOverrides): Promise; + permit(_owner: PromiseOrValue, _spender: PromiseOrValue, _value: PromiseOrValue, _deadline: PromiseOrValue, _v: PromiseOrValue, _r: PromiseOrValue, _s: PromiseOrValue, overrides?: CallOverrides): Promise; + increaseAllowance(_spender: PromiseOrValue, _added_value: PromiseOrValue, overrides?: CallOverrides): Promise; + decreaseAllowance(_spender: PromiseOrValue, _subtracted_value: PromiseOrValue, overrides?: CallOverrides): Promise; + user_checkpoint(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + set_rewards_receiver(_receiver: PromiseOrValue, overrides?: CallOverrides): Promise; + kick(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + deposit_reward_token(_reward_token: PromiseOrValue, _amount: PromiseOrValue, overrides?: CallOverrides): Promise; + add_reward(_reward_token: PromiseOrValue, _distributor: PromiseOrValue, overrides?: CallOverrides): Promise; + set_reward_distributor(_reward_token: PromiseOrValue, _distributor: PromiseOrValue, overrides?: CallOverrides): Promise; + set_killed(_is_killed: PromiseOrValue, overrides?: CallOverrides): Promise; + claimed_reward(_addr: PromiseOrValue, _token: PromiseOrValue, overrides?: CallOverrides): Promise; + claimable_reward(_user: PromiseOrValue, _reward_token: PromiseOrValue, overrides?: CallOverrides): Promise; + claimable_reward_write(_addr: PromiseOrValue, _token: PromiseOrValue, overrides?: CallOverrides): Promise; + claimable_tokens(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_checkpoint(overrides?: CallOverrides): Promise; + future_epoch_time(overrides?: CallOverrides): Promise; + inflation_rate(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(_lp_token: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + nonces(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + factory(overrides?: CallOverrides): Promise; + lp_token(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + reward_count(overrides?: CallOverrides): Promise; + reward_data(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[ + string, + string, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + token: string; + distributor: string; + period_finish: BigNumber$1; + rate: BigNumber$1; + last_update: BigNumber$1; + integral: BigNumber$1; + }>; + rewards_receiver(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + reward_integral_for(arg0: PromiseOrValue, arg1: PromiseOrValue, overrides?: CallOverrides): Promise; + working_balances(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + working_supply(overrides?: CallOverrides): Promise; + integrate_inv_supply_of(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_checkpoint_of(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_fraction(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + period(overrides?: CallOverrides): Promise; + reward_tokens(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + period_timestamp(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_inv_supply(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: { + "Deposit(address,uint256)"(provider?: PromiseOrValue | null, value?: null): DepositEventFilter$1; + Deposit(provider?: PromiseOrValue | null, value?: null): DepositEventFilter$1; + "Withdraw(address,uint256)"(provider?: PromiseOrValue | null, value?: null): WithdrawEventFilter$1; + Withdraw(provider?: PromiseOrValue | null, value?: null): WithdrawEventFilter$1; + "UpdateLiquidityLimit(address,uint256,uint256,uint256,uint256)"(user?: PromiseOrValue | null, original_balance?: null, original_supply?: null, working_balance?: null, working_supply?: null): UpdateLiquidityLimitEventFilter; + UpdateLiquidityLimit(user?: PromiseOrValue | null, original_balance?: null, original_supply?: null, working_balance?: null, working_supply?: null): UpdateLiquidityLimitEventFilter; + "Transfer(address,address,uint256)"(_from?: PromiseOrValue | null, _to?: PromiseOrValue | null, _value?: null): TransferEventFilter$4; + Transfer(_from?: PromiseOrValue | null, _to?: PromiseOrValue | null, _value?: null): TransferEventFilter$4; + "Approval(address,address,uint256)"(_owner?: PromiseOrValue | null, _spender?: PromiseOrValue | null, _value?: null): ApprovalEventFilter$4; + Approval(_owner?: PromiseOrValue | null, _spender?: PromiseOrValue | null, _value?: null): ApprovalEventFilter$4; + }; + estimateGas: { + "deposit(uint256)"(_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "deposit(uint256,address)"(_value: PromiseOrValue, _addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "deposit(uint256,address,bool)"(_value: PromiseOrValue, _addr: PromiseOrValue, _claim_rewards: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "withdraw(uint256)"(_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "withdraw(uint256,bool)"(_value: PromiseOrValue, _claim_rewards: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "claim_rewards()"(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "claim_rewards(address)"(_addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "claim_rewards(address,address)"(_addr: PromiseOrValue, _receiver: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(_from: PromiseOrValue, _to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transfer(_to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + approve(_spender: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(_owner: PromiseOrValue, _spender: PromiseOrValue, _value: PromiseOrValue, _deadline: PromiseOrValue, _v: PromiseOrValue, _r: PromiseOrValue, _s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + increaseAllowance(_spender: PromiseOrValue, _added_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + decreaseAllowance(_spender: PromiseOrValue, _subtracted_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + user_checkpoint(addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + set_rewards_receiver(_receiver: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + kick(addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + deposit_reward_token(_reward_token: PromiseOrValue, _amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + add_reward(_reward_token: PromiseOrValue, _distributor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + set_reward_distributor(_reward_token: PromiseOrValue, _distributor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + set_killed(_is_killed: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + claimed_reward(_addr: PromiseOrValue, _token: PromiseOrValue, overrides?: CallOverrides): Promise; + claimable_reward(_user: PromiseOrValue, _reward_token: PromiseOrValue, overrides?: CallOverrides): Promise; + claimable_reward_write(_addr: PromiseOrValue, _token: PromiseOrValue, overrides?: CallOverrides): Promise; + claimable_tokens(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_checkpoint(overrides?: CallOverrides): Promise; + future_epoch_time(overrides?: CallOverrides): Promise; + inflation_rate(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(_lp_token: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + nonces(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + factory(overrides?: CallOverrides): Promise; + lp_token(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + reward_count(overrides?: CallOverrides): Promise; + reward_data(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + rewards_receiver(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + reward_integral_for(arg0: PromiseOrValue, arg1: PromiseOrValue, overrides?: CallOverrides): Promise; + working_balances(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + working_supply(overrides?: CallOverrides): Promise; + integrate_inv_supply_of(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_checkpoint_of(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_fraction(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + period(overrides?: CallOverrides): Promise; + reward_tokens(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + period_timestamp(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_inv_supply(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + "deposit(uint256)"(_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "deposit(uint256,address)"(_value: PromiseOrValue, _addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "deposit(uint256,address,bool)"(_value: PromiseOrValue, _addr: PromiseOrValue, _claim_rewards: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "withdraw(uint256)"(_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "withdraw(uint256,bool)"(_value: PromiseOrValue, _claim_rewards: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "claim_rewards()"(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "claim_rewards(address)"(_addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "claim_rewards(address,address)"(_addr: PromiseOrValue, _receiver: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(_from: PromiseOrValue, _to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transfer(_to: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + approve(_spender: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(_owner: PromiseOrValue, _spender: PromiseOrValue, _value: PromiseOrValue, _deadline: PromiseOrValue, _v: PromiseOrValue, _r: PromiseOrValue, _s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + increaseAllowance(_spender: PromiseOrValue, _added_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + decreaseAllowance(_spender: PromiseOrValue, _subtracted_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + user_checkpoint(addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + set_rewards_receiver(_receiver: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + kick(addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + deposit_reward_token(_reward_token: PromiseOrValue, _amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + add_reward(_reward_token: PromiseOrValue, _distributor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + set_reward_distributor(_reward_token: PromiseOrValue, _distributor: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + set_killed(_is_killed: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + claimed_reward(_addr: PromiseOrValue, _token: PromiseOrValue, overrides?: CallOverrides): Promise; + claimable_reward(_user: PromiseOrValue, _reward_token: PromiseOrValue, overrides?: CallOverrides): Promise; + claimable_reward_write(_addr: PromiseOrValue, _token: PromiseOrValue, overrides?: CallOverrides): Promise; + claimable_tokens(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_checkpoint(overrides?: CallOverrides): Promise; + future_epoch_time(overrides?: CallOverrides): Promise; + inflation_rate(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(_lp_token: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + nonces(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + factory(overrides?: CallOverrides): Promise; + lp_token(overrides?: CallOverrides): Promise; + is_killed(overrides?: CallOverrides): Promise; + reward_count(overrides?: CallOverrides): Promise; + reward_data(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + rewards_receiver(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + reward_integral_for(arg0: PromiseOrValue, arg1: PromiseOrValue, overrides?: CallOverrides): Promise; + working_balances(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + working_supply(overrides?: CallOverrides): Promise; + integrate_inv_supply_of(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_checkpoint_of(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_fraction(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + period(overrides?: CallOverrides): Promise; + reward_tokens(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + period_timestamp(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + integrate_inv_supply(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + }; +} + +interface MulticallInterface extends utils.Interface { + functions: { + "aggregate((address,bytes)[])": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "aggregate"): FunctionFragment; + encodeFunctionData(functionFragment: "aggregate", values: [ + { + target: PromiseOrValue; + callData: PromiseOrValue; + }[] + ]): string; + decodeFunctionResult(functionFragment: "aggregate", data: BytesLike): Result; + events: {}; +} +interface Multicall extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: MulticallInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + aggregate(calls: { + target: PromiseOrValue; + callData: PromiseOrValue; + }[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + aggregate(calls: { + target: PromiseOrValue; + callData: PromiseOrValue; + }[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + aggregate(calls: { + target: PromiseOrValue; + callData: PromiseOrValue; + }[], overrides?: CallOverrides): Promise<[ + BigNumber$1, + string[] + ] & { + blockNumber: BigNumber$1; + returnData: string[]; + }>; + }; + filters: {}; + estimateGas: { + aggregate(calls: { + target: PromiseOrValue; + callData: PromiseOrValue; + }[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + aggregate(calls: { + target: PromiseOrValue; + callData: PromiseOrValue; + }[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +interface Multicall3Interface extends utils.Interface { + functions: { + "aggregate((address,bytes)[])": FunctionFragment; + "aggregate3((address,bool,bytes)[])": FunctionFragment; + "aggregate3Value((address,bool,uint256,bytes)[])": FunctionFragment; + "blockAndAggregate((address,bytes)[])": FunctionFragment; + "getBasefee()": FunctionFragment; + "getBlockHash(uint256)": FunctionFragment; + "getBlockNumber()": FunctionFragment; + "getChainId()": FunctionFragment; + "getCurrentBlockCoinbase()": FunctionFragment; + "getCurrentBlockDifficulty()": FunctionFragment; + "getCurrentBlockGasLimit()": FunctionFragment; + "getCurrentBlockTimestamp()": FunctionFragment; + "getEthBalance(address)": FunctionFragment; + "getLastBlockHash()": FunctionFragment; + "tryAggregate(bool,(address,bytes)[])": FunctionFragment; + "tryBlockAndAggregate(bool,(address,bytes)[])": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "aggregate" | "aggregate3" | "aggregate3Value" | "blockAndAggregate" | "getBasefee" | "getBlockHash" | "getBlockNumber" | "getChainId" | "getCurrentBlockCoinbase" | "getCurrentBlockDifficulty" | "getCurrentBlockGasLimit" | "getCurrentBlockTimestamp" | "getEthBalance" | "getLastBlockHash" | "tryAggregate" | "tryBlockAndAggregate"): FunctionFragment; + encodeFunctionData(functionFragment: "aggregate", values: [Multicall3.CallStruct[]]): string; + encodeFunctionData(functionFragment: "aggregate3", values: [Multicall3.Call3Struct[]]): string; + encodeFunctionData(functionFragment: "aggregate3Value", values: [Multicall3.Call3ValueStruct[]]): string; + encodeFunctionData(functionFragment: "blockAndAggregate", values: [Multicall3.CallStruct[]]): string; + encodeFunctionData(functionFragment: "getBasefee", values?: undefined): string; + encodeFunctionData(functionFragment: "getBlockHash", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getBlockNumber", values?: undefined): string; + encodeFunctionData(functionFragment: "getChainId", values?: undefined): string; + encodeFunctionData(functionFragment: "getCurrentBlockCoinbase", values?: undefined): string; + encodeFunctionData(functionFragment: "getCurrentBlockDifficulty", values?: undefined): string; + encodeFunctionData(functionFragment: "getCurrentBlockGasLimit", values?: undefined): string; + encodeFunctionData(functionFragment: "getCurrentBlockTimestamp", values?: undefined): string; + encodeFunctionData(functionFragment: "getEthBalance", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getLastBlockHash", values?: undefined): string; + encodeFunctionData(functionFragment: "tryAggregate", values: [PromiseOrValue, Multicall3.CallStruct[]]): string; + encodeFunctionData(functionFragment: "tryBlockAndAggregate", values: [PromiseOrValue, Multicall3.CallStruct[]]): string; + decodeFunctionResult(functionFragment: "aggregate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "aggregate3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "aggregate3Value", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "blockAndAggregate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBasefee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBlockHash", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBlockNumber", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getChainId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCurrentBlockCoinbase", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCurrentBlockDifficulty", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCurrentBlockGasLimit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCurrentBlockTimestamp", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getEthBalance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLastBlockHash", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tryAggregate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tryBlockAndAggregate", data: BytesLike): Result; + events: {}; +} +declare namespace Multicall3 { + type CallStruct = { + target: PromiseOrValue; + callData: PromiseOrValue; + }; + type CallStructOutput = [string, string] & { + target: string; + callData: string; + }; + type Call3Struct = { + target: PromiseOrValue; + allowFailure: PromiseOrValue; + callData: PromiseOrValue; + }; + type Call3StructOutput = [string, boolean, string] & { + target: string; + allowFailure: boolean; + callData: string; + }; + type ResultStruct = { + success: PromiseOrValue; + returnData: PromiseOrValue; + }; + type ResultStructOutput = [boolean, string] & { + success: boolean; + returnData: string; + }; + type Call3ValueStruct = { + target: PromiseOrValue; + allowFailure: PromiseOrValue; + value: PromiseOrValue; + callData: PromiseOrValue; + }; + type Call3ValueStructOutput = [string, boolean, BigNumber$1, string] & { + target: string; + allowFailure: boolean; + value: BigNumber$1; + callData: string; + }; +} +interface Multicall3 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: Multicall3Interface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + aggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + aggregate3(calls: Multicall3.Call3Struct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + aggregate3Value(calls: Multicall3.Call3ValueStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + blockAndAggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + getBasefee(overrides?: CallOverrides): Promise<[BigNumber$1] & { + basefee: BigNumber$1; + }>; + getBlockHash(blockNumber: PromiseOrValue, overrides?: CallOverrides): Promise<[string] & { + blockHash: string; + }>; + getBlockNumber(overrides?: CallOverrides): Promise<[BigNumber$1] & { + blockNumber: BigNumber$1; + }>; + getChainId(overrides?: CallOverrides): Promise<[BigNumber$1] & { + chainid: BigNumber$1; + }>; + getCurrentBlockCoinbase(overrides?: CallOverrides): Promise<[string] & { + coinbase: string; + }>; + getCurrentBlockDifficulty(overrides?: CallOverrides): Promise<[BigNumber$1] & { + difficulty: BigNumber$1; + }>; + getCurrentBlockGasLimit(overrides?: CallOverrides): Promise<[BigNumber$1] & { + gaslimit: BigNumber$1; + }>; + getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<[BigNumber$1] & { + timestamp: BigNumber$1; + }>; + getEthBalance(addr: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1] & { + balance: BigNumber$1; + }>; + getLastBlockHash(overrides?: CallOverrides): Promise<[string] & { + blockHash: string; + }>; + tryAggregate(requireSuccess: PromiseOrValue, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + tryBlockAndAggregate(requireSuccess: PromiseOrValue, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; + aggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + aggregate3(calls: Multicall3.Call3Struct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + aggregate3Value(calls: Multicall3.Call3ValueStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + blockAndAggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + getBasefee(overrides?: CallOverrides): Promise; + getBlockHash(blockNumber: PromiseOrValue, overrides?: CallOverrides): Promise; + getBlockNumber(overrides?: CallOverrides): Promise; + getChainId(overrides?: CallOverrides): Promise; + getCurrentBlockCoinbase(overrides?: CallOverrides): Promise; + getCurrentBlockDifficulty(overrides?: CallOverrides): Promise; + getCurrentBlockGasLimit(overrides?: CallOverrides): Promise; + getCurrentBlockTimestamp(overrides?: CallOverrides): Promise; + getEthBalance(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + getLastBlockHash(overrides?: CallOverrides): Promise; + tryAggregate(requireSuccess: PromiseOrValue, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + tryBlockAndAggregate(requireSuccess: PromiseOrValue, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + aggregate(calls: Multicall3.CallStruct[], overrides?: CallOverrides): Promise<[ + BigNumber$1, + string[] + ] & { + blockNumber: BigNumber$1; + returnData: string[]; + }>; + aggregate3(calls: Multicall3.Call3Struct[], overrides?: CallOverrides): Promise; + aggregate3Value(calls: Multicall3.Call3ValueStruct[], overrides?: CallOverrides): Promise; + blockAndAggregate(calls: Multicall3.CallStruct[], overrides?: CallOverrides): Promise<[ + BigNumber$1, + string, + Multicall3.ResultStructOutput[] + ] & { + blockNumber: BigNumber$1; + blockHash: string; + returnData: Multicall3.ResultStructOutput[]; + }>; + getBasefee(overrides?: CallOverrides): Promise; + getBlockHash(blockNumber: PromiseOrValue, overrides?: CallOverrides): Promise; + getBlockNumber(overrides?: CallOverrides): Promise; + getChainId(overrides?: CallOverrides): Promise; + getCurrentBlockCoinbase(overrides?: CallOverrides): Promise; + getCurrentBlockDifficulty(overrides?: CallOverrides): Promise; + getCurrentBlockGasLimit(overrides?: CallOverrides): Promise; + getCurrentBlockTimestamp(overrides?: CallOverrides): Promise; + getEthBalance(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + getLastBlockHash(overrides?: CallOverrides): Promise; + tryAggregate(requireSuccess: PromiseOrValue, calls: Multicall3.CallStruct[], overrides?: CallOverrides): Promise; + tryBlockAndAggregate(requireSuccess: PromiseOrValue, calls: Multicall3.CallStruct[], overrides?: CallOverrides): Promise<[ + BigNumber$1, + string, + Multicall3.ResultStructOutput[] + ] & { + blockNumber: BigNumber$1; + blockHash: string; + returnData: Multicall3.ResultStructOutput[]; + }>; + }; + filters: {}; + estimateGas: { + aggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + aggregate3(calls: Multicall3.Call3Struct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + aggregate3Value(calls: Multicall3.Call3ValueStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + blockAndAggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + getBasefee(overrides?: CallOverrides): Promise; + getBlockHash(blockNumber: PromiseOrValue, overrides?: CallOverrides): Promise; + getBlockNumber(overrides?: CallOverrides): Promise; + getChainId(overrides?: CallOverrides): Promise; + getCurrentBlockCoinbase(overrides?: CallOverrides): Promise; + getCurrentBlockDifficulty(overrides?: CallOverrides): Promise; + getCurrentBlockGasLimit(overrides?: CallOverrides): Promise; + getCurrentBlockTimestamp(overrides?: CallOverrides): Promise; + getEthBalance(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + getLastBlockHash(overrides?: CallOverrides): Promise; + tryAggregate(requireSuccess: PromiseOrValue, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + tryBlockAndAggregate(requireSuccess: PromiseOrValue, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + aggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + aggregate3(calls: Multicall3.Call3Struct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + aggregate3Value(calls: Multicall3.Call3ValueStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + blockAndAggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + getBasefee(overrides?: CallOverrides): Promise; + getBlockHash(blockNumber: PromiseOrValue, overrides?: CallOverrides): Promise; + getBlockNumber(overrides?: CallOverrides): Promise; + getChainId(overrides?: CallOverrides): Promise; + getCurrentBlockCoinbase(overrides?: CallOverrides): Promise; + getCurrentBlockDifficulty(overrides?: CallOverrides): Promise; + getCurrentBlockGasLimit(overrides?: CallOverrides): Promise; + getCurrentBlockTimestamp(overrides?: CallOverrides): Promise; + getEthBalance(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + getLastBlockHash(overrides?: CallOverrides): Promise; + tryAggregate(requireSuccess: PromiseOrValue, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + tryBlockAndAggregate(requireSuccess: PromiseOrValue, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +declare namespace IPoolSwapStructs$3 { + type SwapRequestStruct = { + kind: PromiseOrValue; + tokenIn: PromiseOrValue; + tokenOut: PromiseOrValue; + amount: PromiseOrValue; + poolId: PromiseOrValue; + lastChangeBlock: PromiseOrValue; + from: PromiseOrValue; + to: PromiseOrValue; + userData: PromiseOrValue; + }; + type SwapRequestStructOutput = [ + number, + string, + string, + BigNumber$1, + string, + BigNumber$1, + string, + string, + string + ] & { + kind: number; + tokenIn: string; + tokenOut: string; + amount: BigNumber$1; + poolId: string; + lastChangeBlock: BigNumber$1; + from: string; + to: string; + userData: string; + }; +} +interface StablePoolInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAmplificationParameter()": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getOwner()": FunctionFragment; + "getPausedState()": FunctionFragment; + "getPoolId()": FunctionFragment; + "getRate()": FunctionFragment; + "getSwapFeePercentage()": FunctionFragment; + "getVault()": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "setAssetManagerPoolConfig(address,bytes)": FunctionFragment; + "setPaused(bool)": FunctionFragment; + "setSwapFeePercentage(uint256)": FunctionFragment; + "startAmplificationParameterUpdate(uint256,uint256)": FunctionFragment; + "stopAmplificationParameterUpdate()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "allowance" | "approve" | "balanceOf" | "decimals" | "decreaseAllowance" | "getActionId" | "getAmplificationParameter" | "getAuthorizer" | "getOwner" | "getPausedState" | "getPoolId" | "getRate" | "getSwapFeePercentage" | "getVault" | "increaseAllowance" | "name" | "nonces" | "onExitPool" | "onJoinPool" | "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)" | "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)" | "permit" | "queryExit" | "queryJoin" | "setAssetManagerPoolConfig" | "setPaused" | "setSwapFeePercentage" | "startAmplificationParameterUpdate" | "stopAmplificationParameterUpdate" | "symbol" | "totalSupply" | "transfer" | "transferFrom"): FunctionFragment; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAmplificationParameter", values?: undefined): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getOwner", values?: undefined): string; + encodeFunctionData(functionFragment: "getPausedState", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolId", values?: undefined): string; + encodeFunctionData(functionFragment: "getRate", values?: undefined): string; + encodeFunctionData(functionFragment: "getSwapFeePercentage", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "onExitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onJoinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)", values: [ + IPoolSwapStructs$3.SwapRequestStruct, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)", values: [ + IPoolSwapStructs$3.SwapRequestStruct, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "permit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryExit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryJoin", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "setAssetManagerPoolConfig", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setPaused", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setSwapFeePercentage", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "startAmplificationParameterUpdate", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "stopAmplificationParameterUpdate", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAmplificationParameter", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPausedState", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onExitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onJoinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryExit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setAssetManagerPoolConfig", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setPaused", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "startAmplificationParameterUpdate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "stopAmplificationParameterUpdate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + events: { + "AmpUpdateStarted(uint256,uint256,uint256,uint256)": EventFragment; + "AmpUpdateStopped(uint256)": EventFragment; + "Approval(address,address,uint256)": EventFragment; + "PausedStateChanged(bool)": EventFragment; + "SwapFeePercentageChanged(uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "AmpUpdateStarted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AmpUpdateStopped"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PausedStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SwapFeePercentageChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +interface AmpUpdateStartedEventObject { + startValue: BigNumber$1; + endValue: BigNumber$1; + startTime: BigNumber$1; + endTime: BigNumber$1; +} +type AmpUpdateStartedEvent = TypedEvent<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 +], AmpUpdateStartedEventObject>; +type AmpUpdateStartedEventFilter = TypedEventFilter; +interface AmpUpdateStoppedEventObject { + currentValue: BigNumber$1; +} +type AmpUpdateStoppedEvent = TypedEvent<[ + BigNumber$1 +], AmpUpdateStoppedEventObject>; +type AmpUpdateStoppedEventFilter = TypedEventFilter; +interface ApprovalEventObject$3 { + owner: string; + spender: string; + value: BigNumber$1; +} +type ApprovalEvent$3 = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject$3>; +type ApprovalEventFilter$3 = TypedEventFilter; +interface PausedStateChangedEventObject$4 { + paused: boolean; +} +type PausedStateChangedEvent$4 = TypedEvent<[ + boolean +], PausedStateChangedEventObject$4>; +type PausedStateChangedEventFilter$4 = TypedEventFilter; +interface SwapFeePercentageChangedEventObject$3 { + swapFeePercentage: BigNumber$1; +} +type SwapFeePercentageChangedEvent$3 = TypedEvent<[ + BigNumber$1 +], SwapFeePercentageChangedEventObject$3>; +type SwapFeePercentageChangedEventFilter$3 = TypedEventFilter; +interface TransferEventObject$3 { + from: string; + to: string; + value: BigNumber$1; +} +type TransferEvent$3 = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject$3>; +type TransferEventFilter$3 = TypedEventFilter; +interface StablePool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: StablePoolInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAmplificationParameter(overrides?: CallOverrides): Promise<[ + BigNumber$1, + boolean, + BigNumber$1 + ] & { + value: BigNumber$1; + isUpdating: boolean; + precision: BigNumber$1; + }>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getOwner(overrides?: CallOverrides): Promise<[string]>; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise<[string]>; + getRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getSwapFeePercentage(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise<[string]>; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(swapRequest: IPoolSwapStructs$3.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$3.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + startAmplificationParameterUpdate(rawEndValue: PromiseOrValue, endTime: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + stopAmplificationParameterUpdate(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAmplificationParameter(overrides?: CallOverrides): Promise<[ + BigNumber$1, + boolean, + BigNumber$1 + ] & { + value: BigNumber$1; + isUpdating: boolean; + precision: BigNumber$1; + }>; + getAuthorizer(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(swapRequest: IPoolSwapStructs$3.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$3.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + startAmplificationParameterUpdate(rawEndValue: PromiseOrValue, endTime: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + stopAmplificationParameterUpdate(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAmplificationParameter(overrides?: CallOverrides): Promise<[ + BigNumber$1, + boolean, + BigNumber$1 + ] & { + value: BigNumber$1; + isUpdating: boolean; + precision: BigNumber$1; + }>; + getAuthorizer(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1[], BigNumber$1[]]>; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1[], BigNumber$1[]]>; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(swapRequest: IPoolSwapStructs$3.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$3.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptIn: BigNumber$1; + amountsOut: BigNumber$1[]; + }>; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptOut: BigNumber$1; + amountsIn: BigNumber$1[]; + }>; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: CallOverrides): Promise; + setPaused(paused: PromiseOrValue, overrides?: CallOverrides): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: CallOverrides): Promise; + startAmplificationParameterUpdate(rawEndValue: PromiseOrValue, endTime: PromiseOrValue, overrides?: CallOverrides): Promise; + stopAmplificationParameterUpdate(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: { + "AmpUpdateStarted(uint256,uint256,uint256,uint256)"(startValue?: null, endValue?: null, startTime?: null, endTime?: null): AmpUpdateStartedEventFilter; + AmpUpdateStarted(startValue?: null, endValue?: null, startTime?: null, endTime?: null): AmpUpdateStartedEventFilter; + "AmpUpdateStopped(uint256)"(currentValue?: null): AmpUpdateStoppedEventFilter; + AmpUpdateStopped(currentValue?: null): AmpUpdateStoppedEventFilter; + "Approval(address,address,uint256)"(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$3; + Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$3; + "PausedStateChanged(bool)"(paused?: null): PausedStateChangedEventFilter$4; + PausedStateChanged(paused?: null): PausedStateChangedEventFilter$4; + "SwapFeePercentageChanged(uint256)"(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$3; + SwapFeePercentageChanged(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$3; + "Transfer(address,address,uint256)"(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$3; + Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$3; + }; + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAmplificationParameter(overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(swapRequest: IPoolSwapStructs$3.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$3.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + startAmplificationParameterUpdate(rawEndValue: PromiseOrValue, endTime: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + stopAmplificationParameterUpdate(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAmplificationParameter(overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(swapRequest: IPoolSwapStructs$3.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$3.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + startAmplificationParameterUpdate(rawEndValue: PromiseOrValue, endTime: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + stopAmplificationParameterUpdate(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +interface StaticATokenRateProviderInterface extends utils.Interface { + functions: { + "getRate()": FunctionFragment; + "waToken()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "getRate" | "waToken"): FunctionFragment; + encodeFunctionData(functionFragment: "getRate", values?: undefined): string; + encodeFunctionData(functionFragment: "waToken", values?: undefined): string; + decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "waToken", data: BytesLike): Result; + events: {}; +} +interface StaticATokenRateProvider extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: StaticATokenRateProviderInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + getRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + waToken(overrides?: CallOverrides): Promise<[string]>; + }; + getRate(overrides?: CallOverrides): Promise; + waToken(overrides?: CallOverrides): Promise; + callStatic: { + getRate(overrides?: CallOverrides): Promise; + waToken(overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + getRate(overrides?: CallOverrides): Promise; + waToken(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + getRate(overrides?: CallOverrides): Promise; + waToken(overrides?: CallOverrides): Promise; + }; +} + +declare namespace IVault { + type BatchSwapStepStruct = { + poolId: PromiseOrValue; + assetInIndex: PromiseOrValue; + assetOutIndex: PromiseOrValue; + amount: PromiseOrValue; + userData: PromiseOrValue; + }; + type BatchSwapStepStructOutput = [ + string, + BigNumber$1, + BigNumber$1, + BigNumber$1, + string + ] & { + poolId: string; + assetInIndex: BigNumber$1; + assetOutIndex: BigNumber$1; + amount: BigNumber$1; + userData: string; + }; + type FundManagementStruct = { + sender: PromiseOrValue; + fromInternalBalance: PromiseOrValue; + recipient: PromiseOrValue; + toInternalBalance: PromiseOrValue; + }; + type FundManagementStructOutput = [ + string, + boolean, + string, + boolean + ] & { + sender: string; + fromInternalBalance: boolean; + recipient: string; + toInternalBalance: boolean; + }; + type ExitPoolRequestStruct = { + assets: PromiseOrValue[]; + minAmountsOut: PromiseOrValue[]; + userData: PromiseOrValue; + toInternalBalance: PromiseOrValue; + }; + type ExitPoolRequestStructOutput = [ + string[], + BigNumber$1[], + string, + boolean + ] & { + assets: string[]; + minAmountsOut: BigNumber$1[]; + userData: string; + toInternalBalance: boolean; + }; + type JoinPoolRequestStruct = { + assets: PromiseOrValue[]; + maxAmountsIn: PromiseOrValue[]; + userData: PromiseOrValue; + fromInternalBalance: PromiseOrValue; + }; + type JoinPoolRequestStructOutput = [ + string[], + BigNumber$1[], + string, + boolean + ] & { + assets: string[]; + maxAmountsIn: BigNumber$1[]; + userData: string; + fromInternalBalance: boolean; + }; + type PoolBalanceOpStruct = { + kind: PromiseOrValue; + poolId: PromiseOrValue; + token: PromiseOrValue; + amount: PromiseOrValue; + }; + type PoolBalanceOpStructOutput = [ + number, + string, + string, + BigNumber$1 + ] & { + kind: number; + poolId: string; + token: string; + amount: BigNumber$1; + }; + type UserBalanceOpStruct = { + kind: PromiseOrValue; + asset: PromiseOrValue; + amount: PromiseOrValue; + sender: PromiseOrValue; + recipient: PromiseOrValue; + }; + type UserBalanceOpStructOutput = [ + number, + string, + BigNumber$1, + string, + string + ] & { + kind: number; + asset: string; + amount: BigNumber$1; + sender: string; + recipient: string; + }; + type SingleSwapStruct = { + poolId: PromiseOrValue; + kind: PromiseOrValue; + assetIn: PromiseOrValue; + assetOut: PromiseOrValue; + amount: PromiseOrValue; + userData: PromiseOrValue; + }; + type SingleSwapStructOutput = [ + string, + number, + string, + string, + BigNumber$1, + string + ] & { + poolId: string; + kind: number; + assetIn: string; + assetOut: string; + amount: BigNumber$1; + userData: string; + }; +} +interface VaultInterface extends utils.Interface { + functions: { + "WETH()": FunctionFragment; + "batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)": FunctionFragment; + "deregisterTokens(bytes32,address[])": FunctionFragment; + "exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))": FunctionFragment; + "flashLoan(address,address[],uint256[],bytes)": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getDomainSeparator()": FunctionFragment; + "getInternalBalance(address,address[])": FunctionFragment; + "getNextNonce(address)": FunctionFragment; + "getPausedState()": FunctionFragment; + "getPool(bytes32)": FunctionFragment; + "getPoolTokenInfo(bytes32,address)": FunctionFragment; + "getPoolTokens(bytes32)": FunctionFragment; + "getProtocolFeesCollector()": FunctionFragment; + "hasApprovedRelayer(address,address)": FunctionFragment; + "joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))": FunctionFragment; + "managePoolBalance((uint8,bytes32,address,uint256)[])": FunctionFragment; + "manageUserBalance((uint8,address,uint256,address,address)[])": FunctionFragment; + "queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))": FunctionFragment; + "registerPool(uint8)": FunctionFragment; + "registerTokens(bytes32,address[],address[])": FunctionFragment; + "setAuthorizer(address)": FunctionFragment; + "setPaused(bool)": FunctionFragment; + "setRelayerApproval(address,address,bool)": FunctionFragment; + "swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "WETH" | "batchSwap" | "deregisterTokens" | "exitPool" | "flashLoan" | "getActionId" | "getAuthorizer" | "getDomainSeparator" | "getInternalBalance" | "getNextNonce" | "getPausedState" | "getPool" | "getPoolTokenInfo" | "getPoolTokens" | "getProtocolFeesCollector" | "hasApprovedRelayer" | "joinPool" | "managePoolBalance" | "manageUserBalance" | "queryBatchSwap" | "registerPool" | "registerTokens" | "setAuthorizer" | "setPaused" | "setRelayerApproval" | "swap"): FunctionFragment; + encodeFunctionData(functionFragment: "WETH", values?: undefined): string; + encodeFunctionData(functionFragment: "batchSwap", values: [ + PromiseOrValue, + IVault.BatchSwapStepStruct[], + PromiseOrValue[], + IVault.FundManagementStruct, + PromiseOrValue[], + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "deregisterTokens", values: [PromiseOrValue, PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "exitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + IVault.ExitPoolRequestStruct + ]): string; + encodeFunctionData(functionFragment: "flashLoan", values: [ + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue[], + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getDomainSeparator", values?: undefined): string; + encodeFunctionData(functionFragment: "getInternalBalance", values: [PromiseOrValue, PromiseOrValue[]]): string; + encodeFunctionData(functionFragment: "getNextNonce", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getPausedState", values?: undefined): string; + encodeFunctionData(functionFragment: "getPool", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getPoolTokenInfo", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getPoolTokens", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getProtocolFeesCollector", values?: undefined): string; + encodeFunctionData(functionFragment: "hasApprovedRelayer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "joinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + IVault.JoinPoolRequestStruct + ]): string; + encodeFunctionData(functionFragment: "managePoolBalance", values: [IVault.PoolBalanceOpStruct[]]): string; + encodeFunctionData(functionFragment: "manageUserBalance", values: [IVault.UserBalanceOpStruct[]]): string; + encodeFunctionData(functionFragment: "queryBatchSwap", values: [ + PromiseOrValue, + IVault.BatchSwapStepStruct[], + PromiseOrValue[], + IVault.FundManagementStruct + ]): string; + encodeFunctionData(functionFragment: "registerPool", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "registerTokens", values: [ + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue[] + ]): string; + encodeFunctionData(functionFragment: "setAuthorizer", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setPaused", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setRelayerApproval", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "swap", values: [ + IVault.SingleSwapStruct, + IVault.FundManagementStruct, + PromiseOrValue, + PromiseOrValue + ]): string; + decodeFunctionResult(functionFragment: "WETH", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "batchSwap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deregisterTokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "exitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "flashLoan", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDomainSeparator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getInternalBalance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getNextNonce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPausedState", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolTokenInfo", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolTokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeesCollector", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasApprovedRelayer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "joinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "managePoolBalance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "manageUserBalance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryBatchSwap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "registerPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "registerTokens", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setPaused", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setRelayerApproval", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; + events: { + "AuthorizerChanged(address)": EventFragment; + "ExternalBalanceTransfer(address,address,address,uint256)": EventFragment; + "FlashLoan(address,address,uint256,uint256)": EventFragment; + "InternalBalanceChanged(address,address,int256)": EventFragment; + "PausedStateChanged(bool)": EventFragment; + "PoolBalanceChanged(bytes32,address,address[],int256[],uint256[])": EventFragment; + "PoolBalanceManaged(bytes32,address,address,int256,int256)": EventFragment; + "PoolRegistered(bytes32,address,uint8)": EventFragment; + "RelayerApprovalChanged(address,address,bool)": EventFragment; + "Swap(bytes32,address,address,uint256,uint256)": EventFragment; + "TokensDeregistered(bytes32,address[])": EventFragment; + "TokensRegistered(bytes32,address[],address[])": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "AuthorizerChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExternalBalanceTransfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "FlashLoan"): EventFragment; + getEvent(nameOrSignatureOrTopic: "InternalBalanceChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PausedStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolBalanceChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolBalanceManaged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolRegistered"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RelayerApprovalChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Swap"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokensDeregistered"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TokensRegistered"): EventFragment; +} +interface AuthorizerChangedEventObject { + newAuthorizer: string; +} +type AuthorizerChangedEvent = TypedEvent<[ + string +], AuthorizerChangedEventObject>; +type AuthorizerChangedEventFilter = TypedEventFilter; +interface ExternalBalanceTransferEventObject { + token: string; + sender: string; + recipient: string; + amount: BigNumber$1; +} +type ExternalBalanceTransferEvent = TypedEvent<[ + string, + string, + string, + BigNumber$1 +], ExternalBalanceTransferEventObject>; +type ExternalBalanceTransferEventFilter = TypedEventFilter; +interface FlashLoanEventObject { + recipient: string; + token: string; + amount: BigNumber$1; + feeAmount: BigNumber$1; +} +type FlashLoanEvent = TypedEvent<[ + string, + string, + BigNumber$1, + BigNumber$1 +], FlashLoanEventObject>; +type FlashLoanEventFilter = TypedEventFilter; +interface InternalBalanceChangedEventObject { + user: string; + token: string; + delta: BigNumber$1; +} +type InternalBalanceChangedEvent = TypedEvent<[ + string, + string, + BigNumber$1 +], InternalBalanceChangedEventObject>; +type InternalBalanceChangedEventFilter = TypedEventFilter; +interface PausedStateChangedEventObject$3 { + paused: boolean; +} +type PausedStateChangedEvent$3 = TypedEvent<[ + boolean +], PausedStateChangedEventObject$3>; +type PausedStateChangedEventFilter$3 = TypedEventFilter; +interface PoolBalanceChangedEventObject { + poolId: string; + liquidityProvider: string; + tokens: string[]; + deltas: BigNumber$1[]; + protocolFeeAmounts: BigNumber$1[]; +} +type PoolBalanceChangedEvent = TypedEvent<[ + string, + string, + string[], + BigNumber$1[], + BigNumber$1[] +], PoolBalanceChangedEventObject>; +type PoolBalanceChangedEventFilter = TypedEventFilter; +interface PoolBalanceManagedEventObject { + poolId: string; + assetManager: string; + token: string; + cashDelta: BigNumber$1; + managedDelta: BigNumber$1; +} +type PoolBalanceManagedEvent = TypedEvent<[ + string, + string, + string, + BigNumber$1, + BigNumber$1 +], PoolBalanceManagedEventObject>; +type PoolBalanceManagedEventFilter = TypedEventFilter; +interface PoolRegisteredEventObject { + poolId: string; + poolAddress: string; + specialization: number; +} +type PoolRegisteredEvent = TypedEvent<[ + string, + string, + number +], PoolRegisteredEventObject>; +type PoolRegisteredEventFilter = TypedEventFilter; +interface RelayerApprovalChangedEventObject { + relayer: string; + sender: string; + approved: boolean; +} +type RelayerApprovalChangedEvent = TypedEvent<[ + string, + string, + boolean +], RelayerApprovalChangedEventObject>; +type RelayerApprovalChangedEventFilter = TypedEventFilter; +interface SwapEventObject { + poolId: string; + tokenIn: string; + tokenOut: string; + amountIn: BigNumber$1; + amountOut: BigNumber$1; +} +type SwapEvent = TypedEvent<[ + string, + string, + string, + BigNumber$1, + BigNumber$1 +], SwapEventObject>; +type SwapEventFilter = TypedEventFilter; +interface TokensDeregisteredEventObject { + poolId: string; + tokens: string[]; +} +type TokensDeregisteredEvent = TypedEvent<[ + string, + string[] +], TokensDeregisteredEventObject>; +type TokensDeregisteredEventFilter = TypedEventFilter; +interface TokensRegisteredEventObject { + poolId: string; + tokens: string[]; + assetManagers: string[]; +} +type TokensRegisteredEvent = TypedEvent<[ + string, + string[], + string[] +], TokensRegisteredEventObject>; +type TokensRegisteredEventFilter = TypedEventFilter; +interface Vault extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: VaultInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + WETH(overrides?: CallOverrides): Promise<[string]>; + batchSwap(kind: PromiseOrValue, swaps: IVault.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + deregisterTokens(poolId: PromiseOrValue, tokens: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + exitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault.ExitPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + flashLoan(recipient: PromiseOrValue, tokens: PromiseOrValue[], amounts: PromiseOrValue[], userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getDomainSeparator(overrides?: CallOverrides): Promise<[string]>; + getInternalBalance(user: PromiseOrValue, tokens: PromiseOrValue[], overrides?: CallOverrides): Promise<[BigNumber$1[]] & { + balances: BigNumber$1[]; + }>; + getNextNonce(user: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPool(poolId: PromiseOrValue, overrides?: CallOverrides): Promise<[string, number]>; + getPoolTokenInfo(poolId: PromiseOrValue, token: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + string + ] & { + cash: BigNumber$1; + managed: BigNumber$1; + lastChangeBlock: BigNumber$1; + assetManager: string; + }>; + getPoolTokens(poolId: PromiseOrValue, overrides?: CallOverrides): Promise<[ + string[], + BigNumber$1[], + BigNumber$1 + ] & { + tokens: string[]; + balances: BigNumber$1[]; + lastChangeBlock: BigNumber$1; + }>; + getProtocolFeesCollector(overrides?: CallOverrides): Promise<[string]>; + hasApprovedRelayer(user: PromiseOrValue, relayer: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + joinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault.JoinPoolRequestStruct, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + managePoolBalance(ops: IVault.PoolBalanceOpStruct[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + manageUserBalance(ops: IVault.UserBalanceOpStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + queryBatchSwap(kind: PromiseOrValue, swaps: IVault.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault.FundManagementStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + registerPool(specialization: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + registerTokens(poolId: PromiseOrValue, tokens: PromiseOrValue[], assetManagers: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAuthorizer(newAuthorizer: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setRelayerApproval(sender: PromiseOrValue, relayer: PromiseOrValue, approved: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + swap(singleSwap: IVault.SingleSwapStruct, funds: IVault.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; + WETH(overrides?: CallOverrides): Promise; + batchSwap(kind: PromiseOrValue, swaps: IVault.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + deregisterTokens(poolId: PromiseOrValue, tokens: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + exitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault.ExitPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + flashLoan(recipient: PromiseOrValue, tokens: PromiseOrValue[], amounts: PromiseOrValue[], userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getInternalBalance(user: PromiseOrValue, tokens: PromiseOrValue[], overrides?: CallOverrides): Promise; + getNextNonce(user: PromiseOrValue, overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPool(poolId: PromiseOrValue, overrides?: CallOverrides): Promise<[string, number]>; + getPoolTokenInfo(poolId: PromiseOrValue, token: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + string + ] & { + cash: BigNumber$1; + managed: BigNumber$1; + lastChangeBlock: BigNumber$1; + assetManager: string; + }>; + getPoolTokens(poolId: PromiseOrValue, overrides?: CallOverrides): Promise<[ + string[], + BigNumber$1[], + BigNumber$1 + ] & { + tokens: string[]; + balances: BigNumber$1[]; + lastChangeBlock: BigNumber$1; + }>; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + hasApprovedRelayer(user: PromiseOrValue, relayer: PromiseOrValue, overrides?: CallOverrides): Promise; + joinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault.JoinPoolRequestStruct, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + managePoolBalance(ops: IVault.PoolBalanceOpStruct[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + manageUserBalance(ops: IVault.UserBalanceOpStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + queryBatchSwap(kind: PromiseOrValue, swaps: IVault.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault.FundManagementStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + registerPool(specialization: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + registerTokens(poolId: PromiseOrValue, tokens: PromiseOrValue[], assetManagers: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAuthorizer(newAuthorizer: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setRelayerApproval(sender: PromiseOrValue, relayer: PromiseOrValue, approved: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + swap(singleSwap: IVault.SingleSwapStruct, funds: IVault.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + WETH(overrides?: CallOverrides): Promise; + batchSwap(kind: PromiseOrValue, swaps: IVault.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, overrides?: CallOverrides): Promise; + deregisterTokens(poolId: PromiseOrValue, tokens: PromiseOrValue[], overrides?: CallOverrides): Promise; + exitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault.ExitPoolRequestStruct, overrides?: CallOverrides): Promise; + flashLoan(recipient: PromiseOrValue, tokens: PromiseOrValue[], amounts: PromiseOrValue[], userData: PromiseOrValue, overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getInternalBalance(user: PromiseOrValue, tokens: PromiseOrValue[], overrides?: CallOverrides): Promise; + getNextNonce(user: PromiseOrValue, overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPool(poolId: PromiseOrValue, overrides?: CallOverrides): Promise<[string, number]>; + getPoolTokenInfo(poolId: PromiseOrValue, token: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + string + ] & { + cash: BigNumber$1; + managed: BigNumber$1; + lastChangeBlock: BigNumber$1; + assetManager: string; + }>; + getPoolTokens(poolId: PromiseOrValue, overrides?: CallOverrides): Promise<[ + string[], + BigNumber$1[], + BigNumber$1 + ] & { + tokens: string[]; + balances: BigNumber$1[]; + lastChangeBlock: BigNumber$1; + }>; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + hasApprovedRelayer(user: PromiseOrValue, relayer: PromiseOrValue, overrides?: CallOverrides): Promise; + joinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault.JoinPoolRequestStruct, overrides?: CallOverrides): Promise; + managePoolBalance(ops: IVault.PoolBalanceOpStruct[], overrides?: CallOverrides): Promise; + manageUserBalance(ops: IVault.UserBalanceOpStruct[], overrides?: CallOverrides): Promise; + queryBatchSwap(kind: PromiseOrValue, swaps: IVault.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault.FundManagementStruct, overrides?: CallOverrides): Promise; + registerPool(specialization: PromiseOrValue, overrides?: CallOverrides): Promise; + registerTokens(poolId: PromiseOrValue, tokens: PromiseOrValue[], assetManagers: PromiseOrValue[], overrides?: CallOverrides): Promise; + setAuthorizer(newAuthorizer: PromiseOrValue, overrides?: CallOverrides): Promise; + setPaused(paused: PromiseOrValue, overrides?: CallOverrides): Promise; + setRelayerApproval(sender: PromiseOrValue, relayer: PromiseOrValue, approved: PromiseOrValue, overrides?: CallOverrides): Promise; + swap(singleSwap: IVault.SingleSwapStruct, funds: IVault.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: { + "AuthorizerChanged(address)"(newAuthorizer?: PromiseOrValue | null): AuthorizerChangedEventFilter; + AuthorizerChanged(newAuthorizer?: PromiseOrValue | null): AuthorizerChangedEventFilter; + "ExternalBalanceTransfer(address,address,address,uint256)"(token?: PromiseOrValue | null, sender?: PromiseOrValue | null, recipient?: null, amount?: null): ExternalBalanceTransferEventFilter; + ExternalBalanceTransfer(token?: PromiseOrValue | null, sender?: PromiseOrValue | null, recipient?: null, amount?: null): ExternalBalanceTransferEventFilter; + "FlashLoan(address,address,uint256,uint256)"(recipient?: PromiseOrValue | null, token?: PromiseOrValue | null, amount?: null, feeAmount?: null): FlashLoanEventFilter; + FlashLoan(recipient?: PromiseOrValue | null, token?: PromiseOrValue | null, amount?: null, feeAmount?: null): FlashLoanEventFilter; + "InternalBalanceChanged(address,address,int256)"(user?: PromiseOrValue | null, token?: PromiseOrValue | null, delta?: null): InternalBalanceChangedEventFilter; + InternalBalanceChanged(user?: PromiseOrValue | null, token?: PromiseOrValue | null, delta?: null): InternalBalanceChangedEventFilter; + "PausedStateChanged(bool)"(paused?: null): PausedStateChangedEventFilter$3; + PausedStateChanged(paused?: null): PausedStateChangedEventFilter$3; + "PoolBalanceChanged(bytes32,address,address[],int256[],uint256[])"(poolId?: PromiseOrValue | null, liquidityProvider?: PromiseOrValue | null, tokens?: null, deltas?: null, protocolFeeAmounts?: null): PoolBalanceChangedEventFilter; + PoolBalanceChanged(poolId?: PromiseOrValue | null, liquidityProvider?: PromiseOrValue | null, tokens?: null, deltas?: null, protocolFeeAmounts?: null): PoolBalanceChangedEventFilter; + "PoolBalanceManaged(bytes32,address,address,int256,int256)"(poolId?: PromiseOrValue | null, assetManager?: PromiseOrValue | null, token?: PromiseOrValue | null, cashDelta?: null, managedDelta?: null): PoolBalanceManagedEventFilter; + PoolBalanceManaged(poolId?: PromiseOrValue | null, assetManager?: PromiseOrValue | null, token?: PromiseOrValue | null, cashDelta?: null, managedDelta?: null): PoolBalanceManagedEventFilter; + "PoolRegistered(bytes32,address,uint8)"(poolId?: PromiseOrValue | null, poolAddress?: PromiseOrValue | null, specialization?: null): PoolRegisteredEventFilter; + PoolRegistered(poolId?: PromiseOrValue | null, poolAddress?: PromiseOrValue | null, specialization?: null): PoolRegisteredEventFilter; + "RelayerApprovalChanged(address,address,bool)"(relayer?: PromiseOrValue | null, sender?: PromiseOrValue | null, approved?: null): RelayerApprovalChangedEventFilter; + RelayerApprovalChanged(relayer?: PromiseOrValue | null, sender?: PromiseOrValue | null, approved?: null): RelayerApprovalChangedEventFilter; + "Swap(bytes32,address,address,uint256,uint256)"(poolId?: PromiseOrValue | null, tokenIn?: PromiseOrValue | null, tokenOut?: PromiseOrValue | null, amountIn?: null, amountOut?: null): SwapEventFilter; + Swap(poolId?: PromiseOrValue | null, tokenIn?: PromiseOrValue | null, tokenOut?: PromiseOrValue | null, amountIn?: null, amountOut?: null): SwapEventFilter; + "TokensDeregistered(bytes32,address[])"(poolId?: PromiseOrValue | null, tokens?: null): TokensDeregisteredEventFilter; + TokensDeregistered(poolId?: PromiseOrValue | null, tokens?: null): TokensDeregisteredEventFilter; + "TokensRegistered(bytes32,address[],address[])"(poolId?: PromiseOrValue | null, tokens?: null, assetManagers?: null): TokensRegisteredEventFilter; + TokensRegistered(poolId?: PromiseOrValue | null, tokens?: null, assetManagers?: null): TokensRegisteredEventFilter; + }; + estimateGas: { + WETH(overrides?: CallOverrides): Promise; + batchSwap(kind: PromiseOrValue, swaps: IVault.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + deregisterTokens(poolId: PromiseOrValue, tokens: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + exitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault.ExitPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + flashLoan(recipient: PromiseOrValue, tokens: PromiseOrValue[], amounts: PromiseOrValue[], userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getInternalBalance(user: PromiseOrValue, tokens: PromiseOrValue[], overrides?: CallOverrides): Promise; + getNextNonce(user: PromiseOrValue, overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPool(poolId: PromiseOrValue, overrides?: CallOverrides): Promise; + getPoolTokenInfo(poolId: PromiseOrValue, token: PromiseOrValue, overrides?: CallOverrides): Promise; + getPoolTokens(poolId: PromiseOrValue, overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + hasApprovedRelayer(user: PromiseOrValue, relayer: PromiseOrValue, overrides?: CallOverrides): Promise; + joinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault.JoinPoolRequestStruct, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + managePoolBalance(ops: IVault.PoolBalanceOpStruct[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + manageUserBalance(ops: IVault.UserBalanceOpStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + queryBatchSwap(kind: PromiseOrValue, swaps: IVault.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault.FundManagementStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + registerPool(specialization: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + registerTokens(poolId: PromiseOrValue, tokens: PromiseOrValue[], assetManagers: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAuthorizer(newAuthorizer: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setRelayerApproval(sender: PromiseOrValue, relayer: PromiseOrValue, approved: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + swap(singleSwap: IVault.SingleSwapStruct, funds: IVault.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + WETH(overrides?: CallOverrides): Promise; + batchSwap(kind: PromiseOrValue, swaps: IVault.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault.FundManagementStruct, limits: PromiseOrValue[], deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + deregisterTokens(poolId: PromiseOrValue, tokens: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + exitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault.ExitPoolRequestStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + flashLoan(recipient: PromiseOrValue, tokens: PromiseOrValue[], amounts: PromiseOrValue[], userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getInternalBalance(user: PromiseOrValue, tokens: PromiseOrValue[], overrides?: CallOverrides): Promise; + getNextNonce(user: PromiseOrValue, overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPool(poolId: PromiseOrValue, overrides?: CallOverrides): Promise; + getPoolTokenInfo(poolId: PromiseOrValue, token: PromiseOrValue, overrides?: CallOverrides): Promise; + getPoolTokens(poolId: PromiseOrValue, overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + hasApprovedRelayer(user: PromiseOrValue, relayer: PromiseOrValue, overrides?: CallOverrides): Promise; + joinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, request: IVault.JoinPoolRequestStruct, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + managePoolBalance(ops: IVault.PoolBalanceOpStruct[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + manageUserBalance(ops: IVault.UserBalanceOpStruct[], overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + queryBatchSwap(kind: PromiseOrValue, swaps: IVault.BatchSwapStepStruct[], assets: PromiseOrValue[], funds: IVault.FundManagementStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + registerPool(specialization: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + registerTokens(poolId: PromiseOrValue, tokens: PromiseOrValue[], assetManagers: PromiseOrValue[], overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAuthorizer(newAuthorizer: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setRelayerApproval(sender: PromiseOrValue, relayer: PromiseOrValue, approved: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + swap(singleSwap: IVault.SingleSwapStruct, funds: IVault.FundManagementStruct, limit: PromiseOrValue, deadline: PromiseOrValue, overrides?: PayableOverrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +declare namespace IPoolSwapStructs$2 { + type SwapRequestStruct = { + kind: PromiseOrValue; + tokenIn: PromiseOrValue; + tokenOut: PromiseOrValue; + amount: PromiseOrValue; + poolId: PromiseOrValue; + lastChangeBlock: PromiseOrValue; + from: PromiseOrValue; + to: PromiseOrValue; + userData: PromiseOrValue; + }; + type SwapRequestStructOutput = [ + number, + string, + string, + BigNumber$1, + string, + BigNumber$1, + string, + string, + string + ] & { + kind: number; + tokenIn: string; + tokenOut: string; + amount: BigNumber$1; + poolId: string; + lastChangeBlock: BigNumber$1; + from: string; + to: string; + userData: string; + }; +} +interface WeightedPoolInterface extends utils.Interface { + functions: { + "DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL()": FunctionFragment; + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "disableRecoveryMode()": FunctionFragment; + "enableRecoveryMode()": FunctionFragment; + "getATHRateProduct()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getActualSupply()": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getDomainSeparator()": FunctionFragment; + "getInvariant()": FunctionFragment; + "getLastPostJoinExitInvariant()": FunctionFragment; + "getNextNonce(address)": FunctionFragment; + "getNormalizedWeights()": FunctionFragment; + "getOwner()": FunctionFragment; + "getPausedState()": FunctionFragment; + "getPoolId()": FunctionFragment; + "getProtocolFeePercentageCache(uint256)": FunctionFragment; + "getProtocolFeesCollector()": FunctionFragment; + "getProtocolSwapFeeDelegation()": FunctionFragment; + "getRateProviders()": FunctionFragment; + "getScalingFactors()": FunctionFragment; + "getSwapFeePercentage()": FunctionFragment; + "getVault()": FunctionFragment; + "inRecoveryMode()": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": FunctionFragment; + "pause()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "setAssetManagerPoolConfig(address,bytes)": FunctionFragment; + "setSwapFeePercentage(uint256)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "unpause()": FunctionFragment; + "updateProtocolFeePercentageCache()": FunctionFragment; + "version()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL" | "DOMAIN_SEPARATOR" | "allowance" | "approve" | "balanceOf" | "decimals" | "decreaseAllowance" | "disableRecoveryMode" | "enableRecoveryMode" | "getATHRateProduct" | "getActionId" | "getActualSupply" | "getAuthorizer" | "getDomainSeparator" | "getInvariant" | "getLastPostJoinExitInvariant" | "getNextNonce" | "getNormalizedWeights" | "getOwner" | "getPausedState" | "getPoolId" | "getProtocolFeePercentageCache" | "getProtocolFeesCollector" | "getProtocolSwapFeeDelegation" | "getRateProviders" | "getScalingFactors" | "getSwapFeePercentage" | "getVault" | "inRecoveryMode" | "increaseAllowance" | "name" | "nonces" | "onExitPool" | "onJoinPool" | "onSwap" | "pause" | "permit" | "queryExit" | "queryJoin" | "setAssetManagerPoolConfig" | "setSwapFeePercentage" | "symbol" | "totalSupply" | "transfer" | "transferFrom" | "unpause" | "updateProtocolFeePercentageCache" | "version"): FunctionFragment; + encodeFunctionData(functionFragment: "DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL", values?: undefined): string; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "disableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "enableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "getATHRateProduct", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getActualSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getDomainSeparator", values?: undefined): string; + encodeFunctionData(functionFragment: "getInvariant", values?: undefined): string; + encodeFunctionData(functionFragment: "getLastPostJoinExitInvariant", values?: undefined): string; + encodeFunctionData(functionFragment: "getNextNonce", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getNormalizedWeights", values?: undefined): string; + encodeFunctionData(functionFragment: "getOwner", values?: undefined): string; + encodeFunctionData(functionFragment: "getPausedState", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolId", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeePercentageCache", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getProtocolFeesCollector", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolSwapFeeDelegation", values?: undefined): string; + encodeFunctionData(functionFragment: "getRateProviders", values?: undefined): string; + encodeFunctionData(functionFragment: "getScalingFactors", values?: undefined): string; + encodeFunctionData(functionFragment: "getSwapFeePercentage", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "inRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "onExitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onJoinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap", values: [ + IPoolSwapStructs$2.SwapRequestStruct, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData(functionFragment: "permit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryExit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryJoin", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "setAssetManagerPoolConfig", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setSwapFeePercentage", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unpause", values?: undefined): string; + encodeFunctionData(functionFragment: "updateProtocolFeePercentageCache", values?: undefined): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + decodeFunctionResult(functionFragment: "DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "enableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getATHRateProduct", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActualSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDomainSeparator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getInvariant", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLastPostJoinExitInvariant", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getNextNonce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getNormalizedWeights", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPausedState", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeePercentageCache", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeesCollector", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolSwapFeeDelegation", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRateProviders", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getScalingFactors", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "inRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onExitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onJoinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryExit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setAssetManagerPoolConfig", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "updateProtocolFeePercentageCache", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "PausedStateChanged(bool)": EventFragment; + "ProtocolFeePercentageCacheUpdated(uint256,uint256)": EventFragment; + "RecoveryModeStateChanged(bool)": EventFragment; + "SwapFeePercentageChanged(uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PausedStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProtocolFeePercentageCacheUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RecoveryModeStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SwapFeePercentageChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +interface ApprovalEventObject$2 { + owner: string; + spender: string; + value: BigNumber$1; +} +type ApprovalEvent$2 = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject$2>; +type ApprovalEventFilter$2 = TypedEventFilter; +interface PausedStateChangedEventObject$2 { + paused: boolean; +} +type PausedStateChangedEvent$2 = TypedEvent<[ + boolean +], PausedStateChangedEventObject$2>; +type PausedStateChangedEventFilter$2 = TypedEventFilter; +interface ProtocolFeePercentageCacheUpdatedEventObject { + feeType: BigNumber$1; + protocolFeePercentage: BigNumber$1; +} +type ProtocolFeePercentageCacheUpdatedEvent = TypedEvent<[ + BigNumber$1, + BigNumber$1 +], ProtocolFeePercentageCacheUpdatedEventObject>; +type ProtocolFeePercentageCacheUpdatedEventFilter = TypedEventFilter; +interface RecoveryModeStateChangedEventObject$1 { + enabled: boolean; +} +type RecoveryModeStateChangedEvent$1 = TypedEvent<[ + boolean +], RecoveryModeStateChangedEventObject$1>; +type RecoveryModeStateChangedEventFilter$1 = TypedEventFilter; +interface SwapFeePercentageChangedEventObject$2 { + swapFeePercentage: BigNumber$1; +} +type SwapFeePercentageChangedEvent$2 = TypedEvent<[ + BigNumber$1 +], SwapFeePercentageChangedEventObject$2>; +type SwapFeePercentageChangedEventFilter$2 = TypedEventFilter; +interface TransferEventObject$2 { + from: string; + to: string; + value: BigNumber$1; +} +type TransferEvent$2 = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject$2>; +type TransferEventFilter$2 = TypedEventFilter; +declare namespace WeightedPool { + type NewPoolParamsStruct = { + name: PromiseOrValue; + symbol: PromiseOrValue; + tokens: PromiseOrValue[]; + normalizedWeights: PromiseOrValue[]; + rateProviders: PromiseOrValue[]; + assetManagers: PromiseOrValue[]; + swapFeePercentage: PromiseOrValue; + }; + type NewPoolParamsStructOutput = [ + string, + string, + string[], + BigNumber$1[], + string[], + string[], + BigNumber$1 + ] & { + name: string; + symbol: string; + tokens: string[]; + normalizedWeights: BigNumber$1[]; + rateProviders: string[]; + assetManagers: string[]; + swapFeePercentage: BigNumber$1; + }; +} +interface WeightedPool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: WeightedPoolInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL(overrides?: CallOverrides): Promise<[BigNumber$1]>; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getATHRateProduct(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getActualSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getDomainSeparator(overrides?: CallOverrides): Promise<[string]>; + getInvariant(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getLastPostJoinExitInvariant(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + getNormalizedWeights(overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getOwner(overrides?: CallOverrides): Promise<[string]>; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeePercentageCache(feeType: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + getProtocolFeesCollector(overrides?: CallOverrides): Promise<[string]>; + getProtocolSwapFeeDelegation(overrides?: CallOverrides): Promise<[boolean]>; + getRateProviders(overrides?: CallOverrides): Promise<[string[]]>; + getScalingFactors(overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getSwapFeePercentage(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + inRecoveryMode(overrides?: CallOverrides): Promise<[boolean]>; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise<[string]>; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(request: IPoolSwapStructs$2.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + updateProtocolFeePercentageCache(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise<[string]>; + }; + DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getATHRateProduct(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getActualSupply(overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getInvariant(overrides?: CallOverrides): Promise; + getLastPostJoinExitInvariant(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getNormalizedWeights(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeePercentageCache(feeType: PromiseOrValue, overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getProtocolSwapFeeDelegation(overrides?: CallOverrides): Promise; + getRateProviders(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(request: IPoolSwapStructs$2.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + updateProtocolFeePercentageCache(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + callStatic: { + DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + disableRecoveryMode(overrides?: CallOverrides): Promise; + enableRecoveryMode(overrides?: CallOverrides): Promise; + getATHRateProduct(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getActualSupply(overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getInvariant(overrides?: CallOverrides): Promise; + getLastPostJoinExitInvariant(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getNormalizedWeights(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeePercentageCache(feeType: PromiseOrValue, overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getProtocolSwapFeeDelegation(overrides?: CallOverrides): Promise; + getRateProviders(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1[], BigNumber$1[]]>; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1[], BigNumber$1[]]>; + onSwap(request: IPoolSwapStructs$2.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: CallOverrides): Promise; + pause(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptIn: BigNumber$1; + amountsOut: BigNumber$1[]; + }>; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptOut: BigNumber$1; + amountsIn: BigNumber$1[]; + }>; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: CallOverrides): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + unpause(overrides?: CallOverrides): Promise; + updateProtocolFeePercentageCache(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$2; + Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$2; + "PausedStateChanged(bool)"(paused?: null): PausedStateChangedEventFilter$2; + PausedStateChanged(paused?: null): PausedStateChangedEventFilter$2; + "ProtocolFeePercentageCacheUpdated(uint256,uint256)"(feeType?: PromiseOrValue | null, protocolFeePercentage?: null): ProtocolFeePercentageCacheUpdatedEventFilter; + ProtocolFeePercentageCacheUpdated(feeType?: PromiseOrValue | null, protocolFeePercentage?: null): ProtocolFeePercentageCacheUpdatedEventFilter; + "RecoveryModeStateChanged(bool)"(enabled?: null): RecoveryModeStateChangedEventFilter$1; + RecoveryModeStateChanged(enabled?: null): RecoveryModeStateChangedEventFilter$1; + "SwapFeePercentageChanged(uint256)"(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$2; + SwapFeePercentageChanged(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$2; + "Transfer(address,address,uint256)"(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$2; + Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$2; + }; + estimateGas: { + DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getATHRateProduct(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getActualSupply(overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getInvariant(overrides?: CallOverrides): Promise; + getLastPostJoinExitInvariant(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getNormalizedWeights(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeePercentageCache(feeType: PromiseOrValue, overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getProtocolSwapFeeDelegation(overrides?: CallOverrides): Promise; + getRateProviders(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(request: IPoolSwapStructs$2.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + updateProtocolFeePercentageCache(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL(overrides?: CallOverrides): Promise; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getATHRateProduct(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getActualSupply(overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getInvariant(overrides?: CallOverrides): Promise; + getLastPostJoinExitInvariant(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getNormalizedWeights(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeePercentageCache(feeType: PromiseOrValue, overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getProtocolSwapFeeDelegation(overrides?: CallOverrides): Promise; + getRateProviders(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(request: IPoolSwapStructs$2.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setAssetManagerPoolConfig(token: PromiseOrValue, poolConfig: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + updateProtocolFeePercentageCache(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + }; +} + +interface WeightedPoolFactoryInterface extends utils.Interface { + functions: { + "create(string,string,address[],uint256[],address[],uint256,address,bytes32)": FunctionFragment; + "disable()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getCreationCode()": FunctionFragment; + "getCreationCodeContracts()": FunctionFragment; + "getPauseConfiguration()": FunctionFragment; + "getPoolVersion()": FunctionFragment; + "getProtocolFeePercentagesProvider()": FunctionFragment; + "getVault()": FunctionFragment; + "isDisabled()": FunctionFragment; + "isPoolFromFactory(address)": FunctionFragment; + "version()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "create" | "disable" | "getActionId" | "getAuthorizer" | "getCreationCode" | "getCreationCodeContracts" | "getPauseConfiguration" | "getPoolVersion" | "getProtocolFeePercentagesProvider" | "getVault" | "isDisabled" | "isPoolFromFactory" | "version"): FunctionFragment; + encodeFunctionData(functionFragment: "create", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue[], + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "disable", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCode", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCodeContracts", values?: undefined): string; + encodeFunctionData(functionFragment: "getPauseConfiguration", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolVersion", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeePercentagesProvider", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "isDisabled", values?: undefined): string; + encodeFunctionData(functionFragment: "isPoolFromFactory", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + decodeFunctionResult(functionFragment: "create", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disable", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCodeContracts", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPauseConfiguration", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolVersion", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeePercentagesProvider", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isDisabled", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isPoolFromFactory", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + events: { + "FactoryDisabled()": EventFragment; + "PoolCreated(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "FactoryDisabled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolCreated"): EventFragment; +} +interface FactoryDisabledEventObject$1 { +} +type FactoryDisabledEvent$1 = TypedEvent<[], FactoryDisabledEventObject$1>; +type FactoryDisabledEventFilter$1 = TypedEventFilter; +interface PoolCreatedEventObject$1 { + pool: string; +} +type PoolCreatedEvent$1 = TypedEvent<[string], PoolCreatedEventObject$1>; +type PoolCreatedEventFilter$1 = TypedEventFilter; +interface WeightedPoolFactory extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: WeightedPoolFactoryInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + create(name: PromiseOrValue, symbol: PromiseOrValue, tokens: PromiseOrValue[], normalizedWeights: PromiseOrValue[], rateProviders: PromiseOrValue[], swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getCreationCode(overrides?: CallOverrides): Promise<[string]>; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise<[string]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + isDisabled(overrides?: CallOverrides): Promise<[boolean]>; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + version(overrides?: CallOverrides): Promise<[string]>; + }; + create(name: PromiseOrValue, symbol: PromiseOrValue, tokens: PromiseOrValue[], normalizedWeights: PromiseOrValue[], rateProviders: PromiseOrValue[], swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + callStatic: { + create(name: PromiseOrValue, symbol: PromiseOrValue, tokens: PromiseOrValue[], normalizedWeights: PromiseOrValue[], rateProviders: PromiseOrValue[], swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, salt: PromiseOrValue, overrides?: CallOverrides): Promise; + disable(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + filters: { + "FactoryDisabled()"(): FactoryDisabledEventFilter$1; + FactoryDisabled(): FactoryDisabledEventFilter$1; + "PoolCreated(address)"(pool?: PromiseOrValue | null): PoolCreatedEventFilter$1; + PoolCreated(pool?: PromiseOrValue | null): PoolCreatedEventFilter$1; + }; + estimateGas: { + create(name: PromiseOrValue, symbol: PromiseOrValue, tokens: PromiseOrValue[], normalizedWeights: PromiseOrValue[], rateProviders: PromiseOrValue[], swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + create(name: PromiseOrValue, symbol: PromiseOrValue, tokens: PromiseOrValue[], normalizedWeights: PromiseOrValue[], rateProviders: PromiseOrValue[], swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; +} + +declare namespace IPoolSwapStructs$1 { + type SwapRequestStruct = { + kind: PromiseOrValue; + tokenIn: PromiseOrValue; + tokenOut: PromiseOrValue; + amount: PromiseOrValue; + poolId: PromiseOrValue; + lastChangeBlock: PromiseOrValue; + from: PromiseOrValue; + to: PromiseOrValue; + userData: PromiseOrValue; + }; + type SwapRequestStructOutput = [ + number, + string, + string, + BigNumber$1, + string, + BigNumber$1, + string, + string, + string + ] & { + kind: number; + tokenIn: string; + tokenOut: string; + amount: BigNumber$1; + poolId: string; + lastChangeBlock: BigNumber$1; + from: string; + to: string; + userData: string; + }; +} +interface YearnLinearPoolInterface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "disableRecoveryMode()": FunctionFragment; + "enableRecoveryMode()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getBptIndex()": FunctionFragment; + "getDomainSeparator()": FunctionFragment; + "getMainIndex()": FunctionFragment; + "getMainToken()": FunctionFragment; + "getNextNonce(address)": FunctionFragment; + "getOwner()": FunctionFragment; + "getPausedState()": FunctionFragment; + "getPoolId()": FunctionFragment; + "getProtocolFeesCollector()": FunctionFragment; + "getRate()": FunctionFragment; + "getScalingFactors()": FunctionFragment; + "getSwapFeePercentage()": FunctionFragment; + "getTargets()": FunctionFragment; + "getVault()": FunctionFragment; + "getVirtualSupply()": FunctionFragment; + "getWrappedIndex()": FunctionFragment; + "getWrappedToken()": FunctionFragment; + "getWrappedTokenRate()": FunctionFragment; + "inRecoveryMode()": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "initialize()": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": FunctionFragment; + "pause()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "setSwapFeePercentage(uint256)": FunctionFragment; + "setTargets(uint256,uint256)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "unpause()": FunctionFragment; + "version()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "allowance" | "approve" | "balanceOf" | "decimals" | "decreaseAllowance" | "disableRecoveryMode" | "enableRecoveryMode" | "getActionId" | "getAuthorizer" | "getBptIndex" | "getDomainSeparator" | "getMainIndex" | "getMainToken" | "getNextNonce" | "getOwner" | "getPausedState" | "getPoolId" | "getProtocolFeesCollector" | "getRate" | "getScalingFactors" | "getSwapFeePercentage" | "getTargets" | "getVault" | "getVirtualSupply" | "getWrappedIndex" | "getWrappedToken" | "getWrappedTokenRate" | "inRecoveryMode" | "increaseAllowance" | "initialize" | "name" | "nonces" | "onExitPool" | "onJoinPool" | "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)" | "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)" | "pause" | "permit" | "queryExit" | "queryJoin" | "setSwapFeePercentage" | "setTargets" | "symbol" | "totalSupply" | "transfer" | "transferFrom" | "unpause" | "version"): FunctionFragment; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "disableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "enableRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getBptIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getDomainSeparator", values?: undefined): string; + encodeFunctionData(functionFragment: "getMainIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getMainToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getNextNonce", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getOwner", values?: undefined): string; + encodeFunctionData(functionFragment: "getPausedState", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolId", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeesCollector", values?: undefined): string; + encodeFunctionData(functionFragment: "getRate", values?: undefined): string; + encodeFunctionData(functionFragment: "getScalingFactors", values?: undefined): string; + encodeFunctionData(functionFragment: "getSwapFeePercentage", values?: undefined): string; + encodeFunctionData(functionFragment: "getTargets", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "getVirtualSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedIndex", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedToken", values?: undefined): string; + encodeFunctionData(functionFragment: "getWrappedTokenRate", values?: undefined): string; + encodeFunctionData(functionFragment: "inRecoveryMode", values?: undefined): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "initialize", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "onExitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onJoinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)", values: [ + IPoolSwapStructs$1.SwapRequestStruct, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)", values: [ + IPoolSwapStructs$1.SwapRequestStruct, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData(functionFragment: "permit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryExit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryJoin", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "setSwapFeePercentage", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setTargets", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unpause", values?: undefined): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "enableRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBptIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDomainSeparator", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMainIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMainToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getNextNonce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPausedState", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeesCollector", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getScalingFactors", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTargets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVirtualSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedIndex", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getWrappedTokenRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "inRecoveryMode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onExitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onJoinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryExit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setTargets", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "PausedStateChanged(bool)": EventFragment; + "RecoveryModeStateChanged(bool)": EventFragment; + "SwapFeePercentageChanged(uint256)": EventFragment; + "TargetsSet(address,uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PausedStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RecoveryModeStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SwapFeePercentageChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TargetsSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +interface ApprovalEventObject$1 { + owner: string; + spender: string; + value: BigNumber$1; +} +type ApprovalEvent$1 = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject$1>; +type ApprovalEventFilter$1 = TypedEventFilter; +interface PausedStateChangedEventObject$1 { + paused: boolean; +} +type PausedStateChangedEvent$1 = TypedEvent<[ + boolean +], PausedStateChangedEventObject$1>; +type PausedStateChangedEventFilter$1 = TypedEventFilter; +interface RecoveryModeStateChangedEventObject { + enabled: boolean; +} +type RecoveryModeStateChangedEvent = TypedEvent<[ + boolean +], RecoveryModeStateChangedEventObject>; +type RecoveryModeStateChangedEventFilter = TypedEventFilter; +interface SwapFeePercentageChangedEventObject$1 { + swapFeePercentage: BigNumber$1; +} +type SwapFeePercentageChangedEvent$1 = TypedEvent<[ + BigNumber$1 +], SwapFeePercentageChangedEventObject$1>; +type SwapFeePercentageChangedEventFilter$1 = TypedEventFilter; +interface TargetsSetEventObject { + token: string; + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; +} +type TargetsSetEvent = TypedEvent<[ + string, + BigNumber$1, + BigNumber$1 +], TargetsSetEventObject>; +type TargetsSetEventFilter = TypedEventFilter; +interface TransferEventObject$1 { + from: string; + to: string; + value: BigNumber$1; +} +type TransferEvent$1 = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject$1>; +type TransferEventFilter$1 = TypedEventFilter; +declare namespace YearnLinearPool { + type ConstructorArgsStruct = { + vault: PromiseOrValue; + name: PromiseOrValue; + symbol: PromiseOrValue; + mainToken: PromiseOrValue; + wrappedToken: PromiseOrValue; + assetManager: PromiseOrValue; + upperTarget: PromiseOrValue; + swapFeePercentage: PromiseOrValue; + pauseWindowDuration: PromiseOrValue; + bufferPeriodDuration: PromiseOrValue; + owner: PromiseOrValue; + version: PromiseOrValue; + }; + type ConstructorArgsStructOutput = [ + string, + string, + string, + string, + string, + string, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + string, + string + ] & { + vault: string; + name: string; + symbol: string; + mainToken: string; + wrappedToken: string; + assetManager: string; + upperTarget: BigNumber$1; + swapFeePercentage: BigNumber$1; + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + owner: string; + version: string; + }; +} +interface YearnLinearPool extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: YearnLinearPoolInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getBptIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getDomainSeparator(overrides?: CallOverrides): Promise<[string]>; + getMainIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getMainToken(overrides?: CallOverrides): Promise<[string]>; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + getOwner(overrides?: CallOverrides): Promise<[string]>; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeesCollector(overrides?: CallOverrides): Promise<[string]>; + getRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getScalingFactors(overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getSwapFeePercentage(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise<[string]>; + getVirtualSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getWrappedIndex(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getWrappedToken(overrides?: CallOverrides): Promise<[string]>; + getWrappedTokenRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + inRecoveryMode(overrides?: CallOverrides): Promise<[boolean]>; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise<[string]>; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$1.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$1.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise<[string]>; + }; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$1.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$1.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + disableRecoveryMode(overrides?: CallOverrides): Promise; + enableRecoveryMode(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + lowerTarget: BigNumber$1; + upperTarget: BigNumber$1; + }>; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: CallOverrides): Promise; + initialize(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsOut: BigNumber$1[]; + dueProtocolFees: BigNumber$1[]; + }>; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsIn: BigNumber$1[]; + dueProtocolFees: BigNumber$1[]; + }>; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$1.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: CallOverrides): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$1.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: CallOverrides): Promise; + pause(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptIn: BigNumber$1; + amountsOut: BigNumber$1[]; + }>; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptOut: BigNumber$1; + amountsIn: BigNumber$1[]; + }>; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: CallOverrides): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + unpause(overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$1; + Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter$1; + "PausedStateChanged(bool)"(paused?: null): PausedStateChangedEventFilter$1; + PausedStateChanged(paused?: null): PausedStateChangedEventFilter$1; + "RecoveryModeStateChanged(bool)"(enabled?: null): RecoveryModeStateChangedEventFilter; + RecoveryModeStateChanged(enabled?: null): RecoveryModeStateChangedEventFilter; + "SwapFeePercentageChanged(uint256)"(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$1; + SwapFeePercentageChanged(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter$1; + "TargetsSet(address,uint256,uint256)"(token?: PromiseOrValue | null, lowerTarget?: null, upperTarget?: null): TargetsSetEventFilter; + TargetsSet(token?: PromiseOrValue | null, lowerTarget?: null, upperTarget?: null): TargetsSetEventFilter; + "Transfer(address,address,uint256)"(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$1; + Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter$1; + }; + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$1.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$1.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableRecoveryMode(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getBptIndex(overrides?: CallOverrides): Promise; + getDomainSeparator(overrides?: CallOverrides): Promise; + getMainIndex(overrides?: CallOverrides): Promise; + getMainToken(overrides?: CallOverrides): Promise; + getNextNonce(account: PromiseOrValue, overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getProtocolFeesCollector(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getScalingFactors(overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTargets(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVirtualSupply(overrides?: CallOverrides): Promise; + getWrappedIndex(overrides?: CallOverrides): Promise; + getWrappedToken(overrides?: CallOverrides): Promise; + getWrappedTokenRate(overrides?: CallOverrides): Promise; + inRecoveryMode(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + initialize(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256[],uint256,uint256)"(request: IPoolSwapStructs$1.SwapRequestStruct, balances: PromiseOrValue[], indexIn: PromiseOrValue, indexOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)"(request: IPoolSwapStructs$1.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryJoin(arg0: PromiseOrValue, sender: PromiseOrValue, arg2: PromiseOrValue, balances: PromiseOrValue[], arg4: PromiseOrValue, arg5: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setTargets(newLowerTarget: PromiseOrValue, newUpperTarget: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + version(overrides?: CallOverrides): Promise; + }; +} + +interface YearnLinearPoolFactoryInterface extends utils.Interface { + functions: { + "create(string,string,address,address,uint256,uint256,address,uint256,bytes32)": FunctionFragment; + "disable()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getCreationCode()": FunctionFragment; + "getCreationCodeContracts()": FunctionFragment; + "getLastCreatedPool()": FunctionFragment; + "getPauseConfiguration()": FunctionFragment; + "getPoolVersion()": FunctionFragment; + "getProtocolFeePercentagesProvider()": FunctionFragment; + "getVault()": FunctionFragment; + "isDisabled()": FunctionFragment; + "isPoolFromFactory(address)": FunctionFragment; + "version()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "create" | "disable" | "getActionId" | "getAuthorizer" | "getCreationCode" | "getCreationCodeContracts" | "getLastCreatedPool" | "getPauseConfiguration" | "getPoolVersion" | "getProtocolFeePercentagesProvider" | "getVault" | "isDisabled" | "isPoolFromFactory" | "version"): FunctionFragment; + encodeFunctionData(functionFragment: "create", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "disable", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCode", values?: undefined): string; + encodeFunctionData(functionFragment: "getCreationCodeContracts", values?: undefined): string; + encodeFunctionData(functionFragment: "getLastCreatedPool", values?: undefined): string; + encodeFunctionData(functionFragment: "getPauseConfiguration", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolVersion", values?: undefined): string; + encodeFunctionData(functionFragment: "getProtocolFeePercentagesProvider", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "isDisabled", values?: undefined): string; + encodeFunctionData(functionFragment: "isPoolFromFactory", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + decodeFunctionResult(functionFragment: "create", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "disable", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getCreationCodeContracts", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLastCreatedPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPauseConfiguration", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolVersion", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getProtocolFeePercentagesProvider", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isDisabled", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isPoolFromFactory", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + events: { + "FactoryDisabled()": EventFragment; + "PoolCreated(address)": EventFragment; + "YearnLinearPoolCreated(address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "FactoryDisabled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PoolCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "YearnLinearPoolCreated"): EventFragment; +} +interface FactoryDisabledEventObject { +} +type FactoryDisabledEvent = TypedEvent<[], FactoryDisabledEventObject>; +type FactoryDisabledEventFilter = TypedEventFilter; +interface PoolCreatedEventObject { + pool: string; +} +type PoolCreatedEvent = TypedEvent<[string], PoolCreatedEventObject>; +type PoolCreatedEventFilter = TypedEventFilter; +interface YearnLinearPoolCreatedEventObject { + pool: string; + protocolId: BigNumber$1; +} +type YearnLinearPoolCreatedEvent = TypedEvent<[ + string, + BigNumber$1 +], YearnLinearPoolCreatedEventObject>; +type YearnLinearPoolCreatedEventFilter = TypedEventFilter; +interface YearnLinearPoolFactory extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: YearnLinearPoolFactoryInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getCreationCode(overrides?: CallOverrides): Promise<[string]>; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise<[string]>; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise<[string]>; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise<[string]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + isDisabled(overrides?: CallOverrides): Promise<[boolean]>; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise<[boolean]>; + version(overrides?: CallOverrides): Promise<[string]>; + }; + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + callStatic: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: CallOverrides): Promise; + disable(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise<[string, string] & { + contractA: string; + contractB: string; + }>; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1 + ] & { + pauseWindowDuration: BigNumber$1; + bufferPeriodDuration: BigNumber$1; + }>; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + filters: { + "FactoryDisabled()"(): FactoryDisabledEventFilter; + FactoryDisabled(): FactoryDisabledEventFilter; + "PoolCreated(address)"(pool?: PromiseOrValue | null): PoolCreatedEventFilter; + PoolCreated(pool?: PromiseOrValue | null): PoolCreatedEventFilter; + "YearnLinearPoolCreated(address,uint256)"(pool?: PromiseOrValue | null, protocolId?: PromiseOrValue | null): YearnLinearPoolCreatedEventFilter; + YearnLinearPoolCreated(pool?: PromiseOrValue | null, protocolId?: PromiseOrValue | null): YearnLinearPoolCreatedEventFilter; + }; + estimateGas: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + create(name: PromiseOrValue, symbol: PromiseOrValue, mainToken: PromiseOrValue, wrappedToken: PromiseOrValue, upperTarget: PromiseOrValue, swapFeePercentage: PromiseOrValue, owner: PromiseOrValue, protocolId: PromiseOrValue, salt: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + disable(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getCreationCode(overrides?: CallOverrides): Promise; + getCreationCodeContracts(overrides?: CallOverrides): Promise; + getLastCreatedPool(overrides?: CallOverrides): Promise; + getPauseConfiguration(overrides?: CallOverrides): Promise; + getPoolVersion(overrides?: CallOverrides): Promise; + getProtocolFeePercentagesProvider(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + isDisabled(overrides?: CallOverrides): Promise; + isPoolFromFactory(pool: PromiseOrValue, overrides?: CallOverrides): Promise; + version(overrides?: CallOverrides): Promise; + }; +} + +declare namespace GyroECLPMath { + type ParamsStruct = { + alpha: PromiseOrValue; + beta: PromiseOrValue; + c: PromiseOrValue; + s: PromiseOrValue; + lambda: PromiseOrValue; + }; + type ParamsStructOutput = [ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + alpha: BigNumber$1; + beta: BigNumber$1; + c: BigNumber$1; + s: BigNumber$1; + lambda: BigNumber$1; + }; + type Vector2Struct = { + x: PromiseOrValue; + y: PromiseOrValue; + }; + type Vector2StructOutput = [BigNumber$1, BigNumber$1] & { + x: BigNumber$1; + y: BigNumber$1; + }; + type DerivedParamsStruct = { + tauAlpha: GyroECLPMath.Vector2Struct; + tauBeta: GyroECLPMath.Vector2Struct; + u: PromiseOrValue; + v: PromiseOrValue; + w: PromiseOrValue; + z: PromiseOrValue; + dSq: PromiseOrValue; + }; + type DerivedParamsStructOutput = [ + GyroECLPMath.Vector2StructOutput, + GyroECLPMath.Vector2StructOutput, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + tauAlpha: GyroECLPMath.Vector2StructOutput; + tauBeta: GyroECLPMath.Vector2StructOutput; + u: BigNumber$1; + v: BigNumber$1; + w: BigNumber$1; + z: BigNumber$1; + dSq: BigNumber$1; + }; +} +declare namespace ICappedLiquidity { + type CapParamsStruct = { + capEnabled: PromiseOrValue; + perAddressCap: PromiseOrValue; + globalCap: PromiseOrValue; + }; + type CapParamsStructOutput = [boolean, BigNumber$1, BigNumber$1] & { + capEnabled: boolean; + perAddressCap: BigNumber$1; + globalCap: BigNumber$1; + }; +} +declare namespace IPriceOracle { + type OracleAccumulatorQueryStruct = { + variable: PromiseOrValue; + ago: PromiseOrValue; + }; + type OracleAccumulatorQueryStructOutput = [number, BigNumber$1] & { + variable: number; + ago: BigNumber$1; + }; + type OracleAverageQueryStruct = { + variable: PromiseOrValue; + secs: PromiseOrValue; + ago: PromiseOrValue; + }; + type OracleAverageQueryStructOutput = [ + number, + BigNumber$1, + BigNumber$1 + ] & { + variable: number; + secs: BigNumber$1; + ago: BigNumber$1; + }; +} +declare namespace IPoolSwapStructs { + type SwapRequestStruct = { + kind: PromiseOrValue; + tokenIn: PromiseOrValue; + tokenOut: PromiseOrValue; + amount: PromiseOrValue; + poolId: PromiseOrValue; + lastChangeBlock: PromiseOrValue; + from: PromiseOrValue; + to: PromiseOrValue; + userData: PromiseOrValue; + }; + type SwapRequestStructOutput = [ + number, + string, + string, + BigNumber$1, + string, + BigNumber$1, + string, + string, + string + ] & { + kind: number; + tokenIn: string; + tokenOut: string; + amount: BigNumber$1; + poolId: string; + lastChangeBlock: BigNumber$1; + from: string; + to: string; + userData: string; + }; +} +interface GyroEV2Interface extends utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "_dSq()": FunctionFragment; + "_paramsAlpha()": FunctionFragment; + "_paramsBeta()": FunctionFragment; + "_paramsC()": FunctionFragment; + "_paramsLambda()": FunctionFragment; + "_paramsS()": FunctionFragment; + "_tauAlphaX()": FunctionFragment; + "_tauAlphaY()": FunctionFragment; + "_tauBetaX()": FunctionFragment; + "_tauBetaY()": FunctionFragment; + "_u()": FunctionFragment; + "_v()": FunctionFragment; + "_w()": FunctionFragment; + "_z()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "capManager()": FunctionFragment; + "capParams()": FunctionFragment; + "changePauseManager(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "dirtyUninitializedOracleSamples(uint256,uint256)": FunctionFragment; + "enableOracle()": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getECLPParams()": FunctionFragment; + "getInvariant()": FunctionFragment; + "getLargestSafeQueryWindow()": FunctionFragment; + "getLastInvariant()": FunctionFragment; + "getLatest(uint8)": FunctionFragment; + "getMiscData()": FunctionFragment; + "getNormalizedWeights()": FunctionFragment; + "getOwner()": FunctionFragment; + "getPastAccumulators((uint8,uint256)[])": FunctionFragment; + "getPausedState()": FunctionFragment; + "getPoolId()": FunctionFragment; + "getPrice()": FunctionFragment; + "getRate()": FunctionFragment; + "getSample(uint256)": FunctionFragment; + "getSwapFeePercentage()": FunctionFragment; + "getTimeWeightedAverage((uint8,uint256,uint256)[])": FunctionFragment; + "getTokenRates()": FunctionFragment; + "getTotalSamples()": FunctionFragment; + "getVault()": FunctionFragment; + "gyroConfig()": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "onExitPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onJoinPool(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "onSwap((uint8,address,address,uint256,bytes32,uint256,address,address,bytes),uint256,uint256)": FunctionFragment; + "pause()": FunctionFragment; + "pauseManager()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "queryExit(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "queryJoin(bytes32,address,address,uint256[],uint256,uint256,bytes)": FunctionFragment; + "rateProvider0()": FunctionFragment; + "rateProvider1()": FunctionFragment; + "setCapManager(address)": FunctionFragment; + "setCapParams((bool,uint120,uint128))": FunctionFragment; + "setPaused(bool)": FunctionFragment; + "setSwapFeePercentage(uint256)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "unpause()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "DOMAIN_SEPARATOR" | "_dSq" | "_paramsAlpha" | "_paramsBeta" | "_paramsC" | "_paramsLambda" | "_paramsS" | "_tauAlphaX" | "_tauAlphaY" | "_tauBetaX" | "_tauBetaY" | "_u" | "_v" | "_w" | "_z" | "allowance" | "approve" | "balanceOf" | "capManager" | "capParams" | "changePauseManager" | "decimals" | "decreaseAllowance" | "dirtyUninitializedOracleSamples" | "enableOracle" | "getActionId" | "getAuthorizer" | "getECLPParams" | "getInvariant" | "getLargestSafeQueryWindow" | "getLastInvariant" | "getLatest" | "getMiscData" | "getNormalizedWeights" | "getOwner" | "getPastAccumulators" | "getPausedState" | "getPoolId" | "getPrice" | "getRate" | "getSample" | "getSwapFeePercentage" | "getTimeWeightedAverage" | "getTokenRates" | "getTotalSamples" | "getVault" | "gyroConfig" | "increaseAllowance" | "name" | "nonces" | "onExitPool" | "onJoinPool" | "onSwap" | "pause" | "pauseManager" | "permit" | "queryExit" | "queryJoin" | "rateProvider0" | "rateProvider1" | "setCapManager" | "setCapParams" | "setPaused" | "setSwapFeePercentage" | "symbol" | "totalSupply" | "transfer" | "transferFrom" | "unpause"): FunctionFragment; + encodeFunctionData(functionFragment: "DOMAIN_SEPARATOR", values?: undefined): string; + encodeFunctionData(functionFragment: "_dSq", values?: undefined): string; + encodeFunctionData(functionFragment: "_paramsAlpha", values?: undefined): string; + encodeFunctionData(functionFragment: "_paramsBeta", values?: undefined): string; + encodeFunctionData(functionFragment: "_paramsC", values?: undefined): string; + encodeFunctionData(functionFragment: "_paramsLambda", values?: undefined): string; + encodeFunctionData(functionFragment: "_paramsS", values?: undefined): string; + encodeFunctionData(functionFragment: "_tauAlphaX", values?: undefined): string; + encodeFunctionData(functionFragment: "_tauAlphaY", values?: undefined): string; + encodeFunctionData(functionFragment: "_tauBetaX", values?: undefined): string; + encodeFunctionData(functionFragment: "_tauBetaY", values?: undefined): string; + encodeFunctionData(functionFragment: "_u", values?: undefined): string; + encodeFunctionData(functionFragment: "_v", values?: undefined): string; + encodeFunctionData(functionFragment: "_w", values?: undefined): string; + encodeFunctionData(functionFragment: "_z", values?: undefined): string; + encodeFunctionData(functionFragment: "allowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "approve", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "capManager", values?: undefined): string; + encodeFunctionData(functionFragment: "capParams", values?: undefined): string; + encodeFunctionData(functionFragment: "changePauseManager", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "decreaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "dirtyUninitializedOracleSamples", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "enableOracle", values?: undefined): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getECLPParams", values?: undefined): string; + encodeFunctionData(functionFragment: "getInvariant", values?: undefined): string; + encodeFunctionData(functionFragment: "getLargestSafeQueryWindow", values?: undefined): string; + encodeFunctionData(functionFragment: "getLastInvariant", values?: undefined): string; + encodeFunctionData(functionFragment: "getLatest", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getMiscData", values?: undefined): string; + encodeFunctionData(functionFragment: "getNormalizedWeights", values?: undefined): string; + encodeFunctionData(functionFragment: "getOwner", values?: undefined): string; + encodeFunctionData(functionFragment: "getPastAccumulators", values: [IPriceOracle.OracleAccumulatorQueryStruct[]]): string; + encodeFunctionData(functionFragment: "getPausedState", values?: undefined): string; + encodeFunctionData(functionFragment: "getPoolId", values?: undefined): string; + encodeFunctionData(functionFragment: "getPrice", values?: undefined): string; + encodeFunctionData(functionFragment: "getRate", values?: undefined): string; + encodeFunctionData(functionFragment: "getSample", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getSwapFeePercentage", values?: undefined): string; + encodeFunctionData(functionFragment: "getTimeWeightedAverage", values: [IPriceOracle.OracleAverageQueryStruct[]]): string; + encodeFunctionData(functionFragment: "getTokenRates", values?: undefined): string; + encodeFunctionData(functionFragment: "getTotalSamples", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "gyroConfig", values?: undefined): string; + encodeFunctionData(functionFragment: "increaseAllowance", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "onExitPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onJoinPool", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "onSwap", values: [ + IPoolSwapStructs.SwapRequestStruct, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData(functionFragment: "pauseManager", values?: undefined): string; + encodeFunctionData(functionFragment: "permit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryExit", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "queryJoin", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[], + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "rateProvider0", values?: undefined): string; + encodeFunctionData(functionFragment: "rateProvider1", values?: undefined): string; + encodeFunctionData(functionFragment: "setCapManager", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setCapParams", values: [ICappedLiquidity.CapParamsStruct]): string; + encodeFunctionData(functionFragment: "setPaused", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "setSwapFeePercentage", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ]): string; + encodeFunctionData(functionFragment: "unpause", values?: undefined): string; + decodeFunctionResult(functionFragment: "DOMAIN_SEPARATOR", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_dSq", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_paramsAlpha", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_paramsBeta", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_paramsC", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_paramsLambda", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_paramsS", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_tauAlphaX", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_tauAlphaY", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_tauBetaX", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_tauBetaY", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_u", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_v", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_w", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_z", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "capManager", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "capParams", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "changePauseManager", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decreaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "dirtyUninitializedOracleSamples", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "enableOracle", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getECLPParams", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getInvariant", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLargestSafeQueryWindow", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLastInvariant", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLatest", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getMiscData", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getNormalizedWeights", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPastAccumulators", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPausedState", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPoolId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPrice", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getSample", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTimeWeightedAverage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTokenRates", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getTotalSamples", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gyroConfig", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increaseAllowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onExitPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onJoinPool", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onSwap", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pauseManager", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryExit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queryJoin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "rateProvider0", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "rateProvider1", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setCapManager", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setCapParams", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setPaused", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setSwapFeePercentage", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "CapManagerUpdated(address)": EventFragment; + "CapParamsUpdated(tuple)": EventFragment; + "ECLPDerivedParamsValidated(bool)": EventFragment; + "ECLPParamsValidated(bool)": EventFragment; + "InvariantAterInitializeJoin(uint256)": EventFragment; + "InvariantOldAndNew(uint256,uint256)": EventFragment; + "OracleEnabledChanged(bool)": EventFragment; + "OracleIndexUpdated(uint256)": EventFragment; + "PauseManagerChanged(address,address)": EventFragment; + "PausedLocally()": EventFragment; + "PausedStateChanged(bool)": EventFragment; + "SwapFeePercentageChanged(uint256)": EventFragment; + "SwapParams(uint256[],tuple,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + "UnpausedLocally()": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "CapManagerUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "CapParamsUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ECLPDerivedParamsValidated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ECLPParamsValidated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "InvariantAterInitializeJoin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "InvariantOldAndNew"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OracleEnabledChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OracleIndexUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PauseManagerChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PausedLocally"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PausedStateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SwapFeePercentageChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SwapParams"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UnpausedLocally"): EventFragment; +} +interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber$1; +} +type ApprovalEvent = TypedEvent<[ + string, + string, + BigNumber$1 +], ApprovalEventObject>; +type ApprovalEventFilter = TypedEventFilter; +interface CapManagerUpdatedEventObject { + capManager: string; +} +type CapManagerUpdatedEvent = TypedEvent<[ + string +], CapManagerUpdatedEventObject>; +type CapManagerUpdatedEventFilter = TypedEventFilter; +interface CapParamsUpdatedEventObject { + params: ICappedLiquidity.CapParamsStructOutput; +} +type CapParamsUpdatedEvent = TypedEvent<[ + ICappedLiquidity.CapParamsStructOutput +], CapParamsUpdatedEventObject>; +type CapParamsUpdatedEventFilter = TypedEventFilter; +interface ECLPDerivedParamsValidatedEventObject { + derivedParamsValidated: boolean; +} +type ECLPDerivedParamsValidatedEvent = TypedEvent<[ + boolean +], ECLPDerivedParamsValidatedEventObject>; +type ECLPDerivedParamsValidatedEventFilter = TypedEventFilter; +interface ECLPParamsValidatedEventObject { + paramsValidated: boolean; +} +type ECLPParamsValidatedEvent = TypedEvent<[ + boolean +], ECLPParamsValidatedEventObject>; +type ECLPParamsValidatedEventFilter = TypedEventFilter; +interface InvariantAterInitializeJoinEventObject { + invariantAfterJoin: BigNumber$1; +} +type InvariantAterInitializeJoinEvent = TypedEvent<[ + BigNumber$1 +], InvariantAterInitializeJoinEventObject>; +type InvariantAterInitializeJoinEventFilter = TypedEventFilter; +interface InvariantOldAndNewEventObject { + oldInvariant: BigNumber$1; + newInvariant: BigNumber$1; +} +type InvariantOldAndNewEvent = TypedEvent<[ + BigNumber$1, + BigNumber$1 +], InvariantOldAndNewEventObject>; +type InvariantOldAndNewEventFilter = TypedEventFilter; +interface OracleEnabledChangedEventObject { + enabled: boolean; +} +type OracleEnabledChangedEvent = TypedEvent<[ + boolean +], OracleEnabledChangedEventObject>; +type OracleEnabledChangedEventFilter = TypedEventFilter; +interface OracleIndexUpdatedEventObject { + oracleUpdatedIndex: BigNumber$1; +} +type OracleIndexUpdatedEvent = TypedEvent<[ + BigNumber$1 +], OracleIndexUpdatedEventObject>; +type OracleIndexUpdatedEventFilter = TypedEventFilter; +interface PauseManagerChangedEventObject { + oldPauseManager: string; + newPauseManager: string; +} +type PauseManagerChangedEvent = TypedEvent<[ + string, + string +], PauseManagerChangedEventObject>; +type PauseManagerChangedEventFilter = TypedEventFilter; +interface PausedLocallyEventObject { +} +type PausedLocallyEvent = TypedEvent<[], PausedLocallyEventObject>; +type PausedLocallyEventFilter = TypedEventFilter; +interface PausedStateChangedEventObject { + paused: boolean; +} +type PausedStateChangedEvent = TypedEvent<[ + boolean +], PausedStateChangedEventObject>; +type PausedStateChangedEventFilter = TypedEventFilter; +interface SwapFeePercentageChangedEventObject { + swapFeePercentage: BigNumber$1; +} +type SwapFeePercentageChangedEvent = TypedEvent<[ + BigNumber$1 +], SwapFeePercentageChangedEventObject>; +type SwapFeePercentageChangedEventFilter = TypedEventFilter; +interface SwapParamsEventObject { + balances: BigNumber$1[]; + invariant: GyroECLPMath.Vector2StructOutput; + amount: BigNumber$1; +} +type SwapParamsEvent = TypedEvent<[ + BigNumber$1[], + GyroECLPMath.Vector2StructOutput, + BigNumber$1 +], SwapParamsEventObject>; +type SwapParamsEventFilter = TypedEventFilter; +interface TransferEventObject { + from: string; + to: string; + value: BigNumber$1; +} +type TransferEvent = TypedEvent<[ + string, + string, + BigNumber$1 +], TransferEventObject>; +type TransferEventFilter = TypedEventFilter; +interface UnpausedLocallyEventObject { +} +type UnpausedLocallyEvent = TypedEvent<[], UnpausedLocallyEventObject>; +type UnpausedLocallyEventFilter = TypedEventFilter; +interface GyroEV2 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: GyroEV2Interface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + _dSq(overrides?: CallOverrides): Promise<[BigNumber$1]>; + _paramsAlpha(overrides?: CallOverrides): Promise<[BigNumber$1]>; + _paramsBeta(overrides?: CallOverrides): Promise<[BigNumber$1]>; + _paramsC(overrides?: CallOverrides): Promise<[BigNumber$1]>; + _paramsLambda(overrides?: CallOverrides): Promise<[BigNumber$1]>; + _paramsS(overrides?: CallOverrides): Promise<[BigNumber$1]>; + _tauAlphaX(overrides?: CallOverrides): Promise<[BigNumber$1]>; + _tauAlphaY(overrides?: CallOverrides): Promise<[BigNumber$1]>; + _tauBetaX(overrides?: CallOverrides): Promise<[BigNumber$1]>; + _tauBetaY(overrides?: CallOverrides): Promise<[BigNumber$1]>; + _u(overrides?: CallOverrides): Promise<[BigNumber$1]>; + _v(overrides?: CallOverrides): Promise<[BigNumber$1]>; + _w(overrides?: CallOverrides): Promise<[BigNumber$1]>; + _z(overrides?: CallOverrides): Promise<[BigNumber$1]>; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + capManager(overrides?: CallOverrides): Promise<[string]>; + capParams(overrides?: CallOverrides): Promise<[ICappedLiquidity.CapParamsStructOutput]>; + changePauseManager(_pauseManager: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + decimals(overrides?: CallOverrides): Promise<[number]>; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + dirtyUninitializedOracleSamples(startIndex: PromiseOrValue, endIndex: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableOracle(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getECLPParams(overrides?: CallOverrides): Promise<[ + GyroECLPMath.ParamsStructOutput, + GyroECLPMath.DerivedParamsStructOutput + ] & { + params: GyroECLPMath.ParamsStructOutput; + d: GyroECLPMath.DerivedParamsStructOutput; + }>; + getInvariant(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getLargestSafeQueryWindow(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getLastInvariant(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getLatest(variable: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + getMiscData(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + boolean, + BigNumber$1 + ] & { + logInvariant: BigNumber$1; + logTotalSupply: BigNumber$1; + oracleSampleCreationTimestamp: BigNumber$1; + oracleIndex: BigNumber$1; + oracleEnabled: boolean; + swapFeePercentage: BigNumber$1; + }>; + getNormalizedWeights(overrides?: CallOverrides): Promise<[BigNumber$1[]]>; + getOwner(overrides?: CallOverrides): Promise<[string]>; + getPastAccumulators(queries: IPriceOracle.OracleAccumulatorQueryStruct[], overrides?: CallOverrides): Promise<[BigNumber$1[]] & { + results: BigNumber$1[]; + }>; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise<[string]>; + getPrice(overrides?: CallOverrides): Promise<[BigNumber$1] & { + spotPrice: BigNumber$1; + }>; + getRate(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getSample(index: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + logPairPrice: BigNumber$1; + accLogPairPrice: BigNumber$1; + logBptPrice: BigNumber$1; + accLogBptPrice: BigNumber$1; + logInvariant: BigNumber$1; + accLogInvariant: BigNumber$1; + timestamp: BigNumber$1; + }>; + getSwapFeePercentage(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getTimeWeightedAverage(queries: IPriceOracle.OracleAverageQueryStruct[], overrides?: CallOverrides): Promise<[BigNumber$1[]] & { + results: BigNumber$1[]; + }>; + getTokenRates(overrides?: CallOverrides): Promise<[BigNumber$1, BigNumber$1] & { + rate0: BigNumber$1; + rate1: BigNumber$1; + }>; + getTotalSamples(overrides?: CallOverrides): Promise<[BigNumber$1]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + gyroConfig(overrides?: CallOverrides): Promise<[string]>; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise<[string]>; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(request: IPoolSwapStructs.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pauseManager(overrides?: CallOverrides): Promise<[string]>; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptIn: BigNumber$1; + amountsOut: BigNumber$1[]; + }>; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptOut: BigNumber$1; + amountsIn: BigNumber$1[]; + }>; + rateProvider0(overrides?: CallOverrides): Promise<[string]>; + rateProvider1(overrides?: CallOverrides): Promise<[string]>; + setCapManager(_capManager: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setCapParams(params: ICappedLiquidity.CapParamsStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + _dSq(overrides?: CallOverrides): Promise; + _paramsAlpha(overrides?: CallOverrides): Promise; + _paramsBeta(overrides?: CallOverrides): Promise; + _paramsC(overrides?: CallOverrides): Promise; + _paramsLambda(overrides?: CallOverrides): Promise; + _paramsS(overrides?: CallOverrides): Promise; + _tauAlphaX(overrides?: CallOverrides): Promise; + _tauAlphaY(overrides?: CallOverrides): Promise; + _tauBetaX(overrides?: CallOverrides): Promise; + _tauBetaY(overrides?: CallOverrides): Promise; + _u(overrides?: CallOverrides): Promise; + _v(overrides?: CallOverrides): Promise; + _w(overrides?: CallOverrides): Promise; + _z(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + capManager(overrides?: CallOverrides): Promise; + capParams(overrides?: CallOverrides): Promise; + changePauseManager(_pauseManager: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + dirtyUninitializedOracleSamples(startIndex: PromiseOrValue, endIndex: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableOracle(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getECLPParams(overrides?: CallOverrides): Promise<[ + GyroECLPMath.ParamsStructOutput, + GyroECLPMath.DerivedParamsStructOutput + ] & { + params: GyroECLPMath.ParamsStructOutput; + d: GyroECLPMath.DerivedParamsStructOutput; + }>; + getInvariant(overrides?: CallOverrides): Promise; + getLargestSafeQueryWindow(overrides?: CallOverrides): Promise; + getLastInvariant(overrides?: CallOverrides): Promise; + getLatest(variable: PromiseOrValue, overrides?: CallOverrides): Promise; + getMiscData(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + boolean, + BigNumber$1 + ] & { + logInvariant: BigNumber$1; + logTotalSupply: BigNumber$1; + oracleSampleCreationTimestamp: BigNumber$1; + oracleIndex: BigNumber$1; + oracleEnabled: boolean; + swapFeePercentage: BigNumber$1; + }>; + getNormalizedWeights(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPastAccumulators(queries: IPriceOracle.OracleAccumulatorQueryStruct[], overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getPrice(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getSample(index: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + logPairPrice: BigNumber$1; + accLogPairPrice: BigNumber$1; + logBptPrice: BigNumber$1; + accLogBptPrice: BigNumber$1; + logInvariant: BigNumber$1; + accLogInvariant: BigNumber$1; + timestamp: BigNumber$1; + }>; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTimeWeightedAverage(queries: IPriceOracle.OracleAverageQueryStruct[], overrides?: CallOverrides): Promise; + getTokenRates(overrides?: CallOverrides): Promise<[BigNumber$1, BigNumber$1] & { + rate0: BigNumber$1; + rate1: BigNumber$1; + }>; + getTotalSamples(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + gyroConfig(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(request: IPoolSwapStructs.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pauseManager(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptIn: BigNumber$1; + amountsOut: BigNumber$1[]; + }>; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptOut: BigNumber$1; + amountsIn: BigNumber$1[]; + }>; + rateProvider0(overrides?: CallOverrides): Promise; + rateProvider1(overrides?: CallOverrides): Promise; + setCapManager(_capManager: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setCapParams(params: ICappedLiquidity.CapParamsStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + _dSq(overrides?: CallOverrides): Promise; + _paramsAlpha(overrides?: CallOverrides): Promise; + _paramsBeta(overrides?: CallOverrides): Promise; + _paramsC(overrides?: CallOverrides): Promise; + _paramsLambda(overrides?: CallOverrides): Promise; + _paramsS(overrides?: CallOverrides): Promise; + _tauAlphaX(overrides?: CallOverrides): Promise; + _tauAlphaY(overrides?: CallOverrides): Promise; + _tauBetaX(overrides?: CallOverrides): Promise; + _tauBetaY(overrides?: CallOverrides): Promise; + _u(overrides?: CallOverrides): Promise; + _v(overrides?: CallOverrides): Promise; + _w(overrides?: CallOverrides): Promise; + _z(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + capManager(overrides?: CallOverrides): Promise; + capParams(overrides?: CallOverrides): Promise; + changePauseManager(_pauseManager: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + dirtyUninitializedOracleSamples(startIndex: PromiseOrValue, endIndex: PromiseOrValue, overrides?: CallOverrides): Promise; + enableOracle(overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getECLPParams(overrides?: CallOverrides): Promise<[ + GyroECLPMath.ParamsStructOutput, + GyroECLPMath.DerivedParamsStructOutput + ] & { + params: GyroECLPMath.ParamsStructOutput; + d: GyroECLPMath.DerivedParamsStructOutput; + }>; + getInvariant(overrides?: CallOverrides): Promise; + getLargestSafeQueryWindow(overrides?: CallOverrides): Promise; + getLastInvariant(overrides?: CallOverrides): Promise; + getLatest(variable: PromiseOrValue, overrides?: CallOverrides): Promise; + getMiscData(overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + boolean, + BigNumber$1 + ] & { + logInvariant: BigNumber$1; + logTotalSupply: BigNumber$1; + oracleSampleCreationTimestamp: BigNumber$1; + oracleIndex: BigNumber$1; + oracleEnabled: boolean; + swapFeePercentage: BigNumber$1; + }>; + getNormalizedWeights(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPastAccumulators(queries: IPriceOracle.OracleAccumulatorQueryStruct[], overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise<[ + boolean, + BigNumber$1, + BigNumber$1 + ] & { + paused: boolean; + pauseWindowEndTime: BigNumber$1; + bufferPeriodEndTime: BigNumber$1; + }>; + getPoolId(overrides?: CallOverrides): Promise; + getPrice(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getSample(index: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + logPairPrice: BigNumber$1; + accLogPairPrice: BigNumber$1; + logBptPrice: BigNumber$1; + accLogBptPrice: BigNumber$1; + logInvariant: BigNumber$1; + accLogInvariant: BigNumber$1; + timestamp: BigNumber$1; + }>; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTimeWeightedAverage(queries: IPriceOracle.OracleAverageQueryStruct[], overrides?: CallOverrides): Promise; + getTokenRates(overrides?: CallOverrides): Promise<[BigNumber$1, BigNumber$1] & { + rate0: BigNumber$1; + rate1: BigNumber$1; + }>; + getTotalSamples(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + gyroConfig(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1[], BigNumber$1[]]>; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1[], + BigNumber$1[] + ] & { + amountsIn: BigNumber$1[]; + dueProtocolFeeAmounts: BigNumber$1[]; + }>; + onSwap(request: IPoolSwapStructs.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: CallOverrides): Promise; + pause(overrides?: CallOverrides): Promise; + pauseManager(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: CallOverrides): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptIn: BigNumber$1; + amountsOut: BigNumber$1[]; + }>; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1[] + ] & { + bptOut: BigNumber$1; + amountsIn: BigNumber$1[]; + }>; + rateProvider0(overrides?: CallOverrides): Promise; + rateProvider1(overrides?: CallOverrides): Promise; + setCapManager(_capManager: PromiseOrValue, overrides?: CallOverrides): Promise; + setCapParams(params: ICappedLiquidity.CapParamsStruct, overrides?: CallOverrides): Promise; + setPaused(paused: PromiseOrValue, overrides?: CallOverrides): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: CallOverrides): Promise; + unpause(overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter; + Approval(owner?: PromiseOrValue | null, spender?: PromiseOrValue | null, value?: null): ApprovalEventFilter; + "CapManagerUpdated(address)"(capManager?: null): CapManagerUpdatedEventFilter; + CapManagerUpdated(capManager?: null): CapManagerUpdatedEventFilter; + "CapParamsUpdated(tuple)"(params?: null): CapParamsUpdatedEventFilter; + CapParamsUpdated(params?: null): CapParamsUpdatedEventFilter; + "ECLPDerivedParamsValidated(bool)"(derivedParamsValidated?: null): ECLPDerivedParamsValidatedEventFilter; + ECLPDerivedParamsValidated(derivedParamsValidated?: null): ECLPDerivedParamsValidatedEventFilter; + "ECLPParamsValidated(bool)"(paramsValidated?: null): ECLPParamsValidatedEventFilter; + ECLPParamsValidated(paramsValidated?: null): ECLPParamsValidatedEventFilter; + "InvariantAterInitializeJoin(uint256)"(invariantAfterJoin?: null): InvariantAterInitializeJoinEventFilter; + InvariantAterInitializeJoin(invariantAfterJoin?: null): InvariantAterInitializeJoinEventFilter; + "InvariantOldAndNew(uint256,uint256)"(oldInvariant?: null, newInvariant?: null): InvariantOldAndNewEventFilter; + InvariantOldAndNew(oldInvariant?: null, newInvariant?: null): InvariantOldAndNewEventFilter; + "OracleEnabledChanged(bool)"(enabled?: null): OracleEnabledChangedEventFilter; + OracleEnabledChanged(enabled?: null): OracleEnabledChangedEventFilter; + "OracleIndexUpdated(uint256)"(oracleUpdatedIndex?: null): OracleIndexUpdatedEventFilter; + OracleIndexUpdated(oracleUpdatedIndex?: null): OracleIndexUpdatedEventFilter; + "PauseManagerChanged(address,address)"(oldPauseManager?: null, newPauseManager?: null): PauseManagerChangedEventFilter; + PauseManagerChanged(oldPauseManager?: null, newPauseManager?: null): PauseManagerChangedEventFilter; + "PausedLocally()"(): PausedLocallyEventFilter; + PausedLocally(): PausedLocallyEventFilter; + "PausedStateChanged(bool)"(paused?: null): PausedStateChangedEventFilter; + PausedStateChanged(paused?: null): PausedStateChangedEventFilter; + "SwapFeePercentageChanged(uint256)"(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter; + SwapFeePercentageChanged(swapFeePercentage?: null): SwapFeePercentageChangedEventFilter; + "SwapParams(uint256[],tuple,uint256)"(balances?: null, invariant?: null, amount?: null): SwapParamsEventFilter; + SwapParams(balances?: null, invariant?: null, amount?: null): SwapParamsEventFilter; + "Transfer(address,address,uint256)"(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter; + Transfer(from?: PromiseOrValue | null, to?: PromiseOrValue | null, value?: null): TransferEventFilter; + "UnpausedLocally()"(): UnpausedLocallyEventFilter; + UnpausedLocally(): UnpausedLocallyEventFilter; + }; + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + _dSq(overrides?: CallOverrides): Promise; + _paramsAlpha(overrides?: CallOverrides): Promise; + _paramsBeta(overrides?: CallOverrides): Promise; + _paramsC(overrides?: CallOverrides): Promise; + _paramsLambda(overrides?: CallOverrides): Promise; + _paramsS(overrides?: CallOverrides): Promise; + _tauAlphaX(overrides?: CallOverrides): Promise; + _tauAlphaY(overrides?: CallOverrides): Promise; + _tauBetaX(overrides?: CallOverrides): Promise; + _tauBetaY(overrides?: CallOverrides): Promise; + _u(overrides?: CallOverrides): Promise; + _v(overrides?: CallOverrides): Promise; + _w(overrides?: CallOverrides): Promise; + _z(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + capManager(overrides?: CallOverrides): Promise; + capParams(overrides?: CallOverrides): Promise; + changePauseManager(_pauseManager: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + dirtyUninitializedOracleSamples(startIndex: PromiseOrValue, endIndex: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableOracle(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getECLPParams(overrides?: CallOverrides): Promise; + getInvariant(overrides?: CallOverrides): Promise; + getLargestSafeQueryWindow(overrides?: CallOverrides): Promise; + getLastInvariant(overrides?: CallOverrides): Promise; + getLatest(variable: PromiseOrValue, overrides?: CallOverrides): Promise; + getMiscData(overrides?: CallOverrides): Promise; + getNormalizedWeights(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPastAccumulators(queries: IPriceOracle.OracleAccumulatorQueryStruct[], overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getPrice(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getSample(index: PromiseOrValue, overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTimeWeightedAverage(queries: IPriceOracle.OracleAverageQueryStruct[], overrides?: CallOverrides): Promise; + getTokenRates(overrides?: CallOverrides): Promise; + getTotalSamples(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + gyroConfig(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(request: IPoolSwapStructs.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pauseManager(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise; + rateProvider0(overrides?: CallOverrides): Promise; + rateProvider1(overrides?: CallOverrides): Promise; + setCapManager(_capManager: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setCapParams(params: ICappedLiquidity.CapParamsStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + _dSq(overrides?: CallOverrides): Promise; + _paramsAlpha(overrides?: CallOverrides): Promise; + _paramsBeta(overrides?: CallOverrides): Promise; + _paramsC(overrides?: CallOverrides): Promise; + _paramsLambda(overrides?: CallOverrides): Promise; + _paramsS(overrides?: CallOverrides): Promise; + _tauAlphaX(overrides?: CallOverrides): Promise; + _tauAlphaY(overrides?: CallOverrides): Promise; + _tauBetaX(overrides?: CallOverrides): Promise; + _tauBetaY(overrides?: CallOverrides): Promise; + _u(overrides?: CallOverrides): Promise; + _v(overrides?: CallOverrides): Promise; + _w(overrides?: CallOverrides): Promise; + _z(overrides?: CallOverrides): Promise; + allowance(owner: PromiseOrValue, spender: PromiseOrValue, overrides?: CallOverrides): Promise; + approve(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; + capManager(overrides?: CallOverrides): Promise; + capParams(overrides?: CallOverrides): Promise; + changePauseManager(_pauseManager: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + decimals(overrides?: CallOverrides): Promise; + decreaseAllowance(spender: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + dirtyUninitializedOracleSamples(startIndex: PromiseOrValue, endIndex: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + enableOracle(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getECLPParams(overrides?: CallOverrides): Promise; + getInvariant(overrides?: CallOverrides): Promise; + getLargestSafeQueryWindow(overrides?: CallOverrides): Promise; + getLastInvariant(overrides?: CallOverrides): Promise; + getLatest(variable: PromiseOrValue, overrides?: CallOverrides): Promise; + getMiscData(overrides?: CallOverrides): Promise; + getNormalizedWeights(overrides?: CallOverrides): Promise; + getOwner(overrides?: CallOverrides): Promise; + getPastAccumulators(queries: IPriceOracle.OracleAccumulatorQueryStruct[], overrides?: CallOverrides): Promise; + getPausedState(overrides?: CallOverrides): Promise; + getPoolId(overrides?: CallOverrides): Promise; + getPrice(overrides?: CallOverrides): Promise; + getRate(overrides?: CallOverrides): Promise; + getSample(index: PromiseOrValue, overrides?: CallOverrides): Promise; + getSwapFeePercentage(overrides?: CallOverrides): Promise; + getTimeWeightedAverage(queries: IPriceOracle.OracleAverageQueryStruct[], overrides?: CallOverrides): Promise; + getTokenRates(overrides?: CallOverrides): Promise; + getTotalSamples(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + gyroConfig(overrides?: CallOverrides): Promise; + increaseAllowance(spender: PromiseOrValue, addedValue: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + name(overrides?: CallOverrides): Promise; + nonces(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + onExitPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onJoinPool(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + onSwap(request: IPoolSwapStructs.SwapRequestStruct, balanceTokenIn: PromiseOrValue, balanceTokenOut: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + pauseManager(overrides?: CallOverrides): Promise; + permit(owner: PromiseOrValue, spender: PromiseOrValue, value: PromiseOrValue, deadline: PromiseOrValue, v: PromiseOrValue, r: PromiseOrValue, s: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + queryExit(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise; + queryJoin(poolId: PromiseOrValue, sender: PromiseOrValue, recipient: PromiseOrValue, balances: PromiseOrValue[], lastChangeBlock: PromiseOrValue, protocolSwapFeePercentage: PromiseOrValue, userData: PromiseOrValue, overrides?: CallOverrides): Promise; + rateProvider0(overrides?: CallOverrides): Promise; + rateProvider1(overrides?: CallOverrides): Promise; + setCapManager(_capManager: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setCapParams(params: ICappedLiquidity.CapParamsStruct, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setPaused(paused: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setSwapFeePercentage(swapFeePercentage: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + transferFrom(sender: PromiseOrValue, recipient: PromiseOrValue, amount: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + unpause(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +interface VeBalInterface extends utils.Interface { + functions: { + "token()": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "decimals()": FunctionFragment; + "admin()": FunctionFragment; + "commit_smart_wallet_checker(address)": FunctionFragment; + "apply_smart_wallet_checker()": FunctionFragment; + "get_last_user_slope(address)": FunctionFragment; + "user_point_history__ts(address,uint256)": FunctionFragment; + "locked__end(address)": FunctionFragment; + "checkpoint()": FunctionFragment; + "deposit_for(address,uint256)": FunctionFragment; + "create_lock(uint256,uint256)": FunctionFragment; + "increase_amount(uint256)": FunctionFragment; + "increase_unlock_time(uint256)": FunctionFragment; + "withdraw()": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "balanceOf(address,uint256)": FunctionFragment; + "balanceOfAt(address,uint256)": FunctionFragment; + "totalSupply()": FunctionFragment; + "totalSupply(uint256)": FunctionFragment; + "totalSupplyAt(uint256)": FunctionFragment; + "supply()": FunctionFragment; + "locked(address)": FunctionFragment; + "epoch()": FunctionFragment; + "point_history(uint256)": FunctionFragment; + "user_point_history(address,uint256)": FunctionFragment; + "user_point_epoch(address)": FunctionFragment; + "slope_changes(uint256)": FunctionFragment; + "future_smart_wallet_checker()": FunctionFragment; + "smart_wallet_checker()": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "token" | "name" | "symbol" | "decimals" | "admin" | "commit_smart_wallet_checker" | "apply_smart_wallet_checker" | "get_last_user_slope" | "user_point_history__ts" | "locked__end" | "checkpoint" | "deposit_for" | "create_lock" | "increase_amount" | "increase_unlock_time" | "withdraw" | "balanceOf(address)" | "balanceOf(address,uint256)" | "balanceOfAt" | "totalSupply()" | "totalSupply(uint256)" | "totalSupplyAt" | "supply" | "locked" | "epoch" | "point_history" | "user_point_history" | "user_point_epoch" | "slope_changes" | "future_smart_wallet_checker" | "smart_wallet_checker"): FunctionFragment; + encodeFunctionData(functionFragment: "token", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData(functionFragment: "commit_smart_wallet_checker", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "apply_smart_wallet_checker", values?: undefined): string; + encodeFunctionData(functionFragment: "get_last_user_slope", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "user_point_history__ts", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "locked__end", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "checkpoint", values?: undefined): string; + encodeFunctionData(functionFragment: "deposit_for", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "create_lock", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "increase_amount", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "increase_unlock_time", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "withdraw", values?: undefined): string; + encodeFunctionData(functionFragment: "balanceOf(address)", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOf(address,uint256)", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "balanceOfAt", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "totalSupply()", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply(uint256)", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "totalSupplyAt", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "supply", values?: undefined): string; + encodeFunctionData(functionFragment: "locked", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "epoch", values?: undefined): string; + encodeFunctionData(functionFragment: "point_history", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "user_point_history", values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: "user_point_epoch", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "slope_changes", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "future_smart_wallet_checker", values?: undefined): string; + encodeFunctionData(functionFragment: "smart_wallet_checker", values?: undefined): string; + decodeFunctionResult(functionFragment: "token", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "commit_smart_wallet_checker", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "apply_smart_wallet_checker", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "get_last_user_slope", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "user_point_history__ts", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "locked__end", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "checkpoint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deposit_for", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "create_lock", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increase_amount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "increase_unlock_time", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf(address)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf(address,uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOfAt", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply()", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply(uint256)", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupplyAt", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "supply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "locked", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "epoch", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "point_history", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "user_point_history", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "user_point_epoch", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "slope_changes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "future_smart_wallet_checker", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "smart_wallet_checker", data: BytesLike): Result; + events: { + "Deposit(address,uint256,uint256,int128,uint256)": EventFragment; + "Withdraw(address,uint256,uint256)": EventFragment; + "Supply(uint256,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Deposit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdraw"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Supply"): EventFragment; +} +interface DepositEventObject { + provider: string; + value: BigNumber$1; + locktime: BigNumber$1; + type: BigNumber$1; + ts: BigNumber$1; +} +type DepositEvent = TypedEvent<[ + string, + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 +], DepositEventObject>; +type DepositEventFilter = TypedEventFilter; +interface WithdrawEventObject { + provider: string; + value: BigNumber$1; + ts: BigNumber$1; +} +type WithdrawEvent = TypedEvent<[ + string, + BigNumber$1, + BigNumber$1 +], WithdrawEventObject>; +type WithdrawEventFilter = TypedEventFilter; +interface SupplyEventObject { + prevSupply: BigNumber$1; + supply: BigNumber$1; +} +type SupplyEvent = TypedEvent<[BigNumber$1, BigNumber$1], SupplyEventObject>; +type SupplyEventFilter = TypedEventFilter; +interface VeBal$1 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: VeBalInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + token(overrides?: CallOverrides): Promise<[string]>; + name(overrides?: CallOverrides): Promise<[string]>; + symbol(overrides?: CallOverrides): Promise<[string]>; + decimals(overrides?: CallOverrides): Promise<[BigNumber$1]>; + admin(overrides?: CallOverrides): Promise<[string]>; + commit_smart_wallet_checker(addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + apply_smart_wallet_checker(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + get_last_user_slope(addr: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + user_point_history__ts(_addr: PromiseOrValue, _idx: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + locked__end(_addr: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + checkpoint(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + deposit_for(_addr: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + create_lock(_value: PromiseOrValue, _unlock_time: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + increase_amount(_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + increase_unlock_time(_unlock_time: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + withdraw(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "balanceOf(address)"(addr: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + "balanceOf(address,uint256)"(addr: PromiseOrValue, _t: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + balanceOfAt(addr: PromiseOrValue, _block: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber$1]>; + "totalSupply(uint256)"(t: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + totalSupplyAt(_block: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + supply(overrides?: CallOverrides): Promise<[BigNumber$1]>; + locked(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[ + [BigNumber$1, BigNumber$1] & { + amount: BigNumber$1; + end: BigNumber$1; + } + ]>; + epoch(overrides?: CallOverrides): Promise<[BigNumber$1]>; + point_history(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[ + [ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + bias: BigNumber$1; + slope: BigNumber$1; + ts: BigNumber$1; + blk: BigNumber$1; + } + ]>; + user_point_history(arg0: PromiseOrValue, arg1: PromiseOrValue, overrides?: CallOverrides): Promise<[ + [ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + bias: BigNumber$1; + slope: BigNumber$1; + ts: BigNumber$1; + blk: BigNumber$1; + } + ]>; + user_point_epoch(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + slope_changes(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + future_smart_wallet_checker(overrides?: CallOverrides): Promise<[string]>; + smart_wallet_checker(overrides?: CallOverrides): Promise<[string]>; + }; + token(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + admin(overrides?: CallOverrides): Promise; + commit_smart_wallet_checker(addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + apply_smart_wallet_checker(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + get_last_user_slope(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + user_point_history__ts(_addr: PromiseOrValue, _idx: PromiseOrValue, overrides?: CallOverrides): Promise; + locked__end(_addr: PromiseOrValue, overrides?: CallOverrides): Promise; + checkpoint(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + deposit_for(_addr: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + create_lock(_value: PromiseOrValue, _unlock_time: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + increase_amount(_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + increase_unlock_time(_unlock_time: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + withdraw(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "balanceOf(address)"(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + "balanceOf(address,uint256)"(addr: PromiseOrValue, _t: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOfAt(addr: PromiseOrValue, _block: PromiseOrValue, overrides?: CallOverrides): Promise; + "totalSupply()"(overrides?: CallOverrides): Promise; + "totalSupply(uint256)"(t: PromiseOrValue, overrides?: CallOverrides): Promise; + totalSupplyAt(_block: PromiseOrValue, overrides?: CallOverrides): Promise; + supply(overrides?: CallOverrides): Promise; + locked(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1, BigNumber$1] & { + amount: BigNumber$1; + end: BigNumber$1; + }>; + epoch(overrides?: CallOverrides): Promise; + point_history(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + bias: BigNumber$1; + slope: BigNumber$1; + ts: BigNumber$1; + blk: BigNumber$1; + }>; + user_point_history(arg0: PromiseOrValue, arg1: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + bias: BigNumber$1; + slope: BigNumber$1; + ts: BigNumber$1; + blk: BigNumber$1; + }>; + user_point_epoch(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + slope_changes(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + future_smart_wallet_checker(overrides?: CallOverrides): Promise; + smart_wallet_checker(overrides?: CallOverrides): Promise; + callStatic: { + token(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + admin(overrides?: CallOverrides): Promise; + commit_smart_wallet_checker(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + apply_smart_wallet_checker(overrides?: CallOverrides): Promise; + get_last_user_slope(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + user_point_history__ts(_addr: PromiseOrValue, _idx: PromiseOrValue, overrides?: CallOverrides): Promise; + locked__end(_addr: PromiseOrValue, overrides?: CallOverrides): Promise; + checkpoint(overrides?: CallOverrides): Promise; + deposit_for(_addr: PromiseOrValue, _value: PromiseOrValue, overrides?: CallOverrides): Promise; + create_lock(_value: PromiseOrValue, _unlock_time: PromiseOrValue, overrides?: CallOverrides): Promise; + increase_amount(_value: PromiseOrValue, overrides?: CallOverrides): Promise; + increase_unlock_time(_unlock_time: PromiseOrValue, overrides?: CallOverrides): Promise; + withdraw(overrides?: CallOverrides): Promise; + "balanceOf(address)"(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + "balanceOf(address,uint256)"(addr: PromiseOrValue, _t: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOfAt(addr: PromiseOrValue, _block: PromiseOrValue, overrides?: CallOverrides): Promise; + "totalSupply()"(overrides?: CallOverrides): Promise; + "totalSupply(uint256)"(t: PromiseOrValue, overrides?: CallOverrides): Promise; + totalSupplyAt(_block: PromiseOrValue, overrides?: CallOverrides): Promise; + supply(overrides?: CallOverrides): Promise; + locked(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1, BigNumber$1] & { + amount: BigNumber$1; + end: BigNumber$1; + }>; + epoch(overrides?: CallOverrides): Promise; + point_history(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + bias: BigNumber$1; + slope: BigNumber$1; + ts: BigNumber$1; + blk: BigNumber$1; + }>; + user_point_history(arg0: PromiseOrValue, arg1: PromiseOrValue, overrides?: CallOverrides): Promise<[ + BigNumber$1, + BigNumber$1, + BigNumber$1, + BigNumber$1 + ] & { + bias: BigNumber$1; + slope: BigNumber$1; + ts: BigNumber$1; + blk: BigNumber$1; + }>; + user_point_epoch(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + slope_changes(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + future_smart_wallet_checker(overrides?: CallOverrides): Promise; + smart_wallet_checker(overrides?: CallOverrides): Promise; + }; + filters: { + "Deposit(address,uint256,uint256,int128,uint256)"(provider?: PromiseOrValue | null, value?: null, locktime?: PromiseOrValue | null, type?: null, ts?: null): DepositEventFilter; + Deposit(provider?: PromiseOrValue | null, value?: null, locktime?: PromiseOrValue | null, type?: null, ts?: null): DepositEventFilter; + "Withdraw(address,uint256,uint256)"(provider?: PromiseOrValue | null, value?: null, ts?: null): WithdrawEventFilter; + Withdraw(provider?: PromiseOrValue | null, value?: null, ts?: null): WithdrawEventFilter; + "Supply(uint256,uint256)"(prevSupply?: null, supply?: null): SupplyEventFilter; + Supply(prevSupply?: null, supply?: null): SupplyEventFilter; + }; + estimateGas: { + token(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + admin(overrides?: CallOverrides): Promise; + commit_smart_wallet_checker(addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + apply_smart_wallet_checker(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + get_last_user_slope(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + user_point_history__ts(_addr: PromiseOrValue, _idx: PromiseOrValue, overrides?: CallOverrides): Promise; + locked__end(_addr: PromiseOrValue, overrides?: CallOverrides): Promise; + checkpoint(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + deposit_for(_addr: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + create_lock(_value: PromiseOrValue, _unlock_time: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + increase_amount(_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + increase_unlock_time(_unlock_time: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + withdraw(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "balanceOf(address)"(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + "balanceOf(address,uint256)"(addr: PromiseOrValue, _t: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOfAt(addr: PromiseOrValue, _block: PromiseOrValue, overrides?: CallOverrides): Promise; + "totalSupply()"(overrides?: CallOverrides): Promise; + "totalSupply(uint256)"(t: PromiseOrValue, overrides?: CallOverrides): Promise; + totalSupplyAt(_block: PromiseOrValue, overrides?: CallOverrides): Promise; + supply(overrides?: CallOverrides): Promise; + locked(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + epoch(overrides?: CallOverrides): Promise; + point_history(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + user_point_history(arg0: PromiseOrValue, arg1: PromiseOrValue, overrides?: CallOverrides): Promise; + user_point_epoch(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + slope_changes(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + future_smart_wallet_checker(overrides?: CallOverrides): Promise; + smart_wallet_checker(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + token(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + admin(overrides?: CallOverrides): Promise; + commit_smart_wallet_checker(addr: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + apply_smart_wallet_checker(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + get_last_user_slope(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + user_point_history__ts(_addr: PromiseOrValue, _idx: PromiseOrValue, overrides?: CallOverrides): Promise; + locked__end(_addr: PromiseOrValue, overrides?: CallOverrides): Promise; + checkpoint(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + deposit_for(_addr: PromiseOrValue, _value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + create_lock(_value: PromiseOrValue, _unlock_time: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + increase_amount(_value: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + increase_unlock_time(_unlock_time: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + withdraw(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + "balanceOf(address)"(addr: PromiseOrValue, overrides?: CallOverrides): Promise; + "balanceOf(address,uint256)"(addr: PromiseOrValue, _t: PromiseOrValue, overrides?: CallOverrides): Promise; + balanceOfAt(addr: PromiseOrValue, _block: PromiseOrValue, overrides?: CallOverrides): Promise; + "totalSupply()"(overrides?: CallOverrides): Promise; + "totalSupply(uint256)"(t: PromiseOrValue, overrides?: CallOverrides): Promise; + totalSupplyAt(_block: PromiseOrValue, overrides?: CallOverrides): Promise; + supply(overrides?: CallOverrides): Promise; + locked(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + epoch(overrides?: CallOverrides): Promise; + point_history(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + user_point_history(arg0: PromiseOrValue, arg1: PromiseOrValue, overrides?: CallOverrides): Promise; + user_point_epoch(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + slope_changes(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + future_smart_wallet_checker(overrides?: CallOverrides): Promise; + smart_wallet_checker(overrides?: CallOverrides): Promise; + }; +} + +interface VeDelegationProxyInterface extends utils.Interface { + functions: { + "adjustedBalanceOf(address)": FunctionFragment; + "adjusted_balance_of(address)": FunctionFragment; + "getActionId(bytes4)": FunctionFragment; + "getAuthorizer()": FunctionFragment; + "getDelegationImplementation()": FunctionFragment; + "getVault()": FunctionFragment; + "getVotingEscrow()": FunctionFragment; + "killDelegation()": FunctionFragment; + "setDelegation(address)": FunctionFragment; + }; + getFunction(nameOrSignatureOrTopic: "adjustedBalanceOf" | "adjusted_balance_of" | "getActionId" | "getAuthorizer" | "getDelegationImplementation" | "getVault" | "getVotingEscrow" | "killDelegation" | "setDelegation"): FunctionFragment; + encodeFunctionData(functionFragment: "adjustedBalanceOf", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "adjusted_balance_of", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getActionId", values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: "getAuthorizer", values?: undefined): string; + encodeFunctionData(functionFragment: "getDelegationImplementation", values?: undefined): string; + encodeFunctionData(functionFragment: "getVault", values?: undefined): string; + encodeFunctionData(functionFragment: "getVotingEscrow", values?: undefined): string; + encodeFunctionData(functionFragment: "killDelegation", values?: undefined): string; + encodeFunctionData(functionFragment: "setDelegation", values: [PromiseOrValue]): string; + decodeFunctionResult(functionFragment: "adjustedBalanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "adjusted_balance_of", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActionId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAuthorizer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDelegationImplementation", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVault", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotingEscrow", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "killDelegation", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setDelegation", data: BytesLike): Result; + events: { + "DelegationImplementationUpdated(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "DelegationImplementationUpdated"): EventFragment; +} +interface DelegationImplementationUpdatedEventObject { + newImplementation: string; +} +type DelegationImplementationUpdatedEvent = TypedEvent<[ + string +], DelegationImplementationUpdatedEventObject>; +type DelegationImplementationUpdatedEventFilter = TypedEventFilter; +interface VeDelegationProxy extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: VeDelegationProxyInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + adjustedBalanceOf(user: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + adjusted_balance_of(user: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber$1]>; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise<[string]>; + getAuthorizer(overrides?: CallOverrides): Promise<[string]>; + getDelegationImplementation(overrides?: CallOverrides): Promise<[string]>; + getVault(overrides?: CallOverrides): Promise<[string]>; + getVotingEscrow(overrides?: CallOverrides): Promise<[string]>; + killDelegation(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setDelegation(delegation: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + adjustedBalanceOf(user: PromiseOrValue, overrides?: CallOverrides): Promise; + adjusted_balance_of(user: PromiseOrValue, overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getDelegationImplementation(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVotingEscrow(overrides?: CallOverrides): Promise; + killDelegation(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setDelegation(delegation: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + callStatic: { + adjustedBalanceOf(user: PromiseOrValue, overrides?: CallOverrides): Promise; + adjusted_balance_of(user: PromiseOrValue, overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getDelegationImplementation(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVotingEscrow(overrides?: CallOverrides): Promise; + killDelegation(overrides?: CallOverrides): Promise; + setDelegation(delegation: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + filters: { + "DelegationImplementationUpdated(address)"(newImplementation?: PromiseOrValue | null): DelegationImplementationUpdatedEventFilter; + DelegationImplementationUpdated(newImplementation?: PromiseOrValue | null): DelegationImplementationUpdatedEventFilter; + }; + estimateGas: { + adjustedBalanceOf(user: PromiseOrValue, overrides?: CallOverrides): Promise; + adjusted_balance_of(user: PromiseOrValue, overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getDelegationImplementation(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVotingEscrow(overrides?: CallOverrides): Promise; + killDelegation(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setDelegation(delegation: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; + populateTransaction: { + adjustedBalanceOf(user: PromiseOrValue, overrides?: CallOverrides): Promise; + adjusted_balance_of(user: PromiseOrValue, overrides?: CallOverrides): Promise; + getActionId(selector: PromiseOrValue, overrides?: CallOverrides): Promise; + getAuthorizer(overrides?: CallOverrides): Promise; + getDelegationImplementation(overrides?: CallOverrides): Promise; + getVault(overrides?: CallOverrides): Promise; + getVotingEscrow(overrides?: CallOverrides): Promise; + killDelegation(overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + setDelegation(delegation: PromiseOrValue, overrides?: Overrides & { + from?: PromiseOrValue; + }): Promise; + }; +} + +declare class AaveLinearPool__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "mainToken"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "assetManager"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "version"; + readonly type: "string"; + }]; + readonly internalType: "struct AaveLinearPool.ConstructorArgs"; + readonly name: "args"; + readonly type: "tuple"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Approval"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "PausedStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "enabled"; + readonly type: "bool"; + }]; + readonly name: "RecoveryModeStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "SwapFeePercentageChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "lowerTarget"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }]; + readonly name: "TargetsSet"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Transfer"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "DOMAIN_SEPARATOR"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }]; + readonly name: "allowance"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approve"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "balanceOf"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "decimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "decreaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "enableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getBptIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "pure"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getDomainSeparator"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMainIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMainToken"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "getNextNonce"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getOwner"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPausedState"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowEndTime"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodEndTime"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeesCollector"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeesCollector"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getScalingFactors"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getSwapFeePercentage"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getTargets"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "lowerTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVirtualSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedToken"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedTokenRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "inRecoveryMode"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "addedValue"; + readonly type: "uint256"; + }]; + readonly name: "increaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "initialize"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "name"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly name: "nonces"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onExitPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFees"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onJoinPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFees"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "indexIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "indexOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "pause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "permit"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryExit"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryJoin"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptOut"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "setSwapFeePercentage"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "newLowerTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "newUpperTarget"; + readonly type: "uint256"; + }]; + readonly name: "setTargets"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "symbol"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "totalSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transfer"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transferFrom"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "unpause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "version"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): AaveLinearPoolInterface; + static connect(address: string, signerOrProvider: Signer | Provider): AaveLinearPool; +} + +declare class AaveLinearPoolFactory__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: "protocolFeeProvider"; + readonly type: "address"; + }, { + readonly internalType: "contract IBalancerQueries"; + readonly name: "queries"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "factoryVersion"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "poolVersion"; + readonly type: "string"; + }, { + readonly internalType: "uint256"; + readonly name: "initialPauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "uint256"; + readonly name: "protocolId"; + readonly type: "uint256"; + }]; + readonly name: "AaveLinearPoolCreated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly []; + readonly name: "FactoryDisabled"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "PoolCreated"; + readonly type: "event"; + }, { + readonly inputs: readonly [{ + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "mainToken"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolId"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "salt"; + readonly type: "bytes32"; + }]; + readonly name: "create"; + readonly outputs: readonly [{ + readonly internalType: "contract AaveLinearPool"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disable"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCode"; + readonly outputs: readonly [{ + readonly internalType: "bytes"; + readonly name: ""; + readonly type: "bytes"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCodeContracts"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: "contractA"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "contractB"; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getLastCreatedPool"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPauseConfiguration"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolVersion"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeePercentagesProvider"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "isDisabled"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "isPoolFromFactory"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "version"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): AaveLinearPoolFactoryInterface; + static connect(address: string, signerOrProvider: Signer | Provider): AaveLinearPoolFactory; +} + +declare class AaveWrapping__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approveVault"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IStaticATokenLM"; + readonly name: "staticToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bool"; + readonly name: "toUnderlying"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "unwrapAaveStaticToken"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IStaticATokenLM"; + readonly name: "staticToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bool"; + readonly name: "fromUnderlying"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "wrapAaveDynamicToken"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }]; + static createInterface(): AaveWrappingInterface; + static connect(address: string, signerOrProvider: Signer | Provider): AaveWrapping; +} + +declare class Authoriser__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "admin"; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "bytes32"; + readonly name: "role"; + readonly type: "bytes32"; + }, { + readonly indexed: true; + readonly internalType: "bytes32"; + readonly name: "previousAdminRole"; + readonly type: "bytes32"; + }, { + readonly indexed: true; + readonly internalType: "bytes32"; + readonly name: "newAdminRole"; + readonly type: "bytes32"; + }]; + readonly name: "RoleAdminChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "bytes32"; + readonly name: "role"; + readonly type: "bytes32"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }]; + readonly name: "RoleGranted"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "bytes32"; + readonly name: "role"; + readonly type: "bytes32"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }]; + readonly name: "RoleRevoked"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "DEFAULT_ADMIN_ROLE"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "actionId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly name: "canPerform"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "role"; + readonly type: "bytes32"; + }]; + readonly name: "getRoleAdmin"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "role"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "index"; + readonly type: "uint256"; + }]; + readonly name: "getRoleMember"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "role"; + readonly type: "bytes32"; + }]; + readonly name: "getRoleMemberCount"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "role"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "grantRole"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32[]"; + readonly name: "roles"; + readonly type: "bytes32[]"; + }, { + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "grantRoles"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32[]"; + readonly name: "roles"; + readonly type: "bytes32[]"; + }, { + readonly internalType: "address[]"; + readonly name: "accounts"; + readonly type: "address[]"; + }]; + readonly name: "grantRolesToMany"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "role"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "hasRole"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "role"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "renounceRole"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "role"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "revokeRole"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32[]"; + readonly name: "roles"; + readonly type: "bytes32[]"; + }, { + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "revokeRoles"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32[]"; + readonly name: "roles"; + readonly type: "bytes32[]"; + }, { + readonly internalType: "address[]"; + readonly name: "accounts"; + readonly type: "address[]"; + }]; + readonly name: "revokeRolesFromMany"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }]; + static createInterface(): AuthoriserInterface; + static connect(address: string, signerOrProvider: Signer | Provider): Authoriser; +} + +declare class BalancerHelpers__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "_vault"; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly components: readonly [{ + readonly internalType: "contract IAsset[]"; + readonly name: "assets"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "minAmountsOut"; + readonly type: "uint256[]"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }, { + readonly internalType: "bool"; + readonly name: "toInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.ExitPoolRequest"; + readonly name: "request"; + readonly type: "tuple"; + }]; + readonly name: "queryExit"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly components: readonly [{ + readonly internalType: "contract IAsset[]"; + readonly name: "assets"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "maxAmountsIn"; + readonly type: "uint256[]"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }, { + readonly internalType: "bool"; + readonly name: "fromInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.JoinPoolRequest"; + readonly name: "request"; + readonly type: "tuple"; + }]; + readonly name: "queryJoin"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptOut"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "vault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): BalancerHelpersInterface; + static connect(address: string, signerOrProvider: Signer | Provider): BalancerHelpers; +} + +declare class BalancerMinter__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IBalancerTokenAdmin"; + readonly name: "tokenAdmin"; + readonly type: "address"; + }, { + readonly internalType: "contract IGaugeController"; + readonly name: "gaugeController"; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "address"; + readonly name: "gauge"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "minted"; + readonly type: "uint256"; + }]; + readonly name: "Minted"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "minter"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "approval"; + readonly type: "bool"; + }]; + readonly name: "MinterApprovalSet"; + readonly type: "event"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "minter"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }]; + readonly name: "allowed_to_mint_for"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getBalancerToken"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getBalancerTokenAdmin"; + readonly outputs: readonly [{ + readonly internalType: "contract IBalancerTokenAdmin"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getDomainSeparator"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getGaugeController"; + readonly outputs: readonly [{ + readonly internalType: "contract IGaugeController"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "minter"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }]; + readonly name: "getMinterApproval"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }]; + readonly name: "getNextNonce"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "gauge"; + readonly type: "address"; + }]; + readonly name: "mint"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "gauge"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }]; + readonly name: "mintFor"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "gauges"; + readonly type: "address[]"; + }]; + readonly name: "mintMany"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "gauges"; + readonly type: "address[]"; + }, { + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }]; + readonly name: "mintManyFor"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "gauge"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }]; + readonly name: "mint_for"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[8]"; + readonly name: "gauges"; + readonly type: "address[8]"; + }]; + readonly name: "mint_many"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "gauge"; + readonly type: "address"; + }]; + readonly name: "minted"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "minter"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "approval"; + readonly type: "bool"; + }]; + readonly name: "setMinterApproval"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "minter"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "approval"; + readonly type: "bool"; + }, { + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "setMinterApprovalWithSignature"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "minter"; + readonly type: "address"; + }]; + readonly name: "toggle_approve_mint"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }]; + static createInterface(): BalancerMinterInterface; + static connect(address: string, signerOrProvider: Signer | Provider): BalancerMinter; +} + +declare class BalancerPoolDataQueries__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "_vault"; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "poolAddresses"; + readonly type: "address[]"; + }]; + readonly name: "getAmpForPools"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "poolAddresses"; + readonly type: "address[]"; + }]; + readonly name: "getInRecoveryModeForPools"; + readonly outputs: readonly [{ + readonly internalType: "bool[]"; + readonly name: ""; + readonly type: "bool[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "poolAddresses"; + readonly type: "address[]"; + }]; + readonly name: "getIsPausedForPools"; + readonly outputs: readonly [{ + readonly internalType: "bool[]"; + readonly name: ""; + readonly type: "bool[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "poolAddresses"; + readonly type: "address[]"; + }]; + readonly name: "getLinearTargetsForPools"; + readonly outputs: readonly [{ + readonly internalType: "uint256[][]"; + readonly name: ""; + readonly type: "uint256[][]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "poolAddresses"; + readonly type: "address[]"; + }]; + readonly name: "getNormalizedWeightsForPools"; + readonly outputs: readonly [{ + readonly internalType: "uint256[][]"; + readonly name: ""; + readonly type: "uint256[][]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32[]"; + readonly name: "poolIds"; + readonly type: "bytes32[]"; + }, { + readonly components: readonly [{ + readonly internalType: "bool"; + readonly name: "loadTokenBalanceUpdatesAfterBlock"; + readonly type: "bool"; + }, { + readonly internalType: "bool"; + readonly name: "loadTotalSupply"; + readonly type: "bool"; + }, { + readonly internalType: "bool"; + readonly name: "loadSwapFees"; + readonly type: "bool"; + }, { + readonly internalType: "bool"; + readonly name: "loadLinearWrappedTokenRates"; + readonly type: "bool"; + }, { + readonly internalType: "bool"; + readonly name: "loadLinearTargets"; + readonly type: "bool"; + }, { + readonly internalType: "bool"; + readonly name: "loadNormalizedWeights"; + readonly type: "bool"; + }, { + readonly internalType: "bool"; + readonly name: "loadScalingFactors"; + readonly type: "bool"; + }, { + readonly internalType: "bool"; + readonly name: "loadAmps"; + readonly type: "bool"; + }, { + readonly internalType: "bool"; + readonly name: "loadRates"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "blockNumber"; + readonly type: "uint256"; + }, { + readonly internalType: "enum TotalSupplyType[]"; + readonly name: "totalSupplyTypes"; + readonly type: "uint8[]"; + }, { + readonly internalType: "enum SwapFeeType[]"; + readonly name: "swapFeeTypes"; + readonly type: "uint8[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "linearPoolIdxs"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "weightedPoolIdxs"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "scalingFactorPoolIdxs"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "ampPoolIdxs"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "ratePoolIdxs"; + readonly type: "uint256[]"; + }]; + readonly internalType: "struct PoolDataQueryConfig"; + readonly name: "config"; + readonly type: "tuple"; + }]; + readonly name: "getPoolData"; + readonly outputs: readonly [{ + readonly internalType: "uint256[][]"; + readonly name: "balances"; + readonly type: "uint256[][]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "totalSupplies"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "swapFees"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "linearWrappedTokenRates"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[][]"; + readonly name: "linearTargets"; + readonly type: "uint256[][]"; + }, { + readonly internalType: "uint256[][]"; + readonly name: "weights"; + readonly type: "uint256[][]"; + }, { + readonly internalType: "uint256[][]"; + readonly name: "scalingFactors"; + readonly type: "uint256[][]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amps"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "rates"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "ignoreIdxs"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32[]"; + readonly name: "poolIds"; + readonly type: "bytes32[]"; + }, { + readonly components: readonly [{ + readonly internalType: "bool"; + readonly name: "loadInRecoveryMode"; + readonly type: "bool"; + }, { + readonly internalType: "bool"; + readonly name: "loadIsPaused"; + readonly type: "bool"; + }]; + readonly internalType: "struct PoolStatusQueryConfig"; + readonly name: "config"; + readonly type: "tuple"; + }]; + readonly name: "getPoolStatus"; + readonly outputs: readonly [{ + readonly internalType: "bool[]"; + readonly name: "isPaused"; + readonly type: "bool[]"; + }, { + readonly internalType: "bool[]"; + readonly name: "inRecoveryMode"; + readonly type: "bool[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32[]"; + readonly name: "poolIds"; + readonly type: "bytes32[]"; + }, { + readonly internalType: "uint256"; + readonly name: "blockNumber"; + readonly type: "uint256"; + }]; + readonly name: "getPoolTokenBalancesWithUpdatesAfterBlock"; + readonly outputs: readonly [{ + readonly internalType: "uint256[][]"; + readonly name: ""; + readonly type: "uint256[][]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "poolAddresses"; + readonly type: "address[]"; + }]; + readonly name: "getRateForPools"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "poolAddresses"; + readonly type: "address[]"; + }]; + readonly name: "getScalingFactorsForPools"; + readonly outputs: readonly [{ + readonly internalType: "uint256[][]"; + readonly name: ""; + readonly type: "uint256[][]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "poolAddresses"; + readonly type: "address[]"; + }, { + readonly internalType: "enum SwapFeeType[]"; + readonly name: "swapFeeTypes"; + readonly type: "uint8[]"; + }]; + readonly name: "getSwapFeePercentageForPools"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "poolAddresses"; + readonly type: "address[]"; + }, { + readonly internalType: "enum TotalSupplyType[]"; + readonly name: "totalSupplyTypes"; + readonly type: "uint8[]"; + }]; + readonly name: "getTotalSupplyForPools"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "poolAddresses"; + readonly type: "address[]"; + }]; + readonly name: "getWrappedTokenRateForLinearPools"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "vault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): BalancerPoolDataQueriesInterface; + static connect(address: string, signerOrProvider: Signer | Provider): BalancerPoolDataQueries; +} + +declare class BalancerRelayer__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "libraryAddress"; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly inputs: readonly []; + readonly name: "getLibrary"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes[]"; + readonly name: "data"; + readonly type: "bytes[]"; + }]; + readonly name: "multicall"; + readonly outputs: readonly [{ + readonly internalType: "bytes[]"; + readonly name: "results"; + readonly type: "bytes[]"; + }]; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly stateMutability: "payable"; + readonly type: "receive"; + }]; + static createInterface(): BalancerRelayerInterface; + static connect(address: string, signerOrProvider: Signer | Provider): BalancerRelayer; +} + +declare class BatchRelayerLibrary__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "wstETH"; + readonly type: "address"; + }, { + readonly internalType: "contract IBalancerMinter"; + readonly name: "minter"; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approveVault"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly components: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "assetInIndex"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "assetOutIndex"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IVault.BatchSwapStep[]"; + readonly name: "swaps"; + readonly type: "tuple[]"; + }, { + readonly internalType: "contract IAsset[]"; + readonly name: "assets"; + readonly type: "address[]"; + }, { + readonly components: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "fromInternalBalance"; + readonly type: "bool"; + }, { + readonly internalType: "address payable"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "toInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.FundManagement"; + readonly name: "funds"; + readonly type: "tuple"; + }, { + readonly internalType: "int256[]"; + readonly name: "limits"; + readonly type: "int256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly components: readonly [{ + readonly internalType: "uint256"; + readonly name: "index"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "key"; + readonly type: "uint256"; + }]; + readonly internalType: "struct VaultActions.OutputReference[]"; + readonly name: "outputReferences"; + readonly type: "tuple[]"; + }]; + readonly name: "batchSwap"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "enum VaultActions.PoolKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address payable"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly components: readonly [{ + readonly internalType: "contract IAsset[]"; + readonly name: "assets"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "minAmountsOut"; + readonly type: "uint256[]"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }, { + readonly internalType: "bool"; + readonly name: "toInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.ExitPoolRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly components: readonly [{ + readonly internalType: "uint256"; + readonly name: "index"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "key"; + readonly type: "uint256"; + }]; + readonly internalType: "struct VaultActions.OutputReference[]"; + readonly name: "outputReferences"; + readonly type: "tuple[]"; + }]; + readonly name: "exitPool"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IStakingLiquidityGauge[]"; + readonly name: "gauges"; + readonly type: "address[]"; + }]; + readonly name: "gaugeClaimRewards"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IStakingLiquidityGauge"; + readonly name: "gauge"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "gaugeDeposit"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "gauges"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "gaugeMint"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bool"; + readonly name: "approval"; + readonly type: "bool"; + }, { + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "gaugeSetMinterApproval"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IStakingLiquidityGauge"; + readonly name: "gauge"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "gaugeWithdraw"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getEntrypoint"; + readonly outputs: readonly [{ + readonly internalType: "contract IBalancerRelayer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "enum VaultActions.PoolKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly components: readonly [{ + readonly internalType: "contract IAsset[]"; + readonly name: "assets"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "maxAmountsIn"; + readonly type: "uint256[]"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }, { + readonly internalType: "bool"; + readonly name: "fromInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.JoinPoolRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "joinPool"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.UserBalanceOpKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IAsset"; + readonly name: "asset"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address payable"; + readonly name: "recipient"; + readonly type: "address"; + }]; + readonly internalType: "struct IVault.UserBalanceOp[]"; + readonly name: "ops"; + readonly type: "tuple[]"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "manageUserBalance"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "ref"; + readonly type: "uint256"; + }]; + readonly name: "peekChainedReferenceValue"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "relayer"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "approved"; + readonly type: "bool"; + }, { + readonly internalType: "bytes"; + readonly name: "authorisation"; + readonly type: "bytes"; + }]; + readonly name: "setRelayerApproval"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "stakeETH"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "stakeETHAndWrap"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IAsset"; + readonly name: "assetIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IAsset"; + readonly name: "assetOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IVault.SingleSwap"; + readonly name: "singleSwap"; + readonly type: "tuple"; + }, { + readonly components: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "fromInternalBalance"; + readonly type: "bool"; + }, { + readonly internalType: "address payable"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "toInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.FundManagement"; + readonly name: "funds"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: "limit"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "swap"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IStaticATokenLM"; + readonly name: "staticToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bool"; + readonly name: "toUnderlying"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "unwrapAaveStaticToken"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract ICToken"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "unwrapCompoundV2"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC4626"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "unwrapERC4626"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IEulerToken"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "unwrapEuler"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IGearboxDieselToken"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "dieselAmount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "unwrapGearbox"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IReaperTokenVault"; + readonly name: "vaultToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "unwrapReaperVaultToken"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IShareToken"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "unwrapShareToken"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract ITetuSmartVault"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "unwrapTetu"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IUnbuttonToken"; + readonly name: "wrapperToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "unwrapUnbuttonToken"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "unwrapWstETH"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IYearnTokenVault"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "unwrapYearn"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC20Permit"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "vaultPermit"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC20PermitDAI"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "holder"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "nonce"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "expiry"; + readonly type: "uint256"; + }, { + readonly internalType: "bool"; + readonly name: "allowed"; + readonly type: "bool"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "vaultPermitDAI"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IStaticATokenLM"; + readonly name: "staticToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bool"; + readonly name: "fromUnderlying"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "wrapAaveDynamicToken"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract ICToken"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "wrapCompoundV2"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC4626"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "wrapERC4626"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IEulerToken"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "eulerProtocol"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "wrapEuler"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IGearboxDieselToken"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "mainAmount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "wrapGearbox"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IReaperTokenVault"; + readonly name: "vaultToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "wrapReaperVaultToken"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IShareToken"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "wrapShareToken"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "wrapStETH"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract ITetuSmartVault"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "wrapTetu"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IUnbuttonToken"; + readonly name: "wrapperToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "uAmount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "wrapUnbuttonToken"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IYearnTokenVault"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "outputReference"; + readonly type: "uint256"; + }]; + readonly name: "wrapYearn"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }]; + static createInterface(): BatchRelayerLibraryInterface; + static connect(address: string, signerOrProvider: Signer | Provider): BatchRelayerLibrary; +} + +declare class ComposableStablePool__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: "protocolFeeProvider"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20[]"; + readonly name: "tokens"; + readonly type: "address[]"; + }, { + readonly internalType: "contract IRateProvider[]"; + readonly name: "rateProviders"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "tokenRateCacheDurations"; + readonly type: "uint256[]"; + }, { + readonly internalType: "bool[]"; + readonly name: "exemptFromYieldProtocolFeeFlags"; + readonly type: "bool[]"; + }, { + readonly internalType: "uint256"; + readonly name: "amplificationParameter"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly internalType: "struct ComposableStablePool.NewPoolParams"; + readonly name: "params"; + readonly type: "tuple"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "startValue"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "endValue"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "startTime"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "endTime"; + readonly type: "uint256"; + }]; + readonly name: "AmpUpdateStarted"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "currentValue"; + readonly type: "uint256"; + }]; + readonly name: "AmpUpdateStopped"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Approval"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "PausedStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "uint256"; + readonly name: "feeType"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "protocolFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "ProtocolFeePercentageCacheUpdated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "enabled"; + readonly type: "bool"; + }]; + readonly name: "RecoveryModeStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "SwapFeePercentageChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "uint256"; + readonly name: "tokenIndex"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "rate"; + readonly type: "uint256"; + }]; + readonly name: "TokenRateCacheUpdated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "uint256"; + readonly name: "tokenIndex"; + readonly type: "uint256"; + }, { + readonly indexed: true; + readonly internalType: "contract IRateProvider"; + readonly name: "provider"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "cacheDuration"; + readonly type: "uint256"; + }]; + readonly name: "TokenRateProviderSet"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Transfer"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "DOMAIN_SEPARATOR"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }]; + readonly name: "allowance"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approve"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "balanceOf"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "decimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "decreaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "enableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getActualSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAmplificationParameter"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "bool"; + readonly name: "isUpdating"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "precision"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getBptIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getDomainSeparator"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getLastJoinExitData"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "lastJoinExitAmplification"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "lastPostJoinExitInvariant"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMinimumBpt"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "pure"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "getNextNonce"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getOwner"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPausedState"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowEndTime"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodEndTime"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "feeType"; + readonly type: "uint256"; + }]; + readonly name: "getProtocolFeePercentageCache"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeesCollector"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeesCollector"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolSwapFeeDelegation"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getRateProviders"; + readonly outputs: readonly [{ + readonly internalType: "contract IRateProvider[]"; + readonly name: ""; + readonly type: "address[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getScalingFactors"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getSwapFeePercentage"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }]; + readonly name: "getTokenRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }]; + readonly name: "getTokenRateCache"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "rate"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "oldRate"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "duration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "expires"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "inRecoveryMode"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "addedValue"; + readonly type: "uint256"; + }]; + readonly name: "increaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }]; + readonly name: "isTokenExemptFromYieldProtocolFee"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "name"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly name: "nonces"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onExitPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onJoinPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "swapRequest"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "indexIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "indexOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "pause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "permit"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryExit"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryJoin"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptOut"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "poolConfig"; + readonly type: "bytes"; + }]; + readonly name: "setAssetManagerPoolConfig"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "setSwapFeePercentage"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "duration"; + readonly type: "uint256"; + }]; + readonly name: "setTokenRateCacheDuration"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "rawEndValue"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "endTime"; + readonly type: "uint256"; + }]; + readonly name: "startAmplificationParameterUpdate"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "stopAmplificationParameterUpdate"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "symbol"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "totalSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transfer"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transferFrom"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "unpause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "updateProtocolFeePercentageCache"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }]; + readonly name: "updateTokenRateCache"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }]; + static createInterface(): ComposableStablePoolInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ComposableStablePool; +} + +declare class ComposableStablePoolFactory__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: "protocolFeeProvider"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "factoryVersion"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "poolVersion"; + readonly type: "string"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly []; + readonly name: "FactoryDisabled"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "PoolCreated"; + readonly type: "event"; + }, { + readonly inputs: readonly [{ + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20[]"; + readonly name: "tokens"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256"; + readonly name: "amplificationParameter"; + readonly type: "uint256"; + }, { + readonly internalType: "contract IRateProvider[]"; + readonly name: "rateProviders"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "tokenRateCacheDurations"; + readonly type: "uint256[]"; + }, { + readonly internalType: "bool[]"; + readonly name: "exemptFromYieldProtocolFeeFlags"; + readonly type: "bool[]"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "bytes32"; + readonly name: "salt"; + readonly type: "bytes32"; + }]; + readonly name: "create"; + readonly outputs: readonly [{ + readonly internalType: "contract ComposableStablePool"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disable"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCode"; + readonly outputs: readonly [{ + readonly internalType: "bytes"; + readonly name: ""; + readonly type: "bytes"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCodeContracts"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: "contractA"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "contractB"; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPauseConfiguration"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolVersion"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeePercentagesProvider"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "isDisabled"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "isPoolFromFactory"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "version"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): ComposableStablePoolFactoryInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ComposableStablePoolFactory; +} + +declare class ConvergentCurvePool__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: "_underlying"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "_bond"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "_expiration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "_unitSeconds"; + readonly type: "uint256"; + }, { + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "_percentFee"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "_percentFeeGov"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "_governance"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Approval"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "collectedBase"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "collectedBond"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "remainingBase"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "remainingBond"; + readonly type: "uint256"; + }]; + readonly name: "FeeCollection"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Transfer"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "DOMAIN_SEPARATOR"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "FEE_BOUND"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }]; + readonly name: "allowance"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approve"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "balanceOf"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "bond"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "bondDecimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "decimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "pure"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "decreaseApproval"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "expiration"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "feesBond"; + readonly outputs: readonly [{ + readonly internalType: "uint128"; + readonly name: ""; + readonly type: "uint128"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "feesUnderlying"; + readonly outputs: readonly [{ + readonly internalType: "uint128"; + readonly name: ""; + readonly type: "uint128"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "governance"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "increaseApproval"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "name"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly name: "nonces"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "currentBalances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFee"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onExitPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFeeAmounts"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "currentBalances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFee"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onJoinPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFeeAmounts"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "swapRequest"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: "currentBalanceTokenIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "currentBalanceTokenOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "percentFee"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "percentFeeGov"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "permit"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "amountX"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "reserveX"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "reserveY"; + readonly type: "uint256"; + }, { + readonly internalType: "bool"; + readonly name: "out"; + readonly type: "bool"; + }]; + readonly name: "solveTradeInvariant"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "symbol"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "totalSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transfer"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transferFrom"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "underlying"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "underlyingDecimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "unitSeconds"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): ConvergentCurvePoolInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ConvergentCurvePool; +} + +declare class ERC20__factory { + static readonly abi: readonly [{ + readonly constant: true; + readonly inputs: readonly []; + readonly name: "name"; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "string"; + }]; + readonly payable: false; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly constant: false; + readonly inputs: readonly [{ + readonly name: "_spender"; + readonly type: "address"; + }, { + readonly name: "_value"; + readonly type: "uint256"; + }]; + readonly name: "approve"; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "bool"; + }]; + readonly payable: false; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly constant: true; + readonly inputs: readonly []; + readonly name: "totalSupply"; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + readonly payable: false; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly constant: false; + readonly inputs: readonly [{ + readonly name: "_from"; + readonly type: "address"; + }, { + readonly name: "_to"; + readonly type: "address"; + }, { + readonly name: "_value"; + readonly type: "uint256"; + }]; + readonly name: "transferFrom"; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "bool"; + }]; + readonly payable: false; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly constant: true; + readonly inputs: readonly []; + readonly name: "decimals"; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint8"; + }]; + readonly payable: false; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly constant: true; + readonly inputs: readonly [{ + readonly name: "_owner"; + readonly type: "address"; + }]; + readonly name: "balanceOf"; + readonly outputs: readonly [{ + readonly name: "balance"; + readonly type: "uint256"; + }]; + readonly payable: false; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly constant: true; + readonly inputs: readonly []; + readonly name: "symbol"; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "string"; + }]; + readonly payable: false; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly constant: false; + readonly inputs: readonly [{ + readonly name: "_to"; + readonly type: "address"; + }, { + readonly name: "_value"; + readonly type: "uint256"; + }]; + readonly name: "transfer"; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "bool"; + }]; + readonly payable: false; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly constant: true; + readonly inputs: readonly [{ + readonly name: "_owner"; + readonly type: "address"; + }, { + readonly name: "_spender"; + readonly type: "address"; + }]; + readonly name: "allowance"; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + readonly payable: false; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly payable: true; + readonly stateMutability: "payable"; + readonly type: "fallback"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Approval"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly name: "from"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly name: "to"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Transfer"; + readonly type: "event"; + }]; + static createInterface(): ERC20Interface; + static connect(address: string, signerOrProvider: Signer | Provider): ERC20; +} + +declare class ERC4626LinearPool__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "mainToken"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "assetManager"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "version"; + readonly type: "string"; + }]; + readonly internalType: "struct ERC4626LinearPool.ConstructorArgs"; + readonly name: "args"; + readonly type: "tuple"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Approval"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "PausedStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "enabled"; + readonly type: "bool"; + }]; + readonly name: "RecoveryModeStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "SwapFeePercentageChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "lowerTarget"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }]; + readonly name: "TargetsSet"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Transfer"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "DOMAIN_SEPARATOR"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }]; + readonly name: "allowance"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approve"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "balanceOf"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "decimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "decreaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "enableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getBptIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "pure"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getDomainSeparator"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMainIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMainToken"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "getNextNonce"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getOwner"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPausedState"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowEndTime"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodEndTime"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeesCollector"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeesCollector"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getScalingFactors"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getSwapFeePercentage"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getTargets"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "lowerTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVirtualSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedToken"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedTokenRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "inRecoveryMode"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "addedValue"; + readonly type: "uint256"; + }]; + readonly name: "increaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "initialize"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "name"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly name: "nonces"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onExitPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFees"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onJoinPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFees"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "indexIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "indexOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "pause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "permit"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryExit"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryJoin"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptOut"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "setSwapFeePercentage"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "newLowerTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "newUpperTarget"; + readonly type: "uint256"; + }]; + readonly name: "setTargets"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "symbol"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "totalSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transfer"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transferFrom"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "unpause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "version"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): ERC4626LinearPoolInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ERC4626LinearPool; +} + +declare class ERC4626LinearPoolFactory__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: "protocolFeeProvider"; + readonly type: "address"; + }, { + readonly internalType: "contract IBalancerQueries"; + readonly name: "queries"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "factoryVersion"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "poolVersion"; + readonly type: "string"; + }, { + readonly internalType: "uint256"; + readonly name: "initialPauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "uint256"; + readonly name: "protocolId"; + readonly type: "uint256"; + }]; + readonly name: "Erc4626LinearPoolCreated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly []; + readonly name: "FactoryDisabled"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "PoolCreated"; + readonly type: "event"; + }, { + readonly inputs: readonly [{ + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "mainToken"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolId"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "salt"; + readonly type: "bytes32"; + }]; + readonly name: "create"; + readonly outputs: readonly [{ + readonly internalType: "contract LinearPool"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disable"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCode"; + readonly outputs: readonly [{ + readonly internalType: "bytes"; + readonly name: ""; + readonly type: "bytes"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCodeContracts"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: "contractA"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "contractB"; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getLastCreatedPool"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPauseConfiguration"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolVersion"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeePercentagesProvider"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "isDisabled"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "isPoolFromFactory"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "version"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): ERC4626LinearPoolFactoryInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ERC4626LinearPoolFactory; +} + +declare class EulerLinearPool__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "mainToken"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "assetManager"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "version"; + readonly type: "string"; + }]; + readonly internalType: "struct EulerLinearPool.ConstructorArgs"; + readonly name: "args"; + readonly type: "tuple"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Approval"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "PausedStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "enabled"; + readonly type: "bool"; + }]; + readonly name: "RecoveryModeStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "SwapFeePercentageChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "lowerTarget"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }]; + readonly name: "TargetsSet"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Transfer"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "DOMAIN_SEPARATOR"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }]; + readonly name: "allowance"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approve"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "balanceOf"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "decimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "decreaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "enableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getBptIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "pure"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getDomainSeparator"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMainIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMainToken"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "getNextNonce"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getOwner"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPausedState"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowEndTime"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodEndTime"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeesCollector"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeesCollector"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getScalingFactors"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getSwapFeePercentage"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getTargets"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "lowerTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVirtualSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedToken"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedTokenRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "inRecoveryMode"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "addedValue"; + readonly type: "uint256"; + }]; + readonly name: "increaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "initialize"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "name"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly name: "nonces"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onExitPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFees"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onJoinPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFees"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "indexIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "indexOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "pause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "permit"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryExit"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryJoin"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptOut"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "setSwapFeePercentage"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "newLowerTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "newUpperTarget"; + readonly type: "uint256"; + }]; + readonly name: "setTargets"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "symbol"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "totalSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transfer"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transferFrom"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "unpause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "version"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): EulerLinearPoolInterface; + static connect(address: string, signerOrProvider: Signer | Provider): EulerLinearPool; +} + +declare class EulerLinearPoolFactory__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: "protocolFeeProvider"; + readonly type: "address"; + }, { + readonly internalType: "contract IBalancerQueries"; + readonly name: "queries"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "factoryVersion"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "poolVersion"; + readonly type: "string"; + }, { + readonly internalType: "uint256"; + readonly name: "initialPauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "_eulerProtocol"; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "uint256"; + readonly name: "protocolId"; + readonly type: "uint256"; + }]; + readonly name: "EulerLinearPoolCreated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly []; + readonly name: "FactoryDisabled"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "PoolCreated"; + readonly type: "event"; + }, { + readonly inputs: readonly [{ + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "mainToken"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolId"; + readonly type: "uint256"; + }]; + readonly name: "create"; + readonly outputs: readonly [{ + readonly internalType: "contract LinearPool"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disable"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "eulerProtocol"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCode"; + readonly outputs: readonly [{ + readonly internalType: "bytes"; + readonly name: ""; + readonly type: "bytes"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCodeContracts"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: "contractA"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "contractB"; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getLastCreatedPool"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPauseConfiguration"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolVersion"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeePercentagesProvider"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "isDisabled"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "isPoolFromFactory"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "version"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): EulerLinearPoolFactoryInterface; + static connect(address: string, signerOrProvider: Signer | Provider): EulerLinearPoolFactory; +} + +declare class FXPool__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "_assetsToRegister"; + readonly type: "address[]"; + }, { + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "_protocolPercentFee"; + readonly type: "uint256"; + }, { + readonly internalType: "string"; + readonly name: "_name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "_symbol"; + readonly type: "string"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Approval"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "numeraire"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "reserve"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "weight"; + readonly type: "uint256"; + }]; + readonly name: "AssetIncluded"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "derivative"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "numeraire"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "reserve"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "address"; + readonly name: "assimilator"; + readonly type: "address"; + }]; + readonly name: "AssimilatorIncluded"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "address"; + readonly name: "newCollector"; + readonly type: "address"; + }]; + readonly name: "ChangeCollectorAddress"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "isEmergency"; + readonly type: "bool"; + }]; + readonly name: "EmergencyAlarm"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "lptAmountBurned"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256[]"; + readonly name: "amountsWithdrawn"; + readonly type: "uint256[]"; + }]; + readonly name: "EmergencyWithdraw"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "feesCollected"; + readonly type: "uint256"; + }]; + readonly name: "FeesAccrued"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "feesCollected"; + readonly type: "uint256"; + }]; + readonly name: "FeesCollected"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "lptAmountBurned"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256[]"; + readonly name: "amountsWithdrawn"; + readonly type: "uint256[]"; + }]; + readonly name: "OnExitPool"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "lptAmountMinted"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256[]"; + readonly name: "amountsDeposited"; + readonly type: "uint256[]"; + }]; + readonly name: "OnJoinPool"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "previousOwner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "newOwner"; + readonly type: "address"; + }]; + readonly name: "OwnershipTransferred"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "alpha"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "beta"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "delta"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "epsilon"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "lambda"; + readonly type: "uint256"; + }]; + readonly name: "ParametersSet"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "Paused"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "address"; + readonly name: "updater"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "newProtocolPercentage"; + readonly type: "uint256"; + }]; + readonly name: "ProtocolFeeShareUpdated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "trader"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "origin"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "target"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "originAmount"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "targetAmount"; + readonly type: "uint256"; + }]; + readonly name: "Trade"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Transfer"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "Unpaused"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "DOMAIN_SEPARATOR"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }]; + readonly name: "allowance"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approve"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "_derivative"; + readonly type: "address"; + }]; + readonly name: "assimilator"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: "assimilator_"; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "balanceOf"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "collectorAddress"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "curve"; + readonly outputs: readonly [{ + readonly internalType: "int128"; + readonly name: "alpha"; + readonly type: "int128"; + }, { + readonly internalType: "int128"; + readonly name: "beta"; + readonly type: "int128"; + }, { + readonly internalType: "int128"; + readonly name: "delta"; + readonly type: "int128"; + }, { + readonly internalType: "int128"; + readonly name: "epsilon"; + readonly type: "int128"; + }, { + readonly internalType: "int128"; + readonly name: "lambda"; + readonly type: "int128"; + }, { + readonly internalType: "uint256"; + readonly name: "cap"; + readonly type: "uint256"; + }, { + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "fxPoolAddress"; + readonly type: "address"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "decimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "decreaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly name: "derivatives"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "emergency"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "addedValue"; + readonly type: "uint256"; + }]; + readonly name: "increaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address[]"; + readonly name: "_assets"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "_assetWeights"; + readonly type: "uint256[]"; + }]; + readonly name: "initialize"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "liquidity"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "total_"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "individual_"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "name"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly name: "nonces"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly name: "numeraires"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onExitPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFeeAmounts"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onJoinPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFeeAmounts"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "swapRequest"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "owner"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "paused"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "permit"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "protocolPercentFee"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "renounceOwnership"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly name: "reserves"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "_cap"; + readonly type: "uint256"; + }]; + readonly name: "setCap"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "_collectorAddress"; + readonly type: "address"; + }]; + readonly name: "setCollectorAddress"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bool"; + readonly name: "_emergency"; + readonly type: "bool"; + }]; + readonly name: "setEmergency"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "_alpha"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "_beta"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "_feeAtHalt"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "_epsilon"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "_lambda"; + readonly type: "uint256"; + }]; + readonly name: "setParams"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "setPaused"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "_protocolPercentFee"; + readonly type: "uint256"; + }]; + readonly name: "setProtocolPercentFee"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "symbol"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "totalSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "totalUnclaimedFeesInNumeraire"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transfer"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transferFrom"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "newOwner"; + readonly type: "address"; + }]; + readonly name: "transferOwnership"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "totalDepositNumeraire"; + readonly type: "uint256"; + }]; + readonly name: "viewDeposit"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "viewParameters"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "alpha_"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "beta_"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "delta_"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "epsilon_"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "lambda_"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "_curvesToBurn"; + readonly type: "uint256"; + }]; + readonly name: "viewWithdraw"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): FXPoolInterface; + static connect(address: string, signerOrProvider: Signer | Provider): FXPool; +} + +declare class GaugeClaimHelper__factory { + static readonly abi: readonly [{ + readonly inputs: readonly []; + readonly name: "CLAIM_FREQUENCY"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IRewardsOnlyGauge"; + readonly name: "gauge"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }]; + readonly name: "claimRewardsFromGauge"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IRewardsOnlyGauge[]"; + readonly name: "gauges"; + readonly type: "address[]"; + }, { + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }]; + readonly name: "claimRewardsFromGauges"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IRewardsOnlyGauge"; + readonly name: "gauge"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "token"; + readonly type: "address"; + }]; + readonly name: "getPendingRewards"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }]; + static createInterface(): GaugeClaimHelperInterface; + static connect(address: string, signerOrProvider: Signer | Provider): GaugeClaimHelper; +} + +declare class GearboxLinearPool__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "mainToken"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "assetManager"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "version"; + readonly type: "string"; + }]; + readonly internalType: "struct GearboxLinearPool.ConstructorArgs"; + readonly name: "args"; + readonly type: "tuple"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Approval"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "PausedStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "enabled"; + readonly type: "bool"; + }]; + readonly name: "RecoveryModeStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "SwapFeePercentageChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "lowerTarget"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }]; + readonly name: "TargetsSet"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Transfer"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "DOMAIN_SEPARATOR"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }]; + readonly name: "allowance"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approve"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "balanceOf"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "decimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "decreaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "enableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getBptIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "pure"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getDomainSeparator"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMainIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMainToken"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "getNextNonce"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getOwner"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPausedState"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowEndTime"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodEndTime"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeesCollector"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeesCollector"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getScalingFactors"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getSwapFeePercentage"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getTargets"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "lowerTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVirtualSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedToken"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedTokenRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "inRecoveryMode"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "addedValue"; + readonly type: "uint256"; + }]; + readonly name: "increaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "initialize"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "name"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly name: "nonces"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onExitPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFees"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onJoinPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFees"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "indexIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "indexOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "pause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "permit"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryExit"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryJoin"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptOut"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "setSwapFeePercentage"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "newLowerTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "newUpperTarget"; + readonly type: "uint256"; + }]; + readonly name: "setTargets"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "symbol"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "totalSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transfer"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transferFrom"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "unpause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "version"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): GearboxLinearPoolInterface; + static connect(address: string, signerOrProvider: Signer | Provider): GearboxLinearPool; +} + +declare class GearboxLinearPoolFactory__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: "protocolFeeProvider"; + readonly type: "address"; + }, { + readonly internalType: "contract IBalancerQueries"; + readonly name: "queries"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "factoryVersion"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "poolVersion"; + readonly type: "string"; + }, { + readonly internalType: "uint256"; + readonly name: "initialPauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly []; + readonly name: "FactoryDisabled"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "uint256"; + readonly name: "protocolId"; + readonly type: "uint256"; + }]; + readonly name: "GearboxLinearPoolCreated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "PoolCreated"; + readonly type: "event"; + }, { + readonly inputs: readonly [{ + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "mainToken"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolId"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "salt"; + readonly type: "bytes32"; + }]; + readonly name: "create"; + readonly outputs: readonly [{ + readonly internalType: "contract GearboxLinearPool"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disable"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCode"; + readonly outputs: readonly [{ + readonly internalType: "bytes"; + readonly name: ""; + readonly type: "bytes"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCodeContracts"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: "contractA"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "contractB"; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getLastCreatedPool"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPauseConfiguration"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolVersion"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeePercentagesProvider"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "isDisabled"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "isPoolFromFactory"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "version"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): GearboxLinearPoolFactoryInterface; + static connect(address: string, signerOrProvider: Signer | Provider): GearboxLinearPoolFactory; +} + +declare class GyroConfig__factory { + static readonly abi: readonly [{ + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bytes32"; + readonly name: "key"; + readonly type: "bytes32"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "previousValue"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "newValue"; + readonly type: "uint256"; + }]; + readonly name: "ConfigChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bytes32"; + readonly name: "key"; + readonly type: "bytes32"; + }]; + readonly name: "ConfigFrozen"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bytes32"; + readonly name: "key"; + readonly type: "bytes32"; + }]; + readonly name: "ConfigUnset"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "address"; + readonly name: "newGovernor"; + readonly type: "address"; + }]; + readonly name: "GovernorChangeRequested"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "address"; + readonly name: "oldGovernor"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "address"; + readonly name: "newGovernor"; + readonly type: "address"; + }]; + readonly name: "GovernorChanged"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "acceptGovernance"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "newGovernor"; + readonly type: "address"; + }]; + readonly name: "changeGovernor"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "key"; + readonly type: "bytes32"; + }]; + readonly name: "freeze"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "key"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "defaultValue"; + readonly type: "address"; + }]; + readonly name: "getAddress"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "key"; + readonly type: "bytes32"; + }]; + readonly name: "getAddress"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "key"; + readonly type: "bytes32"; + }]; + readonly name: "getConfigMeta"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }, { + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "key"; + readonly type: "bytes32"; + }]; + readonly name: "getUint"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "governor"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "key"; + readonly type: "bytes32"; + }]; + readonly name: "hasKey"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "_governor"; + readonly type: "address"; + }]; + readonly name: "initialize"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "listKeys"; + readonly outputs: readonly [{ + readonly internalType: "bytes32[]"; + readonly name: ""; + readonly type: "bytes32[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "pendingGovernor"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "key"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "newValue"; + readonly type: "address"; + }]; + readonly name: "setAddress"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "key"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "newValue"; + readonly type: "uint256"; + }]; + readonly name: "setUint"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "key"; + readonly type: "bytes32"; + }]; + readonly name: "unset"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }]; + static createInterface(): GyroConfigInterface; + static connect(address: string, signerOrProvider: Signer | Provider): GyroConfig; +} + +declare class LidoRelayer__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "contract IwstETH"; + readonly name: "wstETH"; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly inputs: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly components: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "assetInIndex"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "assetOutIndex"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IVault.BatchSwapStep[]"; + readonly name: "swaps"; + readonly type: "tuple[]"; + }, { + readonly internalType: "contract IAsset[]"; + readonly name: "assets"; + readonly type: "address[]"; + }, { + readonly components: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "fromInternalBalance"; + readonly type: "bool"; + }, { + readonly internalType: "address payable"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "toInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.FundManagement"; + readonly name: "funds"; + readonly type: "tuple"; + }, { + readonly internalType: "int256[]"; + readonly name: "limits"; + readonly type: "int256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }]; + readonly name: "batchSwap"; + readonly outputs: readonly [{ + readonly internalType: "int256[]"; + readonly name: "swapAmounts"; + readonly type: "int256[]"; + }]; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address payable"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly components: readonly [{ + readonly internalType: "contract IAsset[]"; + readonly name: "assets"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "minAmountsOut"; + readonly type: "uint256[]"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }, { + readonly internalType: "bool"; + readonly name: "toInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.ExitPoolRequest"; + readonly name: "request"; + readonly type: "tuple"; + }]; + readonly name: "exitPool"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getStETH"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWstETH"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly components: readonly [{ + readonly internalType: "contract IAsset[]"; + readonly name: "assets"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "maxAmountsIn"; + readonly type: "uint256[]"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }, { + readonly internalType: "bool"; + readonly name: "fromInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.JoinPoolRequest"; + readonly name: "request"; + readonly type: "tuple"; + }]; + readonly name: "joinPool"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IAsset"; + readonly name: "assetIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IAsset"; + readonly name: "assetOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IVault.SingleSwap"; + readonly name: "singleSwap"; + readonly type: "tuple"; + }, { + readonly components: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "fromInternalBalance"; + readonly type: "bool"; + }, { + readonly internalType: "address payable"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "toInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.FundManagement"; + readonly name: "funds"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: "limit"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }]; + readonly name: "swap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "swapAmount"; + readonly type: "uint256"; + }]; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly stateMutability: "payable"; + readonly type: "receive"; + }]; + static createInterface(): LidoRelayerInterface; + static connect(address: string, signerOrProvider: Signer | Provider): LidoRelayer; +} + +declare class LinearPool__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "mainToken"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Approval"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "PausedStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "SwapFeePercentageChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "lowerTarget"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }]; + readonly name: "TargetsSet"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Transfer"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "DOMAIN_SEPARATOR"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }]; + readonly name: "allowance"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approve"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "balanceOf"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "decimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "decreaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getBptIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMainIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMainToken"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getOwner"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPausedState"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowEndTime"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodEndTime"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getScalingFactors"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getSwapFeePercentage"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getTargets"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "lowerTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVirtualSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedToken"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedTokenRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "addedValue"; + readonly type: "uint256"; + }]; + readonly name: "increaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "initialize"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "name"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly name: "nonces"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onExitPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onJoinPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "indexIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "indexOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "permit"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryExit"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryJoin"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptOut"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "poolConfig"; + readonly type: "bytes"; + }]; + readonly name: "setAssetManagerPoolConfig"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "setPaused"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "setSwapFeePercentage"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "newLowerTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "newUpperTarget"; + readonly type: "uint256"; + }]; + readonly name: "setTargets"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "symbol"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "totalSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transfer"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transferFrom"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }]; + static createInterface(): LinearPoolInterface$1; + static connect(address: string, signerOrProvider: Signer | Provider): LinearPool; +} + +declare class LiquidityGaugeV5__factory { + static readonly abi: readonly [{ + readonly name: "Deposit"; + readonly inputs: readonly [{ + readonly name: "provider"; + readonly type: "address"; + readonly indexed: true; + }, { + readonly name: "value"; + readonly type: "uint256"; + readonly indexed: false; + }]; + readonly anonymous: false; + readonly type: "event"; + }, { + readonly name: "Withdraw"; + readonly inputs: readonly [{ + readonly name: "provider"; + readonly type: "address"; + readonly indexed: true; + }, { + readonly name: "value"; + readonly type: "uint256"; + readonly indexed: false; + }]; + readonly anonymous: false; + readonly type: "event"; + }, { + readonly name: "UpdateLiquidityLimit"; + readonly inputs: readonly [{ + readonly name: "user"; + readonly type: "address"; + readonly indexed: true; + }, { + readonly name: "original_balance"; + readonly type: "uint256"; + readonly indexed: false; + }, { + readonly name: "original_supply"; + readonly type: "uint256"; + readonly indexed: false; + }, { + readonly name: "working_balance"; + readonly type: "uint256"; + readonly indexed: false; + }, { + readonly name: "working_supply"; + readonly type: "uint256"; + readonly indexed: false; + }]; + readonly anonymous: false; + readonly type: "event"; + }, { + readonly name: "Transfer"; + readonly inputs: readonly [{ + readonly name: "_from"; + readonly type: "address"; + readonly indexed: true; + }, { + readonly name: "_to"; + readonly type: "address"; + readonly indexed: true; + }, { + readonly name: "_value"; + readonly type: "uint256"; + readonly indexed: false; + }]; + readonly anonymous: false; + readonly type: "event"; + }, { + readonly name: "Approval"; + readonly inputs: readonly [{ + readonly name: "_owner"; + readonly type: "address"; + readonly indexed: true; + }, { + readonly name: "_spender"; + readonly type: "address"; + readonly indexed: true; + }, { + readonly name: "_value"; + readonly type: "uint256"; + readonly indexed: false; + }]; + readonly anonymous: false; + readonly type: "event"; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + readonly inputs: readonly [{ + readonly name: "minter"; + readonly type: "address"; + }, { + readonly name: "veBoostProxy"; + readonly type: "address"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "deposit"; + readonly inputs: readonly [{ + readonly name: "_value"; + readonly type: "uint256"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "deposit"; + readonly inputs: readonly [{ + readonly name: "_value"; + readonly type: "uint256"; + }, { + readonly name: "_addr"; + readonly type: "address"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "deposit"; + readonly inputs: readonly [{ + readonly name: "_value"; + readonly type: "uint256"; + }, { + readonly name: "_addr"; + readonly type: "address"; + }, { + readonly name: "_claim_rewards"; + readonly type: "bool"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "withdraw"; + readonly inputs: readonly [{ + readonly name: "_value"; + readonly type: "uint256"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "withdraw"; + readonly inputs: readonly [{ + readonly name: "_value"; + readonly type: "uint256"; + }, { + readonly name: "_claim_rewards"; + readonly type: "bool"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "claim_rewards"; + readonly inputs: readonly []; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "claim_rewards"; + readonly inputs: readonly [{ + readonly name: "_addr"; + readonly type: "address"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "claim_rewards"; + readonly inputs: readonly [{ + readonly name: "_addr"; + readonly type: "address"; + }, { + readonly name: "_receiver"; + readonly type: "address"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "transferFrom"; + readonly inputs: readonly [{ + readonly name: "_from"; + readonly type: "address"; + }, { + readonly name: "_to"; + readonly type: "address"; + }, { + readonly name: "_value"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "bool"; + }]; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "transfer"; + readonly inputs: readonly [{ + readonly name: "_to"; + readonly type: "address"; + }, { + readonly name: "_value"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "bool"; + }]; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "approve"; + readonly inputs: readonly [{ + readonly name: "_spender"; + readonly type: "address"; + }, { + readonly name: "_value"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "bool"; + }]; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "permit"; + readonly inputs: readonly [{ + readonly name: "_owner"; + readonly type: "address"; + }, { + readonly name: "_spender"; + readonly type: "address"; + }, { + readonly name: "_value"; + readonly type: "uint256"; + }, { + readonly name: "_deadline"; + readonly type: "uint256"; + }, { + readonly name: "_v"; + readonly type: "uint8"; + }, { + readonly name: "_r"; + readonly type: "bytes32"; + }, { + readonly name: "_s"; + readonly type: "bytes32"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "bool"; + }]; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "increaseAllowance"; + readonly inputs: readonly [{ + readonly name: "_spender"; + readonly type: "address"; + }, { + readonly name: "_added_value"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "bool"; + }]; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "decreaseAllowance"; + readonly inputs: readonly [{ + readonly name: "_spender"; + readonly type: "address"; + }, { + readonly name: "_subtracted_value"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "bool"; + }]; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "user_checkpoint"; + readonly inputs: readonly [{ + readonly name: "addr"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "bool"; + }]; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "set_rewards_receiver"; + readonly inputs: readonly [{ + readonly name: "_receiver"; + readonly type: "address"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "kick"; + readonly inputs: readonly [{ + readonly name: "addr"; + readonly type: "address"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "deposit_reward_token"; + readonly inputs: readonly [{ + readonly name: "_reward_token"; + readonly type: "address"; + }, { + readonly name: "_amount"; + readonly type: "uint256"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "add_reward"; + readonly inputs: readonly [{ + readonly name: "_reward_token"; + readonly type: "address"; + }, { + readonly name: "_distributor"; + readonly type: "address"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "set_reward_distributor"; + readonly inputs: readonly [{ + readonly name: "_reward_token"; + readonly type: "address"; + }, { + readonly name: "_distributor"; + readonly type: "address"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "set_killed"; + readonly inputs: readonly [{ + readonly name: "_is_killed"; + readonly type: "bool"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "claimed_reward"; + readonly inputs: readonly [{ + readonly name: "_addr"; + readonly type: "address"; + }, { + readonly name: "_token"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "claimable_reward"; + readonly inputs: readonly [{ + readonly name: "_user"; + readonly type: "address"; + }, { + readonly name: "_reward_token"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "claimable_reward_write"; + readonly inputs: readonly [{ + readonly name: "_addr"; + readonly type: "address"; + }, { + readonly name: "_token"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "claimable_tokens"; + readonly inputs: readonly [{ + readonly name: "addr"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "integrate_checkpoint"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "future_epoch_time"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "inflation_rate"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "decimals"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "version"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "string"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "allowance"; + readonly inputs: readonly [{ + readonly name: "owner"; + readonly type: "address"; + }, { + readonly name: "spender"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "initialize"; + readonly inputs: readonly [{ + readonly name: "_lp_token"; + readonly type: "address"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "balanceOf"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "totalSupply"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "name"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "string"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "symbol"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "string"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "DOMAIN_SEPARATOR"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "bytes32"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "nonces"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "factory"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "address"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "lp_token"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "address"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "is_killed"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "bool"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "reward_count"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "reward_data"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "tuple"; + readonly components: readonly [{ + readonly name: "token"; + readonly type: "address"; + }, { + readonly name: "distributor"; + readonly type: "address"; + }, { + readonly name: "period_finish"; + readonly type: "uint256"; + }, { + readonly name: "rate"; + readonly type: "uint256"; + }, { + readonly name: "last_update"; + readonly type: "uint256"; + }, { + readonly name: "integral"; + readonly type: "uint256"; + }]; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "rewards_receiver"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "address"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "reward_integral_for"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "address"; + }, { + readonly name: "arg1"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "working_balances"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "working_supply"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "integrate_inv_supply_of"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "integrate_checkpoint_of"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "integrate_fraction"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "period"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "int128"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "reward_tokens"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "address"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "period_timestamp"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "integrate_inv_supply"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }]; + static createInterface(): LiquidityGaugeV5Interface; + static connect(address: string, signerOrProvider: Signer | Provider): LiquidityGaugeV5; +} + +declare class Multicall__factory { + static readonly abi: readonly [{ + readonly constant: false; + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly name: "target"; + readonly type: "address"; + }, { + readonly name: "callData"; + readonly type: "bytes"; + }]; + readonly name: "calls"; + readonly type: "tuple[]"; + }]; + readonly name: "aggregate"; + readonly outputs: readonly [{ + readonly name: "blockNumber"; + readonly type: "uint256"; + }, { + readonly name: "returnData"; + readonly type: "bytes[]"; + }]; + readonly payable: false; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }]; + static createInterface(): MulticallInterface; + static connect(address: string, signerOrProvider: Signer | Provider): Multicall; +} + +declare class Multicall3__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "address"; + readonly name: "target"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "callData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct Multicall3.Call[]"; + readonly name: "calls"; + readonly type: "tuple[]"; + }]; + readonly name: "aggregate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "blockNumber"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes[]"; + readonly name: "returnData"; + readonly type: "bytes[]"; + }]; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "address"; + readonly name: "target"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "allowFailure"; + readonly type: "bool"; + }, { + readonly internalType: "bytes"; + readonly name: "callData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct Multicall3.Call3[]"; + readonly name: "calls"; + readonly type: "tuple[]"; + }]; + readonly name: "aggregate3"; + readonly outputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "bool"; + readonly name: "success"; + readonly type: "bool"; + }, { + readonly internalType: "bytes"; + readonly name: "returnData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct Multicall3.Result[]"; + readonly name: "returnData"; + readonly type: "tuple[]"; + }]; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "address"; + readonly name: "target"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "allowFailure"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "callData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct Multicall3.Call3Value[]"; + readonly name: "calls"; + readonly type: "tuple[]"; + }]; + readonly name: "aggregate3Value"; + readonly outputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "bool"; + readonly name: "success"; + readonly type: "bool"; + }, { + readonly internalType: "bytes"; + readonly name: "returnData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct Multicall3.Result[]"; + readonly name: "returnData"; + readonly type: "tuple[]"; + }]; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "address"; + readonly name: "target"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "callData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct Multicall3.Call[]"; + readonly name: "calls"; + readonly type: "tuple[]"; + }]; + readonly name: "blockAndAggregate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "blockNumber"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "blockHash"; + readonly type: "bytes32"; + }, { + readonly components: readonly [{ + readonly internalType: "bool"; + readonly name: "success"; + readonly type: "bool"; + }, { + readonly internalType: "bytes"; + readonly name: "returnData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct Multicall3.Result[]"; + readonly name: "returnData"; + readonly type: "tuple[]"; + }]; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getBasefee"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "basefee"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "blockNumber"; + readonly type: "uint256"; + }]; + readonly name: "getBlockHash"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "blockHash"; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getBlockNumber"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "blockNumber"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getChainId"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "chainid"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCurrentBlockCoinbase"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: "coinbase"; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCurrentBlockDifficulty"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "difficulty"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCurrentBlockGasLimit"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "gaslimit"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCurrentBlockTimestamp"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "timestamp"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "addr"; + readonly type: "address"; + }]; + readonly name: "getEthBalance"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "balance"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getLastBlockHash"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "blockHash"; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bool"; + readonly name: "requireSuccess"; + readonly type: "bool"; + }, { + readonly components: readonly [{ + readonly internalType: "address"; + readonly name: "target"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "callData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct Multicall3.Call[]"; + readonly name: "calls"; + readonly type: "tuple[]"; + }]; + readonly name: "tryAggregate"; + readonly outputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "bool"; + readonly name: "success"; + readonly type: "bool"; + }, { + readonly internalType: "bytes"; + readonly name: "returnData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct Multicall3.Result[]"; + readonly name: "returnData"; + readonly type: "tuple[]"; + }]; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bool"; + readonly name: "requireSuccess"; + readonly type: "bool"; + }, { + readonly components: readonly [{ + readonly internalType: "address"; + readonly name: "target"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "callData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct Multicall3.Call[]"; + readonly name: "calls"; + readonly type: "tuple[]"; + }]; + readonly name: "tryBlockAndAggregate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "blockNumber"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "blockHash"; + readonly type: "bytes32"; + }, { + readonly components: readonly [{ + readonly internalType: "bool"; + readonly name: "success"; + readonly type: "bool"; + }, { + readonly internalType: "bytes"; + readonly name: "returnData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct Multicall3.Result[]"; + readonly name: "returnData"; + readonly type: "tuple[]"; + }]; + readonly stateMutability: "payable"; + readonly type: "function"; + }]; + static createInterface(): Multicall3Interface; + static connect(address: string, signerOrProvider: Signer | Provider): Multicall3; +} + +declare class StablePool__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20[]"; + readonly name: "tokens"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256"; + readonly name: "amplificationParameter"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "startValue"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "endValue"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "startTime"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "endTime"; + readonly type: "uint256"; + }]; + readonly name: "AmpUpdateStarted"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "currentValue"; + readonly type: "uint256"; + }]; + readonly name: "AmpUpdateStopped"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Approval"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "PausedStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "SwapFeePercentageChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Transfer"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "DOMAIN_SEPARATOR"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }]; + readonly name: "allowance"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approve"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "balanceOf"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "decimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "decreaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAmplificationParameter"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "bool"; + readonly name: "isUpdating"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "precision"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getOwner"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPausedState"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowEndTime"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodEndTime"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getSwapFeePercentage"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "addedValue"; + readonly type: "uint256"; + }]; + readonly name: "increaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "name"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly name: "nonces"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onExitPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onJoinPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "swapRequest"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "indexIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "indexOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "permit"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryExit"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryJoin"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptOut"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "poolConfig"; + readonly type: "bytes"; + }]; + readonly name: "setAssetManagerPoolConfig"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "setPaused"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "setSwapFeePercentage"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "rawEndValue"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "endTime"; + readonly type: "uint256"; + }]; + readonly name: "startAmplificationParameterUpdate"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "stopAmplificationParameterUpdate"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "symbol"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "totalSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transfer"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transferFrom"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }]; + static createInterface(): StablePoolInterface; + static connect(address: string, signerOrProvider: Signer | Provider): StablePool; +} + +declare class StaticATokenRateProvider__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IStaticAToken"; + readonly name: "_waToken"; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly inputs: readonly []; + readonly name: "getRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "waToken"; + readonly outputs: readonly [{ + readonly internalType: "contract IStaticAToken"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): StaticATokenRateProviderInterface; + static connect(address: string, signerOrProvider: Signer | Provider): StaticATokenRateProvider; +} + +declare class Vault__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: "authorizer"; + readonly type: "address"; + }, { + readonly internalType: "contract IWETH"; + readonly name: "weth"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "contract IAuthorizer"; + readonly name: "newAuthorizer"; + readonly type: "address"; + }]; + readonly name: "AuthorizerChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "ExternalBalanceTransfer"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "contract IFlashLoanRecipient"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "feeAmount"; + readonly type: "uint256"; + }]; + readonly name: "FlashLoan"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "int256"; + readonly name: "delta"; + readonly type: "int256"; + }]; + readonly name: "InternalBalanceChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "PausedStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "liquidityProvider"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "contract IERC20[]"; + readonly name: "tokens"; + readonly type: "address[]"; + }, { + readonly indexed: false; + readonly internalType: "int256[]"; + readonly name: "deltas"; + readonly type: "int256[]"; + }, { + readonly indexed: false; + readonly internalType: "uint256[]"; + readonly name: "protocolFeeAmounts"; + readonly type: "uint256[]"; + }]; + readonly name: "PoolBalanceChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "assetManager"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "int256"; + readonly name: "cashDelta"; + readonly type: "int256"; + }, { + readonly indexed: false; + readonly internalType: "int256"; + readonly name: "managedDelta"; + readonly type: "int256"; + }]; + readonly name: "PoolBalanceManaged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "poolAddress"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "enum IVault.PoolSpecialization"; + readonly name: "specialization"; + readonly type: "uint8"; + }]; + readonly name: "PoolRegistered"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "relayer"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "approved"; + readonly type: "bool"; + }]; + readonly name: "RelayerApprovalChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly indexed: true; + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "amountIn"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "amountOut"; + readonly type: "uint256"; + }]; + readonly name: "Swap"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly indexed: false; + readonly internalType: "contract IERC20[]"; + readonly name: "tokens"; + readonly type: "address[]"; + }]; + readonly name: "TokensDeregistered"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly indexed: false; + readonly internalType: "contract IERC20[]"; + readonly name: "tokens"; + readonly type: "address[]"; + }, { + readonly indexed: false; + readonly internalType: "address[]"; + readonly name: "assetManagers"; + readonly type: "address[]"; + }]; + readonly name: "TokensRegistered"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "WETH"; + readonly outputs: readonly [{ + readonly internalType: "contract IWETH"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly components: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "assetInIndex"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "assetOutIndex"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IVault.BatchSwapStep[]"; + readonly name: "swaps"; + readonly type: "tuple[]"; + }, { + readonly internalType: "contract IAsset[]"; + readonly name: "assets"; + readonly type: "address[]"; + }, { + readonly components: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "fromInternalBalance"; + readonly type: "bool"; + }, { + readonly internalType: "address payable"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "toInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.FundManagement"; + readonly name: "funds"; + readonly type: "tuple"; + }, { + readonly internalType: "int256[]"; + readonly name: "limits"; + readonly type: "int256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }]; + readonly name: "batchSwap"; + readonly outputs: readonly [{ + readonly internalType: "int256[]"; + readonly name: "assetDeltas"; + readonly type: "int256[]"; + }]; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "contract IERC20[]"; + readonly name: "tokens"; + readonly type: "address[]"; + }]; + readonly name: "deregisterTokens"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address payable"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly components: readonly [{ + readonly internalType: "contract IAsset[]"; + readonly name: "assets"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "minAmountsOut"; + readonly type: "uint256[]"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }, { + readonly internalType: "bool"; + readonly name: "toInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.ExitPoolRequest"; + readonly name: "request"; + readonly type: "tuple"; + }]; + readonly name: "exitPool"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IFlashLoanRecipient"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20[]"; + readonly name: "tokens"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amounts"; + readonly type: "uint256[]"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "flashLoan"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getDomainSeparator"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20[]"; + readonly name: "tokens"; + readonly type: "address[]"; + }]; + readonly name: "getInternalBalance"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }]; + readonly name: "getNextNonce"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPausedState"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowEndTime"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodEndTime"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }]; + readonly name: "getPool"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "enum IVault.PoolSpecialization"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }]; + readonly name: "getPoolTokenInfo"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "cash"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "managed"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "assetManager"; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }]; + readonly name: "getPoolTokens"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20[]"; + readonly name: "tokens"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeesCollector"; + readonly outputs: readonly [{ + readonly internalType: "contract ProtocolFeesCollector"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "relayer"; + readonly type: "address"; + }]; + readonly name: "hasApprovedRelayer"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly components: readonly [{ + readonly internalType: "contract IAsset[]"; + readonly name: "assets"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "maxAmountsIn"; + readonly type: "uint256[]"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }, { + readonly internalType: "bool"; + readonly name: "fromInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.JoinPoolRequest"; + readonly name: "request"; + readonly type: "tuple"; + }]; + readonly name: "joinPool"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.PoolBalanceOpKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly internalType: "struct IVault.PoolBalanceOp[]"; + readonly name: "ops"; + readonly type: "tuple[]"; + }]; + readonly name: "managePoolBalance"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.UserBalanceOpKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IAsset"; + readonly name: "asset"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address payable"; + readonly name: "recipient"; + readonly type: "address"; + }]; + readonly internalType: "struct IVault.UserBalanceOp[]"; + readonly name: "ops"; + readonly type: "tuple[]"; + }]; + readonly name: "manageUserBalance"; + readonly outputs: readonly []; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly components: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "assetInIndex"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "assetOutIndex"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IVault.BatchSwapStep[]"; + readonly name: "swaps"; + readonly type: "tuple[]"; + }, { + readonly internalType: "contract IAsset[]"; + readonly name: "assets"; + readonly type: "address[]"; + }, { + readonly components: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "fromInternalBalance"; + readonly type: "bool"; + }, { + readonly internalType: "address payable"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "toInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.FundManagement"; + readonly name: "funds"; + readonly type: "tuple"; + }]; + readonly name: "queryBatchSwap"; + readonly outputs: readonly [{ + readonly internalType: "int256[]"; + readonly name: ""; + readonly type: "int256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "enum IVault.PoolSpecialization"; + readonly name: "specialization"; + readonly type: "uint8"; + }]; + readonly name: "registerPool"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "contract IERC20[]"; + readonly name: "tokens"; + readonly type: "address[]"; + }, { + readonly internalType: "address[]"; + readonly name: "assetManagers"; + readonly type: "address[]"; + }]; + readonly name: "registerTokens"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: "newAuthorizer"; + readonly type: "address"; + }]; + readonly name: "setAuthorizer"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "setPaused"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "relayer"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "approved"; + readonly type: "bool"; + }]; + readonly name: "setRelayerApproval"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IAsset"; + readonly name: "assetIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IAsset"; + readonly name: "assetOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IVault.SingleSwap"; + readonly name: "singleSwap"; + readonly type: "tuple"; + }, { + readonly components: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "fromInternalBalance"; + readonly type: "bool"; + }, { + readonly internalType: "address payable"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "bool"; + readonly name: "toInternalBalance"; + readonly type: "bool"; + }]; + readonly internalType: "struct IVault.FundManagement"; + readonly name: "funds"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: "limit"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }]; + readonly name: "swap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "amountCalculated"; + readonly type: "uint256"; + }]; + readonly stateMutability: "payable"; + readonly type: "function"; + }, { + readonly stateMutability: "payable"; + readonly type: "receive"; + }]; + static createInterface(): VaultInterface; + static connect(address: string, signerOrProvider: Signer | Provider): Vault; +} + +declare class WeightedPool__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20[]"; + readonly name: "tokens"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "normalizedWeights"; + readonly type: "uint256[]"; + }, { + readonly internalType: "contract IRateProvider[]"; + readonly name: "rateProviders"; + readonly type: "address[]"; + }, { + readonly internalType: "address[]"; + readonly name: "assetManagers"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly internalType: "struct WeightedPool.NewPoolParams"; + readonly name: "params"; + readonly type: "tuple"; + }, { + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: "protocolFeeProvider"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "version"; + readonly type: "string"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Approval"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "PausedStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "uint256"; + readonly name: "feeType"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "protocolFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "ProtocolFeePercentageCacheUpdated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "enabled"; + readonly type: "bool"; + }]; + readonly name: "RecoveryModeStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "SwapFeePercentageChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Transfer"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "DOMAIN_SEPARATOR"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }]; + readonly name: "allowance"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approve"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "balanceOf"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "decimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "decreaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "enableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getATHRateProduct"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getActualSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getDomainSeparator"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getInvariant"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getLastPostJoinExitInvariant"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "getNextNonce"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getNormalizedWeights"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getOwner"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPausedState"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowEndTime"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodEndTime"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "feeType"; + readonly type: "uint256"; + }]; + readonly name: "getProtocolFeePercentageCache"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeesCollector"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeesCollector"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolSwapFeeDelegation"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getRateProviders"; + readonly outputs: readonly [{ + readonly internalType: "contract IRateProvider[]"; + readonly name: ""; + readonly type: "address[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getScalingFactors"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getSwapFeePercentage"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "inRecoveryMode"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "addedValue"; + readonly type: "uint256"; + }]; + readonly name: "increaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "name"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly name: "nonces"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onExitPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onJoinPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "pause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "permit"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryExit"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryJoin"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptOut"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "poolConfig"; + readonly type: "bytes"; + }]; + readonly name: "setAssetManagerPoolConfig"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "setSwapFeePercentage"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "symbol"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "totalSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transfer"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transferFrom"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "unpause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "updateProtocolFeePercentageCache"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "version"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): WeightedPoolInterface; + static connect(address: string, signerOrProvider: Signer | Provider): WeightedPool; +} + +declare class WeightedPoolFactory__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: "protocolFeeProvider"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "factoryVersion"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "poolVersion"; + readonly type: "string"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly []; + readonly name: "FactoryDisabled"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "PoolCreated"; + readonly type: "event"; + }, { + readonly inputs: readonly [{ + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20[]"; + readonly name: "tokens"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "normalizedWeights"; + readonly type: "uint256[]"; + }, { + readonly internalType: "contract IRateProvider[]"; + readonly name: "rateProviders"; + readonly type: "address[]"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "bytes32"; + readonly name: "salt"; + readonly type: "bytes32"; + }]; + readonly name: "create"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disable"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCode"; + readonly outputs: readonly [{ + readonly internalType: "bytes"; + readonly name: ""; + readonly type: "bytes"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCodeContracts"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: "contractA"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "contractB"; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPauseConfiguration"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolVersion"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeePercentagesProvider"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "isDisabled"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "isPoolFromFactory"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "version"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): WeightedPoolFactoryInterface; + static connect(address: string, signerOrProvider: Signer | Provider): WeightedPoolFactory; +} + +declare class YearnLinearPool__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "mainToken"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "assetManager"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "version"; + readonly type: "string"; + }]; + readonly internalType: "struct YearnLinearPool.ConstructorArgs"; + readonly name: "args"; + readonly type: "tuple"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Approval"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "PausedStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "enabled"; + readonly type: "bool"; + }]; + readonly name: "RecoveryModeStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "SwapFeePercentageChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "contract IERC20"; + readonly name: "token"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "lowerTarget"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }]; + readonly name: "TargetsSet"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Transfer"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "DOMAIN_SEPARATOR"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }]; + readonly name: "allowance"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approve"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "balanceOf"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "decimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "decreaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "enableRecoveryMode"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getBptIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "pure"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getDomainSeparator"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMainIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMainToken"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "getNextNonce"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getOwner"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPausedState"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowEndTime"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodEndTime"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeesCollector"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeesCollector"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getScalingFactors"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getSwapFeePercentage"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getTargets"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "lowerTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVirtualSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedIndex"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedToken"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getWrappedTokenRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "inRecoveryMode"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "addedValue"; + readonly type: "uint256"; + }]; + readonly name: "increaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "initialize"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "name"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly name: "nonces"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onExitPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFees"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onJoinPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFees"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "indexIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "indexOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "pause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "permit"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryExit"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryJoin"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptOut"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "setSwapFeePercentage"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "newLowerTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "newUpperTarget"; + readonly type: "uint256"; + }]; + readonly name: "setTargets"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "symbol"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "totalSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transfer"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transferFrom"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "unpause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "version"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): YearnLinearPoolInterface; + static connect(address: string, signerOrProvider: Signer | Provider): YearnLinearPool; +} + +declare class YearnLinearPoolFactory__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: "protocolFeeProvider"; + readonly type: "address"; + }, { + readonly internalType: "contract IBalancerQueries"; + readonly name: "queries"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "factoryVersion"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "poolVersion"; + readonly type: "string"; + }, { + readonly internalType: "uint256"; + readonly name: "initialPauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly []; + readonly name: "FactoryDisabled"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "PoolCreated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "uint256"; + readonly name: "protocolId"; + readonly type: "uint256"; + }]; + readonly name: "YearnLinearPoolCreated"; + readonly type: "event"; + }, { + readonly inputs: readonly [{ + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "mainToken"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "wrappedToken"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "upperTarget"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolId"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "salt"; + readonly type: "bytes32"; + }]; + readonly name: "create"; + readonly outputs: readonly [{ + readonly internalType: "contract LinearPool"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "disable"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCode"; + readonly outputs: readonly [{ + readonly internalType: "bytes"; + readonly name: ""; + readonly type: "bytes"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getCreationCodeContracts"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: "contractA"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "contractB"; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getLastCreatedPool"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPauseConfiguration"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolVersion"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getProtocolFeePercentagesProvider"; + readonly outputs: readonly [{ + readonly internalType: "contract IProtocolFeePercentagesProvider"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "isDisabled"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "pool"; + readonly type: "address"; + }]; + readonly name: "isPoolFromFactory"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "version"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }]; + static createInterface(): YearnLinearPoolFactoryInterface; + static connect(address: string, signerOrProvider: Signer | Provider): YearnLinearPoolFactory; +} + +declare class GyroEV2__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly components: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "string"; + readonly name: "name"; + readonly type: "string"; + }, { + readonly internalType: "string"; + readonly name: "symbol"; + readonly type: "string"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "token0"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "token1"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodDuration"; + readonly type: "uint256"; + }, { + readonly internalType: "bool"; + readonly name: "oracleEnabled"; + readonly type: "bool"; + }, { + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly internalType: "struct ExtensibleWeightedPool2Tokens.NewPoolParams"; + readonly name: "baseParams"; + readonly type: "tuple"; + }, { + readonly components: readonly [{ + readonly internalType: "int256"; + readonly name: "alpha"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "beta"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "c"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "s"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "lambda"; + readonly type: "int256"; + }]; + readonly internalType: "struct GyroECLPMath.Params"; + readonly name: "eclpParams"; + readonly type: "tuple"; + }, { + readonly components: readonly [{ + readonly components: readonly [{ + readonly internalType: "int256"; + readonly name: "x"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "y"; + readonly type: "int256"; + }]; + readonly internalType: "struct GyroECLPMath.Vector2"; + readonly name: "tauAlpha"; + readonly type: "tuple"; + }, { + readonly components: readonly [{ + readonly internalType: "int256"; + readonly name: "x"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "y"; + readonly type: "int256"; + }]; + readonly internalType: "struct GyroECLPMath.Vector2"; + readonly name: "tauBeta"; + readonly type: "tuple"; + }, { + readonly internalType: "int256"; + readonly name: "u"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "v"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "w"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "z"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "dSq"; + readonly type: "int256"; + }]; + readonly internalType: "struct GyroECLPMath.DerivedParams"; + readonly name: "derivedEclpParams"; + readonly type: "tuple"; + }, { + readonly internalType: "address"; + readonly name: "rateProvider0"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "rateProvider1"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "capManager"; + readonly type: "address"; + }, { + readonly components: readonly [{ + readonly internalType: "bool"; + readonly name: "capEnabled"; + readonly type: "bool"; + }, { + readonly internalType: "uint120"; + readonly name: "perAddressCap"; + readonly type: "uint120"; + }, { + readonly internalType: "uint128"; + readonly name: "globalCap"; + readonly type: "uint128"; + }]; + readonly internalType: "struct ICappedLiquidity.CapParams"; + readonly name: "capParams"; + readonly type: "tuple"; + }, { + readonly internalType: "address"; + readonly name: "pauseManager"; + readonly type: "address"; + }]; + readonly internalType: "struct GyroECLPPool.GyroParams"; + readonly name: "params"; + readonly type: "tuple"; + }, { + readonly internalType: "address"; + readonly name: "configAddress"; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Approval"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "address"; + readonly name: "capManager"; + readonly type: "address"; + }]; + readonly name: "CapManagerUpdated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "bool"; + readonly name: "capEnabled"; + readonly type: "bool"; + }, { + readonly internalType: "uint120"; + readonly name: "perAddressCap"; + readonly type: "uint120"; + }, { + readonly internalType: "uint128"; + readonly name: "globalCap"; + readonly type: "uint128"; + }]; + readonly indexed: false; + readonly internalType: "struct ICappedLiquidity.CapParams"; + readonly name: "params"; + readonly type: "tuple"; + }]; + readonly name: "CapParamsUpdated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "derivedParamsValidated"; + readonly type: "bool"; + }]; + readonly name: "ECLPDerivedParamsValidated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "paramsValidated"; + readonly type: "bool"; + }]; + readonly name: "ECLPParamsValidated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "invariantAfterJoin"; + readonly type: "uint256"; + }]; + readonly name: "InvariantAterInitializeJoin"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "oldInvariant"; + readonly type: "uint256"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "newInvariant"; + readonly type: "uint256"; + }]; + readonly name: "InvariantOldAndNew"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "enabled"; + readonly type: "bool"; + }]; + readonly name: "OracleEnabledChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "oracleUpdatedIndex"; + readonly type: "uint256"; + }]; + readonly name: "OracleIndexUpdated"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "address"; + readonly name: "oldPauseManager"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "address"; + readonly name: "newPauseManager"; + readonly type: "address"; + }]; + readonly name: "PauseManagerChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly []; + readonly name: "PausedLocally"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "PausedStateChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "SwapFeePercentageChanged"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: false; + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly components: readonly [{ + readonly internalType: "int256"; + readonly name: "x"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "y"; + readonly type: "int256"; + }]; + readonly indexed: false; + readonly internalType: "struct GyroECLPMath.Vector2"; + readonly name: "invariant"; + readonly type: "tuple"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "SwapParams"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly indexed: true; + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly indexed: false; + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }]; + readonly name: "Transfer"; + readonly type: "event"; + }, { + readonly anonymous: false; + readonly inputs: readonly []; + readonly name: "UnpausedLocally"; + readonly type: "event"; + }, { + readonly inputs: readonly []; + readonly name: "DOMAIN_SEPARATOR"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_dSq"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_paramsAlpha"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_paramsBeta"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_paramsC"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_paramsLambda"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_paramsS"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_tauAlphaX"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_tauAlphaY"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_tauBetaX"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_tauBetaY"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_u"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_v"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_w"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "_z"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: ""; + readonly type: "int256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }]; + readonly name: "allowance"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "approve"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "account"; + readonly type: "address"; + }]; + readonly name: "balanceOf"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "capManager"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "capParams"; + readonly outputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "bool"; + readonly name: "capEnabled"; + readonly type: "bool"; + }, { + readonly internalType: "uint120"; + readonly name: "perAddressCap"; + readonly type: "uint120"; + }, { + readonly internalType: "uint128"; + readonly name: "globalCap"; + readonly type: "uint128"; + }]; + readonly internalType: "struct ICappedLiquidity.CapParams"; + readonly name: ""; + readonly type: "tuple"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "_pauseManager"; + readonly type: "address"; + }]; + readonly name: "changePauseManager"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "decimals"; + readonly outputs: readonly [{ + readonly internalType: "uint8"; + readonly name: ""; + readonly type: "uint8"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "decreaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "startIndex"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "endIndex"; + readonly type: "uint256"; + }]; + readonly name: "dirtyUninitializedOracleSamples"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "enableOracle"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getECLPParams"; + readonly outputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "int256"; + readonly name: "alpha"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "beta"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "c"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "s"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "lambda"; + readonly type: "int256"; + }]; + readonly internalType: "struct GyroECLPMath.Params"; + readonly name: "params"; + readonly type: "tuple"; + }, { + readonly components: readonly [{ + readonly components: readonly [{ + readonly internalType: "int256"; + readonly name: "x"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "y"; + readonly type: "int256"; + }]; + readonly internalType: "struct GyroECLPMath.Vector2"; + readonly name: "tauAlpha"; + readonly type: "tuple"; + }, { + readonly components: readonly [{ + readonly internalType: "int256"; + readonly name: "x"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "y"; + readonly type: "int256"; + }]; + readonly internalType: "struct GyroECLPMath.Vector2"; + readonly name: "tauBeta"; + readonly type: "tuple"; + }, { + readonly internalType: "int256"; + readonly name: "u"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "v"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "w"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "z"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "dSq"; + readonly type: "int256"; + }]; + readonly internalType: "struct GyroECLPMath.DerivedParams"; + readonly name: "d"; + readonly type: "tuple"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getInvariant"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getLargestSafeQueryWindow"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "pure"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getLastInvariant"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "enum IPriceOracle.Variable"; + readonly name: "variable"; + readonly type: "uint8"; + }]; + readonly name: "getLatest"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getMiscData"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: "logInvariant"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "logTotalSupply"; + readonly type: "int256"; + }, { + readonly internalType: "uint256"; + readonly name: "oracleSampleCreationTimestamp"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "oracleIndex"; + readonly type: "uint256"; + }, { + readonly internalType: "bool"; + readonly name: "oracleEnabled"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getNormalizedWeights"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getOwner"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IPriceOracle.Variable"; + readonly name: "variable"; + readonly type: "uint8"; + }, { + readonly internalType: "uint256"; + readonly name: "ago"; + readonly type: "uint256"; + }]; + readonly internalType: "struct IPriceOracle.OracleAccumulatorQuery[]"; + readonly name: "queries"; + readonly type: "tuple[]"; + }]; + readonly name: "getPastAccumulators"; + readonly outputs: readonly [{ + readonly internalType: "int256[]"; + readonly name: "results"; + readonly type: "int256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPausedState"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }, { + readonly internalType: "uint256"; + readonly name: "pauseWindowEndTime"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "bufferPeriodEndTime"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPoolId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getPrice"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "spotPrice"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getRate"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "index"; + readonly type: "uint256"; + }]; + readonly name: "getSample"; + readonly outputs: readonly [{ + readonly internalType: "int256"; + readonly name: "logPairPrice"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "accLogPairPrice"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "logBptPrice"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "accLogBptPrice"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "logInvariant"; + readonly type: "int256"; + }, { + readonly internalType: "int256"; + readonly name: "accLogInvariant"; + readonly type: "int256"; + }, { + readonly internalType: "uint256"; + readonly name: "timestamp"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getSwapFeePercentage"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IPriceOracle.Variable"; + readonly name: "variable"; + readonly type: "uint8"; + }, { + readonly internalType: "uint256"; + readonly name: "secs"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "ago"; + readonly type: "uint256"; + }]; + readonly internalType: "struct IPriceOracle.OracleAverageQuery[]"; + readonly name: "queries"; + readonly type: "tuple[]"; + }]; + readonly name: "getTimeWeightedAverage"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "results"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getTokenRates"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "rate0"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "rate1"; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getTotalSamples"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "pure"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "gyroConfig"; + readonly outputs: readonly [{ + readonly internalType: "contract IGyroConfig"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "addedValue"; + readonly type: "uint256"; + }]; + readonly name: "increaseAllowance"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "name"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }]; + readonly name: "nonces"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onExitPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: ""; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "onJoinPool"; + readonly outputs: readonly [{ + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256[]"; + readonly name: "dueProtocolFeeAmounts"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "enum IVault.SwapKind"; + readonly name: "kind"; + readonly type: "uint8"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenIn"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "tokenOut"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "address"; + readonly name: "from"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "to"; + readonly type: "address"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly internalType: "struct IPoolSwapStructs.SwapRequest"; + readonly name: "request"; + readonly type: "tuple"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "balanceTokenOut"; + readonly type: "uint256"; + }]; + readonly name: "onSwap"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "pause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "pauseManager"; + readonly outputs: readonly [{ + readonly internalType: "address"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "owner"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "spender"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "value"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "deadline"; + readonly type: "uint256"; + }, { + readonly internalType: "uint8"; + readonly name: "v"; + readonly type: "uint8"; + }, { + readonly internalType: "bytes32"; + readonly name: "r"; + readonly type: "bytes32"; + }, { + readonly internalType: "bytes32"; + readonly name: "s"; + readonly type: "bytes32"; + }]; + readonly name: "permit"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryExit"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptIn"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsOut"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: "poolId"; + readonly type: "bytes32"; + }, { + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256[]"; + readonly name: "balances"; + readonly type: "uint256[]"; + }, { + readonly internalType: "uint256"; + readonly name: "lastChangeBlock"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256"; + readonly name: "protocolSwapFeePercentage"; + readonly type: "uint256"; + }, { + readonly internalType: "bytes"; + readonly name: "userData"; + readonly type: "bytes"; + }]; + readonly name: "queryJoin"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "bptOut"; + readonly type: "uint256"; + }, { + readonly internalType: "uint256[]"; + readonly name: "amountsIn"; + readonly type: "uint256[]"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "rateProvider0"; + readonly outputs: readonly [{ + readonly internalType: "contract IRateProvider"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "rateProvider1"; + readonly outputs: readonly [{ + readonly internalType: "contract IRateProvider"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "_capManager"; + readonly type: "address"; + }]; + readonly name: "setCapManager"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly components: readonly [{ + readonly internalType: "bool"; + readonly name: "capEnabled"; + readonly type: "bool"; + }, { + readonly internalType: "uint120"; + readonly name: "perAddressCap"; + readonly type: "uint120"; + }, { + readonly internalType: "uint128"; + readonly name: "globalCap"; + readonly type: "uint128"; + }]; + readonly internalType: "struct ICappedLiquidity.CapParams"; + readonly name: "params"; + readonly type: "tuple"; + }]; + readonly name: "setCapParams"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bool"; + readonly name: "paused"; + readonly type: "bool"; + }]; + readonly name: "setPaused"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "uint256"; + readonly name: "swapFeePercentage"; + readonly type: "uint256"; + }]; + readonly name: "setSwapFeePercentage"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "symbol"; + readonly outputs: readonly [{ + readonly internalType: "string"; + readonly name: ""; + readonly type: "string"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "totalSupply"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transfer"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "sender"; + readonly type: "address"; + }, { + readonly internalType: "address"; + readonly name: "recipient"; + readonly type: "address"; + }, { + readonly internalType: "uint256"; + readonly name: "amount"; + readonly type: "uint256"; + }]; + readonly name: "transferFrom"; + readonly outputs: readonly [{ + readonly internalType: "bool"; + readonly name: ""; + readonly type: "bool"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "unpause"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }]; + static createInterface(): GyroEV2Interface; + static connect(address: string, signerOrProvider: Signer | Provider): GyroEV2; +} + +declare class VeBal__factory { + static readonly abi: readonly [{ + readonly name: "Deposit"; + readonly inputs: readonly [{ + readonly name: "provider"; + readonly type: "address"; + readonly indexed: true; + }, { + readonly name: "value"; + readonly type: "uint256"; + readonly indexed: false; + }, { + readonly name: "locktime"; + readonly type: "uint256"; + readonly indexed: true; + }, { + readonly name: "type"; + readonly type: "int128"; + readonly indexed: false; + }, { + readonly name: "ts"; + readonly type: "uint256"; + readonly indexed: false; + }]; + readonly anonymous: false; + readonly type: "event"; + }, { + readonly name: "Withdraw"; + readonly inputs: readonly [{ + readonly name: "provider"; + readonly type: "address"; + readonly indexed: true; + }, { + readonly name: "value"; + readonly type: "uint256"; + readonly indexed: false; + }, { + readonly name: "ts"; + readonly type: "uint256"; + readonly indexed: false; + }]; + readonly anonymous: false; + readonly type: "event"; + }, { + readonly name: "Supply"; + readonly inputs: readonly [{ + readonly name: "prevSupply"; + readonly type: "uint256"; + readonly indexed: false; + }, { + readonly name: "supply"; + readonly type: "uint256"; + readonly indexed: false; + }]; + readonly anonymous: false; + readonly type: "event"; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + readonly inputs: readonly [{ + readonly name: "token_addr"; + readonly type: "address"; + }, { + readonly name: "_name"; + readonly type: "string"; + }, { + readonly name: "_symbol"; + readonly type: "string"; + }, { + readonly name: "_authorizer_adaptor"; + readonly type: "address"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "token"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "address"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "name"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "string"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "symbol"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "string"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "decimals"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "admin"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "address"; + }]; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "commit_smart_wallet_checker"; + readonly inputs: readonly [{ + readonly name: "addr"; + readonly type: "address"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "apply_smart_wallet_checker"; + readonly inputs: readonly []; + readonly outputs: readonly []; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "get_last_user_slope"; + readonly inputs: readonly [{ + readonly name: "addr"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "int128"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "user_point_history__ts"; + readonly inputs: readonly [{ + readonly name: "_addr"; + readonly type: "address"; + }, { + readonly name: "_idx"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "locked__end"; + readonly inputs: readonly [{ + readonly name: "_addr"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "checkpoint"; + readonly inputs: readonly []; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "deposit_for"; + readonly inputs: readonly [{ + readonly name: "_addr"; + readonly type: "address"; + }, { + readonly name: "_value"; + readonly type: "uint256"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "create_lock"; + readonly inputs: readonly [{ + readonly name: "_value"; + readonly type: "uint256"; + }, { + readonly name: "_unlock_time"; + readonly type: "uint256"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "increase_amount"; + readonly inputs: readonly [{ + readonly name: "_value"; + readonly type: "uint256"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "increase_unlock_time"; + readonly inputs: readonly [{ + readonly name: "_unlock_time"; + readonly type: "uint256"; + }]; + readonly outputs: readonly []; + }, { + readonly stateMutability: "nonpayable"; + readonly type: "function"; + readonly name: "withdraw"; + readonly inputs: readonly []; + readonly outputs: readonly []; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "balanceOf"; + readonly inputs: readonly [{ + readonly name: "addr"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "balanceOf"; + readonly inputs: readonly [{ + readonly name: "addr"; + readonly type: "address"; + }, { + readonly name: "_t"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "balanceOfAt"; + readonly inputs: readonly [{ + readonly name: "addr"; + readonly type: "address"; + }, { + readonly name: "_block"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "totalSupply"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "totalSupply"; + readonly inputs: readonly [{ + readonly name: "t"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "totalSupplyAt"; + readonly inputs: readonly [{ + readonly name: "_block"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "supply"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "locked"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "tuple"; + readonly components: readonly [{ + readonly name: "amount"; + readonly type: "int128"; + }, { + readonly name: "end"; + readonly type: "uint256"; + }]; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "epoch"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "point_history"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "tuple"; + readonly components: readonly [{ + readonly name: "bias"; + readonly type: "int128"; + }, { + readonly name: "slope"; + readonly type: "int128"; + }, { + readonly name: "ts"; + readonly type: "uint256"; + }, { + readonly name: "blk"; + readonly type: "uint256"; + }]; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "user_point_history"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "address"; + }, { + readonly name: "arg1"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "tuple"; + readonly components: readonly [{ + readonly name: "bias"; + readonly type: "int128"; + }, { + readonly name: "slope"; + readonly type: "int128"; + }, { + readonly name: "ts"; + readonly type: "uint256"; + }, { + readonly name: "blk"; + readonly type: "uint256"; + }]; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "user_point_epoch"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "address"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "uint256"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "slope_changes"; + readonly inputs: readonly [{ + readonly name: "arg0"; + readonly type: "uint256"; + }]; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "int128"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "future_smart_wallet_checker"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "address"; + }]; + }, { + readonly stateMutability: "view"; + readonly type: "function"; + readonly name: "smart_wallet_checker"; + readonly inputs: readonly []; + readonly outputs: readonly [{ + readonly name: ""; + readonly type: "address"; + }]; + }]; + static createInterface(): VeBalInterface; + static connect(address: string, signerOrProvider: Signer | Provider): VeBal$1; +} + +declare class VeDelegationProxy__factory { + static readonly abi: readonly [{ + readonly inputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: "vault"; + readonly type: "address"; + }, { + readonly internalType: "contract IERC20"; + readonly name: "votingEscrow"; + readonly type: "address"; + }, { + readonly internalType: "contract IVeDelegation"; + readonly name: "delegation"; + readonly type: "address"; + }]; + readonly stateMutability: "nonpayable"; + readonly type: "constructor"; + }, { + readonly anonymous: false; + readonly inputs: readonly [{ + readonly indexed: true; + readonly internalType: "address"; + readonly name: "newImplementation"; + readonly type: "address"; + }]; + readonly name: "DelegationImplementationUpdated"; + readonly type: "event"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }]; + readonly name: "adjustedBalanceOf"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "address"; + readonly name: "user"; + readonly type: "address"; + }]; + readonly name: "adjusted_balance_of"; + readonly outputs: readonly [{ + readonly internalType: "uint256"; + readonly name: ""; + readonly type: "uint256"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "bytes4"; + readonly name: "selector"; + readonly type: "bytes4"; + }]; + readonly name: "getActionId"; + readonly outputs: readonly [{ + readonly internalType: "bytes32"; + readonly name: ""; + readonly type: "bytes32"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getAuthorizer"; + readonly outputs: readonly [{ + readonly internalType: "contract IAuthorizer"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getDelegationImplementation"; + readonly outputs: readonly [{ + readonly internalType: "contract IVeDelegation"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVault"; + readonly outputs: readonly [{ + readonly internalType: "contract IVault"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "getVotingEscrow"; + readonly outputs: readonly [{ + readonly internalType: "contract IERC20"; + readonly name: ""; + readonly type: "address"; + }]; + readonly stateMutability: "view"; + readonly type: "function"; + }, { + readonly inputs: readonly []; + readonly name: "killDelegation"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }, { + readonly inputs: readonly [{ + readonly internalType: "contract IVeDelegation"; + readonly name: "delegation"; + readonly type: "address"; + }]; + readonly name: "setDelegation"; + readonly outputs: readonly []; + readonly stateMutability: "nonpayable"; + readonly type: "function"; + }]; + static createInterface(): VeDelegationProxyInterface; + static connect(address: string, signerOrProvider: Signer | Provider): VeDelegationProxy; +} + +type index_AaveLinearPool__factory = AaveLinearPool__factory; +declare const index_AaveLinearPool__factory: typeof AaveLinearPool__factory; +type index_AaveLinearPoolFactory__factory = AaveLinearPoolFactory__factory; +declare const index_AaveLinearPoolFactory__factory: typeof AaveLinearPoolFactory__factory; +type index_AaveWrapping__factory = AaveWrapping__factory; +declare const index_AaveWrapping__factory: typeof AaveWrapping__factory; +type index_Authoriser__factory = Authoriser__factory; +declare const index_Authoriser__factory: typeof Authoriser__factory; +type index_BalancerHelpers__factory = BalancerHelpers__factory; +declare const index_BalancerHelpers__factory: typeof BalancerHelpers__factory; +type index_BalancerMinter__factory = BalancerMinter__factory; +declare const index_BalancerMinter__factory: typeof BalancerMinter__factory; +type index_BalancerPoolDataQueries__factory = BalancerPoolDataQueries__factory; +declare const index_BalancerPoolDataQueries__factory: typeof BalancerPoolDataQueries__factory; +type index_BalancerRelayer__factory = BalancerRelayer__factory; +declare const index_BalancerRelayer__factory: typeof BalancerRelayer__factory; +type index_BatchRelayerLibrary__factory = BatchRelayerLibrary__factory; +declare const index_BatchRelayerLibrary__factory: typeof BatchRelayerLibrary__factory; +type index_ComposableStablePool__factory = ComposableStablePool__factory; +declare const index_ComposableStablePool__factory: typeof ComposableStablePool__factory; +type index_ComposableStablePoolFactory__factory = ComposableStablePoolFactory__factory; +declare const index_ComposableStablePoolFactory__factory: typeof ComposableStablePoolFactory__factory; +type index_ConvergentCurvePool__factory = ConvergentCurvePool__factory; +declare const index_ConvergentCurvePool__factory: typeof ConvergentCurvePool__factory; +type index_ERC20__factory = ERC20__factory; +declare const index_ERC20__factory: typeof ERC20__factory; +type index_ERC4626LinearPool__factory = ERC4626LinearPool__factory; +declare const index_ERC4626LinearPool__factory: typeof ERC4626LinearPool__factory; +type index_ERC4626LinearPoolFactory__factory = ERC4626LinearPoolFactory__factory; +declare const index_ERC4626LinearPoolFactory__factory: typeof ERC4626LinearPoolFactory__factory; +type index_EulerLinearPool__factory = EulerLinearPool__factory; +declare const index_EulerLinearPool__factory: typeof EulerLinearPool__factory; +type index_EulerLinearPoolFactory__factory = EulerLinearPoolFactory__factory; +declare const index_EulerLinearPoolFactory__factory: typeof EulerLinearPoolFactory__factory; +type index_FXPool__factory = FXPool__factory; +declare const index_FXPool__factory: typeof FXPool__factory; +type index_GaugeClaimHelper__factory = GaugeClaimHelper__factory; +declare const index_GaugeClaimHelper__factory: typeof GaugeClaimHelper__factory; +type index_GearboxLinearPool__factory = GearboxLinearPool__factory; +declare const index_GearboxLinearPool__factory: typeof GearboxLinearPool__factory; +type index_GearboxLinearPoolFactory__factory = GearboxLinearPoolFactory__factory; +declare const index_GearboxLinearPoolFactory__factory: typeof GearboxLinearPoolFactory__factory; +type index_GyroConfig__factory = GyroConfig__factory; +declare const index_GyroConfig__factory: typeof GyroConfig__factory; +type index_LidoRelayer__factory = LidoRelayer__factory; +declare const index_LidoRelayer__factory: typeof LidoRelayer__factory; +type index_LinearPool__factory = LinearPool__factory; +declare const index_LinearPool__factory: typeof LinearPool__factory; +type index_LiquidityGaugeV5__factory = LiquidityGaugeV5__factory; +declare const index_LiquidityGaugeV5__factory: typeof LiquidityGaugeV5__factory; +type index_Multicall__factory = Multicall__factory; +declare const index_Multicall__factory: typeof Multicall__factory; +type index_Multicall3__factory = Multicall3__factory; +declare const index_Multicall3__factory: typeof Multicall3__factory; +type index_StablePool__factory = StablePool__factory; +declare const index_StablePool__factory: typeof StablePool__factory; +type index_StaticATokenRateProvider__factory = StaticATokenRateProvider__factory; +declare const index_StaticATokenRateProvider__factory: typeof StaticATokenRateProvider__factory; +type index_Vault__factory = Vault__factory; +declare const index_Vault__factory: typeof Vault__factory; +type index_WeightedPool__factory = WeightedPool__factory; +declare const index_WeightedPool__factory: typeof WeightedPool__factory; +type index_WeightedPoolFactory__factory = WeightedPoolFactory__factory; +declare const index_WeightedPoolFactory__factory: typeof WeightedPoolFactory__factory; +type index_YearnLinearPool__factory = YearnLinearPool__factory; +declare const index_YearnLinearPool__factory: typeof YearnLinearPool__factory; +type index_YearnLinearPoolFactory__factory = YearnLinearPoolFactory__factory; +declare const index_YearnLinearPoolFactory__factory: typeof YearnLinearPoolFactory__factory; +type index_GyroEV2__factory = GyroEV2__factory; +declare const index_GyroEV2__factory: typeof GyroEV2__factory; +type index_VeBal__factory = VeBal__factory; +declare const index_VeBal__factory: typeof VeBal__factory; +type index_VeDelegationProxy__factory = VeDelegationProxy__factory; +declare const index_VeDelegationProxy__factory: typeof VeDelegationProxy__factory; +declare namespace index { + export { + index_AaveLinearPool__factory as AaveLinearPool__factory, + index_AaveLinearPoolFactory__factory as AaveLinearPoolFactory__factory, + index_AaveWrapping__factory as AaveWrapping__factory, + index_Authoriser__factory as Authoriser__factory, + index_BalancerHelpers__factory as BalancerHelpers__factory, + index_BalancerMinter__factory as BalancerMinter__factory, + index_BalancerPoolDataQueries__factory as BalancerPoolDataQueries__factory, + index_BalancerRelayer__factory as BalancerRelayer__factory, + index_BatchRelayerLibrary__factory as BatchRelayerLibrary__factory, + index_ComposableStablePool__factory as ComposableStablePool__factory, + index_ComposableStablePoolFactory__factory as ComposableStablePoolFactory__factory, + index_ConvergentCurvePool__factory as ConvergentCurvePool__factory, + index_ERC20__factory as ERC20__factory, + index_ERC4626LinearPool__factory as ERC4626LinearPool__factory, + index_ERC4626LinearPoolFactory__factory as ERC4626LinearPoolFactory__factory, + index_EulerLinearPool__factory as EulerLinearPool__factory, + index_EulerLinearPoolFactory__factory as EulerLinearPoolFactory__factory, + index_FXPool__factory as FXPool__factory, + index_GaugeClaimHelper__factory as GaugeClaimHelper__factory, + index_GearboxLinearPool__factory as GearboxLinearPool__factory, + index_GearboxLinearPoolFactory__factory as GearboxLinearPoolFactory__factory, + index_GyroConfig__factory as GyroConfig__factory, + index_LidoRelayer__factory as LidoRelayer__factory, + index_LinearPool__factory as LinearPool__factory, + index_LiquidityGaugeV5__factory as LiquidityGaugeV5__factory, + index_Multicall__factory as Multicall__factory, + index_Multicall3__factory as Multicall3__factory, + index_StablePool__factory as StablePool__factory, + index_StaticATokenRateProvider__factory as StaticATokenRateProvider__factory, + index_Vault__factory as Vault__factory, + index_WeightedPool__factory as WeightedPool__factory, + index_WeightedPoolFactory__factory as WeightedPoolFactory__factory, + index_YearnLinearPool__factory as YearnLinearPool__factory, + index_YearnLinearPoolFactory__factory as YearnLinearPoolFactory__factory, + index_GyroEV2__factory as GyroEV2__factory, + index_VeBal__factory as VeBal__factory, + index_VeDelegationProxy__factory as VeDelegationProxy__factory, + }; +} + +declare class GaugeControllerMulticallRepository { + private multicall; + private gaugeControllerAddress; + private gaugeControllerCheckpointerAddress?; + constructor(multicall: Multicall, gaugeControllerAddress: string, gaugeControllerCheckpointerAddress?: string | undefined); + getRelativeWeights(gaugeAddresses: string[], timestamp?: number): Promise<{ + [gaugeAddress: string]: number; + }>; +} + +interface RewardData { + token: string; + distributor: string; + period_finish: BigNumber; + rate: BigNumber; + last_update: BigNumber; + integral: BigNumber; + decimals?: number; +} +/** + * A lot of code to get liquidity gauge state via RPC multicall. + * TODO: reseach helper contracts or extend subgraph + */ +declare class LiquidityGaugesMulticallRepository { + private multicall; + private chainId; + constructor(multicall: Multicall, chainId: Network); + getTotalSupplies(gaugeAddresses: string[]): Promise<{ + [gaugeAddress: string]: number; + }>; + getWorkingSupplies(gaugeAddresses: string[]): Promise<{ + [gaugeAddress: string]: number; + }>; + getInflationRates(gaugeAddresses: string[]): Promise<{ + [gaugeAddress: string]: number; + }>; + getRewardCounts(gaugeAddresses: string[]): Promise<{ + [gaugeAddress: string]: number; + }>; + getRewardTokens(gaugeAddresses: string[], passingRewardCounts?: { + [gaugeAddress: string]: number; + }): Promise<{ + [gaugeAddress: string]: string[]; + }>; + getRewardData(gaugeAddresses: string[], passingRewardTokens?: { + [gaugeAddress: string]: string[]; + }): Promise<{ + [gaugeAddress: string]: { + [rewardTokenAddress: string]: RewardData; + }; + }>; +} + +type Maybe$1 = T | null; +type InputMaybe$1 = Maybe$1; +type Exact$1 = { + [K in keyof T]: T[K]; +}; +/** All built-in and custom scalars, mapped to their actual values */ +type Scalars$1 = { + ID: string; + String: string; + Boolean: boolean; + Int: number; + Float: number; + BigDecimal: string; + BigInt: string; + Bytes: string; + Int8: any; +}; +type AmpUpdate_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + and?: InputMaybe$1>>; + endAmp?: InputMaybe$1; + endAmp_gt?: InputMaybe$1; + endAmp_gte?: InputMaybe$1; + endAmp_in?: InputMaybe$1>; + endAmp_lt?: InputMaybe$1; + endAmp_lte?: InputMaybe$1; + endAmp_not?: InputMaybe$1; + endAmp_not_in?: InputMaybe$1>; + endTimestamp?: InputMaybe$1; + endTimestamp_gt?: InputMaybe$1; + endTimestamp_gte?: InputMaybe$1; + endTimestamp_in?: InputMaybe$1>; + endTimestamp_lt?: InputMaybe$1; + endTimestamp_lte?: InputMaybe$1; + endTimestamp_not?: InputMaybe$1; + endTimestamp_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + poolId?: InputMaybe$1; + poolId_?: InputMaybe$1; + poolId_contains?: InputMaybe$1; + poolId_contains_nocase?: InputMaybe$1; + poolId_ends_with?: InputMaybe$1; + poolId_ends_with_nocase?: InputMaybe$1; + poolId_gt?: InputMaybe$1; + poolId_gte?: InputMaybe$1; + poolId_in?: InputMaybe$1>; + poolId_lt?: InputMaybe$1; + poolId_lte?: InputMaybe$1; + poolId_not?: InputMaybe$1; + poolId_not_contains?: InputMaybe$1; + poolId_not_contains_nocase?: InputMaybe$1; + poolId_not_ends_with?: InputMaybe$1; + poolId_not_ends_with_nocase?: InputMaybe$1; + poolId_not_in?: InputMaybe$1>; + poolId_not_starts_with?: InputMaybe$1; + poolId_not_starts_with_nocase?: InputMaybe$1; + poolId_starts_with?: InputMaybe$1; + poolId_starts_with_nocase?: InputMaybe$1; + scheduledTimestamp?: InputMaybe$1; + scheduledTimestamp_gt?: InputMaybe$1; + scheduledTimestamp_gte?: InputMaybe$1; + scheduledTimestamp_in?: InputMaybe$1>; + scheduledTimestamp_lt?: InputMaybe$1; + scheduledTimestamp_lte?: InputMaybe$1; + scheduledTimestamp_not?: InputMaybe$1; + scheduledTimestamp_not_in?: InputMaybe$1>; + startAmp?: InputMaybe$1; + startAmp_gt?: InputMaybe$1; + startAmp_gte?: InputMaybe$1; + startAmp_in?: InputMaybe$1>; + startAmp_lt?: InputMaybe$1; + startAmp_lte?: InputMaybe$1; + startAmp_not?: InputMaybe$1; + startAmp_not_in?: InputMaybe$1>; + startTimestamp?: InputMaybe$1; + startTimestamp_gt?: InputMaybe$1; + startTimestamp_gte?: InputMaybe$1; + startTimestamp_in?: InputMaybe$1>; + startTimestamp_lt?: InputMaybe$1; + startTimestamp_lte?: InputMaybe$1; + startTimestamp_not?: InputMaybe$1; + startTimestamp_not_in?: InputMaybe$1>; +}; +type Balancer_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + and?: InputMaybe$1>>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + poolCount?: InputMaybe$1; + poolCount_gt?: InputMaybe$1; + poolCount_gte?: InputMaybe$1; + poolCount_in?: InputMaybe$1>; + poolCount_lt?: InputMaybe$1; + poolCount_lte?: InputMaybe$1; + poolCount_not?: InputMaybe$1; + poolCount_not_in?: InputMaybe$1>; + pools_?: InputMaybe$1; + protocolFeesCollector?: InputMaybe$1; + protocolFeesCollector_contains?: InputMaybe$1; + protocolFeesCollector_gt?: InputMaybe$1; + protocolFeesCollector_gte?: InputMaybe$1; + protocolFeesCollector_in?: InputMaybe$1>; + protocolFeesCollector_lt?: InputMaybe$1; + protocolFeesCollector_lte?: InputMaybe$1; + protocolFeesCollector_not?: InputMaybe$1; + protocolFeesCollector_not_contains?: InputMaybe$1; + protocolFeesCollector_not_in?: InputMaybe$1>; + totalLiquidity?: InputMaybe$1; + totalLiquidity_gt?: InputMaybe$1; + totalLiquidity_gte?: InputMaybe$1; + totalLiquidity_in?: InputMaybe$1>; + totalLiquidity_lt?: InputMaybe$1; + totalLiquidity_lte?: InputMaybe$1; + totalLiquidity_not?: InputMaybe$1; + totalLiquidity_not_in?: InputMaybe$1>; + totalProtocolFee?: InputMaybe$1; + totalProtocolFee_gt?: InputMaybe$1; + totalProtocolFee_gte?: InputMaybe$1; + totalProtocolFee_in?: InputMaybe$1>; + totalProtocolFee_lt?: InputMaybe$1; + totalProtocolFee_lte?: InputMaybe$1; + totalProtocolFee_not?: InputMaybe$1; + totalProtocolFee_not_in?: InputMaybe$1>; + totalSwapCount?: InputMaybe$1; + totalSwapCount_gt?: InputMaybe$1; + totalSwapCount_gte?: InputMaybe$1; + totalSwapCount_in?: InputMaybe$1>; + totalSwapCount_lt?: InputMaybe$1; + totalSwapCount_lte?: InputMaybe$1; + totalSwapCount_not?: InputMaybe$1; + totalSwapCount_not_in?: InputMaybe$1>; + totalSwapFee?: InputMaybe$1; + totalSwapFee_gt?: InputMaybe$1; + totalSwapFee_gte?: InputMaybe$1; + totalSwapFee_in?: InputMaybe$1>; + totalSwapFee_lt?: InputMaybe$1; + totalSwapFee_lte?: InputMaybe$1; + totalSwapFee_not?: InputMaybe$1; + totalSwapFee_not_in?: InputMaybe$1>; + totalSwapVolume?: InputMaybe$1; + totalSwapVolume_gt?: InputMaybe$1; + totalSwapVolume_gte?: InputMaybe$1; + totalSwapVolume_in?: InputMaybe$1>; + totalSwapVolume_lt?: InputMaybe$1; + totalSwapVolume_lte?: InputMaybe$1; + totalSwapVolume_not?: InputMaybe$1; + totalSwapVolume_not_in?: InputMaybe$1>; +}; +declare enum Balancer_OrderBy { + Id = "id", + PoolCount = "poolCount", + Pools = "pools", + ProtocolFeesCollector = "protocolFeesCollector", + TotalLiquidity = "totalLiquidity", + TotalProtocolFee = "totalProtocolFee", + TotalSwapCount = "totalSwapCount", + TotalSwapFee = "totalSwapFee", + TotalSwapVolume = "totalSwapVolume" +} +type BlockChangedFilter$1 = { + number_gte: Scalars$1['Int']; +}; +type Block_Height$1 = { + hash?: InputMaybe$1; + number?: InputMaybe$1; + number_gte?: InputMaybe$1; +}; +type CircuitBreaker_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + and?: InputMaybe$1>>; + bptPrice?: InputMaybe$1; + bptPrice_gt?: InputMaybe$1; + bptPrice_gte?: InputMaybe$1; + bptPrice_in?: InputMaybe$1>; + bptPrice_lt?: InputMaybe$1; + bptPrice_lte?: InputMaybe$1; + bptPrice_not?: InputMaybe$1; + bptPrice_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + lowerBoundPercentage?: InputMaybe$1; + lowerBoundPercentage_gt?: InputMaybe$1; + lowerBoundPercentage_gte?: InputMaybe$1; + lowerBoundPercentage_in?: InputMaybe$1>; + lowerBoundPercentage_lt?: InputMaybe$1; + lowerBoundPercentage_lte?: InputMaybe$1; + lowerBoundPercentage_not?: InputMaybe$1; + lowerBoundPercentage_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + pool?: InputMaybe$1; + pool_?: InputMaybe$1; + pool_contains?: InputMaybe$1; + pool_contains_nocase?: InputMaybe$1; + pool_ends_with?: InputMaybe$1; + pool_ends_with_nocase?: InputMaybe$1; + pool_gt?: InputMaybe$1; + pool_gte?: InputMaybe$1; + pool_in?: InputMaybe$1>; + pool_lt?: InputMaybe$1; + pool_lte?: InputMaybe$1; + pool_not?: InputMaybe$1; + pool_not_contains?: InputMaybe$1; + pool_not_contains_nocase?: InputMaybe$1; + pool_not_ends_with?: InputMaybe$1; + pool_not_ends_with_nocase?: InputMaybe$1; + pool_not_in?: InputMaybe$1>; + pool_not_starts_with?: InputMaybe$1; + pool_not_starts_with_nocase?: InputMaybe$1; + pool_starts_with?: InputMaybe$1; + pool_starts_with_nocase?: InputMaybe$1; + token?: InputMaybe$1; + token_?: InputMaybe$1; + token_contains?: InputMaybe$1; + token_contains_nocase?: InputMaybe$1; + token_ends_with?: InputMaybe$1; + token_ends_with_nocase?: InputMaybe$1; + token_gt?: InputMaybe$1; + token_gte?: InputMaybe$1; + token_in?: InputMaybe$1>; + token_lt?: InputMaybe$1; + token_lte?: InputMaybe$1; + token_not?: InputMaybe$1; + token_not_contains?: InputMaybe$1; + token_not_contains_nocase?: InputMaybe$1; + token_not_ends_with?: InputMaybe$1; + token_not_ends_with_nocase?: InputMaybe$1; + token_not_in?: InputMaybe$1>; + token_not_starts_with?: InputMaybe$1; + token_not_starts_with_nocase?: InputMaybe$1; + token_starts_with?: InputMaybe$1; + token_starts_with_nocase?: InputMaybe$1; + upperBoundPercentage?: InputMaybe$1; + upperBoundPercentage_gt?: InputMaybe$1; + upperBoundPercentage_gte?: InputMaybe$1; + upperBoundPercentage_in?: InputMaybe$1>; + upperBoundPercentage_lt?: InputMaybe$1; + upperBoundPercentage_lte?: InputMaybe$1; + upperBoundPercentage_not?: InputMaybe$1; + upperBoundPercentage_not_in?: InputMaybe$1>; +}; +type GradualWeightUpdate_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + and?: InputMaybe$1>>; + endTimestamp?: InputMaybe$1; + endTimestamp_gt?: InputMaybe$1; + endTimestamp_gte?: InputMaybe$1; + endTimestamp_in?: InputMaybe$1>; + endTimestamp_lt?: InputMaybe$1; + endTimestamp_lte?: InputMaybe$1; + endTimestamp_not?: InputMaybe$1; + endTimestamp_not_in?: InputMaybe$1>; + endWeights?: InputMaybe$1>; + endWeights_contains?: InputMaybe$1>; + endWeights_contains_nocase?: InputMaybe$1>; + endWeights_not?: InputMaybe$1>; + endWeights_not_contains?: InputMaybe$1>; + endWeights_not_contains_nocase?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + poolId?: InputMaybe$1; + poolId_?: InputMaybe$1; + poolId_contains?: InputMaybe$1; + poolId_contains_nocase?: InputMaybe$1; + poolId_ends_with?: InputMaybe$1; + poolId_ends_with_nocase?: InputMaybe$1; + poolId_gt?: InputMaybe$1; + poolId_gte?: InputMaybe$1; + poolId_in?: InputMaybe$1>; + poolId_lt?: InputMaybe$1; + poolId_lte?: InputMaybe$1; + poolId_not?: InputMaybe$1; + poolId_not_contains?: InputMaybe$1; + poolId_not_contains_nocase?: InputMaybe$1; + poolId_not_ends_with?: InputMaybe$1; + poolId_not_ends_with_nocase?: InputMaybe$1; + poolId_not_in?: InputMaybe$1>; + poolId_not_starts_with?: InputMaybe$1; + poolId_not_starts_with_nocase?: InputMaybe$1; + poolId_starts_with?: InputMaybe$1; + poolId_starts_with_nocase?: InputMaybe$1; + scheduledTimestamp?: InputMaybe$1; + scheduledTimestamp_gt?: InputMaybe$1; + scheduledTimestamp_gte?: InputMaybe$1; + scheduledTimestamp_in?: InputMaybe$1>; + scheduledTimestamp_lt?: InputMaybe$1; + scheduledTimestamp_lte?: InputMaybe$1; + scheduledTimestamp_not?: InputMaybe$1; + scheduledTimestamp_not_in?: InputMaybe$1>; + startTimestamp?: InputMaybe$1; + startTimestamp_gt?: InputMaybe$1; + startTimestamp_gte?: InputMaybe$1; + startTimestamp_in?: InputMaybe$1>; + startTimestamp_lt?: InputMaybe$1; + startTimestamp_lte?: InputMaybe$1; + startTimestamp_not?: InputMaybe$1; + startTimestamp_not_in?: InputMaybe$1>; + startWeights?: InputMaybe$1>; + startWeights_contains?: InputMaybe$1>; + startWeights_contains_nocase?: InputMaybe$1>; + startWeights_not?: InputMaybe$1>; + startWeights_not_contains?: InputMaybe$1>; + startWeights_not_contains_nocase?: InputMaybe$1>; +}; +declare enum InvestType { + Exit = "Exit", + Join = "Join" +} +type JoinExit_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + amounts?: InputMaybe$1>; + amounts_contains?: InputMaybe$1>; + amounts_contains_nocase?: InputMaybe$1>; + amounts_not?: InputMaybe$1>; + amounts_not_contains?: InputMaybe$1>; + amounts_not_contains_nocase?: InputMaybe$1>; + and?: InputMaybe$1>>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + pool?: InputMaybe$1; + pool_?: InputMaybe$1; + pool_contains?: InputMaybe$1; + pool_contains_nocase?: InputMaybe$1; + pool_ends_with?: InputMaybe$1; + pool_ends_with_nocase?: InputMaybe$1; + pool_gt?: InputMaybe$1; + pool_gte?: InputMaybe$1; + pool_in?: InputMaybe$1>; + pool_lt?: InputMaybe$1; + pool_lte?: InputMaybe$1; + pool_not?: InputMaybe$1; + pool_not_contains?: InputMaybe$1; + pool_not_contains_nocase?: InputMaybe$1; + pool_not_ends_with?: InputMaybe$1; + pool_not_ends_with_nocase?: InputMaybe$1; + pool_not_in?: InputMaybe$1>; + pool_not_starts_with?: InputMaybe$1; + pool_not_starts_with_nocase?: InputMaybe$1; + pool_starts_with?: InputMaybe$1; + pool_starts_with_nocase?: InputMaybe$1; + sender?: InputMaybe$1; + sender_contains?: InputMaybe$1; + sender_gt?: InputMaybe$1; + sender_gte?: InputMaybe$1; + sender_in?: InputMaybe$1>; + sender_lt?: InputMaybe$1; + sender_lte?: InputMaybe$1; + sender_not?: InputMaybe$1; + sender_not_contains?: InputMaybe$1; + sender_not_in?: InputMaybe$1>; + timestamp?: InputMaybe$1; + timestamp_gt?: InputMaybe$1; + timestamp_gte?: InputMaybe$1; + timestamp_in?: InputMaybe$1>; + timestamp_lt?: InputMaybe$1; + timestamp_lte?: InputMaybe$1; + timestamp_not?: InputMaybe$1; + timestamp_not_in?: InputMaybe$1>; + tx?: InputMaybe$1; + tx_contains?: InputMaybe$1; + tx_gt?: InputMaybe$1; + tx_gte?: InputMaybe$1; + tx_in?: InputMaybe$1>; + tx_lt?: InputMaybe$1; + tx_lte?: InputMaybe$1; + tx_not?: InputMaybe$1; + tx_not_contains?: InputMaybe$1; + tx_not_in?: InputMaybe$1>; + type?: InputMaybe$1; + type_in?: InputMaybe$1>; + type_not?: InputMaybe$1; + type_not_in?: InputMaybe$1>; + user?: InputMaybe$1; + user_?: InputMaybe$1; + user_contains?: InputMaybe$1; + user_contains_nocase?: InputMaybe$1; + user_ends_with?: InputMaybe$1; + user_ends_with_nocase?: InputMaybe$1; + user_gt?: InputMaybe$1; + user_gte?: InputMaybe$1; + user_in?: InputMaybe$1>; + user_lt?: InputMaybe$1; + user_lte?: InputMaybe$1; + user_not?: InputMaybe$1; + user_not_contains?: InputMaybe$1; + user_not_contains_nocase?: InputMaybe$1; + user_not_ends_with?: InputMaybe$1; + user_not_ends_with_nocase?: InputMaybe$1; + user_not_in?: InputMaybe$1>; + user_not_starts_with?: InputMaybe$1; + user_not_starts_with_nocase?: InputMaybe$1; + user_starts_with?: InputMaybe$1; + user_starts_with_nocase?: InputMaybe$1; + valueUSD?: InputMaybe$1; + valueUSD_gt?: InputMaybe$1; + valueUSD_gte?: InputMaybe$1; + valueUSD_in?: InputMaybe$1>; + valueUSD_lt?: InputMaybe$1; + valueUSD_lte?: InputMaybe$1; + valueUSD_not?: InputMaybe$1; + valueUSD_not_in?: InputMaybe$1>; +}; +declare enum JoinExit_OrderBy { + Amounts = "amounts", + Id = "id", + Pool = "pool", + PoolAddress = "pool__address", + PoolAlpha = "pool__alpha", + PoolAmp = "pool__amp", + PoolBaseToken = "pool__baseToken", + PoolBeta = "pool__beta", + PoolC = "pool__c", + PoolCreateTime = "pool__createTime", + PoolDSq = "pool__dSq", + PoolDelta = "pool__delta", + PoolEpsilon = "pool__epsilon", + PoolExpiryTime = "pool__expiryTime", + PoolFactory = "pool__factory", + PoolHoldersCount = "pool__holdersCount", + PoolId = "pool__id", + PoolIsInRecoveryMode = "pool__isInRecoveryMode", + PoolIsPaused = "pool__isPaused", + PoolJoinExitEnabled = "pool__joinExitEnabled", + PoolLambda = "pool__lambda", + PoolLastJoinExitAmp = "pool__lastJoinExitAmp", + PoolLastPostJoinExitInvariant = "pool__lastPostJoinExitInvariant", + PoolLowerTarget = "pool__lowerTarget", + PoolMainIndex = "pool__mainIndex", + PoolManagementAumFee = "pool__managementAumFee", + PoolManagementFee = "pool__managementFee", + PoolMustAllowlistLPs = "pool__mustAllowlistLPs", + PoolName = "pool__name", + PoolOracleEnabled = "pool__oracleEnabled", + PoolOwner = "pool__owner", + PoolPoolType = "pool__poolType", + PoolPoolTypeVersion = "pool__poolTypeVersion", + PoolPrincipalToken = "pool__principalToken", + PoolProtocolAumFeeCache = "pool__protocolAumFeeCache", + PoolProtocolId = "pool__protocolId", + PoolProtocolSwapFeeCache = "pool__protocolSwapFeeCache", + PoolProtocolYieldFeeCache = "pool__protocolYieldFeeCache", + PoolRoot3Alpha = "pool__root3Alpha", + PoolS = "pool__s", + PoolSqrtAlpha = "pool__sqrtAlpha", + PoolSqrtBeta = "pool__sqrtBeta", + PoolStrategyType = "pool__strategyType", + PoolSwapEnabled = "pool__swapEnabled", + PoolSwapEnabledCurationSignal = "pool__swapEnabledCurationSignal", + PoolSwapEnabledInternal = "pool__swapEnabledInternal", + PoolSwapFee = "pool__swapFee", + PoolSwapsCount = "pool__swapsCount", + PoolSymbol = "pool__symbol", + PoolTauAlphaX = "pool__tauAlphaX", + PoolTauAlphaY = "pool__tauAlphaY", + PoolTauBetaX = "pool__tauBetaX", + PoolTauBetaY = "pool__tauBetaY", + PoolTotalAumFeeCollectedInBpt = "pool__totalAumFeeCollectedInBPT", + PoolTotalLiquidity = "pool__totalLiquidity", + PoolTotalLiquiditySansBpt = "pool__totalLiquiditySansBPT", + PoolTotalProtocolFee = "pool__totalProtocolFee", + PoolTotalProtocolFeePaidInBpt = "pool__totalProtocolFeePaidInBPT", + PoolTotalShares = "pool__totalShares", + PoolTotalSwapFee = "pool__totalSwapFee", + PoolTotalSwapVolume = "pool__totalSwapVolume", + PoolTotalWeight = "pool__totalWeight", + PoolTx = "pool__tx", + PoolU = "pool__u", + PoolUnitSeconds = "pool__unitSeconds", + PoolUpperTarget = "pool__upperTarget", + PoolV = "pool__v", + PoolW = "pool__w", + PoolWrappedIndex = "pool__wrappedIndex", + PoolZ = "pool__z", + Sender = "sender", + Timestamp = "timestamp", + Tx = "tx", + Type = "type", + User = "user", + UserId = "user__id", + ValueUsd = "valueUSD" +} +type LatestPrice_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + and?: InputMaybe$1>>; + asset?: InputMaybe$1; + asset_contains?: InputMaybe$1; + asset_gt?: InputMaybe$1; + asset_gte?: InputMaybe$1; + asset_in?: InputMaybe$1>; + asset_lt?: InputMaybe$1; + asset_lte?: InputMaybe$1; + asset_not?: InputMaybe$1; + asset_not_contains?: InputMaybe$1; + asset_not_in?: InputMaybe$1>; + block?: InputMaybe$1; + block_gt?: InputMaybe$1; + block_gte?: InputMaybe$1; + block_in?: InputMaybe$1>; + block_lt?: InputMaybe$1; + block_lte?: InputMaybe$1; + block_not?: InputMaybe$1; + block_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + poolId?: InputMaybe$1; + poolId_?: InputMaybe$1; + poolId_contains?: InputMaybe$1; + poolId_contains_nocase?: InputMaybe$1; + poolId_ends_with?: InputMaybe$1; + poolId_ends_with_nocase?: InputMaybe$1; + poolId_gt?: InputMaybe$1; + poolId_gte?: InputMaybe$1; + poolId_in?: InputMaybe$1>; + poolId_lt?: InputMaybe$1; + poolId_lte?: InputMaybe$1; + poolId_not?: InputMaybe$1; + poolId_not_contains?: InputMaybe$1; + poolId_not_contains_nocase?: InputMaybe$1; + poolId_not_ends_with?: InputMaybe$1; + poolId_not_ends_with_nocase?: InputMaybe$1; + poolId_not_in?: InputMaybe$1>; + poolId_not_starts_with?: InputMaybe$1; + poolId_not_starts_with_nocase?: InputMaybe$1; + poolId_starts_with?: InputMaybe$1; + poolId_starts_with_nocase?: InputMaybe$1; + price?: InputMaybe$1; + price_gt?: InputMaybe$1; + price_gte?: InputMaybe$1; + price_in?: InputMaybe$1>; + price_lt?: InputMaybe$1; + price_lte?: InputMaybe$1; + price_not?: InputMaybe$1; + price_not_in?: InputMaybe$1>; + pricingAsset?: InputMaybe$1; + pricingAsset_contains?: InputMaybe$1; + pricingAsset_gt?: InputMaybe$1; + pricingAsset_gte?: InputMaybe$1; + pricingAsset_in?: InputMaybe$1>; + pricingAsset_lt?: InputMaybe$1; + pricingAsset_lte?: InputMaybe$1; + pricingAsset_not?: InputMaybe$1; + pricingAsset_not_contains?: InputMaybe$1; + pricingAsset_not_in?: InputMaybe$1>; +}; +declare enum LatestPrice_OrderBy { + Asset = "asset", + Block = "block", + Id = "id", + PoolId = "poolId", + PoolIdAddress = "poolId__address", + PoolIdAlpha = "poolId__alpha", + PoolIdAmp = "poolId__amp", + PoolIdBaseToken = "poolId__baseToken", + PoolIdBeta = "poolId__beta", + PoolIdC = "poolId__c", + PoolIdCreateTime = "poolId__createTime", + PoolIdDSq = "poolId__dSq", + PoolIdDelta = "poolId__delta", + PoolIdEpsilon = "poolId__epsilon", + PoolIdExpiryTime = "poolId__expiryTime", + PoolIdFactory = "poolId__factory", + PoolIdHoldersCount = "poolId__holdersCount", + PoolIdId = "poolId__id", + PoolIdIsInRecoveryMode = "poolId__isInRecoveryMode", + PoolIdIsPaused = "poolId__isPaused", + PoolIdJoinExitEnabled = "poolId__joinExitEnabled", + PoolIdLambda = "poolId__lambda", + PoolIdLastJoinExitAmp = "poolId__lastJoinExitAmp", + PoolIdLastPostJoinExitInvariant = "poolId__lastPostJoinExitInvariant", + PoolIdLowerTarget = "poolId__lowerTarget", + PoolIdMainIndex = "poolId__mainIndex", + PoolIdManagementAumFee = "poolId__managementAumFee", + PoolIdManagementFee = "poolId__managementFee", + PoolIdMustAllowlistLPs = "poolId__mustAllowlistLPs", + PoolIdName = "poolId__name", + PoolIdOracleEnabled = "poolId__oracleEnabled", + PoolIdOwner = "poolId__owner", + PoolIdPoolType = "poolId__poolType", + PoolIdPoolTypeVersion = "poolId__poolTypeVersion", + PoolIdPrincipalToken = "poolId__principalToken", + PoolIdProtocolAumFeeCache = "poolId__protocolAumFeeCache", + PoolIdProtocolId = "poolId__protocolId", + PoolIdProtocolSwapFeeCache = "poolId__protocolSwapFeeCache", + PoolIdProtocolYieldFeeCache = "poolId__protocolYieldFeeCache", + PoolIdRoot3Alpha = "poolId__root3Alpha", + PoolIdS = "poolId__s", + PoolIdSqrtAlpha = "poolId__sqrtAlpha", + PoolIdSqrtBeta = "poolId__sqrtBeta", + PoolIdStrategyType = "poolId__strategyType", + PoolIdSwapEnabled = "poolId__swapEnabled", + PoolIdSwapEnabledCurationSignal = "poolId__swapEnabledCurationSignal", + PoolIdSwapEnabledInternal = "poolId__swapEnabledInternal", + PoolIdSwapFee = "poolId__swapFee", + PoolIdSwapsCount = "poolId__swapsCount", + PoolIdSymbol = "poolId__symbol", + PoolIdTauAlphaX = "poolId__tauAlphaX", + PoolIdTauAlphaY = "poolId__tauAlphaY", + PoolIdTauBetaX = "poolId__tauBetaX", + PoolIdTauBetaY = "poolId__tauBetaY", + PoolIdTotalAumFeeCollectedInBpt = "poolId__totalAumFeeCollectedInBPT", + PoolIdTotalLiquidity = "poolId__totalLiquidity", + PoolIdTotalLiquiditySansBpt = "poolId__totalLiquiditySansBPT", + PoolIdTotalProtocolFee = "poolId__totalProtocolFee", + PoolIdTotalProtocolFeePaidInBpt = "poolId__totalProtocolFeePaidInBPT", + PoolIdTotalShares = "poolId__totalShares", + PoolIdTotalSwapFee = "poolId__totalSwapFee", + PoolIdTotalSwapVolume = "poolId__totalSwapVolume", + PoolIdTotalWeight = "poolId__totalWeight", + PoolIdTx = "poolId__tx", + PoolIdU = "poolId__u", + PoolIdUnitSeconds = "poolId__unitSeconds", + PoolIdUpperTarget = "poolId__upperTarget", + PoolIdV = "poolId__v", + PoolIdW = "poolId__w", + PoolIdWrappedIndex = "poolId__wrappedIndex", + PoolIdZ = "poolId__z", + Price = "price", + PricingAsset = "pricingAsset" +} +type ManagementOperation_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + and?: InputMaybe$1>>; + cashDelta?: InputMaybe$1; + cashDelta_gt?: InputMaybe$1; + cashDelta_gte?: InputMaybe$1; + cashDelta_in?: InputMaybe$1>; + cashDelta_lt?: InputMaybe$1; + cashDelta_lte?: InputMaybe$1; + cashDelta_not?: InputMaybe$1; + cashDelta_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + managedDelta?: InputMaybe$1; + managedDelta_gt?: InputMaybe$1; + managedDelta_gte?: InputMaybe$1; + managedDelta_in?: InputMaybe$1>; + managedDelta_lt?: InputMaybe$1; + managedDelta_lte?: InputMaybe$1; + managedDelta_not?: InputMaybe$1; + managedDelta_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + poolTokenId?: InputMaybe$1; + poolTokenId_?: InputMaybe$1; + poolTokenId_contains?: InputMaybe$1; + poolTokenId_contains_nocase?: InputMaybe$1; + poolTokenId_ends_with?: InputMaybe$1; + poolTokenId_ends_with_nocase?: InputMaybe$1; + poolTokenId_gt?: InputMaybe$1; + poolTokenId_gte?: InputMaybe$1; + poolTokenId_in?: InputMaybe$1>; + poolTokenId_lt?: InputMaybe$1; + poolTokenId_lte?: InputMaybe$1; + poolTokenId_not?: InputMaybe$1; + poolTokenId_not_contains?: InputMaybe$1; + poolTokenId_not_contains_nocase?: InputMaybe$1; + poolTokenId_not_ends_with?: InputMaybe$1; + poolTokenId_not_ends_with_nocase?: InputMaybe$1; + poolTokenId_not_in?: InputMaybe$1>; + poolTokenId_not_starts_with?: InputMaybe$1; + poolTokenId_not_starts_with_nocase?: InputMaybe$1; + poolTokenId_starts_with?: InputMaybe$1; + poolTokenId_starts_with_nocase?: InputMaybe$1; + timestamp?: InputMaybe$1; + timestamp_gt?: InputMaybe$1; + timestamp_gte?: InputMaybe$1; + timestamp_in?: InputMaybe$1>; + timestamp_lt?: InputMaybe$1; + timestamp_lte?: InputMaybe$1; + timestamp_not?: InputMaybe$1; + timestamp_not_in?: InputMaybe$1>; + type?: InputMaybe$1; + type_in?: InputMaybe$1>; + type_not?: InputMaybe$1; + type_not_in?: InputMaybe$1>; +}; +declare enum OperationType { + Deposit = "Deposit", + Update = "Update", + Withdraw = "Withdraw" +} +/** Defines the order direction, either ascending or descending */ +declare enum OrderDirection$1 { + Asc = "asc", + Desc = "desc" +} +type PoolHistoricalLiquidity_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + and?: InputMaybe$1>>; + block?: InputMaybe$1; + block_gt?: InputMaybe$1; + block_gte?: InputMaybe$1; + block_in?: InputMaybe$1>; + block_lt?: InputMaybe$1; + block_lte?: InputMaybe$1; + block_not?: InputMaybe$1; + block_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + poolId?: InputMaybe$1; + poolId_?: InputMaybe$1; + poolId_contains?: InputMaybe$1; + poolId_contains_nocase?: InputMaybe$1; + poolId_ends_with?: InputMaybe$1; + poolId_ends_with_nocase?: InputMaybe$1; + poolId_gt?: InputMaybe$1; + poolId_gte?: InputMaybe$1; + poolId_in?: InputMaybe$1>; + poolId_lt?: InputMaybe$1; + poolId_lte?: InputMaybe$1; + poolId_not?: InputMaybe$1; + poolId_not_contains?: InputMaybe$1; + poolId_not_contains_nocase?: InputMaybe$1; + poolId_not_ends_with?: InputMaybe$1; + poolId_not_ends_with_nocase?: InputMaybe$1; + poolId_not_in?: InputMaybe$1>; + poolId_not_starts_with?: InputMaybe$1; + poolId_not_starts_with_nocase?: InputMaybe$1; + poolId_starts_with?: InputMaybe$1; + poolId_starts_with_nocase?: InputMaybe$1; + poolLiquidity?: InputMaybe$1; + poolLiquidity_gt?: InputMaybe$1; + poolLiquidity_gte?: InputMaybe$1; + poolLiquidity_in?: InputMaybe$1>; + poolLiquidity_lt?: InputMaybe$1; + poolLiquidity_lte?: InputMaybe$1; + poolLiquidity_not?: InputMaybe$1; + poolLiquidity_not_in?: InputMaybe$1>; + poolShareValue?: InputMaybe$1; + poolShareValue_gt?: InputMaybe$1; + poolShareValue_gte?: InputMaybe$1; + poolShareValue_in?: InputMaybe$1>; + poolShareValue_lt?: InputMaybe$1; + poolShareValue_lte?: InputMaybe$1; + poolShareValue_not?: InputMaybe$1; + poolShareValue_not_in?: InputMaybe$1>; + poolTotalShares?: InputMaybe$1; + poolTotalShares_gt?: InputMaybe$1; + poolTotalShares_gte?: InputMaybe$1; + poolTotalShares_in?: InputMaybe$1>; + poolTotalShares_lt?: InputMaybe$1; + poolTotalShares_lte?: InputMaybe$1; + poolTotalShares_not?: InputMaybe$1; + poolTotalShares_not_in?: InputMaybe$1>; + pricingAsset?: InputMaybe$1; + pricingAsset_contains?: InputMaybe$1; + pricingAsset_gt?: InputMaybe$1; + pricingAsset_gte?: InputMaybe$1; + pricingAsset_in?: InputMaybe$1>; + pricingAsset_lt?: InputMaybe$1; + pricingAsset_lte?: InputMaybe$1; + pricingAsset_not?: InputMaybe$1; + pricingAsset_not_contains?: InputMaybe$1; + pricingAsset_not_in?: InputMaybe$1>; +}; +declare enum PoolHistoricalLiquidity_OrderBy { + Block = "block", + Id = "id", + PoolId = "poolId", + PoolIdAddress = "poolId__address", + PoolIdAlpha = "poolId__alpha", + PoolIdAmp = "poolId__amp", + PoolIdBaseToken = "poolId__baseToken", + PoolIdBeta = "poolId__beta", + PoolIdC = "poolId__c", + PoolIdCreateTime = "poolId__createTime", + PoolIdDSq = "poolId__dSq", + PoolIdDelta = "poolId__delta", + PoolIdEpsilon = "poolId__epsilon", + PoolIdExpiryTime = "poolId__expiryTime", + PoolIdFactory = "poolId__factory", + PoolIdHoldersCount = "poolId__holdersCount", + PoolIdId = "poolId__id", + PoolIdIsInRecoveryMode = "poolId__isInRecoveryMode", + PoolIdIsPaused = "poolId__isPaused", + PoolIdJoinExitEnabled = "poolId__joinExitEnabled", + PoolIdLambda = "poolId__lambda", + PoolIdLastJoinExitAmp = "poolId__lastJoinExitAmp", + PoolIdLastPostJoinExitInvariant = "poolId__lastPostJoinExitInvariant", + PoolIdLowerTarget = "poolId__lowerTarget", + PoolIdMainIndex = "poolId__mainIndex", + PoolIdManagementAumFee = "poolId__managementAumFee", + PoolIdManagementFee = "poolId__managementFee", + PoolIdMustAllowlistLPs = "poolId__mustAllowlistLPs", + PoolIdName = "poolId__name", + PoolIdOracleEnabled = "poolId__oracleEnabled", + PoolIdOwner = "poolId__owner", + PoolIdPoolType = "poolId__poolType", + PoolIdPoolTypeVersion = "poolId__poolTypeVersion", + PoolIdPrincipalToken = "poolId__principalToken", + PoolIdProtocolAumFeeCache = "poolId__protocolAumFeeCache", + PoolIdProtocolId = "poolId__protocolId", + PoolIdProtocolSwapFeeCache = "poolId__protocolSwapFeeCache", + PoolIdProtocolYieldFeeCache = "poolId__protocolYieldFeeCache", + PoolIdRoot3Alpha = "poolId__root3Alpha", + PoolIdS = "poolId__s", + PoolIdSqrtAlpha = "poolId__sqrtAlpha", + PoolIdSqrtBeta = "poolId__sqrtBeta", + PoolIdStrategyType = "poolId__strategyType", + PoolIdSwapEnabled = "poolId__swapEnabled", + PoolIdSwapEnabledCurationSignal = "poolId__swapEnabledCurationSignal", + PoolIdSwapEnabledInternal = "poolId__swapEnabledInternal", + PoolIdSwapFee = "poolId__swapFee", + PoolIdSwapsCount = "poolId__swapsCount", + PoolIdSymbol = "poolId__symbol", + PoolIdTauAlphaX = "poolId__tauAlphaX", + PoolIdTauAlphaY = "poolId__tauAlphaY", + PoolIdTauBetaX = "poolId__tauBetaX", + PoolIdTauBetaY = "poolId__tauBetaY", + PoolIdTotalAumFeeCollectedInBpt = "poolId__totalAumFeeCollectedInBPT", + PoolIdTotalLiquidity = "poolId__totalLiquidity", + PoolIdTotalLiquiditySansBpt = "poolId__totalLiquiditySansBPT", + PoolIdTotalProtocolFee = "poolId__totalProtocolFee", + PoolIdTotalProtocolFeePaidInBpt = "poolId__totalProtocolFeePaidInBPT", + PoolIdTotalShares = "poolId__totalShares", + PoolIdTotalSwapFee = "poolId__totalSwapFee", + PoolIdTotalSwapVolume = "poolId__totalSwapVolume", + PoolIdTotalWeight = "poolId__totalWeight", + PoolIdTx = "poolId__tx", + PoolIdU = "poolId__u", + PoolIdUnitSeconds = "poolId__unitSeconds", + PoolIdUpperTarget = "poolId__upperTarget", + PoolIdV = "poolId__v", + PoolIdW = "poolId__w", + PoolIdWrappedIndex = "poolId__wrappedIndex", + PoolIdZ = "poolId__z", + PoolLiquidity = "poolLiquidity", + PoolShareValue = "poolShareValue", + PoolTotalShares = "poolTotalShares", + PricingAsset = "pricingAsset" +} +type PoolShare_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + and?: InputMaybe$1>>; + balance?: InputMaybe$1; + balance_gt?: InputMaybe$1; + balance_gte?: InputMaybe$1; + balance_in?: InputMaybe$1>; + balance_lt?: InputMaybe$1; + balance_lte?: InputMaybe$1; + balance_not?: InputMaybe$1; + balance_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + poolId?: InputMaybe$1; + poolId_?: InputMaybe$1; + poolId_contains?: InputMaybe$1; + poolId_contains_nocase?: InputMaybe$1; + poolId_ends_with?: InputMaybe$1; + poolId_ends_with_nocase?: InputMaybe$1; + poolId_gt?: InputMaybe$1; + poolId_gte?: InputMaybe$1; + poolId_in?: InputMaybe$1>; + poolId_lt?: InputMaybe$1; + poolId_lte?: InputMaybe$1; + poolId_not?: InputMaybe$1; + poolId_not_contains?: InputMaybe$1; + poolId_not_contains_nocase?: InputMaybe$1; + poolId_not_ends_with?: InputMaybe$1; + poolId_not_ends_with_nocase?: InputMaybe$1; + poolId_not_in?: InputMaybe$1>; + poolId_not_starts_with?: InputMaybe$1; + poolId_not_starts_with_nocase?: InputMaybe$1; + poolId_starts_with?: InputMaybe$1; + poolId_starts_with_nocase?: InputMaybe$1; + userAddress?: InputMaybe$1; + userAddress_?: InputMaybe$1; + userAddress_contains?: InputMaybe$1; + userAddress_contains_nocase?: InputMaybe$1; + userAddress_ends_with?: InputMaybe$1; + userAddress_ends_with_nocase?: InputMaybe$1; + userAddress_gt?: InputMaybe$1; + userAddress_gte?: InputMaybe$1; + userAddress_in?: InputMaybe$1>; + userAddress_lt?: InputMaybe$1; + userAddress_lte?: InputMaybe$1; + userAddress_not?: InputMaybe$1; + userAddress_not_contains?: InputMaybe$1; + userAddress_not_contains_nocase?: InputMaybe$1; + userAddress_not_ends_with?: InputMaybe$1; + userAddress_not_ends_with_nocase?: InputMaybe$1; + userAddress_not_in?: InputMaybe$1>; + userAddress_not_starts_with?: InputMaybe$1; + userAddress_not_starts_with_nocase?: InputMaybe$1; + userAddress_starts_with?: InputMaybe$1; + userAddress_starts_with_nocase?: InputMaybe$1; +}; +declare enum PoolShare_OrderBy { + Balance = "balance", + Id = "id", + PoolId = "poolId", + PoolIdAddress = "poolId__address", + PoolIdAlpha = "poolId__alpha", + PoolIdAmp = "poolId__amp", + PoolIdBaseToken = "poolId__baseToken", + PoolIdBeta = "poolId__beta", + PoolIdC = "poolId__c", + PoolIdCreateTime = "poolId__createTime", + PoolIdDSq = "poolId__dSq", + PoolIdDelta = "poolId__delta", + PoolIdEpsilon = "poolId__epsilon", + PoolIdExpiryTime = "poolId__expiryTime", + PoolIdFactory = "poolId__factory", + PoolIdHoldersCount = "poolId__holdersCount", + PoolIdId = "poolId__id", + PoolIdIsInRecoveryMode = "poolId__isInRecoveryMode", + PoolIdIsPaused = "poolId__isPaused", + PoolIdJoinExitEnabled = "poolId__joinExitEnabled", + PoolIdLambda = "poolId__lambda", + PoolIdLastJoinExitAmp = "poolId__lastJoinExitAmp", + PoolIdLastPostJoinExitInvariant = "poolId__lastPostJoinExitInvariant", + PoolIdLowerTarget = "poolId__lowerTarget", + PoolIdMainIndex = "poolId__mainIndex", + PoolIdManagementAumFee = "poolId__managementAumFee", + PoolIdManagementFee = "poolId__managementFee", + PoolIdMustAllowlistLPs = "poolId__mustAllowlistLPs", + PoolIdName = "poolId__name", + PoolIdOracleEnabled = "poolId__oracleEnabled", + PoolIdOwner = "poolId__owner", + PoolIdPoolType = "poolId__poolType", + PoolIdPoolTypeVersion = "poolId__poolTypeVersion", + PoolIdPrincipalToken = "poolId__principalToken", + PoolIdProtocolAumFeeCache = "poolId__protocolAumFeeCache", + PoolIdProtocolId = "poolId__protocolId", + PoolIdProtocolSwapFeeCache = "poolId__protocolSwapFeeCache", + PoolIdProtocolYieldFeeCache = "poolId__protocolYieldFeeCache", + PoolIdRoot3Alpha = "poolId__root3Alpha", + PoolIdS = "poolId__s", + PoolIdSqrtAlpha = "poolId__sqrtAlpha", + PoolIdSqrtBeta = "poolId__sqrtBeta", + PoolIdStrategyType = "poolId__strategyType", + PoolIdSwapEnabled = "poolId__swapEnabled", + PoolIdSwapEnabledCurationSignal = "poolId__swapEnabledCurationSignal", + PoolIdSwapEnabledInternal = "poolId__swapEnabledInternal", + PoolIdSwapFee = "poolId__swapFee", + PoolIdSwapsCount = "poolId__swapsCount", + PoolIdSymbol = "poolId__symbol", + PoolIdTauAlphaX = "poolId__tauAlphaX", + PoolIdTauAlphaY = "poolId__tauAlphaY", + PoolIdTauBetaX = "poolId__tauBetaX", + PoolIdTauBetaY = "poolId__tauBetaY", + PoolIdTotalAumFeeCollectedInBpt = "poolId__totalAumFeeCollectedInBPT", + PoolIdTotalLiquidity = "poolId__totalLiquidity", + PoolIdTotalLiquiditySansBpt = "poolId__totalLiquiditySansBPT", + PoolIdTotalProtocolFee = "poolId__totalProtocolFee", + PoolIdTotalProtocolFeePaidInBpt = "poolId__totalProtocolFeePaidInBPT", + PoolIdTotalShares = "poolId__totalShares", + PoolIdTotalSwapFee = "poolId__totalSwapFee", + PoolIdTotalSwapVolume = "poolId__totalSwapVolume", + PoolIdTotalWeight = "poolId__totalWeight", + PoolIdTx = "poolId__tx", + PoolIdU = "poolId__u", + PoolIdUnitSeconds = "poolId__unitSeconds", + PoolIdUpperTarget = "poolId__upperTarget", + PoolIdV = "poolId__v", + PoolIdW = "poolId__w", + PoolIdWrappedIndex = "poolId__wrappedIndex", + PoolIdZ = "poolId__z", + UserAddress = "userAddress", + UserAddressId = "userAddress__id" +} +type PoolSnapshot_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + amounts?: InputMaybe$1>; + amounts_contains?: InputMaybe$1>; + amounts_contains_nocase?: InputMaybe$1>; + amounts_not?: InputMaybe$1>; + amounts_not_contains?: InputMaybe$1>; + amounts_not_contains_nocase?: InputMaybe$1>; + and?: InputMaybe$1>>; + holdersCount?: InputMaybe$1; + holdersCount_gt?: InputMaybe$1; + holdersCount_gte?: InputMaybe$1; + holdersCount_in?: InputMaybe$1>; + holdersCount_lt?: InputMaybe$1; + holdersCount_lte?: InputMaybe$1; + holdersCount_not?: InputMaybe$1; + holdersCount_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + liquidity?: InputMaybe$1; + liquidity_gt?: InputMaybe$1; + liquidity_gte?: InputMaybe$1; + liquidity_in?: InputMaybe$1>; + liquidity_lt?: InputMaybe$1; + liquidity_lte?: InputMaybe$1; + liquidity_not?: InputMaybe$1; + liquidity_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + pool?: InputMaybe$1; + pool_?: InputMaybe$1; + pool_contains?: InputMaybe$1; + pool_contains_nocase?: InputMaybe$1; + pool_ends_with?: InputMaybe$1; + pool_ends_with_nocase?: InputMaybe$1; + pool_gt?: InputMaybe$1; + pool_gte?: InputMaybe$1; + pool_in?: InputMaybe$1>; + pool_lt?: InputMaybe$1; + pool_lte?: InputMaybe$1; + pool_not?: InputMaybe$1; + pool_not_contains?: InputMaybe$1; + pool_not_contains_nocase?: InputMaybe$1; + pool_not_ends_with?: InputMaybe$1; + pool_not_ends_with_nocase?: InputMaybe$1; + pool_not_in?: InputMaybe$1>; + pool_not_starts_with?: InputMaybe$1; + pool_not_starts_with_nocase?: InputMaybe$1; + pool_starts_with?: InputMaybe$1; + pool_starts_with_nocase?: InputMaybe$1; + protocolFee?: InputMaybe$1; + protocolFee_gt?: InputMaybe$1; + protocolFee_gte?: InputMaybe$1; + protocolFee_in?: InputMaybe$1>; + protocolFee_lt?: InputMaybe$1; + protocolFee_lte?: InputMaybe$1; + protocolFee_not?: InputMaybe$1; + protocolFee_not_in?: InputMaybe$1>; + swapFees?: InputMaybe$1; + swapFees_gt?: InputMaybe$1; + swapFees_gte?: InputMaybe$1; + swapFees_in?: InputMaybe$1>; + swapFees_lt?: InputMaybe$1; + swapFees_lte?: InputMaybe$1; + swapFees_not?: InputMaybe$1; + swapFees_not_in?: InputMaybe$1>; + swapVolume?: InputMaybe$1; + swapVolume_gt?: InputMaybe$1; + swapVolume_gte?: InputMaybe$1; + swapVolume_in?: InputMaybe$1>; + swapVolume_lt?: InputMaybe$1; + swapVolume_lte?: InputMaybe$1; + swapVolume_not?: InputMaybe$1; + swapVolume_not_in?: InputMaybe$1>; + swapsCount?: InputMaybe$1; + swapsCount_gt?: InputMaybe$1; + swapsCount_gte?: InputMaybe$1; + swapsCount_in?: InputMaybe$1>; + swapsCount_lt?: InputMaybe$1; + swapsCount_lte?: InputMaybe$1; + swapsCount_not?: InputMaybe$1; + swapsCount_not_in?: InputMaybe$1>; + timestamp?: InputMaybe$1; + timestamp_gt?: InputMaybe$1; + timestamp_gte?: InputMaybe$1; + timestamp_in?: InputMaybe$1>; + timestamp_lt?: InputMaybe$1; + timestamp_lte?: InputMaybe$1; + timestamp_not?: InputMaybe$1; + timestamp_not_in?: InputMaybe$1>; + totalShares?: InputMaybe$1; + totalShares_gt?: InputMaybe$1; + totalShares_gte?: InputMaybe$1; + totalShares_in?: InputMaybe$1>; + totalShares_lt?: InputMaybe$1; + totalShares_lte?: InputMaybe$1; + totalShares_not?: InputMaybe$1; + totalShares_not_in?: InputMaybe$1>; +}; +declare enum PoolSnapshot_OrderBy { + Amounts = "amounts", + HoldersCount = "holdersCount", + Id = "id", + Liquidity = "liquidity", + Pool = "pool", + PoolAddress = "pool__address", + PoolAlpha = "pool__alpha", + PoolAmp = "pool__amp", + PoolBaseToken = "pool__baseToken", + PoolBeta = "pool__beta", + PoolC = "pool__c", + PoolCreateTime = "pool__createTime", + PoolDSq = "pool__dSq", + PoolDelta = "pool__delta", + PoolEpsilon = "pool__epsilon", + PoolExpiryTime = "pool__expiryTime", + PoolFactory = "pool__factory", + PoolHoldersCount = "pool__holdersCount", + PoolId = "pool__id", + PoolIsInRecoveryMode = "pool__isInRecoveryMode", + PoolIsPaused = "pool__isPaused", + PoolJoinExitEnabled = "pool__joinExitEnabled", + PoolLambda = "pool__lambda", + PoolLastJoinExitAmp = "pool__lastJoinExitAmp", + PoolLastPostJoinExitInvariant = "pool__lastPostJoinExitInvariant", + PoolLowerTarget = "pool__lowerTarget", + PoolMainIndex = "pool__mainIndex", + PoolManagementAumFee = "pool__managementAumFee", + PoolManagementFee = "pool__managementFee", + PoolMustAllowlistLPs = "pool__mustAllowlistLPs", + PoolName = "pool__name", + PoolOracleEnabled = "pool__oracleEnabled", + PoolOwner = "pool__owner", + PoolPoolType = "pool__poolType", + PoolPoolTypeVersion = "pool__poolTypeVersion", + PoolPrincipalToken = "pool__principalToken", + PoolProtocolAumFeeCache = "pool__protocolAumFeeCache", + PoolProtocolId = "pool__protocolId", + PoolProtocolSwapFeeCache = "pool__protocolSwapFeeCache", + PoolProtocolYieldFeeCache = "pool__protocolYieldFeeCache", + PoolRoot3Alpha = "pool__root3Alpha", + PoolS = "pool__s", + PoolSqrtAlpha = "pool__sqrtAlpha", + PoolSqrtBeta = "pool__sqrtBeta", + PoolStrategyType = "pool__strategyType", + PoolSwapEnabled = "pool__swapEnabled", + PoolSwapEnabledCurationSignal = "pool__swapEnabledCurationSignal", + PoolSwapEnabledInternal = "pool__swapEnabledInternal", + PoolSwapFee = "pool__swapFee", + PoolSwapsCount = "pool__swapsCount", + PoolSymbol = "pool__symbol", + PoolTauAlphaX = "pool__tauAlphaX", + PoolTauAlphaY = "pool__tauAlphaY", + PoolTauBetaX = "pool__tauBetaX", + PoolTauBetaY = "pool__tauBetaY", + PoolTotalAumFeeCollectedInBpt = "pool__totalAumFeeCollectedInBPT", + PoolTotalLiquidity = "pool__totalLiquidity", + PoolTotalLiquiditySansBpt = "pool__totalLiquiditySansBPT", + PoolTotalProtocolFee = "pool__totalProtocolFee", + PoolTotalProtocolFeePaidInBpt = "pool__totalProtocolFeePaidInBPT", + PoolTotalShares = "pool__totalShares", + PoolTotalSwapFee = "pool__totalSwapFee", + PoolTotalSwapVolume = "pool__totalSwapVolume", + PoolTotalWeight = "pool__totalWeight", + PoolTx = "pool__tx", + PoolU = "pool__u", + PoolUnitSeconds = "pool__unitSeconds", + PoolUpperTarget = "pool__upperTarget", + PoolV = "pool__v", + PoolW = "pool__w", + PoolWrappedIndex = "pool__wrappedIndex", + PoolZ = "pool__z", + ProtocolFee = "protocolFee", + SwapFees = "swapFees", + SwapVolume = "swapVolume", + SwapsCount = "swapsCount", + Timestamp = "timestamp", + TotalShares = "totalShares" +} +type PoolToken_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + address?: InputMaybe$1; + address_contains?: InputMaybe$1; + address_contains_nocase?: InputMaybe$1; + address_ends_with?: InputMaybe$1; + address_ends_with_nocase?: InputMaybe$1; + address_gt?: InputMaybe$1; + address_gte?: InputMaybe$1; + address_in?: InputMaybe$1>; + address_lt?: InputMaybe$1; + address_lte?: InputMaybe$1; + address_not?: InputMaybe$1; + address_not_contains?: InputMaybe$1; + address_not_contains_nocase?: InputMaybe$1; + address_not_ends_with?: InputMaybe$1; + address_not_ends_with_nocase?: InputMaybe$1; + address_not_in?: InputMaybe$1>; + address_not_starts_with?: InputMaybe$1; + address_not_starts_with_nocase?: InputMaybe$1; + address_starts_with?: InputMaybe$1; + address_starts_with_nocase?: InputMaybe$1; + and?: InputMaybe$1>>; + assetManager?: InputMaybe$1; + assetManager_contains?: InputMaybe$1; + assetManager_gt?: InputMaybe$1; + assetManager_gte?: InputMaybe$1; + assetManager_in?: InputMaybe$1>; + assetManager_lt?: InputMaybe$1; + assetManager_lte?: InputMaybe$1; + assetManager_not?: InputMaybe$1; + assetManager_not_contains?: InputMaybe$1; + assetManager_not_in?: InputMaybe$1>; + balance?: InputMaybe$1; + balance_gt?: InputMaybe$1; + balance_gte?: InputMaybe$1; + balance_in?: InputMaybe$1>; + balance_lt?: InputMaybe$1; + balance_lte?: InputMaybe$1; + balance_not?: InputMaybe$1; + balance_not_in?: InputMaybe$1>; + cashBalance?: InputMaybe$1; + cashBalance_gt?: InputMaybe$1; + cashBalance_gte?: InputMaybe$1; + cashBalance_in?: InputMaybe$1>; + cashBalance_lt?: InputMaybe$1; + cashBalance_lte?: InputMaybe$1; + cashBalance_not?: InputMaybe$1; + cashBalance_not_in?: InputMaybe$1>; + circuitBreaker?: InputMaybe$1; + circuitBreaker_?: InputMaybe$1; + circuitBreaker_contains?: InputMaybe$1; + circuitBreaker_contains_nocase?: InputMaybe$1; + circuitBreaker_ends_with?: InputMaybe$1; + circuitBreaker_ends_with_nocase?: InputMaybe$1; + circuitBreaker_gt?: InputMaybe$1; + circuitBreaker_gte?: InputMaybe$1; + circuitBreaker_in?: InputMaybe$1>; + circuitBreaker_lt?: InputMaybe$1; + circuitBreaker_lte?: InputMaybe$1; + circuitBreaker_not?: InputMaybe$1; + circuitBreaker_not_contains?: InputMaybe$1; + circuitBreaker_not_contains_nocase?: InputMaybe$1; + circuitBreaker_not_ends_with?: InputMaybe$1; + circuitBreaker_not_ends_with_nocase?: InputMaybe$1; + circuitBreaker_not_in?: InputMaybe$1>; + circuitBreaker_not_starts_with?: InputMaybe$1; + circuitBreaker_not_starts_with_nocase?: InputMaybe$1; + circuitBreaker_starts_with?: InputMaybe$1; + circuitBreaker_starts_with_nocase?: InputMaybe$1; + decimals?: InputMaybe$1; + decimals_gt?: InputMaybe$1; + decimals_gte?: InputMaybe$1; + decimals_in?: InputMaybe$1>; + decimals_lt?: InputMaybe$1; + decimals_lte?: InputMaybe$1; + decimals_not?: InputMaybe$1; + decimals_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + index?: InputMaybe$1; + index_gt?: InputMaybe$1; + index_gte?: InputMaybe$1; + index_in?: InputMaybe$1>; + index_lt?: InputMaybe$1; + index_lte?: InputMaybe$1; + index_not?: InputMaybe$1; + index_not_in?: InputMaybe$1>; + isExemptFromYieldProtocolFee?: InputMaybe$1; + isExemptFromYieldProtocolFee_in?: InputMaybe$1>; + isExemptFromYieldProtocolFee_not?: InputMaybe$1; + isExemptFromYieldProtocolFee_not_in?: InputMaybe$1>; + managedBalance?: InputMaybe$1; + managedBalance_gt?: InputMaybe$1; + managedBalance_gte?: InputMaybe$1; + managedBalance_in?: InputMaybe$1>; + managedBalance_lt?: InputMaybe$1; + managedBalance_lte?: InputMaybe$1; + managedBalance_not?: InputMaybe$1; + managedBalance_not_in?: InputMaybe$1>; + managements_?: InputMaybe$1; + name?: InputMaybe$1; + name_contains?: InputMaybe$1; + name_contains_nocase?: InputMaybe$1; + name_ends_with?: InputMaybe$1; + name_ends_with_nocase?: InputMaybe$1; + name_gt?: InputMaybe$1; + name_gte?: InputMaybe$1; + name_in?: InputMaybe$1>; + name_lt?: InputMaybe$1; + name_lte?: InputMaybe$1; + name_not?: InputMaybe$1; + name_not_contains?: InputMaybe$1; + name_not_contains_nocase?: InputMaybe$1; + name_not_ends_with?: InputMaybe$1; + name_not_ends_with_nocase?: InputMaybe$1; + name_not_in?: InputMaybe$1>; + name_not_starts_with?: InputMaybe$1; + name_not_starts_with_nocase?: InputMaybe$1; + name_starts_with?: InputMaybe$1; + name_starts_with_nocase?: InputMaybe$1; + oldPriceRate?: InputMaybe$1; + oldPriceRate_gt?: InputMaybe$1; + oldPriceRate_gte?: InputMaybe$1; + oldPriceRate_in?: InputMaybe$1>; + oldPriceRate_lt?: InputMaybe$1; + oldPriceRate_lte?: InputMaybe$1; + oldPriceRate_not?: InputMaybe$1; + oldPriceRate_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + paidProtocolFees?: InputMaybe$1; + paidProtocolFees_gt?: InputMaybe$1; + paidProtocolFees_gte?: InputMaybe$1; + paidProtocolFees_in?: InputMaybe$1>; + paidProtocolFees_lt?: InputMaybe$1; + paidProtocolFees_lte?: InputMaybe$1; + paidProtocolFees_not?: InputMaybe$1; + paidProtocolFees_not_in?: InputMaybe$1>; + poolId?: InputMaybe$1; + poolId_?: InputMaybe$1; + poolId_contains?: InputMaybe$1; + poolId_contains_nocase?: InputMaybe$1; + poolId_ends_with?: InputMaybe$1; + poolId_ends_with_nocase?: InputMaybe$1; + poolId_gt?: InputMaybe$1; + poolId_gte?: InputMaybe$1; + poolId_in?: InputMaybe$1>; + poolId_lt?: InputMaybe$1; + poolId_lte?: InputMaybe$1; + poolId_not?: InputMaybe$1; + poolId_not_contains?: InputMaybe$1; + poolId_not_contains_nocase?: InputMaybe$1; + poolId_not_ends_with?: InputMaybe$1; + poolId_not_ends_with_nocase?: InputMaybe$1; + poolId_not_in?: InputMaybe$1>; + poolId_not_starts_with?: InputMaybe$1; + poolId_not_starts_with_nocase?: InputMaybe$1; + poolId_starts_with?: InputMaybe$1; + poolId_starts_with_nocase?: InputMaybe$1; + priceRate?: InputMaybe$1; + priceRate_gt?: InputMaybe$1; + priceRate_gte?: InputMaybe$1; + priceRate_in?: InputMaybe$1>; + priceRate_lt?: InputMaybe$1; + priceRate_lte?: InputMaybe$1; + priceRate_not?: InputMaybe$1; + priceRate_not_in?: InputMaybe$1>; + symbol?: InputMaybe$1; + symbol_contains?: InputMaybe$1; + symbol_contains_nocase?: InputMaybe$1; + symbol_ends_with?: InputMaybe$1; + symbol_ends_with_nocase?: InputMaybe$1; + symbol_gt?: InputMaybe$1; + symbol_gte?: InputMaybe$1; + symbol_in?: InputMaybe$1>; + symbol_lt?: InputMaybe$1; + symbol_lte?: InputMaybe$1; + symbol_not?: InputMaybe$1; + symbol_not_contains?: InputMaybe$1; + symbol_not_contains_nocase?: InputMaybe$1; + symbol_not_ends_with?: InputMaybe$1; + symbol_not_ends_with_nocase?: InputMaybe$1; + symbol_not_in?: InputMaybe$1>; + symbol_not_starts_with?: InputMaybe$1; + symbol_not_starts_with_nocase?: InputMaybe$1; + symbol_starts_with?: InputMaybe$1; + symbol_starts_with_nocase?: InputMaybe$1; + token?: InputMaybe$1; + token_?: InputMaybe$1; + token_contains?: InputMaybe$1; + token_contains_nocase?: InputMaybe$1; + token_ends_with?: InputMaybe$1; + token_ends_with_nocase?: InputMaybe$1; + token_gt?: InputMaybe$1; + token_gte?: InputMaybe$1; + token_in?: InputMaybe$1>; + token_lt?: InputMaybe$1; + token_lte?: InputMaybe$1; + token_not?: InputMaybe$1; + token_not_contains?: InputMaybe$1; + token_not_contains_nocase?: InputMaybe$1; + token_not_ends_with?: InputMaybe$1; + token_not_ends_with_nocase?: InputMaybe$1; + token_not_in?: InputMaybe$1>; + token_not_starts_with?: InputMaybe$1; + token_not_starts_with_nocase?: InputMaybe$1; + token_starts_with?: InputMaybe$1; + token_starts_with_nocase?: InputMaybe$1; + weight?: InputMaybe$1; + weight_gt?: InputMaybe$1; + weight_gte?: InputMaybe$1; + weight_in?: InputMaybe$1>; + weight_lt?: InputMaybe$1; + weight_lte?: InputMaybe$1; + weight_not?: InputMaybe$1; + weight_not_in?: InputMaybe$1>; +}; +type Pool_Filter$1 = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + address?: InputMaybe$1; + address_contains?: InputMaybe$1; + address_gt?: InputMaybe$1; + address_gte?: InputMaybe$1; + address_in?: InputMaybe$1>; + address_lt?: InputMaybe$1; + address_lte?: InputMaybe$1; + address_not?: InputMaybe$1; + address_not_contains?: InputMaybe$1; + address_not_in?: InputMaybe$1>; + alpha?: InputMaybe$1; + alpha_gt?: InputMaybe$1; + alpha_gte?: InputMaybe$1; + alpha_in?: InputMaybe$1>; + alpha_lt?: InputMaybe$1; + alpha_lte?: InputMaybe$1; + alpha_not?: InputMaybe$1; + alpha_not_in?: InputMaybe$1>; + amp?: InputMaybe$1; + ampUpdates_?: InputMaybe$1; + amp_gt?: InputMaybe$1; + amp_gte?: InputMaybe$1; + amp_in?: InputMaybe$1>; + amp_lt?: InputMaybe$1; + amp_lte?: InputMaybe$1; + amp_not?: InputMaybe$1; + amp_not_in?: InputMaybe$1>; + and?: InputMaybe$1>>; + baseToken?: InputMaybe$1; + baseToken_contains?: InputMaybe$1; + baseToken_gt?: InputMaybe$1; + baseToken_gte?: InputMaybe$1; + baseToken_in?: InputMaybe$1>; + baseToken_lt?: InputMaybe$1; + baseToken_lte?: InputMaybe$1; + baseToken_not?: InputMaybe$1; + baseToken_not_contains?: InputMaybe$1; + baseToken_not_in?: InputMaybe$1>; + beta?: InputMaybe$1; + beta_gt?: InputMaybe$1; + beta_gte?: InputMaybe$1; + beta_in?: InputMaybe$1>; + beta_lt?: InputMaybe$1; + beta_lte?: InputMaybe$1; + beta_not?: InputMaybe$1; + beta_not_in?: InputMaybe$1>; + c?: InputMaybe$1; + c_gt?: InputMaybe$1; + c_gte?: InputMaybe$1; + c_in?: InputMaybe$1>; + c_lt?: InputMaybe$1; + c_lte?: InputMaybe$1; + c_not?: InputMaybe$1; + c_not_in?: InputMaybe$1>; + circuitBreakers_?: InputMaybe$1; + createTime?: InputMaybe$1; + createTime_gt?: InputMaybe$1; + createTime_gte?: InputMaybe$1; + createTime_in?: InputMaybe$1>; + createTime_lt?: InputMaybe$1; + createTime_lte?: InputMaybe$1; + createTime_not?: InputMaybe$1; + createTime_not_in?: InputMaybe$1>; + dSq?: InputMaybe$1; + dSq_gt?: InputMaybe$1; + dSq_gte?: InputMaybe$1; + dSq_in?: InputMaybe$1>; + dSq_lt?: InputMaybe$1; + dSq_lte?: InputMaybe$1; + dSq_not?: InputMaybe$1; + dSq_not_in?: InputMaybe$1>; + delta?: InputMaybe$1; + delta_gt?: InputMaybe$1; + delta_gte?: InputMaybe$1; + delta_in?: InputMaybe$1>; + delta_lt?: InputMaybe$1; + delta_lte?: InputMaybe$1; + delta_not?: InputMaybe$1; + delta_not_in?: InputMaybe$1>; + epsilon?: InputMaybe$1; + epsilon_gt?: InputMaybe$1; + epsilon_gte?: InputMaybe$1; + epsilon_in?: InputMaybe$1>; + epsilon_lt?: InputMaybe$1; + epsilon_lte?: InputMaybe$1; + epsilon_not?: InputMaybe$1; + epsilon_not_in?: InputMaybe$1>; + expiryTime?: InputMaybe$1; + expiryTime_gt?: InputMaybe$1; + expiryTime_gte?: InputMaybe$1; + expiryTime_in?: InputMaybe$1>; + expiryTime_lt?: InputMaybe$1; + expiryTime_lte?: InputMaybe$1; + expiryTime_not?: InputMaybe$1; + expiryTime_not_in?: InputMaybe$1>; + factory?: InputMaybe$1; + factory_contains?: InputMaybe$1; + factory_gt?: InputMaybe$1; + factory_gte?: InputMaybe$1; + factory_in?: InputMaybe$1>; + factory_lt?: InputMaybe$1; + factory_lte?: InputMaybe$1; + factory_not?: InputMaybe$1; + factory_not_contains?: InputMaybe$1; + factory_not_in?: InputMaybe$1>; + historicalValues_?: InputMaybe$1; + holdersCount?: InputMaybe$1; + holdersCount_gt?: InputMaybe$1; + holdersCount_gte?: InputMaybe$1; + holdersCount_in?: InputMaybe$1>; + holdersCount_lt?: InputMaybe$1; + holdersCount_lte?: InputMaybe$1; + holdersCount_not?: InputMaybe$1; + holdersCount_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + isInRecoveryMode?: InputMaybe$1; + isInRecoveryMode_in?: InputMaybe$1>; + isInRecoveryMode_not?: InputMaybe$1; + isInRecoveryMode_not_in?: InputMaybe$1>; + isPaused?: InputMaybe$1; + isPaused_in?: InputMaybe$1>; + isPaused_not?: InputMaybe$1; + isPaused_not_in?: InputMaybe$1>; + joinExitEnabled?: InputMaybe$1; + joinExitEnabled_in?: InputMaybe$1>; + joinExitEnabled_not?: InputMaybe$1; + joinExitEnabled_not_in?: InputMaybe$1>; + lambda?: InputMaybe$1; + lambda_gt?: InputMaybe$1; + lambda_gte?: InputMaybe$1; + lambda_in?: InputMaybe$1>; + lambda_lt?: InputMaybe$1; + lambda_lte?: InputMaybe$1; + lambda_not?: InputMaybe$1; + lambda_not_in?: InputMaybe$1>; + lastJoinExitAmp?: InputMaybe$1; + lastJoinExitAmp_gt?: InputMaybe$1; + lastJoinExitAmp_gte?: InputMaybe$1; + lastJoinExitAmp_in?: InputMaybe$1>; + lastJoinExitAmp_lt?: InputMaybe$1; + lastJoinExitAmp_lte?: InputMaybe$1; + lastJoinExitAmp_not?: InputMaybe$1; + lastJoinExitAmp_not_in?: InputMaybe$1>; + lastPostJoinExitInvariant?: InputMaybe$1; + lastPostJoinExitInvariant_gt?: InputMaybe$1; + lastPostJoinExitInvariant_gte?: InputMaybe$1; + lastPostJoinExitInvariant_in?: InputMaybe$1>; + lastPostJoinExitInvariant_lt?: InputMaybe$1; + lastPostJoinExitInvariant_lte?: InputMaybe$1; + lastPostJoinExitInvariant_not?: InputMaybe$1; + lastPostJoinExitInvariant_not_in?: InputMaybe$1>; + latestAmpUpdate?: InputMaybe$1; + latestAmpUpdate_?: InputMaybe$1; + latestAmpUpdate_contains?: InputMaybe$1; + latestAmpUpdate_contains_nocase?: InputMaybe$1; + latestAmpUpdate_ends_with?: InputMaybe$1; + latestAmpUpdate_ends_with_nocase?: InputMaybe$1; + latestAmpUpdate_gt?: InputMaybe$1; + latestAmpUpdate_gte?: InputMaybe$1; + latestAmpUpdate_in?: InputMaybe$1>; + latestAmpUpdate_lt?: InputMaybe$1; + latestAmpUpdate_lte?: InputMaybe$1; + latestAmpUpdate_not?: InputMaybe$1; + latestAmpUpdate_not_contains?: InputMaybe$1; + latestAmpUpdate_not_contains_nocase?: InputMaybe$1; + latestAmpUpdate_not_ends_with?: InputMaybe$1; + latestAmpUpdate_not_ends_with_nocase?: InputMaybe$1; + latestAmpUpdate_not_in?: InputMaybe$1>; + latestAmpUpdate_not_starts_with?: InputMaybe$1; + latestAmpUpdate_not_starts_with_nocase?: InputMaybe$1; + latestAmpUpdate_starts_with?: InputMaybe$1; + latestAmpUpdate_starts_with_nocase?: InputMaybe$1; + lowerTarget?: InputMaybe$1; + lowerTarget_gt?: InputMaybe$1; + lowerTarget_gte?: InputMaybe$1; + lowerTarget_in?: InputMaybe$1>; + lowerTarget_lt?: InputMaybe$1; + lowerTarget_lte?: InputMaybe$1; + lowerTarget_not?: InputMaybe$1; + lowerTarget_not_in?: InputMaybe$1>; + mainIndex?: InputMaybe$1; + mainIndex_gt?: InputMaybe$1; + mainIndex_gte?: InputMaybe$1; + mainIndex_in?: InputMaybe$1>; + mainIndex_lt?: InputMaybe$1; + mainIndex_lte?: InputMaybe$1; + mainIndex_not?: InputMaybe$1; + mainIndex_not_in?: InputMaybe$1>; + managementAumFee?: InputMaybe$1; + managementAumFee_gt?: InputMaybe$1; + managementAumFee_gte?: InputMaybe$1; + managementAumFee_in?: InputMaybe$1>; + managementAumFee_lt?: InputMaybe$1; + managementAumFee_lte?: InputMaybe$1; + managementAumFee_not?: InputMaybe$1; + managementAumFee_not_in?: InputMaybe$1>; + managementFee?: InputMaybe$1; + managementFee_gt?: InputMaybe$1; + managementFee_gte?: InputMaybe$1; + managementFee_in?: InputMaybe$1>; + managementFee_lt?: InputMaybe$1; + managementFee_lte?: InputMaybe$1; + managementFee_not?: InputMaybe$1; + managementFee_not_in?: InputMaybe$1>; + mustAllowlistLPs?: InputMaybe$1; + mustAllowlistLPs_in?: InputMaybe$1>; + mustAllowlistLPs_not?: InputMaybe$1; + mustAllowlistLPs_not_in?: InputMaybe$1>; + name?: InputMaybe$1; + name_contains?: InputMaybe$1; + name_contains_nocase?: InputMaybe$1; + name_ends_with?: InputMaybe$1; + name_ends_with_nocase?: InputMaybe$1; + name_gt?: InputMaybe$1; + name_gte?: InputMaybe$1; + name_in?: InputMaybe$1>; + name_lt?: InputMaybe$1; + name_lte?: InputMaybe$1; + name_not?: InputMaybe$1; + name_not_contains?: InputMaybe$1; + name_not_contains_nocase?: InputMaybe$1; + name_not_ends_with?: InputMaybe$1; + name_not_ends_with_nocase?: InputMaybe$1; + name_not_in?: InputMaybe$1>; + name_not_starts_with?: InputMaybe$1; + name_not_starts_with_nocase?: InputMaybe$1; + name_starts_with?: InputMaybe$1; + name_starts_with_nocase?: InputMaybe$1; + or?: InputMaybe$1>>; + oracleEnabled?: InputMaybe$1; + oracleEnabled_in?: InputMaybe$1>; + oracleEnabled_not?: InputMaybe$1; + oracleEnabled_not_in?: InputMaybe$1>; + owner?: InputMaybe$1; + owner_contains?: InputMaybe$1; + owner_gt?: InputMaybe$1; + owner_gte?: InputMaybe$1; + owner_in?: InputMaybe$1>; + owner_lt?: InputMaybe$1; + owner_lte?: InputMaybe$1; + owner_not?: InputMaybe$1; + owner_not_contains?: InputMaybe$1; + owner_not_in?: InputMaybe$1>; + poolType?: InputMaybe$1; + poolTypeVersion?: InputMaybe$1; + poolTypeVersion_gt?: InputMaybe$1; + poolTypeVersion_gte?: InputMaybe$1; + poolTypeVersion_in?: InputMaybe$1>; + poolTypeVersion_lt?: InputMaybe$1; + poolTypeVersion_lte?: InputMaybe$1; + poolTypeVersion_not?: InputMaybe$1; + poolTypeVersion_not_in?: InputMaybe$1>; + poolType_contains?: InputMaybe$1; + poolType_contains_nocase?: InputMaybe$1; + poolType_ends_with?: InputMaybe$1; + poolType_ends_with_nocase?: InputMaybe$1; + poolType_gt?: InputMaybe$1; + poolType_gte?: InputMaybe$1; + poolType_in?: InputMaybe$1>; + poolType_lt?: InputMaybe$1; + poolType_lte?: InputMaybe$1; + poolType_not?: InputMaybe$1; + poolType_not_contains?: InputMaybe$1; + poolType_not_contains_nocase?: InputMaybe$1; + poolType_not_ends_with?: InputMaybe$1; + poolType_not_ends_with_nocase?: InputMaybe$1; + poolType_not_in?: InputMaybe$1>; + poolType_not_starts_with?: InputMaybe$1; + poolType_not_starts_with_nocase?: InputMaybe$1; + poolType_starts_with?: InputMaybe$1; + poolType_starts_with_nocase?: InputMaybe$1; + priceRateProviders_?: InputMaybe$1; + principalToken?: InputMaybe$1; + principalToken_contains?: InputMaybe$1; + principalToken_gt?: InputMaybe$1; + principalToken_gte?: InputMaybe$1; + principalToken_in?: InputMaybe$1>; + principalToken_lt?: InputMaybe$1; + principalToken_lte?: InputMaybe$1; + principalToken_not?: InputMaybe$1; + principalToken_not_contains?: InputMaybe$1; + principalToken_not_in?: InputMaybe$1>; + protocolAumFeeCache?: InputMaybe$1; + protocolAumFeeCache_gt?: InputMaybe$1; + protocolAumFeeCache_gte?: InputMaybe$1; + protocolAumFeeCache_in?: InputMaybe$1>; + protocolAumFeeCache_lt?: InputMaybe$1; + protocolAumFeeCache_lte?: InputMaybe$1; + protocolAumFeeCache_not?: InputMaybe$1; + protocolAumFeeCache_not_in?: InputMaybe$1>; + protocolId?: InputMaybe$1; + protocolIdData?: InputMaybe$1; + protocolIdData_?: InputMaybe$1; + protocolIdData_contains?: InputMaybe$1; + protocolIdData_contains_nocase?: InputMaybe$1; + protocolIdData_ends_with?: InputMaybe$1; + protocolIdData_ends_with_nocase?: InputMaybe$1; + protocolIdData_gt?: InputMaybe$1; + protocolIdData_gte?: InputMaybe$1; + protocolIdData_in?: InputMaybe$1>; + protocolIdData_lt?: InputMaybe$1; + protocolIdData_lte?: InputMaybe$1; + protocolIdData_not?: InputMaybe$1; + protocolIdData_not_contains?: InputMaybe$1; + protocolIdData_not_contains_nocase?: InputMaybe$1; + protocolIdData_not_ends_with?: InputMaybe$1; + protocolIdData_not_ends_with_nocase?: InputMaybe$1; + protocolIdData_not_in?: InputMaybe$1>; + protocolIdData_not_starts_with?: InputMaybe$1; + protocolIdData_not_starts_with_nocase?: InputMaybe$1; + protocolIdData_starts_with?: InputMaybe$1; + protocolIdData_starts_with_nocase?: InputMaybe$1; + protocolId_gt?: InputMaybe$1; + protocolId_gte?: InputMaybe$1; + protocolId_in?: InputMaybe$1>; + protocolId_lt?: InputMaybe$1; + protocolId_lte?: InputMaybe$1; + protocolId_not?: InputMaybe$1; + protocolId_not_in?: InputMaybe$1>; + protocolSwapFeeCache?: InputMaybe$1; + protocolSwapFeeCache_gt?: InputMaybe$1; + protocolSwapFeeCache_gte?: InputMaybe$1; + protocolSwapFeeCache_in?: InputMaybe$1>; + protocolSwapFeeCache_lt?: InputMaybe$1; + protocolSwapFeeCache_lte?: InputMaybe$1; + protocolSwapFeeCache_not?: InputMaybe$1; + protocolSwapFeeCache_not_in?: InputMaybe$1>; + protocolYieldFeeCache?: InputMaybe$1; + protocolYieldFeeCache_gt?: InputMaybe$1; + protocolYieldFeeCache_gte?: InputMaybe$1; + protocolYieldFeeCache_in?: InputMaybe$1>; + protocolYieldFeeCache_lt?: InputMaybe$1; + protocolYieldFeeCache_lte?: InputMaybe$1; + protocolYieldFeeCache_not?: InputMaybe$1; + protocolYieldFeeCache_not_in?: InputMaybe$1>; + root3Alpha?: InputMaybe$1; + root3Alpha_gt?: InputMaybe$1; + root3Alpha_gte?: InputMaybe$1; + root3Alpha_in?: InputMaybe$1>; + root3Alpha_lt?: InputMaybe$1; + root3Alpha_lte?: InputMaybe$1; + root3Alpha_not?: InputMaybe$1; + root3Alpha_not_in?: InputMaybe$1>; + s?: InputMaybe$1; + s_gt?: InputMaybe$1; + s_gte?: InputMaybe$1; + s_in?: InputMaybe$1>; + s_lt?: InputMaybe$1; + s_lte?: InputMaybe$1; + s_not?: InputMaybe$1; + s_not_in?: InputMaybe$1>; + shares_?: InputMaybe$1; + snapshots_?: InputMaybe$1; + sqrtAlpha?: InputMaybe$1; + sqrtAlpha_gt?: InputMaybe$1; + sqrtAlpha_gte?: InputMaybe$1; + sqrtAlpha_in?: InputMaybe$1>; + sqrtAlpha_lt?: InputMaybe$1; + sqrtAlpha_lte?: InputMaybe$1; + sqrtAlpha_not?: InputMaybe$1; + sqrtAlpha_not_in?: InputMaybe$1>; + sqrtBeta?: InputMaybe$1; + sqrtBeta_gt?: InputMaybe$1; + sqrtBeta_gte?: InputMaybe$1; + sqrtBeta_in?: InputMaybe$1>; + sqrtBeta_lt?: InputMaybe$1; + sqrtBeta_lte?: InputMaybe$1; + sqrtBeta_not?: InputMaybe$1; + sqrtBeta_not_in?: InputMaybe$1>; + strategyType?: InputMaybe$1; + strategyType_gt?: InputMaybe$1; + strategyType_gte?: InputMaybe$1; + strategyType_in?: InputMaybe$1>; + strategyType_lt?: InputMaybe$1; + strategyType_lte?: InputMaybe$1; + strategyType_not?: InputMaybe$1; + strategyType_not_in?: InputMaybe$1>; + swapEnabled?: InputMaybe$1; + swapEnabledCurationSignal?: InputMaybe$1; + swapEnabledCurationSignal_in?: InputMaybe$1>; + swapEnabledCurationSignal_not?: InputMaybe$1; + swapEnabledCurationSignal_not_in?: InputMaybe$1>; + swapEnabledInternal?: InputMaybe$1; + swapEnabledInternal_in?: InputMaybe$1>; + swapEnabledInternal_not?: InputMaybe$1; + swapEnabledInternal_not_in?: InputMaybe$1>; + swapEnabled_in?: InputMaybe$1>; + swapEnabled_not?: InputMaybe$1; + swapEnabled_not_in?: InputMaybe$1>; + swapFee?: InputMaybe$1; + swapFee_gt?: InputMaybe$1; + swapFee_gte?: InputMaybe$1; + swapFee_in?: InputMaybe$1>; + swapFee_lt?: InputMaybe$1; + swapFee_lte?: InputMaybe$1; + swapFee_not?: InputMaybe$1; + swapFee_not_in?: InputMaybe$1>; + swapsCount?: InputMaybe$1; + swapsCount_gt?: InputMaybe$1; + swapsCount_gte?: InputMaybe$1; + swapsCount_in?: InputMaybe$1>; + swapsCount_lt?: InputMaybe$1; + swapsCount_lte?: InputMaybe$1; + swapsCount_not?: InputMaybe$1; + swapsCount_not_in?: InputMaybe$1>; + swaps_?: InputMaybe$1; + symbol?: InputMaybe$1; + symbol_contains?: InputMaybe$1; + symbol_contains_nocase?: InputMaybe$1; + symbol_ends_with?: InputMaybe$1; + symbol_ends_with_nocase?: InputMaybe$1; + symbol_gt?: InputMaybe$1; + symbol_gte?: InputMaybe$1; + symbol_in?: InputMaybe$1>; + symbol_lt?: InputMaybe$1; + symbol_lte?: InputMaybe$1; + symbol_not?: InputMaybe$1; + symbol_not_contains?: InputMaybe$1; + symbol_not_contains_nocase?: InputMaybe$1; + symbol_not_ends_with?: InputMaybe$1; + symbol_not_ends_with_nocase?: InputMaybe$1; + symbol_not_in?: InputMaybe$1>; + symbol_not_starts_with?: InputMaybe$1; + symbol_not_starts_with_nocase?: InputMaybe$1; + symbol_starts_with?: InputMaybe$1; + symbol_starts_with_nocase?: InputMaybe$1; + tauAlphaX?: InputMaybe$1; + tauAlphaX_gt?: InputMaybe$1; + tauAlphaX_gte?: InputMaybe$1; + tauAlphaX_in?: InputMaybe$1>; + tauAlphaX_lt?: InputMaybe$1; + tauAlphaX_lte?: InputMaybe$1; + tauAlphaX_not?: InputMaybe$1; + tauAlphaX_not_in?: InputMaybe$1>; + tauAlphaY?: InputMaybe$1; + tauAlphaY_gt?: InputMaybe$1; + tauAlphaY_gte?: InputMaybe$1; + tauAlphaY_in?: InputMaybe$1>; + tauAlphaY_lt?: InputMaybe$1; + tauAlphaY_lte?: InputMaybe$1; + tauAlphaY_not?: InputMaybe$1; + tauAlphaY_not_in?: InputMaybe$1>; + tauBetaX?: InputMaybe$1; + tauBetaX_gt?: InputMaybe$1; + tauBetaX_gte?: InputMaybe$1; + tauBetaX_in?: InputMaybe$1>; + tauBetaX_lt?: InputMaybe$1; + tauBetaX_lte?: InputMaybe$1; + tauBetaX_not?: InputMaybe$1; + tauBetaX_not_in?: InputMaybe$1>; + tauBetaY?: InputMaybe$1; + tauBetaY_gt?: InputMaybe$1; + tauBetaY_gte?: InputMaybe$1; + tauBetaY_in?: InputMaybe$1>; + tauBetaY_lt?: InputMaybe$1; + tauBetaY_lte?: InputMaybe$1; + tauBetaY_not?: InputMaybe$1; + tauBetaY_not_in?: InputMaybe$1>; + tokensList?: InputMaybe$1>; + tokensList_contains?: InputMaybe$1>; + tokensList_contains_nocase?: InputMaybe$1>; + tokensList_not?: InputMaybe$1>; + tokensList_not_contains?: InputMaybe$1>; + tokensList_not_contains_nocase?: InputMaybe$1>; + tokens_?: InputMaybe$1; + totalAumFeeCollectedInBPT?: InputMaybe$1; + totalAumFeeCollectedInBPT_gt?: InputMaybe$1; + totalAumFeeCollectedInBPT_gte?: InputMaybe$1; + totalAumFeeCollectedInBPT_in?: InputMaybe$1>; + totalAumFeeCollectedInBPT_lt?: InputMaybe$1; + totalAumFeeCollectedInBPT_lte?: InputMaybe$1; + totalAumFeeCollectedInBPT_not?: InputMaybe$1; + totalAumFeeCollectedInBPT_not_in?: InputMaybe$1>; + totalLiquidity?: InputMaybe$1; + totalLiquiditySansBPT?: InputMaybe$1; + totalLiquiditySansBPT_gt?: InputMaybe$1; + totalLiquiditySansBPT_gte?: InputMaybe$1; + totalLiquiditySansBPT_in?: InputMaybe$1>; + totalLiquiditySansBPT_lt?: InputMaybe$1; + totalLiquiditySansBPT_lte?: InputMaybe$1; + totalLiquiditySansBPT_not?: InputMaybe$1; + totalLiquiditySansBPT_not_in?: InputMaybe$1>; + totalLiquidity_gt?: InputMaybe$1; + totalLiquidity_gte?: InputMaybe$1; + totalLiquidity_in?: InputMaybe$1>; + totalLiquidity_lt?: InputMaybe$1; + totalLiquidity_lte?: InputMaybe$1; + totalLiquidity_not?: InputMaybe$1; + totalLiquidity_not_in?: InputMaybe$1>; + totalProtocolFee?: InputMaybe$1; + totalProtocolFeePaidInBPT?: InputMaybe$1; + totalProtocolFeePaidInBPT_gt?: InputMaybe$1; + totalProtocolFeePaidInBPT_gte?: InputMaybe$1; + totalProtocolFeePaidInBPT_in?: InputMaybe$1>; + totalProtocolFeePaidInBPT_lt?: InputMaybe$1; + totalProtocolFeePaidInBPT_lte?: InputMaybe$1; + totalProtocolFeePaidInBPT_not?: InputMaybe$1; + totalProtocolFeePaidInBPT_not_in?: InputMaybe$1>; + totalProtocolFee_gt?: InputMaybe$1; + totalProtocolFee_gte?: InputMaybe$1; + totalProtocolFee_in?: InputMaybe$1>; + totalProtocolFee_lt?: InputMaybe$1; + totalProtocolFee_lte?: InputMaybe$1; + totalProtocolFee_not?: InputMaybe$1; + totalProtocolFee_not_in?: InputMaybe$1>; + totalShares?: InputMaybe$1; + totalShares_gt?: InputMaybe$1; + totalShares_gte?: InputMaybe$1; + totalShares_in?: InputMaybe$1>; + totalShares_lt?: InputMaybe$1; + totalShares_lte?: InputMaybe$1; + totalShares_not?: InputMaybe$1; + totalShares_not_in?: InputMaybe$1>; + totalSwapFee?: InputMaybe$1; + totalSwapFee_gt?: InputMaybe$1; + totalSwapFee_gte?: InputMaybe$1; + totalSwapFee_in?: InputMaybe$1>; + totalSwapFee_lt?: InputMaybe$1; + totalSwapFee_lte?: InputMaybe$1; + totalSwapFee_not?: InputMaybe$1; + totalSwapFee_not_in?: InputMaybe$1>; + totalSwapVolume?: InputMaybe$1; + totalSwapVolume_gt?: InputMaybe$1; + totalSwapVolume_gte?: InputMaybe$1; + totalSwapVolume_in?: InputMaybe$1>; + totalSwapVolume_lt?: InputMaybe$1; + totalSwapVolume_lte?: InputMaybe$1; + totalSwapVolume_not?: InputMaybe$1; + totalSwapVolume_not_in?: InputMaybe$1>; + totalWeight?: InputMaybe$1; + totalWeight_gt?: InputMaybe$1; + totalWeight_gte?: InputMaybe$1; + totalWeight_in?: InputMaybe$1>; + totalWeight_lt?: InputMaybe$1; + totalWeight_lte?: InputMaybe$1; + totalWeight_not?: InputMaybe$1; + totalWeight_not_in?: InputMaybe$1>; + tx?: InputMaybe$1; + tx_contains?: InputMaybe$1; + tx_gt?: InputMaybe$1; + tx_gte?: InputMaybe$1; + tx_in?: InputMaybe$1>; + tx_lt?: InputMaybe$1; + tx_lte?: InputMaybe$1; + tx_not?: InputMaybe$1; + tx_not_contains?: InputMaybe$1; + tx_not_in?: InputMaybe$1>; + u?: InputMaybe$1; + u_gt?: InputMaybe$1; + u_gte?: InputMaybe$1; + u_in?: InputMaybe$1>; + u_lt?: InputMaybe$1; + u_lte?: InputMaybe$1; + u_not?: InputMaybe$1; + u_not_in?: InputMaybe$1>; + unitSeconds?: InputMaybe$1; + unitSeconds_gt?: InputMaybe$1; + unitSeconds_gte?: InputMaybe$1; + unitSeconds_in?: InputMaybe$1>; + unitSeconds_lt?: InputMaybe$1; + unitSeconds_lte?: InputMaybe$1; + unitSeconds_not?: InputMaybe$1; + unitSeconds_not_in?: InputMaybe$1>; + upperTarget?: InputMaybe$1; + upperTarget_gt?: InputMaybe$1; + upperTarget_gte?: InputMaybe$1; + upperTarget_in?: InputMaybe$1>; + upperTarget_lt?: InputMaybe$1; + upperTarget_lte?: InputMaybe$1; + upperTarget_not?: InputMaybe$1; + upperTarget_not_in?: InputMaybe$1>; + v?: InputMaybe$1; + v_gt?: InputMaybe$1; + v_gte?: InputMaybe$1; + v_in?: InputMaybe$1>; + v_lt?: InputMaybe$1; + v_lte?: InputMaybe$1; + v_not?: InputMaybe$1; + v_not_in?: InputMaybe$1>; + vaultID?: InputMaybe$1; + vaultID_?: InputMaybe$1; + vaultID_contains?: InputMaybe$1; + vaultID_contains_nocase?: InputMaybe$1; + vaultID_ends_with?: InputMaybe$1; + vaultID_ends_with_nocase?: InputMaybe$1; + vaultID_gt?: InputMaybe$1; + vaultID_gte?: InputMaybe$1; + vaultID_in?: InputMaybe$1>; + vaultID_lt?: InputMaybe$1; + vaultID_lte?: InputMaybe$1; + vaultID_not?: InputMaybe$1; + vaultID_not_contains?: InputMaybe$1; + vaultID_not_contains_nocase?: InputMaybe$1; + vaultID_not_ends_with?: InputMaybe$1; + vaultID_not_ends_with_nocase?: InputMaybe$1; + vaultID_not_in?: InputMaybe$1>; + vaultID_not_starts_with?: InputMaybe$1; + vaultID_not_starts_with_nocase?: InputMaybe$1; + vaultID_starts_with?: InputMaybe$1; + vaultID_starts_with_nocase?: InputMaybe$1; + w?: InputMaybe$1; + w_gt?: InputMaybe$1; + w_gte?: InputMaybe$1; + w_in?: InputMaybe$1>; + w_lt?: InputMaybe$1; + w_lte?: InputMaybe$1; + w_not?: InputMaybe$1; + w_not_in?: InputMaybe$1>; + weightUpdates_?: InputMaybe$1; + wrappedIndex?: InputMaybe$1; + wrappedIndex_gt?: InputMaybe$1; + wrappedIndex_gte?: InputMaybe$1; + wrappedIndex_in?: InputMaybe$1>; + wrappedIndex_lt?: InputMaybe$1; + wrappedIndex_lte?: InputMaybe$1; + wrappedIndex_not?: InputMaybe$1; + wrappedIndex_not_in?: InputMaybe$1>; + z?: InputMaybe$1; + z_gt?: InputMaybe$1; + z_gte?: InputMaybe$1; + z_in?: InputMaybe$1>; + z_lt?: InputMaybe$1; + z_lte?: InputMaybe$1; + z_not?: InputMaybe$1; + z_not_in?: InputMaybe$1>; +}; +declare enum Pool_OrderBy$1 { + Address = "address", + Alpha = "alpha", + Amp = "amp", + AmpUpdates = "ampUpdates", + BaseToken = "baseToken", + Beta = "beta", + C = "c", + CircuitBreakers = "circuitBreakers", + CreateTime = "createTime", + DSq = "dSq", + Delta = "delta", + Epsilon = "epsilon", + ExpiryTime = "expiryTime", + Factory = "factory", + HistoricalValues = "historicalValues", + HoldersCount = "holdersCount", + Id = "id", + IsInRecoveryMode = "isInRecoveryMode", + IsPaused = "isPaused", + JoinExitEnabled = "joinExitEnabled", + Lambda = "lambda", + LastJoinExitAmp = "lastJoinExitAmp", + LastPostJoinExitInvariant = "lastPostJoinExitInvariant", + LatestAmpUpdate = "latestAmpUpdate", + LatestAmpUpdateEndAmp = "latestAmpUpdate__endAmp", + LatestAmpUpdateEndTimestamp = "latestAmpUpdate__endTimestamp", + LatestAmpUpdateId = "latestAmpUpdate__id", + LatestAmpUpdateScheduledTimestamp = "latestAmpUpdate__scheduledTimestamp", + LatestAmpUpdateStartAmp = "latestAmpUpdate__startAmp", + LatestAmpUpdateStartTimestamp = "latestAmpUpdate__startTimestamp", + LowerTarget = "lowerTarget", + MainIndex = "mainIndex", + ManagementAumFee = "managementAumFee", + ManagementFee = "managementFee", + MustAllowlistLPs = "mustAllowlistLPs", + Name = "name", + OracleEnabled = "oracleEnabled", + Owner = "owner", + PoolType = "poolType", + PoolTypeVersion = "poolTypeVersion", + PriceRateProviders = "priceRateProviders", + PrincipalToken = "principalToken", + ProtocolAumFeeCache = "protocolAumFeeCache", + ProtocolId = "protocolId", + ProtocolIdData = "protocolIdData", + ProtocolIdDataId = "protocolIdData__id", + ProtocolIdDataName = "protocolIdData__name", + ProtocolSwapFeeCache = "protocolSwapFeeCache", + ProtocolYieldFeeCache = "protocolYieldFeeCache", + Root3Alpha = "root3Alpha", + S = "s", + Shares = "shares", + Snapshots = "snapshots", + SqrtAlpha = "sqrtAlpha", + SqrtBeta = "sqrtBeta", + StrategyType = "strategyType", + SwapEnabled = "swapEnabled", + SwapEnabledCurationSignal = "swapEnabledCurationSignal", + SwapEnabledInternal = "swapEnabledInternal", + SwapFee = "swapFee", + Swaps = "swaps", + SwapsCount = "swapsCount", + Symbol = "symbol", + TauAlphaX = "tauAlphaX", + TauAlphaY = "tauAlphaY", + TauBetaX = "tauBetaX", + TauBetaY = "tauBetaY", + Tokens = "tokens", + TokensList = "tokensList", + TotalAumFeeCollectedInBpt = "totalAumFeeCollectedInBPT", + TotalLiquidity = "totalLiquidity", + TotalLiquiditySansBpt = "totalLiquiditySansBPT", + TotalProtocolFee = "totalProtocolFee", + TotalProtocolFeePaidInBpt = "totalProtocolFeePaidInBPT", + TotalShares = "totalShares", + TotalSwapFee = "totalSwapFee", + TotalSwapVolume = "totalSwapVolume", + TotalWeight = "totalWeight", + Tx = "tx", + U = "u", + UnitSeconds = "unitSeconds", + UpperTarget = "upperTarget", + V = "v", + VaultId = "vaultID", + VaultIdId = "vaultID__id", + VaultIdPoolCount = "vaultID__poolCount", + VaultIdProtocolFeesCollector = "vaultID__protocolFeesCollector", + VaultIdTotalLiquidity = "vaultID__totalLiquidity", + VaultIdTotalProtocolFee = "vaultID__totalProtocolFee", + VaultIdTotalSwapCount = "vaultID__totalSwapCount", + VaultIdTotalSwapFee = "vaultID__totalSwapFee", + VaultIdTotalSwapVolume = "vaultID__totalSwapVolume", + W = "w", + WeightUpdates = "weightUpdates", + WrappedIndex = "wrappedIndex", + Z = "z" +} +type PriceRateProvider_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + address?: InputMaybe$1; + address_contains?: InputMaybe$1; + address_gt?: InputMaybe$1; + address_gte?: InputMaybe$1; + address_in?: InputMaybe$1>; + address_lt?: InputMaybe$1; + address_lte?: InputMaybe$1; + address_not?: InputMaybe$1; + address_not_contains?: InputMaybe$1; + address_not_in?: InputMaybe$1>; + and?: InputMaybe$1>>; + cacheDuration?: InputMaybe$1; + cacheDuration_gt?: InputMaybe$1; + cacheDuration_gte?: InputMaybe$1; + cacheDuration_in?: InputMaybe$1>; + cacheDuration_lt?: InputMaybe$1; + cacheDuration_lte?: InputMaybe$1; + cacheDuration_not?: InputMaybe$1; + cacheDuration_not_in?: InputMaybe$1>; + cacheExpiry?: InputMaybe$1; + cacheExpiry_gt?: InputMaybe$1; + cacheExpiry_gte?: InputMaybe$1; + cacheExpiry_in?: InputMaybe$1>; + cacheExpiry_lt?: InputMaybe$1; + cacheExpiry_lte?: InputMaybe$1; + cacheExpiry_not?: InputMaybe$1; + cacheExpiry_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + lastCached?: InputMaybe$1; + lastCached_gt?: InputMaybe$1; + lastCached_gte?: InputMaybe$1; + lastCached_in?: InputMaybe$1>; + lastCached_lt?: InputMaybe$1; + lastCached_lte?: InputMaybe$1; + lastCached_not?: InputMaybe$1; + lastCached_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + poolId?: InputMaybe$1; + poolId_?: InputMaybe$1; + poolId_contains?: InputMaybe$1; + poolId_contains_nocase?: InputMaybe$1; + poolId_ends_with?: InputMaybe$1; + poolId_ends_with_nocase?: InputMaybe$1; + poolId_gt?: InputMaybe$1; + poolId_gte?: InputMaybe$1; + poolId_in?: InputMaybe$1>; + poolId_lt?: InputMaybe$1; + poolId_lte?: InputMaybe$1; + poolId_not?: InputMaybe$1; + poolId_not_contains?: InputMaybe$1; + poolId_not_contains_nocase?: InputMaybe$1; + poolId_not_ends_with?: InputMaybe$1; + poolId_not_ends_with_nocase?: InputMaybe$1; + poolId_not_in?: InputMaybe$1>; + poolId_not_starts_with?: InputMaybe$1; + poolId_not_starts_with_nocase?: InputMaybe$1; + poolId_starts_with?: InputMaybe$1; + poolId_starts_with_nocase?: InputMaybe$1; + rate?: InputMaybe$1; + rate_gt?: InputMaybe$1; + rate_gte?: InputMaybe$1; + rate_in?: InputMaybe$1>; + rate_lt?: InputMaybe$1; + rate_lte?: InputMaybe$1; + rate_not?: InputMaybe$1; + rate_not_in?: InputMaybe$1>; + token?: InputMaybe$1; + token_?: InputMaybe$1; + token_contains?: InputMaybe$1; + token_contains_nocase?: InputMaybe$1; + token_ends_with?: InputMaybe$1; + token_ends_with_nocase?: InputMaybe$1; + token_gt?: InputMaybe$1; + token_gte?: InputMaybe$1; + token_in?: InputMaybe$1>; + token_lt?: InputMaybe$1; + token_lte?: InputMaybe$1; + token_not?: InputMaybe$1; + token_not_contains?: InputMaybe$1; + token_not_contains_nocase?: InputMaybe$1; + token_not_ends_with?: InputMaybe$1; + token_not_ends_with_nocase?: InputMaybe$1; + token_not_in?: InputMaybe$1>; + token_not_starts_with?: InputMaybe$1; + token_not_starts_with_nocase?: InputMaybe$1; + token_starts_with?: InputMaybe$1; + token_starts_with_nocase?: InputMaybe$1; +}; +type ProtocolIdData_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + and?: InputMaybe$1>>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + name?: InputMaybe$1; + name_contains?: InputMaybe$1; + name_contains_nocase?: InputMaybe$1; + name_ends_with?: InputMaybe$1; + name_ends_with_nocase?: InputMaybe$1; + name_gt?: InputMaybe$1; + name_gte?: InputMaybe$1; + name_in?: InputMaybe$1>; + name_lt?: InputMaybe$1; + name_lte?: InputMaybe$1; + name_not?: InputMaybe$1; + name_not_contains?: InputMaybe$1; + name_not_contains_nocase?: InputMaybe$1; + name_not_ends_with?: InputMaybe$1; + name_not_ends_with_nocase?: InputMaybe$1; + name_not_in?: InputMaybe$1>; + name_not_starts_with?: InputMaybe$1; + name_not_starts_with_nocase?: InputMaybe$1; + name_starts_with?: InputMaybe$1; + name_starts_with_nocase?: InputMaybe$1; + or?: InputMaybe$1>>; +}; +type Swap_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + and?: InputMaybe$1>>; + caller?: InputMaybe$1; + caller_contains?: InputMaybe$1; + caller_gt?: InputMaybe$1; + caller_gte?: InputMaybe$1; + caller_in?: InputMaybe$1>; + caller_lt?: InputMaybe$1; + caller_lte?: InputMaybe$1; + caller_not?: InputMaybe$1; + caller_not_contains?: InputMaybe$1; + caller_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + poolId?: InputMaybe$1; + poolId_?: InputMaybe$1; + poolId_contains?: InputMaybe$1; + poolId_contains_nocase?: InputMaybe$1; + poolId_ends_with?: InputMaybe$1; + poolId_ends_with_nocase?: InputMaybe$1; + poolId_gt?: InputMaybe$1; + poolId_gte?: InputMaybe$1; + poolId_in?: InputMaybe$1>; + poolId_lt?: InputMaybe$1; + poolId_lte?: InputMaybe$1; + poolId_not?: InputMaybe$1; + poolId_not_contains?: InputMaybe$1; + poolId_not_contains_nocase?: InputMaybe$1; + poolId_not_ends_with?: InputMaybe$1; + poolId_not_ends_with_nocase?: InputMaybe$1; + poolId_not_in?: InputMaybe$1>; + poolId_not_starts_with?: InputMaybe$1; + poolId_not_starts_with_nocase?: InputMaybe$1; + poolId_starts_with?: InputMaybe$1; + poolId_starts_with_nocase?: InputMaybe$1; + timestamp?: InputMaybe$1; + timestamp_gt?: InputMaybe$1; + timestamp_gte?: InputMaybe$1; + timestamp_in?: InputMaybe$1>; + timestamp_lt?: InputMaybe$1; + timestamp_lte?: InputMaybe$1; + timestamp_not?: InputMaybe$1; + timestamp_not_in?: InputMaybe$1>; + tokenAmountIn?: InputMaybe$1; + tokenAmountIn_gt?: InputMaybe$1; + tokenAmountIn_gte?: InputMaybe$1; + tokenAmountIn_in?: InputMaybe$1>; + tokenAmountIn_lt?: InputMaybe$1; + tokenAmountIn_lte?: InputMaybe$1; + tokenAmountIn_not?: InputMaybe$1; + tokenAmountIn_not_in?: InputMaybe$1>; + tokenAmountOut?: InputMaybe$1; + tokenAmountOut_gt?: InputMaybe$1; + tokenAmountOut_gte?: InputMaybe$1; + tokenAmountOut_in?: InputMaybe$1>; + tokenAmountOut_lt?: InputMaybe$1; + tokenAmountOut_lte?: InputMaybe$1; + tokenAmountOut_not?: InputMaybe$1; + tokenAmountOut_not_in?: InputMaybe$1>; + tokenIn?: InputMaybe$1; + tokenInSym?: InputMaybe$1; + tokenInSym_contains?: InputMaybe$1; + tokenInSym_contains_nocase?: InputMaybe$1; + tokenInSym_ends_with?: InputMaybe$1; + tokenInSym_ends_with_nocase?: InputMaybe$1; + tokenInSym_gt?: InputMaybe$1; + tokenInSym_gte?: InputMaybe$1; + tokenInSym_in?: InputMaybe$1>; + tokenInSym_lt?: InputMaybe$1; + tokenInSym_lte?: InputMaybe$1; + tokenInSym_not?: InputMaybe$1; + tokenInSym_not_contains?: InputMaybe$1; + tokenInSym_not_contains_nocase?: InputMaybe$1; + tokenInSym_not_ends_with?: InputMaybe$1; + tokenInSym_not_ends_with_nocase?: InputMaybe$1; + tokenInSym_not_in?: InputMaybe$1>; + tokenInSym_not_starts_with?: InputMaybe$1; + tokenInSym_not_starts_with_nocase?: InputMaybe$1; + tokenInSym_starts_with?: InputMaybe$1; + tokenInSym_starts_with_nocase?: InputMaybe$1; + tokenIn_contains?: InputMaybe$1; + tokenIn_gt?: InputMaybe$1; + tokenIn_gte?: InputMaybe$1; + tokenIn_in?: InputMaybe$1>; + tokenIn_lt?: InputMaybe$1; + tokenIn_lte?: InputMaybe$1; + tokenIn_not?: InputMaybe$1; + tokenIn_not_contains?: InputMaybe$1; + tokenIn_not_in?: InputMaybe$1>; + tokenOut?: InputMaybe$1; + tokenOutSym?: InputMaybe$1; + tokenOutSym_contains?: InputMaybe$1; + tokenOutSym_contains_nocase?: InputMaybe$1; + tokenOutSym_ends_with?: InputMaybe$1; + tokenOutSym_ends_with_nocase?: InputMaybe$1; + tokenOutSym_gt?: InputMaybe$1; + tokenOutSym_gte?: InputMaybe$1; + tokenOutSym_in?: InputMaybe$1>; + tokenOutSym_lt?: InputMaybe$1; + tokenOutSym_lte?: InputMaybe$1; + tokenOutSym_not?: InputMaybe$1; + tokenOutSym_not_contains?: InputMaybe$1; + tokenOutSym_not_contains_nocase?: InputMaybe$1; + tokenOutSym_not_ends_with?: InputMaybe$1; + tokenOutSym_not_ends_with_nocase?: InputMaybe$1; + tokenOutSym_not_in?: InputMaybe$1>; + tokenOutSym_not_starts_with?: InputMaybe$1; + tokenOutSym_not_starts_with_nocase?: InputMaybe$1; + tokenOutSym_starts_with?: InputMaybe$1; + tokenOutSym_starts_with_nocase?: InputMaybe$1; + tokenOut_contains?: InputMaybe$1; + tokenOut_gt?: InputMaybe$1; + tokenOut_gte?: InputMaybe$1; + tokenOut_in?: InputMaybe$1>; + tokenOut_lt?: InputMaybe$1; + tokenOut_lte?: InputMaybe$1; + tokenOut_not?: InputMaybe$1; + tokenOut_not_contains?: InputMaybe$1; + tokenOut_not_in?: InputMaybe$1>; + tx?: InputMaybe$1; + tx_contains?: InputMaybe$1; + tx_gt?: InputMaybe$1; + tx_gte?: InputMaybe$1; + tx_in?: InputMaybe$1>; + tx_lt?: InputMaybe$1; + tx_lte?: InputMaybe$1; + tx_not?: InputMaybe$1; + tx_not_contains?: InputMaybe$1; + tx_not_in?: InputMaybe$1>; + userAddress?: InputMaybe$1; + userAddress_?: InputMaybe$1; + userAddress_contains?: InputMaybe$1; + userAddress_contains_nocase?: InputMaybe$1; + userAddress_ends_with?: InputMaybe$1; + userAddress_ends_with_nocase?: InputMaybe$1; + userAddress_gt?: InputMaybe$1; + userAddress_gte?: InputMaybe$1; + userAddress_in?: InputMaybe$1>; + userAddress_lt?: InputMaybe$1; + userAddress_lte?: InputMaybe$1; + userAddress_not?: InputMaybe$1; + userAddress_not_contains?: InputMaybe$1; + userAddress_not_contains_nocase?: InputMaybe$1; + userAddress_not_ends_with?: InputMaybe$1; + userAddress_not_ends_with_nocase?: InputMaybe$1; + userAddress_not_in?: InputMaybe$1>; + userAddress_not_starts_with?: InputMaybe$1; + userAddress_not_starts_with_nocase?: InputMaybe$1; + userAddress_starts_with?: InputMaybe$1; + userAddress_starts_with_nocase?: InputMaybe$1; + valueUSD?: InputMaybe$1; + valueUSD_gt?: InputMaybe$1; + valueUSD_gte?: InputMaybe$1; + valueUSD_in?: InputMaybe$1>; + valueUSD_lt?: InputMaybe$1; + valueUSD_lte?: InputMaybe$1; + valueUSD_not?: InputMaybe$1; + valueUSD_not_in?: InputMaybe$1>; +}; +type TokenPrice_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + amount?: InputMaybe$1; + amount_gt?: InputMaybe$1; + amount_gte?: InputMaybe$1; + amount_in?: InputMaybe$1>; + amount_lt?: InputMaybe$1; + amount_lte?: InputMaybe$1; + amount_not?: InputMaybe$1; + amount_not_in?: InputMaybe$1>; + and?: InputMaybe$1>>; + asset?: InputMaybe$1; + asset_contains?: InputMaybe$1; + asset_gt?: InputMaybe$1; + asset_gte?: InputMaybe$1; + asset_in?: InputMaybe$1>; + asset_lt?: InputMaybe$1; + asset_lte?: InputMaybe$1; + asset_not?: InputMaybe$1; + asset_not_contains?: InputMaybe$1; + asset_not_in?: InputMaybe$1>; + block?: InputMaybe$1; + block_gt?: InputMaybe$1; + block_gte?: InputMaybe$1; + block_in?: InputMaybe$1>; + block_lt?: InputMaybe$1; + block_lte?: InputMaybe$1; + block_not?: InputMaybe$1; + block_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + poolId?: InputMaybe$1; + poolId_?: InputMaybe$1; + poolId_contains?: InputMaybe$1; + poolId_contains_nocase?: InputMaybe$1; + poolId_ends_with?: InputMaybe$1; + poolId_ends_with_nocase?: InputMaybe$1; + poolId_gt?: InputMaybe$1; + poolId_gte?: InputMaybe$1; + poolId_in?: InputMaybe$1>; + poolId_lt?: InputMaybe$1; + poolId_lte?: InputMaybe$1; + poolId_not?: InputMaybe$1; + poolId_not_contains?: InputMaybe$1; + poolId_not_contains_nocase?: InputMaybe$1; + poolId_not_ends_with?: InputMaybe$1; + poolId_not_ends_with_nocase?: InputMaybe$1; + poolId_not_in?: InputMaybe$1>; + poolId_not_starts_with?: InputMaybe$1; + poolId_not_starts_with_nocase?: InputMaybe$1; + poolId_starts_with?: InputMaybe$1; + poolId_starts_with_nocase?: InputMaybe$1; + price?: InputMaybe$1; + price_gt?: InputMaybe$1; + price_gte?: InputMaybe$1; + price_in?: InputMaybe$1>; + price_lt?: InputMaybe$1; + price_lte?: InputMaybe$1; + price_not?: InputMaybe$1; + price_not_in?: InputMaybe$1>; + pricingAsset?: InputMaybe$1; + pricingAsset_contains?: InputMaybe$1; + pricingAsset_gt?: InputMaybe$1; + pricingAsset_gte?: InputMaybe$1; + pricingAsset_in?: InputMaybe$1>; + pricingAsset_lt?: InputMaybe$1; + pricingAsset_lte?: InputMaybe$1; + pricingAsset_not?: InputMaybe$1; + pricingAsset_not_contains?: InputMaybe$1; + pricingAsset_not_in?: InputMaybe$1>; + timestamp?: InputMaybe$1; + timestamp_gt?: InputMaybe$1; + timestamp_gte?: InputMaybe$1; + timestamp_in?: InputMaybe$1>; + timestamp_lt?: InputMaybe$1; + timestamp_lte?: InputMaybe$1; + timestamp_not?: InputMaybe$1; + timestamp_not_in?: InputMaybe$1>; +}; +declare enum TokenPrice_OrderBy { + Amount = "amount", + Asset = "asset", + Block = "block", + Id = "id", + PoolId = "poolId", + PoolIdAddress = "poolId__address", + PoolIdAlpha = "poolId__alpha", + PoolIdAmp = "poolId__amp", + PoolIdBaseToken = "poolId__baseToken", + PoolIdBeta = "poolId__beta", + PoolIdC = "poolId__c", + PoolIdCreateTime = "poolId__createTime", + PoolIdDSq = "poolId__dSq", + PoolIdDelta = "poolId__delta", + PoolIdEpsilon = "poolId__epsilon", + PoolIdExpiryTime = "poolId__expiryTime", + PoolIdFactory = "poolId__factory", + PoolIdHoldersCount = "poolId__holdersCount", + PoolIdId = "poolId__id", + PoolIdIsInRecoveryMode = "poolId__isInRecoveryMode", + PoolIdIsPaused = "poolId__isPaused", + PoolIdJoinExitEnabled = "poolId__joinExitEnabled", + PoolIdLambda = "poolId__lambda", + PoolIdLastJoinExitAmp = "poolId__lastJoinExitAmp", + PoolIdLastPostJoinExitInvariant = "poolId__lastPostJoinExitInvariant", + PoolIdLowerTarget = "poolId__lowerTarget", + PoolIdMainIndex = "poolId__mainIndex", + PoolIdManagementAumFee = "poolId__managementAumFee", + PoolIdManagementFee = "poolId__managementFee", + PoolIdMustAllowlistLPs = "poolId__mustAllowlistLPs", + PoolIdName = "poolId__name", + PoolIdOracleEnabled = "poolId__oracleEnabled", + PoolIdOwner = "poolId__owner", + PoolIdPoolType = "poolId__poolType", + PoolIdPoolTypeVersion = "poolId__poolTypeVersion", + PoolIdPrincipalToken = "poolId__principalToken", + PoolIdProtocolAumFeeCache = "poolId__protocolAumFeeCache", + PoolIdProtocolId = "poolId__protocolId", + PoolIdProtocolSwapFeeCache = "poolId__protocolSwapFeeCache", + PoolIdProtocolYieldFeeCache = "poolId__protocolYieldFeeCache", + PoolIdRoot3Alpha = "poolId__root3Alpha", + PoolIdS = "poolId__s", + PoolIdSqrtAlpha = "poolId__sqrtAlpha", + PoolIdSqrtBeta = "poolId__sqrtBeta", + PoolIdStrategyType = "poolId__strategyType", + PoolIdSwapEnabled = "poolId__swapEnabled", + PoolIdSwapEnabledCurationSignal = "poolId__swapEnabledCurationSignal", + PoolIdSwapEnabledInternal = "poolId__swapEnabledInternal", + PoolIdSwapFee = "poolId__swapFee", + PoolIdSwapsCount = "poolId__swapsCount", + PoolIdSymbol = "poolId__symbol", + PoolIdTauAlphaX = "poolId__tauAlphaX", + PoolIdTauAlphaY = "poolId__tauAlphaY", + PoolIdTauBetaX = "poolId__tauBetaX", + PoolIdTauBetaY = "poolId__tauBetaY", + PoolIdTotalAumFeeCollectedInBpt = "poolId__totalAumFeeCollectedInBPT", + PoolIdTotalLiquidity = "poolId__totalLiquidity", + PoolIdTotalLiquiditySansBpt = "poolId__totalLiquiditySansBPT", + PoolIdTotalProtocolFee = "poolId__totalProtocolFee", + PoolIdTotalProtocolFeePaidInBpt = "poolId__totalProtocolFeePaidInBPT", + PoolIdTotalShares = "poolId__totalShares", + PoolIdTotalSwapFee = "poolId__totalSwapFee", + PoolIdTotalSwapVolume = "poolId__totalSwapVolume", + PoolIdTotalWeight = "poolId__totalWeight", + PoolIdTx = "poolId__tx", + PoolIdU = "poolId__u", + PoolIdUnitSeconds = "poolId__unitSeconds", + PoolIdUpperTarget = "poolId__upperTarget", + PoolIdV = "poolId__v", + PoolIdW = "poolId__w", + PoolIdWrappedIndex = "poolId__wrappedIndex", + PoolIdZ = "poolId__z", + Price = "price", + PricingAsset = "pricingAsset", + Timestamp = "timestamp" +} +type Token_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + address?: InputMaybe$1; + address_contains?: InputMaybe$1; + address_contains_nocase?: InputMaybe$1; + address_ends_with?: InputMaybe$1; + address_ends_with_nocase?: InputMaybe$1; + address_gt?: InputMaybe$1; + address_gte?: InputMaybe$1; + address_in?: InputMaybe$1>; + address_lt?: InputMaybe$1; + address_lte?: InputMaybe$1; + address_not?: InputMaybe$1; + address_not_contains?: InputMaybe$1; + address_not_contains_nocase?: InputMaybe$1; + address_not_ends_with?: InputMaybe$1; + address_not_ends_with_nocase?: InputMaybe$1; + address_not_in?: InputMaybe$1>; + address_not_starts_with?: InputMaybe$1; + address_not_starts_with_nocase?: InputMaybe$1; + address_starts_with?: InputMaybe$1; + address_starts_with_nocase?: InputMaybe$1; + and?: InputMaybe$1>>; + decimals?: InputMaybe$1; + decimals_gt?: InputMaybe$1; + decimals_gte?: InputMaybe$1; + decimals_in?: InputMaybe$1>; + decimals_lt?: InputMaybe$1; + decimals_lte?: InputMaybe$1; + decimals_not?: InputMaybe$1; + decimals_not_in?: InputMaybe$1>; + fxOracleDecimals?: InputMaybe$1; + fxOracleDecimals_gt?: InputMaybe$1; + fxOracleDecimals_gte?: InputMaybe$1; + fxOracleDecimals_in?: InputMaybe$1>; + fxOracleDecimals_lt?: InputMaybe$1; + fxOracleDecimals_lte?: InputMaybe$1; + fxOracleDecimals_not?: InputMaybe$1; + fxOracleDecimals_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + latestFXPrice?: InputMaybe$1; + latestFXPrice_gt?: InputMaybe$1; + latestFXPrice_gte?: InputMaybe$1; + latestFXPrice_in?: InputMaybe$1>; + latestFXPrice_lt?: InputMaybe$1; + latestFXPrice_lte?: InputMaybe$1; + latestFXPrice_not?: InputMaybe$1; + latestFXPrice_not_in?: InputMaybe$1>; + latestPrice?: InputMaybe$1; + latestPrice_?: InputMaybe$1; + latestPrice_contains?: InputMaybe$1; + latestPrice_contains_nocase?: InputMaybe$1; + latestPrice_ends_with?: InputMaybe$1; + latestPrice_ends_with_nocase?: InputMaybe$1; + latestPrice_gt?: InputMaybe$1; + latestPrice_gte?: InputMaybe$1; + latestPrice_in?: InputMaybe$1>; + latestPrice_lt?: InputMaybe$1; + latestPrice_lte?: InputMaybe$1; + latestPrice_not?: InputMaybe$1; + latestPrice_not_contains?: InputMaybe$1; + latestPrice_not_contains_nocase?: InputMaybe$1; + latestPrice_not_ends_with?: InputMaybe$1; + latestPrice_not_ends_with_nocase?: InputMaybe$1; + latestPrice_not_in?: InputMaybe$1>; + latestPrice_not_starts_with?: InputMaybe$1; + latestPrice_not_starts_with_nocase?: InputMaybe$1; + latestPrice_starts_with?: InputMaybe$1; + latestPrice_starts_with_nocase?: InputMaybe$1; + latestUSDPrice?: InputMaybe$1; + latestUSDPriceTimestamp?: InputMaybe$1; + latestUSDPriceTimestamp_gt?: InputMaybe$1; + latestUSDPriceTimestamp_gte?: InputMaybe$1; + latestUSDPriceTimestamp_in?: InputMaybe$1>; + latestUSDPriceTimestamp_lt?: InputMaybe$1; + latestUSDPriceTimestamp_lte?: InputMaybe$1; + latestUSDPriceTimestamp_not?: InputMaybe$1; + latestUSDPriceTimestamp_not_in?: InputMaybe$1>; + latestUSDPrice_gt?: InputMaybe$1; + latestUSDPrice_gte?: InputMaybe$1; + latestUSDPrice_in?: InputMaybe$1>; + latestUSDPrice_lt?: InputMaybe$1; + latestUSDPrice_lte?: InputMaybe$1; + latestUSDPrice_not?: InputMaybe$1; + latestUSDPrice_not_in?: InputMaybe$1>; + name?: InputMaybe$1; + name_contains?: InputMaybe$1; + name_contains_nocase?: InputMaybe$1; + name_ends_with?: InputMaybe$1; + name_ends_with_nocase?: InputMaybe$1; + name_gt?: InputMaybe$1; + name_gte?: InputMaybe$1; + name_in?: InputMaybe$1>; + name_lt?: InputMaybe$1; + name_lte?: InputMaybe$1; + name_not?: InputMaybe$1; + name_not_contains?: InputMaybe$1; + name_not_contains_nocase?: InputMaybe$1; + name_not_ends_with?: InputMaybe$1; + name_not_ends_with_nocase?: InputMaybe$1; + name_not_in?: InputMaybe$1>; + name_not_starts_with?: InputMaybe$1; + name_not_starts_with_nocase?: InputMaybe$1; + name_starts_with?: InputMaybe$1; + name_starts_with_nocase?: InputMaybe$1; + or?: InputMaybe$1>>; + pool?: InputMaybe$1; + pool_?: InputMaybe$1; + pool_contains?: InputMaybe$1; + pool_contains_nocase?: InputMaybe$1; + pool_ends_with?: InputMaybe$1; + pool_ends_with_nocase?: InputMaybe$1; + pool_gt?: InputMaybe$1; + pool_gte?: InputMaybe$1; + pool_in?: InputMaybe$1>; + pool_lt?: InputMaybe$1; + pool_lte?: InputMaybe$1; + pool_not?: InputMaybe$1; + pool_not_contains?: InputMaybe$1; + pool_not_contains_nocase?: InputMaybe$1; + pool_not_ends_with?: InputMaybe$1; + pool_not_ends_with_nocase?: InputMaybe$1; + pool_not_in?: InputMaybe$1>; + pool_not_starts_with?: InputMaybe$1; + pool_not_starts_with_nocase?: InputMaybe$1; + pool_starts_with?: InputMaybe$1; + pool_starts_with_nocase?: InputMaybe$1; + symbol?: InputMaybe$1; + symbol_contains?: InputMaybe$1; + symbol_contains_nocase?: InputMaybe$1; + symbol_ends_with?: InputMaybe$1; + symbol_ends_with_nocase?: InputMaybe$1; + symbol_gt?: InputMaybe$1; + symbol_gte?: InputMaybe$1; + symbol_in?: InputMaybe$1>; + symbol_lt?: InputMaybe$1; + symbol_lte?: InputMaybe$1; + symbol_not?: InputMaybe$1; + symbol_not_contains?: InputMaybe$1; + symbol_not_contains_nocase?: InputMaybe$1; + symbol_not_ends_with?: InputMaybe$1; + symbol_not_ends_with_nocase?: InputMaybe$1; + symbol_not_in?: InputMaybe$1>; + symbol_not_starts_with?: InputMaybe$1; + symbol_not_starts_with_nocase?: InputMaybe$1; + symbol_starts_with?: InputMaybe$1; + symbol_starts_with_nocase?: InputMaybe$1; + totalBalanceNotional?: InputMaybe$1; + totalBalanceNotional_gt?: InputMaybe$1; + totalBalanceNotional_gte?: InputMaybe$1; + totalBalanceNotional_in?: InputMaybe$1>; + totalBalanceNotional_lt?: InputMaybe$1; + totalBalanceNotional_lte?: InputMaybe$1; + totalBalanceNotional_not?: InputMaybe$1; + totalBalanceNotional_not_in?: InputMaybe$1>; + totalBalanceUSD?: InputMaybe$1; + totalBalanceUSD_gt?: InputMaybe$1; + totalBalanceUSD_gte?: InputMaybe$1; + totalBalanceUSD_in?: InputMaybe$1>; + totalBalanceUSD_lt?: InputMaybe$1; + totalBalanceUSD_lte?: InputMaybe$1; + totalBalanceUSD_not?: InputMaybe$1; + totalBalanceUSD_not_in?: InputMaybe$1>; + totalSwapCount?: InputMaybe$1; + totalSwapCount_gt?: InputMaybe$1; + totalSwapCount_gte?: InputMaybe$1; + totalSwapCount_in?: InputMaybe$1>; + totalSwapCount_lt?: InputMaybe$1; + totalSwapCount_lte?: InputMaybe$1; + totalSwapCount_not?: InputMaybe$1; + totalSwapCount_not_in?: InputMaybe$1>; + totalVolumeNotional?: InputMaybe$1; + totalVolumeNotional_gt?: InputMaybe$1; + totalVolumeNotional_gte?: InputMaybe$1; + totalVolumeNotional_in?: InputMaybe$1>; + totalVolumeNotional_lt?: InputMaybe$1; + totalVolumeNotional_lte?: InputMaybe$1; + totalVolumeNotional_not?: InputMaybe$1; + totalVolumeNotional_not_in?: InputMaybe$1>; + totalVolumeUSD?: InputMaybe$1; + totalVolumeUSD_gt?: InputMaybe$1; + totalVolumeUSD_gte?: InputMaybe$1; + totalVolumeUSD_in?: InputMaybe$1>; + totalVolumeUSD_lt?: InputMaybe$1; + totalVolumeUSD_lte?: InputMaybe$1; + totalVolumeUSD_not?: InputMaybe$1; + totalVolumeUSD_not_in?: InputMaybe$1>; +}; +type UserInternalBalance_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + and?: InputMaybe$1>>; + balance?: InputMaybe$1; + balance_gt?: InputMaybe$1; + balance_gte?: InputMaybe$1; + balance_in?: InputMaybe$1>; + balance_lt?: InputMaybe$1; + balance_lte?: InputMaybe$1; + balance_not?: InputMaybe$1; + balance_not_in?: InputMaybe$1>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + token?: InputMaybe$1; + tokenInfo?: InputMaybe$1; + tokenInfo_?: InputMaybe$1; + tokenInfo_contains?: InputMaybe$1; + tokenInfo_contains_nocase?: InputMaybe$1; + tokenInfo_ends_with?: InputMaybe$1; + tokenInfo_ends_with_nocase?: InputMaybe$1; + tokenInfo_gt?: InputMaybe$1; + tokenInfo_gte?: InputMaybe$1; + tokenInfo_in?: InputMaybe$1>; + tokenInfo_lt?: InputMaybe$1; + tokenInfo_lte?: InputMaybe$1; + tokenInfo_not?: InputMaybe$1; + tokenInfo_not_contains?: InputMaybe$1; + tokenInfo_not_contains_nocase?: InputMaybe$1; + tokenInfo_not_ends_with?: InputMaybe$1; + tokenInfo_not_ends_with_nocase?: InputMaybe$1; + tokenInfo_not_in?: InputMaybe$1>; + tokenInfo_not_starts_with?: InputMaybe$1; + tokenInfo_not_starts_with_nocase?: InputMaybe$1; + tokenInfo_starts_with?: InputMaybe$1; + tokenInfo_starts_with_nocase?: InputMaybe$1; + token_contains?: InputMaybe$1; + token_gt?: InputMaybe$1; + token_gte?: InputMaybe$1; + token_in?: InputMaybe$1>; + token_lt?: InputMaybe$1; + token_lte?: InputMaybe$1; + token_not?: InputMaybe$1; + token_not_contains?: InputMaybe$1; + token_not_in?: InputMaybe$1>; + userAddress?: InputMaybe$1; + userAddress_?: InputMaybe$1; + userAddress_contains?: InputMaybe$1; + userAddress_contains_nocase?: InputMaybe$1; + userAddress_ends_with?: InputMaybe$1; + userAddress_ends_with_nocase?: InputMaybe$1; + userAddress_gt?: InputMaybe$1; + userAddress_gte?: InputMaybe$1; + userAddress_in?: InputMaybe$1>; + userAddress_lt?: InputMaybe$1; + userAddress_lte?: InputMaybe$1; + userAddress_not?: InputMaybe$1; + userAddress_not_contains?: InputMaybe$1; + userAddress_not_contains_nocase?: InputMaybe$1; + userAddress_not_ends_with?: InputMaybe$1; + userAddress_not_ends_with_nocase?: InputMaybe$1; + userAddress_not_in?: InputMaybe$1>; + userAddress_not_starts_with?: InputMaybe$1; + userAddress_not_starts_with_nocase?: InputMaybe$1; + userAddress_starts_with?: InputMaybe$1; + userAddress_starts_with_nocase?: InputMaybe$1; +}; +type User_Filter$1 = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe$1; + and?: InputMaybe$1>>; + id?: InputMaybe$1; + id_gt?: InputMaybe$1; + id_gte?: InputMaybe$1; + id_in?: InputMaybe$1>; + id_lt?: InputMaybe$1; + id_lte?: InputMaybe$1; + id_not?: InputMaybe$1; + id_not_in?: InputMaybe$1>; + or?: InputMaybe$1>>; + sharesOwned_?: InputMaybe$1; + swaps_?: InputMaybe$1; + userInternalBalances_?: InputMaybe$1; +}; +declare enum User_OrderBy { + Id = "id", + SharesOwned = "sharesOwned", + Swaps = "swaps", + UserInternalBalances = "userInternalBalances" +} +type PoolShareQueryVariables = Exact$1<{ + id: Scalars$1['ID']; + block?: InputMaybe$1; +}>; +type PoolShareQuery = { + __typename?: 'Query'; + poolShare?: { + __typename?: 'PoolShare'; + id: string; + balance: string; + userAddress: { + __typename?: 'User'; + id: string; + }; + poolId: { + __typename?: 'Pool'; + id: string; + address: string; + }; + } | null; +}; +type PoolSharesQueryVariables = Exact$1<{ + first?: InputMaybe$1; + orderBy?: InputMaybe$1; + orderDirection?: InputMaybe$1; + skip?: InputMaybe$1; + where?: InputMaybe$1; + block?: InputMaybe$1; +}>; +type PoolSharesQuery = { + __typename?: 'Query'; + poolShares: Array<{ + __typename?: 'PoolShare'; + id: string; + balance: string; + userAddress: { + __typename?: 'User'; + id: string; + }; + poolId: { + __typename?: 'Pool'; + id: string; + address: string; + }; + }>; +}; +type SubgraphPoolShareFragment = { + __typename?: 'PoolShare'; + id: string; + balance: string; + userAddress: { + __typename?: 'User'; + id: string; + }; + poolId: { + __typename?: 'Pool'; + id: string; + address: string; + }; +}; +type PoolsQueryVariables$1 = Exact$1<{ + skip?: InputMaybe$1; + first?: InputMaybe$1; + orderBy?: InputMaybe$1; + orderDirection?: InputMaybe$1; + where?: InputMaybe$1; + block?: InputMaybe$1; +}>; +type PoolsQuery$1 = { + __typename?: 'Query'; + pools: Array<{ + __typename?: 'Pool'; + id: string; + address: string; + poolType?: string | null; + poolTypeVersion?: number | null; + factory?: string | null; + strategyType: number; + symbol?: string | null; + name?: string | null; + swapEnabled: boolean; + swapFee: string; + protocolYieldFeeCache?: string | null; + protocolSwapFeeCache?: string | null; + owner?: string | null; + totalWeight?: string | null; + totalSwapVolume: string; + totalSwapFee: string; + totalLiquidity: string; + totalShares: string; + swapsCount: string; + holdersCount: string; + tokensList: Array; + amp?: string | null; + expiryTime?: string | null; + unitSeconds?: string | null; + createTime: number; + principalToken?: string | null; + baseToken?: string | null; + wrappedIndex?: number | null; + mainIndex?: number | null; + lowerTarget?: string | null; + upperTarget?: string | null; + sqrtAlpha?: string | null; + sqrtBeta?: string | null; + root3Alpha?: string | null; + isInRecoveryMode?: boolean | null; + isPaused?: boolean | null; + alpha?: string | null; + beta?: string | null; + c?: string | null; + s?: string | null; + lambda?: string | null; + tauAlphaX?: string | null; + tauAlphaY?: string | null; + tauBetaX?: string | null; + tauBetaY?: string | null; + u?: string | null; + v?: string | null; + w?: string | null; + z?: string | null; + dSq?: string | null; + delta?: string | null; + epsilon?: string | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + id: string; + symbol: string; + name: string; + decimals: number; + address: string; + balance: string; + managedBalance: string; + weight?: string | null; + priceRate: string; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + latestFXPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + address: string; + balance: string; + weight?: string | null; + priceRate: string; + symbol: string; + decimals: number; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + address: string; + balance: string; + weight?: string | null; + priceRate: string; + symbol: string; + decimals: number; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + } | null; + }; + }> | null; + } | null; + }; + }> | null; + } | null; + }; + }> | null; + priceRateProviders?: Array<{ + __typename?: 'PriceRateProvider'; + address: string; + token: { + __typename?: 'PoolToken'; + address: string; + }; + }> | null; + }>; +}; +type AllPoolsQueryVariables = Exact$1<{ + skip?: InputMaybe$1; + first?: InputMaybe$1; + orderBy?: InputMaybe$1; + orderDirection?: InputMaybe$1; + where?: InputMaybe$1; + block?: InputMaybe$1; +}>; +type AllPoolsQuery = { + __typename?: 'Query'; + pool0: Array<{ + __typename?: 'Pool'; + id: string; + address: string; + poolType?: string | null; + poolTypeVersion?: number | null; + factory?: string | null; + strategyType: number; + symbol?: string | null; + name?: string | null; + swapEnabled: boolean; + swapFee: string; + protocolYieldFeeCache?: string | null; + protocolSwapFeeCache?: string | null; + owner?: string | null; + totalWeight?: string | null; + totalSwapVolume: string; + totalSwapFee: string; + totalLiquidity: string; + totalShares: string; + swapsCount: string; + holdersCount: string; + tokensList: Array; + amp?: string | null; + expiryTime?: string | null; + unitSeconds?: string | null; + createTime: number; + principalToken?: string | null; + baseToken?: string | null; + wrappedIndex?: number | null; + mainIndex?: number | null; + lowerTarget?: string | null; + upperTarget?: string | null; + sqrtAlpha?: string | null; + sqrtBeta?: string | null; + root3Alpha?: string | null; + isInRecoveryMode?: boolean | null; + isPaused?: boolean | null; + alpha?: string | null; + beta?: string | null; + c?: string | null; + s?: string | null; + lambda?: string | null; + tauAlphaX?: string | null; + tauAlphaY?: string | null; + tauBetaX?: string | null; + tauBetaY?: string | null; + u?: string | null; + v?: string | null; + w?: string | null; + z?: string | null; + dSq?: string | null; + delta?: string | null; + epsilon?: string | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + id: string; + symbol: string; + name: string; + decimals: number; + address: string; + balance: string; + managedBalance: string; + weight?: string | null; + priceRate: string; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + latestFXPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + address: string; + balance: string; + weight?: string | null; + priceRate: string; + symbol: string; + decimals: number; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + address: string; + balance: string; + weight?: string | null; + priceRate: string; + symbol: string; + decimals: number; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + } | null; + }; + }> | null; + } | null; + }; + }> | null; + } | null; + }; + }> | null; + priceRateProviders?: Array<{ + __typename?: 'PriceRateProvider'; + address: string; + token: { + __typename?: 'PoolToken'; + address: string; + }; + }> | null; + }>; + pool1000: Array<{ + __typename?: 'Pool'; + id: string; + address: string; + poolType?: string | null; + poolTypeVersion?: number | null; + factory?: string | null; + strategyType: number; + symbol?: string | null; + name?: string | null; + swapEnabled: boolean; + swapFee: string; + protocolYieldFeeCache?: string | null; + protocolSwapFeeCache?: string | null; + owner?: string | null; + totalWeight?: string | null; + totalSwapVolume: string; + totalSwapFee: string; + totalLiquidity: string; + totalShares: string; + swapsCount: string; + holdersCount: string; + tokensList: Array; + amp?: string | null; + expiryTime?: string | null; + unitSeconds?: string | null; + createTime: number; + principalToken?: string | null; + baseToken?: string | null; + wrappedIndex?: number | null; + mainIndex?: number | null; + lowerTarget?: string | null; + upperTarget?: string | null; + sqrtAlpha?: string | null; + sqrtBeta?: string | null; + root3Alpha?: string | null; + isInRecoveryMode?: boolean | null; + isPaused?: boolean | null; + alpha?: string | null; + beta?: string | null; + c?: string | null; + s?: string | null; + lambda?: string | null; + tauAlphaX?: string | null; + tauAlphaY?: string | null; + tauBetaX?: string | null; + tauBetaY?: string | null; + u?: string | null; + v?: string | null; + w?: string | null; + z?: string | null; + dSq?: string | null; + delta?: string | null; + epsilon?: string | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + id: string; + symbol: string; + name: string; + decimals: number; + address: string; + balance: string; + managedBalance: string; + weight?: string | null; + priceRate: string; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + latestFXPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + address: string; + balance: string; + weight?: string | null; + priceRate: string; + symbol: string; + decimals: number; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + address: string; + balance: string; + weight?: string | null; + priceRate: string; + symbol: string; + decimals: number; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + } | null; + }; + }> | null; + } | null; + }; + }> | null; + } | null; + }; + }> | null; + priceRateProviders?: Array<{ + __typename?: 'PriceRateProvider'; + address: string; + token: { + __typename?: 'PoolToken'; + address: string; + }; + }> | null; + }>; + pool2000: Array<{ + __typename?: 'Pool'; + id: string; + address: string; + poolType?: string | null; + poolTypeVersion?: number | null; + factory?: string | null; + strategyType: number; + symbol?: string | null; + name?: string | null; + swapEnabled: boolean; + swapFee: string; + protocolYieldFeeCache?: string | null; + protocolSwapFeeCache?: string | null; + owner?: string | null; + totalWeight?: string | null; + totalSwapVolume: string; + totalSwapFee: string; + totalLiquidity: string; + totalShares: string; + swapsCount: string; + holdersCount: string; + tokensList: Array; + amp?: string | null; + expiryTime?: string | null; + unitSeconds?: string | null; + createTime: number; + principalToken?: string | null; + baseToken?: string | null; + wrappedIndex?: number | null; + mainIndex?: number | null; + lowerTarget?: string | null; + upperTarget?: string | null; + sqrtAlpha?: string | null; + sqrtBeta?: string | null; + root3Alpha?: string | null; + isInRecoveryMode?: boolean | null; + isPaused?: boolean | null; + alpha?: string | null; + beta?: string | null; + c?: string | null; + s?: string | null; + lambda?: string | null; + tauAlphaX?: string | null; + tauAlphaY?: string | null; + tauBetaX?: string | null; + tauBetaY?: string | null; + u?: string | null; + v?: string | null; + w?: string | null; + z?: string | null; + dSq?: string | null; + delta?: string | null; + epsilon?: string | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + id: string; + symbol: string; + name: string; + decimals: number; + address: string; + balance: string; + managedBalance: string; + weight?: string | null; + priceRate: string; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + latestFXPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + address: string; + balance: string; + weight?: string | null; + priceRate: string; + symbol: string; + decimals: number; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + address: string; + balance: string; + weight?: string | null; + priceRate: string; + symbol: string; + decimals: number; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + } | null; + }; + }> | null; + } | null; + }; + }> | null; + } | null; + }; + }> | null; + priceRateProviders?: Array<{ + __typename?: 'PriceRateProvider'; + address: string; + token: { + __typename?: 'PoolToken'; + address: string; + }; + }> | null; + }>; +}; +type PoolQueryVariables = Exact$1<{ + id: Scalars$1['ID']; + block?: InputMaybe$1; +}>; +type PoolQuery = { + __typename?: 'Query'; + pool?: { + __typename?: 'Pool'; + id: string; + address: string; + poolType?: string | null; + poolTypeVersion?: number | null; + factory?: string | null; + strategyType: number; + symbol?: string | null; + name?: string | null; + swapEnabled: boolean; + swapFee: string; + protocolYieldFeeCache?: string | null; + protocolSwapFeeCache?: string | null; + owner?: string | null; + totalWeight?: string | null; + totalSwapVolume: string; + totalSwapFee: string; + totalLiquidity: string; + totalShares: string; + swapsCount: string; + holdersCount: string; + tokensList: Array; + amp?: string | null; + expiryTime?: string | null; + unitSeconds?: string | null; + createTime: number; + principalToken?: string | null; + baseToken?: string | null; + wrappedIndex?: number | null; + mainIndex?: number | null; + lowerTarget?: string | null; + upperTarget?: string | null; + sqrtAlpha?: string | null; + sqrtBeta?: string | null; + root3Alpha?: string | null; + isInRecoveryMode?: boolean | null; + isPaused?: boolean | null; + alpha?: string | null; + beta?: string | null; + c?: string | null; + s?: string | null; + lambda?: string | null; + tauAlphaX?: string | null; + tauAlphaY?: string | null; + tauBetaX?: string | null; + tauBetaY?: string | null; + u?: string | null; + v?: string | null; + w?: string | null; + z?: string | null; + dSq?: string | null; + delta?: string | null; + epsilon?: string | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + id: string; + symbol: string; + name: string; + decimals: number; + address: string; + balance: string; + managedBalance: string; + weight?: string | null; + priceRate: string; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + latestFXPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + address: string; + balance: string; + weight?: string | null; + priceRate: string; + symbol: string; + decimals: number; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + tokens?: Array<{ + __typename?: 'PoolToken'; + address: string; + balance: string; + weight?: string | null; + priceRate: string; + symbol: string; + decimals: number; + isExemptFromYieldProtocolFee?: boolean | null; + token: { + __typename?: 'Token'; + latestUSDPrice?: string | null; + pool?: { + __typename?: 'Pool'; + id: string; + totalShares: string; + address: string; + poolType?: string | null; + mainIndex?: number | null; + } | null; + }; + }> | null; + } | null; + }; + }> | null; + } | null; + }; + }> | null; + priceRateProviders?: Array<{ + __typename?: 'PriceRateProvider'; + address: string; + token: { + __typename?: 'PoolToken'; + address: string; + }; + }> | null; + } | null; +}; +type PoolHistoricalLiquiditiesQueryVariables = Exact$1<{ + skip?: InputMaybe$1; + first?: InputMaybe$1; + orderBy?: InputMaybe$1; + orderDirection?: InputMaybe$1; + where?: InputMaybe$1; + block?: InputMaybe$1; +}>; +type PoolHistoricalLiquiditiesQuery = { + __typename?: 'Query'; + poolHistoricalLiquidities: Array<{ + __typename?: 'PoolHistoricalLiquidity'; + id: string; + poolTotalShares: string; + poolLiquidity: string; + poolShareValue: string; + pricingAsset: string; + block: string; + poolId: { + __typename?: 'Pool'; + id: string; + }; + }>; +}; +type PoolSnapshotsQueryVariables = Exact$1<{ + skip?: InputMaybe$1; + first?: InputMaybe$1; + orderBy?: InputMaybe$1; + orderDirection?: InputMaybe$1; + where?: InputMaybe$1; + block?: InputMaybe$1; +}>; +type PoolSnapshotsQuery = { + __typename?: 'Query'; + poolSnapshots: Array<{ + __typename?: 'PoolSnapshot'; + id: string; + totalShares: string; + swapVolume: string; + swapFees: string; + timestamp: number; + pool: { + __typename?: 'Pool'; + id: string; + }; + }>; +}; +type JoinExitsQueryVariables = Exact$1<{ + skip?: InputMaybe$1; + first?: InputMaybe$1; + orderBy?: InputMaybe$1; + orderDirection?: InputMaybe$1; + where?: InputMaybe$1; + block?: InputMaybe$1; +}>; +type JoinExitsQuery = { + __typename?: 'Query'; + joinExits: Array<{ + __typename?: 'JoinExit'; + amounts: Array; + id: string; + sender: string; + timestamp: number; + tx: string; + type: InvestType; + user: { + __typename?: 'User'; + id: string; + }; + pool: { + __typename?: 'Pool'; + id: string; + tokensList: Array; + }; + }>; +}; +type SubgraphJoinExitFragment = { + __typename?: 'JoinExit'; + amounts: Array; + id: string; + sender: string; + timestamp: number; + tx: string; + type: InvestType; + user: { + __typename?: 'User'; + id: string; + }; + pool: { + __typename?: 'Pool'; + id: string; + tokensList: Array; + }; +}; +type BalancersQueryVariables = Exact$1<{ + skip?: InputMaybe$1; + first?: InputMaybe$1; + orderBy?: InputMaybe$1; + orderDirection?: InputMaybe$1; + where?: InputMaybe$1; + block?: InputMaybe$1; +}>; +type BalancersQuery = { + __typename?: 'Query'; + balancers: Array<{ + __typename?: 'Balancer'; + id: string; + totalLiquidity: string; + totalSwapVolume: string; + totalSwapFee: string; + totalSwapCount: string; + poolCount: number; + }>; +}; +type TokenPricesQueryVariables = Exact$1<{ + skip?: InputMaybe$1; + first?: InputMaybe$1; + orderBy?: InputMaybe$1; + orderDirection?: InputMaybe$1; + where?: InputMaybe$1; + block?: InputMaybe$1; +}>; +type TokenPricesQuery = { + __typename?: 'Query'; + tokenPrices: Array<{ + __typename?: 'TokenPrice'; + id: string; + asset: string; + amount: string; + pricingAsset: string; + price: string; + block: string; + timestamp: number; + poolId: { + __typename?: 'Pool'; + id: string; + }; + }>; +}; +type TokenLatestPricesQueryVariables = Exact$1<{ + skip?: InputMaybe$1; + first?: InputMaybe$1; + orderBy?: InputMaybe$1; + orderDirection?: InputMaybe$1; + where?: InputMaybe$1; + block?: InputMaybe$1; +}>; +type TokenLatestPricesQuery = { + __typename?: 'Query'; + latestPrices: Array<{ + __typename?: 'LatestPrice'; + id: string; + asset: string; + price: string; + pricingAsset: string; + poolId: { + __typename?: 'Pool'; + id: string; + }; + }>; +}; +type TokenLatestPriceQueryVariables = Exact$1<{ + id: Scalars$1['ID']; +}>; +type TokenLatestPriceQuery = { + __typename?: 'Query'; + latestPrice?: { + __typename?: 'LatestPrice'; + id: string; + asset: string; + price: string; + pricingAsset: string; + poolId: { + __typename?: 'Pool'; + id: string; + }; + } | null; +}; +type UserQueryVariables = Exact$1<{ + id: Scalars$1['ID']; + block?: InputMaybe$1; +}>; +type UserQuery = { + __typename?: 'Query'; + user?: { + __typename?: 'User'; + id: string; + sharesOwned?: Array<{ + __typename?: 'PoolShare'; + balance: string; + poolId: { + __typename?: 'Pool'; + id: string; + }; + }> | null; + } | null; +}; +type UsersQueryVariables = Exact$1<{ + skip?: InputMaybe$1; + first?: InputMaybe$1; + orderBy?: InputMaybe$1; + orderDirection?: InputMaybe$1; + where?: InputMaybe$1; + block?: InputMaybe$1; +}>; +type UsersQuery = { + __typename?: 'Query'; + users: Array<{ + __typename?: 'User'; + id: string; + sharesOwned?: Array<{ + __typename?: 'PoolShare'; + balance: string; + poolId: { + __typename?: 'Pool'; + id: string; + }; + }> | null; + }>; +}; +type SdkFunctionWrapper$1 = (action: (requestHeaders?: Record) => Promise, operationName: string, operationType?: string) => Promise; +declare function getSdk$1(client: GraphQLClient, withWrapper?: SdkFunctionWrapper$1): { + PoolShare(variables: PoolShareQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + PoolShares(variables?: PoolSharesQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + Pools(variables?: PoolsQueryVariables$1, requestHeaders?: Dom.RequestInit["headers"]): Promise; + AllPools(variables?: AllPoolsQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + Pool(variables: PoolQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + PoolHistoricalLiquidities(variables?: PoolHistoricalLiquiditiesQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + PoolSnapshots(variables?: PoolSnapshotsQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + JoinExits(variables?: JoinExitsQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + Balancers(variables?: BalancersQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + TokenPrices(variables?: TokenPricesQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + TokenLatestPrices(variables?: TokenLatestPricesQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + TokenLatestPrice(variables: TokenLatestPriceQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + User(variables: UserQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + Users(variables?: UsersQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; +}; +type Sdk$1 = ReturnType; + +type Maybe = T | null; +type InputMaybe = Maybe; +type Exact = { + [K in keyof T]: T[K]; +}; +/** All built-in and custom scalars, mapped to their actual values */ +type Scalars = { + ID: string; + String: string; + Boolean: boolean; + Int: number; + Float: number; + BigDecimal: string; + BigInt: string; + Bytes: string; + Int8: any; +}; +type BlockChangedFilter = { + number_gte: Scalars['Int']; +}; +type Block_Height = { + hash?: InputMaybe; + number?: InputMaybe; + number_gte?: InputMaybe; +}; +declare enum Chain { + Arbitrum = "Arbitrum", + Avalanche = "Avalanche", + Base = "Base", + Gnosis = "Gnosis", + Optimism = "Optimism", + Polygon = "Polygon", + PolygonZkEvm = "PolygonZkEvm" +} +type Gauge = { + __typename?: 'Gauge'; + /** Timestamp at which Balancer DAO added the gauge to GaugeController [seconds] */ + addedTimestamp: Scalars['Int']; + /** Address of the gauge */ + address: Scalars['Bytes']; + /** Equal to: - */ + id: Scalars['ID']; + /** Reference to LiquidityGauge */ + liquidityGauge?: Maybe; + /** Reference to RootGauge */ + rootGauge?: Maybe; + /** Type of the gauge */ + type: GaugeType; +}; +type GaugeFactory = { + __typename?: 'GaugeFactory'; + /** List of gauges created through the factory */ + gauges?: Maybe>; + /** Factory contract address */ + id: Scalars['ID']; + /** Number of gauges created through the factory */ + numGauges: Scalars['Int']; +}; +type GaugeFactory_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + gauges_?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + numGauges?: InputMaybe; + numGauges_gt?: InputMaybe; + numGauges_gte?: InputMaybe; + numGauges_in?: InputMaybe>; + numGauges_lt?: InputMaybe; + numGauges_lte?: InputMaybe; + numGauges_not?: InputMaybe; + numGauges_not_in?: InputMaybe>; + or?: InputMaybe>>; +}; +type GaugeShare$1 = { + __typename?: 'GaugeShare'; + /** User's balance of gauge deposit tokens */ + balance: Scalars['BigDecimal']; + /** Reference to LiquidityGauge entity */ + gauge: LiquidityGauge$1; + /** Equal to: - */ + id: Scalars['ID']; + /** Reference to User entity */ + user: User; +}; +type GaugeShare_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + balance?: InputMaybe; + balance_gt?: InputMaybe; + balance_gte?: InputMaybe; + balance_in?: InputMaybe>; + balance_lt?: InputMaybe; + balance_lte?: InputMaybe; + balance_not?: InputMaybe; + balance_not_in?: InputMaybe>; + gauge?: InputMaybe; + gauge_?: InputMaybe; + gauge_contains?: InputMaybe; + gauge_contains_nocase?: InputMaybe; + gauge_ends_with?: InputMaybe; + gauge_ends_with_nocase?: InputMaybe; + gauge_gt?: InputMaybe; + gauge_gte?: InputMaybe; + gauge_in?: InputMaybe>; + gauge_lt?: InputMaybe; + gauge_lte?: InputMaybe; + gauge_not?: InputMaybe; + gauge_not_contains?: InputMaybe; + gauge_not_contains_nocase?: InputMaybe; + gauge_not_ends_with?: InputMaybe; + gauge_not_ends_with_nocase?: InputMaybe; + gauge_not_in?: InputMaybe>; + gauge_not_starts_with?: InputMaybe; + gauge_not_starts_with_nocase?: InputMaybe; + gauge_starts_with?: InputMaybe; + gauge_starts_with_nocase?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + or?: InputMaybe>>; + user?: InputMaybe; + user_?: InputMaybe; + user_contains?: InputMaybe; + user_contains_nocase?: InputMaybe; + user_ends_with?: InputMaybe; + user_ends_with_nocase?: InputMaybe; + user_gt?: InputMaybe; + user_gte?: InputMaybe; + user_in?: InputMaybe>; + user_lt?: InputMaybe; + user_lte?: InputMaybe; + user_not?: InputMaybe; + user_not_contains?: InputMaybe; + user_not_contains_nocase?: InputMaybe; + user_not_ends_with?: InputMaybe; + user_not_ends_with_nocase?: InputMaybe; + user_not_in?: InputMaybe>; + user_not_starts_with?: InputMaybe; + user_not_starts_with_nocase?: InputMaybe; + user_starts_with?: InputMaybe; + user_starts_with_nocase?: InputMaybe; +}; +declare enum GaugeShare_OrderBy { + balance = "balance", + gauge = "gauge", + gauge__id = "gauge__id", + gauge__isKilled = "gauge__isKilled", + gauge__isPreferentialGauge = "gauge__isPreferentialGauge", + gauge__poolAddress = "gauge__poolAddress", + gauge__poolId = "gauge__poolId", + gauge__relativeWeightCap = "gauge__relativeWeightCap", + gauge__streamer = "gauge__streamer", + gauge__symbol = "gauge__symbol", + gauge__totalSupply = "gauge__totalSupply", + id = "id", + user = "user", + user__id = "user__id" +} +type GaugeType = { + __typename?: 'GaugeType'; + /** Type ID */ + id: Scalars['ID']; + /** Name of the type - empty string if call reverts */ + name: Scalars['String']; +}; +type GaugeType_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + name?: InputMaybe; + name_contains?: InputMaybe; + name_contains_nocase?: InputMaybe; + name_ends_with?: InputMaybe; + name_ends_with_nocase?: InputMaybe; + name_gt?: InputMaybe; + name_gte?: InputMaybe; + name_in?: InputMaybe>; + name_lt?: InputMaybe; + name_lte?: InputMaybe; + name_not?: InputMaybe; + name_not_contains?: InputMaybe; + name_not_contains_nocase?: InputMaybe; + name_not_ends_with?: InputMaybe; + name_not_ends_with_nocase?: InputMaybe; + name_not_in?: InputMaybe>; + name_not_starts_with?: InputMaybe; + name_not_starts_with_nocase?: InputMaybe; + name_starts_with?: InputMaybe; + name_starts_with_nocase?: InputMaybe; + or?: InputMaybe>>; +}; +type GaugeVote = { + __typename?: 'GaugeVote'; + /** Reference to Gauge entity */ + gauge: Gauge; + /** Equal to: - */ + id: Scalars['ID']; + /** Timestamp at which user voted [seconds] */ + timestamp?: Maybe; + /** Reference to User entity */ + user: User; + /** Weight of veBAL power user has used to vote */ + weight?: Maybe; +}; +type GaugeVote_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + gauge?: InputMaybe; + gauge_?: InputMaybe; + gauge_contains?: InputMaybe; + gauge_contains_nocase?: InputMaybe; + gauge_ends_with?: InputMaybe; + gauge_ends_with_nocase?: InputMaybe; + gauge_gt?: InputMaybe; + gauge_gte?: InputMaybe; + gauge_in?: InputMaybe>; + gauge_lt?: InputMaybe; + gauge_lte?: InputMaybe; + gauge_not?: InputMaybe; + gauge_not_contains?: InputMaybe; + gauge_not_contains_nocase?: InputMaybe; + gauge_not_ends_with?: InputMaybe; + gauge_not_ends_with_nocase?: InputMaybe; + gauge_not_in?: InputMaybe>; + gauge_not_starts_with?: InputMaybe; + gauge_not_starts_with_nocase?: InputMaybe; + gauge_starts_with?: InputMaybe; + gauge_starts_with_nocase?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + or?: InputMaybe>>; + timestamp?: InputMaybe; + timestamp_gt?: InputMaybe; + timestamp_gte?: InputMaybe; + timestamp_in?: InputMaybe>; + timestamp_lt?: InputMaybe; + timestamp_lte?: InputMaybe; + timestamp_not?: InputMaybe; + timestamp_not_in?: InputMaybe>; + user?: InputMaybe; + user_?: InputMaybe; + user_contains?: InputMaybe; + user_contains_nocase?: InputMaybe; + user_ends_with?: InputMaybe; + user_ends_with_nocase?: InputMaybe; + user_gt?: InputMaybe; + user_gte?: InputMaybe; + user_in?: InputMaybe>; + user_lt?: InputMaybe; + user_lte?: InputMaybe; + user_not?: InputMaybe; + user_not_contains?: InputMaybe; + user_not_contains_nocase?: InputMaybe; + user_not_ends_with?: InputMaybe; + user_not_ends_with_nocase?: InputMaybe; + user_not_in?: InputMaybe>; + user_not_starts_with?: InputMaybe; + user_not_starts_with_nocase?: InputMaybe; + user_starts_with?: InputMaybe; + user_starts_with_nocase?: InputMaybe; + weight?: InputMaybe; + weight_gt?: InputMaybe; + weight_gte?: InputMaybe; + weight_in?: InputMaybe>; + weight_lt?: InputMaybe; + weight_lte?: InputMaybe; + weight_not?: InputMaybe; + weight_not_in?: InputMaybe>; +}; +type Gauge_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + addedTimestamp?: InputMaybe; + addedTimestamp_gt?: InputMaybe; + addedTimestamp_gte?: InputMaybe; + addedTimestamp_in?: InputMaybe>; + addedTimestamp_lt?: InputMaybe; + addedTimestamp_lte?: InputMaybe; + addedTimestamp_not?: InputMaybe; + addedTimestamp_not_in?: InputMaybe>; + address?: InputMaybe; + address_contains?: InputMaybe; + address_gt?: InputMaybe; + address_gte?: InputMaybe; + address_in?: InputMaybe>; + address_lt?: InputMaybe; + address_lte?: InputMaybe; + address_not?: InputMaybe; + address_not_contains?: InputMaybe; + address_not_in?: InputMaybe>; + and?: InputMaybe>>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + liquidityGauge?: InputMaybe; + liquidityGauge_?: InputMaybe; + liquidityGauge_contains?: InputMaybe; + liquidityGauge_contains_nocase?: InputMaybe; + liquidityGauge_ends_with?: InputMaybe; + liquidityGauge_ends_with_nocase?: InputMaybe; + liquidityGauge_gt?: InputMaybe; + liquidityGauge_gte?: InputMaybe; + liquidityGauge_in?: InputMaybe>; + liquidityGauge_lt?: InputMaybe; + liquidityGauge_lte?: InputMaybe; + liquidityGauge_not?: InputMaybe; + liquidityGauge_not_contains?: InputMaybe; + liquidityGauge_not_contains_nocase?: InputMaybe; + liquidityGauge_not_ends_with?: InputMaybe; + liquidityGauge_not_ends_with_nocase?: InputMaybe; + liquidityGauge_not_in?: InputMaybe>; + liquidityGauge_not_starts_with?: InputMaybe; + liquidityGauge_not_starts_with_nocase?: InputMaybe; + liquidityGauge_starts_with?: InputMaybe; + liquidityGauge_starts_with_nocase?: InputMaybe; + or?: InputMaybe>>; + rootGauge?: InputMaybe; + rootGauge_?: InputMaybe; + rootGauge_contains?: InputMaybe; + rootGauge_contains_nocase?: InputMaybe; + rootGauge_ends_with?: InputMaybe; + rootGauge_ends_with_nocase?: InputMaybe; + rootGauge_gt?: InputMaybe; + rootGauge_gte?: InputMaybe; + rootGauge_in?: InputMaybe>; + rootGauge_lt?: InputMaybe; + rootGauge_lte?: InputMaybe; + rootGauge_not?: InputMaybe; + rootGauge_not_contains?: InputMaybe; + rootGauge_not_contains_nocase?: InputMaybe; + rootGauge_not_ends_with?: InputMaybe; + rootGauge_not_ends_with_nocase?: InputMaybe; + rootGauge_not_in?: InputMaybe>; + rootGauge_not_starts_with?: InputMaybe; + rootGauge_not_starts_with_nocase?: InputMaybe; + rootGauge_starts_with?: InputMaybe; + rootGauge_starts_with_nocase?: InputMaybe; + type?: InputMaybe; + type_?: InputMaybe; + type_contains?: InputMaybe; + type_contains_nocase?: InputMaybe; + type_ends_with?: InputMaybe; + type_ends_with_nocase?: InputMaybe; + type_gt?: InputMaybe; + type_gte?: InputMaybe; + type_in?: InputMaybe>; + type_lt?: InputMaybe; + type_lte?: InputMaybe; + type_not?: InputMaybe; + type_not_contains?: InputMaybe; + type_not_contains_nocase?: InputMaybe; + type_not_ends_with?: InputMaybe; + type_not_ends_with_nocase?: InputMaybe; + type_not_in?: InputMaybe>; + type_not_starts_with?: InputMaybe; + type_not_starts_with_nocase?: InputMaybe; + type_starts_with?: InputMaybe; + type_starts_with_nocase?: InputMaybe; +}; +type LiquidityGauge$1 = { + __typename?: 'LiquidityGauge'; + /** Factory contract address */ + factory: GaugeFactory; + /** Reference to Gauge entity - created when LiquidityGauge is added to GaugeController */ + gauge?: Maybe; + /** LiquidityGauge contract address */ + id: Scalars['ID']; + /** Whether Balancer DAO killed the gauge */ + isKilled: Scalars['Boolean']; + /** Whether the LiquidityGauge is the most recent added to GaugeController */ + isPreferentialGauge: Scalars['Boolean']; + /** Reference to Pool entity */ + pool?: Maybe; + /** Address of the pool (lp_token of the gauge) */ + poolAddress: Scalars['Bytes']; + /** Pool ID if lp_token is a Balancer pool; null otherwise */ + poolId?: Maybe; + /** Relative weight cap of the gauge (0.01 = 1%) - V2 factories only */ + relativeWeightCap?: Maybe; + /** List of reward tokens depositted in the gauge - ChildChainLiquidityGauge only */ + rewardTokensList?: Maybe>; + /** List of user shares */ + shares?: Maybe>; + /** Address of the contract that streams reward tokens to the gauge - ChildChainLiquidityGauge only */ + streamer?: Maybe; + /** ERC20 token symbol */ + symbol: Scalars['String']; + /** List of reward tokens depositted in the gauge */ + tokens?: Maybe>; + /** Total of BPTs users have staked in the LiquidityGauge */ + totalSupply: Scalars['BigDecimal']; +}; +type LiquidityGauge_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + factory?: InputMaybe; + factory_?: InputMaybe; + factory_contains?: InputMaybe; + factory_contains_nocase?: InputMaybe; + factory_ends_with?: InputMaybe; + factory_ends_with_nocase?: InputMaybe; + factory_gt?: InputMaybe; + factory_gte?: InputMaybe; + factory_in?: InputMaybe>; + factory_lt?: InputMaybe; + factory_lte?: InputMaybe; + factory_not?: InputMaybe; + factory_not_contains?: InputMaybe; + factory_not_contains_nocase?: InputMaybe; + factory_not_ends_with?: InputMaybe; + factory_not_ends_with_nocase?: InputMaybe; + factory_not_in?: InputMaybe>; + factory_not_starts_with?: InputMaybe; + factory_not_starts_with_nocase?: InputMaybe; + factory_starts_with?: InputMaybe; + factory_starts_with_nocase?: InputMaybe; + gauge?: InputMaybe; + gauge_?: InputMaybe; + gauge_contains?: InputMaybe; + gauge_contains_nocase?: InputMaybe; + gauge_ends_with?: InputMaybe; + gauge_ends_with_nocase?: InputMaybe; + gauge_gt?: InputMaybe; + gauge_gte?: InputMaybe; + gauge_in?: InputMaybe>; + gauge_lt?: InputMaybe; + gauge_lte?: InputMaybe; + gauge_not?: InputMaybe; + gauge_not_contains?: InputMaybe; + gauge_not_contains_nocase?: InputMaybe; + gauge_not_ends_with?: InputMaybe; + gauge_not_ends_with_nocase?: InputMaybe; + gauge_not_in?: InputMaybe>; + gauge_not_starts_with?: InputMaybe; + gauge_not_starts_with_nocase?: InputMaybe; + gauge_starts_with?: InputMaybe; + gauge_starts_with_nocase?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + isKilled?: InputMaybe; + isKilled_in?: InputMaybe>; + isKilled_not?: InputMaybe; + isKilled_not_in?: InputMaybe>; + isPreferentialGauge?: InputMaybe; + isPreferentialGauge_in?: InputMaybe>; + isPreferentialGauge_not?: InputMaybe; + isPreferentialGauge_not_in?: InputMaybe>; + or?: InputMaybe>>; + pool?: InputMaybe; + poolAddress?: InputMaybe; + poolAddress_contains?: InputMaybe; + poolAddress_gt?: InputMaybe; + poolAddress_gte?: InputMaybe; + poolAddress_in?: InputMaybe>; + poolAddress_lt?: InputMaybe; + poolAddress_lte?: InputMaybe; + poolAddress_not?: InputMaybe; + poolAddress_not_contains?: InputMaybe; + poolAddress_not_in?: InputMaybe>; + poolId?: InputMaybe; + poolId_contains?: InputMaybe; + poolId_gt?: InputMaybe; + poolId_gte?: InputMaybe; + poolId_in?: InputMaybe>; + poolId_lt?: InputMaybe; + poolId_lte?: InputMaybe; + poolId_not?: InputMaybe; + poolId_not_contains?: InputMaybe; + poolId_not_in?: InputMaybe>; + pool_?: InputMaybe; + pool_contains?: InputMaybe; + pool_contains_nocase?: InputMaybe; + pool_ends_with?: InputMaybe; + pool_ends_with_nocase?: InputMaybe; + pool_gt?: InputMaybe; + pool_gte?: InputMaybe; + pool_in?: InputMaybe>; + pool_lt?: InputMaybe; + pool_lte?: InputMaybe; + pool_not?: InputMaybe; + pool_not_contains?: InputMaybe; + pool_not_contains_nocase?: InputMaybe; + pool_not_ends_with?: InputMaybe; + pool_not_ends_with_nocase?: InputMaybe; + pool_not_in?: InputMaybe>; + pool_not_starts_with?: InputMaybe; + pool_not_starts_with_nocase?: InputMaybe; + pool_starts_with?: InputMaybe; + pool_starts_with_nocase?: InputMaybe; + relativeWeightCap?: InputMaybe; + relativeWeightCap_gt?: InputMaybe; + relativeWeightCap_gte?: InputMaybe; + relativeWeightCap_in?: InputMaybe>; + relativeWeightCap_lt?: InputMaybe; + relativeWeightCap_lte?: InputMaybe; + relativeWeightCap_not?: InputMaybe; + relativeWeightCap_not_in?: InputMaybe>; + rewardTokensList?: InputMaybe>; + rewardTokensList_contains?: InputMaybe>; + rewardTokensList_contains_nocase?: InputMaybe>; + rewardTokensList_not?: InputMaybe>; + rewardTokensList_not_contains?: InputMaybe>; + rewardTokensList_not_contains_nocase?: InputMaybe>; + shares_?: InputMaybe; + streamer?: InputMaybe; + streamer_contains?: InputMaybe; + streamer_gt?: InputMaybe; + streamer_gte?: InputMaybe; + streamer_in?: InputMaybe>; + streamer_lt?: InputMaybe; + streamer_lte?: InputMaybe; + streamer_not?: InputMaybe; + streamer_not_contains?: InputMaybe; + streamer_not_in?: InputMaybe>; + symbol?: InputMaybe; + symbol_contains?: InputMaybe; + symbol_contains_nocase?: InputMaybe; + symbol_ends_with?: InputMaybe; + symbol_ends_with_nocase?: InputMaybe; + symbol_gt?: InputMaybe; + symbol_gte?: InputMaybe; + symbol_in?: InputMaybe>; + symbol_lt?: InputMaybe; + symbol_lte?: InputMaybe; + symbol_not?: InputMaybe; + symbol_not_contains?: InputMaybe; + symbol_not_contains_nocase?: InputMaybe; + symbol_not_ends_with?: InputMaybe; + symbol_not_ends_with_nocase?: InputMaybe; + symbol_not_in?: InputMaybe>; + symbol_not_starts_with?: InputMaybe; + symbol_not_starts_with_nocase?: InputMaybe; + symbol_starts_with?: InputMaybe; + symbol_starts_with_nocase?: InputMaybe; + tokens_?: InputMaybe; + totalSupply?: InputMaybe; + totalSupply_gt?: InputMaybe; + totalSupply_gte?: InputMaybe; + totalSupply_in?: InputMaybe>; + totalSupply_lt?: InputMaybe; + totalSupply_lte?: InputMaybe; + totalSupply_not?: InputMaybe; + totalSupply_not_in?: InputMaybe>; +}; +declare enum LiquidityGauge_OrderBy { + factory = "factory", + factory__id = "factory__id", + factory__numGauges = "factory__numGauges", + gauge = "gauge", + gauge__addedTimestamp = "gauge__addedTimestamp", + gauge__address = "gauge__address", + gauge__id = "gauge__id", + id = "id", + isKilled = "isKilled", + isPreferentialGauge = "isPreferentialGauge", + pool = "pool", + poolAddress = "poolAddress", + poolId = "poolId", + pool__address = "pool__address", + pool__id = "pool__id", + pool__poolId = "pool__poolId", + relativeWeightCap = "relativeWeightCap", + rewardTokensList = "rewardTokensList", + shares = "shares", + streamer = "streamer", + symbol = "symbol", + tokens = "tokens", + totalSupply = "totalSupply" +} +type OmniVotingEscrowLock = { + __typename?: 'OmniVotingEscrowLock'; + /** veBAL balance at the moment user locks */ + bias: Scalars['BigDecimal']; + /** Chain where the lock was bridged to */ + dstChainId: Scalars['Int']; + /** Equal to: - */ + id: Scalars['ID']; + /** User on the local chain (reference to User entity) */ + localUser: User; + /** User address on the remote chain */ + remoteUser: Scalars['Bytes']; + /** veBAL decay rate (per second) */ + slope: Scalars['BigDecimal']; + /** Timestamp the lock was created [seconds] */ + timestamp: Scalars['Int']; + /** Reference to VotingEscrow entity */ + votingEscrowID: VotingEscrow; +}; +type OmniVotingEscrowLock_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + bias?: InputMaybe; + bias_gt?: InputMaybe; + bias_gte?: InputMaybe; + bias_in?: InputMaybe>; + bias_lt?: InputMaybe; + bias_lte?: InputMaybe; + bias_not?: InputMaybe; + bias_not_in?: InputMaybe>; + dstChainId?: InputMaybe; + dstChainId_gt?: InputMaybe; + dstChainId_gte?: InputMaybe; + dstChainId_in?: InputMaybe>; + dstChainId_lt?: InputMaybe; + dstChainId_lte?: InputMaybe; + dstChainId_not?: InputMaybe; + dstChainId_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + localUser?: InputMaybe; + localUser_?: InputMaybe; + localUser_contains?: InputMaybe; + localUser_contains_nocase?: InputMaybe; + localUser_ends_with?: InputMaybe; + localUser_ends_with_nocase?: InputMaybe; + localUser_gt?: InputMaybe; + localUser_gte?: InputMaybe; + localUser_in?: InputMaybe>; + localUser_lt?: InputMaybe; + localUser_lte?: InputMaybe; + localUser_not?: InputMaybe; + localUser_not_contains?: InputMaybe; + localUser_not_contains_nocase?: InputMaybe; + localUser_not_ends_with?: InputMaybe; + localUser_not_ends_with_nocase?: InputMaybe; + localUser_not_in?: InputMaybe>; + localUser_not_starts_with?: InputMaybe; + localUser_not_starts_with_nocase?: InputMaybe; + localUser_starts_with?: InputMaybe; + localUser_starts_with_nocase?: InputMaybe; + or?: InputMaybe>>; + remoteUser?: InputMaybe; + remoteUser_contains?: InputMaybe; + remoteUser_gt?: InputMaybe; + remoteUser_gte?: InputMaybe; + remoteUser_in?: InputMaybe>; + remoteUser_lt?: InputMaybe; + remoteUser_lte?: InputMaybe; + remoteUser_not?: InputMaybe; + remoteUser_not_contains?: InputMaybe; + remoteUser_not_in?: InputMaybe>; + slope?: InputMaybe; + slope_gt?: InputMaybe; + slope_gte?: InputMaybe; + slope_in?: InputMaybe>; + slope_lt?: InputMaybe; + slope_lte?: InputMaybe; + slope_not?: InputMaybe; + slope_not_in?: InputMaybe>; + timestamp?: InputMaybe; + timestamp_gt?: InputMaybe; + timestamp_gte?: InputMaybe; + timestamp_in?: InputMaybe>; + timestamp_lt?: InputMaybe; + timestamp_lte?: InputMaybe; + timestamp_not?: InputMaybe; + timestamp_not_in?: InputMaybe>; + votingEscrowID?: InputMaybe; + votingEscrowID_?: InputMaybe; + votingEscrowID_contains?: InputMaybe; + votingEscrowID_contains_nocase?: InputMaybe; + votingEscrowID_ends_with?: InputMaybe; + votingEscrowID_ends_with_nocase?: InputMaybe; + votingEscrowID_gt?: InputMaybe; + votingEscrowID_gte?: InputMaybe; + votingEscrowID_in?: InputMaybe>; + votingEscrowID_lt?: InputMaybe; + votingEscrowID_lte?: InputMaybe; + votingEscrowID_not?: InputMaybe; + votingEscrowID_not_contains?: InputMaybe; + votingEscrowID_not_contains_nocase?: InputMaybe; + votingEscrowID_not_ends_with?: InputMaybe; + votingEscrowID_not_ends_with_nocase?: InputMaybe; + votingEscrowID_not_in?: InputMaybe>; + votingEscrowID_not_starts_with?: InputMaybe; + votingEscrowID_not_starts_with_nocase?: InputMaybe; + votingEscrowID_starts_with?: InputMaybe; + votingEscrowID_starts_with_nocase?: InputMaybe; +}; +/** Defines the order direction, either ascending or descending */ +declare enum OrderDirection { + asc = "asc", + desc = "desc" +} +type Pool$2 = { + __typename?: 'Pool'; + /** Address of the pool (lp_token of the gauge) */ + address: Scalars['Bytes']; + /** List of gauges created for the pool */ + gauges?: Maybe>; + /** List of the pool's gauges addresses */ + gaugesList: Array; + /** Address of the pool (lp_token of the gauge) */ + id: Scalars['ID']; + /** Pool ID if lp_token is a Balancer pool; null otherwise */ + poolId?: Maybe; + /** Most recent, unkilled gauge in the GaugeController */ + preferentialGauge?: Maybe; +}; +type Pool_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + address?: InputMaybe; + address_contains?: InputMaybe; + address_gt?: InputMaybe; + address_gte?: InputMaybe; + address_in?: InputMaybe>; + address_lt?: InputMaybe; + address_lte?: InputMaybe; + address_not?: InputMaybe; + address_not_contains?: InputMaybe; + address_not_in?: InputMaybe>; + and?: InputMaybe>>; + gaugesList?: InputMaybe>; + gaugesList_contains?: InputMaybe>; + gaugesList_contains_nocase?: InputMaybe>; + gaugesList_not?: InputMaybe>; + gaugesList_not_contains?: InputMaybe>; + gaugesList_not_contains_nocase?: InputMaybe>; + gauges_?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + or?: InputMaybe>>; + poolId?: InputMaybe; + poolId_contains?: InputMaybe; + poolId_gt?: InputMaybe; + poolId_gte?: InputMaybe; + poolId_in?: InputMaybe>; + poolId_lt?: InputMaybe; + poolId_lte?: InputMaybe; + poolId_not?: InputMaybe; + poolId_not_contains?: InputMaybe; + poolId_not_in?: InputMaybe>; + preferentialGauge?: InputMaybe; + preferentialGauge_?: InputMaybe; + preferentialGauge_contains?: InputMaybe; + preferentialGauge_contains_nocase?: InputMaybe; + preferentialGauge_ends_with?: InputMaybe; + preferentialGauge_ends_with_nocase?: InputMaybe; + preferentialGauge_gt?: InputMaybe; + preferentialGauge_gte?: InputMaybe; + preferentialGauge_in?: InputMaybe>; + preferentialGauge_lt?: InputMaybe; + preferentialGauge_lte?: InputMaybe; + preferentialGauge_not?: InputMaybe; + preferentialGauge_not_contains?: InputMaybe; + preferentialGauge_not_contains_nocase?: InputMaybe; + preferentialGauge_not_ends_with?: InputMaybe; + preferentialGauge_not_ends_with_nocase?: InputMaybe; + preferentialGauge_not_in?: InputMaybe>; + preferentialGauge_not_starts_with?: InputMaybe; + preferentialGauge_not_starts_with_nocase?: InputMaybe; + preferentialGauge_starts_with?: InputMaybe; + preferentialGauge_starts_with_nocase?: InputMaybe; +}; +declare enum Pool_OrderBy { + address = "address", + gauges = "gauges", + gaugesList = "gaugesList", + id = "id", + poolId = "poolId", + preferentialGauge = "preferentialGauge", + preferentialGauge__id = "preferentialGauge__id", + preferentialGauge__isKilled = "preferentialGauge__isKilled", + preferentialGauge__isPreferentialGauge = "preferentialGauge__isPreferentialGauge", + preferentialGauge__poolAddress = "preferentialGauge__poolAddress", + preferentialGauge__poolId = "preferentialGauge__poolId", + preferentialGauge__relativeWeightCap = "preferentialGauge__relativeWeightCap", + preferentialGauge__streamer = "preferentialGauge__streamer", + preferentialGauge__symbol = "preferentialGauge__symbol", + preferentialGauge__totalSupply = "preferentialGauge__totalSupply" +} +type RewardToken = { + __typename?: 'RewardToken'; + /** ERC20 token decimals - zero if call to decimals() reverts */ + decimals: Scalars['Int']; + /** Reference to LiquidityGauge entity */ + gauge: LiquidityGauge$1; + /** Equal to: - */ + id: Scalars['ID']; + /** Timestamp at which finishes the period of rewards */ + periodFinish?: Maybe; + /** Rate of reward tokens streamed per second */ + rate?: Maybe; + /** ERC20 token symbol - empty string if call to symbol() reverts */ + symbol: Scalars['String']; + /** Amount of reward tokens that has been deposited into the gauge */ + totalDeposited: Scalars['BigDecimal']; +}; +type RewardToken_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + decimals?: InputMaybe; + decimals_gt?: InputMaybe; + decimals_gte?: InputMaybe; + decimals_in?: InputMaybe>; + decimals_lt?: InputMaybe; + decimals_lte?: InputMaybe; + decimals_not?: InputMaybe; + decimals_not_in?: InputMaybe>; + gauge?: InputMaybe; + gauge_?: InputMaybe; + gauge_contains?: InputMaybe; + gauge_contains_nocase?: InputMaybe; + gauge_ends_with?: InputMaybe; + gauge_ends_with_nocase?: InputMaybe; + gauge_gt?: InputMaybe; + gauge_gte?: InputMaybe; + gauge_in?: InputMaybe>; + gauge_lt?: InputMaybe; + gauge_lte?: InputMaybe; + gauge_not?: InputMaybe; + gauge_not_contains?: InputMaybe; + gauge_not_contains_nocase?: InputMaybe; + gauge_not_ends_with?: InputMaybe; + gauge_not_ends_with_nocase?: InputMaybe; + gauge_not_in?: InputMaybe>; + gauge_not_starts_with?: InputMaybe; + gauge_not_starts_with_nocase?: InputMaybe; + gauge_starts_with?: InputMaybe; + gauge_starts_with_nocase?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + or?: InputMaybe>>; + periodFinish?: InputMaybe; + periodFinish_gt?: InputMaybe; + periodFinish_gte?: InputMaybe; + periodFinish_in?: InputMaybe>; + periodFinish_lt?: InputMaybe; + periodFinish_lte?: InputMaybe; + periodFinish_not?: InputMaybe; + periodFinish_not_in?: InputMaybe>; + rate?: InputMaybe; + rate_gt?: InputMaybe; + rate_gte?: InputMaybe; + rate_in?: InputMaybe>; + rate_lt?: InputMaybe; + rate_lte?: InputMaybe; + rate_not?: InputMaybe; + rate_not_in?: InputMaybe>; + symbol?: InputMaybe; + symbol_contains?: InputMaybe; + symbol_contains_nocase?: InputMaybe; + symbol_ends_with?: InputMaybe; + symbol_ends_with_nocase?: InputMaybe; + symbol_gt?: InputMaybe; + symbol_gte?: InputMaybe; + symbol_in?: InputMaybe>; + symbol_lt?: InputMaybe; + symbol_lte?: InputMaybe; + symbol_not?: InputMaybe; + symbol_not_contains?: InputMaybe; + symbol_not_contains_nocase?: InputMaybe; + symbol_not_ends_with?: InputMaybe; + symbol_not_ends_with_nocase?: InputMaybe; + symbol_not_in?: InputMaybe>; + symbol_not_starts_with?: InputMaybe; + symbol_not_starts_with_nocase?: InputMaybe; + symbol_starts_with?: InputMaybe; + symbol_starts_with_nocase?: InputMaybe; + totalDeposited?: InputMaybe; + totalDeposited_gt?: InputMaybe; + totalDeposited_gte?: InputMaybe; + totalDeposited_in?: InputMaybe>; + totalDeposited_lt?: InputMaybe; + totalDeposited_lte?: InputMaybe; + totalDeposited_not?: InputMaybe; + totalDeposited_not_in?: InputMaybe>; +}; +type RootGauge = { + __typename?: 'RootGauge'; + /** Chain where emissions by this gauge will be bridged to */ + chain: Chain; + /** Factory contract address */ + factory: GaugeFactory; + /** Reference to Gauge entity - created when LiquidityGauge is added to GaugeController */ + gauge?: Maybe; + /** RootGauge contract address */ + id: Scalars['ID']; + /** Whether Balancer DAO killed the gauge */ + isKilled: Scalars['Boolean']; + /** Address where emissions by this gauge will be bridged to */ + recipient: Scalars['Bytes']; + /** Relative weight cap of the gauge (0.01 = 1%) - V2 factories only */ + relativeWeightCap?: Maybe; +}; +type RootGauge_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + chain?: InputMaybe; + chain_in?: InputMaybe>; + chain_not?: InputMaybe; + chain_not_in?: InputMaybe>; + factory?: InputMaybe; + factory_?: InputMaybe; + factory_contains?: InputMaybe; + factory_contains_nocase?: InputMaybe; + factory_ends_with?: InputMaybe; + factory_ends_with_nocase?: InputMaybe; + factory_gt?: InputMaybe; + factory_gte?: InputMaybe; + factory_in?: InputMaybe>; + factory_lt?: InputMaybe; + factory_lte?: InputMaybe; + factory_not?: InputMaybe; + factory_not_contains?: InputMaybe; + factory_not_contains_nocase?: InputMaybe; + factory_not_ends_with?: InputMaybe; + factory_not_ends_with_nocase?: InputMaybe; + factory_not_in?: InputMaybe>; + factory_not_starts_with?: InputMaybe; + factory_not_starts_with_nocase?: InputMaybe; + factory_starts_with?: InputMaybe; + factory_starts_with_nocase?: InputMaybe; + gauge?: InputMaybe; + gauge_?: InputMaybe; + gauge_contains?: InputMaybe; + gauge_contains_nocase?: InputMaybe; + gauge_ends_with?: InputMaybe; + gauge_ends_with_nocase?: InputMaybe; + gauge_gt?: InputMaybe; + gauge_gte?: InputMaybe; + gauge_in?: InputMaybe>; + gauge_lt?: InputMaybe; + gauge_lte?: InputMaybe; + gauge_not?: InputMaybe; + gauge_not_contains?: InputMaybe; + gauge_not_contains_nocase?: InputMaybe; + gauge_not_ends_with?: InputMaybe; + gauge_not_ends_with_nocase?: InputMaybe; + gauge_not_in?: InputMaybe>; + gauge_not_starts_with?: InputMaybe; + gauge_not_starts_with_nocase?: InputMaybe; + gauge_starts_with?: InputMaybe; + gauge_starts_with_nocase?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + isKilled?: InputMaybe; + isKilled_in?: InputMaybe>; + isKilled_not?: InputMaybe; + isKilled_not_in?: InputMaybe>; + or?: InputMaybe>>; + recipient?: InputMaybe; + recipient_contains?: InputMaybe; + recipient_gt?: InputMaybe; + recipient_gte?: InputMaybe; + recipient_in?: InputMaybe>; + recipient_lt?: InputMaybe; + recipient_lte?: InputMaybe; + recipient_not?: InputMaybe; + recipient_not_contains?: InputMaybe; + recipient_not_in?: InputMaybe>; + relativeWeightCap?: InputMaybe; + relativeWeightCap_gt?: InputMaybe; + relativeWeightCap_gte?: InputMaybe; + relativeWeightCap_in?: InputMaybe>; + relativeWeightCap_lt?: InputMaybe; + relativeWeightCap_lte?: InputMaybe; + relativeWeightCap_not?: InputMaybe; + relativeWeightCap_not_in?: InputMaybe>; +}; +type User = { + __typename?: 'User'; + /** List of gauge the user has shares */ + gaugeShares?: Maybe>; + /** List of votes on gauges */ + gaugeVotes?: Maybe>; + /** User address */ + id: Scalars['ID']; + /** List of omni locks the user created */ + omniVotingLocks?: Maybe>; + /** List of locks the user created */ + votingLocks?: Maybe>; +}; +type User_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + gaugeShares_?: InputMaybe; + gaugeVotes_?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + omniVotingLocks_?: InputMaybe; + or?: InputMaybe>>; + votingLocks_?: InputMaybe; +}; +type VotingEscrow = { + __typename?: 'VotingEscrow'; + /** VotingEscrow contract address */ + id: Scalars['ID']; + /** List of veBAL locks created */ + locks?: Maybe>; + /** List of veBAL locks created */ + omniLocks?: Maybe>; + /** Amount of B-80BAL-20WETH BPT locked, only applies on mainnet */ + stakedSupply?: Maybe; +}; +type VotingEscrowLock = { + __typename?: 'VotingEscrowLock'; + /** veBAL balance at the moment user locks */ + bias: Scalars['BigDecimal']; + /** Equal to: - */ + id: Scalars['ID']; + /** Amount of B-80BAL-20WETH BPT the user has locked */ + lockedBalance: Scalars['BigDecimal']; + /** veBAL decay rate (per second) */ + slope: Scalars['BigDecimal']; + /** Timestamp at which the lock was created [seconds] */ + timestamp: Scalars['Int']; + /** Timestamp at which B-80BAL-20WETH BPT can be unlocked by user [seconds] */ + unlockTime: Scalars['BigInt']; + /** Timestamp at which the lcok was created [seconds]. Same as timestamp */ + updatedAt: Scalars['Int']; + /** Reference to User entity */ + user: User; + /** Reference to VotingEscrow entity */ + votingEscrowID: VotingEscrow; +}; +type VotingEscrowLock_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + bias?: InputMaybe; + bias_gt?: InputMaybe; + bias_gte?: InputMaybe; + bias_in?: InputMaybe>; + bias_lt?: InputMaybe; + bias_lte?: InputMaybe; + bias_not?: InputMaybe; + bias_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + lockedBalance?: InputMaybe; + lockedBalance_gt?: InputMaybe; + lockedBalance_gte?: InputMaybe; + lockedBalance_in?: InputMaybe>; + lockedBalance_lt?: InputMaybe; + lockedBalance_lte?: InputMaybe; + lockedBalance_not?: InputMaybe; + lockedBalance_not_in?: InputMaybe>; + or?: InputMaybe>>; + slope?: InputMaybe; + slope_gt?: InputMaybe; + slope_gte?: InputMaybe; + slope_in?: InputMaybe>; + slope_lt?: InputMaybe; + slope_lte?: InputMaybe; + slope_not?: InputMaybe; + slope_not_in?: InputMaybe>; + timestamp?: InputMaybe; + timestamp_gt?: InputMaybe; + timestamp_gte?: InputMaybe; + timestamp_in?: InputMaybe>; + timestamp_lt?: InputMaybe; + timestamp_lte?: InputMaybe; + timestamp_not?: InputMaybe; + timestamp_not_in?: InputMaybe>; + unlockTime?: InputMaybe; + unlockTime_gt?: InputMaybe; + unlockTime_gte?: InputMaybe; + unlockTime_in?: InputMaybe>; + unlockTime_lt?: InputMaybe; + unlockTime_lte?: InputMaybe; + unlockTime_not?: InputMaybe; + unlockTime_not_in?: InputMaybe>; + updatedAt?: InputMaybe; + updatedAt_gt?: InputMaybe; + updatedAt_gte?: InputMaybe; + updatedAt_in?: InputMaybe>; + updatedAt_lt?: InputMaybe; + updatedAt_lte?: InputMaybe; + updatedAt_not?: InputMaybe; + updatedAt_not_in?: InputMaybe>; + user?: InputMaybe; + user_?: InputMaybe; + user_contains?: InputMaybe; + user_contains_nocase?: InputMaybe; + user_ends_with?: InputMaybe; + user_ends_with_nocase?: InputMaybe; + user_gt?: InputMaybe; + user_gte?: InputMaybe; + user_in?: InputMaybe>; + user_lt?: InputMaybe; + user_lte?: InputMaybe; + user_not?: InputMaybe; + user_not_contains?: InputMaybe; + user_not_contains_nocase?: InputMaybe; + user_not_ends_with?: InputMaybe; + user_not_ends_with_nocase?: InputMaybe; + user_not_in?: InputMaybe>; + user_not_starts_with?: InputMaybe; + user_not_starts_with_nocase?: InputMaybe; + user_starts_with?: InputMaybe; + user_starts_with_nocase?: InputMaybe; + votingEscrowID?: InputMaybe; + votingEscrowID_?: InputMaybe; + votingEscrowID_contains?: InputMaybe; + votingEscrowID_contains_nocase?: InputMaybe; + votingEscrowID_ends_with?: InputMaybe; + votingEscrowID_ends_with_nocase?: InputMaybe; + votingEscrowID_gt?: InputMaybe; + votingEscrowID_gte?: InputMaybe; + votingEscrowID_in?: InputMaybe>; + votingEscrowID_lt?: InputMaybe; + votingEscrowID_lte?: InputMaybe; + votingEscrowID_not?: InputMaybe; + votingEscrowID_not_contains?: InputMaybe; + votingEscrowID_not_contains_nocase?: InputMaybe; + votingEscrowID_not_ends_with?: InputMaybe; + votingEscrowID_not_ends_with_nocase?: InputMaybe; + votingEscrowID_not_in?: InputMaybe>; + votingEscrowID_not_starts_with?: InputMaybe; + votingEscrowID_not_starts_with_nocase?: InputMaybe; + votingEscrowID_starts_with?: InputMaybe; + votingEscrowID_starts_with_nocase?: InputMaybe; +}; +type VotingEscrow_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + locks_?: InputMaybe; + omniLocks_?: InputMaybe; + or?: InputMaybe>>; + stakedSupply?: InputMaybe; + stakedSupply_gt?: InputMaybe; + stakedSupply_gte?: InputMaybe; + stakedSupply_in?: InputMaybe>; + stakedSupply_lt?: InputMaybe; + stakedSupply_lte?: InputMaybe; + stakedSupply_not?: InputMaybe; + stakedSupply_not_in?: InputMaybe>; +}; +type GaugeShareQueryVariables = Exact<{ + id: Scalars['ID']; + block?: InputMaybe; +}>; +type GaugeShareQuery = { + __typename?: 'Query'; + gaugeShare?: { + __typename?: 'GaugeShare'; + id: string; + balance: string; + user: { + __typename?: 'User'; + id: string; + }; + gauge: { + __typename?: 'LiquidityGauge'; + id: string; + isKilled: boolean; + poolId?: string | null; + poolAddress: string; + totalSupply: string; + }; + } | null; +}; +type GaugeSharesQueryVariables = Exact<{ + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; +}>; +type GaugeSharesQuery = { + __typename?: 'Query'; + gaugeShares: Array<{ + __typename?: 'GaugeShare'; + id: string; + balance: string; + user: { + __typename?: 'User'; + id: string; + }; + gauge: { + __typename?: 'LiquidityGauge'; + id: string; + isKilled: boolean; + poolId?: string | null; + poolAddress: string; + totalSupply: string; + }; + }>; +}; +type SubgraphGaugeShareFragment = { + __typename?: 'GaugeShare'; + id: string; + balance: string; + user: { + __typename?: 'User'; + id: string; + }; + gauge: { + __typename?: 'LiquidityGauge'; + id: string; + isKilled: boolean; + poolId?: string | null; + poolAddress: string; + totalSupply: string; + }; +}; +type LiquidityGaugesQueryVariables = Exact<{ + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; +}>; +type LiquidityGaugesQuery = { + __typename?: 'Query'; + liquidityGauges: Array<{ + __typename?: 'LiquidityGauge'; + id: string; + symbol: string; + poolAddress: string; + poolId?: string | null; + streamer?: string | null; + totalSupply: string; + factory: { + __typename?: 'GaugeFactory'; + id: string; + numGauges: number; + }; + tokens?: Array<{ + __typename?: 'RewardToken'; + id: string; + symbol: string; + decimals: number; + totalDeposited: string; + rate?: string | null; + periodFinish?: string | null; + }> | null; + }>; +}; +type PoolsQueryVariables = Exact<{ + skip?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + where?: InputMaybe; + block?: InputMaybe; +}>; +type PoolsQuery = { + __typename?: 'Query'; + pools: Array<{ + __typename?: 'Pool'; + id: string; + poolId?: string | null; + preferentialGauge?: { + __typename?: 'LiquidityGauge'; + id: string; + symbol: string; + poolAddress: string; + poolId?: string | null; + streamer?: string | null; + totalSupply: string; + factory: { + __typename?: 'GaugeFactory'; + id: string; + numGauges: number; + }; + tokens?: Array<{ + __typename?: 'RewardToken'; + id: string; + symbol: string; + decimals: number; + totalDeposited: string; + rate?: string | null; + periodFinish?: string | null; + }> | null; + } | null; + }>; +}; +type PoolGaugesQueryVariables = Exact<{ + where?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + block?: InputMaybe; +}>; +type PoolGaugesQuery = { + __typename?: 'Query'; + pools: Array<{ + __typename?: 'Pool'; + gauges?: Array<{ + __typename?: 'LiquidityGauge'; + id: string; + relativeWeightCap?: string | null; + }> | null; + preferentialGauge?: { + __typename?: 'LiquidityGauge'; + id: string; + } | null; + }>; +}; +type SdkFunctionWrapper = (action: (requestHeaders?: Record) => Promise, operationName: string, operationType?: string) => Promise; +declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionWrapper): { + GaugeShare(variables: GaugeShareQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + GaugeShares(variables?: GaugeSharesQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + LiquidityGauges(variables?: LiquidityGaugesQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + Pools(variables?: PoolsQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; + PoolGauges(variables?: PoolGaugesQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise; +}; +type Sdk = ReturnType; + +type SubgraphClient = Sdk$1; +type GaugesClient = Sdk; +type SubgraphLiquidityGauge = LiquidityGauge$1; + +/** + * Access liquidity gauges indexed by subgraph. + * Because we have ~100 gauges to save on repeated http calls we cache all results as `gauges` on an instance. + * Balancer's subgraph URL: https://thegraph.com/hosted-service/subgraph/balancer-labs/balancer-gauges + */ +declare class LiquidityGaugesSubgraphRepository implements Findable { + private client; + gauges: SubgraphLiquidityGauge[]; + constructor(url: string); + fetch(): Promise; + find(id: string): Promise; + findBy(param: string, value: string): Promise; +} + +interface LiquidityGauge { + id: string; + address: string; + name: string; + poolId?: Maybe$1; + poolAddress: string; + totalSupply: number; + workingSupply: number; + relativeWeight: number; + rewardTokens?: { + [tokenAddress: string]: RewardData; + }; + claimableTokens?: { + [tokenAddress: string]: BigNumber; + }; + balInflationRate?: number; +} +declare class LiquidityGaugeSubgraphRPCProvider implements Findable { + private chainId; + gaugeController?: GaugeControllerMulticallRepository; + multicall: LiquidityGaugesMulticallRepository; + subgraph: LiquidityGaugesSubgraphRepository; + workingSupplies: { + [gaugeAddress: string]: number; + }; + relativeWeights: { + [gaugeAddress: string]: number; + }; + inflationRates: { + [gaugeAddress: string]: number; + }; + rewardData: { + [gaugeAddress: string]: { + [tokenAddress: string]: RewardData; + }; + }; + gauges?: Promise; + constructor(subgraphUrl: string, multicall: Multicall, gaugeControllerAddress: string, chainId: Network, gaugeControllerCheckpointerAddress?: string); + fetch(): Promise; + find(id: string): Promise; + findBy(attribute: string, value: string): Promise; + private compose; +} + +type PoolAttribute = 'id' | 'address'; +interface PoolRepository { + skip?: number; +} +interface PoolsRepositoryFetchOptions { + first?: number; + skip?: number; +} +interface PoolsFallbackRepositoryOptions { + timeout?: number; +} + +type TokenAttribute = 'address' | 'symbol'; +interface TokenProvider { + find: (address: string) => Promise; + findBy: (attribute: TokenAttribute, value: string) => Promise; +} + +interface ProtocolFees { + swapFee: number; + yieldFee: number; +} +declare class ProtocolFeesProvider { + private multicall; + private protocolFeePercentagesProviderAddress; + protocolFees?: ProtocolFees; + constructor(multicall: Multicall, protocolFeePercentagesProviderAddress: string); + private fetch; + getFees(): Promise; +} + +declare enum PoolGaugesAttributes { + Id = "id", + Address = "address", + PoolId = "poolId" +} +interface PoolGauges { + preferentialGauge: { + id: string; + }; + gauges: { + id: string; + relativeWeightCap?: string | null; + }[]; +} + +declare enum PoolShareAttributes { + Balance = "balance", + Id = "id", + PoolId = "poolId", + UserAddress = "userAddress" +} +interface PoolShare { + id: string; + userAddress: string; + poolId: string; + balance: string; +} + +declare enum GaugeShareAttributes { + Id = "id", + UserAddress = "user", + GaugeId = "gauge", + Balance = "balance" +} +interface GaugeShare { + id: string; + balance: string; + userAddress: string; + gauge: { + id: string; + poolId?: string; + isKilled: boolean; + totalSupply: string; + }; +} + +interface Findable { + find: (id: string) => Promise; + findBy: (attribute: P, value: V) => Promise; +} +interface Searchable { + all: () => Promise; + where: (filters: (arg: T) => boolean) => Promise; +} +interface Cacheable { + refresh: (arg: T) => Promise; +} + +interface GyroConfigRepository { + getGyroProtocolFee(poolAddress: string): Promise; +} +declare class GyroConfigRepositoryImpl implements GyroConfigRepository { + private gyroConfigAddress; + private multicall; + gyroConfigInterface: GyroConfigInterface; + gyroConfig: GyroConfig; + constructor(gyroConfigAddress: string, multicall: Multicall, provider: Provider); + getGyroProtocolFee(poolAddress: string): Promise; +} + +/** + * Weekly Bal emissions are fixed / year according to: + * https://docs.google.com/spreadsheets/d/1FY0gi596YWBOTeu_mrxhWcdF74SwKMNhmu0qJVgs0KI/edit#gid=0 + * + * Using regular numbers for simplicity assuming frontend use only. + * + * Calculation source + * https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/liquidity-mining/contracts/BalancerTokenAdmin.sol + */ +declare const INITIAL_RATE = 145000; +declare const START_EPOCH_TIME = 1648465251; +/** + * Weekly BAL emissions + * + * @param currentTimestamp used to get the epoch + * @returns BAL emitted in a week + */ +declare const weekly: (currentTimestamp?: number) => number; +/** + * Total BAL emitted in epoch (1 year) + * + * @param epoch starting from 0 for the first year of emissions + * @returns BAL emitted in epoch + */ +declare const total: (epoch: number) => number; +/** + * Total BAL emitted between two timestamps + * + * @param start starting timestamp + * @param end ending timestamp + * @returns BAL emitted in period + */ +declare const between: (start: number, end: number) => number; + +declare const emissions_INITIAL_RATE: typeof INITIAL_RATE; +declare const emissions_START_EPOCH_TIME: typeof START_EPOCH_TIME; +declare const emissions_weekly: typeof weekly; +declare const emissions_total: typeof total; +declare const emissions_between: typeof between; +declare namespace emissions { + export { + emissions_INITIAL_RATE as INITIAL_RATE, + emissions_START_EPOCH_TIME as START_EPOCH_TIME, + emissions_weekly as weekly, + emissions_total as total, + emissions_between as between, + }; +} + +declare abstract class AbstractSubgraphRepository implements Findable { + protected abstract mapType(subgraphFragment: any): T; + abstract query(args: any): Promise; + get(args: any): Promise; + find(id: string): Promise; + findBy(attribute: A, value: string): Promise; + findAllBy(attribute: A, value: string, first?: number, skip?: number): Promise; +} + +declare abstract class BalancerSubgraphRepository extends AbstractSubgraphRepository { + protected chainId: Network; + protected blockHeight?: (() => Promise) | undefined; + protected client: SubgraphClient; + constructor(url: string, chainId: Network, blockHeight?: (() => Promise) | undefined); +} + +declare abstract class GaugesSubgraphRepository extends AbstractSubgraphRepository { + protected chainId: Network; + protected blockHeight?: (() => Promise) | undefined; + protected client: GaugesClient; + constructor(url: string, chainId: Network, blockHeight?: (() => Promise) | undefined); +} + +declare class GaugeSharesRepository extends GaugesSubgraphRepository { + query(args: any): Promise; + mapType(subgraphGaugeShare: SubgraphGaugeShareFragment): GaugeShare; + findByUser(userAddress: string, first?: number, skip?: number): Promise; + findByGauge(gaugeId: string, first?: number, skip?: number): Promise; +} + +interface PoolsBalancerAPIOptions { + url: string; + apiKey: string; + query?: GraphQLQuery; +} +/** + * Access pools using the Balancer GraphQL Api. + * + * Balancer's API URL: https://api.balancer.fi/query/ + */ +declare class PoolsBalancerAPIRepository implements Findable { + private client; + pools: Pool$1[]; + skip: number; + nextToken: string | undefined | null; + private query; + private hasFetched; + private isFetching; + constructor(options: PoolsBalancerAPIOptions); + private fetchFromCache; + fetch(options?: PoolsRepositoryFetchOptions): Promise; + fetchAll(options?: PoolsRepositoryFetchOptions): Promise; + awaitEnoughPoolsFetched(first: number, skip: number): Promise; + find(id: string): Promise; + findBy(param: PoolAttribute, value: string): Promise; + /** Fixes any formatting issues from the subgraph + * - GraphQL can't store a map so pool.apr.[rewardAprs/tokenAprs].breakdown + * is JSON data that needs to be parsed so they match the Pool type correctly. + */ + private format; +} + +/** + * The fallback provider takes multiple PoolRepository's in an array and uses them in order + * falling back to the next one if a request times out. + * + * This is useful for using the Balancer API while being able to fall back to the graph if it is down + * to ensure Balancer is maximally decentralized. + **/ +declare class PoolsFallbackRepository implements Findable { + private readonly providers; + currentProviderIdx: number; + timeout: number; + constructor(providers: PoolRepository[], options?: PoolsFallbackRepositoryOptions); + fetch(options?: PoolsRepositoryFetchOptions): Promise; + get currentProvider(): PoolRepository | undefined; + find(id: string): Promise; + findBy(attribute: PoolAttribute, value: string): Promise; + fallbackQuery(func: string, args: unknown[]): Promise; +} + +declare class PoolsStaticRepository implements Findable, Searchable { + private pools; + constructor(pools: Pool$1[]); + find(id: string): Promise; + findBy(attribute: PoolAttribute, value: string): Promise; + all(): Promise; + where(filter: (pool: Pool$1) => boolean): Promise; +} + +interface PoolsSubgraphRepositoryOptions { + url: string; + chainId: Network; + blockHeight?: () => Promise; + query?: GraphQLQuery; +} +/** + * Access pools using generated subgraph client. + * + * Balancer's subgraph URL: https://thegraph.com/hosted-service/subgraph/balancer-labs/balancer-v2 + */ +declare class PoolsSubgraphRepository implements Findable, Searchable { + private client; + private chainId; + private pools?; + skip: number; + private blockHeight; + private query; + /** + * Repository with optional lazy loaded blockHeight + * + * @param url subgraph URL + * @param chainId current network, needed for L2s logic + * @param blockHeight lazy loading blockHeigh resolver + */ + constructor(options: PoolsSubgraphRepositoryOptions); + /** + * We need a list of all the pools, for calculating APRs (nested pools), and for SOR (path finding). + * All the pools are fetched on page load and cachced for speedy lookups. + * + * @returns Promise resolving to pools list + */ + private fetchAllPools; + fetch(options?: PoolsRepositoryFetchOptions): Promise; + find(id: string): Promise; + findBy(param: PoolAttribute, value: string): Promise; + all(): Promise; + block(): Promise<{ + number: number | undefined; + } | undefined>; + where(filter: (pool: Pool$1) => boolean): Promise; +} + +interface PoolsSubgraphOnChainRepositoryOptions { + provider: Provider; + multicall: string; + vault: string; +} +/** + * Access pools using generated subgraph client and multicall. + */ +declare class PoolsSubgraphOnChainRepository implements Findable, Searchable, Cacheable { + private poolsSubgraph; + private readonly poolsToIgnore; + private batchSize?; + private provider; + private pools?; + private multicall; + private vault; + skip: number; + /** + * Repository using multicall to get onchain data. + * + * @param poolsSubgraph subgraph repository + * @param options options containing provider, multicall and vault addresses + */ + constructor(poolsSubgraph: PoolsSubgraphRepository, options: PoolsSubgraphOnChainRepositoryOptions, poolsToIgnore: string[] | undefined, batchSize?: number | undefined); + private filterPools; + /** + * We need a list of all the pools, for calculating APRs (nested pools), and for SOR (path finding). + * All the pools are fetched on page load and cachced for speedy lookups. + * + * @returns Promise resolving to pools list + */ + private fetchDefault; + fetch(options?: PoolsRepositoryFetchOptions): Promise; + find(id: string, forceRefresh?: boolean): Promise; + findBy(param: PoolAttribute, value: string, forceRefresh?: boolean): Promise; + all(): Promise; + where(filter: (pool: Pool$1) => boolean): Promise; + refresh(pool: Pool$1): Promise; +} + +type GenericToken = SubgraphToken | PoolToken; +type GenericPool = Omit & { + tokens: GenericToken[]; +}; +interface OnchainData { + poolTokens: [string[], string[]]; + totalShares: string; + swapFee: string; + isPaused?: boolean; + inRecoveryMode?: boolean; + rate?: string; + scalingFactors?: string[]; + weights?: string[]; + targets?: [string, string]; + wrappedTokenRate?: string; + amp?: [string, boolean, string]; + tokenRates?: [string, string]; +} +declare const fetchOnChainPoolData: (pools: { + id: string; + address: string; + poolType: string; + poolTypeVersion?: number; +}[], vaultAddress: string, provider: Provider, batchSize?: number) => Promise<{ + [id: string]: OnchainData; +}>; +declare function getOnChainBalances(subgraphPoolsOriginal: T[], _multiAddress: string, vaultAddress: string, provider: Provider, batchSize?: number): Promise; + +declare class PoolGaugesRepository extends GaugesSubgraphRepository { + query(args: any): Promise; + mapType(fragment: any): PoolGauges; +} + +declare enum PoolJoinExitAttributes { + Pool = "pool", + Sender = "sender" +} +interface PoolJoinExit { + id: string; + userAddress: string; + poolId: string; + timestamp: number; + type: string; + amounts: string[]; + tokens: string[]; +} + +declare class PoolJoinExitRepository extends BalancerSubgraphRepository { + query(args: any): Promise; + mapType(item: SubgraphJoinExitFragment): PoolJoinExit; + findByUser(sender: string, first?: number, skip?: number): Promise; + findJoins(sender: string, pool: string): Promise; + findExits(sender: string, pool: string): Promise; + findByPool(poolId: string, first?: number, skip?: number): Promise; +} + +declare class PoolSharesRepository extends BalancerSubgraphRepository { + query(args: any): Promise; + mapType(subgraphPoolShare: SubgraphPoolShareFragment): PoolShare; + findByUser(userAddress: string, first?: number, skip?: number): Promise; + findByPool(poolId: string, first?: number, skip?: number): Promise; +} + +declare class StaticTokenProvider implements Findable { + private tokens; + constructor(tokens: Token[]); + find(address: string): Promise; + findBy(attribute: TokenAttribute, value: string): Promise; +} + +declare class StaticTokenPriceProvider implements Findable { + tokenPrices: TokenPrices$1; + constructor(tokenPrices: TokenPrices$1); + find(address: string): Promise; + findBy(attribute: string, value: string): Promise; +} + +declare class AssetHelpers { + readonly ETH: string; + readonly WETH: string; + constructor(wethAddress: string); + static isEqual: (addressA: string, addressB: string) => boolean; + /** + * Tests whether `token` is ETH (represented by `0x0000...0000`). + * + * @param token - the address of the asset to be checked + */ + isETH: (token: string) => boolean; + /** + * Tests whether `token` is WETH. + * + * @param token - the address of the asset to be checked + */ + isWETH: (token: string) => boolean; + /** + * Converts an asset to the equivalent ERC20 address. + * + * For ERC20s this will return the passed address but passing ETH (`0x0000...0000`) will return the WETH address + * @param token - the address of the asset to be translated to an equivalent ERC20 + * @returns the address of translated ERC20 asset + */ + translateToERC20: (token: string) => string; + /** + * Sorts an array of token addresses into ascending order to match the format expected by the Vault. + * + * Passing additional arrays will result in each being sorted to maintain relative ordering to token addresses. + * + * The zero address (representing ETH) is sorted as if it were the WETH address. + * This matches the behaviour expected by the Vault when receiving an array of addresses. + * + * @param tokens - an array of token addresses to be sorted in ascending order + * @param others - a set of arrays to be sorted in the same order as the tokens, e.g. token weights or asset manager addresses + * @returns an array of the form `[tokens, ...others]` where each subarray has been sorted to maintain its ordering relative to `tokens` + * + * @example + * const [tokens] = sortTokens([tokenB, tokenC, tokenA]) + * const [tokens, weights] = sortTokens([tokenB, tokenC, tokenA], [weightB, weightC, weightA]) + * // where tokens = [tokenA, tokenB, tokenC], weights = [weightA, weightB, weightC] + */ + sortTokens(tokens: string[], ...others: unknown[][]): [string[], ...unknown[][]]; +} + +declare class BalancerErrors { + /** + * Cannot be constructed. + */ + private constructor(); + static isErrorCode: (error: string) => boolean; + /** + * Decodes a Balancer error code into the corresponding reason + * @param error - a Balancer error code of the form `BAL#000` + * @returns The decoded error reason + */ + static parseErrorCode: (error: string) => string; + /** + * Decodes a Balancer error code into the corresponding reason + * @param error - a Balancer error code of the form `BAL#000` + * @returns The decoded error reason if passed a valid error code, otherwise returns passed input + */ + static tryParseErrorCode: (error: string) => string; + /** + * Tests whether a string is a known Balancer error message + * @param error - a string to be checked verified as a Balancer error message + */ + static isBalancerError: (error: string) => boolean; + /** + * Encodes an error string into the corresponding error code + * @param error - a Balancer error message string + * @returns a Balancer error code of the form `BAL#000` + */ + static encodeError: (error: string) => string; +} + +type Account = string | Signer$1 | Contract; +declare function accountToAddress(account: Account): Promise; +declare enum RelayerAction { + JoinPool = "JoinPool", + ExitPool = "ExitPool", + Swap = "Swap", + BatchSwap = "BatchSwap", + SetRelayerApproval = "SetRelayerApproval" +} +declare class RelayerAuthorization { + /** + * Cannot be constructed. + */ + private constructor(); + static encodeCalldataAuthorization: (calldata: string, deadline: BigNumberish, signature: string) => string; + static signJoinAuthorization: (validator: Contract, user: Signer$1 & TypedDataSigner, allowedSender: Account, allowedCalldata: string, deadline?: BigNumberish, nonce?: BigNumberish) => Promise; + static signExitAuthorization: (validator: Contract, user: Signer$1 & TypedDataSigner, allowedSender: Account, allowedCalldata: string, deadline?: BigNumberish, nonce?: BigNumberish) => Promise; + static signSwapAuthorization: (validator: Contract, user: Signer$1 & TypedDataSigner, allowedSender: Account, allowedCalldata: string, deadline?: BigNumberish, nonce?: BigNumberish) => Promise; + static signBatchSwapAuthorization: (validator: Contract, user: Signer$1 & TypedDataSigner, allowedSender: Account, allowedCalldata: string, deadline?: BigNumberish, nonce?: BigNumberish) => Promise; + static signSetRelayerApprovalAuthorization: (validator: Contract, user: Signer$1 & TypedDataSigner, allowedSender: Account, allowedCalldata: string, deadline?: BigNumberish, nonce?: BigNumberish) => Promise; + static signAuthorizationFor: (type: RelayerAction, validator: Contract, user: Signer$1 & TypedDataSigner, allowedSender: Account, allowedCalldata: string, deadline?: BigNumberish, nonce?: BigNumberish) => Promise; +} +declare class BalancerMinterAuthorization { + /** + * Cannot be constructed. + */ + private constructor(); + static signSetMinterApproval: (minterContract: Contract, minter: Account, approval: boolean, user: Signer$1 & TypedDataSigner, deadline?: BigNumberish, nonce?: BigNumberish) => Promise<{ + v: number; + r: string; + s: string; + deadline: BigNumber; + }>; +} + +declare const signPermit: (token: Contract, owner: Signer$1 & TypedDataSigner, spender: Account, amount: BigNumberish, deadline?: BigNumberish, nonce?: BigNumberish) => Promise<{ + v: number; + r: string; + s: string; + deadline: BigNumber; + nonce: BigNumber; +}>; + +declare const AMP_PRECISION = 3; +type ParsedPoolInfo = { + bptIndex: number; + higherBalanceTokenIndex: number; + ampWithPrecision: bigint; + balancesEvm: bigint[]; + balancesEvmWithoutBpt: bigint[]; + priceRates: bigint[]; + priceRatesWithoutBpt: bigint[]; + swapFeeEvm: bigint; + poolTokens: string[]; + poolTokensWithoutBpt: string[]; + weights: bigint[]; + scalingFactors: bigint[]; + scalingFactorsWithoutBpt: bigint[]; + scalingFactorsRaw: bigint[]; + scalingFactorsRawWithoutBpt: bigint[]; + upScaledBalances: bigint[]; + upScaledBalancesWithoutBpt: bigint[]; + totalSharesEvm: bigint; +}; +/** + * Parse pool info into EVM amounts. Sorts by token order if wrappedNativeAsset param passed. + * @param pool Pool object to be parsed + * @param wrappedNativeAsset e.g. wETH address + * @param unwrapNativeAsset if true, changes wETH address to ETH address + * @returns parsed pool info + */ +declare const parsePoolInfo: (pool: Pool$1, wrappedNativeAsset?: string, unwrapNativeAsset?: boolean) => ParsedPoolInfo; + +declare function tokensToTokenPrices(tokens: Token[]): TokenPrices$1; +declare function tokenAddressForPricing(address: string, chainId: Network): string; +/** + * Maps testnet tokens, eg: on Göreli to a mainnet one. + * Used to get the pricing information on networks not supported by a price feed. + * + * @param address Address on a testnet network + */ +declare const addressMapIn: (address: string, chainId: Network) => string; +/** + * Finds an underlying token address for a wrapped one + * + * @param wrappedAddress + * @param chainId + * @returns underlying token address + */ +declare const unwrapToken: (wrappedAddress: string, chainId: Network) => string; +declare const getEthValue: (tokens: string[], amounts: string[]) => BigNumber; + +/** + * Debouncer for different attributes requested over time, which need to be aggregated into a single resolving call + * + * Choosing deferred promise since we have setTimeout that returns a promise + * Some reference for history buffs: https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns + */ +interface Promised { + promise: Promise; + resolve: (value: T) => void; + reject: (reason: unknown) => void; +} +/** + * Aggregates attributes and exectutes a debounced call + * + * @param fn Function to debounce + * @param wait Debouncing waiting time [ms] + * @param limit Maximum number of attributes to execute in one promise + * @returns Debouncer instance + */ +declare class Debouncer { + private fn; + private wait; + private limit; + requestSets: Set[]; + promisedCalls: Promised[]; + promisedCount: number; + timeout?: ReturnType; + debounceCancel: () => void; + constructor(fn: (attrs: A[]) => Promise, wait?: number, limit?: number); + fetch(attr?: A): Promise; + execute(timeout?: number): Promise; +} + +/** + * Scales a number up by 10 ^ decimals. Also ensures the returned value is an + * integer, any additional decimals post scaling are removed. + * @param value The value to be scaled up + * @param decimals The total decimal places / order of magnitude to scale by + * @returns The scaled value + */ +declare function parseFixed(value: string, decimals?: BigNumberish): BigNumber; +/** + * Scales a number down by 10 ^ decimals. Also ensures the returned value doesn't + * have a .0 at the end, so integers are returned as integers. + * @param value The value to be scaled down + * @param decimals The total decimal places / order of magnitude to scale down by + * @returns The scaled value + */ +declare function formatFixed(value: BigNumberish, decimals: BigNumberish): string; +declare function parseToBigInt18(value: string): bigint; +declare function formatFromBigInt18(value: bigint): string; +/** + * Like parseEther but for numbers. Converts floating point to BigNumber using 18 decimals + */ +declare const bn: (value: number) => BigNumber; + +/** + * Multiplies input by slippage amount + * + * @param amount Input amount (not parsed) + * @param slippage Slippage value in bps - i.e. 50 = 0.5% + * @returns Result delta from multiplying amount and slippage + */ +declare const mulSlippage: (amount: BigNumber, slippage: BigNumber) => BigNumber; +/** + * Reduce input amount by slippage factor + * + * @param amount Input in EVM amounts + * @param slippage Slippage value in bps - i.e. 50 = 0.5% + * @returns Result amount subtracting slippage + */ +declare const subSlippage: (amount: BigNumber, slippage: BigNumber) => BigNumber; +/** + * Increase input amount by slippage factor + * + * @param amount Input in EVM amounts + * @param slippage Slippage value in bps - i.e. 50 = 0.5% + * @returns Result amount adding slippage + */ +declare const addSlippage: (amount: BigNumber, slippage: BigNumber) => BigNumber; + +declare const isSameAddress: (address1: string, address2: string) => boolean; +declare function insert(arr: T[], index: number, newItem: T): T[]; +/** + * Returns a new array with item on the specified index replaced by newItem + * @param arr + * @param index + * @param newItem + */ +declare function replace(arr: T[], index: number, newItem: T): T[]; +/** + * Removes item from array at specified index and returns new array. (Does not mutate original) + * @param arr Original array + * @param index Index of item to be removed + * @returns New array with item at index removed + */ +declare function removeItem(arr: T[], index: number): T[]; +/** + * REORDER ARRAYS USING A REFERENCE AND ORIGINAL ARRAY, + * Example: + * Input -> reference: [c,b,a], original: [a,b,c], others: [[1,2,3], [4,5,6]] + * Sorts like -> [[c,b,a],[3,2,1],[6,5,4]] + * Returns -> [6,5,4] + * @param reference + * @param original + * @param others + * @returns Sorted others + */ +declare function reorderArrays(reference: T[], original: T[], ...others: unknown[][]): unknown[][]; +declare function isLinearish(poolType: string): boolean; +declare function truncateAddresses(addresses: string[]): string[]; +declare const findEventInReceiptLogs: ({ receipt, to, contractInterface, logName, }: { + receipt: TransactionReceipt; + to: Address; + contractInterface: Interface; + logName: string; +}) => LogDescription; +declare const getRandomBytes32: () => string; + +/** + * Simple coingecko price source implementation. Configurable by network and token addresses. + */ +declare class CoingeckoPriceRepository implements Findable { + private chainId; + prices: { + [key: string]: Promise; + }; + nativePrice?: Promise; + private readonly url; + private readonly urlNative; + private readonly coingeckoApiKeyHeaderName; + baseTokenAddresses: string[]; + debouncer: Debouncer; + apiKey?: string; + constructor(tokenAddresses: string[], chainId?: Network, coingecko?: CoingeckoConfig); + private fetch; + private fetchNative; + find(inputAddress: string): Promise; + findBy(attribute: string, value: string): Promise; + private platform; +} + +/** + * Simple coingecko price source implementation. Configurable by network and token addresses. + */ +declare class CoingeckoHistoricalPriceRepository implements Findable { + private chainId; + prices: TokenPrices$1; + nativePrice?: Promise; + private readonly urlBase; + private readonly apiKey?; + private readonly coingeckoApiKeyHeaderName; + constructor(chainId?: Network, coingecko?: CoingeckoConfig); + private fetch; + find(address: string): Promise; + findBy(inputAddress: string, timestamp: number): Promise; + private platform; + private urlRange; +} + +declare class SubgraphPriceRepository implements Findable { + private subgraphUrl; + private chainId; + prices: { + [key: string]: Promise; + }; + debouncer: Debouncer; + constructor(subgraphUrl: string, chainId?: Network); + private fetch; + find(inputAddress: string): Promise; + findBy(attribute: string, value: string): Promise; +} + +declare const yieldTokens: { + 1: { + waUSDT: string; + waUSDC: string; + waDAI: string; + }; + 137: { + wamDAI: string; + wamUSDC: string; + wamUSDT: string; + }; +}; +declare const wrappedTokensMap: { + 1: { + [x: string]: { + aToken: string; + underlying: string; + }; + }; + 137: { + [x: string]: { + aToken: string; + underlying: string; + }; + }; +}; +interface IAaveRates { + getRate: (address: string) => Promise; +} +declare class AaveRates implements IAaveRates { + private multicall; + private network; + rates?: Promise<{ + [wrappedATokenAddress: string]: number; + }>; + constructor(multicall: Multicall, network: Network); + private fetch; + getRate(wrappedAToken: string): Promise; +} + +declare class TokenPriceProvider implements Findable { + private coingeckoRepository; + private subgraphRepository; + private aaveRates; + constructor(coingeckoRepository: Findable, subgraphRepository: Findable, aaveRates: IAaveRates); + find(address: string): Promise; + findBy(attribute: string, value: string): Promise; +} + +declare class HistoricalPriceProvider implements Findable { + private coingeckoRepository; + private aaveRates; + constructor(coingeckoRepository: Findable, aaveRates: IAaveRates); + /** + * get the historical price at time of call + * + * @param address the token address + */ + find(address: string): Promise; + /** + * get the historical price at the given timestamp. + * + * @param address the token address + * @param timestamp the UNIX timestamp + * @private + */ + findBy(address: string, timestamp: number): Promise; +} + +declare const APR_THRESHOLD = 10000; +/** + * For proportional exits from ComposableStable pools the ExactBPTInForTokensOut + * exit type was removed. Therefore we have to use BPTInForExactTokensOut which + * makes proportional exits using a user's total BPT balance impossible. In + * order to 'fix' this we need to subtract a little bit from the bptIn value + * when calculating the ExactTokensOut. The variable below is that "little bit". + */ +declare const SHALLOW_COMPOSABLE_STABLE_BUFFER = 1000000; +type FactoryType = 'oracleWeightedPool' | 'weightedPool' | 'stablePool' | 'managedPool' | 'liquidityBootstrappingPool' | 'boostedPool' | 'composableStablePool'; +type PoolMetadata = { + name: string; + hasIcon: boolean; +}; +type NamedPools = { + staBAL: string; + bbAaveUSD: { + v1: string; + v2: string; + }; + xMatic: { + v1: string; + v2: string; + }; + stMatic: { + v1: string; + v2: string; + }; + mai4: { + mai4: string; + maiBbaUsd: string; + }; + veBAL: string; +}; +type Pools$1 = { + IdsMap: Partial; + Pagination: { + PerPage: number; + PerPool: number; + PerPoolInitial: number; + }; + DelegateOwner: string; + ZeroAddress: string; + DynamicFees: { + Gauntlet: string[]; + }; + BlockList: string[]; + ExcludedPoolTypes: string[]; + Stable: { + AllowList: string[]; + }; + Investment: { + AllowList: string[]; + }; + Factories: Record; + Stakable: { + AllowList: string[]; + }; + Metadata: Record; +}; +declare function POOLS(networkId: Network): Pools$1; + +interface TransactionData$1 { + to: string; + from: string; + callData: string; + tokensOut: string[]; + expectedTokensValue: BigNumber[]; + functionName: string; +} +interface TokenBalance { + [token: string]: BigNumber; +} +interface IClaimService { + getClaimableRewardTokens(userAddress: string): Promise; + buildClaimRewardTokensRequest(gaugeAddresses: string[], userAddress: string): Promise; + getClaimableVeBalTokens(userAddress: string, claimableTokens: string[]): Promise; + buildClaimVeBalTokensRequest(userAddress: string, claimableTokens: string[]): Promise; +} + +interface FeeDistributorData { + balAmount: number; + bbAUsdAmount: number; + veBalSupply: number; + bbAUsdPrice: number; + balAddress: string; +} +interface BaseFeeDistributor { + multicallData: (ts: number) => Promise; + getClaimableBalances(userAddress: string, claimableTokens: string[]): Promise; + claimBalances(userAddress: string, claimableTokens: string[]): string; +} +declare class FeeDistributorRepository implements BaseFeeDistributor { + private multicall; + private feeDistributorAddress; + private balAddress; + private veBalAddress; + private bbAUsdAddress; + feeDistributor: Contract; + data?: FeeDistributorData; + constructor(multicall: Multicall, feeDistributorAddress: string, balAddress: string, veBalAddress: string, bbAUsdAddress: string, provider: Provider); + fetch(timestamp: number): Promise; + multicallData(timestamp: number): Promise; + getPreviousWeek(fromTimestamp: number): number; + getClaimableBalances(userAddress: string, claimableTokens: string[]): Promise; + claimBalances(userAddress: string, claimableTokens: string[]): string; + extractTokenBalance(claimableTokens: string[], amounts: (BigNumber | undefined | null)[]): TokenBalance; +} + +declare class FeeCollectorRepository implements Findable { + private provider; + vault: Contract; + swapFeePercentage?: number; + constructor(vaultAddress: string, provider: Provider); + fetch(): Promise; + find(): Promise; + findBy(): Promise; +} + +declare class TokenYieldsRepository implements Findable { + private url; + private yields?; + constructor(url?: string); + fetch(): Promise<{ + [address: string]: number; + }>; + find(address: string): Promise; + findBy(attribute: string, value: string): Promise; +} + +declare class BlockNumberRepository implements Findable { + private endpoint; + blocks: { + [ts: string]: Promise; + }; + constructor(endpoint: string); + find(from: string): Promise; + findBy(attribute?: string, value?: string): Promise; +} + +type GraphQLFilterOperator = 'gt' | 'lt' | 'eq' | 'in' | 'not_in' | 'contains'; +type GraphQLFilter = { + [operator in GraphQLFilterOperator]?: any; +}; +interface GraphQLArgs { + chainId?: number; + first?: number; + skip?: number; + nextToken?: string; + orderBy?: string; + orderDirection?: string; + block?: { + number?: number; + }; + where?: Record; +} +interface GraphQLArgsFormatter { + format(args: GraphQLArgs): unknown; +} + +declare class SubgraphPoolDataService implements PoolDataService { + private readonly client; + private readonly provider; + private readonly network; + private readonly sorConfig?; + private readonly defaultArgs; + constructor(client: SubgraphClient, provider: Provider, network: BalancerNetworkConfig, sorConfig?: BalancerSdkSorConfig | undefined, query?: GraphQLQuery); + /** + * Returns pools from the subgraph filtered by queryArgs with on-chain balances + * + * @param queryArgs + * @returns SubgraphPoolBase[] + */ + getPools(queryArgs?: GraphQLArgs): Promise; + private getSubgraphPools; +} + +type VeBalLockInfo = { + lockedEndDate: number; + lockedAmount: string; + totalSupply: string; + epoch: string; + hasExistingLock: boolean; + isExpired: boolean; +}; +type VeBalLockInfoResult = { + locked: BigNumber[]; + epoch: BigNumber; + totalSupply: BigNumber; +}; +declare class VeBal { + private veBalAddress; + private multicall; + constructor(veBalAddress: string, multicall: Multicall); + getLockInfo(account: string): Promise; + formatLockInfo(lockInfo: VeBalLockInfoResult): VeBalLockInfo; +} + +declare class VeBalProxy { + instance: Contract; + constructor(addresses: ContractAddresses, provider: Provider); + getAdjustedBalance(account: string): Promise; +} + +type ContractFactory = (address: string, signerOrProvider: Signer$1 | Provider) => Contract; +interface ContractInstances { + aaveLinearPoolFactory?: AaveLinearPoolFactory; + balancerHelpers: BalancerHelpers; + BasePool: ContractFactory; + composableStablePoolFactory?: ComposableStablePoolFactory; + ERC20: ContractFactory; + erc4626LinearPoolFactory?: ERC4626LinearPoolFactory; + eulerLinearPoolFactory?: EulerLinearPoolFactory; + gaugeClaimHelper?: GaugeClaimHelper; + gearboxLinearPoolFactory?: GearboxLinearPoolFactory; + gyroConfig?: GyroConfig; + lidoRelayer?: LidoRelayer; + liquidityGauge: ContractFactory; + multicall: Multicall; + relayer: Contract; + vault: Vault; + veBal?: VeBal; + veBalProxy?: VeBalProxy; + weightedPoolFactory?: WeightedPoolFactory; + yearnLinearPoolFactory?: YearnLinearPoolFactory; +} +declare class Contracts { + contractAddresses: ContractAddresses; + private instances; + /** + * Create instances of Balancer contracts connected to passed provider. + * @param { Network | ContractAddresses } networkOrAddresses + * @param { Provider } provider + */ + constructor(networkOrAddresses: Network | ContractAddresses, provider: Provider); + /** + * Expose contract instances. + */ + get contracts(): ContractInstances; + /** + * Helper to create ERC20 contract. + * @param { string } address ERC20 address. + * @param { Signer | Provider } signerOrProvider Signer or Provider. + * @returns Contract. + */ + getErc20(address: string, signerOrProvider: Signer$1 | Provider): ERC20; + /** + * Helper to create base pool contract. + * @param { string } address pool address. + * @param { Signer | Provider } signerOrProvider Signer or Provider. + * @returns Contract. + */ + getBasePool(address: string, signerOrProvider: Signer$1 | Provider): Contract; + /** + * Helper to create LiquidityGauge contract. + * @param { string } address Gauge address. + * @param { Signer | Provider} signerOrProvider Signer or Provider. + * @returns Contract. + */ + getLiquidityGauge: typeof LiquidityGaugeV5__factory.connect; +} + +declare class Data implements BalancerDataRepositories { + pools: PoolsSubgraphRepository; + poolsForSimulations: SubgraphPoolDataService; + poolsOnChain: PoolsSubgraphOnChainRepository; + yesterdaysPools: PoolsSubgraphRepository | undefined; + poolShares: PoolSharesRepository; + poolGauges: PoolGaugesRepository | undefined; + gaugeShares: GaugeSharesRepository | undefined; + tokenPrices: TokenPriceProvider; + tokenHistoricalPrices: HistoricalPriceProvider; + tokenMeta: StaticTokenProvider; + liquidityGauges: LiquidityGaugeSubgraphRPCProvider | undefined; + feeDistributor: FeeDistributorRepository | undefined; + feeCollector: FeeCollectorRepository; + protocolFees: ProtocolFeesProvider | undefined; + tokenYields: TokenYieldsRepository; + blockNumbers: BlockNumberRepository | undefined; + poolJoinExits: PoolJoinExitRepository; + gyroConfigRepository: GyroConfigRepositoryImpl | undefined; + constructor(networkConfig: BalancerNetworkConfig, provider: Provider, contracts: Contracts, subgraphQuery?: GraphQLQuery, coingecko?: CoingeckoConfig); +} + +declare class BalancerAPIArgsFormatter implements GraphQLArgsFormatter { + format(args: GraphQLArgs): GraphQLArgs; +} + +declare class SubgraphArgsFormatter implements GraphQLArgsFormatter { + operatorMap: Record; + constructor(); + format(args: GraphQLArgs): GraphQLArgs; +} + +declare class GraphQLArgsBuilder { + readonly args: GraphQLArgs; + constructor(args: GraphQLArgs); + merge(other: GraphQLArgsBuilder): GraphQLArgsBuilder; + format(formatter: GraphQLArgsFormatter): unknown; +} + +interface AprBreakdown { + swapFees: number; + tokenAprs: { + total: number; + breakdown: { + [address: string]: number; + }; + }; + stakingApr: { + min: number; + max: number; + }; + rewardAprs: { + total: number; + breakdown: { + [address: string]: number; + }; + }; + protocolApr: number; + min: number; + max: number; +} +/** + * Calculates pool APR via summing up sources of APR: + * + * 1. Swap fees (pool level) data coming from subgraph + * 2. Yield bearing pool tokens, with data from external sources eg: http endpoints, subgraph, onchain + * * stETH + * * aave + * * usd+ + * map token: calculatorFn + * 3. Staking rewards based from veBal gauges + */ +declare class PoolApr { + private pools; + private tokenPrices; + private tokenMeta; + private tokenYields; + private feeCollector; + private yesterdaysPools?; + private liquidityGauges?; + private feeDistributor?; + private gyroConfigRepository?; + constructor(pools: Findable, tokenPrices: Findable, tokenMeta: Findable, tokenYields: Findable, feeCollector: Findable, yesterdaysPools?: Findable | undefined, liquidityGauges?: Findable | undefined, feeDistributor?: BaseFeeDistributor | undefined, gyroConfigRepository?: GyroConfigRepository | undefined); + /** + * Pool revenue via swap fees. + * Fees and liquidity are takes from subgraph as USD floats. + * + * @returns APR [bsp] from fees accumulated over last 24h + */ + swapFees(pool: Pool$1): Promise; + /** + * Pool revenue from holding yield-bearing wrapped tokens. + * + * @returns APR [bsp] from tokens contained in the pool + */ + tokenAprs(pool: Pool$1): Promise; + /** + * Calculates staking rewards based on veBal gauges deployed with Curve Finance contracts. + * https://curve.readthedocs.io/dao-gauges.html + * + * Terminology: + * - LP token of a gauge is a BPT of a pool + * - Depositing into a gauge is called staking on the frontend + * - gauge totalSupply - BPT tokens deposited to a gauge + * - gauge workingSupply - effective BPT tokens participating in reward distribution. sum of 40% deposit + 60% boost from individual user's veBal + * - gauge relative weight - weight of this gauge in bal inflation distribution [0..1] scaled to 1e18 + * + * APR sources: + * - gauge BAL emissions = min: 40% of totalSupply, max: 40% of totalSupply + 60% of totalSupply * gauge LPs voting power + * https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/liquidity-mining/contracts/gauges/ethereum/LiquidityGaugeV5.vy#L338 + * - gauge reward tokens: Admin or designated depositor has an option to deposit additional reward with a weekly accruing cadence. + * https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/liquidity-mining/contracts/gauges/ethereum/LiquidityGaugeV5.vy#L641 + * rate: amount of token per second + * + * @param pool + * @param boost range between 1 and 2.5 + * @returns APR [bsp] from protocol rewards. + */ + stakingApr(pool: Pool$1, boost?: number): Promise; + /** + * Some gauges are holding tokens distributed as rewards to LPs. + * + * @param pool + * @returns APR [bsp] from token rewards. + */ + rewardAprs(pool: Pool$1): Promise; + /** + * 80BAL-20WETH pool is accruing protocol revenue. + * + * @param pool + * @returns accrued protocol revenue as APR [bsp] + */ + protocolApr(pool: Pool$1): Promise; + /** + * Composes all sources for total pool APR. + * + * @returns pool APR split [bsp] + */ + apr(pool: Pool$1): Promise; + private last24hFees; + /** + * Total Liquidity based on USD token prices taken from external price feed, eg: coingecko. + * + * @param pool + * @returns Pool liquidity in USD + */ + private totalLiquidity; + /** + * BPT price as pool totalLiquidity / pool total Shares + * Total Liquidity is calculated based on USD token prices taken from external price feed, eg: coingecko. + * + * @param pool + * @returns BPT price in USD + */ + private bptPrice; + private protocolSwapFeePercentage; + private rewardTokenApr; +} + +interface ParamsBuilder { + buildQueryJoinExactIn(params: JoinExactInParams): queryJoinParams; + buildQueryJoinExactOut(params: JoinExactOutParams): queryJoinParams; + buildQueryExitToSingleToken(params: ExitToSingleTokenParams): queryExitParams; + buildQueryExitProportionally(params: ExitProportionallyParams): queryExitParams; + buildQueryExitExactOut(params: ExitExactOutParams): queryExitParams; +} +interface JoinExactInParams { + maxAmountsInByToken: Map; + minimumBPT?: BigNumber; +} +interface JoinExactOutParams { + maxAmountIn?: BigNumber; + bptOut: BigNumber; + tokenIn: string; +} +interface ExitToSingleTokenParams { + minAmountOut?: BigNumber; + bptIn: BigNumber; + tokenOut: string; +} +interface ExitProportionallyParams { + minAmountsOut?: BigNumber[]; + bptIn: BigNumber; +} +interface ExitExactOutParams { + minAmountsOut: BigNumber[]; + tokensOut: string[]; + maxBptIn?: BigNumber; +} +type queryJoinParams = [ + poolId: string, + sender: string, + recipient: string, + request: { + assets: string[]; + maxAmountsIn: BigNumber[]; + userData: string; + fromInternalBalance: boolean; + } +]; +type queryExitParams = [ + poolId: string, + sender: string, + recipient: string, + request: { + assets: string[]; + minAmountsOut: BigNumber[]; + userData: string; + toInternalBalance: boolean; + } +]; + +type Address = string; +interface BalancerSdkConfig { + network: Network | BalancerNetworkConfig; + rpcUrl: string; + customSubgraphUrl?: string; + subgraphQuery?: GraphQLQuery; + sor?: Partial; + tenderly?: BalancerTenderlyConfig; + enableLogging?: boolean; + coingecko?: CoingeckoConfig; +} +interface BalancerTenderlyConfig { + accessKey: string; + user: string; + project: string; + blockNumber?: number; +} +interface BalancerSdkSorConfig { + tokenPriceService: 'api' | 'coingecko' | 'subgraph' | TokenPriceService; + poolDataService: 'subgraph' | PoolDataService; + fetchOnChainBalances: boolean; +} +interface ContractAddresses { + vault: string; + multicall: string; + poolDataQueries: string; + gaugeClaimHelper?: string; + balancerHelpers: string; + balancerMinter?: string; + lidoRelayer?: string; + balancerRelayer: string; + gaugeController?: string; + feeDistributor?: string; + veBal?: string; + veBalProxy?: string; + protocolFeePercentagesProvider?: string; + weightedPoolFactory?: string; + composableStablePoolFactory?: string; + aaveLinearPoolFactory?: string; + erc4626LinearPoolFactory?: string; + eulerLinearPoolFactory?: string; + gearboxLinearPoolFactory?: string; + yearnLinearPoolFactory?: string; + [key: string]: string | undefined; +} +interface BalancerNetworkConfig { + chainId: Network; + addresses: { + contracts: ContractAddresses; + tokens: { + wrappedNativeAsset: string; + lbpRaisingTokens?: string[]; + stETH?: string; + wstETH?: string; + bal: string; + veBal?: string; + bbaUsd?: string; + }; + }; + tenderly?: BalancerTenderlyConfig; + urls: { + subgraph: string; + gaugesSubgraph?: string; + blockNumberSubgraph?: string; + }; + thirdParty: { + coingecko: { + nativeAssetId: string; + platformId: string; + }; + }; + averageBlockTime?: number; + multicallBatchSize?: number; + pools: { + wETHwstETH?: PoolReference; + }; + poolsToIgnore?: string[]; + sorConnectingTokens?: { + symbol: string; + address: string; + }[]; + sorTriPathMidPoolIds?: string[]; +} +interface BalancerDataRepositories { + feeDistributor?: BaseFeeDistributor; + feeCollector: Findable; + gaugeShares?: GaugeSharesRepository; + gyroConfigRepository?: GyroConfigRepository; + liquidityGauges?: Findable; + protocolFees?: ProtocolFeesProvider; + /** + * Why do we need 3 different pools repositories? + */ + pools: Findable & Searchable; + poolsForSimulations: SubgraphPoolDataService; + poolGauges?: PoolGaugesRepository; + poolJoinExits: PoolJoinExitRepository; + poolsOnChain: Findable & Searchable & Cacheable; + poolShares: PoolSharesRepository; + tokenHistoricalPrices: Findable; + tokenMeta: Findable; + tokenPrices: Findable; + tokenYields: Findable; + yesterdaysPools?: Findable & Searchable; +} +type PoolReference = { + id: string; + address: string; +}; +declare enum PoolSpecialization { + GeneralPool = 0, + MinimalSwapInfoPool = 1, + TwoTokenPool = 2 +} +type JoinPoolRequest$1 = { + assets: string[]; + maxAmountsIn: BigNumberish[]; + userData: string; + fromInternalBalance: boolean; +}; +type ExitPoolRequest$1 = { + assets: string[]; + minAmountsOut: string[]; + userData: string; + toInternalBalance: boolean; +}; +declare enum UserBalanceOpKind { + DepositInternal = 0, + WithdrawInternal = 1, + TransferInternal = 2, + TransferExternal = 3 +} +type UserBalanceOp = { + kind: UserBalanceOpKind; + asset: string; + amount: BigNumberish; + sender: string; + recipient: string; +}; +declare enum PoolBalanceOpKind { + Withdraw = 0, + Deposit = 1, + Update = 2 +} +type PoolBalanceOp = { + kind: PoolBalanceOpKind; + poolId: string; + token: string; + amount: BigNumberish; +}; +interface TransactionData { + contract?: Contract; + function: string; + params: string[]; + outputs?: { + amountsIn?: string[]; + amountsOut?: string[]; + }; +} +type Currency = 'eth' | 'usd'; +type Price = { + [currency in Currency]?: string; +}; +type TokenPrices$1 = { + [address: string]: Price; +}; +type HistoricalPrices = { + prices: [[number, number]]; + market_caps: [[number, number]]; + total_volumes: [[number, number]]; +}; +interface Token { + address: string; + decimals?: number; + symbol?: string; + price?: Price; +} +interface PoolToken extends Token { + balance: string; + priceRate?: string; + weight?: string | null; + isExemptFromYieldProtocolFee?: boolean; + token?: SubPoolMeta; +} +interface SubPoolMeta { + pool: SubPool | null; + latestUSDPrice?: string; + latestFXPrice?: string; +} +interface SubPool { + id: string; + address: string; + poolType: PoolType; + totalShares: string; + mainIndex: number; + tokens?: PoolToken[]; +} +interface OnchainTokenData { + balance: string; + weight: number; + decimals: number; + logoURI: string | undefined; + name: string; + symbol: string; +} +interface OnchainPoolData { + tokens: Record; + totalSupply: string; + decimals: number; + swapFee: string; + amp?: string; + swapEnabled: boolean; + tokenRates?: string[]; +} +declare enum PoolType { + Weighted = "Weighted", + Investment = "Investment", + Stable = "Stable", + ComposableStable = "ComposableStable", + MetaStable = "MetaStable", + StablePhantom = "StablePhantom", + LiquidityBootstrapping = "LiquidityBootstrapping", + Element = "Element", + Gyro2 = "Gyro2", + Gyro3 = "Gyro3", + GyroE = "GyroE", + Managed = "Managed", + AaveLinear = "AaveLinear", + Linear = "Linear", + EulerLinear = "EulerLinear", + ERC4626Linear = "ERC4626Linear", + BeefyLinear = "BeefyLinear", + GearboxLinear = "GearboxLinear", + MidasLinear = "MidasLinear", + ReaperLinear = "ReaperLinear", + SiloLinear = "SiloLinear", + TetuLinear = "TetuLinear", + YearnLinear = "YearnLinear", + FX = "FX" +} +interface Pool$1 { + id: string; + name: string; + address: string; + chainId: number; + poolType: PoolType; + poolTypeVersion: number; + swapFee: string; + protocolYieldFeeCache: string; + protocolSwapFeeCache: string; + owner?: string; + factory?: string; + tokens: PoolToken[]; + tokensList: string[]; + tokenAddresses?: string[]; + totalLiquidity: string; + totalShares: string; + totalSwapFee?: string; + totalSwapVolume?: string; + onchain?: OnchainPoolData; + createTime?: number; + mainTokens?: string[]; + wrappedTokens?: string[]; + unwrappedTokens?: string[]; + isNew?: boolean; + volumeSnapshot?: string; + feesSnapshot?: string; + boost?: string; + symbol?: string; + swapEnabled: boolean; + amp?: string; + wrappedIndex?: number; + mainIndex?: number; + apr?: AprBreakdown; + liquidity?: string; + totalWeight: string; + lowerTarget: string; + upperTarget: string; + priceRateProviders?: PriceRateProvider[]; + lastJoinExitInvariant?: string; + isInRecoveryMode?: boolean; + isPaused?: boolean; + tokenRates?: string[]; +} +interface PriceRateProvider { + address: string; + token: { + address: string; + }; +} +/** + * Pool use-cases / controller layer + */ +interface PoolWithMethods extends Pool$1, ParamsBuilder { + /** + * Build join pool transaction parameters with exact tokens in and minimum BPT out based on slippage tolerance + * @param joiner Account address joining pool + * @param tokensIn Token addresses provided for joining pool (same length and order as amountsIn) + * @param amountsIn Token amounts provided for joining pool in EVM scale + * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5% + * @returns transaction request ready to send with signer.sendTransaction + */ + buildJoin: (joiner: string, tokensIn: string[], amountsIn: string[], slippage: string) => JoinPoolAttributes; + /** + * Calculate price impact of bptAmount against zero price impact BPT amount. + * @param tokenAmounts Token amounts. Needs a value for each pool token. + * @param bptAmount BPT amount for comparison (in EVM scale). + * @param isJoin boolean indicating if the price impact is for a join or exit. + * @returns price impact in EVM scale. + */ + calcPriceImpact: (tokenAmounts: string[], bptAmount: string, isJoin: boolean) => Promise; + /** + * Build exit pool transaction parameters with exact BPT in and minimum token amounts out based on slippage tolerance + * @param exiter Account address exiting pool + * @param bptIn BPT provided for exiting pool in EVM scale + * @param slippage Maximum slippage tolerance in bps. i.e. 50 = 5% + * @param shouldUnwrapNativeAsset Indicates whether wrapped native asset should be unwrapped after exit. Defaults to false. + * @param singleTokenOut Optional: token address that if provided will exit to given token + * @returns transaction request ready to send with signer.sendTransaction + */ + buildExitExactBPTIn: (exiter: string, bptIn: string, slippage: string, shouldUnwrapNativeAsset?: boolean, singleTokenOut?: string, toInternalBalance?: boolean) => ExitExactBPTInAttributes; + /** + * Build exit pool transaction parameters with exact tokens out and maximum BPT in based on slippage tolerance + * @param exiter Account address exiting pool + * @param tokensOut Tokens provided for exiting pool (same length and order as amountsOut) + * @param amountsOut Amounts provided for exiting pool in EVM scale + * @param slippage Maximum slippage tolerance in bps. i.e. 50 = 5% + * @returns transaction request ready to send with signer.sendTransaction + */ + buildExitExactTokensOut: (exiter: string, tokensOut: string[], amountsOut: string[], slippage: string, toInternalBalance?: boolean) => ExitExactTokensOutAttributes; + /** + * Build recovery exit pool transaction parameters with exact BPT in and minimum token amounts out based on slippage tolerance + * @param exiter Account address exiting pool + * @param bptIn BPT amount in EVM scale + * @param slippage Maximum slippage tolerance in basis points. i.e. 50 = 5% + * @returns transaction request ready to send with signer.sendTransaction + */ + buildRecoveryExit: (exiter: string, bptIn: string, slippage: string, toInternalBalance?: boolean) => ExitExactBPTInAttributes; + /** + * Calculate spot price for swapping tokenIn with tokenOut + * @param tokenIn Token address + * @param tokenOut Token address + * @returns spot price for swapping tokenIn with tokenOut in EVM scale + */ + calcSpotPrice: (tokenIn: string, tokenOut: string) => string; + bptIndex: number; +} +interface GraphQLQuery { + args: GraphQLArgs; + attrs: any; +} +type CoingeckoConfig = { + coingeckoApiKey: string; + tokensPerPriceRequest?: number; + isDemoApiKey?: boolean; +}; + +/** + * Splits a poolId into its components, i.e. pool address, pool specialization and its nonce + * @param poolId - a bytes32 string of the pool's ID + * @returns an object with the decomposed poolId + */ +declare const splitPoolId: (poolId: string) => { + address: string; + specialization: PoolSpecialization; + nonce: BigNumber; +}; +/** + * Extracts a pool's address from its poolId + * @param poolId - a bytes32 string of the pool's ID + * @returns the pool's address + */ +declare const getPoolAddress: (poolId: string) => string; +/** + * Extracts a pool's specialization from its poolId + * @param poolId - a bytes32 string of the pool's ID + * @returns the pool's specialization + */ +declare const getPoolSpecialization: (poolId: string) => PoolSpecialization; +/** + * Extracts a pool's nonce from its poolId + * @param poolId - a bytes32 string of the pool's ID + * @returns the pool's nonce + */ +declare const getPoolNonce: (poolId: string) => BigNumber; + +interface TokenAmounts { + [token: string]: string; +} +interface SwapsOptions { + maxPools?: number; + gasPrice?: string; + deadline?: string; + maxSlippage?: number; +} +declare enum SwapType { + SwapExactIn = 0, + SwapExactOut = 1 +} +type FundManagement = { + sender: string; + recipient: string; + fromInternalBalance: boolean; + toInternalBalance: boolean; +}; +type SingleSwap = { + poolId: string; + kind: SwapType; + assetIn: string; + assetOut: string; + amount: BigNumberish; + userData: string; +}; +type Swap = { + request: SingleSwap; + funds: FundManagement; + limit: BigNumberish; + deadline: BigNumberish; + value?: BigNumberish; + outputReference?: BigNumberish; +}; +type BatchSwapStep = { + poolId: string; + assetInIndex: number; + assetOutIndex: number; + amount: string; + userData: string; +}; +type BatchSwap = { + kind: SwapType; + swaps: BatchSwapStep[]; + assets: string[]; + funds: FundManagement; + limits: BigNumberish[]; + deadline: BigNumberish; + value?: BigNumberish; + outputReferences?: { + index: BigNumberish; + key: BigNumberish; + }[]; +}; +interface SwapInput { + tokenIn: string; + tokenOut: string; + swapType: SwapType; + amount: string; +} +interface QuerySimpleFlashSwapParameters { + poolIds: string[]; + assets: BatchSwap['assets']; + flashLoanAmount: string; + vaultContract: Vault; +} +interface SimpleFlashSwapParameters { + poolIds: string[]; + assets: BatchSwap['assets']; + flashLoanAmount: string; + walletAddress: string; +} +interface QuerySimpleFlashSwapResponse { + profits: Record; + isProfitable: boolean; +} +interface FindRouteParameters { + tokenIn: string; + tokenOut: string; + amount: BigNumber; + gasPrice: BigNumber; + maxPools?: number; +} +interface BuildTransactionParameters { + userAddress: string; + recipient?: string; + swapInfo: SwapInfo; + kind: SwapType; + deadline: string; + maxSlippage: number; +} +interface SwapTransactionRequest { + to: string; + data: string; + value?: BigNumber; +} +interface SwapAttributes { + to: string; + functionName: string; + attributes: Swap | BatchSwap; + data: string; + value?: BigNumber; +} + +/** + * Helper to create limits using a defined slippage amount. + * @param tokensIn - Array of token in addresses. + * @param tokensOut - Array of token out addresses. + * @param swapType - Type of swap - SwapExactIn or SwapExactOut + * @param deltas - An array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array. + * @param assets - array contains the addresses of all assets involved in the swaps. + * @param slippage - Slippage to be applied. i.e. 5%=50000000000000000. + * @returns Returns an array (same length as assets) with limits applied for each asset. + */ +declare function getLimitsForSlippage(tokensIn: string[], tokensOut: string[], swapType: SwapType, deltas: BigNumberish[], assets: string[], slippage: BigNumberish): BigNumberish[]; + +interface PoolBPTValue { + address: string; + liquidity: string; +} +declare class Liquidity { + private pools; + private tokenPrices; + constructor(pools: Findable, tokenPrices: Findable); + getLiquidity(pool: Pool$1): Promise; + getBptPrice(pool: Pool$1): Promise; +} + +declare class Swaps { + readonly sor: SOR; + chainId: number; + vaultContract: Vault; + constructor(sorOrConfig: SOR | BalancerSdkConfig); + static getLimitsForSlippage(tokensIn: string[], tokensOut: string[], swapType: SwapType, deltas: string[], assets: string[], slippage: string): string[]; + /** + * Uses SOR to find optimal route for a trading pair and amount + * + * @param FindRouteParameters + * @param FindRouteParameters.tokenIn Address + * @param FindRouteParameters.tokenOut Address + * @param FindRouteParameters.amount BigNumber with a trade amount + * @param FindRouteParameters.gasPrice BigNumber current gas price + * @param FindRouteParameters.maxPools number of pool included in path, default 4 + * @returns Best trade route information + */ + findRouteGivenIn({ tokenIn, tokenOut, amount, gasPrice, maxPools, }: FindRouteParameters): Promise; + /** + * Uses SOR to find optimal route for a trading pair and amount + * + * @param FindRouteParameters + * @param FindRouteParameters.tokenIn Address + * @param FindRouteParameters.tokenOut Address + * @param FindRouteParameters.amount BigNumber with a trade amount + * @param FindRouteParameters.gasPrice BigNumber current gas price + * @param FindRouteParameters.maxPools number of pool included in path, default 4 + * @returns Best trade route information + */ + findRouteGivenOut({ tokenIn, tokenOut, amount, gasPrice, maxPools, }: FindRouteParameters): Promise; + /** + * Uses SOR to find optimal route for a trading pair and amount + * + * @param BuildTransactionParameters + * @param BuildTransactionParameters.userAddress Address + * @param BuildTransactionParameters.swapInfo result of route finding + * @param BuildTransactionParameters.kind 0 - givenIn, 1 - givenOut + * @param BuildTransactionParameters.deadline block linux timestamp as string + * @param BuildTransactionParameters.maxSlippage [bps], eg: 1 === 0.01%, 100 === 1% + * @returns transaction request ready to send with signer.sendTransaction + */ + buildSwap({ userAddress, recipient, swapInfo, kind, deadline, maxSlippage, }: BuildTransactionParameters): SwapAttributes; + /** + * Uses SOR to find optimal route for a trading pair and amount + * and builds a transaction request + * + * @param sender Sender of the swap + * @param recipient Reciever of the swap + * @param tokenIn Address of tokenIn + * @param tokenOut Address of tokenOut + * @param amount Amount of tokenIn to swap as a string with 18 decimals precision + * @param options + * @param options.maxPools number of pool included in path + * @param options.gasPrice BigNumber current gas price + * @param options.deadline BigNumber block timestamp + * @param options.maxSlippage [bps], eg: 1 === 0.01%, 100 === 1% + * @returns transaction request ready to send with signer.sendTransaction + */ + buildRouteExactIn(sender: string, recipient: string, tokenIn: string, tokenOut: string, amount: string, options?: SwapsOptions): Promise; + /** + * Encode batchSwap in an ABI byte string + * + * [See method for a batchSwap](https://dev.balancer.fi/references/contracts/apis/the-vault#batch-swaps). + * + * _NB: This method doesn't execute a batchSwap -- it returns an [ABI byte string](https://docs.soliditylang.org/en/latest/abi-spec.html) + * containing the data of the function call on a contract, which can then be sent to the network to be executed. + * (ex. [sendTransaction](https://web3js.readthedocs.io/en/v1.2.11/web3-eth.html#sendtransaction)). + * + * @param {BatchSwap} batchSwap - BatchSwap information used for query. + * @param {SwapType} batchSwap.kind - either exactIn or exactOut + * @param {BatchSwapSteps[]} batchSwap.swaps - sequence of swaps + * @param {string[]} batchSwap.assets - array contains the addresses of all assets involved in the swaps + * @param {FundManagement} batchSwap.funds - object containing information about where funds should be taken/sent + * @param {number[]} batchSwap.limits - limits for each token involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the minimum amount of tokens to receive (by passing a negative value) is specified + * @param {string} batchSwap.deadline - time (in Unix timestamp) after which it will no longer attempt to make a trade + * @returns {string} encodedBatchSwapData - Returns an ABI byte string containing the data of the function call on a contract + */ + static encodeBatchSwap(batchSwap: BatchSwap): string; + /** + * Encode simple flash swap into a ABI byte string + * + * A "simple" flash swap is an arbitrage executed with only two tokens and two pools, + * swapping in the first pool and then back in the second pool for a profit. For more + * complex flash swaps, you will have to use the batch swap method. + * + * Learn more: A [Flash Swap](https://dev.balancer.fi/resources/swaps/flash-swaps). + * + * @param {SimpleFlashSwapParameters} params - BatchSwap information used for query. + * @param {string} params.flashLoanAmount - initial input amount for the flash loan (first asset) + * @param {string[]} params.poolIds - array of Balancer pool ids + * @param {string[]} params.assets - array of token addresses + * @param {string} params.walletAddress - array of token addresses + * @returns {string} encodedBatchSwapData - Returns an ABI byte string containing the data of the function call on a contract + */ + static encodeSimpleFlashSwap(params: SimpleFlashSwapParameters): string; + /** + * fetchPools saves updated pools data to SOR internal onChainBalanceCache. + * + * @returns Boolean indicating whether pools data was fetched correctly (true) or not (false). + */ + fetchPools(queryArgs?: GraphQLArgs): Promise; + getPools(): SubgraphPoolBase[]; + /** + * queryBatchSwap simulates a call to `batchSwap`, returning an array of Vault asset deltas. + * @param batchSwap - BatchSwap information used for query. + * @param {SwapType} batchSwap.kind - either exactIn or exactOut. + * @param {BatchSwapStep[]} batchSwap.swaps - sequence of swaps. + * @param {string[]} batchSwap.assets - array contains the addresses of all assets involved in the swaps. + * @returns {Promise} Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the + * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at + * the same index in the `assets` array. + */ + queryBatchSwap(batchSwap: Pick): Promise; + /** + * Simple interface to test if a simple flash swap is valid and see potential profits. + * + * A "simple" flash swap is an arbitrage executed with only two tokens and two pools, + * swapping in the first pool and then back in the second pool for a profit. For more + * complex flash swaps, you will have to use the batch swap method. + * + * Learn more: A [Flash Swap](https://dev.balancer.fi/resources/swaps/flash-swaps). + * + * _NB: This method doesn't execute a flashSwap + * + * @param {SimpleFlashSwapParameters} params - BatchSwap information used for query. + * @param {string} params.flashLoanAmount - initial input amount for the flash loan (first asset) + * @param {string[]} params.poolIds - array of Balancer pool ids + * @param {string[]} params.assets - array of token addresses + * @returns {Promise<{profits: Record, isProfitable: boolean}>} Returns an ethersjs transaction response + */ + querySimpleFlashSwap(params: Omit): Promise; + /** + * Use SOR to get swapInfo for tokenIn<>tokenOut. + * @param {SwapInput} swapInput - Swap information used for querying using SOR. + * @param {string} swapInput.tokenIn - Addresse of asset in. + * @param {string} swapInput.tokenOut - Addresse of asset out. + * @param {SwapType} swapInput.swapType - Type of Swap, ExactIn/Out. + * @param {string} swapInput.amount - Amount used in swap. + * @returns {Promise} SOR swap info. + */ + getSorSwap(swapInput: SwapInput): Promise; + queryExactIn(swap: SwapInfo): Promise; + queryExactOut(swap: SwapInfo): Promise; + private query; + private assetDeltas; +} + +declare enum PoolKind { + WEIGHTED = 0, + LEGACY_STABLE = 1, + COMPOSABLE_STABLE = 2, + COMPOSABLE_STABLE_V2 = 3 +} +type OutputReference = { + index: number; + key: BigNumber; +}; +interface EncodeBatchSwapInput { + swapType: SwapType; + swaps: BatchSwapStep[]; + assets: string[]; + funds: FundManagement; + limits: string[]; + deadline: BigNumberish; + value: BigNumberish; + outputReferences: OutputReference[]; +} +interface EncodeExitPoolInput { + poolId: string; + poolKind: number; + sender: string; + recipient: string; + outputReferences: OutputReference[]; + exitPoolRequest: ExitPoolRequest$1; +} +interface EncodeJoinPoolInput { + poolId: string; + kind: number; + sender: string; + recipient: string; + joinPoolRequest: JoinPoolRequest$1; + value: BigNumberish; + outputReference: string; +} +interface EncodeWrapAaveDynamicTokenInput { + staticToken: string; + sender: string; + recipient: string; + amount: BigNumberish; + fromUnderlying: boolean; + outputReference: BigNumberish; +} +interface EncodeUnwrapAaveStaticTokenInput { + staticToken: string; + sender: string; + recipient: string; + amount: BigNumberish; + toUnderlying: boolean; + outputReference: BigNumberish; +} +interface EncodeUnwrapInput { + wrappedToken: string; + sender: string; + recipient: string; + amount: BigNumberish; + outputReference: BigNumberish; +} +interface EncodeUnwrapWstETHInput { + sender: string; + recipient: string; + amount: BigNumberish; + outputReference: BigNumberish; +} +type ExitPoolData = ExitPoolRequest$1 & EncodeExitPoolInput; +type JoinPoolData = JoinPoolRequest$1 & EncodeJoinPoolInput; + +declare class Relayer { + static CHAINED_REFERENCE_TEMP_PREFIX: string; + static CHAINED_REFERENCE_READONLY_PREFIX: string; + static encodeApproveVault(tokenAddress: string, maxAmount: string): string; + static encodeSetRelayerApproval(relayerAdress: string, approved: boolean, authorisation: string): string; + static encodeGaugeWithdraw(gaugeAddress: string, sender: string, recipient: string, amount: string): string; + static encodeGaugeDeposit(gaugeAddress: string, sender: string, recipient: string, amount: string): string; + static encodeSwap(params: Swap): string; + static encodeBatchSwap(params: EncodeBatchSwapInput): string; + static encodeExitPool(params: EncodeExitPoolInput): string; + static encodeJoinPool(params: EncodeJoinPoolInput): string; + static encodeWrapAaveDynamicToken(params: EncodeWrapAaveDynamicTokenInput): string; + static encodeUnwrapAaveStaticToken(params: EncodeUnwrapAaveStaticTokenInput): string; + static encodeUnwrapWstETH(params: EncodeUnwrapWstETHInput): string; + static encodeUnwrap(params: EncodeUnwrapInput, linearPoolType: string): string; + static encodePeekChainedReferenceValue(reference: BigNumberish): string; + static toChainedReference(key: BigNumberish, isTemporary?: boolean): BigNumber; + static fromChainedReference(ref: string, isTemporary?: boolean): BigNumber; + /** + * Returns true if `amount` is not actually an amount, but rather a chained reference. + */ + static isChainedReference(amount: string): boolean; + static formatExitPoolInput(params: ExitPoolData): EncodeExitPoolInput; + static formatJoinPoolInput(params: JoinPoolData): EncodeJoinPoolInput; + static signRelayerApproval: (relayerAddress: string, signerAddress: string, signer: JsonRpcSigner, vault: Vault) => Promise; +} + +declare class Subgraph { + readonly url: string; + readonly client: SubgraphClient; + constructor(config: BalancerSdkConfig); + private initClient; +} + +declare class Sor extends SOR { + constructor(sdkConfig: BalancerSdkConfig); + private static getSorConfig; + private static getSorNetworkConfig; + private static getPoolDataService; + private static getTokenPriceService; +} + +declare class Pricing { + private readonly swaps; + constructor(config: BalancerSdkConfig, swaps?: Swaps); + /** + * Retrieves pools using poolDataService. + * @returns {boolean} Boolean indicating whether pools data was fetched correctly (true) or not (false). + */ + fetchPools(): Promise; + /** + * Get currently saved pools list (fetched using fetchPools()). + * @returns {SubgraphPoolBase[]} pools list. + */ + getPools(): SubgraphPoolBase[]; + /** + * Calculates Spot Price for a token pair - finds most liquid path and uses this as reference SP. + * @param { string } tokenIn Token in address. + * @param { string } tokenOut Token out address. + * @param { SubgraphPoolBase[] } pools Optional - Pool data. Will be fetched via dataProvider if not supplied. + * @returns { string } Spot price. + */ + getSpotPrice(tokenIn: string, tokenOut: string, pools?: SubgraphPoolBase[]): Promise; +} + +type Asset = { + priceDelta: number; + weight: number; +}; +type TokenPrices = { + [key: string]: number; +}; +declare class ImpermanentLossService { + private tokenPrices; + private tokenHistoricalPrices; + constructor(tokenPrices: Findable, tokenHistoricalPrices: Findable); + /** + * entry point to calculate impermanent loss. + * + * The function will + * - retrieve the tokens' historical value at the desired time in the future + * - calculate the relative variation between current and historical value + * - return the IL in percentage rounded to 2 decimal places + * + * @param timestamp UNIX timestamp from which the IL is desired + * @param pool the pool + * @returns the impermanent loss as percentage rounded to 2 decimal places + */ + calcImpLoss(timestamp: number, pool: Pool$1): Promise; + calculateImpermanentLoss(poolValueDelta: number, holdValueDelta: number): number; + getPoolValueDelta(assets: Asset[]): number; + getHoldValueDelta(assets: Asset[]): number; + /** + * prepare the data for calculating the impermanent loss + * + * @param entryTimestamp UNIX timestamp from which the IL is desired + * @param pool the pool + * @returns a list of pair weight/price delta for each token in the pool + * @throws BalancerError if + * 1. a token's price is unknown + * 2. a token's weight is unknown + * 3. the user has no liquidity invested in the pool + */ + prepareData(entryTimestamp: number, pool: Pool$1): Promise; + getAssets(poolTokens: PoolToken[], exitPrices: TokenPrices, entryPrices: TokenPrices, weights: number[]): Asset[]; + getDelta(entryPrice: number, exitPrice: number): number; + /** + * returns the list of token's weights. + * + * @param poolTokens the pools' tokens + * @returns the list of token's weights + * @throws BalancerError if a token's weight is missing + * + */ + getWeights(poolTokens: PoolToken[]): number[]; + /** + * get the current's tokens' prices + * @param tokens the pools' tokens + * @returns a list of tokens with prices + */ + getExitPrices(tokens: PoolToken[]): Promise; + /** + * get the tokens' price at a given time + * + * @param timestamp the Unix timestamp + * @param tokenAddresses the tokens' addresses + * @returns a map of tokens' price + */ + getEntryPrices(timestamp: number, tokenAddresses: string[]): Promise; +} + +type SpotPrices = { + [tokenIn: string]: string; +}; +interface Node { + address: string; + id: string; + joinAction: JoinAction; + exitAction: ExitAction; + isProportionalExit: boolean; + type: string; + children: Node[]; + marked: boolean; + index: string; + proportionOfParent: BigNumber; + parent: Node | undefined; + isLeaf: boolean; + spotPrices: SpotPrices; + decimals: number; + balance: string; + priceRate: string; +} +type JoinAction = 'input' | 'batchSwap' | 'wrap' | 'joinPool'; +type ExitAction = 'output' | 'batchSwap' | 'unwrap' | 'exitPool'; +declare class PoolGraph { + private pools; + constructor(pools: Findable); + buildGraphFromRootPool(poolId: string, tokensToUnwrap: string[]): Promise; + getTokenTotal(pool: Pool$1): BigNumber; + buildGraphFromPool(address: string, nodeIndex: number, parent: Node | undefined, proportionOfParent: BigNumber, tokensToUnwrap: string[]): Promise<[Node, number]>; + /** + * Updates isProportionalExit for Node if the pool supports it + * @param pool + * @param node + */ + updateNodeIfProportionalExit(pool: Pool$1, node: Node): void; + createLinearNodeChildren(linearPoolNode: Node, nodeIndex: number, linearPool: Pool$1, tokensToUnwrap: string[]): [Node, number]; + createWrappedTokenNode(linearPool: Pool$1, nodeIndex: number, parent: Node | undefined, proportionOfParent: BigNumber): [Node, number]; + static createInputTokenNode(nodeIndex: number, address: string, decimals: number, parent: Node | undefined, proportionOfParent: BigNumber, balance: string): [Node, number]; + static orderByBfs(root: Node): Node[]; + static getLeafAddresses(nodes: Node[]): string[]; + /** + * Checks if list of Nodes only contains pools that support proportional exits + * @param nodes + * @returns + */ + static isProportionalPools(nodes: Node[]): boolean; + getGraphNodes: (isJoin: boolean, poolId: string, tokensToUnwrap: string[]) => Promise; +} + +interface PoolDictionary { + [poolId: string]: Pool; +} +type Pool = (WeightedPool$1 | StablePool$1 | LinearPool$1 | MetaStablePool | PhantomStablePool | ComposableStablePool$1) & { + SubgraphType: string; +}; +declare class PoolsSource { + private poolDataService; + private wrappedNativeAsset; + poolsArray: SubgraphPoolBase[]; + poolsDict: PoolDictionary; + constructor(poolDataService: PoolDataService, wrappedNativeAsset: string); + dataSource(): PoolDataService; + all(refresh?: boolean): Promise; + parseToPoolsDict(pools: SubgraphPoolBase[]): PoolDictionary; + parseNewPool(subgraphPool: SubgraphPoolBase): Pool | undefined; + /** + * Converts Subgraph array into PoolDictionary + * @param refresh + * @returns + */ + poolsDictionary(refresh?: boolean): Promise; +} + +interface JoinPoolRequest { + actionType: ActionType.Join; + poolId: string; + encodedUserData: string; + outputReference: string; +} + +interface ExitPoolRequest { + actionType: ActionType.Exit; + poolId: string; + encodedUserData: string; + outputReferences: OutputReference[]; +} + +interface SwapRequest extends Pick { + actionType: ActionType.Swap; +} +interface BatchSwapRequest extends Pick { + actionType: ActionType.BatchSwap; +} + +interface UnwrapRequest extends Pick { + poolId: string; + actionType: ActionType.Unwrap; +} + +declare enum ActionType { + BatchSwap = 0, + Join = 1, + Exit = 2, + Swap = 3, + Unwrap = 4 +} +type Requests = BatchSwapRequest | JoinPoolRequest | ExitPoolRequest | SwapRequest | UnwrapRequest; +/** + * Controller / use-case layer for interacting with pools data. + */ +declare class VaultModel { + poolsSource: PoolsSource; + constructor(poolDataService: PoolDataService, wrappedNativeAsset: string); + updateDeltas(deltas: Record, assets: string[], amounts: string[]): Record; + multicall(rawCalls: Requests[], refresh?: boolean): Promise>; + static mapSwapRequest(call: Swap): SwapRequest; + static mapBatchSwapRequest(call: EncodeBatchSwapInput): BatchSwapRequest; + static mapJoinPoolRequest(call: EncodeJoinPoolInput): JoinPoolRequest; + static mapExitPoolRequest(call: EncodeExitPoolInput): ExitPoolRequest; + static mapUnwrapRequest(amount: BigNumberish, outputReference: BigNumberish, poolId: string): UnwrapRequest; +} + +declare enum SimulationType { + Tenderly = 0, + VaultModel = 1, + Static = 2 +} +/** + * Simulation module is responsible for simulating the results of a generalised + * join or exit using different types of simulation, such as: + * - Tenderly: uses Tenderly Simulation API (third party service) + * - VaultModel: uses TS math, which may be less accurate (min. 99% accuracy) + * - Static: uses staticCall, which is 100% accurate but requires vault approval + * + * This module allows a user to perform a simulation and check for expected + * amounts out in order to make an informed decision on whether to proceed with + * the transaction. These expected amounts out can be used as limits to prevent + * frontrunning and ensure that the transaction will return minimum amounts out. + */ +declare class Simulation { + private tenderlyHelper?; + private vaultModel; + constructor(networkConfig: BalancerNetworkConfig, poolDataService?: PoolDataService); + simulateGeneralisedJoin: (to: string, multiRequests: Requests[][], encodedCall: string, outputIndexes: number[], userAddress: string, tokensIn: string[], signer: JsonRpcSigner, simulationType: SimulationType, value: string) => Promise; + simulateGeneralisedExit: (to: string, multiRequests: Requests[][], encodedCall: string, outputIndexes: number[], userAddress: string, tokenIn: string, signer: JsonRpcSigner, simulationType: SimulationType) => Promise; + private decodeResult; + private simulateRequests; +} + +declare class Join { + private poolGraph; + private simulationService; + private relayer; + private wrappedNativeAsset; + constructor(poolGraph: PoolGraph, networkConfig: BalancerNetworkConfig, simulationService: Simulation); + private checkInputs; + joinPool(poolId: string, tokensIn: string[], amountsIn: string[], userAddress: string, slippage: string, signer: JsonRpcSigner, simulationType: SimulationType, authorisation?: string): Promise<{ + to: string; + encodedCall: string; + expectedOut: string; + minOut: string; + priceImpact: string; + value: BigNumberish; + }>; + private assertDeltas; + static getJoinPaths: (orderedNodes: Node[], tokensIn: string[], amountsIn: string[]) => Node[][]; + private static updateInputAmounts; + private createCalls; + static totalBptZeroPriceImpact: (joinPaths: Node[][]) => BigNumber; + static bptOutZeroPiForInputNode: (inputNode: Node) => bigint; + private amountsOutByJoinPath; + private minAmountsOutByJoinPath; + private updateDeltas; + private createActionCalls; + /** + * Creates a map of node address and total proportion. Used for the case where there may be multiple inputs using same token, e.g. DAI input to 2 pools. + * @param nodes nodes to consider. + */ + static updateTotalProportions: (nodes: Node[]) => Record; + /** + * Uses relayer to approve itself to act in behalf of the user + * + * @param authorisation Encoded authorisation call. + * @returns relayer approval call + */ + private createSetRelayerApproval; + static updateNodeAmount: (node: Node, tokensIn: string[], amountsIn: string[], totalProportions: Record) => Node; + private createSwap; + private createJoinPool; + private getOutputRefValue; + private shouldBeConsidered; + private sendsToInternalBalance; + private allImmediateChildrenSendToInternal; + private allSiblingsSendToInternal; + private replaceWrappedNativeAsset; +} + +interface GeneralisedExitOutput { + to: string; + encodedCall: string; + tokensOut: string[]; + expectedAmountsOut: string[]; + minAmountsOut: string[]; + priceImpact: string; +} +interface ExitInfo { + tokensOut: string[]; + estimatedAmountsOut: string[]; + priceImpact: string; + tokensToUnwrap: string[]; +} +declare class Exit { + private poolGraph; + private simulationService; + private wrappedNativeAsset; + private relayer; + constructor(poolGraph: PoolGraph, networkConfig: BalancerNetworkConfig, simulationService: Simulation); + getExitInfo(poolId: string, amountBptIn: string, userAddress: string, signer: JsonRpcSigner): Promise<{ + tokensOut: string[]; + estimatedAmountsOut: string[]; + priceImpact: string; + tokensToUnwrap: string[]; + }>; + buildExitCall(poolId: string, amountBptIn: string, userAddress: string, slippage: string, signer: JsonRpcSigner, simulationType: SimulationType.Static | SimulationType.Tenderly, authorisation?: string, tokensToUnwrap?: string[]): Promise<{ + to: string; + encodedCall: string; + tokensOut: string[]; + expectedAmountsOut: string[]; + minAmountsOut: string[]; + priceImpact: string; + }>; + private getExit; + private calculatePriceImpact; + private assertDeltas; + private amountsOutByExitPath; + private amountsOutByTokenOut; + private minAmountsOut; + private getExitPaths; + private createCalls; + private updateDeltas; + private createActionCalls; + private createUnwrap; + private createSwap; + private createBatchSwap; + private createExitPool; + private createExitPoolProportional; + private getOutputRef; + private receivesFromInternal; +} + +declare class PoolVolume { + private yesterdaysPools; + constructor(yesterdaysPools: Findable | undefined); + last24h(pool: Pool$1): Promise; +} + +declare class PoolFees { + private yesterdaysPools; + constructor(yesterdaysPools: Findable | undefined); + last24h(pool: Pool$1): Promise; +} + +type CreatePoolParameters = { + name: string; + symbol: string; + tokenAddresses: string[]; + swapFeeEvm: string; + owner: string; + salt?: BytesLike$1; +}; +interface ComposableStableCreatePoolParameters extends CreatePoolParameters { + amplificationParameter: string; + rateProviders: string[]; + tokenRateCacheDurations: string[]; + exemptFromYieldProtocolFeeFlags: boolean[]; + salt?: BytesLike$1; +} +interface WeightedCreatePoolParameters extends CreatePoolParameters { + rateProviders: string[]; + normalizedWeights: BigNumberish[]; +} +type LinearCreatePoolParameters = Pick & { + mainToken: string; + wrappedToken: string; + upperTargetEvm: string; + protocolId: ProtocolId; +}; +interface InitJoinPoolParameters { + joiner: string; + poolId: string; + poolAddress: string; + tokensIn: string[]; + amountsIn: string[]; +} +interface InitJoinPoolAttributes { + to: string; + functionName: string; + attributes: JoinPool; + data: string; + value?: BigNumber; +} +declare enum ProtocolId { + AAVE_V1 = 0, + AAVE_V2 = 1, + AAVE_V3 = 2, + AMPLEFORTH = 3, + BEEFY = 4, + EULER = 5, + GEARBOX = 6, + IDLE = 7, + MORPHO = 8, + RADIANT = 9, + REAPER = 10, + SILO = 11, + STARGATE = 12, + STURDY = 13, + TESSERA = 14, + TETU = 15, + YEARN = 16, + MIDAS = 17, + AGAVE = 18 +} +type JoinPoolDecodedAttributes = { + poolId: string; + sender: string; + recipient: string; + joinPoolRequest: JoinPoolRequestDecodedAttributes; +}; +type JoinPoolRequestDecodedAttributes = { + assets: string[]; + maxAmountsIn: string[]; + userData: string; + fromInternalBalance: boolean; +}; +type LinearPoolInterface = ERC4626LinearPoolInterface | EulerLinearPoolInterface | AaveLinearPoolInterface | YearnLinearPoolInterface | GearboxLinearPoolInterface; +type LinearPoolFactoryInterface = AaveLinearPoolFactoryInterface | ERC4626LinearPoolFactoryInterface | EulerLinearPoolFactoryInterface | GearboxLinearPoolFactoryInterface | YearnLinearPoolFactoryInterface; + +interface PoolFactory { + buildInitJoin: (parameters: InitJoinPoolParameters) => InitJoinPoolAttributes; + getPoolAddressAndIdWithReceipt: (provider: JsonRpcProvider, receipt: TransactionReceipt) => Promise<{ + poolId: string; + poolAddress: string; + }>; + create(parameters: ComposableStableCreatePoolParameters | WeightedCreatePoolParameters | LinearCreatePoolParameters): { + to?: string; + data: BytesLike$1; + }; + getPoolInterface(): WeightedPoolInterface | ComposableStablePoolInterface | LinearPoolInterface; +} + +/** + * Wrapper around pool type specific methods. + * + * Returns a class instance of a type specific factory. + */ +declare class PoolFactory__factory { + networkConfig: BalancerNetworkConfig; + contracts: ContractInstances; + constructor(networkConfig: BalancerNetworkConfig, balancerContracts: Contracts); + of(poolType: PoolType): PoolFactory; +} + +/** + * Returns BAL emissions per pool + */ +declare class EmissionsService { + private liquidityGaugesRepository; + constructor(liquidityGaugesRepository: Findable); + relativeWeight(poolId: string): Promise; + weekly(poolId: string): Promise; +} + +/** + * Controller / use-case layer for interacting with pools data. + */ +declare class Pools implements Findable { + private networkConfig; + private repositories; + private balancerContracts; + aprService: PoolApr; + liquidityService: Liquidity; + joinService: Join; + exitService: Exit; + feesService: PoolFees; + volumeService: PoolVolume; + simulationService: Simulation; + poolFactory: PoolFactory__factory; + impermanentLossService: ImpermanentLossService; + graphService: PoolGraph; + emissionsService: EmissionsService | undefined; + proportionalAmounts: (pool: { + id: string; + tokens: { + address: string; + balance: string; + decimals?: number | undefined; + }[]; + }, token: string, amount: string) => { + tokens: string[]; + amounts: string[]; + }; + constructor(networkConfig: BalancerNetworkConfig, repositories: BalancerDataRepositories, balancerContracts: Contracts); + static wrap(pool: Pool$1, networkConfig: BalancerNetworkConfig): PoolWithMethods; + dataSource(): Findable & Searchable; + /** + * Calculates APR on any pool data + * + * @param pool + * @returns + */ + apr(pool: Pool$1): Promise; + /** + * Calculates Impermanent Loss on any pool data + * + * @param timestamp + * @param pool + * @returns + */ + impermanentLoss(timestamp: number, pool: Pool$1): Promise; + /** + * Calculates total pool liquidity in USD + * + * @param pool + * @returns total pool liquidity in USD + */ + liquidity(pool: Pool$1): Promise; + /** + * Calculates pool's BPT price in USD + * + * @param pool + * @returns pool's BPT price in USD + */ + bptPrice(pool: Pool$1): Promise; + /** + * Builds join transaction + * + * @param pool Pool + * @param tokensIn Token addresses + * @param amountsIn Token amounts in EVM scale + * @param userAddress User address + * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%. + * @returns Transaction object + * @throws Error if pool type is not implemented + */ + buildJoin({ pool, tokensIn, amountsIn, userAddress, slippage, }: { + pool: Pool$1; + tokensIn: string[]; + amountsIn: string[]; + userAddress: string; + slippage: string; + }): JoinPoolAttributes; + buildExitExactBPTIn({ pool, bptAmount, userAddress, slippage, shouldUnwrapNativeAsset, singleTokenOut, }: { + pool: Pool$1; + bptAmount: string; + userAddress: string; + slippage: string; + shouldUnwrapNativeAsset?: boolean; + singleTokenOut?: string; + }): ExitExactBPTInAttributes; + buildRecoveryExit({ pool, bptAmount, userAddress, slippage, toInternalBalance, }: { + pool: Pool$1; + bptAmount: string; + userAddress: string; + slippage: string; + toInternalBalance?: boolean; + }): ExitExactBPTInAttributes; + /** + * Builds generalised join transaction + * + * @param poolId Pool id + * @param tokens Token addresses + * @param amounts Token amounts in EVM scale + * @param userAddress User address + * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%. + * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen + * @param simulationType Simulation type (VaultModel, Tenderly or Static) + * @param authorisation Optional auhtorisation call to be added to the chained transaction + * @returns transaction data ready to be sent to the network along with min and expected BPT amounts out. + */ + generalisedJoin(poolId: string, tokens: string[], amounts: string[], userAddress: string, slippage: string, signer: JsonRpcSigner, simulationType: SimulationType, authorisation?: string): Promise<{ + to: string; + encodedCall: string; + minOut: string; + expectedOut: string; + priceImpact: string; + value: BigNumberish; + }>; + /** + * Builds generalised exit transaction + * + * @param poolId Pool id + * @param amount Token amount in EVM scale + * @param userAddress User address + * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%. + * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen + * @param simulationType Simulation type (Tenderly or Static) - VaultModel should not be used to build exit transaction + * @param authorisation Optional auhtorisation call to be added to the chained transaction + * @param tokensToUnwrap List all tokens that requires exit by unwrapping - info provided by getExitInfo + * @returns transaction data ready to be sent to the network along with tokens, min and expected amounts out. + */ + generalisedExit(poolId: string, amount: string, userAddress: string, slippage: string, signer: JsonRpcSigner, simulationType: SimulationType.Static | SimulationType.Tenderly, authorisation?: string, tokensToUnwrap?: string[]): Promise; + /** + * Calculates price impact for an action on a pool + * + * @param pool + * @returns percentage as a string in EVM scale + */ + calcPriceImpact({ pool, tokenAmounts, bptAmount, isJoin, }: { + pool: Pool$1; + tokenAmounts: string[]; + bptAmount: string; + isJoin: boolean; + }): string; + /** + * Gets info required to build generalised exit transaction + * + * @param poolId Pool id + * @param amountBptIn BPT amount in EVM scale + * @param userAddress User address + * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen + * @returns info required to build a generalised exit transaction including whether tokens need to be unwrapped + */ + getExitInfo(poolId: string, amountBptIn: string, userAddress: string, signer: JsonRpcSigner): Promise; + /** + * Calculates total fees for the pool in the last 24 hours + * + * @param pool + * @returns + */ + fees(pool: Pool$1): Promise; + /** + * Calculates total volume of the pool in the last 24 hours + * + * @param pool + * @returns + */ + volume(pool: Pool$1): Promise; + find(id: string): Promise; + findBy(param: string, value: string): Promise; + all(): Promise; + where(filter: (pool: Pool$1) => boolean): Promise; +} + +/** + * @param user - user address + * @param from - pool ID + * @param to - pool ID + * @param balance - amount of liquidity to migrate in WAL (wei-ether) + * @param minBptOut - minimum amount of BPT to receive, when 0 it will include a peek for the amount + * @param authorisation - signed user's authorisation to approve relayer in the vault + */ +interface MigrationParams { + user: string; + from: string; + to: string; + balance: string; + minBptOut?: string; + authorisation?: string; +} +/** + * Class responsible for building liquidity migration transactions. + */ +declare class Migrations { + relayerAddress: string; + poolsRepository: Findable; + gaugesRepository: Findable; + provider: JsonRpcProvider; + /** + * Instance of a class responsible for building liquidity migration transactions. + * + * @param relayerAddress Address of the relayer contract. + * @param poolsRepository Repository of pools. + * @param liquidityGaugesRepository Repository of liquidity gauges. + * @param provider Provider to use for RPC data fetching. + * + * Available methods: + * - `pool2pool` - Migrates liquidity from one pool to another. + * - `pool2poolWithGauges` - Migrates liquidity from a pool's gauge to another gauge. + * - `gauge2gauge` - Migrates liquidity from one gauge to another of the same pool. + * + * @example + * ```typescript + * const sdk = new BalancerSDK({ + * network: 1, + * rpcUrl: 'https://rpc.ankr.com/eth', + * }) + * + * const migrations = new Migrations({ + * relayerAddress: sdk.networkConfig.addresses.contracts.relayerV4 as string, + * poolsRepository: sdk.data.pools, + * gaugesRepository: sdk.data.liquidityGauges.subgraph, + * provider: sdk.provider + * }) + * + * const user = '0xfacec29Ae158B26e234B1a81Db2431F6Bd8F8cE8' + * const from = '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080' + * const to = '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080' + * const balance = '1000000000000000000' + * const { to, data } = await migrations.pool2pool({ user, from, to, balance }) + * + * const tx = await sdk.provider.sendTransaction({ to, data }) + * ``` + */ + constructor({ relayerAddress, poolsRepository, gaugesRepository, provider, }: { + relayerAddress: string; + poolsRepository: Findable; + gaugesRepository: Findable; + provider: JsonRpcProvider; + }); + /** + * Takes user, from and to pool IDs as strings and returns the transaction data + * + * @returns transaction data + */ + pool2pool({ user, from, to, balance, minBptOut, authorisation, }: MigrationParams): Promise<{ + to: string; + data: string; + }>; + /** + * Takes user, from and to pool IDs as strings and returns the transaction data + * for a migration including unstaking and restaking + * + * @returns transaction data + */ + pool2poolWithGauges({ user, from, to, balance, minBptOut, authorisation, }: MigrationParams): Promise<{ + to: string; + data: string; + }>; + /** + * Migrates staked liquidity for the same pool from one gauge to another. + * + * @returns transaction data + */ + gauge2gauge({ user, from, to, balance, authorisation, }: MigrationParams): Promise<{ + to: string; + data: string; + }>; + /** + * Decodes the relayer return value to get the expected BPT out. + * + * @param relayerReturnValue + * @returns + */ + static getExpectedBptOut: (relayerReturnValue: string) => string; + getExpectedBptOut: (relayerReturnValue: string) => string; +} + +interface BalancerSDKRoot { + config: BalancerSdkConfig; + sor: Sor; + subgraph: Subgraph; + pools: Pools; + data: Data; + swaps: Swaps; + relayer: Relayer; + networkConfig: BalancerNetworkConfig; + provider: JsonRpcProvider; + claimService?: IClaimService; +} +declare class BalancerSDK implements BalancerSDKRoot { + config: BalancerSdkConfig; + sor: Sor; + subgraph: Subgraph; + readonly swaps: Swaps; + readonly relayer: Relayer; + readonly pricing: Pricing; + readonly pools: Pools; + readonly data: Data; + balancerContracts: Contracts; + vaultModel: VaultModel; + readonly networkConfig: BalancerNetworkConfig; + readonly provider: JsonRpcProvider; + readonly claimService?: IClaimService; + readonly migrationService?: Migrations; + constructor(config: BalancerSdkConfig, sor?: Sor, subgraph?: Subgraph); + /** + * Expose balancer contracts, e.g. Vault, LidoRelayer. + */ + get contracts(): ContractInstances; +} + +declare function canUseJoinExit(swapType: SwapTypes, tokenIn: string, tokenOut: string): boolean; +/** + * Find if any of the swaps are join/exits. If yes these swaps should be routed via Relayer. + * @param pools + * @param swaps + * @param assets + * @returns + */ +declare function someJoinExit(pools: SubgraphPoolBase[], swaps: SwapV2[], assets: string[]): boolean; +/** + * Given swapInfo from the SOR construct the Relayer multicall to execture swaps/joins/exits. + * @param swapInfo Returned from SOR + * @param swapType Only supports ExactIn + * @param pools Pool info from SOR + * @param user Address of user + * @param relayerAddress Address of Relayer (>=V4) + * @param wrappedNativeAsset Address of Native asset + * @param slippage [bps], eg: 1 === 0.01%, 100 === 1% + * @param authorisation Encoded authorisation call. + * @returns + */ +declare function buildRelayerCalls(swapInfo: SwapInfo, pools: SubgraphPoolBase[], user: string, relayerAddress: string, wrappedNativeAsset: string, slippage: string, authorisation: string | undefined): { + to: string; + data: string; + rawCalls: string[]; + inputs: (EncodeBatchSwapInput | ExitPoolData | EncodeJoinPoolInput)[]; +}; + +declare enum BalancerErrorCode { + ABOVE_MAX_TOKENS = "ABOVE_MAX_TOKENS", + BELOW_MIN_TOKENS = "BELOW_MIN_TOKENS", + EXIT_DELTA_AMOUNTS = "EXIT_DELTA_AMOUNTS", + FEE_PROVIDER_NOT_PROVIDED = "FEE_PROVIDER_NOT_PROVIDED", + GAUGES_HELPER_ADDRESS_NOT_PROVIDED = "GAUGES_HELPER_ADDRESS_NOT_PROVIDED", + GAUGES_NOT_FOUND = "GAUGES_NOT_FOUND", + GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED = "GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED", + GAUGES_REWARD_TOKEN_EMPTY = "GAUGES_REWARD_TOKEN_EMPTY", + ILLEGAL_PARAMETER = "ILLEGAL_PARAMETER", + INTERNAL_ERROR_INVALID_ABI = "INTERNAL_ERROR_INVALID_ABI", + INPUT_LENGTH_MISMATCH = "INPUT_LENGTH_MISMATCH", + INPUT_OUT_OF_BOUNDS = "INPUT_OUT_OF_BOUNDS", + INPUT_TOKEN_INVALID = "INPUT_TOKEN_INVALID", + INVALID_PROTOCOL_ID = "INVALID_PROTOCOL_ID", + INVALID_SWAP_FEE_PERCENTAGE = "INVALID_SWAP_FEE_PERCENTAGE", + INVALID_WEIGHTS = "INVALID_WEIGHTS", + JOIN_DELTA_AMOUNTS = "JOIN_DELTA_AMOUNTS", + JOIN_WITH_ZERO_AMOUNT = "JOIN_WITH_ZERO_AMOUNT", + MISSING_AMP = "MISSING_AMP", + MISSING_DECIMALS = "MISSING_DECIMALS", + MISSING_PRICE_RATE = "MISSING_PRICE_RATE", + MISSING_TOKENS = "MISSING_TOKENS", + MISSING_WEIGHT = "MISSING_WEIGHT", + NO_POOL_DATA = "NO_POOL_DATA", + NO_VALUE_PARAMETER = "NO_VALUE_PARAMETER", + POOL_DOESNT_EXIST = "POOL_DOESNT_EXIST", + QUERY_BATCH_SWAP = "QUERY_BATCH_SWAP", + RELAY_SWAP_AMOUNTS = "RELAY_SWAP_AMOUNTS", + REWARD_TOKEN_ZERO = "REWARD_TOKEN_ZERO", + TIMESTAMP_IN_THE_FUTURE = "TIMESTAMP_IN_THE_FUTURE", + TOKEN_MISMATCH = "TOKEN_MISMATCH", + UNSUPPORTED_PAIR = "UNSUPPORTED_PAIR", + UNSUPPORTED_POOL_TYPE = "UNSUPPORTED_POOL_TYPE", + UNSUPPORTED_POOL_TYPE_VERSION = "UNSUPPORTED_POOL_TYPE_VERSION" +} +declare class BalancerError extends Error { + code: BalancerErrorCode; + constructor(code: BalancerErrorCode); + static getMessage(code: BalancerErrorCode): string; +} + +declare const BALANCER_NETWORK_CONFIG: Record; + +export { AMP_PRECISION, APR_THRESHOLD, AaveLinearPool, AaveLinearPoolFactory, AaveLinearPoolFactory__factory, AaveLinearPool__factory, AaveRates, AaveWrapping, AaveWrapping__factory, Account, Address, AprBreakdown, AssetHelpers, Authoriser, Authoriser__factory, BALANCER_NETWORK_CONFIG, BalancerAPIArgsFormatter, BalancerDataRepositories, BalancerError, BalancerErrorCode, BalancerErrors, BalancerHelpers, BalancerHelpers__factory, BalancerMinter, BalancerMinterAuthorization, BalancerMinter__factory, BalancerNetworkConfig, BalancerPoolDataQueries, BalancerPoolDataQueries__factory, BalancerRelayer, BalancerRelayer__factory, BalancerSDK, BalancerSDKRoot, BalancerSdkConfig, BalancerSdkSorConfig, BalancerTenderlyConfig, BaseFeeDistributor, BasePoolEncoder, BatchRelayerLibrary, BatchRelayerLibrary__factory, BatchSwap, BatchSwapStep, BlockNumberRepository, BuildTransactionParameters, Cacheable, CoingeckoConfig, CoingeckoHistoricalPriceRepository, CoingeckoPriceRepository, ComposableStableCreatePoolParameters, ComposableStablePool, ComposableStablePoolEncoder, ComposableStablePoolExitKind, ComposableStablePoolFactory, ComposableStablePoolFactory__factory, ComposableStablePoolJoinKind, ComposableStablePool__factory, ContractAddresses, ConvergentCurvePool, ConvergentCurvePool__factory, CreatePoolParameters, Currency, Data, Debouncer, ERC20, ERC20__factory, ERC4626LinearPool, ERC4626LinearPoolFactory, ERC4626LinearPoolFactory__factory, ERC4626LinearPool__factory, EncodeBatchSwapInput, EncodeExitPoolInput, EncodeJoinPoolInput, EncodeUnwrapAaveStaticTokenInput, EncodeUnwrapInput, EncodeUnwrapWstETHInput, EncodeWrapAaveDynamicTokenInput, EulerLinearPool, EulerLinearPoolFactory, EulerLinearPoolFactory__factory, EulerLinearPool__factory, ExitPoolData, ExitPoolRequest$1 as ExitPoolRequest, FXPool, FXPool__factory, FeeCollectorRepository, FeeDistributorData, FeeDistributorRepository, FindRouteParameters, Findable, FundManagement, GaugeClaimHelper, GaugeClaimHelper__factory, GaugeControllerMulticallRepository, GaugeShare, GaugeShareAttributes, GaugeSharesRepository, GearboxLinearPool, GearboxLinearPoolFactory, GearboxLinearPoolFactory__factory, GearboxLinearPool__factory, GraphQLArgs, GraphQLArgsBuilder, GraphQLArgsFormatter, GraphQLFilter, GraphQLFilterOperator, GraphQLQuery, GyroConfig, GyroConfig__factory, GyroEV2, GyroEV2__factory, HistoricalPriceProvider, HistoricalPrices, IAaveRates, InitJoinPoolAttributes, InitJoinPoolParameters, JoinPoolData, JoinPoolDecodedAttributes, JoinPoolRequest$1 as JoinPoolRequest, JoinPoolRequestDecodedAttributes, LidoRelayer, LidoRelayer__factory, LinearCreatePoolParameters, LinearPool, LinearPoolFactoryInterface, LinearPoolInterface, LinearPool__factory, Liquidity, LiquidityGauge, LiquidityGaugeSubgraphRPCProvider, LiquidityGaugeV5, LiquidityGaugeV5__factory, LiquidityGaugesMulticallRepository, LiquidityGaugesSubgraphRepository, ManagedPoolEncoder, Migrations, Multicall, Multicall3, Multicall3__factory, Multicall__factory, NamedPools, Network, OnchainPoolData, OnchainTokenData, OutputReference, POOLS, Pool$1 as Pool, PoolAttribute, PoolBPTValue, PoolBalanceOp, PoolBalanceOpKind, PoolGauges, PoolGaugesAttributes, PoolGaugesRepository, PoolJoinExit, PoolJoinExitAttributes, PoolJoinExitRepository, PoolKind, PoolReference, PoolRepository, PoolShare, PoolShareAttributes, PoolSharesRepository, PoolSpecialization, PoolToken, PoolType, PoolWithMethods, Pools, PoolsBalancerAPIRepository, PoolsFallbackRepository, PoolsFallbackRepositoryOptions, PoolsRepositoryFetchOptions, PoolsStaticRepository, PoolsSubgraphOnChainRepository, PoolsSubgraphRepository, Price, PriceRateProvider, ProtocolFees, ProtocolFeesProvider, ProtocolId, QuerySimpleFlashSwapParameters, QuerySimpleFlashSwapResponse, Relayer, RelayerAction, RelayerAuthorization, RewardData, SHALLOW_COMPOSABLE_STABLE_BUFFER, Searchable, SimpleFlashSwapParameters, SimulationType, SingleSwap, Sor, StablePhantomPoolJoinKind, StablePool, StablePoolEncoder, StablePoolExitKind, StablePoolJoinKind, StablePool__factory, StaticATokenRateProvider, StaticATokenRateProvider__factory, StaticTokenPriceProvider, StaticTokenProvider, SubPool, SubPoolMeta, Subgraph, SubgraphArgsFormatter, SubgraphPriceRepository, Swap, SwapAttributes, SwapInput, SwapTransactionRequest, SwapType, Swaps, SwapsOptions, Token, TokenAmounts, TokenAttribute, TokenPriceProvider, TokenPrices$1 as TokenPrices, TokenProvider, TokenYieldsRepository, TransactionData, UserBalanceOp, UserBalanceOpKind, Vault, Vault__factory, VeBal$1 as VeBal, VeBal__factory, VeDelegationProxy, VeDelegationProxy__factory, WeightedCreatePoolParameters, WeightedPool, WeightedPoolEncoder, WeightedPoolExitKind, WeightedPoolFactory, WeightedPoolFactory__factory, WeightedPoolJoinKind, WeightedPool__factory, YearnLinearPool, YearnLinearPoolFactory, YearnLinearPoolFactory__factory, YearnLinearPool__factory, accountToAddress, addSlippage, addressMapIn, emissions as balEmissions, bn, buildRelayerCalls, canUseJoinExit, index as factories, fetchOnChainPoolData, findEventInReceiptLogs, formatFixed, formatFromBigInt18, getEthValue, getLimitsForSlippage, getOnChainBalances, getPoolAddress, getPoolNonce, getPoolSpecialization, getRandomBytes32, insert, isLinearish, isNormalizedWeights, isSameAddress, mulSlippage, parseFixed, parsePoolInfo, parseToBigInt18, removeItem, reorderArrays, replace, signPermit, someJoinExit, splitPoolId, subSlippage, toNormalizedWeights, tokenAddressForPricing, tokensToTokenPrices, truncateAddresses, unwrapToken, wrappedTokensMap, yieldTokens }; diff --git a/package/dist/index.esm.js b/package/dist/index.esm.js new file mode 100644 index 000000000..517a91a49 --- /dev/null +++ b/package/dist/index.esm.js @@ -0,0 +1,515 @@ +import{defaultAbiCoder as e,Interface as t}from"@ethersproject/abi";import{WeiPerEther as a,Zero as n,AddressZero as o,MaxUint256 as i,MaxInt256 as s,HashZero as r}from"@ethersproject/constants";import{BigNumber as p,parseFixed as d,formatFixed as l}from"@ethersproject/bignumber";import{getAddress as u}from"@ethersproject/address";import{hexZeroPad as c,hexValue as y,splitSignature as b,arrayify as m,hexlify as f,concat as T,zeroPad as h}from"@ethersproject/bytes";import{Signer as I}from"@ethersproject/abstract-signer";import{mergeWith as _,set as g,parseInt as P,keyBy as w,sum as x,pickBy as E,zipObject as A,identity as v,cloneDeep as S}from"lodash";import{utils as k,Contract as O}from"ethers";import*as M from"@balancer-labs/sor";import{StablePool as C,ZERO as F,PhantomStablePool as B,StableMathBigInt as R,WeightedMaths as N,WeightedPool as L,MetaStablePool as D,LinearPool as U,SwapTypes as V,SOR as q,parseToPoolsDict as G,getSpotPriceAfterSwapForPath as W,bnum as $,ComposableStablePool as H}from"@balancer-labs/sor";export{PoolFilter,SOR,SwapTypes,stableBPTForTokensZeroPriceImpact,weightedBPTForTokensZeroPriceImpact}from"@balancer-labs/sor";import{JsonRpcProvider as K}from"@ethersproject/providers";import{GraphQLClient as J,gql as X,request as Y}from"graphql-request";import{parse as j}from"graphql";import z from"axios";import{Contract as Z}from"@ethersproject/contracts";import{jsonToGraphQLQuery as Q}from"json-to-graphql-query";var ee,te,ae,ne,oe,ie;!function(e){e[e.RECOVERY_MODE=255]="RECOVERY_MODE"}(ee||(ee={}));class se{}se.recoveryModeExit=t=>e.encode(["uint256","uint256"],[ee.RECOVERY_MODE,t]),function(e){e[e.INIT=0]="INIT",e[e.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",e[e.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT"}(te||(te={})),function(e){e[e.INIT=0]="INIT",e[e.COLLECT_PROTOCOL_FEES=1]="COLLECT_PROTOCOL_FEES"}(ae||(ae={})),function(e){e[e.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",e[e.EXACT_BPT_IN_FOR_TOKENS_OUT=1]="EXACT_BPT_IN_FOR_TOKENS_OUT",e[e.BPT_IN_FOR_EXACT_TOKENS_OUT=2]="BPT_IN_FOR_EXACT_TOKENS_OUT"}(ne||(ne={}));class re{constructor(){}}re.joinInit=t=>e.encode(["uint256","uint256[]"],[te.INIT,t]),re.joinCollectProtocolFees=()=>e.encode(["uint256"],[ae.COLLECT_PROTOCOL_FEES]),re.joinExactTokensInForBPTOut=(t,a)=>e.encode(["uint256","uint256[]","uint256"],[te.EXACT_TOKENS_IN_FOR_BPT_OUT,t,a]),re.joinTokenInForExactBPTOut=(t,a)=>e.encode(["uint256","uint256","uint256"],[te.TOKEN_IN_FOR_EXACT_BPT_OUT,t,a]),re.exitExactBPTInForOneTokenOut=(t,a)=>e.encode(["uint256","uint256","uint256"],[ne.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,t,a]),re.exitExactBPTInForTokensOut=t=>e.encode(["uint256","uint256"],[ne.EXACT_BPT_IN_FOR_TOKENS_OUT,t]),re.exitBPTInForExactTokensOut=(t,a)=>e.encode(["uint256","uint256[]","uint256"],[ne.BPT_IN_FOR_EXACT_TOKENS_OUT,t,a]),function(e){e[e.INIT=0]="INIT",e[e.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",e[e.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT",e[e.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT=3]="ALL_TOKENS_IN_FOR_EXACT_BPT_OUT"}(oe||(oe={})),function(e){e[e.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",e[e.EXACT_BPT_IN_FOR_TOKENS_OUT=1]="EXACT_BPT_IN_FOR_TOKENS_OUT",e[e.BPT_IN_FOR_EXACT_TOKENS_OUT=2]="BPT_IN_FOR_EXACT_TOKENS_OUT",e[e.MANAGEMENT_FEE_TOKENS_OUT=3]="MANAGEMENT_FEE_TOKENS_OUT"}(ie||(ie={}));class pe{constructor(){}}pe.joinInit=t=>e.encode(["uint256","uint256[]"],[oe.INIT,t]),pe.joinExactTokensInForBPTOut=(t,a)=>e.encode(["uint256","uint256[]","uint256"],[oe.EXACT_TOKENS_IN_FOR_BPT_OUT,t,a]),pe.joinTokenInForExactBPTOut=(t,a)=>e.encode(["uint256","uint256","uint256"],[oe.TOKEN_IN_FOR_EXACT_BPT_OUT,t,a]),pe.joinAllTokensInForExactBPTOut=t=>e.encode(["uint256","uint256"],[oe.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT,t]),pe.exitExactBPTInForOneTokenOut=(t,a)=>e.encode(["uint256","uint256","uint256"],[ie.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,t,a]),pe.exitExactBPTInForTokensOut=t=>e.encode(["uint256","uint256"],[ie.EXACT_BPT_IN_FOR_TOKENS_OUT,t]),pe.exitBPTInForExactTokensOut=(t,a)=>e.encode(["uint256","uint256[]","uint256"],[ie.BPT_IN_FOR_EXACT_TOKENS_OUT,t,a]);class de{constructor(){}}de.exitForManagementFees=()=>e.encode(["uint256"],[ie.MANAGEMENT_FEE_TOKENS_OUT]);function le(e){if(100==e.length)return Array(100).fill(a.div(100));const t=e.reduce(((e,t)=>e.add(t)),n);if(t.eq(a))return e;const o=[];let i=n;for(let n=0;n{const t=e.reduce(((e,t)=>e.add(t)),n);return t.eq(a)};var ce,ye;!function(e){e[e.INIT=0]="INIT",e[e.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",e[e.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT"}(ce||(ce={})),function(e){e[e.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",e[e.BPT_IN_FOR_EXACT_TOKENS_OUT=1]="BPT_IN_FOR_EXACT_TOKENS_OUT",e[e.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT=2]="EXACT_BPT_IN_FOR_ALL_TOKENS_OUT"}(ye||(ye={}));class be{constructor(){}}be.joinInit=t=>e.encode(["uint256","uint256[]"],[ce.INIT,t]),be.joinCollectProtocolFees=()=>e.encode(["uint256"],[ae.COLLECT_PROTOCOL_FEES]),be.joinExactTokensInForBPTOut=(t,a)=>e.encode(["uint256","uint256[]","uint256"],[ce.EXACT_TOKENS_IN_FOR_BPT_OUT,t,a]),be.joinTokenInForExactBPTOut=(t,a)=>e.encode(["uint256","uint256","uint256"],[ce.TOKEN_IN_FOR_EXACT_BPT_OUT,t,a]),be.exitExactBPTInForOneTokenOut=(t,a)=>e.encode(["uint256","uint256","uint256"],[ye.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,t,a]),be.exitExactBPTInForAllTokensOut=t=>e.encode(["uint256","uint256"],[ye.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT,t]),be.exitBPTInForExactTokensOut=(t,a)=>e.encode(["uint256","uint256[]","uint256"],[ye.BPT_IN_FOR_EXACT_TOKENS_OUT,t,a]);var me="production"===process.env.NODE_ENV,fe="Invariant failed";function Te(e,t){if(!e){if(me)throw new Error(fe);var a="function"==typeof t?t():t,n=a?"".concat(fe,": ").concat(a):fe;throw new Error(n)}}const he=e=>({address:Ie(e),specialization:_e(e),nonce:ge(e)}),Ie=e=>(Te(66===e.length,"Invalid poolId length"),e.slice(0,42)),_e=e=>{Te(66===e.length,"Invalid poolId length");const t=parseInt(e[45]);return Te(t<3,"Invalid pool specialization"),t},ge=e=>(Te(66===e.length,"Invalid poolId length"),p.from(`0x${e.slice(46)}`));var Pe;!function(e){e[e.MAINNET=1]="MAINNET",e[e.GOERLI=5]="GOERLI",e[e["GÖRLI"]=5]="GÖRLI",e[e.OPTIMISM=10]="OPTIMISM",e[e.GNOSIS=100]="GNOSIS",e[e.POLYGON=137]="POLYGON",e[e.FANTOM=250]="FANTOM",e[e.BASE=8453]="BASE",e[e.ZKEVM=1101]="ZKEVM",e[e.ARBITRUM=42161]="ARBITRUM",e[e.AVALANCHE=43114]="AVALANCHE",e[e.SEPOLIA=11155111]="SEPOLIA"}(Pe||(Pe={}));const we=1e4,xe=1e6,Ee={IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012","0x9f19a375709baf0e8e35c2c5c65aca676c4c7191000200000000000000000022","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020","0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366"]},Investment:{AllowList:["0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af","0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a","0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2"]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0x67d27634e44793fe63c467035e31ea8635117cd4":"stablePool","0x7dfdef5f355096603419239ce743bfaf1120312b":"weightedPool","0xcf0a32bbef8f064969f21f7e02328fb577382018":"weightedPool","0x2433477a10fc5d31b9513c638f19ee85caed53fd":"stablePool","0xebfd5681977e38af65a7487dc70b8221d089ccad":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e":"liquidityBootstrappingPool","0x142b9666a0a3a30477b052962dda81547e7029ab":"liquidityBootstrappingPool","0x1802953277fd955f9a254b80aa0582f193cf1d77":"liquidityBootstrappingPool","0x48767f9f868a4a7b86a90736632f6e44c2df7fa9":"managedPool","0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193":"managedPool","0xacd615b3705b9c880e4e7293f1030b34e57b4c1c":"managedPool","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2":"boostedPool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"boostedPool","0xc128a9954e6c874ea3d62ce62b468ba073093f25":"boostedPool"},Stakable:{AllowList:[]},Metadata:{"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e":{name:"Balancer Stable USD",hasIcon:!0}}},Ae={[Pe.GOERLI]:{IdsMap:{staBAL:"0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062",bbAaveUSD:{v1:"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f",v2:"0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7"},veBAL:"0xf8a0623ab66f985effc1c69d05f1af4badb01b00000200000000000000000060"},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:["0x22d398c68030ef6b1c55321cca6e0cecc5c93b2f000200000000000000000678"],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX"],Stable:{AllowList:["0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f","0xb60e46d90f2de35f7062a27d3a98749414036d5d000200000000000000000061","0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062","0xc957b1acceb21707b782eb8eee2ed8e20088463d000200000000000000000076","0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7","0x14f93df8a4e37bfdb49d2cec4789df7a010603d700000000000000000000011d","0x00a62d31b6c776b6813543bc99ff265f7222dbe100000000000000000000011e","0x0c925fce89a22e36ebd9b3c6e0262234e853d2f600000000000000000000019c"]},Investment:{AllowList:[]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0x44afeb87c871d8fea9398a026dea2bd3a13f5769":"stablePool","0xa55f73e2281c60206ba43a3590db07b8955832be":"stablePool","0xb48cc42c45d262534e46d5965a9ac496f1b7a830":"liquidityBootstrappingPool","0xb0c726778c3ae4b3454d85557a48e8fa502bdd6a":"liquidityBootstrappingPool","0x41e9036ae350baedcc7107760a020dca3c0731ec":"boostedPool","0xb848f50141f3d4255b37ac288c25c109104f2158":"composableStablePool","0x94f68b54191f62f781fe8298a8a5fa3ed772d227":"weightedPool"},Stakable:{AllowList:["0x16faf9f73748013155b7bc116a3008b57332d1e600020000000000000000005b","0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f","0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062","0x67f8fcb9d3c463da05de1392efdbb2a87f8599ea000200000000000000000059"]},Metadata:{"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f":{name:"Balancer Boosted Aave USD",hasIcon:!1}}},[Pe.MAINNET]:{IdsMap:{staBAL:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063",bbAaveUSD:{v1:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe",v2:"0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d"},veBAL:"0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014"},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","Gyro2","Gyro3","GyroE","FX"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed","0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249","0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d","0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d","0xf93579002dbe8046c43fefe86ec78b1112247bb80000000000000000000002bc","0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351","0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d","0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b"]},Investment:{AllowList:["0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af","0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a","0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2"]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0x67d27634e44793fe63c467035e31ea8635117cd4":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e":"liquidityBootstrappingPool","0x48767f9f868a4a7b86a90736632f6e44c2df7fa9":"managedPool","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2":"boostedPool","0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c":"stablePool","0xf9ac7b9df2b3454e841110cce5550bd5ac6f875f":"composableStablePool","0xcc508a455f5b0073973107db6a878ddbdab957bc":"weightedPool"},Stakable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0x072f14b85add63488ddad88f855fda4a99d6ac9b000200000000000000000027","0x0b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a","0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000013","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x27c9f71cc31464b906e0006d4fcbc8900f48f15f00020000000000000000010f","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x350196326aeaa9b98f1903fb5e8fc2686f85318c000200000000000000000084","0x3e5fa9518ea95c3e533eb377c001702a9aacaa32000200000000000000000052","0x51735bdfbfe3fc13dea8dc6502e2e958989429610002000000000000000000a0","0x5d66fff62c17d841935b60df5f07f6cf79bd0f4700020000000000000000014c","0x5f7fa48d765053f8dd85e052843e12d23e3d7bc50002000000000000000000c0","0x702605f43471183158938c1a3e5f5a359d7b31ba00020000000000000000009f","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x7edde0cb05ed19e03a9a47cd5e53fc57fde1c80c0002000000000000000000c8","0x8f4205e1604133d1875a3e771ae7e4f2b086563900020000000000000000010e","0x90291319f1d4ea3ad4db0dd8fe9e12baf749e84500020000000000000000013c","0x96646936b91d6b9d7d0c47c496afbf3d6ec7b6f8000200000000000000000019","0x96ba9025311e2f47b840a1f68ed57a3df1ea8747000200000000000000000160","0xa02e4b3d18d4e6b8d18ac421fbc3dfff8933c40a00020000000000000000004b","0xa6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e","0xbaeec99c90e3420ec6c1e7a769d2a856d2898e4d00020000000000000000008a","0xbf96189eee9357a95c7719f4f5047f76bde804e5000200000000000000000087","0xe2469f47ab58cf9cf59f9822e3c5de4950a41c49000200000000000000000089","0xe99481dc77691d8e2456e5f3f61c1810adfc1503000200000000000000000018","0xec60a5fef79a92c741cb74fdd6bfc340c0279b01000200000000000000000015","0xedf085f65b4f6c155e13155502ef925c9a756003000200000000000000000123","0xefaa1604e82e1b3af8430b90192c1b9e8197e377000200000000000000000021","0xf4c0dd9b82da36c07605df83c8a416f11724d88b000200000000000000000026","0xf5aaf7ee8c39b651cebf5f1f50c10631e78e0ef9000200000000000000000069","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x92762b42a06dcdddc5b7362cfb01e631c4d44b40000200000000000000000182","0xde8c195aa41c11a0c4787372defbbddaa31306d2000200000000000000000181","0x17ddd9646a69c9445cd8a9f921d4cd93bf50d108000200000000000000000159","0xc45d42f801105e861e86658648e3678ad7aa70f900010000000000000000011e","0x2d344a84bac123660b021eebe4eb6f12ba25fe8600020000000000000000018a","0xb460daa847c45f1c4a41cb05bfb3b51c92e41b36000200000000000000000194","0x5122e01d819e58bb2e22528c0d68d310f0aa6fd7000200000000000000000163","0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed","0xe8cc7e765647625b95f59c15848379d10b9ab4af0002000000000000000001de","0x85370d9e3bb111391cc89f6de344e801760461830002000000000000000001ef","0xa7ff759dbef9f3efdd1d59beee44b966acafe214000200000000000000000180","0x3f7c10701b14197e2695dec6428a2ca4cf7fc3b800020000000000000000023c","0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d","0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d","0xcfca23ca9ca720b6e98e3eb9b6aa0ffc4a5c08b9000200000000000000000274","0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249","0x0578292cb20a443ba1cde459c985ce14ca2bdee5000100000000000000000269","0x8eb6c82c3081bbbd45dcac5afa631aac53478b7c000100000000000000000270","0x1b65fe4881800b91d4277ba738b567cbb200a60d0002000000000000000002cc","0x99a14324cfd525a34bbc93ac7e348929909d57fd00020000000000000000030e","0x9b532ab955417afd0d012eb9f7389457cd0ea712000000000000000000000338","0x48607651416a943bf5ac71c41be1420538e78f87000200000000000000000327","0x6a5ead5433a50472642cd268e584dafa5a394490000200000000000000000366","0x0fd5663d4893ae0d579d580584806aadd2dd0b8b000200000000000000000367","0x441b8a1980f2f2e43a9397099d15cc2fe6d3625000020000000000000000035f","0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351","0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d"]},Metadata:{"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063":{name:"Balancer Stable USD",hasIcon:!0},"0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249":{name:"AuraBAL Stable Pool",hasIcon:!1}}},[Pe.POLYGON]:{IdsMap:{xMatic:{v1:"0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4",v2:"0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c"},stMatic:{v1:"0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366",v2:"0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d"},mai4:{mai4:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012",maiBbaUsd:"0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e"}},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","Gyro2","Gyro3","GyroE","FX"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0xb4670d1389c758e4380c4211bcbc85342688b9c50002000000000000000003d8","0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455","0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4","0xb4b22bd6cdad0ab828be6f8a4086dfa54e9b373600020000000000000000058f","0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba","0x0b8319061732b34cab22445fa83b81f950e4b7ed000000000000000000000709","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d","0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c","0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e","0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b","0xa48d164f6eb0edc68bd03b56fa59e12f24499ad10000000000000000000007c4"]},Investment:{AllowList:[""]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x41b953164995c11c81da73d212ed8af25741b7ac":"liquidityBootstrappingPool","0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193":"managedPool","0xc128a9954e6c874ea3d62ce62b468ba073093f25":"boostedPool","0xca96c4f198d343e251b1a01f3eba061ef3da73c1":"stablePool","0x136fd06fa01ecf624c7f2b3cb15742c1339dc2c4":"composableStablePool","0x0e39c3d9b2ec765efd9c5c70bb290b1fcd8536e3":"weightedPool"},Stakable:{AllowList:["0x0297e37f1873d2dab4487aa67cd56b58e2f27875000100000000000000000002","0x03cd191f589d12b0582a99808cf19851e468e6b500010000000000000000000a","0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x10f21c9bd8128a29aa785ab2de0d044dcdd79436000200000000000000000059","0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000032","0x36128d5436d2d70cab39c9af9cce146c38554ff0000100000000000000000008","0x5a6ae1fd70d04ba4a279fc219dfabc53825cb01d00020000000000000000020e","0x614b5038611729ed49e0ded154d8a5d3af9d1d9e00010000000000000000001d","0x7c9cf12d783821d5c63d8e9427af5c44bad92445000100000000000000000051","0x805ca3ccc61cc231851dee2da6aabff0a7714aa7000200000000000000000361","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0xb204bf10bc3a5435017d3db247f56da601dfe08a0002000000000000000000fe","0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455","0xce66904b68f1f070332cbc631de7ee98b650b499000100000000000000000009","0xcf354603a9aebd2ff9f33e1b04246d8ea204ae9500020000000000000000005a","0xdb1db6e248d7bb4175f6e5a382d0a03fe3dcc813000100000000000000000035","0xea4e073c8ac859f2994c07e627178719c8002dc00002000000000000000003dc","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4","0x2dbc9ab0160087ae59474fb7bed95b9e808fa6bc0001000000000000000003db","0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba","0x8f9dd2064eb38e8e40f2ab67bde27c0e16ea9b080002000000000000000004ca","0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b","0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e","0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d","0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c"]},Metadata:{}},[Pe.ARBITRUM]:{IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX"],Stable:{AllowList:["0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020","0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d","0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f","0xd89746affa5483627a87e55713ec1905114394950002000000000000000000bf","0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102","0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159"]},Investment:{AllowList:[""]},Factories:{"0x7dfdef5f355096603419239ce743bfaf1120312b":"weightedPool","0xcf0a32bbef8f064969f21f7e02328fb577382018":"weightedPool","0x2433477a10fc5d31b9513c638f19ee85caed53fd":"stablePool","0xebfd5681977e38af65a7487dc70b8221d089ccad":"stablePool","0x142b9666a0a3a30477b052962dda81547e7029ab":"liquidityBootstrappingPool","0x1802953277fd955f9a254b80aa0582f193cf1d77":"liquidityBootstrappingPool","0xacd615b3705b9c880e4e7293f1030b34e57b4c1c":"managedPool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"boostedPool","0xef44d6786b2b4d544b7850fe67ce6381626bf2d6":"stablePool","0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33":"composableStablePool","0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c":"weightedPool"},Stakable:{AllowList:["0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d","0x0adeb25cb5920d4f7447af4a0428072edc2cee2200020000000000000000004a","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0x1779900c7707885720d39aa741f4086886307e9e00020000000000000000004b","0x4a3a22a3e7fee0ffbb66f1c28bfac50f75546fc7000200000000000000000008","0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f","0x64541216bafffeec8ea535bb71fbc927831d0595000100000000000000000002","0x651e00ffd5ecfa7f3d4f33d62ede0a97cf62ede2000200000000000000000006","0xb28670b3e7ad27bd41fb5938136bf9e9cba90d6500020000000000000000001e","0xb340b6b1a34019853cb05b2de6ee8ffd0b89a008000100000000000000000036","0xb5b77f1ad2b520df01612399258e7787af63025d000200000000000000000010","0xc2f082d33b5b8ef3a7e3de30da54efd3114512ac000200000000000000000017","0xc61ff48f94d801c1ceface0289085197b5ec44f000020000000000000000004d","0xcc65a812ce382ab909a11e434dbf75b34f1cc59d000200000000000000000001","0xe1b40094f1446722c424c598ac412d590e0b3ffb000200000000000000000076","0xb3028ca124b80cfe6e9ca57b70ef2f0ccc41ebd40002000000000000000000ba","0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102","0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159","0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158"]},Metadata:{}},[Pe.GNOSIS]:{IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX","Gyro2","Gyro3","GyroE","HighAmpComposableStable","FX"],Stable:{AllowList:["0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000004","0x707b7d4a1bae449d546dcab869256591bbb3d70b000000000000000000000000"]},Investment:{AllowList:[]},Factories:{},Stakable:{AllowList:[]},Metadata:{}}};function ve(e){return Ae[e]?Ae[e]:Ee}var Se,ke,Oe,Me,Ce,Fe,Be;!function(e){e.Id="id",e.Address="address",e.PoolId="poolId"}(Se||(Se={})),function(e){e.Balance="balance",e.Id="id",e.PoolId="poolId",e.UserAddress="userAddress"}(ke||(ke={})),function(e){e.Id="id",e.UserAddress="user",e.GaugeId="gauge",e.Balance="balance"}(Oe||(Oe={})),function(e){e[e.GeneralPool=0]="GeneralPool",e[e.MinimalSwapInfoPool=1]="MinimalSwapInfoPool",e[e.TwoTokenPool=2]="TwoTokenPool"}(Me||(Me={})),function(e){e[e.DepositInternal=0]="DepositInternal",e[e.WithdrawInternal=1]="WithdrawInternal",e[e.TransferInternal=2]="TransferInternal",e[e.TransferExternal=3]="TransferExternal"}(Ce||(Ce={})),function(e){e[e.Withdraw=0]="Withdraw",e[e.Deposit=1]="Deposit",e[e.Update=2]="Update"}(Fe||(Fe={})),function(e){e.Weighted="Weighted",e.Investment="Investment",e.Stable="Stable",e.ComposableStable="ComposableStable",e.MetaStable="MetaStable",e.StablePhantom="StablePhantom",e.LiquidityBootstrapping="LiquidityBootstrapping",e.Element="Element",e.Gyro2="Gyro2",e.Gyro3="Gyro3",e.GyroE="GyroE",e.Managed="Managed",e.AaveLinear="AaveLinear",e.Linear="Linear",e.EulerLinear="EulerLinear",e.ERC4626Linear="ERC4626Linear",e.BeefyLinear="BeefyLinear",e.GearboxLinear="GearboxLinear",e.MidasLinear="MidasLinear",e.ReaperLinear="ReaperLinear",e.SiloLinear="SiloLinear",e.TetuLinear="TetuLinear",e.YearnLinear="YearnLinear",e.FX="FX"}(Be||(Be={}));class Re{constructor(){this.enableLogging=!0}static getInstance(){return Re.instance||(Re.instance=new Re),Re.instance}setLoggingEnabled(e){this.enableLogging=e}info(e){this.enableLogging}warn(e){this.enableLogging&&console.warn(`[WARN] ${e}`)}error(e){this.enableLogging&&console.error(`[ERROR] ${e}`)}time(e){this.enableLogging}timeEnd(e){this.enableLogging}}const Ne=e=>e[0].map(((t,a)=>e.map((e=>e[a]))));class Le{constructor(e){this.ETH=o,this.isETH=e=>Le.isEqual(e,this.ETH),this.isWETH=e=>Le.isEqual(e,this.WETH),this.translateToERC20=e=>this.isETH(e)?this.WETH:e,this.WETH=u(e)}sortTokens(e,...t){t.forEach((t=>Te(e.length===t.length,"array length mismatch")));const a=e.map(this.translateToERC20),n=Ne([a,...t]).sort((([e],[t])=>((e,t)=>e.toLowerCase()>t.toLowerCase()?1:-1)(e,t))),[o,...i]=Ne(n);return[e.includes(this.ETH)?o.map((e=>this.isWETH(e)?this.ETH:e)):o,...i]}}Le.isEqual=(e,t)=>u(e)===u(t);const De={"000":"ADD_OVERFLOW","001":"SUB_OVERFLOW","002":"SUB_UNDERFLOW","003":"MUL_OVERFLOW","004":"ZERO_DIVISION","005":"DIV_INTERNAL","006":"X_OUT_OF_BOUNDS","007":"Y_OUT_OF_BOUNDS","008":"PRODUCT_OUT_OF_BOUNDS","009":"INVALID_EXPONENT",100:"OUT_OF_BOUNDS",101:"UNSORTED_ARRAY",102:"UNSORTED_TOKENS",103:"INPUT_LENGTH_MISMATCH",104:"ZERO_TOKEN",200:"MIN_TOKENS",201:"MAX_TOKENS",202:"MAX_SWAP_FEE_PERCENTAGE",203:"MIN_SWAP_FEE_PERCENTAGE",204:"MINIMUM_BPT",205:"CALLER_NOT_VAULT",206:"UNINITIALIZED",207:"BPT_IN_MAX_AMOUNT",208:"BPT_OUT_MIN_AMOUNT",209:"EXPIRED_PERMIT",210:"NOT_TWO_TOKENS",211:"DISABLED",300:"MIN_AMP",301:"MAX_AMP",302:"MIN_WEIGHT",303:"MAX_STABLE_TOKENS",304:"MAX_IN_RATIO",305:"MAX_OUT_RATIO",306:"MIN_BPT_IN_FOR_TOKEN_OUT",307:"MAX_OUT_BPT_FOR_TOKEN_IN",308:"NORMALIZED_WEIGHT_INVARIANT",309:"INVALID_TOKEN",310:"UNHANDLED_JOIN_KIND",311:"ZERO_INVARIANT",312:"ORACLE_INVALID_SECONDS_QUERY",313:"ORACLE_NOT_INITIALIZED",314:"ORACLE_QUERY_TOO_OLD",315:"ORACLE_INVALID_INDEX",316:"ORACLE_BAD_SECS",317:"AMP_END_TIME_TOO_CLOSE",318:"AMP_ONGOING_UPDATE",319:"AMP_RATE_TOO_HIGH",320:"AMP_NO_ONGOING_UPDATE",321:"STABLE_INVARIANT_DIDNT_CONVERGE",322:"STABLE_GET_BALANCE_DIDNT_CONVERGE",323:"RELAYER_NOT_CONTRACT",324:"BASE_POOL_RELAYER_NOT_CALLED",325:"REBALANCING_RELAYER_REENTERED",326:"GRADUAL_UPDATE_TIME_TRAVEL",327:"SWAPS_DISABLED",328:"CALLER_IS_NOT_LBP_OWNER",329:"PRICE_RATE_OVERFLOW",330:"INVALID_JOIN_EXIT_KIND_WHILE_SWAPS_DISABLED",331:"WEIGHT_CHANGE_TOO_FAST",332:"LOWER_GREATER_THAN_UPPER_TARGET",333:"UPPER_TARGET_TOO_HIGH",334:"UNHANDLED_BY_LINEAR_POOL",335:"OUT_OF_TARGET_RANGE",336:"UNHANDLED_EXIT_KIND ",337:"UNAUTHORIZED_EXIT",338:"MAX_MANAGEMENT_SWAP_FEE_PERCENTAGE",339:"UNHANDLED_BY_MANAGED_POOL",340:"UNHANDLED_BY_PHANTOM_POOL",341:"TOKEN_DOES_NOT_HAVE_RATE_PROVIDER",342:"INVALID_INITIALIZATION",343:"OUT_OF_NEW_TARGET_RANGE",344:"UNAUTHORIZED_OPERATION",345:"UNINITIALIZED_POOL_CONTROLLER",400:"REENTRANCY",401:"SENDER_NOT_ALLOWED",402:"PAUSED",403:"PAUSE_WINDOW_EXPIRED",404:"MAX_PAUSE_WINDOW_DURATION",405:"MAX_BUFFER_PERIOD_DURATION",406:"INSUFFICIENT_BALANCE",407:"INSUFFICIENT_ALLOWANCE",408:"ERC20_TRANSFER_FROM_ZERO_ADDRESS",409:"ERC20_TRANSFER_TO_ZERO_ADDRESS",410:"ERC20_MINT_TO_ZERO_ADDRESS",411:"ERC20_BURN_FROM_ZERO_ADDRESS",412:"ERC20_APPROVE_FROM_ZERO_ADDRESS",413:"ERC20_APPROVE_TO_ZERO_ADDRESS",414:"ERC20_TRANSFER_EXCEEDS_ALLOWANCE",415:"ERC20_DECREASED_ALLOWANCE_BELOW_ZERO",416:"ERC20_TRANSFER_EXCEEDS_BALANCE",417:"ERC20_BURN_EXCEEDS_ALLOWANCE",418:"SAFE_ERC20_CALL_FAILED",419:"ADDRESS_INSUFFICIENT_BALANCE",420:"ADDRESS_CANNOT_SEND_VALUE",421:"SAFE_CAST_VALUE_CANT_FIT_INT256",422:"GRANT_SENDER_NOT_ADMIN",423:"REVOKE_SENDER_NOT_ADMIN",424:"RENOUNCE_SENDER_NOT_ALLOWED",425:"BUFFER_PERIOD_EXPIRED",426:"CALLER_IS_NOT_OWNER",427:"NEW_OWNER_IS_ZERO",428:"CODE_DEPLOYMENT_FAILED",429:"CALL_TO_NON_CONTRACT",430:"LOW_LEVEL_CALL_FAILED",431:"NOT_PAUSED",432:"ADDRESS_ALREADY_ALLOWLISTED",433:"ADDRESS_NOT_ALLOWLISTED",434:"ERC20_BURN_EXCEEDS_BALANCE",500:"INVALID_POOL_ID",501:"CALLER_NOT_POOL",502:"SENDER_NOT_ASSET_MANAGER",503:"USER_DOESNT_ALLOW_RELAYER",504:"INVALID_SIGNATURE",505:"EXIT_BELOW_MIN",506:"JOIN_ABOVE_MAX",507:"SWAP_LIMIT",508:"SWAP_DEADLINE",509:"CANNOT_SWAP_SAME_TOKEN",510:"UNKNOWN_AMOUNT_IN_FIRST_SWAP",511:"MALCONSTRUCTED_MULTIHOP_SWAP",512:"INTERNAL_BALANCE_OVERFLOW",513:"INSUFFICIENT_INTERNAL_BALANCE",514:"INVALID_ETH_INTERNAL_BALANCE",515:"INVALID_POST_LOAN_BALANCE",516:"INSUFFICIENT_ETH",517:"UNALLOCATED_ETH",518:"ETH_TRANSFER",519:"CANNOT_USE_ETH_SENTINEL",520:"TOKENS_MISMATCH",521:"TOKEN_NOT_REGISTERED",522:"TOKEN_ALREADY_REGISTERED",523:"TOKENS_ALREADY_SET",524:"TOKENS_LENGTH_MUST_BE_2",525:"NONZERO_TOKEN_BALANCE",526:"BALANCE_TOTAL_OVERFLOW",527:"POOL_NO_TOKENS",528:"INSUFFICIENT_FLASH_LOAN_BALANCE",600:"SWAP_FEE_PERCENTAGE_TOO_HIGH",601:"FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH",602:"INSUFFICIENT_FLASH_LOAN_FEE_AMOUNT"};class Ue{constructor(){}}async function Ve(e){if("string"==typeof e)return e;if(I.isSigner(e))return e.getAddress();if(e.address)return e.address;throw new Error("Could not read account address")}var qe;Ue.isErrorCode=e=>{if(!e.includes("BAL#"))return!1;const t=e.replace("BAL#","");return Object.keys(De).includes(t)},Ue.parseErrorCode=e=>{if(!e.includes("BAL#"))throw new Error("Error code not found");const t=e.replace("BAL#",""),a=De[t];if(!a)throw new Error("Error code not found");return a},Ue.tryParseErrorCode=e=>{try{return Ue.parseErrorCode(e)}catch{return e}},Ue.isBalancerError=e=>Object.values(De).includes(e),Ue.encodeError=e=>{const t=Object.entries(De).find((([,t])=>t===e));if(!t)throw Error("Error message not found");return`BAL#${t[0]}`},function(e){e.JoinPool="JoinPool",e.ExitPool="ExitPool",e.Swap="Swap",e.BatchSwap="BatchSwap",e.SetRelayerApproval="SetRelayerApproval"}(qe||(qe={}));class Ge{constructor(){}}Ge.encodeCalldataAuthorization=(e,t,a)=>{const n=c(y(t),32).slice(2),{v:o,r:i,s:s}=b(a);return`${e}${n}${c(y(o),32).slice(2)}${i.slice(2)}${s.slice(2)}`},Ge.signJoinAuthorization=(e,t,a,n,o,i)=>Ge.signAuthorizationFor(qe.JoinPool,e,t,a,n,o,i),Ge.signExitAuthorization=(e,t,a,n,o,i)=>Ge.signAuthorizationFor(qe.ExitPool,e,t,a,n,o,i),Ge.signSwapAuthorization=(e,t,a,n,o,i)=>Ge.signAuthorizationFor(qe.Swap,e,t,a,n,o,i),Ge.signBatchSwapAuthorization=(e,t,a,n,o,i)=>Ge.signAuthorizationFor(qe.BatchSwap,e,t,a,n,o,i),Ge.signSetRelayerApprovalAuthorization=(e,t,a,n,o,i)=>Ge.signAuthorizationFor(qe.SetRelayerApproval,e,t,a,n,o,i),Ge.signAuthorizationFor=async(e,t,a,n,o,s=i,r)=>{const{chainId:p}=await t.provider.getNetwork();if(!r){const e=await a.getAddress();r=await t.getNextNonce(e)}const d={name:"Balancer V2 Vault",version:"1",chainId:p,verifyingContract:t.address},l={[e]:[{name:"calldata",type:"bytes"},{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},u={calldata:o,sender:await Ve(n),nonce:r.toString(),deadline:s.toString()};return a._signTypedData(d,l,u)};class We{constructor(){}}We.signSetMinterApproval=async(e,t,a,n,o=i,s)=>{const{chainId:r}=await e.provider.getNetwork();if(!s){const t=await n.getAddress();s=await e.getNextNonce(t)}const d={name:"Balancer Minter",version:"1",chainId:r,verifyingContract:e.address},l={minter:await Ve(t),approval:a,nonce:s.toString(),deadline:o.toString()},u=await n._signTypedData(d,{SetMinterApproval:[{name:"minter",type:"address"},{name:"approval",type:"bool"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},l);return{...b(u),deadline:p.from(o)}};const $e=async(e,t,a,n,o=i,s)=>{const{chainId:r}=await e.provider.getNetwork(),d=await t.getAddress();s||(s=await e.nonces(d));const l={name:await e.name(),version:"1",chainId:r,verifyingContract:e.address},u={owner:d,spender:await Ve(a),value:n,nonce:s,deadline:o},c=await t._signTypedData(l,{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},u);return{...b(c),deadline:p.from(o),nonce:p.from(s)}},He=BigInt(0),Ke=BigInt(1),Je=BigInt("1000000000000000000"),Xe=(e,t)=>{if(!e)throw new Error(t)};function Ye(e){const t=BigInt(18)-e;return Je*BigInt(10)**t}function je(e,t){return et.mulDownFixed(e,t)}function ze(e,t){const a=new Array(e.length);for(let n=0;n=0&&a>=e||t<0&&at>e?t:e))}static min(e,t){return e=this.MIN_NATURAL_EXPONENT&&e<=this.MAX_NATURAL_EXPONENT,"Errors.INVALID_EXPONENT"),e<0)return this.ONE_18*this.ONE_18/this.exp(BigInt(-1)*e);let t;e>=this.x0?(e-=this.x0,t=this.a0):e>=this.x1?(e-=this.x1,t=this.a1):t=BigInt(1),e*=BigInt(100);let a=this.ONE_20;e>=this.x2&&(e-=this.x2,a=a*this.a2/this.ONE_20),e>=this.x3&&(e-=this.x3,a=a*this.a3/this.ONE_20),e>=this.x4&&(e-=this.x4,a=a*this.a4/this.ONE_20),e>=this.x5&&(e-=this.x5,a=a*this.a5/this.ONE_20),e>=this.x6&&(e-=this.x6,a=a*this.a6/this.ONE_20),e>=this.x7&&(e-=this.x7,a=a*this.a7/this.ONE_20),e>=this.x8&&(e-=this.x8,a=a*this.a8/this.ONE_20),e>=this.x9&&(e-=this.x9,a=a*this.a9/this.ONE_20);let n,o=this.ONE_20;return n=e,o+=n,n=n*e/this.ONE_20/BigInt(2),o+=n,n=n*e/this.ONE_20/BigInt(3),o+=n,n=n*e/this.ONE_20/BigInt(4),o+=n,n=n*e/this.ONE_20/BigInt(5),o+=n,n=n*e/this.ONE_20/BigInt(6),o+=n,n=n*e/this.ONE_20/BigInt(7),o+=n,n=n*e/this.ONE_20/BigInt(8),o+=n,n=n*e/this.ONE_20/BigInt(9),o+=n,n=n*e/this.ONE_20/BigInt(10),o+=n,n=n*e/this.ONE_20/BigInt(11),o+=n,n=n*e/this.ONE_20/BigInt(12),o+=n,a*o/this.ONE_20*t/BigInt(100)}static _ln_36(e){const t=((e*=this.ONE_18)-this.ONE_36)*this.ONE_36/(e+this.ONE_36),a=t*t/this.ONE_36;let n=t,o=n;return n=n*a/this.ONE_36,o+=n/BigInt(3),n=n*a/this.ONE_36,o+=n/BigInt(5),n=n*a/this.ONE_36,o+=n/BigInt(7),n=n*a/this.ONE_36,o+=n/BigInt(9),n=n*a/this.ONE_36,o+=n/BigInt(11),n=n*a/this.ONE_36,o+=n/BigInt(13),n=n*a/this.ONE_36,o+=n/BigInt(15),o*BigInt(2)}static _ln(e){if(e=this.a0*this.ONE_18&&(e/=this.a0,t+=this.x0),e>=this.a1*this.ONE_18&&(e/=this.a1,t+=this.x1),t*=BigInt(100),(e*=BigInt(100))>=this.a2&&(e=e*this.ONE_20/this.a2,t+=this.x2),e>=this.a3&&(e=e*this.ONE_20/this.a3,t+=this.x3),e>=this.a4&&(e=e*this.ONE_20/this.a4,t+=this.x4),e>=this.a5&&(e=e*this.ONE_20/this.a5,t+=this.x5),e>=this.a6&&(e=e*this.ONE_20/this.a6,t+=this.x6),e>=this.a7&&(e=e*this.ONE_20/this.a7,t+=this.x7),e>=this.a8&&(e=e*this.ONE_20/this.a8,t+=this.x8),e>=this.a9&&(e=e*this.ONE_20/this.a9,t+=this.x9),e>=this.a10&&(e=e*this.ONE_20/this.a10,t+=this.x10),e>=this.a11&&(e=e*this.ONE_20/this.a11,t+=this.x11);const a=(e-this.ONE_20)*this.ONE_20/(e+this.ONE_20),n=a*a/this.ONE_20;let o=a,i=o;return o=o*n/this.ONE_20,i+=o/BigInt(3),o=o*n/this.ONE_20,i+=o/BigInt(5),o=o*n/this.ONE_20,i+=o/BigInt(7),o=o*n/this.ONE_20,i+=o/BigInt(9),o=o*n/this.ONE_20,i+=o/BigInt(11),i*=BigInt(2),(t+i)/BigInt(100)}}tt.ONE_18=BigInt("1000000000000000000"),tt.ONE_20=BigInt("100000000000000000000"),tt.ONE_36=BigInt("1000000000000000000000000000000000000"),tt.MAX_NATURAL_EXPONENT=BigInt("130000000000000000000"),tt.MIN_NATURAL_EXPONENT=BigInt("-41000000000000000000"),tt.LN_36_LOWER_BOUND=BigInt(tt.ONE_18)-BigInt("100000000000000000"),tt.LN_36_UPPER_BOUND=BigInt(tt.ONE_18)+BigInt("100000000000000000"),tt.MILD_EXPONENT_BOUND=BigInt(2)**BigInt(254)/tt.ONE_20,tt.x0=BigInt("128000000000000000000"),tt.a0=BigInt("38877084059945950922200000000000000000000000000000000000"),tt.x1=BigInt("64000000000000000000"),tt.a1=BigInt("6235149080811616882910000000"),tt.x2=BigInt("3200000000000000000000"),tt.a2=BigInt("7896296018268069516100000000000000"),tt.x3=BigInt("1600000000000000000000"),tt.a3=BigInt("888611052050787263676000000"),tt.x4=BigInt("800000000000000000000"),tt.a4=BigInt("298095798704172827474000"),tt.x5=BigInt("400000000000000000000"),tt.a5=BigInt("5459815003314423907810"),tt.x6=BigInt("200000000000000000000"),tt.a6=BigInt("738905609893065022723"),tt.x7=BigInt("100000000000000000000"),tt.a7=BigInt("271828182845904523536"),tt.x8=BigInt("50000000000000000000"),tt.a8=BigInt("164872127070012814685"),tt.x9=BigInt("25000000000000000000"),tt.a9=BigInt("128402541668774148407"),tt.x10=BigInt("12500000000000000000"),tt.a10=BigInt("113314845306682631683"),tt.x11=BigInt("6250000000000000000"),tt.a11=BigInt("106449445891785942956");const at=3,nt=(e,t,a)=>{var n;let i=a?e.tokens.map((e=>e.address===t?o:e.address)):e.tokens.map((e=>e.address)),s=e.tokens.map((e=>{var t;return null!==(t=e.decimals)&&void 0!==t?t:18})),r=e.tokens.map((e=>d(e.balance,e.decimals).toBigInt())),p=e.tokens.map((e=>{var t;return d(null!==(t=e.weight)&&void 0!==t?t:"1",18).toBigInt()})),l=e.tokens.map((e=>{var t;return d(null!==(t=e.priceRate)&&void 0!==t?t:"1",18).toBigInt()})),u=s.map((e=>Ye(BigInt(e)))),c=u.map(((e,t)=>et.mulDownFixed(e,l[t]))),y=ze(r,c);if(t){const e=new Le(t);[i,s,c,u,r,y,p,l]=e.sortTokens(i,s,c,u,r,y,p,l)}const b=d(null!==(n=e.amp)&&void 0!==n?n:"1",3).toBigInt(),m=y.indexOf(et.max(y)),f=[...c],T=[...u],h=[...i],I=[...r],_=[...l],g=[...y],P=i.indexOf(e.address);return-1!==P&&(f.splice(P,1),T.splice(P,1),h.splice(P,1),I.splice(P,1),_.splice(P,1),g.splice(P,1)),{bptIndex:P,higherBalanceTokenIndex:m,ampWithPrecision:b,balancesEvm:r,balancesEvmWithoutBpt:I,priceRates:l,priceRatesWithoutBpt:_,swapFeeEvm:d(e.swapFee,18).toBigInt(),poolTokens:i,poolTokensWithoutBpt:h,weights:p,scalingFactors:c,scalingFactorsWithoutBpt:f,scalingFactorsRaw:u,scalingFactorsRawWithoutBpt:T,upScaledBalances:y,upScaledBalancesWithoutBpt:g,totalSharesEvm:d(e.totalShares||"0",18).toBigInt()}},ot={Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",WETH:"0x0000000000000000000000000000000000000000",BAL:"0x0000000000000000000000000000000000000000"}},it={[Pe.GOERLI]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","USDT","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",WETH:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",BAL:"0xfA8449189744799aD2AcE7e0EBAC8BB7575eff47",bbaUSD:"0x13ACD41C585d7EbB4a9460f7C8f50BE60DC080Cd"},PriceChainMap:{"0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0x37f03a12241e9fd3658ad6777d289c3fb8512bc9":"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599","0xfa8449189744799ad2ace7e0ebac8bb7575eff47":"0xba100000625a3754423978a60c9317c58a424e3d","0xe0c9275e44ea80ef17579d33c55136b7da269aeb":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","0x8c9e6c40d3402480ace624730524facc5482798c":"0x6b175474e89094c44da98b954eedeac495271d0f","0x1f1f156e0317167c11aa412e3d1435ea29dc3cce":"0xdac17f958d2ee523a2206206994597c13d831ec7","0x4cb1892fddf14f772b2e39e299f44b2e5da90d04":"0x3ed3b47dd13ec9a98b44e6204a523e766b225811","0x811151066392fd641fe74a9b55a712670572d161":"0xbcca60bb61934080951369a648fb03df4f96263c","0x89534a24450081aa267c79b07411e9617d984052":"0x028171bca77440897b824ca71d1c56cac55b68a3","0x829f35cebbcd47d3c120793c12f7a232c903138b":"0x956f47f50a910163d8bf957cf5846d573e7f87ca","0xff386a3d08f80ac38c77930d173fa56c6286dc8b":"0x6810e776880c02933d47db1b9fc05908e5386b96"}},[Pe.MAINNET]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",WETH:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",BAL:"0xba100000625a3754423978a60c9317c58a424e3d",bbaUSD:"0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2",bbaUSDv2:"0xA13a9247ea42D743238089903570127DdA72fE44"}},[Pe.POLYGON]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",WETH:"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",BAL:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3"}},[Pe.ARBITRUM]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",WETH:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",BAL:"0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8"}},[Pe.GNOSIS]:{Popular:{Symbols:["xDAI","WXDAI","WETH","BAL"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xe91d153e0b41518a2ce8dd3d7944fa863463a97d",WETH:"0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1",BAL:"0x7eF541E2a22058048904fE5744f9c7E4C57AF717"}}};function st(e){return it[e]?it[e]:ot}let rt=!1,pt=!1;const dt={debug:1,default:2,info:2,warning:3,error:4,off:5};let lt=dt.default,ut=null;const ct=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(a){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var yt,bt;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(yt||(yt={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(bt||(bt={}));const mt="0123456789abcdef";class ft{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const a=e.toLowerCase();null==dt[a]&&this.throwArgumentError("invalid log level name","logLevel",e),lt>dt[a]||console.log.apply(console,t)}debug(...e){this._log(ft.levels.DEBUG,e)}info(...e){this._log(ft.levels.INFO,e)}warn(...e){this._log(ft.levels.WARNING,e)}makeError(e,t,a){if(pt)return this.makeError("censored error",t,{});t||(t=ft.errors.UNKNOWN_ERROR),a||(a={});const n=[];Object.keys(a).forEach((e=>{const t=a[e];try{if(t instanceof Uint8Array){let a="";for(let e=0;e>4],a+=mt[15&t[e]];n.push(e+"=Uint8Array(0x"+a+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(a[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const o=e;let i="";switch(t){case bt.NUMERIC_FAULT:{i="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":i+="-"+t;break;case"negative-power":case"negative-width":i+="-unsupported";break;case"unbound-bitwise-result":i+="-unbound-result"}break}case bt.CALL_EXCEPTION:case bt.INSUFFICIENT_FUNDS:case bt.MISSING_NEW:case bt.NONCE_EXPIRED:case bt.REPLACEMENT_UNDERPRICED:case bt.TRANSACTION_REPLACED:case bt.UNPREDICTABLE_GAS_LIMIT:i=t}i&&(e+=" [ See: https://links.ethers.org/v5-errors-"+i+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(a).forEach((function(e){s[e]=a[e]})),s}throwError(e,t,a){throw this.makeError(e,t,a)}throwArgumentError(e,t,a){return this.throwError(e,ft.errors.INVALID_ARGUMENT,{argument:t,value:a})}assert(e,t,a,n){e||this.throwError(t,a,n)}assertArgument(e,t,a,n){e||this.throwArgumentError(t,a,n)}checkNormalize(e){ct&&this.throwError("platform missing String.prototype.normalize",ft.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ct})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,ft.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,ft.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,a){a=a?": "+a:"",et&&this.throwError("too many arguments"+a,ft.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",ft.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",ft.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",ft.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return ut||(ut=new ft("logger/5.7.0")),ut}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",ft.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),rt){if(!e)return;this.globalLogger().throwError("error censorship permanent",ft.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}pt=!!e,rt=!!t}static setLogLevel(e){const t=dt[e.toLowerCase()];null!=t?lt=t:ft.globalLogger().warn("invalid log level - "+e)}static from(e){return new ft(e)}}ft.errors=bt,ft.levels=yt;const Tt=new ft("units/5.7.0"),ht=["wei","kwei","mwei","gwei","szabo","finney","ether"];function It(e,t){if("string"==typeof t){const e=ht.indexOf(t);-1!==e&&(t=3*e)}return l(e,null!=t?t:18)}function _t(e,t){if("string"!=typeof e&&Tt.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=ht.indexOf(t);-1!==e&&(t=3*e)}return d(e,null!=t?t:18)}const gt={[Pe.MAINNET]:{waUSDT:"0xf8fd466f12e236f4c96f7cce6c79eadb819abf58",waUSDC:"0xd093fa4fb80d09bb30817fdcd442d4d02ed3e5de",waDAI:"0x02d60b84491589974263d922d9cc7a3152618ef6"},[Pe.POLYGON]:{wamDAI:"0xee029120c72b0607344f35b17cdd90025e647b00",wamUSDC:"0x221836a597948dce8f3568e044ff123108acc42a",wamUSDT:"0x19c60a251e525fa88cd6f3768416a8024e98fc19"}},Pt={[Pe.MAINNET]:{[gt[Pe.MAINNET].waUSDT]:{aToken:"0x3ed3b47dd13ec9a98b44e6204a523e766b225811",underlying:"0xdac17f958d2ee523a2206206994597c13d831ec7"},[gt[Pe.MAINNET].waUSDC]:{aToken:"0xbcca60bb61934080951369a648fb03df4f96263c",underlying:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"},[gt[Pe.MAINNET].waDAI]:{aToken:"0x028171bca77440897b824ca71d1c56cac55b68a3",underlying:"0x6b175474e89094c44da98b954eedeac495271d0f"}},[Pe.POLYGON]:{[gt[Pe.POLYGON].wamUSDT]:{aToken:"0x60d55f02a771d515e077c9c2403a1ef324885cec",underlying:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f"},[gt[Pe.POLYGON].wamUSDC]:{aToken:"0x1a13f4ca1d028320a707d99520abfefca3998b7f",underlying:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174"},[gt[Pe.POLYGON].wamDAI]:{aToken:"0x27f8d03b3a2196956ed754badc28d73be8830a6e",underlying:"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063"}}},wt=new t(["function rate() view returns (uint256)"]);class xt{constructor(e,t){this.multicall=e,this.network=t}async fetch(e){const t=Object.values(gt[e]),a=t.map((e=>({target:e,callData:wt.encodeFunctionData("rate",[])}))),[,n]=await this.multicall.callStatic.aggregate(a);return t.reduce(((e,t,a)=>(e[t]||(e[t]="0x"==n[a]?0:parseFloat(It(n[a],27))),e)),{})}async getRate(e){return 1}}function Et(e){const t={};return e.forEach((e=>{e.price&&(t[e.address]=e.price)})),t}function At(e,t){let a=e.toLowerCase();return a=vt(a,t),a=St(a,t),a}const vt=(e,t)=>{const a=st(t).PriceChainMap;return a&&a[e.toLowerCase()]||e},St=(e,t)=>{const a=e.toLocaleLowerCase(),n=t;return null!=Pt[n]&&null!=Pt[n]&&Object.keys(Pt[n]).includes(a)?Pt[n][a].aToken:a},kt=(e,t)=>{const a=t.filter(((t,a)=>e[a]===o));return a[0]?p.from(a[0]):p.from(0)};class Ot{constructor(e,t=200,a=100){this.fn=e,this.wait=t,this.limit=a,this.requestSets=[],this.promisedCalls=[],this.promisedCount=0,this.debounceCancel=()=>{}}fetch(e){var t,a;return(t=this.requestSets)[a=this.promisedCount]||(t[a]=new Set),e&&this.requestSets[this.promisedCount].add(e),this.requestSets[this.promisedCount].size>=this.limit?this.execute(0):this.promisedCalls[this.promisedCount]?this.promisedCalls[this.promisedCount].promise:this.execute(this.wait)}execute(e=0){this.promisedCalls[this.promisedCount]||(this.promisedCalls[this.promisedCount]=(()=>{let e=()=>{},t=()=>{};return{promise:new Promise(((a,n)=>{[e,t]=[a,n]})),reject:t,resolve:e}})());const{promise:t,resolve:a,reject:n}=this.promisedCalls[this.promisedCount];this.timeout&&clearTimeout(this.timeout);const o=()=>{const e=[...this.requestSets[this.promisedCount]];this.promisedCount++,this.fn(e).then((e=>{a(e),this.debounceCancel=()=>{}})).catch((e=>{e.response&&e.response.data&&e.response.data.error&&(e=e.response.data.error),n(e)}))};return e>0?this.timeout=setTimeout(o.bind(this),e):o(),this.debounceCancel=()=>{this.timeout&&clearTimeout(this.timeout),n("Cancelled"),delete this.promisedCalls[this.promisedCount]},t}}function Mt(e,t){const a=new RegExp(`[0-9]+\\.?[0-9]{0,${t}}`),n=e.match(a);let o=e;return n&&(o=n[0]),d(o,t)}function Ct(e,t){return l(e,t).replace(/(.0$)/,"")}function Ft(e){return Mt(e,18).toBigInt()}function Bt(e){return l(p.from(e),18)}const Rt=e=>d(`${e}`,18),Nt=p.from("10000"),Lt=(e,t)=>e.mul(t).div(Nt),Dt=(e,t)=>{const a=Lt(e,t);return e.sub(a)},Ut=(e,t)=>{const a=Lt(e,t);return e.add(a)},Vt=(e,t)=>u(e)===u(t);function qt(e,t,a){return t<0||t>e.length?e:[...e.slice(0,t),a,...e.slice(t)]}function Gt(e,t,a){return t<0||t>=e.length?e:[...e.slice(0,t),a,...e.slice(t+1)]}function Wt(e,t){const a=[...e];return t<0||t>=e.length||a.splice(t,1),a}function $t(e,t,...a){if(e.length!==t.length||a.some((e=>e.length!==t.length)))throw new Error("Array length mismatch");const n=e.map((e=>t.indexOf(e)));if(n.indexOf(-1)>=0)throw new Error("Invalid reference or original array");const o=[];return n.forEach(((e,t)=>{a.forEach(((a,n)=>{o[n]||(o[n]=[]),o[n][t]=a[e]}))})),o}function Ht(e){const t=Object.values(Be);return!(!e.includes("Linear")||!t.includes(e))}function Kt(e){return e.map((e=>`${e.slice(0,6)}...${e.slice(38,42)}`))}const Jt=({receipt:e,to:t,contractInterface:a,logName:n})=>{const o=e.logs.filter((e=>Vt(e.address,t))).map((e=>{try{return a.parseLog(e)}catch(e){return Re.getInstance().warn(e),null}})).find((e=>(null==e?void 0:e.name)===n));if(!o)throw new Error("Event not found in logs");return o},Xt=()=>`0x${Array(8).fill(null).map((()=>Math.random().toString(16).slice(2,10))).join("")}`;class Yt{format(e){return e}}class jt{constructor(){this.operatorMap={gt:"_gt",lt:"_lt",eq:"",in:"_in",not_in:"_not_in",contains:"_contains"}}format(e){const t={};return e.where&&Object.entries(e.where).forEach((([e,a])=>{Object.entries(a).forEach((([a,n])=>{t[`${e}${this.operatorMap[a]}`]=n}))})),{...e,where:t}}}class zt{constructor(e){this.args=e}merge(e){const t=_(this.args,e.args,((e,t)=>{if(Array.isArray(e))return e.concat(t)}));return new zt(t)}format(e){return e.format(this.args)}}const Zt=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct AaveLinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Qt{static createInterface(){return new k.Interface(Zt)}static connect(e,t){return new O(e,Zt,t)}}Qt.abi=Zt;const ea=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"AaveLinearPoolCreated",type:"event"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract AaveLinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class ta{static createInterface(){return new k.Interface(ea)}static connect(e,t){return new O(e,ea,t)}}ta.abi=ea;const aa=[{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approveVault",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"toUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapAaveStaticToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"fromUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapAaveDynamicToken",outputs:[],stateMutability:"payable",type:"function"}];class na{static createInterface(){return new k.Interface(aa)}static connect(e,t){return new O(e,aa,t)}}na.abi=aa;const oa=[{inputs:[{internalType:"address",name:"admin",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"previousAdminRole",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"newAdminRole",type:"bytes32"}],name:"RoleAdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleRevoked",type:"event"},{inputs:[],name:"DEFAULT_ADMIN_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"actionId",type:"bytes32"},{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"",type:"address"}],name:"canPerform",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleAdmin",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"uint256",name:"index",type:"uint256"}],name:"getRoleMember",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleMemberCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"grantRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address",name:"account",type:"address"}],name:"grantRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address[]",name:"accounts",type:"address[]"}],name:"grantRolesToMany",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"hasRole",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"renounceRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"revokeRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address",name:"account",type:"address"}],name:"revokeRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address[]",name:"accounts",type:"address[]"}],name:"revokeRolesFromMany",outputs:[],stateMutability:"nonpayable",type:"function"}];class ia{static createInterface(){return new k.Interface(oa)}static connect(e,t){return new O(e,oa,t)}}ia.abi=oa;const sa=[{inputs:[{internalType:"contract IVault",name:"_vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"vault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"}];class ra{static createInterface(){return new k.Interface(sa)}static connect(e,t){return new O(e,sa,t)}}ra.abi=sa;const pa=[{inputs:[{internalType:"contract IBalancerTokenAdmin",name:"tokenAdmin",type:"address"},{internalType:"contract IGaugeController",name:"gaugeController",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"address",name:"gauge",type:"address"},{indexed:!1,internalType:"uint256",name:"minted",type:"uint256"}],name:"Minted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"minter",type:"address"},{indexed:!1,internalType:"bool",name:"approval",type:"bool"}],name:"MinterApprovalSet",type:"event"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"allowed_to_mint_for",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBalancerToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBalancerTokenAdmin",outputs:[{internalType:"contract IBalancerTokenAdmin",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getGaugeController",outputs:[{internalType:"contract IGaugeController",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"getMinterApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"gauge",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"gauge",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"mintFor",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"gauges",type:"address[]"}],name:"mintMany",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"gauges",type:"address[]"},{internalType:"address",name:"user",type:"address"}],name:"mintManyFor",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"gauge",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"mint_for",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[8]",name:"gauges",type:"address[8]"}],name:"mint_many",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"gauge",type:"address"}],name:"minted",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"bool",name:"approval",type:"bool"}],name:"setMinterApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"bool",name:"approval",type:"bool"},{internalType:"address",name:"user",type:"address"},{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:"setMinterApprovalWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"}],name:"toggle_approve_mint",outputs:[],stateMutability:"nonpayable",type:"function"}];class da{static createInterface(){return new k.Interface(pa)}static connect(e,t){return new O(e,pa,t)}}da.abi=pa;const la=[{inputs:[{internalType:"contract IVault",name:"_vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getAmpForPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getInRecoveryModeForPools",outputs:[{internalType:"bool[]",name:"",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getIsPausedForPools",outputs:[{internalType:"bool[]",name:"",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getLinearTargetsForPools",outputs:[{internalType:"uint256[][]",name:"",type:"uint256[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getNormalizedWeightsForPools",outputs:[{internalType:"uint256[][]",name:"",type:"uint256[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"poolIds",type:"bytes32[]"},{components:[{internalType:"bool",name:"loadTokenBalanceUpdatesAfterBlock",type:"bool"},{internalType:"bool",name:"loadTotalSupply",type:"bool"},{internalType:"bool",name:"loadSwapFees",type:"bool"},{internalType:"bool",name:"loadLinearWrappedTokenRates",type:"bool"},{internalType:"bool",name:"loadLinearTargets",type:"bool"},{internalType:"bool",name:"loadNormalizedWeights",type:"bool"},{internalType:"bool",name:"loadScalingFactors",type:"bool"},{internalType:"bool",name:"loadAmps",type:"bool"},{internalType:"bool",name:"loadRates",type:"bool"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"enum TotalSupplyType[]",name:"totalSupplyTypes",type:"uint8[]"},{internalType:"enum SwapFeeType[]",name:"swapFeeTypes",type:"uint8[]"},{internalType:"uint256[]",name:"linearPoolIdxs",type:"uint256[]"},{internalType:"uint256[]",name:"weightedPoolIdxs",type:"uint256[]"},{internalType:"uint256[]",name:"scalingFactorPoolIdxs",type:"uint256[]"},{internalType:"uint256[]",name:"ampPoolIdxs",type:"uint256[]"},{internalType:"uint256[]",name:"ratePoolIdxs",type:"uint256[]"}],internalType:"struct PoolDataQueryConfig",name:"config",type:"tuple"}],name:"getPoolData",outputs:[{internalType:"uint256[][]",name:"balances",type:"uint256[][]"},{internalType:"uint256[]",name:"totalSupplies",type:"uint256[]"},{internalType:"uint256[]",name:"swapFees",type:"uint256[]"},{internalType:"uint256[]",name:"linearWrappedTokenRates",type:"uint256[]"},{internalType:"uint256[][]",name:"linearTargets",type:"uint256[][]"},{internalType:"uint256[][]",name:"weights",type:"uint256[][]"},{internalType:"uint256[][]",name:"scalingFactors",type:"uint256[][]"},{internalType:"uint256[]",name:"amps",type:"uint256[]"},{internalType:"uint256[]",name:"rates",type:"uint256[]"},{internalType:"uint256[]",name:"ignoreIdxs",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"poolIds",type:"bytes32[]"},{components:[{internalType:"bool",name:"loadInRecoveryMode",type:"bool"},{internalType:"bool",name:"loadIsPaused",type:"bool"}],internalType:"struct PoolStatusQueryConfig",name:"config",type:"tuple"}],name:"getPoolStatus",outputs:[{internalType:"bool[]",name:"isPaused",type:"bool[]"},{internalType:"bool[]",name:"inRecoveryMode",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"poolIds",type:"bytes32[]"},{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getPoolTokenBalancesWithUpdatesAfterBlock",outputs:[{internalType:"uint256[][]",name:"",type:"uint256[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getRateForPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getScalingFactorsForPools",outputs:[{internalType:"uint256[][]",name:"",type:"uint256[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"},{internalType:"enum SwapFeeType[]",name:"swapFeeTypes",type:"uint8[]"}],name:"getSwapFeePercentageForPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"},{internalType:"enum TotalSupplyType[]",name:"totalSupplyTypes",type:"uint8[]"}],name:"getTotalSupplyForPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getWrappedTokenRateForLinearPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"vault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"}];class ua{static createInterface(){return new k.Interface(la)}static connect(e,t){return new O(e,la,t)}}ua.abi=la;const ca=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"address",name:"libraryAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getLibrary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];class ya{static createInterface(){return new k.Interface(ca)}static connect(e,t){return new O(e,ca,t)}}ya.abi=ca;const ba=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IERC20",name:"wstETH",type:"address"},{internalType:"contract IBalancerMinter",name:"minter",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approveVault",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{components:[{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"key",type:"uint256"}],internalType:"struct VaultActions.OutputReference[]",name:"outputReferences",type:"tuple[]"}],name:"batchSwap",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum VaultActions.PoolKind",name:"kind",type:"uint8"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"},{components:[{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"key",type:"uint256"}],internalType:"struct VaultActions.OutputReference[]",name:"outputReferences",type:"tuple[]"}],name:"exitPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge[]",name:"gauges",type:"address[]"}],name:"gaugeClaimRewards",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge",name:"gauge",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"gaugeDeposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"gauges",type:"address[]"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"gaugeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"approval",type:"bool"},{internalType:"address",name:"user",type:"address"},{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:"gaugeSetMinterApproval",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge",name:"gauge",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"gaugeWithdraw",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"getEntrypoint",outputs:[{internalType:"contract IBalancerRelayer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum VaultActions.PoolKind",name:"kind",type:"uint8"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.UserBalanceOpKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct IVault.UserBalanceOp[]",name:"ops",type:"tuple[]"},{internalType:"uint256",name:"value",type:"uint256"}],name:"manageUserBalance",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"ref",type:"uint256"}],name:"peekChainedReferenceValue",outputs:[{internalType:"uint256",name:"value",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"bool",name:"approved",type:"bool"},{internalType:"bytes",name:"authorisation",type:"bytes"}],name:"setRelayerApproval",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"stakeETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"stakeETHAndWrap",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"swap",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"toUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapAaveStaticToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ICToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapCompoundV2",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC4626",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapERC4626",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IEulerToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapEuler",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IGearboxDieselToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"dieselAmount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapGearbox",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IReaperTokenVault",name:"vaultToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapReaperVaultToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IShareToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapShareToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ITetuSmartVault",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapTetu",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IUnbuttonToken",name:"wrapperToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapUnbuttonToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapWstETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IYearnTokenVault",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapYearn",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20Permit",name:"token",type:"address"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"vaultPermit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20PermitDAI",name:"token",type:"address"},{internalType:"address",name:"holder",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"bool",name:"allowed",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"vaultPermitDAI",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"fromUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapAaveDynamicToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ICToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapCompoundV2",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC4626",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapERC4626",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IEulerToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"eulerProtocol",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapEuler",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IGearboxDieselToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"mainAmount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapGearbox",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IReaperTokenVault",name:"vaultToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapReaperVaultToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IShareToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapShareToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapStETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ITetuSmartVault",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapTetu",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IUnbuttonToken",name:"wrapperToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"uAmount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapUnbuttonToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IYearnTokenVault",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapYearn",outputs:[],stateMutability:"payable",type:"function"}];class ma{static createInterface(){return new k.Interface(ba)}static connect(e,t){return new O(e,ba,t)}}ma.abi=ba;const fa=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"tokenRateCacheDurations",type:"uint256[]"},{internalType:"bool[]",name:"exemptFromYieldProtocolFeeFlags",type:"bool[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],internalType:"struct ComposableStablePool.NewPoolParams",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"feeType",type:"uint256"},{indexed:!1,internalType:"uint256",name:"protocolFeePercentage",type:"uint256"}],name:"ProtocolFeePercentageCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenIndex",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rate",type:"uint256"}],name:"TokenRateCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenIndex",type:"uint256"},{indexed:!0,internalType:"contract IRateProvider",name:"provider",type:"address"},{indexed:!1,internalType:"uint256",name:"cacheDuration",type:"uint256"}],name:"TokenRateProviderSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getActualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastJoinExitData",outputs:[{internalType:"uint256",name:"lastJoinExitAmplification",type:"uint256"},{internalType:"uint256",name:"lastPostJoinExitInvariant",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMinimumBpt",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"feeType",type:"uint256"}],name:"getProtocolFeePercentageCache",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolSwapFeeDelegation",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRateProviders",outputs:[{internalType:"contract IRateProvider[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"getTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"getTokenRateCache",outputs:[{internalType:"uint256",name:"rate",type:"uint256"},{internalType:"uint256",name:"oldRate",type:"uint256"},{internalType:"uint256",name:"duration",type:"uint256"},{internalType:"uint256",name:"expires",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"isTokenExemptFromYieldProtocolFee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"duration",type:"uint256"}],name:"setTokenRateCacheDuration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"updateProtocolFeePercentageCache",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"updateTokenRateCache",outputs:[],stateMutability:"nonpayable",type:"function"}];class Ta{static createInterface(){return new k.Interface(fa)}static connect(e,t){return new O(e,fa,t)}}Ta.abi=fa;const ha=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"tokenRateCacheDurations",type:"uint256[]"},{internalType:"bool[]",name:"exemptFromYieldProtocolFeeFlags",type:"bool[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract ComposableStablePool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Ia{static createInterface(){return new k.Interface(ha)}static connect(e,t){return new O(e,ha,t)}}Ia.abi=ha;const _a=[{inputs:[{internalType:"contract IERC20",name:"_underlying",type:"address"},{internalType:"contract IERC20",name:"_bond",type:"address"},{internalType:"uint256",name:"_expiration",type:"uint256"},{internalType:"uint256",name:"_unitSeconds",type:"uint256"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"uint256",name:"_percentFee",type:"uint256"},{internalType:"uint256",name:"_percentFeeGov",type:"uint256"},{internalType:"address",name:"_governance",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"collectedBase",type:"uint256"},{indexed:!1,internalType:"uint256",name:"collectedBond",type:"uint256"},{indexed:!1,internalType:"uint256",name:"remainingBase",type:"uint256"},{indexed:!1,internalType:"uint256",name:"remainingBond",type:"uint256"}],name:"FeeCollection",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,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:"FEE_BOUND",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"bond",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"bondDecimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"expiration",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feesBond",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"feesUnderlying",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"increaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"currentBalances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"protocolSwapFee",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"currentBalances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"protocolSwapFee",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256",name:"currentBalanceTokenIn",type:"uint256"},{internalType:"uint256",name:"currentBalanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"percentFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"percentFeeGov",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"reserveX",type:"uint256"},{internalType:"uint256",name:"reserveY",type:"uint256"},{internalType:"bool",name:"out",type:"bool"}],name:"solveTradeInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"underlying",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"underlyingDecimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"unitSeconds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}];class ga{static createInterface(){return new k.Interface(_a)}static connect(e,t){return new O(e,_a,t)}}ga.abi=_a;const Pa=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}];class wa{static createInterface(){return new k.Interface(Pa)}static connect(e,t){return new O(e,Pa,t)}}wa.abi=Pa;const xa=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct ERC4626LinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Ea{static createInterface(){return new k.Interface(xa)}static connect(e,t){return new O(e,xa,t)}}Ea.abi=xa;const Aa=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"Erc4626LinearPoolCreated",type:"event"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract LinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class va{static createInterface(){return new k.Interface(Aa)}static connect(e,t){return new O(e,Aa,t)}}va.abi=Aa;const Sa=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct EulerLinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class ka{static createInterface(){return new k.Interface(Sa)}static connect(e,t){return new O(e,Sa,t)}}ka.abi=Sa;const Oa=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"_eulerProtocol",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"EulerLinearPoolCreated",type:"event"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"}],name:"create",outputs:[{internalType:"contract LinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eulerProtocol",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Ma{static createInterface(){return new k.Interface(Oa)}static connect(e,t){return new O(e,Oa,t)}}Ma.abi=Oa;const Ca=[{inputs:[{internalType:"address[]",name:"_assetsToRegister",type:"address[]"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"uint256",name:"_protocolPercentFee",type:"uint256"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"numeraire",type:"address"},{indexed:!0,internalType:"address",name:"reserve",type:"address"},{indexed:!1,internalType:"uint256",name:"weight",type:"uint256"}],name:"AssetIncluded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"derivative",type:"address"},{indexed:!0,internalType:"address",name:"numeraire",type:"address"},{indexed:!0,internalType:"address",name:"reserve",type:"address"},{indexed:!1,internalType:"address",name:"assimilator",type:"address"}],name:"AssimilatorIncluded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"newCollector",type:"address"}],name:"ChangeCollectorAddress",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"isEmergency",type:"bool"}],name:"EmergencyAlarm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"lptAmountBurned",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"amountsWithdrawn",type:"uint256[]"}],name:"EmergencyWithdraw",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feesCollected",type:"uint256"}],name:"FeesAccrued",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"feesCollected",type:"uint256"}],name:"FeesCollected",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"lptAmountBurned",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"amountsWithdrawn",type:"uint256[]"}],name:"OnExitPool",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"lptAmountMinted",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"amountsDeposited",type:"uint256[]"}],name:"OnJoinPool",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"alpha",type:"uint256"},{indexed:!1,internalType:"uint256",name:"beta",type:"uint256"},{indexed:!1,internalType:"uint256",name:"delta",type:"uint256"},{indexed:!1,internalType:"uint256",name:"epsilon",type:"uint256"},{indexed:!1,internalType:"uint256",name:"lambda",type:"uint256"}],name:"ParametersSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"updater",type:"address"},{indexed:!1,internalType:"uint256",name:"newProtocolPercentage",type:"uint256"}],name:"ProtocolFeeShareUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"trader",type:"address"},{indexed:!0,internalType:"address",name:"origin",type:"address"},{indexed:!0,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"originAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"targetAmount",type:"uint256"}],name:"Trade",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_derivative",type:"address"}],name:"assimilator",outputs:[{internalType:"address",name:"assimilator_",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"collectorAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"curve",outputs:[{internalType:"int128",name:"alpha",type:"int128"},{internalType:"int128",name:"beta",type:"int128"},{internalType:"int128",name:"delta",type:"int128"},{internalType:"int128",name:"epsilon",type:"int128"},{internalType:"int128",name:"lambda",type:"int128"},{internalType:"uint256",name:"cap",type:"uint256"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"address",name:"fxPoolAddress",type:"address"},{internalType:"bytes32",name:"poolId",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"derivatives",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"emergency",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_assets",type:"address[]"},{internalType:"uint256[]",name:"_assetWeights",type:"uint256[]"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint256",name:"total_",type:"uint256"},{internalType:"uint256[]",name:"individual_",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"numeraires",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"protocolPercentFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"reserves",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_cap",type:"uint256"}],name:"setCap",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_collectorAddress",type:"address"}],name:"setCollectorAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_emergency",type:"bool"}],name:"setEmergency",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_alpha",type:"uint256"},{internalType:"uint256",name:"_beta",type:"uint256"},{internalType:"uint256",name:"_feeAtHalt",type:"uint256"},{internalType:"uint256",name:"_epsilon",type:"uint256"},{internalType:"uint256",name:"_lambda",type:"uint256"}],name:"setParams",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_protocolPercentFee",type:"uint256"}],name:"setProtocolPercentFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalUnclaimedFeesInNumeraire",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"totalDepositNumeraire",type:"uint256"}],name:"viewDeposit",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"viewParameters",outputs:[{internalType:"uint256",name:"alpha_",type:"uint256"},{internalType:"uint256",name:"beta_",type:"uint256"},{internalType:"uint256",name:"delta_",type:"uint256"},{internalType:"uint256",name:"epsilon_",type:"uint256"},{internalType:"uint256",name:"lambda_",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_curvesToBurn",type:"uint256"}],name:"viewWithdraw",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"}];class Fa{static createInterface(){return new k.Interface(Ca)}static connect(e,t){return new O(e,Ca,t)}}Fa.abi=Ca;const Ba=[{inputs:[],name:"CLAIM_FREQUENCY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IRewardsOnlyGauge",name:"gauge",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"claimRewardsFromGauge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IRewardsOnlyGauge[]",name:"gauges",type:"address[]"},{internalType:"address",name:"user",type:"address"}],name:"claimRewardsFromGauges",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IRewardsOnlyGauge",name:"gauge",type:"address"},{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"token",type:"address"}],name:"getPendingRewards",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"}];class Ra{static createInterface(){return new k.Interface(Ba)}static connect(e,t){return new O(e,Ba,t)}}Ra.abi=Ba;const Na=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct GearboxLinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class La{static createInterface(){return new k.Interface(Na)}static connect(e,t){return new O(e,Na,t)}}La.abi=Na;const Da=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"GearboxLinearPoolCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract GearboxLinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Ua{static createInterface(){return new k.Interface(Da)}static connect(e,t){return new O(e,Da,t)}}Ua.abi=Da;const Va=[{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"key",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"previousValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newValue",type:"uint256"}],name:"ConfigChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"key",type:"bytes32"}],name:"ConfigFrozen",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"key",type:"bytes32"}],name:"ConfigUnset",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"newGovernor",type:"address"}],name:"GovernorChangeRequested",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldGovernor",type:"address"},{indexed:!1,internalType:"address",name:"newGovernor",type:"address"}],name:"GovernorChanged",type:"event"},{inputs:[],name:"acceptGovernance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newGovernor",type:"address"}],name:"changeGovernor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"freeze",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"},{internalType:"address",name:"defaultValue",type:"address"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"getConfigMeta",outputs:[{internalType:"uint8",name:"",type:"uint8"},{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"getUint",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"governor",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"hasKey",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_governor",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"listKeys",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"pendingGovernor",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"},{internalType:"address",name:"newValue",type:"address"}],name:"setAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"},{internalType:"uint256",name:"newValue",type:"uint256"}],name:"setUint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"unset",outputs:[],stateMutability:"nonpayable",type:"function"}];class qa{static createInterface(){return new k.Interface(Va)}static connect(e,t){return new O(e,Va,t)}}qa.abi=Va;const Ga=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IwstETH",name:"wstETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"swapAmounts",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getStETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWstETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"swapAmount",type:"uint256"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];class Wa{static createInterface(){return new k.Interface(Ga)}static connect(e,t){return new O(e,Ga,t)}}Wa.abi=Ga;const $a=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],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:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class Ha{static createInterface(){return new k.Interface($a)}static connect(e,t){return new O(e,$a,t)}}Ha.abi=$a;const Ka=[{name:"Deposit",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Withdraw",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"UpdateLiquidityLimit",inputs:[{name:"user",type:"address",indexed:!0},{name:"original_balance",type:"uint256",indexed:!1},{name:"original_supply",type:"uint256",indexed:!1},{name:"working_balance",type:"uint256",indexed:!1},{name:"working_supply",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Transfer",inputs:[{name:"_from",type:"address",indexed:!0},{name:"_to",type:"address",indexed:!0},{name:"_value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Approval",inputs:[{name:"_owner",type:"address",indexed:!0},{name:"_spender",type:"address",indexed:!0},{name:"_value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{stateMutability:"nonpayable",type:"constructor",inputs:[{name:"minter",type:"address"},{name:"veBoostProxy",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"},{name:"_addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"},{name:"_addr",type:"address"},{name:"_claim_rewards",type:"bool"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[{name:"_value",type:"uint256"},{name:"_claim_rewards",type:"bool"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[{name:"_addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[{name:"_addr",type:"address"},{name:"_receiver",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"transferFrom",inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"transfer",inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"approve",inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"permit",inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"},{name:"_value",type:"uint256"},{name:"_deadline",type:"uint256"},{name:"_v",type:"uint8"},{name:"_r",type:"bytes32"},{name:"_s",type:"bytes32"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"increaseAllowance",inputs:[{name:"_spender",type:"address"},{name:"_added_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"decreaseAllowance",inputs:[{name:"_spender",type:"address"},{name:"_subtracted_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"user_checkpoint",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"set_rewards_receiver",inputs:[{name:"_receiver",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"kick",inputs:[{name:"addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit_reward_token",inputs:[{name:"_reward_token",type:"address"},{name:"_amount",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"add_reward",inputs:[{name:"_reward_token",type:"address"},{name:"_distributor",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"set_reward_distributor",inputs:[{name:"_reward_token",type:"address"},{name:"_distributor",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"set_killed",inputs:[{name:"_is_killed",type:"bool"}],outputs:[]},{stateMutability:"view",type:"function",name:"claimed_reward",inputs:[{name:"_addr",type:"address"},{name:"_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_reward",inputs:[{name:"_user",type:"address"},{name:"_reward_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_reward_write",inputs:[{name:"_addr",type:"address"},{name:"_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_tokens",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_checkpoint",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"future_epoch_time",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"inflation_rate",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"decimals",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"version",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"allowance",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"nonpayable",type:"function",name:"initialize",inputs:[{name:"_lp_token",type:"address"}],outputs:[]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"symbol",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"DOMAIN_SEPARATOR",inputs:[],outputs:[{name:"",type:"bytes32"}]},{stateMutability:"view",type:"function",name:"nonces",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"factory",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"lp_token",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"is_killed",inputs:[],outputs:[{name:"",type:"bool"}]},{stateMutability:"view",type:"function",name:"reward_count",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"reward_data",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"tuple",components:[{name:"token",type:"address"},{name:"distributor",type:"address"},{name:"period_finish",type:"uint256"},{name:"rate",type:"uint256"},{name:"last_update",type:"uint256"},{name:"integral",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"rewards_receiver",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"reward_integral_for",inputs:[{name:"arg0",type:"address"},{name:"arg1",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"working_balances",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"working_supply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_inv_supply_of",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_checkpoint_of",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_fraction",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"period",inputs:[],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"reward_tokens",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"period_timestamp",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_inv_supply",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"uint256"}]}];class Ja{static createInterface(){return new k.Interface(Ka)}static connect(e,t){return new O(e,Ka,t)}}Ja.abi=Ka;const Xa=[{constant:!1,inputs:[{components:[{name:"target",type:"address"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{name:"blockNumber",type:"uint256"},{name:"returnData",type:"bytes[]"}],payable:!1,stateMutability:"nonpayable",type:"function"}];class Ya{static createInterface(){return new k.Interface(Xa)}static connect(e,t){return new O(e,Xa,t)}}Ya.abi=Xa;const ja=[{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes[]",name:"returnData",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3[]",name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3Value[]",name:"calls",type:"tuple[]"}],name:"aggregate3Value",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"blockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getBasefee",outputs:[{internalType:"uint256",name:"basefee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBlockNumber",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"chainid",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockCoinbase",outputs:[{internalType:"address",name:"coinbase",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockDifficulty",outputs:[{internalType:"uint256",name:"difficulty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockGasLimit",outputs:[{internalType:"uint256",name:"gaslimit",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"addr",type:"address"}],name:"getEthBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryAggregate",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryBlockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"}];class za{static createInterface(){return new k.Interface(ja)}static connect(e,t){return new O(e,ja,t)}}za.abi=ja;const Za=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],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:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class Qa{static createInterface(){return new k.Interface(Za)}static connect(e,t){return new O(e,Za,t)}}Qa.abi=Za;const en=[{inputs:[{internalType:"contract IStaticAToken",name:"_waToken",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"waToken",outputs:[{internalType:"contract IStaticAToken",name:"",type:"address"}],stateMutability:"view",type:"function"}];class tn{static createInterface(){return new k.Interface(en)}static connect(e,t){return new O(e,en,t)}}tn.abi=en;const an=[{inputs:[{internalType:"contract IAuthorizer",name:"authorizer",type:"address"},{internalType:"contract IWETH",name:"weth",type:"address"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"AuthorizerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExternalBalanceTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"feeAmount",type:"uint256"}],name:"FlashLoan",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"delta",type:"int256"}],name:"InternalBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"liquidityProvider",type:"address"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"deltas",type:"int256[]"},{indexed:!1,internalType:"uint256[]",name:"protocolFeeAmounts",type:"uint256[]"}],name:"PoolBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"assetManager",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"cashDelta",type:"int256"},{indexed:!1,internalType:"int256",name:"managedDelta",type:"int256"}],name:"PoolBalanceManaged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"poolAddress",type:"address"},{indexed:!1,internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"PoolRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"RelayerApprovalChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"contract IERC20",name:"tokenIn",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"tokenOut",type:"address"},{indexed:!1,internalType:"uint256",name:"amountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amountOut",type:"uint256"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"TokensDeregistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"TokensRegistered",type:"event"},{inputs:[],name:"WETH",outputs:[{internalType:"contract IWETH",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"assetDeltas",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"deregisterTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"flashLoan",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"getInternalBalance",outputs:[{internalType:"uint256[]",name:"balances",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"enum IVault.PoolSpecialization",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"}],name:"getPoolTokenInfo",outputs:[{internalType:"uint256",name:"cash",type:"uint256"},{internalType:"uint256",name:"managed",type:"uint256"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"assetManager",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPoolTokens",outputs:[{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract ProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"relayer",type:"address"}],name:"hasApprovedRelayer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.PoolBalanceOpKind",name:"kind",type:"uint8"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct IVault.PoolBalanceOp[]",name:"ops",type:"tuple[]"}],name:"managePoolBalance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.UserBalanceOpKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct IVault.UserBalanceOp[]",name:"ops",type:"tuple[]"}],name:"manageUserBalance",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"}],name:"queryBatchSwap",outputs:[{internalType:"int256[]",name:"",type:"int256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"registerPool",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"registerTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"setAuthorizer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"relayer",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setRelayerApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"amountCalculated",type:"uint256"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];class nn{static createInterface(){return new k.Interface(an)}static connect(e,t){return new O(e,an,t)}}nn.abi=an;const on=[{inputs:[{components:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"address[]",name:"assetManagers",type:"address[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],internalType:"struct WeightedPool.NewPoolParams",name:"params",type:"tuple"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"feeType",type:"uint256"},{indexed:!1,internalType:"uint256",name:"protocolFeePercentage",type:"uint256"}],name:"ProtocolFeePercentageCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getATHRateProduct",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getActualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastPostJoinExitInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"feeType",type:"uint256"}],name:"getProtocolFeePercentageCache",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolSwapFeeDelegation",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRateProviders",outputs:[{internalType:"contract IRateProvider[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"updateProtocolFeePercentageCache",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class sn{static createInterface(){return new k.Interface(on)}static connect(e,t){return new O(e,on,t)}}sn.abi=on;const rn=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class pn{static createInterface(){return new k.Interface(rn)}static connect(e,t){return new O(e,rn,t)}}pn.abi=rn;const dn=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct YearnLinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class ln{static createInterface(){return new k.Interface(dn)}static connect(e,t){return new O(e,dn,t)}}ln.abi=dn;const un=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"YearnLinearPoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract LinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class cn{static createInterface(){return new k.Interface(un)}static connect(e,t){return new O(e,un,t)}}cn.abi=un;const yn=[{inputs:[{components:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"token0",type:"address"},{internalType:"contract IERC20",name:"token1",type:"address"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"address",name:"owner",type:"address"}],internalType:"struct ExtensibleWeightedPool2Tokens.NewPoolParams",name:"baseParams",type:"tuple"},{components:[{internalType:"int256",name:"alpha",type:"int256"},{internalType:"int256",name:"beta",type:"int256"},{internalType:"int256",name:"c",type:"int256"},{internalType:"int256",name:"s",type:"int256"},{internalType:"int256",name:"lambda",type:"int256"}],internalType:"struct GyroECLPMath.Params",name:"eclpParams",type:"tuple"},{components:[{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],internalType:"struct GyroECLPMath.Vector2",name:"tauAlpha",type:"tuple"},{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],internalType:"struct GyroECLPMath.Vector2",name:"tauBeta",type:"tuple"},{internalType:"int256",name:"u",type:"int256"},{internalType:"int256",name:"v",type:"int256"},{internalType:"int256",name:"w",type:"int256"},{internalType:"int256",name:"z",type:"int256"},{internalType:"int256",name:"dSq",type:"int256"}],internalType:"struct GyroECLPMath.DerivedParams",name:"derivedEclpParams",type:"tuple"},{internalType:"address",name:"rateProvider0",type:"address"},{internalType:"address",name:"rateProvider1",type:"address"},{internalType:"address",name:"capManager",type:"address"},{components:[{internalType:"bool",name:"capEnabled",type:"bool"},{internalType:"uint120",name:"perAddressCap",type:"uint120"},{internalType:"uint128",name:"globalCap",type:"uint128"}],internalType:"struct ICappedLiquidity.CapParams",name:"capParams",type:"tuple"},{internalType:"address",name:"pauseManager",type:"address"}],internalType:"struct GyroECLPPool.GyroParams",name:"params",type:"tuple"},{internalType:"address",name:"configAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"capManager",type:"address"}],name:"CapManagerUpdated",type:"event"},{anonymous:!1,inputs:[{components:[{internalType:"bool",name:"capEnabled",type:"bool"},{internalType:"uint120",name:"perAddressCap",type:"uint120"},{internalType:"uint128",name:"globalCap",type:"uint128"}],indexed:!1,internalType:"struct ICappedLiquidity.CapParams",name:"params",type:"tuple"}],name:"CapParamsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"derivedParamsValidated",type:"bool"}],name:"ECLPDerivedParamsValidated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paramsValidated",type:"bool"}],name:"ECLPParamsValidated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"invariantAfterJoin",type:"uint256"}],name:"InvariantAterInitializeJoin",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"oldInvariant",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newInvariant",type:"uint256"}],name:"InvariantOldAndNew",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"OracleEnabledChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"oracleUpdatedIndex",type:"uint256"}],name:"OracleIndexUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldPauseManager",type:"address"},{indexed:!1,internalType:"address",name:"newPauseManager",type:"address"}],name:"PauseManagerChanged",type:"event"},{anonymous:!1,inputs:[],name:"PausedLocally",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256[]",name:"balances",type:"uint256[]"},{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],indexed:!1,internalType:"struct GyroECLPMath.Vector2",name:"invariant",type:"tuple"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"SwapParams",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[],name:"UnpausedLocally",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"_dSq",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsAlpha",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsBeta",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsC",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsLambda",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsS",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_tauAlphaX",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_tauAlphaY",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_tauBetaX",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_tauBetaY",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_u",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_v",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_w",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_z",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"capManager",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"capParams",outputs:[{components:[{internalType:"bool",name:"capEnabled",type:"bool"},{internalType:"uint120",name:"perAddressCap",type:"uint120"},{internalType:"uint128",name:"globalCap",type:"uint128"}],internalType:"struct ICappedLiquidity.CapParams",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_pauseManager",type:"address"}],name:"changePauseManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"startIndex",type:"uint256"},{internalType:"uint256",name:"endIndex",type:"uint256"}],name:"dirtyUninitializedOracleSamples",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getECLPParams",outputs:[{components:[{internalType:"int256",name:"alpha",type:"int256"},{internalType:"int256",name:"beta",type:"int256"},{internalType:"int256",name:"c",type:"int256"},{internalType:"int256",name:"s",type:"int256"},{internalType:"int256",name:"lambda",type:"int256"}],internalType:"struct GyroECLPMath.Params",name:"params",type:"tuple"},{components:[{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],internalType:"struct GyroECLPMath.Vector2",name:"tauAlpha",type:"tuple"},{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],internalType:"struct GyroECLPMath.Vector2",name:"tauBeta",type:"tuple"},{internalType:"int256",name:"u",type:"int256"},{internalType:"int256",name:"v",type:"int256"},{internalType:"int256",name:"w",type:"int256"},{internalType:"int256",name:"z",type:"int256"},{internalType:"int256",name:"dSq",type:"int256"}],internalType:"struct GyroECLPMath.DerivedParams",name:"d",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLargestSafeQueryWindow",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"}],name:"getLatest",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiscData",outputs:[{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"logTotalSupply",type:"int256"},{internalType:"uint256",name:"oracleSampleCreationTimestamp",type:"uint256"},{internalType:"uint256",name:"oracleIndex",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAccumulatorQuery[]",name:"queries",type:"tuple[]"}],name:"getPastAccumulators",outputs:[{internalType:"int256[]",name:"results",type:"int256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPrice",outputs:[{internalType:"uint256",name:"spotPrice",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getSample",outputs:[{internalType:"int256",name:"logPairPrice",type:"int256"},{internalType:"int256",name:"accLogPairPrice",type:"int256"},{internalType:"int256",name:"logBptPrice",type:"int256"},{internalType:"int256",name:"accLogBptPrice",type:"int256"},{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"accLogInvariant",type:"int256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"secs",type:"uint256"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAverageQuery[]",name:"queries",type:"tuple[]"}],name:"getTimeWeightedAverage",outputs:[{internalType:"uint256[]",name:"results",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenRates",outputs:[{internalType:"uint256",name:"rate0",type:"uint256"},{internalType:"uint256",name:"rate1",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalSamples",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"gyroConfig",outputs:[{internalType:"contract IGyroConfig",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pauseManager",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"rateProvider0",outputs:[{internalType:"contract IRateProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"rateProvider1",outputs:[{internalType:"contract IRateProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_capManager",type:"address"}],name:"setCapManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bool",name:"capEnabled",type:"bool"},{internalType:"uint120",name:"perAddressCap",type:"uint120"},{internalType:"uint128",name:"globalCap",type:"uint128"}],internalType:"struct ICappedLiquidity.CapParams",name:"params",type:"tuple"}],name:"setCapParams",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"}];class bn{static createInterface(){return new k.Interface(yn)}static connect(e,t){return new O(e,yn,t)}}bn.abi=yn;const mn=[{name:"Deposit",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1},{name:"locktime",type:"uint256",indexed:!0},{name:"type",type:"int128",indexed:!1},{name:"ts",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Withdraw",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1},{name:"ts",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Supply",inputs:[{name:"prevSupply",type:"uint256",indexed:!1},{name:"supply",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{stateMutability:"nonpayable",type:"constructor",inputs:[{name:"token_addr",type:"address"},{name:"_name",type:"string"},{name:"_symbol",type:"string"},{name:"_authorizer_adaptor",type:"address"}],outputs:[]},{stateMutability:"view",type:"function",name:"token",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"symbol",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"decimals",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"admin",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"nonpayable",type:"function",name:"commit_smart_wallet_checker",inputs:[{name:"addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"apply_smart_wallet_checker",inputs:[],outputs:[]},{stateMutability:"view",type:"function",name:"get_last_user_slope",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"user_point_history__ts",inputs:[{name:"_addr",type:"address"},{name:"_idx",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"locked__end",inputs:[{name:"_addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"nonpayable",type:"function",name:"checkpoint",inputs:[],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit_for",inputs:[{name:"_addr",type:"address"},{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"create_lock",inputs:[{name:"_value",type:"uint256"},{name:"_unlock_time",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"increase_amount",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"increase_unlock_time",inputs:[{name:"_unlock_time",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[],outputs:[]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"addr",type:"address"},{name:"_t",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"balanceOfAt",inputs:[{name:"addr",type:"address"},{name:"_block",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[{name:"t",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupplyAt",inputs:[{name:"_block",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"supply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"locked",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"tuple",components:[{name:"amount",type:"int128"},{name:"end",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"epoch",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"point_history",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"tuple",components:[{name:"bias",type:"int128"},{name:"slope",type:"int128"},{name:"ts",type:"uint256"},{name:"blk",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"user_point_history",inputs:[{name:"arg0",type:"address"},{name:"arg1",type:"uint256"}],outputs:[{name:"",type:"tuple",components:[{name:"bias",type:"int128"},{name:"slope",type:"int128"},{name:"ts",type:"uint256"},{name:"blk",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"user_point_epoch",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"slope_changes",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"future_smart_wallet_checker",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"smart_wallet_checker",inputs:[],outputs:[{name:"",type:"address"}]}];class fn{static createInterface(){return new k.Interface(mn)}static connect(e,t){return new O(e,mn,t)}}fn.abi=mn;const Tn=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IERC20",name:"votingEscrow",type:"address"},{internalType:"contract IVeDelegation",name:"delegation",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newImplementation",type:"address"}],name:"DelegationImplementationUpdated",type:"event"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"adjustedBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"adjusted_balance_of",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDelegationImplementation",outputs:[{internalType:"contract IVeDelegation",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVotingEscrow",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"killDelegation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IVeDelegation",name:"delegation",type:"address"}],name:"setDelegation",outputs:[],stateMutability:"nonpayable",type:"function"}];class hn{static createInterface(){return new k.Interface(Tn)}static connect(e,t){return new O(e,Tn,t)}}hn.abi=Tn;var In,_n=Object.freeze({__proto__:null,AaveLinearPool__factory:Qt,AaveLinearPoolFactory__factory:ta,AaveWrapping__factory:na,Authoriser__factory:ia,BalancerHelpers__factory:ra,BalancerMinter__factory:da,BalancerPoolDataQueries__factory:ua,BalancerRelayer__factory:ya,BatchRelayerLibrary__factory:ma,ComposableStablePool__factory:Ta,ComposableStablePoolFactory__factory:Ia,ConvergentCurvePool__factory:ga,ERC20__factory:wa,ERC4626LinearPool__factory:Ea,ERC4626LinearPoolFactory__factory:va,EulerLinearPool__factory:ka,EulerLinearPoolFactory__factory:Ma,FXPool__factory:Fa,GaugeClaimHelper__factory:Ra,GearboxLinearPool__factory:La,GearboxLinearPoolFactory__factory:Ua,GyroConfig__factory:qa,LidoRelayer__factory:Wa,LinearPool__factory:Ha,LiquidityGaugeV5__factory:Ja,Multicall__factory:Ya,Multicall3__factory:za,StablePool__factory:Qa,StaticATokenRateProvider__factory:tn,Vault__factory:nn,WeightedPool__factory:sn,WeightedPoolFactory__factory:pn,YearnLinearPool__factory:ln,YearnLinearPoolFactory__factory:cn,GyroEV2__factory:bn,VeBal__factory:fn,VeDelegationProxy__factory:hn});function gn(e,t,o,i,s,r){const d=new Array(s.length).fill(n);return s.forEach(((n,s)=>{if(e.some((e=>Vt(n,e)))){const e=p.from(r).add(a);d[s]=o===In.SwapExactOut?d[s].add(p.from(i[s]).mul(e).div(a)):d[s].add(i[s])}if(t.some((e=>Vt(n,e)))){const e=a.sub(p.from(r));d[s]=o===In.SwapExactIn?d[s].add(p.from(i[s]).mul(e).div(a)):d[s].add(i[s])}})),d}!function(e){e[e.SwapExactIn=0]="SwapExactIn",e[e.SwapExactOut=1]="SwapExactOut"}(In||(In={}));var Pn={1:{contracts:{aaveLinearPoolFactory:"0x0b576c1245f479506e7c8bbc4db4db07c1cd31f9",arbitrumRootGauge:"0x6337949cbc4825bbd09242c811770f6f6fee9ffc",arbitrumRootGaugeFactory:"0x1c99324edc771c82a0dccb780cc7dda0045e50e7",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x8f42adbba1b16eaae3bb5754915e0d06059add75",authorizerAdaptorEntrypoint:"0xf5decdb1f3d1ee384908fbe16d2f0348ae43a9ea",authorizerWithAdaptorValidation:"0x6048a8c631fb7e77eca533cf9c29784e482391e7",avalancheRootGauge:"0xc57b4be50bf6bbe5f6a4fe379da342b32b37bf2f",avalancheRootGaugeFactory:"0x10f3e79911a490aa5b5d5cda6f111029c4eab5ac",bal:"0xba100000625a3754423978a60c9317c58a424e3d",balancerHelpers:"0x5addcca35b7a0d07c74063c48700c8590e87864e",balancerMinter:"0x239e55f427d44c3cc793f49bfb507ebe76638a2b",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0xfea793aa415061c483d2390414275ad314b3f621",balancerTokenAdmin:"0xf302f9f50958c5593770fdf4d4812309ff77414f",balTokenHolderFactory:"0xb848f50141f3d4255b37ac288c25c109104f2158",batchRelayerLibrary:"0xf77018c0d817da22cadbdf504c00c0d32ce1e5c2",circuitBreakerLib:"0x4967b3353cdf9e5c67421a3890d35f2f3bb50527",composableStablePoolFactory:"0xfada0f4547ab2de89d1304a668c39b3e09aa7c76",distributionScheduler:"0xbd35248f8325dd1cb2bbf9d01e80a6bb99a792dd",doubleEntrypointFixRelayer:"0xca96c4f198d343e251b1a01f3eba061ef3da73c1",erc4626LinearPoolFactory:"0x813ee7a840ce909e7fea2117a44a90b8063bd4fd",eulerLinearPoolFactory:"0x5f43fba61f63fa6bff101a0a0458cea917f6b347",externalWeightedMath:"0x3db89f0ca3b388f2bcdbccd2ff8e13c22459cf75",feeDistributor:"0xd3cf852898b21fc233251427c2dc93d3d604f3bb",gaugeAdder:"0x5dbad78818d4c8958eff2d5b95b28385a22113cd",gaugeController:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",gaugeWorkingBalanceHelper:"0xdab2583911e872a00a851fb80dcc78a4b46ba57c",gearboxLinearPoolFactory:"0x39a79eb449fc05c92c39aa6f0e9bfac03be8de5b",gnosisRootGauge:"0x05277ce7d1e365d660624612d8b8b9b55bfd4518",gnosisRootGaugeFactory:"0x2a18b396829bc29f66a1e59fadd7a0269a6605e8",l2GaugeCheckpointer:"0x343688c5cb92115a52ca485af7f62b4b7a2e9ccc",liquidityGaugeFactory:"0xf1665e19bc105be4edd3739f88315cc699cc5b65",liquidityGaugeV5:"0xe5f96070ca00cd54795416b1a4b4c2403231c548",managedPoolAddRemoveTokenLib:"0x4148bf5b0688ed0a87f317c6534cb841f503349e",managedPoolAmmLib:"0xb37646acbb1a91287721b2cdbe01ba0dba5e57a2",managedPoolFactory:"0xbf904f9f340745b4f0c4702c7b6ab1e808ea6b93",merkleOrchard:"0xe3881627b8deebccf9c23b291430a549fc0be5f7",mockAaveLendingPool:"0x28fa1e40011adf98898e8243b2a48bb21ebf0c29",mockAaveLinearPool:"0x4ce277df0feb5b4d07a0ca2adcf5326e4005239d",mockComposableStablePool:"0x5537f945d8c3fcfdc1b8deceebd220fad26afda8",mockErc4626LinearPool:"0x9516a2d25958edb8da246a320f2c7d94a0dbe25d",mockErc4626Token:"0xb99edc4b289b0f2284fcf3f66884191bdce29624",mockEulerLinearPool:"0xdec02e6642e2c999af429f5ce944653cad15e093",mockEulerToken:"0xc101dca301a4011c1f925e9622e749e550a1b667",mockGearboxDieselToken:"0xb7a32b67aadb3866cc5c2fabc6c6ab8a9027c3c1",mockGearboxLinearPool:"0x0d05aac44ac7dd3c7ba5d50be93eb884a057d234",mockGearboxVault:"0xc7b779ab638b7a59f490ac95199502343a81e006",mockManagedPool:"0xd0cbf6765997b7ca7be6440f5e305b2ec7b96065",mockShareToken:"0x192e67544694a7baa2dea94f9b1df58bb3395a12",mockSilo:"0x66c94ae8d795e98f69ca65ffac87b38b17be3ca2",mockSiloLinearPool:"0x74cbfaf94a3577c539a9dcee9870a6349a33b34f",mockSiloRepository:"0x8e2dfc5e111dbe14e9d725210b9342688dd51c6c",mockStaticAToken:"0x1f3c910c416ed2340150281c5eb93325c38817a1",mockWeightedPool:"0x8055b8c947de30130bc1ec750c8f345a50006b23",mockYearnLinearPool:"0xac5b4ef7ede2f2843a704e96dcaa637f4ba3dc3f",mockYearnTokenVault:"0x806e02dea8d4a0882cad9fa3fa75b212328692de",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",omniVotingEscrowAdaptor:"0x96484f2abf5e58b15176dbf1a799627b53f13b6d",optimismRootGauge:"0xbc230b1a66a138cd9cfc7b352390025978dfadde",optimismRootGaugeFactory:"0x866d4b65694c66fbfd15dd6fa933d0a6b3940a36",polygonRootGauge:"0xfeb1a24c2752e53576133cdb718f25bc64ebdd52",polygonRootGaugeFactory:"0xa98bce70c92ad2ef3288dbcd659bc0d6b62f8f13",polygonZkEvmRootGauge:"0x45bf48d996d22afc9bc150df7fb4d13a49088602",polygonZkEvmRootGaugeFactory:"0x9bf951848288ccd87d06fac426150262cd3447de",poolRecoveryHelper:"0x1b300c86980a5195bcf49bd419a068d98dc133db",preseededVotingEscrowDelegation:"0xb496ff44746a8693a060fafd984da41b253f6790",protocolFeePercentagesProvider:"0x97207b095e4d5c9a6e4cfbfcd2c3358e03b90c4a",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x5ef4c5352882b10893b70dbcaa0c000965bd23c5",protocolIdRegistry:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",recoveryModeHelper:"0x7827108af2fd9910ea7cf361d9b827941fa7d809",siloLinearPoolFactory:"0x4e11aeec21baf1660b1a46472963cb3da7811c89",singleRecipientGauge:"0xb2007b8b7e0260042517f635cfd8e6dd2dd7f007",singleRecipientGaugeFactory:"0x4fb47126fa83a8734991e41b942ac29a3266c968",smartWalletChecker:"0x7869296efd0a76872fee62a058c8fbca5c1c826c",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x67f8df125b796b05895a6dc8ecf944b9556ecb0b",votingEscrow:"0xc128a9954e6c874ea3d62ce62b468ba073093f25",votingEscrowDelegation:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",votingEscrowDelegationProxy:"0x6f5a2ee11e7a772aeb5114a20d0d7c0ff61eb8a0",votingEscrowRemapper:"0x83e443ef4f9963c77bd860f94500075556668cb8",weightedPoolFactory:"0x897888115ada5773e02aa29f775430bfb5f34c51",weth:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",wstEthRateProvider:"0x72d07d7dca67b8a406ad1ec34ce969c90bfee768",yearnLinearPoolFactory:"0x5f5222ffa40f2aed6380d022184d6ea67c776ee0"},tokens:{AAVE:"0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",aFEI:"0x683923db55fead99a79fa01a27eec3cb19679cc3",aFRAX:"0xd4937682df3c8aef4fe912a96a74121c0829e664",ALCX:"0xdbdb4d16eda451d0503b854cf79d55697f90c8df",alUSD:"0xbc6da0fe9ad5f3b0d58160288917aa56653660e9",ANGLE:"0x31429d1856ad1377a8a0079410b297e1a9e214c2",AURA:"0xc0c293ce456ff0ed870add98a0828dd4d2903dbf",AURABAL:"0x616e8bfa43f920657b3497dbf40d6b1a02d4608d",aUSDC:"0xbcca60bb61934080951369a648fb03df4f96263c",aUSDT:"0x3ed3b47dd13ec9a98b44e6204a523e766b225811",aWBTC:"0x9ff58f4ffb29fa2266ab25e75e2a8b3503311656",BADGER:"0x3472a5a71965499acd81997a54bba8d852c6e53d",BAL:"0xba100000625a3754423978a60c9317c58a424e3d",BalWeth8020:"0x5c6ee304399dbdb9c8ef030ab642b10820db8f56",bb_a_usd:"0xa13a9247ea42d743238089903570127dda72fe44",cDAI:"0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",cETH:"0x4ddc2d193948926d02f9b1fe9e1daa0718270ed5",COMP:"0xc00e94cb662c3520282e6f5717214004a7f26888",CRV:"0xd533a949740bb3306d119cc777fa900ba034cd52",cUSDC:"0x39aa39c021dfbae8fac545936693ac917d5e7563",CVX:"0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b",cvxCRV:"0x62b9c7356a2dc64a1969e19c23e4f579f9810aa7",DAI:"0x6b175474e89094c44da98b954eedeac495271d0f",DIGG:"0x798d1be841a82a273720ce31c822c61a67a601c3",DUSD:"0x5bc25f649fc4e26069ddf4cf4010f9f706c23831",ENS:"0xc18360217d8f7ab5e7c516566761ea12ce7f9d72",EURS:"0xdb25f211ab05b1c97d595516f45794528a807ad8",FARM:"0xa0246c9032bc3a600820415ae600c6388619a14d",FEI:"0x956f47f50a910163d8bf957cf5846d573e7f87ca",FRAX:"0x853d955acef822db058eb8505911ed77f175b99e",FTM:"0x4e15361fd6b4bb609fa63c81a2be19d873717870",FXS:"0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0",GEAR:"0xba3335588d9403515223f109edc4eb7269a9ab5d",GTC:"0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",LINK:"0x514910771af9ca656af840dff83e8264ecf986ca",MIM:"0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3",renBTC:"0xeb4c2781e4eba804ce9a9803c67d0893436bb27d",RETH:"0xae78736cd615f374d3085123a210448e74fc6393",sBTC:"0xfe18be6b3bd88a2d2a7f928d00292e7a9963cfc6",SPELL:"0x090185f2135308bad17527004364ebcc2d37e5f6",stkAAVE:"0x4da27a545c0c5b758a6ba100e3a049001de870f5",SUSHI:"0x6b3595068778dd592e39a122f4f5a5cf09c90fe2",USDC:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",USDT:"0xdac17f958d2ee523a2206206994597c13d831ec7",WBTC:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",WETH:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",xSUSHI:"0x8798249c2e607446efb7ad49ec89dd1865ff4272"}},4:{contracts:{authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",balancerHelpers:"0x5addcca35b7a0d07c74063c48700c8590e87864e",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x41b953164995c11c81da73d212ed8af25741b7ac",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8"},tokens:{}},5:{contracts:{authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x5d90225de345ee24d1d2b6f45de90b056f5265a1",authorizerAdaptorEntrypoint:"0xacaac3e6d6df918bf3c809dfc7d42de0e4a72d4c",authorizerWithAdaptorValidation:"0x8ea89804145c007e7d226001a96955ad53836087",bal:"0xfa8449189744799ad2ace7e0ebac8bb7575eff47",balancerHelpers:"0x5addcca35b7a0d07c74063c48700c8590e87864e",balancerMinter:"0xdf0399539a72e2689b8b2dd53c3c2a0883879fdd",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0x03f1ab8b19bce21eb06c364aec9e40322572a1e9",balancerTokenAdmin:"0x0f32d7d830e20809bcb9071581a696135dd472b7",balTokenHolderFactory:"0x45e617b07021b97407367624648d1a0a358a751a",batchRelayerLibrary:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",childChainGauge:"0x6b5da774890db7b7b96c6f44e6a4b0f657399e2e",childChainGaugeFactory:"0x7ba29fe8e83dd6097a7298075c4affdbda3121cc",childChainGaugeRewardHelper:"0xc128a9954e6c874ea3d62ce62b468ba073093f25",childChainGaugeTokenAdder:"0x55b18f514d7f0c6c886d0c23ac72df5d3b5f8850",childChainLiquidityGaugeFactory:"0x393b918cc2ffa238732e83dd4ee52343f57d767b",childChainStreamer:"0x5b5b72d76b68f4bb1d2a10ef0fc77711f8ec7ed0",circuitBreakerLib:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",composableStablePoolFactory:"0x1802953277fd955f9a254b80aa0582f193cf1d77",distributionScheduler:"0x05a0bf0540f346b6dac25550738343beb51c0f65",doubleEntrypointFixRelayer:"0xbe9458ab5b6f289e524410141c8d5e20a6b035fe",eulerLinearPoolFactory:"0x813ee7a840ce909e7fea2117a44a90b8063bd4fd",externalWeightedMath:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",feeDistributor:"0x42b67611b208e2e9b4cc975f6d74c87b865ae066",gaugeAdder:"0x3f170631ed9821ca51a59d996ab095162438dc10",gaugeController:"0xbb1ce49b16d55a1f2c6e88102f32144c7334b116",gaugeWorkingBalanceHelper:"0xa7d524046ef89de9f8e4f2d7b029f66ccb738d48",l2BalancerPseudoMinter:"0x81cfae226343b24ba12ec6521db2c79e7aeeb310",l2LayerZeroBridgeForwarder:"0xef44d6786b2b4d544b7850fe67ce6381626bf2d6",liquidityGaugeFactory:"0x3b8ca519122cdd8efb272b0d3085453404b25bd0",liquidityGaugeV5:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",managedPoolAddRemoveTokenLib:"0xacf05be5134d64d150d153818f8c67ee36996650",managedPoolAmmLib:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",managedPoolFactory:"0x03f3fb107e74f2eac9358862e91ad3c692712054",merkleOrchard:"0x5cf4928a3205728bd12830e1840f7db85c62a4b9",mockComposableStablePool:"0x5d343d374a769d1ab102e0418a516dadb08a86e4",mockEulerLinearPool:"0x43fa2c00419f60e18966aa043debd4701cb91b6d",mockEulerToken:"0xb99edc4b289b0f2284fcf3f66884191bdce29624",mockManagedPool:"0xff79b51ec2934dd1810a8e0325e3b08708720b26",mockShareToken:"0xb8bdcbf8ccf443d055d5ffe1d8154fac8187fc94",mockSilo:"0xa7a7e22398622bf71ff31dae5355ec7843b13806",mockSiloLinearPool:"0xbbb66a4fff47701ec6c528db615f5e7bf1abdaaf",mockSiloRepository:"0x7153de1a6d71360f07017838c28deca0d6c03e2a",mockWeightedPool:"0x072ed560cc042d7ab1c080a9e4fa8c6f4858deb3",noProtocolFeeLiquidityBootstrappingPoolFactory:"0xb0c726778c3ae4b3454d85557a48e8fa502bdd6a",nullVotingEscrow:"0xa523f47a933d5020b23629ddf689695aa94612dc",omniVotingEscrowAdaptor:"0x83e443ef4f9963c77bd860f94500075556668cb8",poolRecoveryHelper:"0x1cbbe6cea5e4fe7d69c586b4e362a646deef105d",preseededVotingEscrowDelegation:"0x7af980bdbc36d21ce228efabcca35707566a2be5",protocolFeePercentagesProvider:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x85153b639a35d6e6cf8b291aca237fbe67377154",protocolIdRegistry:"0x4fb47126fa83a8734991e41b942ac29a3266c968",recoveryModeHelper:"0x300ab2038eac391f26d9f895dc61f8f66a548833",rewardsOnlyGauge:"0x40bd3faef4268ea40f4c372d7f0a44c3efaaa6b1",siloLinearPoolFactory:"0x30fd8a0f7009f50616afdab4af91a0a2ef4eae49",singleRecipientGauge:"0x0e9addc34f93bccb45d1f744b9f9301285c5b48f",singleRecipientGaugeFactory:"0xe3881627b8deebccf9c23b291430a549fc0be5f7",smartWalletChecker:"0x1b6df1ff5db99f8a8a04d38f7478bab056fa35a7",testBalancerToken:"0xfa8449189744799ad2ace7e0ebac8bb7575eff47",timelockAuthorizer:"0x70e26f740bad6a2cdd762e2478496268882c21d4",timelockAuthorizerMigrator:"0x7159c4b96bfcfca232355b55778e85cf9e245192",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0xd13afc362f619b840c8f4aac1d957ce219ef37ca",votingEscrow:"0x33a99dcc4c85c014cf12626959111d5898bbcabf",votingEscrowDelegation:"0xcff73979321788d59a6170ff012730db2087f31c",votingEscrowDelegationProxy:"0x6817149cb753bf529565b4d023d7507ed2ff4bc0",votingEscrowRemapper:"0x5dbad78818d4c8958eff2d5b95b28385a22113cd",weightedPoolFactory:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",weth:"0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1",wstEthRateProvider:"0x80a94f458491ca88f09767e58a92fd23cbf1196f"},tokens:{}},10:{contracts:{aaveLinearPoolFactory:"0x7396f99b48e7436b152427bfa3dd6aa8c7c6d05b",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x8f42adbba1b16eaae3bb5754915e0d06059add75",authorizerAdaptorEntrypoint:"0xed86ff0c507d3af5f35d3523b77c17415fcffacb",authorizerWithAdaptorValidation:"0xacf05be5134d64d150d153818f8c67ee36996650",bal:"0xfe8b128ba8c78aabc59d4c64cee7ff28e9379921",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0x03f1ab8b19bce21eb06c364aec9e40322572a1e9",batchRelayerLibrary:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",childChainGauge:"0x81cfae226343b24ba12ec6521db2c79e7aeeb310",childChainGaugeFactory:"0xa523f47a933d5020b23629ddf689695aa94612dc",childChainGaugeRewardHelper:"0x8ab784368a1883da90d8513b48801e2db1cb2d5d",childChainGaugeTokenAdder:"0x6f5a2ee11e7a772aeb5114a20d0d7c0ff61eb8a0",childChainLiquidityGaugeFactory:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",childChainStreamer:"0x239e55f427d44c3cc793f49bfb507ebe76638a2b",circuitBreakerLib:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",composableStablePoolFactory:"0x1802953277fd955f9a254b80aa0582f193cf1d77",doubleEntrypointFixRelayer:"0x3b8ca519122cdd8efb272b0d3085453404b25bd0",erc4626LinearPoolFactory:"0x7adbdabaa80f654568421887c12f09e0c7bd9629",externalWeightedMath:"0x8df317a729fcaa260306d7de28888932cb579b88",gaugeWorkingBalanceHelper:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",l2BalancerPseudoMinter:"0x4fb47126fa83a8734991e41b942ac29a3266c968",l2LayerZeroBridgeForwarder:"0xbef13d1e54d0c79da8b0ad704883e1cea7eb2100",managedPoolAddRemoveTokenLib:"0x59562f93c447656f6e4799fc1fc7c3d977c3324f",managedPoolAmmLib:"0xded7fef7d8ecdcb74f22f0169e1a9ec696e6695d",managedPoolFactory:"0x4c32a8a8fda4e24139b51b456b42290f51d6a1c4",mockAaveLendingPool:"0x533a16f90e7d3ca31dbc608e5ec54967710f0d2a",mockAaveLinearPool:"0x45d37982784f022a9864748b4e8750e1e7019604",mockComposableStablePool:"0x11a4cf51bb0bb4d925cadfda61fcda952d64889c",mockErc4626LinearPool:"0x2da61ef3cdcb97efb0f7099c02527fabfe94dee5",mockErc4626Token:"0x4be0e4d6184348c5ba845a4010528cfc779610b8",mockManagedPool:"0xb4af4fdd49da2a2ba9522eadcf86d407a69f19c8",mockStaticAToken:"0x8b7854708c0c54f9d7d1ff351d4f84e6de0e134c",mockWeightedPool:"0x62f5f9a446d198e8e4c84ee56e5217416720edaf",mockYearnLinearPool:"0x34557ef500bfc060b8e3f2da58ef725bb7d32202",mockYearnTokenVault:"0xb15608d28eb43378a7e7780add3fe9bc132baf40",noProtocolFeeLiquidityBootstrappingPoolFactory:"0xf302f9f50958c5593770fdf4d4812309ff77414f",nullVotingEscrow:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",poolRecoveryHelper:"0x26743984e3357efc59f2fd6c1afdc310335a61c9",protocolFeePercentagesProvider:"0xacaac3e6d6df918bf3c809dfc7d42de0e4a72d4c",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0xc128a9954e6c874ea3d62ce62b468ba073093f25",protocolIdRegistry:"0x9805dcfd25e6de36bad8fe9d3fe2c9b44b764102",recoveryModeHelper:"0x3b1eb8eb7b43882b385ab30533d9a2bef9052a98",rewardsOnlyGauge:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x6817149cb753bf529565b4d023d7507ed2ff4bc0",votingEscrowDelegationProxy:"0x9da18982a33fd0c7051b19f0d7c76f2d5e7e017c",weightedPoolFactory:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",weth:"0x4200000000000000000000000000000000000006",yearnLinearPoolFactory:"0x19dfef0a828eec0c85fbb335aa65437417390b85"},tokens:{}},42:{contracts:{authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x97207b095e4d5c9a6e4cfbfcd2c3358e03b90c4a",balancerHelpers:"0x94905e703fead7f0fd0eee355d267ee909784e6d",balancerMinter:"0x1bbfa323155526f54eec458571bb5a75e0c41507",balancerTokenAdmin:"0xab093cd16e765b5b23d34030aafaf026558e0a19",balTokenHolderFactory:"0xa98bce70c92ad2ef3288dbcd659bc0d6b62f8f13",childChainLiquidityGaugeFactory:"0xf9ac7b9df2b3454e841110cce5550bd5ac6f875f",childChainStreamer:"0x4de578134995bea8480d7696946217f356339ab8",gaugeController:"0x35c425234dc42e7402f54cc54573f77842963a56",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x1b57f637ce3408f1f834b0b70f9a595b062daea7",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",rewardsOnlyGauge:"0x868543bb787317632f94fcfe8eb85406b123590c",testBalancerToken:"0xa2d801064652a269d92ee2a59f3261155ec66830",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",votingEscrow:"0x16ba924752ef283c7946db8a122a6742aa35c1dc",votingEscrowDelegation:"0xdc6d62ae091ea77331542042a72e5e38b188837c",votingEscrowDelegationProxy:"0x98d0d0a65cbeccaa647a5a95cf27cf2f00e1231c",wstEthRateProvider:"0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f8"},tokens:{}},100:{contracts:{aaveLinearPoolFactory:"0x62aab12865d7281048c337d53a4dde9d770321e6",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x5addcca35b7a0d07c74063c48700c8590e87864e",authorizerAdaptorEntrypoint:"0x8f42adbba1b16eaae3bb5754915e0d06059add75",authorizerWithAdaptorValidation:"0x03f3fb107e74f2eac9358862e91ad3c692712054",bal:"0x7ef541e2a22058048904fe5744f9c7e4c57af717",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",balancerRelayer:"0x3536fd480ca495ac91e698a703248a8915c137a3",batchRelayerLibrary:"0xb9ad3466cdd42015cc05d4804dc68d562b6a2065",childChainGauge:"0x96484f2abf5e58b15176dbf1a799627b53f13b6d",childChainGaugeFactory:"0x83e443ef4f9963c77bd860f94500075556668cb8",childChainGaugeRewardHelper:"0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd",childChainGaugeTokenAdder:"0x1802953277fd955f9a254b80aa0582f193cf1d77",childChainLiquidityGaugeFactory:"0x809b79b53f18e9bc08a961ed4678b901ac93213a",childChainStreamer:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",circuitBreakerLib:"0x54f8f9d28e26fa5864cfa80f50a5df95fd85f46a",composableStablePoolFactory:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",externalWeightedMath:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",gaugeWorkingBalanceHelper:"0x682f0ddbfd41d1272982f64a499fb62d80e27589",l2BalancerPseudoMinter:"0xa8920455934da4d853faac1f94fe7bef72943ef1",l2LayerZeroBridgeForwarder:"0xeb151668006cd04dadd098afd0a82e78f77076c3",managedPoolAddRemoveTokenLib:"0x4c32a8a8fda4e24139b51b456b42290f51d6a1c4",managedPoolAmmLib:"0xacf05be5134d64d150d153818f8c67ee36996650",managedPoolFactory:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",mockAaveLendingPool:"0x040dba12bb3d5c0a73ddfe84c220be3ddba06966",mockAaveLinearPool:"0x1ac55c31dac78ca943cb8ebfca5945ce09e036e2",mockComposableStablePool:"0xf3678a0b54c61ccd88ce321c2e07f87ac75f08b9",mockManagedPool:"0xc061361fda32ff5b65f7d98acc9a87349d3f0768",mockStaticAToken:"0x35d8f4a4c0e95f3d925cb4cbbbf513a0172ed8a4",mockWeightedPool:"0xd8752f9b0a2c2813796abd2be212a32ffd656ef1",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x85a80afee867adf27b50bdb7b76da70f1e853062",nullVotingEscrow:"0x013d4382f291be5688afbcc741ee8a24c66b2c92",poolRecoveryHelper:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",protocolFeePercentagesProvider:"0x41b953164995c11c81da73d212ed8af25741b7ac",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0xdae7e32adc5d490a43ccba1f0c736033f2b4efca",protocolIdRegistry:"0x6b5da774890db7b7b96c6f44e6a4b0f657399e2e",recoveryModeHelper:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",rewardsOnlyGauge:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x5dbad78818d4c8958eff2d5b95b28385a22113cd",votingEscrowDelegationProxy:"0x7a2535f5fb47b8e44c02ef5d9990588313fe8f05",weightedPoolFactory:"0x6cad2ea22bfa7f4c14aae92e47f510cd5c509bc7",weth:"0xe91d153e0b41518a2ce8dd3d7944fa863463a97d"},tokens:{}},137:{contracts:{aaveLinearPoolFactory:"0xab2372275809e15198a7968c7f324053867cdb0c",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",authorizerAdaptorEntrypoint:"0xab093cd16e765b5b23d34030aafaf026558e0a19",authorizerWithAdaptorValidation:"0x020301b0a99efb6816b41007765fb577259ec418",bal:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",balancerHelpers:"0x239e55f427d44c3cc793f49bfb507ebe76638a2b",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0xd18d5d377eb23362e54fa496597d7e962d56c554",batchRelayerLibrary:"0x4271de2595c3d85d2d455c5778adf2d7ad54322c",childChainGauge:"0xc9b36096f5201ea332db35d6d195774ea0d5988f",childChainGaugeFactory:"0x22625eedd92c81a219a83e1dc48f88d54786b017",childChainGaugeRewardHelper:"0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33",childChainGaugeTokenAdder:"0x1554ee754707d5c93b7934af404747aba521aaf2",childChainLiquidityGaugeFactory:"0x3b8ca519122cdd8efb272b0d3085453404b25bd0",childChainStreamer:"0x6f5a2ee11e7a772aeb5114a20d0d7c0ff61eb8a0",circuitBreakerLib:"0xedfd0a7005a7c72c44ff13bea370c86a9d11bee1",composableStablePoolFactory:"0x6ab5549bbd766a43afb687776ad8466f8b42f777",doubleEntrypointFixRelayer:"0x79d0011892fe558fc5a4ec7d4ca5db59069f460f",erc4626LinearPoolFactory:"0x5c5fcf8fbd4cd563ced27e7d066b88ee20e1867a",externalWeightedMath:"0x72ebafddc4c7d3eb702c81295d90a8b29f008a03",gaugeWorkingBalanceHelper:"0x08fd003d8f1892d4ec684e6c3ee0128081be461b",l2BalancerPseudoMinter:"0x47b489bf5836f83abd928c316f8e39bc0587b020",l2LayerZeroBridgeForwarder:"0xb98f54a74590a6e681ff664b2fa22ebffe1a929e",managedPoolAddRemoveTokenLib:"0xf553bf40db86c35f3058434039d51aad29c6180b",managedPoolAmmLib:"0xcefd59eedafa9ee8ccda1aaf944088e68b5bd890",managedPoolFactory:"0xb8dfa4fd0f083de2b7edc0d5eed5e684e54ba45d",merkleOrchard:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",mockAaveLendingPool:"0x0df6bb26533eb86f371b1f70eecdd955420523c6",mockAaveLinearPool:"0x0889b240a5876aae745ac19f1771853671dc5d36",mockComposableStablePool:"0x0f25823cf786b78696b16536e2f2b9835289ab51",mockErc4626LinearPool:"0xc55ec796a4debe625d95436a3531f4950b11bdcf",mockErc4626Token:"0x19dfef0a828eec0c85fbb335aa65437417390b85",mockManagedPool:"0x074efd7806e6c28e8b6611075b1aa62c6c408090",mockStaticAToken:"0xe72b2780d3c57f781bd4e8572e200cd7e9a447c2",mockWeightedPool:"0xb77e03655ee894aade216a83d05511a9f9895126",mockYearnLinearPool:"0xdae301690004946424e41051ace1791083be42a1",mockYearnTokenVault:"0x28fa1e40011adf98898e8243b2a48bb21ebf0c29",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x41b953164995c11c81da73d212ed8af25741b7ac",nullVotingEscrow:"0x1311fbc9f60359639174c1e7cc2032dbdb5cc4d1",poolRecoveryHelper:"0x495f696430f4a51f7fcb98fbe68a9cb7a07fb1ba",protocolFeePercentagesProvider:"0x42ac0e6fa47385d55aff070d79ef0079868c48a6",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0xef44d6786b2b4d544b7850fe67ce6381626bf2d6",protocolIdRegistry:"0xa523f47a933d5020b23629ddf689695aa94612dc",recoveryModeHelper:"0x1eb79551ca0e83ec145608bc39a0c7f10ca21aa5",rewardsOnlyGauge:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0xd961e30156c2e0d0d925a0de45f931cb7815e970",votingEscrowDelegationProxy:"0x0f08eef2c785aa5e7539684af04755dec1347b7c",weightedPoolFactory:"0xfc8a407bba312ac761d8bfe04ce1201904842b76",weth:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",yearnLinearPoolFactory:"0x0b576c1245f479506e7c8bbc4db4db07c1cd31f9"},tokens:{BAL:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",USDC:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",WBTC:"0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",WETH:"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",WMATIC:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"}},1101:{contracts:{aaveLinearPoolFactory:"0x4b7b369989e613ff2c65768b7cf930cc927f901e",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0xdcdbf71a870cc60c6f9b621e28a7d3ffd6dd4965",authorizerAdaptorEntrypoint:"0xb9ad3466cdd42015cc05d4804dc68d562b6a2065",authorizerWithAdaptorValidation:"0x8df317a729fcaa260306d7de28888932cb579b88",bal:"0x120ef59b80774f02211563834d8e3b72cb1649d6",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0x809b79b53f18e9bc08a961ed4678b901ac93213a",balancerRelayer:"0x4678731dc41142a902a114ac5b2f77b63f4a259d",batchRelayerLibrary:"0x54f8f9d28e26fa5864cfa80f50a5df95fd85f46a",childChainGauge:"0x59562f93c447656f6e4799fc1fc7c3d977c3324f",childChainGaugeFactory:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",circuitBreakerLib:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",composableStablePoolFactory:"0x8ea89804145c007e7d226001a96955ad53836087",erc4626LinearPoolFactory:"0x6b1da720be2d11d95177ccfc40a917c2688f396c",externalWeightedMath:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",gaugeWorkingBalanceHelper:"0xef454a7b3f965d3f6723e462405246f8cd865425",gearboxLinearPoolFactory:"0x687b8c9b41e01be8b591725fac5d5f52d0564d79",l2BalancerPseudoMinter:"0x475d18169be8a89357a9ee3ab00ca386d20fa229",l2LayerZeroBridgeForwarder:"0xded7fef7d8ecdcb74f22f0169e1a9ec696e6695d",managedPoolAddRemoveTokenLib:"0xacf05be5134d64d150d153818f8c67ee36996650",managedPoolAmmLib:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",managedPoolFactory:"0xaf779e58dafb4307b998c7b3c9d3f788dfc80632",mockAaveLendingPool:"0x161f4014c27773840ccb4ec1957113e6dd028846",mockAaveLinearPool:"0xbfd65c6160cfd638a85c645e6e6d8acac5dac935",mockComposableStablePool:"0x6f5f794a3cef904b8517c4c311de2fa837ff24a0",mockErc4626LinearPool:"0xac4b72c01072a52b73ca71105504f1372efcce0d",mockErc4626Token:"0x0c6052254551eae3ecac77b01dfcf1025418828f",mockGearboxDieselToken:"0x698caed853be9cea96c268f565e2b61d3b2bcda4",mockGearboxLinearPool:"0x32f03464fdf909fdf3798f87ff3712b10c59bd86",mockGearboxVault:"0x88ed12a90142fdbfe2a28f7d5b48927254c7e760",mockLiquidityBootstrappingPool:"0x3c87ff3e9307dbebfae720e04c6439e49f79bf9b",mockManagedPool:"0x522ee506a2f63d0ae1d79d6f5dbd9d0bca32c866",mockStaticAToken:"0x4638ab64022927c9bd5947607459d13f57f1551c",mockWeightedPool:"0x78385153d2f356c87001f09bb5424137c618d38b",mockYearnLinearPool:"0x02c9dcb975262719a61f9b40bdf0987ead9add3a",mockYearnTokenVault:"0xdbf7b9f1d2bfba14e42709f84dda3187ee410e38",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x3b1eb8eb7b43882b385ab30533d9a2bef9052a98",nullVotingEscrow:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",poolRecoveryHelper:"0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd",protocolFeePercentagesProvider:"0x1802953277fd955f9a254b80aa0582f193cf1d77",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",protocolIdRegistry:"0x6cad2ea22bfa7f4c14aae92e47f510cd5c509bc7",recoveryModeHelper:"0x300ab2038eac391f26d9f895dc61f8f66a548833",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",votingEscrowDelegationProxy:"0xc7e5ed1054a24ef31d827e6f86caa58b3bc168d7",weightedPoolFactory:"0x03f3fb107e74f2eac9358862e91ad3c692712054",weth:"0x4f9a0e7fd2bf6067db6994cf12e4495df938e6e9",yearnLinearPoolFactory:"0x44d33798dddcdabc93fe6a40c80588033dc502d3"},tokens:{}},8453:{contracts:{aaveLinearPoolFactory:"0x687b8c9b41e01be8b591725fac5d5f52d0564d79",authorizer:"0x809b79b53f18e9bc08a961ed4678b901ac93213a",authorizerAdaptor:"0x6cad2ea22bfa7f4c14aae92e47f510cd5c509bc7",authorizerAdaptorEntrypoint:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",authorizerWithAdaptorValidation:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",bal:"0x4158734d47fc9692176b5085e0f52ee0da5d47f1",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0x300ab2038eac391f26d9f895dc61f8f66a548833",balancerRelayer:"0x76f7204b62f554b79d444588edac9dfa7032c71a",batchRelayerLibrary:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",childChainGauge:"0x59562f93c447656f6e4799fc1fc7c3d977c3324f",childChainGaugeFactory:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",circuitBreakerLib:"0xef454a7b3f965d3f6723e462405246f8cd865425",composableStablePoolFactory:"0x8df317a729fcaa260306d7de28888932cb579b88",erc4626LinearPoolFactory:"0x161f4014c27773840ccb4ec1957113e6dd028846",externalWeightedMath:"0x7920bfa1b2041911b354747ca7a6cdd2dfc50cfd",gaugeWorkingBalanceHelper:"0xa7d524046ef89de9f8e4f2d7b029f66ccb738d48",gearboxLinearPoolFactory:"0x9dd32684176638d977883448a4c914311c07bd62",l2BalancerPseudoMinter:"0xc7e5ed1054a24ef31d827e6f86caa58b3bc168d7",l2LayerZeroBridgeForwarder:"0x8ea89804145c007e7d226001a96955ad53836087",managedPoolAddRemoveTokenLib:"0xb19382073c7a0addbb56ac6af1808fa49e377b75",managedPoolAmmLib:"0x7d2248f194755dca9a1887099394f39476d28c9a",managedPoolFactory:"0x9a62c91626d39d0216b3959112f9d4678e20134d",mockAaveLendingPool:"0x88ed12a90142fdbfe2a28f7d5b48927254c7e760",mockAaveLinearPool:"0x712e23a9b91aa30ee7997d1c7a1a285d4c7912d1",mockComposableStablePool:"0x7f6e9d6a4093af9d09bae92d24bfe42fc5369ae6",mockErc4626LinearPool:"0x1cc2e10c486ffb7228810b9c7c183d0cd92cdf44",mockErc4626Token:"0x4638ab64022927c9bd5947607459d13f57f1551c",mockGearboxDieselToken:"0xb521dd5c8e13fe202626cac98873fea2b7760ce4",mockGearboxLinearPool:"0x3c28a59356b473847aaa5e0b6f561636079213a6",mockGearboxVault:"0x79e435875ccee3cd9e8da23fe34f9a011d05ea6c",mockLiquidityBootstrappingPool:"",mockManagedPool:"0xe50ad96af9370d05d3c1ce85f17c31557b29c4ee",mockStaticAToken:"0x698caed853be9cea96c268f565e2b61d3b2bcda4",mockWeightedPool:"0xd9dbbfaa703f3c33838365ae00fe4eb22cdf8d46",mockYearnLinearPool:"0x369877467fc3b6774de4e11e0c0abbde70eb40fd",mockYearnTokenVault:"0xdbf7b9f1d2bfba14e42709f84dda3187ee410e38",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x0c6052254551eae3ecac77b01dfcf1025418828f",nullVotingEscrow:"0x475d18169be8a89357a9ee3ab00ca386d20fa229",poolRecoveryHelper:"0x03f3fb107e74f2eac9358862e91ad3c692712054",protocolFeePercentagesProvider:"0xded7fef7d8ecdcb74f22f0169e1a9ec696e6695d",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0xacf05be5134d64d150d153818f8c67ee36996650",protocolIdRegistry:"0x682f0ddbfd41d1272982f64a499fb62d80e27589",recoveryModeHelper:"0x313a8d36b1d90a4cba3a505fdc3480c3870be053",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",votingEscrowDelegationProxy:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",weightedPoolFactory:"0x4c32a8a8fda4e24139b51b456b42290f51d6a1c4",weth:"0x4200000000000000000000000000000000000006",yearnLinearPoolFactory:"0x44d33798dddcdabc93fe6a40c80588033dc502d3"},tokens:{}},42161:{contracts:{aaveLinearPoolFactory:"0x7396f99b48e7436b152427bfa3dd6aa8c7c6d05b",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",authorizerAdaptorEntrypoint:"0x97207b095e4d5c9a6e4cfbfcd2c3358e03b90c4a",authorizerWithAdaptorValidation:"0x6b1da720be2d11d95177ccfc40a917c2688f396c",bal:"0x040d1edc9569d4bab2d15287dc5a4f10f56a56b8",balancerHelpers:"0x77d46184d22ca6a3726a2f500c776767b6a3d6ab",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0x598ce0f1ab64b27256759ef99d883ee51138b9bd",batchRelayerLibrary:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",childChainGauge:"0xa523f47a933d5020b23629ddf689695aa94612dc",childChainGaugeFactory:"0x6817149cb753bf529565b4d023d7507ed2ff4bc0",childChainGaugeRewardHelper:"0xa0dabebaad1b243bbb243f933013d560819eb66f",childChainGaugeTokenAdder:"0xbfd9769b061e57e478690299011a028194d66e3c",childChainLiquidityGaugeFactory:"0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2",childChainStreamer:"0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f8",circuitBreakerLib:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",composableStablePoolFactory:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",doubleEntrypointFixRelayer:"0x8e5698dc4897dc12243c8642e77b4f21349db97c",erc4626LinearPoolFactory:"0x7adbdabaa80f654568421887c12f09e0c7bd9629",externalWeightedMath:"0x03f3fb107e74f2eac9358862e91ad3c692712054",gaugeWorkingBalanceHelper:"0xea924b45a3fcdaadf4e5cfb1665823b8f8f2039b",l2BalancerPseudoMinter:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",l2LayerZeroBridgeForwarder:"0x12ca9de662a7bf5dc89e034a5083ef751b08ede7",managedPoolAddRemoveTokenLib:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",managedPoolAmmLib:"0x300ab2038eac391f26d9f895dc61f8f66a548833",managedPoolFactory:"0x8ea89804145c007e7d226001a96955ad53836087",merkleOrchard:"0x9805dcfd25e6de36bad8fe9d3fe2c9b44b764102",mockAaveLendingPool:"0x533a16f90e7d3ca31dbc608e5ec54967710f0d2a",mockAaveLinearPool:"0x19b1c92631405a0a9495ccba0becf4f2e8e908bd",mockComposableStablePool:"0xff7e6b102516e071dcda763ee9d02c1515481db5",mockErc4626LinearPool:"0x3f53a862919ccfa023cb6ace91378a79fb0f6bf5",mockErc4626Token:"0x4be0e4d6184348c5ba845a4010528cfc779610b8",mockManagedPool:"0xf5a71257b331c02da1eae52151c3d600f16b76f0",mockStaticAToken:"0x8b7854708c0c54f9d7d1ff351d4f84e6de0e134c",mockWeightedPool:"0x129c6402ff88611aa59bf2e14b39e091822e2c9c",mockYearnLinearPool:"0x1fa7f727934226aedab636d62a084931b97d366b",mockYearnTokenVault:"0xb15608d28eb43378a7e7780add3fe9bc132baf40",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x1802953277fd955f9a254b80aa0582f193cf1d77",nullVotingEscrow:"0x9da18982a33fd0c7051b19f0d7c76f2d5e7e017c",poolRecoveryHelper:"0xb5e56cc3d2e38e53b1166175c59e921a37cdc1e2",protocolFeePercentagesProvider:"0x5ef4c5352882b10893b70dbcaa0c000965bd23c5",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x70bbd023481788e443472e123ab963e5ebf58d06",protocolIdRegistry:"0x5cf4928a3205728bd12830e1840f7db85c62a4b9",recoveryModeHelper:"0x682f0ddbfd41d1272982f64a499fb62d80e27589",rewardsOnlyGauge:"0x41b953164995c11c81da73d212ed8af25741b7ac",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x6b5da774890db7b7b96c6f44e6a4b0f657399e2e",votingEscrowDelegationProxy:"0x81cfae226343b24ba12ec6521db2c79e7aeeb310",weightedPoolFactory:"0xc7e5ed1054a24ef31d827e6f86caa58b3bc168d7",weth:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",yearnLinearPoolFactory:"0x19dfef0a828eec0c85fbb335aa65437417390b85"},tokens:{BADGER:"0xbfa641051ba0a0ad1b0acf549a89536a0d76472e",CRV:"0x11cdb42b0eb46d95f990bedd4695a6e3fa034978",LDO:"0x13ad51ed4f1b7e9dc168d8a00cb3f4ddd85efa60",renBTC:"0xdbf31df14b66535af65aac99c32e9ea844e14501",SUSHI:"0xd4d42f0b6def4ce0383636770ef773390d85c61a",USDC:"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",USDT:"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",WBTC:"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f",WETH:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1"}},43114:{contracts:{aaveLinearPoolFactory:"0x6caf662b573f577de01165d2d38d1910bba41f8a",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0xdae7e32adc5d490a43ccba1f0c736033f2b4efca",authorizerAdaptorEntrypoint:"0x4e7bbd911cf1efa442bc1b2e9ea01ffe785412ec",authorizerWithAdaptorValidation:"0x8df317a729fcaa260306d7de28888932cb579b88",bal:"0xe15bcb9e0ea69e6ab9fa080c4c4a5632896298c3",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",balancerRelayer:"0x03f1ab8b19bce21eb06c364aec9e40322572a1e9",batchRelayerLibrary:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",childChainGauge:"0x4b7b369989e613ff2c65768b7cf930cc927f901e",childChainGaugeFactory:"0x161f4014c27773840ccb4ec1957113e6dd028846",childChainGaugeRewardHelper:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",childChainGaugeTokenAdder:"0xf302f9f50958c5593770fdf4d4812309ff77414f",childChainLiquidityGaugeFactory:"0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2",childChainStreamer:"0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f8",circuitBreakerLib:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",composableStablePoolFactory:"0x3b1eb8eb7b43882b385ab30533d9a2bef9052a98",distributionScheduler:"0xc128a9954e6c874ea3d62ce62b468ba073093f25",erc4626LinearPoolFactory:"0x4507d91cd2c0d51d9b4f30bf0b93afc938a70ba5",externalWeightedMath:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",gaugeWorkingBalanceHelper:"0x687b8c9b41e01be8b591725fac5d5f52d0564d79",l2BalancerPseudoMinter:"0xea924b45a3fcdaadf4e5cfb1665823b8f8f2039b",l2LayerZeroBridgeForwarder:"0x4638ab64022927c9bd5947607459d13f57f1551c",managedPoolAddRemoveTokenLib:"0xacf05be5134d64d150d153818f8c67ee36996650",managedPoolAmmLib:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",managedPoolFactory:"0x03f3fb107e74f2eac9358862e91ad3c692712054",mockAaveLendingPool:"0x57ea28a99394978d060e483477c0fd9fb9afa96c",mockAaveLinearPool:"0xa826a114b0c7db4d1ff4a4be845a78998c64564c",mockComposableStablePool:"0xea4643102dfc03d5e382e7827bf767f6587e9965",mockErc4626LinearPool:"0xed3e2f496cbcd8e212192fb8d1499842f04a0d19",mockErc4626Token:"0x2ebe41e1aa44d61c206a94474932dadc7d3fd9e3",mockManagedPool:"0x3fb81f6fb0dd94c6fc7e138887f1ca4cdb5e2999",mockStaticAToken:"0xd8b6b96c88ad626eb6209c4876e3b14f45f8803a",mockWeightedPool:"0xb2b5b452d53401391155ea48c4451f6e9b0dd058",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",nullVotingEscrow:"0x6b1da720be2d11d95177ccfc40a917c2688f396c",poolRecoveryHelper:"0x3b8ca519122cdd8efb272b0d3085453404b25bd0",protocolFeePercentagesProvider:"0x239e55f427d44c3cc793f49bfb507ebe76638a2b",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x8f42adbba1b16eaae3bb5754915e0d06059add75",recoveryModeHelper:"0x300ab2038eac391f26d9f895dc61f8f66a548833",rewardsOnlyGauge:"0x41b953164995c11c81da73d212ed8af25741b7ac",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",votingEscrowDelegationProxy:"0x0c6052254551eae3ecac77b01dfcf1025418828f",weightedPoolFactory:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",weth:"0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7"},tokens:{}},11155111:{contracts:{aaveLinearPoolFactory:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0xdcdbf71a870cc60c6f9b621e28a7d3ffd6dd4965",authorizerAdaptorEntrypoint:"0xb9ad3466cdd42015cc05d4804dc68d562b6a2065",authorizerWithAdaptorValidation:"0xb521dd5c8e13fe202626cac98873fea2b7760ce4",bal:"0xb19382073c7a0addbb56ac6af1808fa49e377b75",balancerHelpers:"0xdae7e32adc5d490a43ccba1f0c736033f2b4efca",balancerMinter:"0x1783cd84b3d01854a96b4ed5843753c2ccbd574a",balancerQueries:"0x1802953277fd955f9a254b80aa0582f193cf1d77",balancerRelayer:"0x6d5342d716c13d9a3f072a2b11498624ade27f90",balancerTokenAdmin:"0x7d2248f194755dca9a1887099394f39476d28c9a",balTokenHolderFactory:"0xef454a7b3f965d3f6723e462405246f8cd865425",batchRelayerLibrary:"0x5f6848976c2914403b425f18b589a65772f082e3",childChainGauge:"0xc49ca921c4cd1117162eaeec0ee969649997950c",childChainGaugeFactory:"0xc370cd86d5488c1788b62f11b09adb0c47f47440",circuitBreakerLib:"0x4c0c450bedb9282a7a54fcb316c285e85a8c0265",composableStablePoolFactory:"0xa3fd20e29358c056b727657e83dfd139abbc9924",erc4626LinearPoolFactory:"0x59562f93c447656f6e4799fc1fc7c3d977c3324f",externalWeightedMath:"0x8246e571d88acd1346179cc3641de87fe3544d7a",feeDistributor:"0xa6971317fb06c76ef731601c64433a4846fca707",gaugeAdder:"0xe42ffa682a26ef8f25891db4882932711d42e467",gaugeController:"0x577e5993b9cc480f07f98b5ebd055604bd9071c4",gaugeWorkingBalanceHelper:"0x2e4abed3362a622c5f712bb183005a476b146bd3",gearboxLinearPoolFactory:"0x8df317a729fcaa260306d7de28888932cb579b88",l2BalancerPseudoMinter:"0xb51f7ffc97cedfb6922e8b9bbf3ef7575fafd630",l2LayerZeroBridgeForwarder:"0xc7e5ed1054a24ef31d827e6f86caa58b3bc168d7",liquidityGaugeFactory:"0x2ff226cd12c80511a641a6101f071d853a4e5363",liquidityGaugeV5:"0x82416ce6ea7dd4923d4a3ed70a79b4a432a382c4",managedPoolAddRemoveTokenLib:"0xc7416e4f3715467ddcf28dc409a9483b2e4d4f43",managedPoolAmmLib:"0xa30ade89e6af5b0ca515cd78e44f9ad0c63989b2",managedPoolFactory:"0x63e179c5b6d54b2c2e36b9ce4085ef5a8c86d50c",mockAaveLendingPool:"0x300ab2038eac391f26d9f895dc61f8f66a548833",mockAaveLinearPool:"0xe4efd99f3c03778ba913eb578c599329634e2bd7",mockComposableStablePool:"0xa8d865fe1d68a405b29f884358468c9b52d4841d",mockErc4626LinearPool:"0x0c2ead6f2dc2a9385187023f4cec5925337b330f",mockErc4626Token:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",mockGearboxDieselToken:"0x4c32a8a8fda4e24139b51b456b42290f51d6a1c4",mockGearboxLinearPool:"0x112a7b7ca66e6963c49bc523a415f7d8cdb806b9",mockGearboxVault:"0x3b1eb8eb7b43882b385ab30533d9a2bef9052a98",mockLiquidityBootstrappingPool:"0xe90472ffc41d7ddf8e3b456bba748e3f22c59c6f",mockManagedPool:"0xe458224ca8d6605c87b73e92aa5cb7a4e77770f3",mockShareToken:"0x0c6052254551eae3ecac77b01dfcf1025418828f",mockSilo:"0x6b1da720be2d11d95177ccfc40a917c2688f396c",mockSiloLinearPool:"0xa149cf2d795aab83a15673f5beade9361e4e3f65",mockSiloRepository:"0xa7d524046ef89de9f8e4f2d7b029f66ccb738d48",mockStaticAToken:"0x03f3fb107e74f2eac9358862e91ad3c692712054",mockWeightedPool:"0xf7a7e1f48fa43cb7919ff4eb362c5be78092df4a",mockYearnLinearPool:"0x016b7366f76aa2794097798b90cf239796aeff8d",mockYearnTokenVault:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",nullVotingEscrow:"0x475d18169be8a89357a9ee3ab00ca386d20fa229",omniVotingEscrowAdaptor:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",poolRecoveryHelper:"0x1b6f057520b4e826271d47b8bdab98e35af17e59",preseededVotingEscrowDelegation:"0xb1a4fe1c6d25a0ddab47431a92a723dd71d9021f",protocolFeePercentagesProvider:"0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x809b79b53f18e9bc08a961ed4678b901ac93213a",protocolIdRegistry:"0x6cad2ea22bfa7f4c14aae92e47f510cd5c509bc7",recoveryModeHelper:"0x5419e785b83ad3539d3a8741c0abb77d90d8784e",siloLinearPoolFactory:"0x8ea89804145c007e7d226001a96955ad53836087",singleRecipientGauge:"0x9a5ddde7056ceffb03d9962c4549ac1c4ad1f985",singleRecipientGaugeFactory:"0x7ee4d172ae50c627a1bfa9a99e1260c54da26fdf",smartWalletChecker:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",testBalancerToken:"0xb19382073c7a0addbb56ac6af1808fa49e377b75",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x927906bbac747c13c75f6447fe8abb490eab456c",votingEscrow:"0x150a72e4d4d81bbf045565e232c50ed0931ad795",votingEscrowDelegation:"0x0c5538098ebe88175078972f514c9e101d325d4f",votingEscrowDelegationProxy:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",votingEscrowRemapper:"0xf24917fb88261a37cc57f686ebc831a5c0b9fd39",weightedPoolFactory:"0x7920bfa1b2041911b354747ca7a6cdd2dfc50cfd",weth:"0x7b79995e5f793a07bc00c21412e50ecae098e7f9",yearnLinearPoolFactory:"0xacf05be5134d64d150d153818f8c67ee36996650"},tokens:{}}};const wn="0xBA12222222228d8Ba445958a75a0704d566BF2C8",xn={[Pe.MAINNET]:{chainId:Pe.MAINNET,addresses:{contracts:{multicall:"0xeefba1e63905ef1d7acba5a8513c70307c1ce441",poolDataQueries:"0xf5CDdF6feD9C589f1Be04899F48f9738531daD59",lidoRelayer:"0xdcdbf71A870cc60C6F9B621E28a7D3Ffd6Dd4965",veBal:"0xC128a9954e6c874eA3d62ce62B468bA073093F25",gaugeControllerCheckpointer:"0x8e5698dc4897dc12243c8642e77b4f21349db97c",veBalProxy:"0x6f5a2eE11E7a772AeB5114A20d0D7c0ff61EB8A0",gyroConfigProxy:"0xac89cc9d78bbad7eb3a02601b4d65daa1f908aa6",...Pn[Pe.MAINNET].contracts},tokens:{bal:Pn[Pe.MAINNET].contracts.bal,wrappedNativeAsset:Pn[Pe.MAINNET].contracts.weth,bbaUsd:Pn[Pe.MAINNET].tokens.bb_a_usd,lbpRaisingTokens:["0x6b175474e89094c44da98b954eedeac495271d0f","0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"],stETH:"0xae7ab96520de3a18e5e111b5eaab095312d7fe84",wstETH:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",veBal:"0xC128a9954e6c874eA3d62ce62B468bA073093F25",...Pn[Pe.MAINNET].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"ethereum"}},pools:{wETHwstETH:{id:"0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080",address:"0x32296969ef14eb0c6d29669c550d4a0449130230"}},poolsToIgnore:["0xbd482ffb3e6e50dc1c437557c3bea2b68f3683ee0000000000000000000003c6","0x0afbd58beca09545e4fb67772faf3858e610bcd00000000000000000000004b9","0xf22ff21e17157340575158ad7394e068048dd98b0000000000000000000004b8","0xf71d0774b214c4cf51e33eb3d30ef98132e4dbaa00000000000000000000046e"],sorConnectingTokens:[{symbol:"wEth",address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},{symbol:"wstEth",address:"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"},{symbol:"DOLA",address:"0x865377367054516e17014CcdED1e7d814EDC9ce4"},{symbol:"rEth",address:"0xae78736cd615f374d3085123a210448e74fc6393"},{symbol:"ETHx",address:"0xa35b1b31ce002fbf2058d22f30f95d405200a15b"}],sorTriPathMidPoolIds:["0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112"]},[Pe.POLYGON]:{chainId:Pe.POLYGON,addresses:{contracts:{multicall:"0xa1B2b503959aedD81512C37e9dce48164ec6a94d",poolDataQueries:"0x84813aA3e079A665C0B80F944427eE83cBA63617",gaugeClaimHelper:"0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33",gyroConfigProxy:"0xfdc2e9e03f515804744a40d0f8d25c16e93fbe67",...Pn[Pe.POLYGON].contracts},tokens:{bal:Pn[Pe.POLYGON].contracts.bal,wrappedNativeAsset:Pn[Pe.POLYGON].contracts.weth,lbpRaisingTokens:["0x8f3cf7ad23cd3cadbd9735aff958023239c6a063","0x2791bca1f2de4661ed88a30c99a7a9449aa84174","0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"],...Pn[Pe.POLYGON].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-prune-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-polygon",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/ianlapham/polygon-blocks"},thirdParty:{coingecko:{nativeAssetId:"",platformId:"polygon-pos"}},pools:{},poolsToIgnore:["0x600bd01b6526611079e12e1ff93aba7a3e34226f0000000000000000000009e4","0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455"],sorConnectingTokens:[{symbol:"weth",address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"},{symbol:"bbrz2",address:"0xe22483774bd8611be2ad2f4194078dac9159f4ba"}]},[Pe.ARBITRUM]:{chainId:Pe.ARBITRUM,addresses:{contracts:{multicall:"0x269ff446d9892c9e19082564df3f5e8741e190a1",poolDataQueries:"0x7Ba29fE8E83dd6097A7298075C4AFfdBda3121cC",gaugeClaimHelper:"0xa0dabebaad1b243bbb243f933013d560819eb66f",gyroConfigProxy:"0x9b683ca24b0e013512e2566b68704dbe9677413c",...Pn[Pe.ARBITRUM].contracts},tokens:{bal:Pn[Pe.ARBITRUM].contracts.bal,wrappedNativeAsset:Pn[Pe.ARBITRUM].contracts.weth,lbpRaisingTokens:["0xda10009cbd5d07dd0cecc66161fc93d7c9000da1","0xff970a61a04b1ca14834a43f5de4533ebddb5cc8","0x82af49447d8a07e3bd95bd0d56f35241523fbab1"],...Pn[Pe.ARBITRUM].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-arbitrum-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-arbitrum",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/ianlapham/arbitrum-one-blocks"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"arbitrum-one"}},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"}],sorTriPathMidPoolIds:["0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158","0x0052688295413b32626d226a205b95cdb337de860002000000000000000003d1","0xa1a8bf131571a2139feb79401aa4a2e9482df6270002000000000000000004b4"]},[Pe.GOERLI]:{chainId:Pe.GOERLI,addresses:{contracts:{multicall:"0x77dCa2C955b15e9dE4dbBCf1246B4B85b651e50e",poolDataQueries:"0x6d3197d069F8F9f1Fe7e23665Bc64CB77ED8b089",veBal:"0x33A99Dcc4C85C014cf12626959111D5898bbCAbF",veBalProxy:"0xA1F107D1cD709514AE8A914eCB757E95f9cedB31",erc4626LinearPoolFactory:"0xba240c856498e2d7a70af4911aafae0d6b565a5b",aaveLinearPoolFactory:"0x76578ecf9a141296ec657847fb45b0585bcda3a6",...Pn[Pe.GOERLI].contracts},tokens:{bal:Pn[Pe.GOERLI].contracts.bal,wrappedNativeAsset:Pn[Pe.GOERLI].contracts.weth}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-goerli-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-goerli",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/blocklytics/goerli-blocks"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"ethereum"}},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"}]},[Pe.OPTIMISM]:{chainId:Pe.OPTIMISM,addresses:{contracts:{multicall:"0x2dc0e2aa608532da689e89e237df582b783e552c",poolDataQueries:"0x6B5dA774890Db7B7b96C6f44e6a4b0F657399E2e",gyroConfigProxy:"0x32acb44fc929339b9f16f0449525cc590d2a23f3",...Pn[Pe.OPTIMISM].contracts},tokens:{bal:"0xfe8b128ba8c78aabc59d4c64cee7ff28e9379921",wrappedNativeAsset:Pn[Pe.OPTIMISM].contracts.weth,lbpRaisingTokens:["0xda10009cbd5d07dd0cecc66161fc93d7c9000da1","0x7f5c764cbc14f9669b88837ca1490cca17c31607","0x4200000000000000000000000000000000000006"],...Pn[Pe.OPTIMISM].tokens}},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"optimistic-ethereum"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-optimism",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-optimism",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/lyra-finance/optimism-mainnet-blocks"},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0x4200000000000000000000000000000000000006"}]},[Pe.GNOSIS]:{chainId:Pe.GNOSIS,addresses:{contracts:{multicall:"0xbb6fab6b627947dae0a75808250d8b2652952cb5",poolDataQueries:"0x3f170631ed9821Ca51A59D996aB095162438DC10",...Pn[Pe.GNOSIS].contracts},tokens:{wrappedNativeAsset:Pn[Pe.GNOSIS].contracts.weth,bal:Pn[Pe.GNOSIS].contracts.bal,...Pn[Pe.GNOSIS].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gnosis-chain-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-gnosis-chain"},thirdParty:{coingecko:{nativeAssetId:"xdai",platformId:"xdai"}},averageBlockTime:5,pools:{},sorConnectingTokens:[{symbol:"weth",address:"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"},{symbol:"wsEth",address:"0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6"}],sorTriPathMidPoolIds:["0xeb30c85cc528537f5350cf5684ce6a4538e13394000200000000000000000059","0x7644fa5d0ea14fcf3e813fdf93ca9544f8567655000000000000000000000066"]},[Pe.FANTOM]:{chainId:Pe.FANTOM,addresses:{contracts:{vault:"0x20dd72Ed959b6147912C2e529F0a0C651c33c9ce",multicall:"0x66335d7ad8011f6aa3f48aadcb523b62b38ed961",poolDataQueries:"0xb132F1E145DcC085980C531e2dA81f2b84efc14F",gaugeClaimHelper:"0x0000000000000000000000000000000000000000",balancerRelayer:"0x419f7925b8c9e409b6ee8792242556fa210a7a09",balancerHelpers:"0xfE18C7C70b0a2c6541bEde0367124278BC345Dc8",weightedPoolFactory:"0x60467cb225092cE0c989361934311175f437Cf53",composableStablePoolFactory:"0x44814E3A603bb7F1198617995c5696C232F6e8Ed",yearnLinearPoolFactory:"0x1f73ae6ed391a2b1e84ff988a1bb5394b78a4a71"},tokens:{bal:"0xF24Bcf4d1e507740041C9cFd2DddB29585aDCe1e",wrappedNativeAsset:"0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",lbpRaisingTokens:["0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83","0x04068DA6C83AFCFA0e13ba15A6696662335D5B75","0x8D11eC38a3EB5E956B052f67Da8Bdc9bef8Abf3E"]}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-v2-fantom",gaugesSubgraph:"",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/beethovenxfi/fantom-blocks"},thirdParty:{coingecko:{nativeAssetId:"ftm",platformId:"fantom"}},pools:{},poolsToIgnore:[],sorConnectingTokens:[{symbol:"wftm",address:"0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83"}]},[Pe.SEPOLIA]:{chainId:Pe.SEPOLIA,addresses:{contracts:{multicall:"0xcA11bde05977b3631167028862bE2a173976CA11",poolDataQueries:"0x9805dcfD25e6De36bad8fe9D3Fe2c9b44B764102",...Pn[Pe.SEPOLIA].contracts},tokens:{bal:Pn[Pe.SEPOLIA].contracts.bal,wrappedNativeAsset:Pn[Pe.SEPOLIA].contracts.weth,...Pn[Pe.SEPOLIA].tokens}},urls:{subgraph:"https://api.studio.thegraph.com/query/24660/balancer-sepolia-v2/version/latest"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"ethereum"}},pools:{},poolsToIgnore:[],sorConnectingTokens:[]},[Pe.ZKEVM]:{chainId:Pe.ZKEVM,addresses:{contracts:{balancerMinter:"0x475D18169BE8a89357A9ee3Ab00ca386d20fA229",multicall:"0xcA11bde05977b3631167028862bE2a173976CA11",poolDataQueries:"0xF24917fB88261a37Cc57F686eBC831a5c0B9fD39",...Pn[Pe.ZKEVM].contracts},tokens:{bal:Pn[Pe.ZKEVM].contracts.bal,wrappedNativeAsset:Pn[Pe.ZKEVM].contracts.weth,...Pn[Pe.ZKEVM].tokens}},urls:{subgraph:"https://api.studio.thegraph.com/query/24660/balancer-polygon-zk-v2/version/latest",gaugesSubgraph:"https://api.studio.thegraph.com/query/24660/balancer-gauges-polygon-zk/version/latest"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"polygon-zkevm"}},averageBlockTime:4,multicallBatchSize:128,pools:{},poolsToIgnore:[],sorConnectingTokens:[{symbol:"weth",address:"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9"},{symbol:"wsEth",address:"0x5D8cfF95D7A57c0BF50B30b43c7CC0D52825D4a9"}]},[Pe.AVALANCHE]:{chainId:Pe.AVALANCHE,addresses:{contracts:{balancerMinter:"0xEa924b45a3fcDAAdf4E5cFB1665823B8F8F2039B",multicall:"0xcA11bde05977b3631167028862bE2a173976CA11",poolDataQueries:"0x67af5D428d38C5176a286a2371Df691cDD914Fb8",...Pn[Pe.AVALANCHE].contracts},tokens:{bal:Pn[Pe.AVALANCHE].contracts.bal,wrappedNativeAsset:Pn[Pe.AVALANCHE].contracts.weth,...Pn[Pe.AVALANCHE].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-avalanche-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-avalanche",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/iliaazhel/avalanche-blocks"},thirdParty:{coingecko:{nativeAssetId:"avalanche-2",platformId:"avalanche"}},pools:{},poolsToIgnore:[],sorConnectingTokens:[{symbol:"WAVAX",address:"0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7"},{symbol:"sAVAX",address:"0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be"}]},[Pe.BASE]:{chainId:Pe.BASE,addresses:{contracts:{balancerMinter:"0xc7E5ED1054A24Ef31D827E6F86caA58B3Bc168d7",multicall:"0xcA11bde05977b3631167028862bE2a173976CA11",poolDataQueries:"",...Pn[Pe.BASE].contracts},tokens:{bal:Pn[Pe.BASE].contracts.bal,wrappedNativeAsset:Pn[Pe.BASE].contracts.weth,...Pn[Pe.BASE].tokens}},urls:{subgraph:"https://api.studio.thegraph.com/query/24660/balancer-base-v2/version/latest",gaugesSubgraph:"https://api.studio.thegraph.com/query/24660/balancer-gauges-base/version/latest",blockNumberSubgraph:"https://api.studio.thegraph.com/query/48427/bleu-base-blocks/version/latest"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"base"}},averageBlockTime:2,pools:{},poolsToIgnore:[],sorConnectingTokens:[{symbol:"weth",address:"0x4200000000000000000000000000000000000006"}],sorTriPathMidPoolIds:["0x2db50a0e0310723ef0c2a165cb9a9f80d772ba2f00020000000000000000000d"]}},En=e=>xn[e].addresses;var An;!function(e){e.ABOVE_MAX_TOKENS="ABOVE_MAX_TOKENS",e.BELOW_MIN_TOKENS="BELOW_MIN_TOKENS",e.EXIT_DELTA_AMOUNTS="EXIT_DELTA_AMOUNTS",e.FEE_PROVIDER_NOT_PROVIDED="FEE_PROVIDER_NOT_PROVIDED",e.GAUGES_HELPER_ADDRESS_NOT_PROVIDED="GAUGES_HELPER_ADDRESS_NOT_PROVIDED",e.GAUGES_NOT_FOUND="GAUGES_NOT_FOUND",e.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED="GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED",e.GAUGES_REWARD_TOKEN_EMPTY="GAUGES_REWARD_TOKEN_EMPTY",e.ILLEGAL_PARAMETER="ILLEGAL_PARAMETER",e.INTERNAL_ERROR_INVALID_ABI="INTERNAL_ERROR_INVALID_ABI",e.INPUT_LENGTH_MISMATCH="INPUT_LENGTH_MISMATCH",e.INPUT_OUT_OF_BOUNDS="INPUT_OUT_OF_BOUNDS",e.INPUT_TOKEN_INVALID="INPUT_TOKEN_INVALID",e.INVALID_PROTOCOL_ID="INVALID_PROTOCOL_ID",e.INVALID_SWAP_FEE_PERCENTAGE="INVALID_SWAP_FEE_PERCENTAGE",e.INVALID_WEIGHTS="INVALID_WEIGHTS",e.JOIN_DELTA_AMOUNTS="JOIN_DELTA_AMOUNTS",e.JOIN_WITH_ZERO_AMOUNT="JOIN_WITH_ZERO_AMOUNT",e.MISSING_AMP="MISSING_AMP",e.MISSING_DECIMALS="MISSING_DECIMALS",e.MISSING_PRICE_RATE="MISSING_PRICE_RATE",e.MISSING_TOKENS="MISSING_TOKENS",e.MISSING_WEIGHT="MISSING_WEIGHT",e.NO_POOL_DATA="NO_POOL_DATA",e.NO_VALUE_PARAMETER="NO_VALUE_PARAMETER",e.POOL_DOESNT_EXIST="POOL_DOESNT_EXIST",e.QUERY_BATCH_SWAP="QUERY_BATCH_SWAP",e.RELAY_SWAP_AMOUNTS="RELAY_SWAP_AMOUNTS",e.REWARD_TOKEN_ZERO="REWARD_TOKEN_ZERO",e.TIMESTAMP_IN_THE_FUTURE="TIMESTAMP_IN_THE_FUTURE",e.TOKEN_MISMATCH="TOKEN_MISMATCH",e.UNSUPPORTED_PAIR="UNSUPPORTED_PAIR",e.UNSUPPORTED_POOL_TYPE="UNSUPPORTED_POOL_TYPE",e.UNSUPPORTED_POOL_TYPE_VERSION="UNSUPPORTED_POOL_TYPE_VERSION"}(An||(An={}));class vn extends Error{constructor(e){super(vn.getMessage(e)),this.code=e,this.name="BalancerError"}static getMessage(e){switch(e){case An.ABOVE_MAX_TOKENS:return"the array contains more tokens than the maximum allowed";case An.BELOW_MIN_TOKENS:return"the array does not contain the minimum quantity of tokens";case An.EXIT_DELTA_AMOUNTS:return"Error when checking exit call deltas";case An.FEE_PROVIDER_NOT_PROVIDED:return"Fee Provider Repository has not been provided";case An.GAUGES_HELPER_ADDRESS_NOT_PROVIDED:return"Liquidity Gauges Helper Contract address has not been provided";case An.GAUGES_NOT_FOUND:return"Liquidity Gauges not found with given addresses";case An.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED:return"Liquidity Gauges Reward Minter Contract address has not been provided";case An.GAUGES_REWARD_TOKEN_EMPTY:return"No Reward Tokens for Liquidity Gauges provided";case An.INPUT_LENGTH_MISMATCH:return"input length mismatch";case An.INPUT_OUT_OF_BOUNDS:return"input out of bounds";case An.INPUT_TOKEN_INVALID:return"input token invalid";case An.INVALID_PROTOCOL_ID:return"The provided protocol id does not correspond to a protocol";case An.INVALID_SWAP_FEE_PERCENTAGE:return"The swap fee needs to be greater than zero and less than 1e17(10%)";case An.INVALID_WEIGHTS:return"The sum of the weights needs to be equal to 1e18(100%)";case An.JOIN_DELTA_AMOUNTS:return"Error when checking join call deltas";case An.JOIN_WITH_ZERO_AMOUNT:return"Cant join pool with 0 amount of token in";case An.MISSING_AMP:return"missing amp";case An.MISSING_DECIMALS:return"missing decimals";case An.MISSING_PRICE_RATE:return"missing price rate";case An.MISSING_TOKENS:return"missing tokens";case An.MISSING_WEIGHT:return"missing weight";case An.NO_POOL_DATA:return"no pool data";case An.NO_VALUE_PARAMETER:return"Illegal value passed as parameter";case An.POOL_DOESNT_EXIST:return"balancer pool does not exist";case An.RELAY_SWAP_AMOUNTS:return"Error when checking swap amounts";case An.REWARD_TOKEN_ZERO:return"All Zero Values for Reward Tokens";case An.TIMESTAMP_IN_THE_FUTURE:return"Timestamp cannot be in the future";case An.TOKEN_MISMATCH:return"token mismatch";case An.UNSUPPORTED_PAIR:return"unsupported token pair";case An.UNSUPPORTED_POOL_TYPE:return"unsupported pool type";default:return"Unknown error"}}}function Sn(e,t,a){return a?function(e,t){const a=Je-et.divDownFixed(e,t);return a<0?BigInt(0):a}(e,t):function(e,t){const a=et.divDownFixed(e,t)-Je;return a<0?BigInt(0):a}(e,t)}const kn=BigInt(1e3);function On(e,t,a,n){const o=t.length,i=function(e,t,a){let n=He;const o=t.length;for(let e=0;ei){if(s-i<=1)return s}else if(i-s<=1)return s}throw new Error("Errors.STABLE_INVARIANT_DIDNT_CONVERGE")}(e,t,!0);let s=He,r=i/BigInt(o);for(let e=0;e{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:s,pool:t,shouldUnwrapNativeAsset:o});const p=this.sortValuesExitExactBptIn({pool:t,wrappedNativeAsset:i,shouldUnwrapNativeAsset:o,singleTokenOut:s}),{minAmountsOut:d,expectedAmountsOut:l}=p.singleTokenOutIndex>=0?this.calcTokenOutGivenExactBptIn({...p,bptIn:a,slippage:n}):this.calcTokensOutGivenExactBptIn({...p,bptIn:a,slippage:n}),u=p.singleTokenOutIndex>=0?re.exitExactBPTInForOneTokenOut(a,p.singleTokenOutIndex):re.exitExactBPTInForTokensOut(a),c=this.encodeExitPool({poolTokens:p.poolTokens,poolId:t.id,exiter:e,minAmountsOut:d,userData:u,toInternalBalance:r}),y=(new Mn).calcPriceImpact(t,l.map(BigInt),BigInt(a),!1);return{...c,expectedAmountsOut:l,minAmountsOut:d,priceImpact:y}},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{this.checkInputsExactTokensOut(n,a,t);const r=this.sortValuesExitExactTokensOut({pool:t,wrappedNativeAsset:i,amountsOut:n,tokensOut:a}),{expectedBPTIn:p,maxBPTIn:d}=this.calcBptInGivenExactTokensOut({...r,slippage:o}),{downScaledAmountsOut:l,poolTokens:u}=r,c=re.exitBPTInForExactTokensOut(l,d);return{...this.encodeExitPool({poolId:t.id,userData:c,poolTokens:u,minAmountsOut:l,exiter:e,toInternalBalance:s}),expectedBPTIn:p,maxBPTIn:d,priceImpact:(new Mn).calcPriceImpact(t,l.map(BigInt),BigInt(p),!1)}},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:void 0,pool:t,shouldUnwrapNativeAsset:!1});const i=nt(t),{minAmountsOut:s,expectedAmountsOut:r}=this.calcTokensOutGivenExactBptIn({...i,singleTokenOutIndex:-1,bptIn:a,slippage:n}),p=se.recoveryModeExit(a),d=this.encodeExitPool({poolTokens:i.poolTokens,poolId:t.id,exiter:e,minAmountsOut:s,userData:p,toInternalBalance:o}),l=(new Mn).calcPriceImpact(t,r.map(BigInt),BigInt(a),!1);return{...d,expectedAmountsOut:r,minAmountsOut:s,priceImpact:l}},this.checkInputsExactBPTIn=({bptIn:e,singleTokenOut:t,pool:a,shouldUnwrapNativeAsset:n})=>{if(!e.length||d(e,18).isNegative())throw new vn(An.INPUT_OUT_OF_BOUNDS);if(t&&t!==o&&!a.tokens.map((e=>e.address)).some((e=>Vt(e,t))))throw new vn(An.TOKEN_MISMATCH);if(!n&&t===o)throw new Error("shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values");if(a.tokens.some((e=>void 0===e.decimals)))throw new vn(An.MISSING_DECIMALS);if(!a.amp)throw new vn(An.MISSING_AMP)},this.checkInputsExactTokensOut=(e,t,a)=>{if(t.length!=e.length||t.length!=a.tokensList.length)throw new vn(An.INPUT_LENGTH_MISMATCH);if(a.tokens.some((e=>void 0===e.decimals)))throw new vn(An.MISSING_DECIMALS);if(!a.amp)throw new vn(An.MISSING_AMP)},this.sortValuesExitExactBptIn=({pool:e,wrappedNativeAsset:t,shouldUnwrapNativeAsset:a,singleTokenOut:n})=>{const o=nt(e,t,a),{poolTokens:i}=o;let s=-1;return n&&(s=i.indexOf(n)),{...o,singleTokenOutIndex:s}},this.sortValuesExitExactTokensOut=({pool:e,wrappedNativeAsset:t,amountsOut:a,tokensOut:n})=>{const i=n.some((e=>e===o)),s=nt(e,t,i),{scalingFactors:r}=s,p=new Le(t),[,d]=p.sortTokens(n,a),l=ze(d.map((e=>BigInt(e))),r.map((e=>BigInt(e))));return{...s,upScaledAmountsOut:l,downScaledAmountsOut:d}},this.calcTokenOutGivenExactBptIn=({poolTokens:e,ampWithPrecision:t,upScaledBalances:a,totalSharesEvm:n,swapFeeEvm:o,singleTokenOutIndex:i,bptIn:s,slippage:r,scalingFactors:d})=>{const l=M.StableMathBigInt._calcTokenOutGivenExactBptIn(t,a,i,BigInt(s),n,o).toString(),u=Ze(BigInt(l)-BigInt(1),d[i]).toString(),c=Array(e.length).fill("0"),y=Array(e.length).fill("0");return c[i]=u,y[i]=Dt(p.from(u),p.from(r)).toString(),{minAmountsOut:y,expectedAmountsOut:c}},this.calcTokensOutGivenExactBptIn=({upScaledBalances:e,totalSharesEvm:t,scalingFactors:a,bptIn:n,slippage:o})=>{const i=Qe(M.StableMathBigInt._calcTokensOutGivenExactBptIn(e,BigInt(n),t),a),s=i.map((e=>e.toString()));return{minAmountsOut:i.map((e=>Dt(p.from(e),p.from(o)).toString())),expectedAmountsOut:s}},this.calcBptInGivenExactTokensOut=({ampWithPrecision:e,upScaledBalances:t,upScaledAmountsOut:a,totalSharesEvm:n,swapFeeEvm:o,slippage:i})=>{const s=M.StableMathBigInt._calcBptInGivenExactTokensOut(e,t,a,n,o).toString();return{maxBPTIn:Ut(p.from(s),p.from(i)).toString(),expectedBPTIn:s}},this.encodeExitPool=({poolId:e,exiter:t,poolTokens:a,minAmountsOut:n,userData:o,toInternalBalance:i})=>{const s=wn,r="exitPool",p={poolId:e,sender:t,recipient:t,exitPoolRequest:{assets:a,minAmountsOut:n,userData:o,toInternalBalance:i}};return{data:nn.createInterface().encodeFunctionData(r,[p.poolId,p.sender,p.recipient,p.exitPoolRequest]),to:s,functionName:r,attributes:p}}}}class Fn{constructor(){this.buildJoin=({joiner:e,pool:t,tokensIn:a,amountsIn:n,slippage:o,wrappedNativeAsset:i})=>{this.checkInputs(a,n,t);const s=this.sortValues({pool:t,wrappedNativeAsset:i,tokensIn:a,amountsIn:n}),{expectedBPTOut:r,minBPTOut:p}=this.calcBptOutGivenExactTokensIn({...s,slippage:o});return{...this.encodeJoinPool({joiner:e,amountsIn:n,tokensIn:a,poolId:t.id,minBPTOut:p,...s}),minBPTOut:p,expectedBPTOut:r,priceImpact:(new Mn).calcPriceImpact(t,s.sortedAmountsIn.map(BigInt),BigInt(r),!0)}},this.checkInputs=(e,t,a)=>{if(t.length!=e.length||t.length!=a.tokensList.length)throw new vn(An.INPUT_LENGTH_MISMATCH);if(a.tokens.some((e=>void 0===e.decimals)))throw new vn(An.MISSING_DECIMALS);if(!a.amp)throw new vn(An.MISSING_AMP)},this.sortValues=({pool:e,wrappedNativeAsset:t,amountsIn:a,tokensIn:n})=>{const{poolTokens:i,ampWithPrecision:s,totalSharesEvm:r,swapFeeEvm:p,scalingFactors:d,upScaledBalances:l}=nt(e,t,n.includes(o)),u=new Le(t),[,c]=u.sortTokens(n,a);return{poolTokens:i,ampWithPrecision:s,totalSharesEvm:r,swapFeeEvm:p,upScaledBalances:l,upScaledAmountsIn:ze(c.map((e=>BigInt(e))),d.map((e=>BigInt(e)))),sortedAmountsIn:c}},this.calcBptOutGivenExactTokensIn=({ampWithPrecision:e,upScaledBalances:t,upScaledAmountsIn:a,totalSharesEvm:n,swapFeeEvm:o,slippage:i})=>{const s=M.StableMathBigInt._calcBptOutGivenExactTokensIn(e,t,a,n,o).toString();return{expectedBPTOut:s,minBPTOut:Dt(p.from(s),p.from(i)).toString()}},this.encodeJoinPool=({poolId:e,joiner:t,poolTokens:a,sortedAmountsIn:n,amountsIn:o,tokensIn:i,minBPTOut:s})=>{const r=re.joinExactTokensInForBPTOut(n,s),p=wn,d="joinPool",l={poolId:e,sender:t,recipient:t,joinPoolRequest:{assets:a,maxAmountsIn:n,userData:r,fromInternalBalance:!1}};return{attributes:l,data:nn.createInterface().encodeFunctionData(d,[l.poolId,l.sender,l.recipient,l.joinPoolRequest]),functionName:d,to:p,value:kt(i,o)}}}}class Bn{calcTotal(e){var t,a;let n=p.from(0),o=p.from(0);for(let a=0;a{this.checkInputs(a,n,t.tokensList);const s=this.sortValuesBasedOnPoolVersion({pool:t,wrappedNativeAsset:i,amountsIn:n,tokensIn:a}),r=this.buildExactTokensInForBPTOut({...s,slippage:o,joiner:e,poolId:t.id}),p=kt(a,n),d=(new Mn).calcPriceImpact(t,s.sortedAmountsIn.map(BigInt),BigInt(r.expectedBPTOut),!0);return{...r,to:wn,value:p,priceImpact:d}}}sortValuesBasedOnPoolVersion({pool:e,wrappedNativeAsset:t,amountsIn:a,tokensIn:n}){return this.sortV1(t,n,a,e)}checkInputs(e,t,a){if(e.length!=t.length||e.length!=a.length-1)throw new vn(An.INPUT_LENGTH_MISMATCH)}encodeUserDataExactTokensInForBPTOut(e,t,a){const n=Dt(p.from(e),p.from(t)).toString();return{userData:be.joinExactTokensInForBPTOut(a,n),minBPTOut:n}}encodeJoinPool(e,t,a,n,o,i){const s="joinPool",r={poolId:e,sender:t,recipient:a,joinPoolRequest:{assets:n,maxAmountsIn:i,userData:o,fromInternalBalance:!1}};return{functionName:s,attributes:r,data:nn.createInterface().encodeFunctionData(s,[r.poolId,r.sender,r.recipient,r.joinPoolRequest])}}sortV1(e,t,a,n){const i=new Le(e),[,s]=i.sortTokens(t,a),{poolTokens:r,ampWithPrecision:p,swapFeeEvm:d,totalSharesEvm:l,bptIndex:u,scalingFactorsWithoutBpt:c,upScaledBalancesWithoutBpt:y}=nt(n,e,t.includes(o));return{sortedAmountsIn:s,scalingFactorsWithoutBpt:c,upScaledBalancesWithoutBpt:y,ampWithPrecision:p,totalSharesEvm:l,swapFeeEvm:d,bptIndex:u,poolTokens:r}}buildExactTokensInForBPTOut(e){const{sortedAmountsIn:t,scalingFactorsWithoutBpt:a,upScaledBalancesWithoutBpt:n,ampWithPrecision:o,totalSharesEvm:i,swapFeeEvm:s,bptIndex:r,poolTokens:p,slippage:d,poolId:l,joiner:u}=e,c=this.calcBptOutGivenExactTokensIn(t,a,n,o,i,s),y=this.encodeUserDataExactTokensInForBPTOut(c,d,t),{functionName:b,data:m,attributes:f}=this.encodeJoinPool(l,u,u,p,y.userData,qt(t,r,"0"));return{functionName:b,data:m,attributes:f,minBPTOut:y.minBPTOut,expectedBPTOut:c.toString()}}calcBptOutGivenExactTokensIn(e,t,a,n,o,i){const s=ze(e.map(BigInt),t.map(BigInt));return R._calcBptOutGivenExactTokensIn(n,a,s,o,i)}sortV4(e,t,a){const{poolTokens:n,poolTokensWithoutBpt:o,ampWithPrecision:i,swapFeeEvm:s,totalSharesEvm:r,scalingFactorsWithoutBpt:p,upScaledBalancesWithoutBpt:d}=nt(a),[l]=$t(o,e,t);return{sortedAmountsIn:l,scalingFactorsWithoutBpt:p,upScaledBalancesWithoutBpt:d,ampWithPrecision:i,totalSharesEvm:r,swapFeeEvm:s,bptIndex:0,poolTokens:n}}}class Un{constructor(){this.buildExitExactBPTIn=({exiter:e,pool:t,bptIn:a,slippage:n,shouldUnwrapNativeAsset:o,wrappedNativeAsset:i,singleTokenOut:s,toInternalBalance:r})=>{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:s,pool:t,shouldUnwrapNativeAsset:o});const p=this.sortValuesExitExactBptIn({pool:t,wrappedNativeAsset:i,shouldUnwrapNativeAsset:o,singleTokenOut:s}),{minAmountsOut:d,expectedAmountsOut:l}=p.singleTokenOutIndexWithoutBpt>=0?this.calcTokenOutGivenExactBptIn({...p,bptIn:a,slippage:n}):this.calcTokensOutGivenExactBptIn({...p,bptIn:a,slippage:n}),u=p.singleTokenOutIndexWithoutBpt>=0?be.exitExactBPTInForOneTokenOut(a,p.singleTokenOutIndexWithoutBpt):be.exitExactBPTInForAllTokensOut(a),c=qt(d,p.bptIndex,"0"),y=this.encodeExitPool({poolTokens:p.poolTokens,poolId:t.id,exiter:e,userData:u,minAmountsOut:c,toInternalBalance:r}),b=(new Mn).calcPriceImpact(t,l.map(BigInt),BigInt(a),!1);return{...y,expectedAmountsOut:l,minAmountsOut:d,priceImpact:b}},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{this.checkInputsExactTokensOut(a,n,t);const r=this.sortValuesExitExactTokensOut({pool:t,wrappedNativeAsset:i,amountsOut:n,tokensOut:a}),{bptIn:p,maxBPTIn:d}=this.calcBptInGivenExactTokensOut({...r,slippage:o}),l=be.exitBPTInForExactTokensOut(r.downscaledAmountsOutWithoutBpt,d);return{...this.encodeExitPool({poolTokens:r.poolTokens,minAmountsOut:r.downscaledAmountsOutWithBpt,userData:l,exiter:e,poolId:t.id,toInternalBalance:s}),maxBPTIn:d,expectedBPTIn:p,priceImpact:(new Mn).calcPriceImpact(t,r.downscaledAmountsOutWithoutBpt.map(BigInt),BigInt(p),!1)}},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{this.checkInputsRecoveryExit({bptIn:a,pool:t}),t.tokens.forEach((e=>e.priceRate="1"));const i=nt(t),{minAmountsOut:s,expectedAmountsOut:r}=this.calcTokensOutGivenExactBptIn({...i,bptIn:a,slippage:n}),p=se.recoveryModeExit(a),d=qt(s,i.bptIndex,"0"),l=this.encodeExitPool({poolTokens:i.poolTokens,poolId:t.id,exiter:e,userData:p,minAmountsOut:d,toInternalBalance:o}),u=(new Mn).calcPriceImpact(t,r.map(BigInt),BigInt(a),!1);return{...l,expectedAmountsOut:r,minAmountsOut:s,priceImpact:u}},this.checkInputsExactBPTIn=({bptIn:e,singleTokenOut:t,pool:a,shouldUnwrapNativeAsset:n})=>{if(p.from(e).lte(0))throw new vn(An.INPUT_OUT_OF_BOUNDS);if(!t&&a.poolTypeVersion<2)throw new Error("Unsupported Exit Type For Pool");if(t&&t!==o&&!a.tokens.map((e=>e.address)).some((e=>Vt(e,t))))throw new vn(An.TOKEN_MISMATCH);if(!n&&t===o)throw new Error("shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values");if(a.tokens.some((e=>void 0===e.decimals)))throw new vn(An.MISSING_DECIMALS);if(!a.amp)throw new vn(An.MISSING_AMP)},this.checkInputsExactTokensOut=(e,t,a)=>{if(e.length!=t.length||e.length!=a.tokensList.length-1)throw new vn(An.INPUT_LENGTH_MISMATCH)},this.checkInputsRecoveryExit=({bptIn:e,pool:t})=>{if(p.from(e).lte(0))throw new vn(An.INPUT_OUT_OF_BOUNDS);if(!t.isInRecoveryMode)throw new Error("Exit type not supported because pool is not in Recovery Mode");if(t.tokens.some((e=>void 0===e.decimals)))throw new vn(An.MISSING_DECIMALS);if(!t.amp)throw new vn(An.MISSING_AMP)},this.sortValuesExitExactBptIn=({pool:e,singleTokenOut:t,wrappedNativeAsset:a,shouldUnwrapNativeAsset:n})=>{const o=nt(e,a,n);let i=-1;return t&&(i=o.poolTokensWithoutBpt.indexOf(t)),{...o,singleTokenOutIndexWithoutBpt:i}},this.sortValuesExitExactTokensOut=({pool:e,wrappedNativeAsset:t,amountsOut:a,tokensOut:n})=>{const i=n.some((e=>e===o)),s=nt(e,t,i),r=new Le(t),[,d]=r.sortTokens(n,a),l=qt(d,s.bptIndex,"0").map((e=>{const t=p.from(e);return t.isZero()?e:t.sub(1).toString()})),u=ze(d.map((e=>BigInt(e))),s.scalingFactorsWithoutBpt);return{...s,upScaledAmountsOutWithoutBpt:u,downscaledAmountsOutWithBpt:l,downscaledAmountsOutWithoutBpt:d}},this.calcTokenOutGivenExactBptIn=({ampWithPrecision:e,upScaledBalancesWithoutBpt:t,singleTokenOutIndexWithoutBpt:a,scalingFactorsWithoutBpt:n,totalSharesEvm:o,swapFeeEvm:i,bptIn:s,slippage:r})=>{const d=M.StableMathBigInt._calcTokenOutGivenExactBptIn(e,t,a,BigInt(s),o,i),l=Array(t.length).fill("0"),u=Array(t.length).fill("0"),c=Ze(d,n[a]);return l[a]=c.toString(),u[a]=Dt(p.from(c),p.from(r)).toString(),{minAmountsOut:u,expectedAmountsOut:l}},this.calcTokensOutGivenExactBptIn=({upScaledBalancesWithoutBpt:e,totalSharesEvm:t,scalingFactorsWithoutBpt:a,bptIn:n,slippage:o})=>{const i=Qe(M.StableMathBigInt._calcTokensOutGivenExactBptIn(e,BigInt(n),t),a),s=i.map((e=>e.toString()));return{minAmountsOut:i.map((e=>Dt(p.from(e),p.from(o)).toString())),expectedAmountsOut:s}},this.calcBptInGivenExactTokensOut=({ampWithPrecision:e,upScaledBalancesWithoutBpt:t,upScaledAmountsOutWithoutBpt:a,totalSharesEvm:n,swapFeeEvm:o,slippage:i})=>{const s=M.StableMathBigInt._calcBptInGivenExactTokensOut(e,t,a,n,o).toString();return{bptIn:s,maxBPTIn:Ut(p.from(s),p.from(i)).toString()}},this.encodeExitPool=e=>{const{exiter:t,poolId:a,minAmountsOut:n,userData:o,poolTokens:i,toInternalBalance:s}=e,r="exitPool",p={poolId:a,sender:t,recipient:t,exitPoolRequest:{assets:i,minAmountsOut:n,userData:o,toInternalBalance:s}};return{to:wn,functionName:r,attributes:p,data:nn.createInterface().encodeFunctionData(r,[p.poolId,p.sender,p.recipient,p.exitPoolRequest])}}}}class Vn{constructor(e=new Un,t=new Bn,a=new Ln,n=new Mn,o=new Dn){this.exit=e,this.liquidity=t,this.spotPriceCalculator=a,this.priceImpactCalculator=n,this.join=o}}class qn{bptZeroPriceImpact(e,t){if(t.length!==e.tokensList.length)throw new vn(An.INPUT_LENGTH_MISMATCH);const{scalingFactorsRaw:a,totalSharesEvm:n,upScaledBalances:o,weights:i}=nt(e);let s=He;for(let e=0;e{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:s,pool:t,shouldUnwrapNativeAsset:o});const p=this.sortValuesExitExactBptIn({pool:t,wrappedNativeAsset:i,shouldUnwrapNativeAsset:o,singleTokenOut:s}),{minAmountsOut:d,expectedAmountsOut:l}=p.singleTokenOutIndex>=0?this.calcTokenOutGivenExactBptIn({...p,bptIn:a,slippage:n}):this.calcTokensOutGivenExactBptIn({...p,bptIn:a,slippage:n}),u=p.singleTokenOutIndex>=0?pe.exitExactBPTInForOneTokenOut(a,p.singleTokenOutIndex):pe.exitExactBPTInForTokensOut(a),c=this.encodeExitPool({poolTokens:p.poolTokens,poolId:t.id,exiter:e,minAmountsOut:d,userData:u,toInternalBalance:r}),y=(new qn).calcPriceImpact(t,l.map(BigInt),BigInt(a),!1);return{...c,expectedAmountsOut:l,minAmountsOut:d,priceImpact:y}},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{this.checkInputsExactTokensOut(n,a,t);const r=this.sortValuesExitExactTokensOut({pool:t,wrappedNativeAsset:i,amountsOut:n,tokensOut:a}),{expectedBPTIn:p,maxBPTIn:d}=this.calcBptInGivenExactTokensOut({...r,slippage:o}),{downScaledAmountsOut:l,poolTokens:u}=r,c=pe.exitBPTInForExactTokensOut(l,d);return{...this.encodeExitPool({poolId:t.id,userData:c,poolTokens:u,minAmountsOut:l,exiter:e,toInternalBalance:s}),expectedBPTIn:p,maxBPTIn:d,priceImpact:(new qn).calcPriceImpact(t,l.map(BigInt),BigInt(p),!1)}},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:void 0,pool:t,shouldUnwrapNativeAsset:!1}),t.tokens.forEach((e=>e.priceRate="1"));const i=nt(t),{minAmountsOut:s,expectedAmountsOut:r}=this.calcTokensOutGivenExactBptIn({...i,bptIn:a,slippage:n,singleTokenOutIndex:-1}),p=se.recoveryModeExit(a),d=this.encodeExitPool({poolTokens:i.poolTokens,poolId:t.id,exiter:e,minAmountsOut:s,userData:p,toInternalBalance:o}),l=(new qn).calcPriceImpact(t,r.map(BigInt),BigInt(a),!1);return{...d,expectedAmountsOut:r,minAmountsOut:s,priceImpact:l}},this.checkInputsExactBPTIn=({bptIn:e,singleTokenOut:t,pool:a,shouldUnwrapNativeAsset:n})=>{if(!e.length||d(e,18).isNegative())throw new vn(An.INPUT_OUT_OF_BOUNDS);if(t&&t!==o&&!a.tokens.map((e=>e.address)).some((e=>Vt(e,t))))throw new vn(An.TOKEN_MISMATCH);if(!n&&t===o)throw new Error("shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values");if(a.tokens.some((e=>void 0===e.decimals)))throw new vn(An.MISSING_DECIMALS)},this.checkInputsExactTokensOut=(e,t,a)=>{if(t.length!=e.length||t.length!=a.tokensList.length)throw new vn(An.INPUT_LENGTH_MISMATCH);if(a.tokens.some((e=>void 0===e.decimals)))throw new vn(An.MISSING_DECIMALS)},this.sortValuesExitExactBptIn=({pool:e,wrappedNativeAsset:t,shouldUnwrapNativeAsset:a,singleTokenOut:n})=>{const o=nt(e,t,a),{poolTokens:i}=o;let s=-1;return n&&(s=i.indexOf(n.toLowerCase())),{...o,singleTokenOutIndex:s}},this.sortValuesExitExactTokensOut=({pool:e,wrappedNativeAsset:t,amountsOut:a,tokensOut:n})=>{const i=n.some((e=>e===o)),s=nt(e,t,i),{scalingFactors:r}=s,p=new Le(t),[,d]=p.sortTokens(n,a),l=ze(d.map((e=>BigInt(e))),r.map((e=>BigInt(e))));return{...s,upScaledAmountsOut:l,downScaledAmountsOut:d}},this.calcTokenOutGivenExactBptIn=({poolTokens:e,weights:t,upScaledBalances:a,totalSharesEvm:n,swapFeeEvm:o,singleTokenOutIndex:i,bptIn:s,slippage:r,scalingFactors:d})=>{const l=M.WeightedMaths._calcTokenOutGivenExactBptIn(a[i],t[i],BigInt(s),n,o).toString(),u=Ze(BigInt(l)-BigInt(1),d[i]).toString(),c=Array(e.length).fill("0"),y=Array(e.length).fill("0");return c[i]=u,y[i]=Dt(p.from(u),p.from(r)).toString(),{minAmountsOut:y,expectedAmountsOut:c}},this.calcTokensOutGivenExactBptIn=({upScaledBalances:e,totalSharesEvm:t,scalingFactors:a,bptIn:n,slippage:o})=>{const i=Qe(M.WeightedMaths._calcTokensOutGivenExactBptIn(e,BigInt(n),t).map((e=>e.toString())).map((e=>BigInt(e))),a),s=i.map((e=>e.toString()));return{minAmountsOut:i.map((e=>Dt(p.from(e),p.from(o)).toString())),expectedAmountsOut:s}},this.calcBptInGivenExactTokensOut=({weights:e,upScaledBalances:t,upScaledAmountsOut:a,totalSharesEvm:n,swapFeeEvm:o,slippage:i})=>{const s=M.WeightedMaths._calcBptInGivenExactTokensOut(t,e,a,n,o).toString();return{maxBPTIn:Ut(p.from(s),p.from(i)).toString(),expectedBPTIn:s}},this.encodeExitPool=({poolId:e,exiter:t,poolTokens:a,minAmountsOut:n,userData:o,toInternalBalance:i})=>{const s=wn,r="exitPool",p={poolId:e,sender:t,recipient:t,exitPoolRequest:{assets:a,minAmountsOut:n,userData:o,toInternalBalance:i}};return{data:nn.createInterface().encodeFunctionData(r,[p.poolId,p.sender,p.recipient,p.exitPoolRequest]),to:s,functionName:r,attributes:p}}}}class Wn{constructor(){this.buildJoin=({joiner:e,pool:t,tokensIn:a,amountsIn:n,slippage:o,wrappedNativeAsset:i})=>{this.checkInputs(n,a,t);const s=this.sortValues({pool:t,wrappedNativeAsset:i,tokensIn:a,amountsIn:n}),{expectedBPTOut:r,minBPTOut:p}=this.calcBptOutGivenExactTokensIn({...s,slippage:o});return{...this.encodeJoinPool({...s,poolId:t.id,joiner:e,minBPTOut:p,tokensIn:a,amountsIn:n}),minBPTOut:p,expectedBPTOut:r,priceImpact:(new qn).calcPriceImpact(t,s.sortedAmountsIn.map(BigInt),BigInt(r),!0)}},this.checkInputs=(e,t,a)=>{if(e.length!=t.length||e.length!=a.tokensList.length)throw new vn(An.INPUT_LENGTH_MISMATCH);if(a.tokens.some((e=>void 0===e.decimals)))throw new vn(An.MISSING_DECIMALS);if(a.tokens.some((e=>!e.weight)))throw new vn(An.MISSING_WEIGHT)},this.sortValues=({pool:e,tokensIn:t,amountsIn:a,wrappedNativeAsset:n})=>{const i=t.some((e=>e===o)),s=nt(e,n,i),r=new Le(n),[,p]=r.sortTokens(t,a),d=ze(p.map(BigInt),s.scalingFactors);return{...s,sortedAmountsIn:p,upScaledAmountsIn:d}},this.calcBptOutGivenExactTokensIn=({upScaledBalances:e,weights:t,upScaledAmountsIn:a,totalSharesEvm:n,swapFeeEvm:o,slippage:i})=>{const s=N._calcBptOutGivenExactTokensIn(e,t,a,n,o).toString();return{expectedBPTOut:s,minBPTOut:Dt(p.from(s),p.from(i)).toString()}},this.encodeJoinPool=({sortedAmountsIn:e,poolTokens:t,poolId:a,joiner:n,minBPTOut:o,amountsIn:i,tokensIn:s})=>{const r="joinPool",p={poolId:a,sender:n,recipient:n,joinPoolRequest:{assets:t,maxAmountsIn:e,userData:pe.joinExactTokensInForBPTOut(e,o),fromInternalBalance:!1}};return{to:wn,functionName:r,data:nn.createInterface().encodeFunctionData(r,[p.poolId,p.sender,p.recipient,p.joinPoolRequest]),attributes:p,value:kt(s,i)}}}}class $n{calcTotal(e){var t;let a=p.from(0),n=p.from(0);for(let o=0;oe.add(Mt(t.weight||"0",18))),p.from(0));if(a.gt(0)){return Ct(n.mul(o).div(a),36)}return"0"}}class Hn{calcPoolSpotPrice(e,t,a){const n=e===a.address||t===a.address;if(n){const e={address:a.address,balance:a.totalShares,decimals:18,priceRate:"1",weight:"0"};a.tokens.push(e),a.tokensList.push(a.address)}const o=L.fromPool(a),i=o.parsePoolPairData(e,t),s=o._spotPriceAfterSwapExactTokenInForTokenOut(i,F).toString();return n&&(a.tokens.pop(),a.tokensList.pop()),s}}class Kn{constructor(e=new Gn,t=new Wn,a=new $n,n=new Hn,o=new qn){this.exit=e,this.join=t,this.liquidity=a,this.spotPriceCalculator=n,this.priceImpactCalculator=o}}class Jn{calcTotal(e){var t,a;let o=n,i=n;for(let a=0;a{throw new Error("Exit type not supported")},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{throw new Error("Exit type not supported")},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{throw new Error("Exit type not supported")}}}class zn{constructor(){this.buildJoin=({joiner:e,pool:t,tokensIn:a,amountsIn:n,slippage:o,wrappedNativeAsset:i})=>{throw new Error("Join type not supported")}}}class Zn{constructor(e=new jn,t=new zn,a=new Bn,n=new Ln,o=new Mn){this.exit=e,this.join=t,this.liquidity=a,this.spotPriceCalculator=n,this.priceImpactCalculator=o}}class Qn{bptZeroPriceImpact(e,t){throw new Error("Linear Pool bptZeroPriceImpact Not Implented")}calcPriceImpact(e,t,a,n){return"0"}}class eo{constructor(){this.buildExitExactBPTIn=({exiter:e,pool:t,bptIn:a,slippage:n,shouldUnwrapNativeAsset:o,wrappedNativeAsset:i,singleTokenOut:s,toInternalBalance:r})=>{throw new Error("Exit type not supported")},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{throw new Error("Exit type not supported")},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:void 0,pool:t,shouldUnwrapNativeAsset:!1}),t.tokens.forEach((e=>e.priceRate="1"));const i=nt(t),{minAmountsOut:s,expectedAmountsOut:r}=this.calcTokensOutGivenExactBptIn({...i,bptIn:a,slippage:n}),p=se.recoveryModeExit(a),d=qt(s,i.bptIndex,"0"),l=this.encodeExitPool({poolTokens:i.poolTokens,poolId:t.id,exiter:e,minAmountsOut:d,userData:p,toInternalBalance:o}),u=(new Qn).calcPriceImpact(t,r.map(BigInt),BigInt(a),!1);return{...l,expectedAmountsOut:r,minAmountsOut:s,priceImpact:u}},this.checkInputsExactBPTIn=({bptIn:e,pool:t})=>{if(p.from(e).lte(0))throw new vn(An.INPUT_OUT_OF_BOUNDS);if(t.tokens.some((e=>void 0===e.decimals)))throw new vn(An.MISSING_DECIMALS)},this.calcTokensOutGivenExactBptIn=({bptIndex:e,upScaledBalances:t,totalSharesEvm:a,scalingFactors:n,bptIn:o,slippage:i})=>{const s=Wt(Qe(M.LinearMaths._calcTokensOutGivenExactBptIn(t,BigInt(o),a,e),n),e).map((e=>e.toString()));return{minAmountsOut:s.map((e=>Dt(p.from(e),p.from(i)).toString())),expectedAmountsOut:s}},this.encodeExitPool=e=>{const{exiter:t,poolId:a,minAmountsOut:n,userData:o,poolTokens:i,toInternalBalance:s}=e,r="exitPool",p={poolId:a,sender:t,recipient:t,exitPoolRequest:{assets:i,minAmountsOut:n,userData:o,toInternalBalance:s}};return{to:wn,functionName:r,attributes:p,data:nn.createInterface().encodeFunctionData(r,[p.poolId,p.sender,p.recipient,p.exitPoolRequest])}}}}class to{constructor(){this.buildJoin=({joiner:e,pool:t,tokensIn:a,amountsIn:n,slippage:o,wrappedNativeAsset:i})=>{throw new Error("Join type not supported")}}}const ao=18,no=Mt("1",ao);class oo{calcTotal(e){var t,a;let o=n,i=n;for(let a=0;aBigInt(0)){const t=et.divDownFixed(o,n);for(let i=0;iBigInt(0)){const t=et.divDownFixed(o,n);for(let i=0;it.address!==e.address)),a=await Promise.all(t.map((async e=>{const t=await this.pools.findBy("address",e.address);if(!t)return;const a=Mt(await this.getLiquidity(t),18),n=Mt(t.totalShares,18),o=Mt(e.balance,18),i=n.eq(0)?0:a.mul(o).div(n);return{address:t.address,liquidity:i.toString()}}))),n=a.reduce(((e,t)=>e.add(t?t.liquidity:p.from(0))),p.from(0)),o=t.filter((e=>!a.find((t=>(null==t?void 0:t.address)===e.address)))),i=await Promise.all(o.map((async e=>{var t;const a=await this.tokenPrices.find(e.address);return{address:e.address,decimals:e.decimals,priceRate:e.priceRate,price:(null==a?void 0:a.usd)&&a||{usd:null===(t=e.token)||void 0===t?void 0:t.latestUSDPrice},balance:e.balance,weight:e.weight}}))),s=Mt(_o.from(e.poolType).liquidity.calcTotal(i),18);return Ct(n.add(s),18)}async getBptPrice(e){const t=await this.getLiquidity(e);return(parseFloat(t)/parseFloat(e.totalShares)).toString()}}const Po=p.from("0"),wo=e=>e?Object.keys(e).filter((t=>e[t].gt(Po))).reduce(((t,a)=>(t[a]=e[a],t)),{}):{},xo=(e,t,a)=>e.map((e=>((e,t,a)=>{if(!t[e.address]&&!a[e.address])return e;const n=wo(t[e.address]),o=wo(a[e.address]);return e.claimableTokens||(e.claimableTokens={...n,...o}),e})(e,t,a))).filter((e=>e.claimableTokens&&Object.keys(e.claimableTokens).length)),Eo=(e,t)=>{var a;if(t.rewardTokens)for(const n of Object.keys(t.rewardTokens))e[a=t.id]||(e[a]=[]),e[t.id].push(n);return e},Ao=new t(["function claim_rewards(address sender, address receiver) returns (uint256)","function claimable_tokens(address addr) view returns (uint256)","function claimable_reward(address addr, address token) view returns (uint256)"]),vo=new t(["function mintMany(address[] gauges) returns (uint256)"]),So=new t(["function getPendingRewards(address gauge, address user, address token) view returns (uint256)","function claimRewardsFromGauges(address[] gauges, address user)"]);class ko{constructor(e,t,a,n,o,i){this.multicall=n,this.liquidityGauges=e,this.feeDistributor=t,this.chainId=a,this.gaugeClaimHelperAddress=o,this.balancerMinterAddress=i}async getClaimableRewardTokens(e){const t=await this.getGauges();if(!t.length)throw new vn(An.GAUGES_NOT_FOUND);const a=t.map((e=>e.address)),n=this.getRewardTokens(t),o=await this.retrieveClaimableTokens(a,e),i=await this.retrieveClaimableRewards(n,e);return xo(t,i,o)}async buildClaimRewardTokensRequest(e,t){if(1===this.chainId||5===this.chainId){if(!this.balancerMinterAddress)throw new vn(An.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED)}else if(!this.gaugeClaimHelperAddress)throw new vn(An.GAUGES_HELPER_ADDRESS_NOT_PROVIDED);const a=(await this.getClaimableRewardTokens(t)).filter((t=>e.map((e=>e.toLowerCase())).includes(t.address.toLowerCase()))).filter((e=>e.claimableTokens&&Object.keys(e.claimableTokens).length)),n=Array.from(new Set(a.map((e=>e.claimableTokens)).map((e=>Object.keys(e||{}))).flatMap((e=>e))));if(!n.length)throw new vn(An.GAUGES_REWARD_TOKEN_EMPTY);const o=n.map((e=>a.reduce(((t,a)=>(a.claimableTokens&&a.claimableTokens[e]&&a.claimableTokens[e]!==Po&&(t=a.claimableTokens[e].add(t)),t)),p.from(0))));if(!o.length||o.every((e=>e.eq(Po))))throw new vn(An.REWARD_TOKEN_ZERO);if(1===this.chainId||5===this.chainId){if(!this.balancerMinterAddress)throw new vn(An.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED);const a=vo.encodeFunctionData("mintMany",[e]);return{to:this.balancerMinterAddress,from:t,callData:a,tokensOut:n,expectedTokensValue:o,functionName:"mintMany"}}{if(!this.gaugeClaimHelperAddress)throw new vn(An.GAUGES_HELPER_ADDRESS_NOT_PROVIDED);const a=So.encodeFunctionData("claimRewardsFromGauges",[e,t]);return{to:this.gaugeClaimHelperAddress,from:t,callData:a,tokensOut:n,expectedTokensValue:o,functionName:"claimRewardsFromGauges"}}}async getClaimableVeBalTokens(e,t){var a;if(!this.feeDistributor)throw new vn(An.FEE_PROVIDER_NOT_PROVIDED);return null===(a=this.feeDistributor)||void 0===a?void 0:a.getClaimableBalances(e,t)}async buildClaimVeBalTokensRequest(e,t){if(!this.feeDistributor)throw new vn(An.FEE_PROVIDER_NOT_PROVIDED);const a=await this.feeDistributor.getClaimableBalances(e,t),n=t.map((e=>{var t;return null!==(t=a[e])&&void 0!==t?t:Po}));if(n.every((e=>e.eq(Po))))throw new vn(An.REWARD_TOKEN_ZERO);const o=this.feeDistributor.claimBalances(e,t);return{to:this.feeDistributor.feeDistributor.address,from:e,callData:o,tokensOut:t,expectedTokensValue:n,functionName:"claimTokens"}}async getGauges(){return await this.liquidityGauges.fetch()}getRewardTokens(e){return e.reduce(Eo,{})}async retrieveClaimableRewards(e,t){const a=Object.keys(e),{payload:n,paths:o}=this.getPayload(a,e,t),[,i]=await this.multicall.callStatic.aggregate(n),s=i.map((e=>"0x"==e?"0x0":e));return o.reduce((e=>(t,a,n)=>{var o;const i=p.from(`${e[n]}`);return i.gt(Po)&&(t[o=a.gauge]||(t[o]={}),t[a.gauge][a.token]=i),t})(s),{})}getPayload(e,t,a){const n=[],o=[];for(const i of e)for(const e of t[i])o.push({gauge:i,token:e}),n.push(this.getArguments(a,i,e));return{payload:n,paths:o}}getArguments(e,t,a){if(1===this.chainId||5===this.chainId)return{target:t,callData:Ao.encodeFunctionData("claimable_reward",[e,a])};if(!this.gaugeClaimHelperAddress)throw new vn(An.GAUGES_HELPER_ADDRESS_NOT_PROVIDED);return{target:this.gaugeClaimHelperAddress,callData:So.encodeFunctionData("getPendingRewards",[t,e,a])}}async retrieveClaimableTokens(e,t){if(this.chainId===Pe.MAINNET||this.chainId===Pe.GOERLI){const a=xn[this.chainId].addresses.tokens.bal,n=e.map((e=>({target:e,callData:Ao.encodeFunctionData("claimable_tokens",[t])}))),[,o]=await this.multicall.callStatic.aggregate(n),i=o.map((e=>"0x"==e?"0x0":e));return e.reduce(((e,t)=>(a,n,o)=>{const i=p.from(`${e[o]}`);return i.gt(Po)&&(a[n]||(a[n]={}),a[n][t]=i),a})(i,a),{})}return{}}}async function Oo(e,t,a,n){const i={sender:o,recipient:o,fromInternalBalance:!1,toInternalBalance:!1};try{return(await e.callStatic.queryBatchSwap(t,a,n,i)).map((e=>e.toString()))}catch(e){throw`queryBatchSwap call error: ${e}`}}var Mo=function(){return Mo=Object.assign||function(e){for(var t,a=1,n=arguments.length;ae();function Hi(e,t=$i){return{PoolShare:(a,n)=>t((t=>e.request(Oi,a,{...n,...t})),"PoolShare","query"),PoolShares:(a,n)=>t((t=>e.request(Mi,a,{...n,...t})),"PoolShares","query"),Pools:(a,n)=>t((t=>e.request(Ci,a,{...n,...t})),"Pools","query"),AllPools:(a,n)=>t((t=>e.request(Fi,a,{...n,...t})),"AllPools","query"),Pool:(a,n)=>t((t=>e.request(Bi,a,{...n,...t})),"Pool","query"),PoolHistoricalLiquidities:(a,n)=>t((t=>e.request(Ri,a,{...n,...t})),"PoolHistoricalLiquidities","query"),PoolSnapshots:(a,n)=>t((t=>e.request(Ni,a,{...n,...t})),"PoolSnapshots","query"),JoinExits:(a,n)=>t((t=>e.request(Li,a,{...n,...t})),"JoinExits","query"),Balancers:(a,n)=>t((t=>e.request(Di,a,{...n,...t})),"Balancers","query"),TokenPrices:(a,n)=>t((t=>e.request(Ui,a,{...n,...t})),"TokenPrices","query"),TokenLatestPrices:(a,n)=>t((t=>e.request(Vi,a,{...n,...t})),"TokenLatestPrices","query"),TokenLatestPrice:(a,n)=>t((t=>e.request(qi,a,{...n,...t})),"TokenLatestPrice","query"),User:(a,n)=>t((t=>e.request(Gi,a,{...n,...t})),"User","query"),Users:(a,n)=>t((t=>e.request(Wi,a,{...n,...t})),"Users","query")}}var Ki,Ji,Xi,Yi,ji,zi,Zi,Qi,es,ts,as,ns,os,is,ss,rs,ps,ds;!function(e){e.Arbitrum="Arbitrum",e.Avalanche="Avalanche",e.Base="Base",e.Gnosis="Gnosis",e.Optimism="Optimism",e.Polygon="Polygon",e.PolygonZkEvm="PolygonZkEvm"}(Ki||(Ki={})),function(e){e.gauges="gauges",e.id="id",e.numGauges="numGauges"}(Ji||(Ji={})),function(e){e.balance="balance",e.gauge="gauge",e.gauge__id="gauge__id",e.gauge__isKilled="gauge__isKilled",e.gauge__isPreferentialGauge="gauge__isPreferentialGauge",e.gauge__poolAddress="gauge__poolAddress",e.gauge__poolId="gauge__poolId",e.gauge__relativeWeightCap="gauge__relativeWeightCap",e.gauge__streamer="gauge__streamer",e.gauge__symbol="gauge__symbol",e.gauge__totalSupply="gauge__totalSupply",e.id="id",e.user="user",e.user__id="user__id"}(Xi||(Xi={})),function(e){e.id="id",e.name="name"}(Yi||(Yi={})),function(e){e.gauge="gauge",e.gauge__addedTimestamp="gauge__addedTimestamp",e.gauge__address="gauge__address",e.gauge__id="gauge__id",e.id="id",e.timestamp="timestamp",e.user="user",e.user__id="user__id",e.weight="weight"}(ji||(ji={})),function(e){e.addedTimestamp="addedTimestamp",e.address="address",e.id="id",e.liquidityGauge="liquidityGauge",e.liquidityGauge__id="liquidityGauge__id",e.liquidityGauge__isKilled="liquidityGauge__isKilled",e.liquidityGauge__isPreferentialGauge="liquidityGauge__isPreferentialGauge",e.liquidityGauge__poolAddress="liquidityGauge__poolAddress",e.liquidityGauge__poolId="liquidityGauge__poolId",e.liquidityGauge__relativeWeightCap="liquidityGauge__relativeWeightCap",e.liquidityGauge__streamer="liquidityGauge__streamer",e.liquidityGauge__symbol="liquidityGauge__symbol",e.liquidityGauge__totalSupply="liquidityGauge__totalSupply",e.rootGauge="rootGauge",e.rootGauge__chain="rootGauge__chain",e.rootGauge__id="rootGauge__id",e.rootGauge__isKilled="rootGauge__isKilled",e.rootGauge__recipient="rootGauge__recipient",e.rootGauge__relativeWeightCap="rootGauge__relativeWeightCap",e.type="type",e.type__id="type__id",e.type__name="type__name"}(zi||(zi={})),function(e){e.factory="factory",e.factory__id="factory__id",e.factory__numGauges="factory__numGauges",e.gauge="gauge",e.gauge__addedTimestamp="gauge__addedTimestamp",e.gauge__address="gauge__address",e.gauge__id="gauge__id",e.id="id",e.isKilled="isKilled",e.isPreferentialGauge="isPreferentialGauge",e.pool="pool",e.poolAddress="poolAddress",e.poolId="poolId",e.pool__address="pool__address",e.pool__id="pool__id",e.pool__poolId="pool__poolId",e.relativeWeightCap="relativeWeightCap",e.rewardTokensList="rewardTokensList",e.shares="shares",e.streamer="streamer",e.symbol="symbol",e.tokens="tokens",e.totalSupply="totalSupply"}(Zi||(Zi={})),function(e){e.bias="bias",e.id="id",e.slope="slope",e.timestamp="timestamp",e.user="user",e.user__id="user__id"}(Qi||(Qi={})),function(e){e.bias="bias",e.dstChainId="dstChainId",e.id="id",e.localUser="localUser",e.localUser__id="localUser__id",e.remoteUser="remoteUser",e.slope="slope",e.timestamp="timestamp",e.votingEscrowID="votingEscrowID",e.votingEscrowID__id="votingEscrowID__id",e.votingEscrowID__stakedSupply="votingEscrowID__stakedSupply"}(es||(es={})),function(e){e.asc="asc",e.desc="desc"}(ts||(ts={})),function(e){e.address="address",e.gauges="gauges",e.gaugesList="gaugesList",e.id="id",e.poolId="poolId",e.preferentialGauge="preferentialGauge",e.preferentialGauge__id="preferentialGauge__id",e.preferentialGauge__isKilled="preferentialGauge__isKilled",e.preferentialGauge__isPreferentialGauge="preferentialGauge__isPreferentialGauge",e.preferentialGauge__poolAddress="preferentialGauge__poolAddress",e.preferentialGauge__poolId="preferentialGauge__poolId",e.preferentialGauge__relativeWeightCap="preferentialGauge__relativeWeightCap",e.preferentialGauge__streamer="preferentialGauge__streamer",e.preferentialGauge__symbol="preferentialGauge__symbol",e.preferentialGauge__totalSupply="preferentialGauge__totalSupply"}(as||(as={})),function(e){e.decimals="decimals",e.gauge="gauge",e.gauge__id="gauge__id",e.gauge__isKilled="gauge__isKilled",e.gauge__isPreferentialGauge="gauge__isPreferentialGauge",e.gauge__poolAddress="gauge__poolAddress",e.gauge__poolId="gauge__poolId",e.gauge__relativeWeightCap="gauge__relativeWeightCap",e.gauge__streamer="gauge__streamer",e.gauge__symbol="gauge__symbol",e.gauge__totalSupply="gauge__totalSupply",e.id="id",e.periodFinish="periodFinish",e.rate="rate",e.symbol="symbol",e.totalDeposited="totalDeposited"}(ns||(ns={})),function(e){e.chain="chain",e.factory="factory",e.factory__id="factory__id",e.factory__numGauges="factory__numGauges",e.gauge="gauge",e.gauge__addedTimestamp="gauge__addedTimestamp",e.gauge__address="gauge__address",e.gauge__id="gauge__id",e.id="id",e.isKilled="isKilled",e.recipient="recipient",e.relativeWeightCap="relativeWeightCap"}(os||(os={})),function(e){e.factory="factory",e.factory__id="factory__id",e.factory__numGauges="factory__numGauges",e.gauge="gauge",e.gauge__addedTimestamp="gauge__addedTimestamp",e.gauge__address="gauge__address",e.gauge__id="gauge__id",e.id="id",e.isKilled="isKilled",e.recipient="recipient",e.relativeWeightCap="relativeWeightCap"}(is||(is={})),function(e){e.gaugeShares="gaugeShares",e.gaugeVotes="gaugeVotes",e.id="id",e.omniVotingLocks="omniVotingLocks",e.votingLocks="votingLocks"}(ss||(ss={})),function(e){e.bias="bias",e.id="id",e.lockedBalance="lockedBalance",e.slope="slope",e.timestamp="timestamp",e.unlockTime="unlockTime",e.updatedAt="updatedAt",e.user="user",e.user__id="user__id",e.votingEscrowID="votingEscrowID",e.votingEscrowID__id="votingEscrowID__id",e.votingEscrowID__stakedSupply="votingEscrowID__stakedSupply"}(rs||(rs={})),function(e){e.id="id",e.locks="locks",e.omniLocks="omniLocks",e.stakedSupply="stakedSupply"}(ps||(ps={})),function(e){e.allow="allow",e.deny="deny"}(ds||(ds={}));const ls=gi` + fragment SubgraphGaugeShare on GaugeShare { + id + balance + user { + id + } + gauge { + id + isKilled + poolId + poolAddress + totalSupply + } +} + `,us=gi` + fragment SubgraphLiquidityGauge on LiquidityGauge { + id + symbol + poolAddress + poolId + streamer + factory { + id + numGauges + } + totalSupply + tokens { + id + symbol + decimals + totalDeposited + rate + periodFinish + } +} + `,cs=gi` + fragment SubgraphPoolWithPreferentialGauge on Pool { + id + poolId + preferentialGauge { + ...SubgraphLiquidityGauge + } +} + ${us}`,ys=gi` + query GaugeShare($id: ID!, $block: Block_height) { + gaugeShare(id: $id, block: $block) { + ...SubgraphGaugeShare + } +} + ${ls}`,bs=gi` + query GaugeShares($first: Int, $orderBy: GaugeShare_orderBy, $orderDirection: OrderDirection, $skip: Int, $where: GaugeShare_filter, $block: Block_height) { + gaugeShares( + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + skip: $skip + where: $where + block: $block + ) { + ...SubgraphGaugeShare + } +} + ${ls}`,ms=gi` + query LiquidityGauges($skip: Int, $first: Int, $orderBy: LiquidityGauge_orderBy, $orderDirection: OrderDirection, $where: LiquidityGauge_filter, $block: Block_height) { + liquidityGauges( + skip: $skip + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + where: $where + block: $block + ) { + ...SubgraphLiquidityGauge + } +} + ${us}`,fs=gi` + query Pools($skip: Int, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter, $block: Block_height) { + pools( + skip: $skip + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + where: $where + block: $block + ) { + ...SubgraphPoolWithPreferentialGauge + } +} + ${cs}`,Ts=gi` + query PoolGauges($where: Pool_filter, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $skip: Int, $block: Block_height) { + pools( + where: $where + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + skip: $skip + block: $block + ) { + gauges { + id + relativeWeightCap + } + preferentialGauge { + id + } + } +} + `,hs=(e,t,a)=>e();function Is(e){return Hi(new J(e))}function _s(e){return function(e,t=hs){return{GaugeShare:(a,n)=>t((t=>e.request(ys,a,{...n,...t})),"GaugeShare","query"),GaugeShares:(a,n)=>t((t=>e.request(bs,a,{...n,...t})),"GaugeShares","query"),LiquidityGauges:(a,n)=>t((t=>e.request(ms,a,{...n,...t})),"LiquidityGauges","query"),Pools:(a,n)=>t((t=>e.request(fs,a,{...n,...t})),"Pools","query"),PoolGauges:(a,n)=>t((t=>e.request(Ts,a,{...n,...t})),"PoolGauges","query")}}(new J(e))}class gs{constructor(e,a,n={}){this.options=n,this.calls=[],this.paths=[],this.address="0xcA11bde05977b3631167028862bE2a173976CA11",this.interface=new t(e),this.multicall=za.connect(this.address,a)}call(e,t,a,n){return this.calls.push([t,a,n]),this.paths.push(e),this}async execute(e={},t=1024){const a=e;return(await this.executeMulticall(t)).forEach(((e,t)=>g(a,this.paths[t],e.length>1?e:e[0]))),this.calls=[],this.paths=[],a}async executeMulticall(e){const t=Math.ceil(this.calls.length/e),a=[],n=[];for(let a=0;a({target:e,allowFailure:!0,callData:this.interface.encodeFunctionData(t,a)})));n.push(this.multicall.callStatic.aggregate3(t,this.options))}return(await Promise.all(n)).forEach(((t,n)=>{const o=n*e;for(let e=0;e{a.call(`${e}.weights`,t,"getNormalizedWeights")},xs=(e,t,a)=>{a.call(`${e}.targets`,t,"getTargets"),a.call(`${e}.wrappedTokenRate`,t,"getWrappedTokenRate")},Es=(e,t,a)=>{a.call(`${e}.amp`,t,"getAmplificationParameter")},As=(e,t,a)=>{a.call(`${e}.tokenRates`,t,"getTokenRates")},vs=async(e,t,a,n=1024)=>{if(0===e.length)return{};const o=new gs(Ps,a);e.forEach((({id:e,address:a,poolType:n,poolTypeVersion:i})=>{((e,t,a,n,o)=>{o.call(`${e}.poolTokens`,a,"getPoolTokens",[e]),o.call(`${e}.totalShares`,t,(e=>e.includes("Linear")||["StablePhantom"].includes(e)?"getVirtualSupply":"ComposableStable"===e?"getActualSupply":"totalSupply")(n)),o.call(`${e}.swapFee`,t,(e=>"Element"===e?"percentFee":"FX"===e?"protocolPercentFee":"getSwapFeePercentage")(n))})(e,a,t,n,o),((e,t=1)=>{const a=()=>({});switch(e){case"Weighted":case"LiquidityBootstrapping":case"Investment":return ws;case"Stable":case"StablePhantom":case"MetaStable":case"ComposableStable":return Es;case"GyroE":case"Gyro2":return 2===t?As:a;case"AaveLinear":return 1===t?xs:a;default:return a}})(n,i)(e,a,o)}));return await o.execute({},n)};async function Ss(e,t,a,n,o=1024){if(0===e.length)return e;const i=[],s=await vs(e,a,n,o);return e.forEach((e=>{const t=s[e.id];i.push(((e,t)=>({...e,tokens:t.poolTokens?e.tokens.map((a=>{const n=t.poolTokens[0].map((e=>e.toLowerCase())).indexOf(a.address),o=e.wrappedIndex&&e.tokensList[e.wrappedIndex],i=void 0===a.decimals?18:a.decimals;return{...a,balance:l(t.poolTokens[1][n],i),weight:t.weights&&l(t.weights[n],18)||a.weight,priceRate:t.wrappedTokenRate&&o&&o.toLowerCase()===a.address.toLowerCase()&&l(t.wrappedTokenRate,18)||a.priceRate}})):e.tokens,totalShares:t.totalShares?l(t.totalShares,18):e.totalShares,swapFee:t.swapFee?l(t.swapFee,18):e.swapFee,amp:t.amp&&t.amp[0]&&l(t.amp[0],String(t.amp[2]).length-1)||e.amp,lowerTarget:t.targets&&l(t.targets[0],18)||e.lowerTarget,upperTarget:t.targets&&l(t.targets[1],18)||e.upperTarget,tokenRates:t.tokenRates&&t.tokenRates.map((e=>l(e,18)))||e.tokenRates}))(e,t))})),i}class ks{constructor(e,t,a,n,o){this.client=e,this.provider=t,this.network=a,this.sorConfig=n,this.defaultArgs=(null==o?void 0:o.args)||{orderBy:pi.TotalLiquidity,orderDirection:ai.Desc,where:{swapEnabled:{eq:!0},totalShares:{gt:1e-12}}}}async getPools(e){const t=function(e){return e.map((e=>({...e,poolType:e.poolType||"",tokens:(e.tokens||[]).map((e=>({...e,weight:e.weight||null}))),totalWeight:e.totalWeight||void 0,amp:e.amp||void 0,expiryTime:e.expiryTime?P(e.expiryTime):void 0,unitSeconds:e.unitSeconds?P(e.unitSeconds):void 0,principalToken:e.principalToken||void 0,baseToken:e.baseToken||void 0})))}((await this.getSubgraphPools(e)).filter((e=>{if(!this.network.poolsToIgnore)return!0;return-1===this.network.poolsToIgnore.findIndex((t=>t.toLowerCase()===e.id.toLowerCase()))})));if(this.sorConfig&&!1===this.sorConfig.fetchOnChainBalances)return t;const a=Re.getInstance();a.time(`fetching on-chain balances for ${t.length} pools`);const n=await Ss(t,this.network.addresses.contracts.multicall,this.network.addresses.contracts.vault,this.provider,this.network.multicallBatchSize);return a.timeEnd(`fetching on-chain balances for ${t.length} pools`),n}async getSubgraphPools(e){const t=new zt(e||this.defaultArgs).format(new jt);if(t.first){const{pools:e}=await this.client.Pools(t);return e}const{pool0:a,pool1000:n,pool2000:o}=await this.client.AllPools(t);return[...a,...n,...o]}}class Os{constructor(e,t){this.client=e,this.weth=t.toLowerCase()}async getNativeAssetPriceInToken(e){const t=await this.getLatestPriceInEthFromSubgraph(e);if(!t)throw Error("No price found in the subgraph");return""+1/t}async getLatestPriceInEthFromSubgraph(e){e=e.toLowerCase();const{latestPrices:t}=await this.client.TokenLatestPrices({where:{asset_in:[e,this.weth]}}),a=w(t,"id");if(a[`${e}-${this.weth}`])return parseFloat(a[`${e}-${this.weth}`].price);const n=t.filter((t=>t.asset===e));for(const e of n){const t=a[`${e.pricingAsset}-${this.weth}`];if(t)return parseFloat(e.price)*parseFloat(t.price)}return null}}function Ms(e){var t,a;if("number"==typeof e.network){const a=xn[e.network];return{...a,urls:{...a.urls,subgraph:null!==(t=e.customSubgraphUrl)&&void 0!==t?t:a.urls.subgraph},tenderly:e.tenderly}}return{...e.network,urls:{...e.network.urls,subgraph:null!==(a=e.customSubgraphUrl)&&void 0!==a?a:e.network.urls.subgraph},tenderly:e.network.tenderly}}const Cs=["0x00c2a4be503869fa751c2dbcb7156cc970b5a8da000000000000000000000477","0x02d928e68d8f10c0358566152677db51e1e2dc8c00000000000000000000051e","0x04248aabca09e9a1a3d5129a7ba05b7f17de768400000000000000000000050e","0x05513ca725b6ce035ca2641075474eb469f05f4c00020000000000000000041f","0x0a0fb4ff697de5ac5b6770cd8ee1b72af80b57cf000000000000000000000496","0x0afbd58beca09545e4fb67772faf3858e610bcd00000000000000000000004b9","0x0d05aac44ac7dd3c7ba5d50be93eb884a057d23400000000000000000000051c","0x11839d635e2f0270da37e8ef4324d4d5d54329570002000000000000000004d8","0x126e7643235ec0ab9c103c507642dc3f4ca23c66000000000000000000000468","0x133d241f225750d2c92948e464a5a80111920331000000000000000000000476","0x159cb00338fb63f263fd6f621df619cef71da9540000000000000000000004d5","0x173063a30e095313eee39411f07e95a8a806014e0002000000000000000003ab","0x1bd2f176a812e312077bca87e37c08432bb09f3e0000000000000000000005a1","0x20b156776114e8a801e9767d90c6ccccc8adf398000000000000000000000499","0x246ffb4d928e394a02e45761fecdba6c2e79b8eb000000000000000000000541","0x25accb7943fd73dda5e23ba6329085a3c24bfb6a000200000000000000000387","0x26c2b83fc8535deead276f5cc3ad9c1a2192e02700020000000000000000056b","0x2b218683178d029bab6c9789b1073aa6c96e517600000000000000000000058c","0x2ba7aa2213fa2c909cd9e46fed5a0059542b36b00000000000000000000003a3","0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c0000000000000000000000fd","0x2e52c64fd319e380cdbcfc4577ea1fda558a32e40002000000000000000005ba","0x2f4eb100552ef93840d5adc30560e5513dfffacb000000000000000000000334","0x2ff1a9dbdacd55297452cfd8a4d94724bc22a5f7000000000000000000000484","0x3035917be42af437cbdd774be26b9ec90a2bd677000200000000000000000543","0x331d50e0b00fc1c32742f151e56b9b616227e23e00000000000000000000047c","0x334c96d792e4b26b841d28f53235281cec1be1f200020000000000000000038a","0x335d1709d4da9aca59d16328db5cd4ea66bfe06b0000000000000000000004d6","0x395d8a1d9ad82b5abe558f8abbfe183b27138af40000000000000000000004e5","0x3bb22fc9033b802f2ac47c18885f63476f158afc000000000000000000000483","0x3c640f0d3036ad85afa2d5a9e32be651657b874f00000000000000000000046b","0x3cdae4f12a67ba563499e102f309c73213cb241c000000000000000000000335","0x3dbb8d974b82e82ce79c20c0f5995f4f1f533ede000000000000000000000470","0x3f7a7fd7f214be45ec26820fd01ac3be4fc75aa70002000000000000000004c5","0x3fcb7085b8f2f473f80bf6d879cae99ea4de934400000000000000000000056d","0x41503c9d499ddbd1dcdf818a1b05e9774203bf46000000000000000000000594","0x4228290ee9cab692938ff0b4ba303fbcdb68e9f200020000000000000000057d","0x454ed96955d04d2f5cdd05e0fd1c77975bfe5307000000000000000000000410","0x481c5fc05d63a58aa2f0f2aa417c021b5d419cb200000000000000000000056a","0x483006684f422a9448023b2382615c57c5ecf18f000000000000000000000488","0x4a82b580365cff9b146281ab72500957a849abdc000000000000000000000494","0x4c81255cc9ed7062180ea99962fe05ac0d57350b0000000000000000000005a3","0x4c8d2e60863e8d7e1033eda2b3d84e92a641802000000000000000000000040f","0x4cbde5c4b4b53ebe4af4adb85404725985406163000000000000000000000595","0x4ce0bd7debf13434d3ae127430e9bd4291bfb61f00020000000000000000038b","0x4ce277df0feb5b4d07a0ca2adcf5326e4005239d000000000000000000000518","0x4fd4687ec38220f805b6363c3c1e52d0df3b5023000200000000000000000473","0x4fd63966879300cafafbb35d157dc5229278ed230000000000000000000000e9","0x50cf90b954958480b8df7958a9e965752f62712400000000000000000000046f","0x53bc3cba3832ebecbfa002c12023f8ab1aa3a3a0000000000000000000000411","0x5a6a8cffb4347ff7fc484bf5f0f8a2e234d34255000200000000000000000275","0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b","0x60683b05e9a39e3509d8fdb9c959f23170f8a0fa000000000000000000000489","0x60d604890feaa0b5460b28a424407c24fe89374a0000000000000000000004fc","0x639883476960a23b38579acfd7d71561a0f408cf000200000000000000000505","0x652d486b80c461c397b0d95612a404da936f3db30000000000000000000000e7","0x6667c6fa9f2b3fc1cc8d85320b62703d938e43850000000000000000000004fb","0x6a1eb2e9b45e772f55bd9a34659a04b6f75da68700000000000000000000040d","0x6c56e72c551b5ac4bf54a620a76077ca768c8fe40002000000000000000004da","0x70b7d3b3209a59fb0400e17f67f3ee8c37363f4900020000000000000000018f","0x7337224d59cb16c2dc6938cd45a7b2c60c865d6a0000000000000000000004d4","0x74cbfaf94a3577c539a9dcee9870a6349a33b34f000000000000000000000534","0x779d01f939d78a918a3de18cc236ee89221dfd4e0000000000000000000004c7","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x804cdb9116a10bb78768d3252355a1b18067bf8f0000000000000000000000fb","0x813e3fe1761f714c502d1d2d3a7cceb33f37f59d00000000000000000000040c","0x82698aecc9e28e9bb27608bd52cf57f704bd1b83000000000000000000000336","0x8a6b25e33b12d1bb6929a8793961076bd1f9d3eb0002000000000000000003e8","0x8e6ec57a822c2f527f2df7c7d7d361df3e7530a1000000000000000000000498","0x8f4063446f5011bc1c9f79a819efe87776f23704000000000000000000000197","0x9001cbbd96f54a658ff4e6e65ab564ded76a543100000000000000000000050a","0x9210f1204b5a24742eba12f710636d76240df3d00000000000000000000000fc","0x9516a2d25958edb8da246a320f2c7d94a0dbe25d000000000000000000000519","0x959216bb492b2efa72b15b7aacea5b5c984c3cca000200000000000000000472","0x968024662b9566b42d78af23a0f441bc8723fa83000200000000000000000418","0x99c88ad7dc566616548adde8ed3effa730eb6c3400000000000000000000049a","0x9b1c8407a360443a9e5eca004713e4088fab8ac0000000000000000000000497","0x9b692f571b256140a39a34676bffa30634c586e100000000000000000000059d","0x9d7f992c900fbea0ec314bdd71b7cc1becf76a33000200000000000000000573","0x9fb771d530b0ceba5160f7bfe2dd1e8b8aa1340300000000000000000000040e","0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d","0xa1697f9af0875b63ddc472d6eebada8c1fab85680000000000000000000004f9","0xa3823e50f20982656557a4a6a9c06ba5467ae9080000000000000000000000e6","0xa718042e5622099e5f0ace4e7122058ab39e1bbe000200000000000000000475","0xa8b103a10a94f4f2d7ed2fdcd5545e807557330700000000000000000000048e","0xac5b4ef7ede2f2843a704e96dcaa637f4ba3dc3f00000000000000000000051d","0xac976bb42cb0c85635644e8c7c74d0e0286aa61c0000000000000000000003cb","0xae37d54ae477268b9997d4161b96b8200755935c000000000000000000000337","0xae8535c23afedda9304b03c68a3563b75fc8f92b0000000000000000000005a0","0xb0f75e97a114a4eb4a425edc48990e6760726709000000000000000000000198","0xb5e3de837f869b0248825e0175da73d4e8c3db6b000200000000000000000474","0xb841b062ea8ccf5c4cb78032e91de4ae875560420002000000000000000005b7","0xb9bd68a77ccf8314c0dfe51bc291c77590c4e9e6000200000000000000000385","0xbb6881874825e60e1160416d6c426eae65f2459e000000000000000000000592","0xbc0f2372008005471874e426e86ccfae7b4de79d000000000000000000000485","0xbf2ef8bdc2fc0f3203b3a01778e3ec5009aeef3300000000000000000000058d","0xbfa413a2ff0f20456d57b643746133f54bfe0cd20000000000000000000004c3","0xc2b021133d1b0cf07dba696fd5dd89338428225b000000000000000000000598","0xc443c15033fcb6cf72cc24f1bda0db070ddd9786000000000000000000000593","0xc50d4347209f285247bda8a09fc1c12ce42031c3000000000000000000000590","0xc5dc1316ab670a2eed5716d7f19ced321191f38200000000000000000000056e","0xc8c79fcd0e859e7ec81118e91ce8e4379a481ee6000000000000000000000196","0xcaa052584b462198a5a9356c28bce0634d65f65c0000000000000000000004db","0xcbfa4532d8b2ade2c261d3dd5ef2a2284f7926920000000000000000000004fa","0xcfae6e251369467f465f13836ac8135bd42f8a56000000000000000000000591","0xd4e7c1f3da1144c9e2cfd1b015eda7652b4a439900000000000000000000046a","0xd6e355036f41dc261b3f1ed3bbc6003e87aadb4f000000000000000000000495","0xd7edb56f63b2a0191742aea32df1f98ca81ed9c600000000000000000000058e","0xd997f35c9b1281b82c8928039d14cddab5e13c2000000000000000000000019c","0xdba274b4d04097b90a72b62467d828cefd708037000000000000000000000486","0xdc063deafce952160ec112fa382ac206305657e60000000000000000000004c4","0xdec02e6642e2c999af429f5ce944653cad15e093000000000000000000000469","0xe03af00fabe8401560c1ff7d242d622a5b601573000000000000000000000493","0xe0fcbf4d98f0ad982db260f86cf28b49845403c5000000000000000000000504","0xe2d16b0a39f3fbb4389a0e8f1efcbecfb3d1e6e10000000000000000000005a7","0xe4dc3c1998ac693d68f4c77476d7c815694c3e94000200000000000000000416","0xe6bcc79f328eec93d4ec8f7ed35534d9ab549faa0000000000000000000000e8","0xe8c56405bc405840154d9b572927f4197d110de10000000000000000000005a4","0xeb486af868aeb3b6e53066abc9623b1041b42bc000000000000000000000046c","0xeb567dde03f3da7fe185bdacd5ab495ab220769d000000000000000000000548","0xec3626fee40ef95e7c0cbb1d495c8b67b34d398300000000000000000000053d","0xf22ff21e17157340575158ad7394e068048dd98b0000000000000000000004b8","0xf57c794f42da72b38c8f610ff3b5e8502e48cbde00000000000000000000055c","0xf71d0774b214c4cf51e33eb3d30ef98132e4dbaa00000000000000000000046e","0xfa24a90a3f2bbe5feea92b95cd0d14ce709649f900000000000000000000058f","0xfd11ccdbdb7ab91cb9427a6d6bf570c95876d1950000000000000000000004c2","0xfebb0bbf162e64fb9d0dfe186e517d84c395f016000000000000000000000502","0xfef969638c52899f91781f1be594af6f40b99bad00000000000000000000047b","0x02e139d53ebf4033bf78ab66c6a1e7f1f204487f0002000000000000000009f9","0x03090a9811181a2afe830a3a0b467698ccf3a8b1000000000000000000000bf5","0x0320c1c5b6df19a194d48882aaec1c72940081d9000000000000000000000a7d","0x04b54ea92d73de2d62d651db7d9778f0c49157d8000200000000000000000ba2","0x0503dd6b2d3dd463c9bef67fb5156870af63393e00000000000000000000042e","0x0889b240a5876aae745ac19f1771853671dc5d36000000000000000000000b3f","0x0bc54e914f53f98d16035f4f0d948f3e09c2fac0000200000000000000000bac","0x0c06e87c7b88d998f645b91c1f53b51294b12bca000100000000000000000bb9","0x10b040038f87219d9b42e025e3bd9b8095c87dd9000000000000000000000b11","0x117a3d474976274b37b7b94af5dcade5c90c6e85000000000000000000000aca","0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000a5f","0x1379b816b9be611431d693290289c204720ca56d000100000000000000000b6f","0x150e7b885bdfce974f2abe88a72fdbd692175c6f0002000000000000000009fd","0x178e029173417b1f9c8bc16dcec6f697bc323746000000000000000000000758","0x1aafc31091d93c3ff003cff5d2d8f7ba2e7284250000000000000000000003b3","0x216690738aac4aa0c4770253ca26a28f0115c595000000000000000000000b2c","0x216d6db0c28204014618482c369d7fbf0a8f3232000100000000000000000b60","0x230ecdb2a7cee56d6889965a023aa0473d6da507000000000000000000000bf3","0x252ff6a3a6fd7b5e8e999de8e3f5c3b306ed1401000200000000000000000bec","0x25e57f4612912614e6c99616bd2abb9b5ae71e99000000000000000000000bf0","0x2645b13fd2c5295296e94a76280b968bdcbbdfed000000000000000000000c11","0x284eb68520c8fa83361c1a3a5910aec7f873c18b000000000000000000000ac9","0x2c8dbe8eb86135d9f2f26d196748c088d47f73e7000200000000000000000a29","0x31bccf9e28b94e5dacebaa67fe8bc1603cecd904000000000000000000000a01","0x341068a547c3cde3c09e338714010dd01b32f93f000200000000000000000a34","0x3db543faf7a92052de7860c5c9debabee59ed5bd000000000000000000000a62","0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd00000000000000000000070d","0x3efb91c4f9b103ee45885695c67794591916f34e000200000000000000000b43","0x402cfdb7781fa85d52f425352661128250b79e12000000000000000000000be3","0x43894de14462b421372bcfe445fa51b1b4a0ff3d000000000000000000000b36","0x4739e50b59b552d490d3fdc60d200977a38510c0000000000000000000000b10","0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b","0x4a0b73f0d13ff6d43e304a174697e3d5cfd310a400020000000000000000091c","0x4a77ef015ddcd972fd9ba2c7d5d658689d090f1a000000000000000000000b38","0x4ae3661afa119892f0cc8c43edaf6a94989ac171000000000000000000000c06","0x4ccb966d8246240afb7a1a24628efb930870b1c40002000000000000000009fc","0x52cc8389c6b93d740325729cc7c958066cee4262000000000000000000000b0f","0x5b77107fcdf2b41903bab2bc555d4fc14cf7667d000000000000000000000b32","0x5bae72b75caab1f260d21bc028c630140607d6e8000000000000000000000ac6","0x600bd01b6526611079e12e1ff93aba7a3e34226f0000000000000000000009e4","0x63ce19ccd39930725b8a3d2733627804718ab83d000000000000000000000bf2","0x64efad69f099813021b41f4cac6e749fd55e188f000000000000000000000b39","0x6933ec1ca55c06a894107860c92acdfd2dd8512f000000000000000000000428","0x6abe4e7a497b8293c258389c1b00d177e4f257ed00010000000000000000080d","0x6c8c7fc50247a47038015eb1fd5dc105d05dafba000200000000000000000ba0","0x7079a25dec33be61bbd81b2fb69b468e80d3e72c0000000000000000000009ff","0x71bd10c2a590b5858f5576550c163976a48af906000000000000000000000b27","0x7c82a23b4c48d796dee36a9ca215b641c6a8709d000000000000000000000acd","0x7f4f4942f2a14b6ab7b08b10ada1aacede4ee8d4000200000000000000000b44","0x86aef31951e0a3a54333bd9e72f9a95587d058c5000200000000000000000912","0x882c7a84231484b3e9f3fd45ac04b1eb5d35b076000200000000000000000a91","0x894c82800526e0391e709c0983a5aea3718b7f6d000000000000000000000ac5","0x89b28a9494589b09dbccb69911c189f74fdadc5a000000000000000000000b33","0x89bb15076c9f2d86aa98ec6cffc1a71e31c38953000000000000000000000bf1","0x89f1146fee52b5d9166e9c83cc388b6d8f69f1380001000000000000000009e7","0x8a819a4cabd6efcb4e5504fe8679a1abd831dd8f00000000000000000000042d","0x8b58a1e7fff52001c22386c2918d45938a6a9be30001000000000000000008d9","0x8b8225bfedebaf1708c55743acb4ad43fd4d0f21000200000000000000000918","0x8fbd0f8e490735cfc3abf4f29cbddd5c3289b9a7000000000000000000000b5b","0x8fd39252d683fdb60bddd4df4b53c9380b496d59000200000000000000000b45","0x9321e2250767d79bab5aa06daa8606a2b3b7b4c5000000000000000000000bf4","0x949a12b95ec5b80c375b98963a5d6b33b0d0efff0002000000000000000009fe","0x9a020bdc2faff5bd24c6acc2020d01ff9f2c627a000000000000000000000ae2","0x9cf9358300e34bf9373d30129a1e718d8d058b54000200000000000000000913","0x9e34631547adcf2f8cefa0f5f223955c7b137571000000000000000000000ad5","0xa5a935833f6a5312715f182733eab088452335d7000100000000000000000bee","0xa5fe91dde37d8bf2dacacc0168b115d28ed03f84000000000000000000000b35","0xa8bf1c584519be0184311c48adbdc4c15cb2e8c1000000000000000000000bf6","0xab269164a10fab22bc87c39946da06c870b172d6000000000000000000000bfc","0xac2cae8d2f78a4a8f92f20dbe74042cd0a8d5af3000000000000000000000be2","0xae646817e458c0be890b81e8d880206710e3c44e000000000000000000000acb","0xaef2c171dbe64b0c18977e16e70bfd29d4ee0256000000000000000000000ac8","0xb0c830dceb4ef55a60192472c20c8bf19df03488000000000000000000000be1","0xb266ac3b7c98d7bcb28731dac0ef42dba1b276be000000000000000000000be4","0xb371aa09f5a110ab69b39a84b5469d29f9b22b76000000000000000000000b37","0xb3d658d5b95bf04e2932370dd1ff976fe18dd66a000000000000000000000ace","0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e","0xb59be8f3c85a9dd6e2899103b6fbf6ea405b99a4000000000000000000000b34","0xb878ecce26838fbba4f78cb5b791a0e09152c067000000000000000000000427","0xb973ca96a3f0d61045f53255e319aedb6ed4924000000000000000000000042f","0xbd4e35784c832d0f9049b54cb3609e5907c5b495000100000000000000000b14","0xc55ec796a4debe625d95436a3531f4950b11bdcf000000000000000000000b3e","0xc7e6389e364f4275eb442ef215ed21877028e2af000000000000000000000ac7","0xc83b55bbd005f1f84906545fcdb145dee53523e0000200000000000000000b30","0xcb21a9e647c95127ed784626485b3104cb28d0e7000000000000000000000425","0xd00f9ca46ce0e4a63067c4657986f0167b0de1e5000000000000000000000b42","0xd2f3b9e67c69762dd1c88f1d3dadd1649a190761000200000000000000000bf7","0xd4accb350f9cf59fe3cf7a5ee6ed9ace6a568ea9000200000000000000000b75","0xda1cd1711743e57dd57102e9e61b75f3587703da000000000000000000000acc","0xdae301690004946424e41051ace1791083be42a1000000000000000000000b40","0xde0a77ab6689b980c30306b10f9131a007e1af81000200000000000000000ba1","0xe051605a83deae38d26a7346b100ef1ac2ef8a0b0000000000000000000003ce","0xe1fb90d0d3b47e551d494d7ebe8f209753526b01000000000000000000000ac4","0xe2272cddb2cc408e79e02a73d1db9acc24a843d5000200000000000000000ba7","0xe2dc0e0f2c358d6e31836dee69a558ab8d1390e70000000000000000000009fa","0xe4885ed2818cc9e840a25f94f9b2a28169d1aea7000000000000000000000b29","0xe6909c2f18a29d97217a6146f045e1780606991f000100000000000000000bfe","0xe78b25c06db117fdf8f98583cdaaa6c92b79e917000000000000000000000b2b","0xea11645ac7d8f2def94c9d8d86bd766296c9b6b6000000000000000000000b3a","0xeb480dbbdd921cd6c359e4cc4c65ddea6395e2a1000200000000000000000946","0xed35f28f837e96f81240ebb82e0e3f518c7e8a2f000100000000000000000bb5","0xf0211cceebe6fcc45052b4e57ee95d233f5669d2000100000000000000000c01","0xf22a66046b5307842f21b311ecb4c462c24c0635000000000000000000000b15","0xf28f17be00f8ca3c9b7f66a4aad5513757fb3341000200000000000000000b5a","0xf42ed61450458ee4620f5ef4f29adb25a6ef0fb6000000000000000000000bf8","0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56000000000000000000000445","0xf93579002dbe8046c43fefe86ec78b1112247bb8000000000000000000000759","0xf984eb2b8a7ef780245a797a2fccd82f346409ca000000000000000000000a59","0xfa2c0bd8327c99db5bde4c9e9e5cbf30946351bb000000000000000000000948","0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea600000000000000000000075a","0x1ac55c31dac78ca943cb8ebfca5945ce09e036e2000000000000000000000024","0x225e0047671939a8d78e08ebd692788abe63f15c000000000000000000000009","0x41211bba6d37f5a74b22e667533f080c7c7f3f1300000000000000000000000b","0x4de21b365d6543661d0e105e579a34b963862497000200000000000000000045","0x581ec1f5e7ced12b186deae32256adb53bdd5b08000000000000000000000001","0x66f33ae36dd80327744207a48122f874634b3ada000100000000000000000013","0xa3ed6f78edc29f69df8a0d16b1d1ccf9871f918c000000000000000000000032","0xa611a551b95b205ccd9490657acf7899daee5db700000000000000000000002e","0xb95829adbacd8af89e291dee78bc09e24de51d6b000000000000000000000043","0xb973ca96a3f0d61045f53255e319aedb6ed49240000200000000000000000011","0xba1a5b19d09a79dada039b1f974015c5a989d5fd000100000000000000000046","0xbb9cd48d33033f5effbedec9dd700c7d7e1dcf5000000000000000000000000e","0xd16f72b02da5f51231fde542a8b9e2777a478c8800000000000000000000000f","0xd4015683b8153666190e0b2bec352580ebc4caca00000000000000000000000d","0xe15cac1df3621e001f76210ab12a7f1a1691481f000000000000000000000044","0xe7f88d7d4ef2eb18fcf9dd7216ba7da1c46f3dd600000000000000000000000a","0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56000200000000000000000012","0xfedb19ec000d38d92af4b21436870f115db22725000000000000000000000010","0xffff76a3280e95dc855696111c2562da09db2ac000000000000000000000000c","0x00fcd3d55085e998e291a0005cedecf58ac14c4000020000000000000000047f","0x077794c30afeccdf5ad2abc0588e8cee7197b71a000000000000000000000352","0x117a3d474976274b37b7b94af5dcade5c90c6e85000000000000000000000381","0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000353","0x19b1c92631405a0a9495ccba0becf4f2e8e908bd000000000000000000000410","0x1e550b7764da9638fdd32c8a701364de31f45ee800000000000000000000047c","0x1fa7f727934226aedab636d62a084931b97d366b000000000000000000000411","0x23ca0306b21ea71552b148cf3c4db4fc85ae19290000000000000000000000c9","0x284eb68520c8fa83361c1a3a5910aec7f873c18b000000000000000000000380","0x2a96254ca32020b20ed3506f8f75318da24709f9000200000000000000000456","0x36942963e3b6f37ecc45a4e72349558514233f0000000000000000000000048a","0x3f53a862919ccfa023cb6ace91378a79fb0f6bf500000000000000000000040f","0x40af308e3d07ec769d85eb80afb116525ff4ac99000000000000000000000485","0x418de00ae109e6f874d872658767866d680eaa1900000000000000000000047d","0x45c4d1376943ab28802b995acffc04903eb5223f000000000000000000000470","0x4689122d360c4725d244c5cfea22861333d862e6000100000000000000000468","0x4739e50b59b552d490d3fdc60d200977a38510c0000000000000000000000409","0x49a0e3334496442a9706e481617724e7e37eaa080000000000000000000003ff","0x519cce718fcd11ac09194cff4517f12d263be067000000000000000000000382","0x52cc8389c6b93d740325729cc7c958066cee4262000000000000000000000408","0x567ecfcb22205d279bb8eed3e066989902bf03d5000000000000000000000452","0x585d95df0231fa08aeee35ff0c16b92fd0ecdc3300020000000000000000045f","0x5a7f39435fd9c381e4932fa2047c9a5136a5e3e7000000000000000000000400","0x5bae72b75caab1f260d21bc028c630140607d6e8000000000000000000000350","0x6cb787a419c3e6ee2e9ff365856c29cd10659113000000000000000000000474","0x7c82a23b4c48d796dee36a9ca215b641c6a8709d000000000000000000000406","0x81fc12c60ee5b753cf5fd0adc342dfb5f3817e3200000000000000000000035d","0x894c82800526e0391e709c0983a5aea3718b7f6d00000000000000000000034f","0x970712708a08e8fb152be4d81b2dc586923f5369000200000000000000000479","0x9bf7c3b63c77b4b4f2717776f15a4bec1b532a280000000000000000000000c8","0x9cebf13bb702f253abf1579294694a1edad00eaa000000000000000000000486","0x9e34631547adcf2f8cefa0f5f223955c7b137571000000000000000000000407","0x9fb7d6dcac7b6aa20108bad226c35b85a9e31b63000200000000000000000412","0xa1ea76c42b2938cfa9abea12357881006c52851300000000000000000000048f","0xa50f89e9f439fde2a6fe05883721a00475da3c4500000000000000000000048b","0xa612b6aed2e7ca1a3a4f23fbca9128461bbb7718000000000000000000000274","0xa8af146d79ac0bb981e4e0d8b788ec5711b1d5d000000000000000000000047b","0xad28940024117b442a9efb6d0f25c8b59e1c950b00000000000000000000046f","0xae646817e458c0be890b81e8d880206710e3c44e00000000000000000000039d","0xaef2c171dbe64b0c18977e16e70bfd29d4ee0256000000000000000000000351","0xbbf9d705b75f408cfcaee91da32966124d2c6f7d00000000000000000000047e","0xbd724eb087d4cc0f61a5fed1fffaf937937e14de000000000000000000000473","0xbe0f30217be1e981add883848d0773a86d2d2cd4000000000000000000000471","0xc46be4b8bb6b5a3d3120660efae9c5416318ed40000000000000000000000472","0xc69771058481551261709d8db44977e9afde645000010000000000000000042a","0xc6eee8cb7643ec2f05f46d569e9ec8ef8b41b389000000000000000000000475","0xcba9ff45cfb9ce238afde32b0148eb82cbe635620000000000000000000003fd","0xcf8b555b7754556cf2ac2165e77ee23ed8517d7900020000000000000000045e","0xd0dc20e6342db2de82692b8dc842301ff9121805000200000000000000000454","0xd3d5d45f4edf82ba0dfaf061d230766032a10e07000200000000000000000413","0xd6d20527c7b0669989ee082b9d3a1c63af742290000000000000000000000483","0xda1cd1711743e57dd57102e9e61b75f3587703da0000000000000000000003fc","0xe1fb90d0d3b47e551d494d7ebe8f209753526b0100000000000000000000034e","0xee02583596aee94cccb7e8ccd3921d955f17982a00000000000000000000040a","0xf984eb2b8a7ef780245a797a2fccd82f346409ca00000000000000000000034d","0xff8f84e8c87532af96aef5582ee451572233678b000200000000000000000478","0x054e7b0c73e1ee5aed6864fa511658fc2b54bcaa000000000000000000000015","0x3f1a2c4a3a751f6626bd90ef16e104f0772d4d6b00020000000000000000001b","0x7275c131b1f67e8b53b4691f92b0e35a4c1c6e22000000000000000000000010","0xa154009870e9b6431305f19b09f9cfd7284d4e7a000000000000000000000013","0xa1d14d922a575232066520eda11e27760946c991000000000000000000000012","0xa826a114b0c7db4d1ff4a4be845a78998c64564c000000000000000000000008","0xea67626e1f0b59e0d172a04f5702ef90bcdf440c00000000000000000000000f","0xeb496161099d45b3ea4892408ef745c6182eb56e00000000000000000000000e","0xece571847897fd61e764d455dc15cf1cd9de8d6f000000000000000000000014","0xed3e2f496cbcd8e212192fb8d1499842f04a0d19000000000000000000000009","0x02c9dcb975262719a61f9b40bdf0987ead9add3a000000000000000000000006","0x16c9a4d841e88e52b51936106010f27085a529ec00000000000000000000000c","0x32be2d0ddeaf3333501b24a28668ce373ba8e763000200000000000000000014","0x32f03464fdf909fdf3798f87ff3712b10c59bd86000000000000000000000005","0x4b718e0e2fea1da68b763cd50c446fba03ceb2ea00000000000000000000000b","0x68a69c596b3839023c0e08d09682314f582314e5000200000000000000000011","0x6f34a44fce1506352a171232163e7716dd073ade000200000000000000000015","0x9e2d87f904862671eb49cb358e74284762cc9f42000200000000000000000013","0xac4b72c01072a52b73ca71105504f1372efcce0d000000000000000000000003","0xbfd65c6160cfd638a85c645e6e6d8acac5dac935000000000000000000000004","0xe274c9deb6ed34cfe4130f8d0a8a948dea5bb28600000000000000000000000d"];class Fs{constructor(e){this.chainId=e,this.balancerApiUrl="https://api-v3.balancer.fi/",this.tokenPriceQuery=X` + query queryTokenPrices($chainKey: GqlChain!) { + tokenGetCurrentPrices(chains: [$chainKey]) { + address + price + } + } + `,this.chainKey=Pe[e]}async getNativeAssetPriceInToken(e){const{tokenGetCurrentPrices:t}=await Y(this.balancerApiUrl,this.tokenPriceQuery,{chainKey:this.chainKey}),a=t.find((({address:t})=>t.toLowerCase()===e.toLowerCase()));if(!a)throw new Error("Token Price not found in the API");const n=t.find((({address:e})=>e.toLowerCase()===Bs[this.chainKey]));if(!n)throw new Error("Native Token Price not found in the API");const o=a.price/n.price;return String(o)}}var Bs;function Rs(e=!0){return e?"https://api.coingecko.com/api/v3/":"https://pro-api.coingecko.com/api/v3/"}function Ns(e=!0){return e?"x-cg-demo-api-key":"x-cg-pro-api-key"}!function(e){e.MAINNET="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.POLYGON="0x0000000000000000000000000000000000001010",e.ARBITRUM="0x912ce59144191c1204e64559fe8253a0e49e6548",e.AVALANCHE="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.BASE="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.FANTOM="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.GNOSIS="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.OPTIMISM="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.ZKEVM="0xa2036f0538221a77a3937f1379699f44945018d0"}(Bs||(Bs={}));class Ls{constructor(e,t){this.chainId=e,this.urlBase=`${Rs(null==t?void 0:t.isDemoApiKey)}simple/token_price/${this.platformId}?vs_currencies=${this.nativeAssetId}`,this.coingeckoApiKeyHeaderName=Ns(null==t?void 0:t.isDemoApiKey),this.apiKey=t.coingeckoApiKey}async getNativeAssetPriceInToken(e){const t=await this.getTokenPriceInNativeAsset(e);return""+1/parseFloat(t)}async getTokenPriceInNativeAsset(e){var t;const a=`${this.urlBase}&contract_addresses=${e}`,{data:n}=await z.get(a,{headers:{Accept:"application/json","Content-Type":"application/json",[this.coingeckoApiKeyHeaderName]:null!==(t=this.apiKey)&&void 0!==t?t:""}});if(void 0===n[e.toLowerCase()]||void 0===n[e.toLowerCase()][this.nativeAssetId])throw Error("No price returned from Coingecko");return n[e.toLowerCase()][this.nativeAssetId]}get platformId(){return xn[this.chainId].thirdParty.coingecko.platformId||"2"}get nativeAssetId(){return xn[this.chainId].thirdParty.coingecko.nativeAssetId||""}}class Ds extends q{constructor(e){const t=Ms(e),a=Ds.getSorConfig(e),n=Ds.getSorNetworkConfig(t),o=new K(e.rpcUrl,e.network),i=Is(t.urls.subgraph);super(o,n,Ds.getPoolDataService(t,a,o,i),Ds.getTokenPriceService(t,a,i,e.coingecko))}static getSorConfig(e){return{tokenPriceService:"api",poolDataService:"subgraph",fetchOnChainBalances:!0,...e.sor}}static getSorNetworkConfig(e){var t;return{...e,vault:e.addresses.contracts.vault,weth:e.addresses.tokens.wrappedNativeAsset,lbpRaisingTokens:null===(t=e.addresses.tokens)||void 0===t?void 0:t.lbpRaisingTokens,wETHwstETH:e.pools.wETHwstETH,connectingTokens:e.sorConnectingTokens,triPathMidPoolIds:e.sorTriPathMidPoolIds}}static getPoolDataService(e,t,a,n){var o;const i=[...null!==(o=e.poolsToIgnore)&&void 0!==o?o:[],...Cs];return"object"==typeof t.poolDataService?t.poolDataService:new ks(n,a,{...e,poolsToIgnore:i},t)}static getTokenPriceService(e,t,a,n){return"coingecko"===t.tokenPriceService&&n?new Ls(e.chainId,n):"object"==typeof t.tokenPriceService?t.tokenPriceService:"subgraph"===t.tokenPriceService?new Os(a,e.addresses.tokens.wrappedNativeAsset):new Fs(e.chainId)}}function Us(e){if(e.poolIds.length>2)throw new Error("Simple flash swap only supports a maximum of two pools");if(e.assets.length>2)throw new Error("Simple flash swap only supports a maximum of to two assets (tokens)")}function Vs(e,t){return[{poolId:e[0],assetInIndex:0,assetOutIndex:1,amount:t,userData:"0x"},{poolId:e[1],assetInIndex:1,assetOutIndex:0,amount:"0",userData:"0x"}]}function qs(e){return-1*Number(e)}function Gs(e){return x(e)}const Ws={"0xae7ab96520de3a18e5e111b5eaab095312d7fe84":"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0","0xd46ba6d942050d489dbd938a2c909a5d5039a161":"0xedb171c18ce90b633db442f2a6f72874093b49ef","0x1e6bb68acec8fefbd87d192be09bb274170a0548":"0xF03387d8d0FF326ab586A58E0ab4121d106147DF"};function $s(e){let t=e;return Ws.hasOwnProperty(e)&&(t=Ws[e]),t}var Hs;function Ks(e,t,a){const{tokens:n,contracts:o}=En(a);let i={id:Hs.vault,address:o.vault};return n.stETH&&o.lidoRelayer&&[e,t].includes(n.stETH)&&(i={id:Hs.lido,address:o.lidoRelayer}),i}function Js(e){return e.id===Hs.lido?ma.abi.filter((e=>"function"===e.type&&e.name&&["swap","batchSwap"].includes(e.name))):nn.abi.filter((e=>"function"===e.type&&e.name&&["swap","batchSwap"].includes(e.name)))}function Xs(e){return{amount:e,max:t=>e.mul(1e4+t).div(1e4),min:t=>e.mul(1e4-t).div(1e4)}}function Ys(e,t){const a=t===In.SwapExactIn?e.swapAmount:e.returnAmount,n=t===In.SwapExactIn?e.returnAmount:e.swapAmount,o=t===In.SwapExactIn?e.swapAmountForSwaps||e.swapAmount:e.returnAmountFromSwaps||e.returnAmount,i=t===In.SwapExactIn?e.returnAmountFromSwaps||e.returnAmount:e.swapAmountForSwaps||e.swapAmount,s=$s(e.tokenIn),r=$s(e.tokenOut);return{...e,amountIn:a,amountOut:n,amountInForLimits:Xs(o),amountOutForLimits:Xs(i),tokenInForSwaps:s,tokenOutFromSwaps:r}}!function(e){e[e.vault=1]="vault",e[e.lido=2]="lido"}(Hs||(Hs={}));class js{constructor(e,t,a){this.kind=t,this.chainId=a,this.functionName="swap",this.swapInfo=Ys(e,t),this.relayer=Ks(this.swapInfo.tokenIn,this.swapInfo.tokenOut,this.chainId)}setFunds(e,t){this.funds={sender:e,recipient:t||e,fromInternalBalance:!1,toInternalBalance:!1}}setDeadline(e){this.deadline=e}get amount(){return this.kind===In.SwapExactOut?this.swapInfo.amountOutForLimits.amount:this.swapInfo.amountInForLimits.amount}setLimits(e){this.limit=this.kind===In.SwapExactIn?this.swapInfo.amountOutForLimits.min(e).toString():this.swapInfo.amountInForLimits.max(e).toString()}get singleSwap(){return{poolId:this.swapInfo.swaps[0].poolId,kind:this.kind,assetIn:this.swapInfo.tokenInForSwaps,assetOut:this.swapInfo.tokenOutFromSwaps,amount:this.amount.toString(),userData:"0x"}}attributes(){var e;if(!this.funds||!this.limit||!this.deadline)throw new Error("Uninitialized arguments");let t={request:this.singleSwap,funds:this.funds,limit:this.limit,deadline:this.deadline};const a=this.fragment();return a[0].inputs&&(null===(e=a[0].inputs)||void 0===e?void 0:e.length)>4&&(t={...t,value:"0",outputReference:"0"}),t}data(){return new t(this.fragment()).encodeFunctionData("swap",Object.values(this.attributes()))}value(e){let t=p.from(0);return this.swapInfo.tokenIn===o&&(t=this.kind===In.SwapExactIn?this.swapInfo.amountIn:this.swapInfo.amountInForLimits.max(e)),t}to(){return this.relayer.address}fragment(){return Js(this.relayer).filter((e=>e.name===this.functionName))}}class zs{constructor(e,t,a){this.kind=t,this.chainId=a,this.functionName="batchSwap",this.swapInfo=Ys(e,t),this.relayer=Ks(this.swapInfo.tokenIn,this.swapInfo.tokenOut,this.chainId)}setFunds(e,t){this.funds={sender:e,recipient:t||e,fromInternalBalance:!1,toInternalBalance:!1}}setDeadline(e){this.deadline=e}minAmountOut(e){return this.kind===In.SwapExactIn?this.swapInfo.amountOutForLimits.min(e):this.swapInfo.amountOutForLimits.amount}maxAmountIn(e){return this.kind===In.SwapExactOut?this.swapInfo.amountInForLimits.max(e):this.swapInfo.amountInForLimits.amount}setLimits(e){this.limits=this.swapInfo.tokenAddresses.map((t=>{let a=p.from(0);return t===this.swapInfo.tokenInForSwaps&&(a=this.maxAmountIn(e)),t===this.swapInfo.tokenOutFromSwaps&&(a=this.minAmountOut(e).mul(-1)),a})).map((e=>e.toString().split(".")[0]))}attributes(){var e;if(!this.funds||!this.limits||!this.deadline)throw new Error("Uninitialized arguments");let t={kind:this.kind,swaps:this.swapInfo.swaps,assets:this.swapInfo.tokenAddresses,funds:this.funds,limits:this.limits,deadline:this.deadline};const a=this.fragment();return a[0].inputs&&(null===(e=a[0].inputs)||void 0===e?void 0:e.length)>6&&(t={...t,value:"0",outputReferences:[]}),t}data(){return new t(this.fragment()).encodeFunctionData("batchSwap",Object.values(this.attributes()))}value(e){let t=p.from(0);return this.swapInfo.tokenIn===o&&(t=this.maxAmountIn(e)),t}to(){return this.relayer.address}fragment(){return Js(this.relayer).filter((e=>e.name===this.functionName))}}const Zs={maxPools:4,gasPrice:"1",deadline:"999999999999999999",maxSlippage:10};class Qs{constructor(e){e instanceof q?(this.sor=e,this.chainId=this.sor.provider._network.chainId):(this.sor=new Ds(e),"number"==typeof e.network?this.chainId=e.network:this.chainId=e.network.chainId),this.vaultContract=nn.connect(wn,this.sor.provider)}static getLimitsForSlippage(e,t,a,n,o,i){return gn(e,t,a,n,o,i).map((e=>e.toString()))}async findRouteGivenIn({tokenIn:e,tokenOut:t,amount:a,gasPrice:n,maxPools:o=4}){return this.sor.getSwaps(e,t,V.SwapExactIn,a,{gasPrice:n,maxPools:o})}async findRouteGivenOut({tokenIn:e,tokenOut:t,amount:a,gasPrice:n,maxPools:o=4}){return this.sor.getSwaps(e,t,V.SwapExactOut,a,{gasPrice:n,maxPools:o})}buildSwap({userAddress:e,recipient:t,swapInfo:a,kind:n,deadline:o,maxSlippage:i}){if(!this.chainId)throw"Missing network configuration";const s=a.swaps.length>1?new zs(a,n,this.chainId):new js(a,n,this.chainId);s.setFunds(e,t),s.setDeadline(o),s.setLimits(i);const r=s.to(),{functionName:p}=s;return{to:r,functionName:p,attributes:s.attributes(),data:s.data(),value:s.value(i)}}async buildRouteExactIn(e,t,a,n,o,i=Zs){const s={...Zs,...i},r=await this.findRouteGivenIn({tokenIn:a,tokenOut:n,amount:p.from(o),gasPrice:p.from(s.gasPrice),maxPools:s.maxPools});return this.buildSwap({userAddress:e,recipient:t,swapInfo:r,kind:In.SwapExactIn,deadline:s.deadline,maxSlippage:s.maxSlippage})}static encodeBatchSwap(e){return nn.createInterface().encodeFunctionData("batchSwap",[e.kind,e.swaps,e.assets,e.funds,e.limits,e.deadline])}static encodeSimpleFlashSwap(e){return this.encodeBatchSwap(function({poolIds:e,assets:t,flashLoanAmount:a,walletAddress:n}){Us({poolIds:e,assets:t});const o=Vs(e,a),i={sender:n,fromInternalBalance:!1,recipient:n,toInternalBalance:!1};return{kind:In.SwapExactIn,swaps:o,assets:t,funds:i,limits:["0","0"],deadline:"999999999999999999"}}(e))}async fetchPools(e){return this.sor.fetchPools(e)}getPools(){return this.sor.getPools()}async queryBatchSwap(e){return await Oo(this.vaultContract,e.kind,e.swaps,e.assets)}async querySimpleFlashSwap(e){return await async function(e){Us(e);const[t,a]=e.assets;try{const n=await Oo(e.vaultContract,In.SwapExactIn,Vs(e.poolIds,e.flashLoanAmount),e.assets),o={[t]:qs(n[0]).toString(),[a]:qs(n[1]).toString()};return{profits:o,isProfitable:Gs([o[t],o[a]])>0}}catch(e){throw`Failed to querySimpleFlashSwap: ${e}`}}({...e,vaultContract:this.vaultContract})}async getSorSwap(e){return await async function(e,t,a,n,o){const i=a===In.SwapExactIn?V.SwapExactIn:V.SwapExactOut;return await o.getSwaps(e.toLowerCase(),t.toLowerCase(),i,n)}(e.tokenIn,e.tokenOut,e.swapType,e.amount,this.sor)}async queryExactIn(e){const t=await this.query(e,In.SwapExactIn);return this.assetDeltas(t.map(String),e.tokenAddresses)}async queryExactOut(e){const t=await this.query(e,In.SwapExactOut);return this.assetDeltas(t.map(String),e.tokenAddresses)}query(e,t){const{swaps:a,tokenAddresses:n}=e,i={sender:o,recipient:o,fromInternalBalance:!1,toInternalBalance:!1};return this.vaultContract.callStatic.queryBatchSwap(t,a,n,i)}assetDeltas(e,t){return Object.fromEntries(e.map(((e,a)=>[t[a],e])))}}var er;!function(e){e[e.WEIGHTED=0]="WEIGHTED",e[e.LEGACY_STABLE=1]="LEGACY_STABLE",e[e.COMPOSABLE_STABLE=2]="COMPOSABLE_STABLE",e[e.COMPOSABLE_STABLE_V2=3]="COMPOSABLE_STABLE_V2"}(er||(er={}));const tr=ma.createInterface();class ar{static encodeApproveVault(e,t){return tr.encodeFunctionData("approveVault",[e,t])}static encodeSetRelayerApproval(e,t,a){return tr.encodeFunctionData("setRelayerApproval",[e,t,a])}static encodeGaugeWithdraw(e,t,a,n){return tr.encodeFunctionData("gaugeWithdraw",[e,t,a,n])}static encodeGaugeDeposit(e,t,a,n){return tr.encodeFunctionData("gaugeDeposit",[e,t,a,n])}static encodeSwap(e){return tr.encodeFunctionData("swap",[e.request,e.funds,e.limit,e.deadline,e.value,e.outputReference])}static encodeBatchSwap(e){return tr.encodeFunctionData("batchSwap",[e.swapType,e.swaps,e.assets,e.funds,e.limits,e.deadline,e.value,e.outputReferences])}static encodeExitPool(e){return tr.encodeFunctionData("exitPool",[e.poolId,e.poolKind,e.sender,e.recipient,e.exitPoolRequest,e.outputReferences])}static encodeJoinPool(e){return tr.encodeFunctionData("joinPool",[e.poolId,e.kind,e.sender,e.recipient,e.joinPoolRequest,e.value,e.outputReference])}static encodeWrapAaveDynamicToken(e){return tr.encodeFunctionData("wrapAaveDynamicToken",[e.staticToken,e.sender,e.recipient,e.amount,e.fromUnderlying,e.outputReference])}static encodeUnwrapAaveStaticToken(e){return tr.encodeFunctionData("unwrapAaveStaticToken",[e.staticToken,e.sender,e.recipient,e.amount,e.toUnderlying,e.outputReference])}static encodeUnwrapWstETH(e){return tr.encodeFunctionData("unwrapWstETH",[e.sender,e.recipient,e.amount,e.outputReference])}static encodeUnwrap(e,t){let a;switch(t){case"AaveLinear":return this.encodeUnwrapAaveStaticToken({staticToken:e.wrappedToken,sender:e.sender,recipient:e.recipient,amount:e.amount,toUnderlying:!0,outputReference:e.outputReference});case"BeefyLinear":case"ERC4626Linear":a="unwrapERC4626";break;case"EulerLinear":a="unwrapEuler";break;case"GearboxLinear":a="unwrapGearbox";break;case"ReaperLinear":a="unwrapReaperVaultToken";break;case"TetuLinear":a="unwrapTetu";break;case"YearnLinear":a="unwrapYearn";break;case"MidasLinear":a="unwrapCompoundV2";break;case"SiloLinear":a="unwrapShareToken";break;default:throw new Error("Unwrapping not supported for this pool type: "+t)}return tr.encodeFunctionData(a,[e.wrappedToken,e.sender,e.recipient,e.amount,e.outputReference])}static encodePeekChainedReferenceValue(e){return tr.encodeFunctionData("peekChainedReferenceValue",[e])}static toChainedReference(e,t=!0){const a=t?ar.CHAINED_REFERENCE_TEMP_PREFIX:ar.CHAINED_REFERENCE_READONLY_PREFIX,n=`0x${a}${"0".repeat(64-a.length)}`;return p.from(n).add(e)}static fromChainedReference(e,t=!0){const a=t?ar.CHAINED_REFERENCE_TEMP_PREFIX:ar.CHAINED_REFERENCE_READONLY_PREFIX,n=`0x${a}${"0".repeat(64-a.length)}`;return p.from(e).sub(p.from(n))}static isChainedReference(e){const t=p.from(e),a=p.from("0xfff0000000000000000000000000000000000000000000000000000000000000"),n=t.toBigInt()&a.toBigInt();return"0xba10000000000000000000000000000000000000000000000000000000000000"===p.from(n)._hex.toString()}static formatExitPoolInput(e){const{assets:t,minAmountsOut:a,userData:n,toInternalBalance:o,poolId:i,poolKind:s,sender:r,recipient:p,outputReferences:d}=e;return{poolId:i,poolKind:s,sender:r,recipient:p,outputReferences:d,exitPoolRequest:{assets:t,minAmountsOut:a,userData:n,toInternalBalance:o}}}static formatJoinPoolInput(e){const{assets:t,maxAmountsIn:a,userData:n,fromInternalBalance:o,poolId:i,kind:s,sender:r,recipient:p,value:d,outputReference:l}=e;return{poolId:i,kind:s,sender:r,recipient:p,value:d,outputReference:l,joinPoolRequest:{assets:t,maxAmountsIn:a,userData:n,fromInternalBalance:o}}}}ar.CHAINED_REFERENCE_TEMP_PREFIX="ba10",ar.CHAINED_REFERENCE_READONLY_PREFIX="ba11",ar.signRelayerApproval=async(e,t,a,n)=>{const o=n.interface.encodeFunctionData("setRelayerApproval",[t,e,!0]),s=await Ge.signSetRelayerApprovalAuthorization(n,a,e,o);return Ge.encodeCalldataAuthorization("0x",i,s)};class nr{constructor(e){this.url=Ms(e).urls.subgraph,this.client=this.initClient()}initClient(){return Hi(new J(this.url))}}class or{constructor(e,t){this.swaps=t||new Qs(e)}async fetchPools(){return this.swaps.fetchPools()}getPools(){return this.swaps.getPools()}async getSpotPrice(e,t,a=[]){0===a.length&&(await this.fetchPools(),a=this.getPools());const n=G(a,0),o=this.swaps.sor.routeProposer.getCandidatePathsFromDict(e,t,0,n,4);if(0===o.length)throw new vn(An.UNSUPPORTED_PAIR);return W(o[0],0,F).toString()}}const ir=["function getPoolId() view returns (bytes32)","function getSwapFeePercentage() view returns (uint256)","function getProtocolFeesCollector() view returns (address)","function inRecoveryMode() view returns (bool)"];class sr{constructor(e,a,n={}){this.multicall=e,this.options=n,this.calls=[],this.paths=[],this.interface=new t(a)}call(e,t,a,n){return this.calls.push([t,a,n]),this.paths.push(e),this}async execute(e={}){const t=e;return(await this.executeMulticall()).forEach(((e,a)=>g(t,this.paths[a],e.length>1?e:e[0]))),this.calls=[],this.paths=[],t}async executeMulticall(){const[,e]=await this.multicall.callStatic.aggregate(this.calls.map((([e,t,a])=>({target:e,callData:this.interface.encodeFunctionData(t,a)}))),this.options);return e.map(((e,t)=>this.interface.decodeFunctionResult(this.calls[t][1],e)))}}function rr(e){return Math.round(Date.now()/1e3)-e<86400}class pr{constructor(e,t){this.veBalAddress=e,this.multicall=t}async getLockInfo(e){if(!this.veBalAddress)throw new Error("veBal address must be defined");const t=new sr(this.multicall,[...fn.abi]);t.call("locked",this.veBalAddress,"locked",[e]),t.call("epoch",this.veBalAddress,"epoch"),t.call("totalSupply",this.veBalAddress,"totalSupply()");const a=await t.execute();return this.formatLockInfo(a)}formatLockInfo(e){const[t,a]=e.locked,n=t.gt(0),o=1e3*a.toNumber();const i=n&&Date.now()>o;return{lockedEndDate:o,lockedAmount:It(t),totalSupply:It(e.totalSupply),epoch:It(e.epoch,0),hasExistingLock:n,isExpired:i}}}class dr{constructor(e,t){if(!e.veBalProxy)throw new Error("veBalProxy address must be defined");this.instance=hn.connect(e.veBalProxy,t)}async getAdjustedBalance(e){return It(await this.instance.adjustedBalanceOf(e))}}class lr{constructor(e,t){this.getLiquidityGauge=Ja.connect,this.contractAddresses="number"==typeof e?xn[e].addresses.contracts:e;const a=nn.connect(this.contractAddresses.vault,t),n=ra.connect(this.contractAddresses.balancerHelpers,t);let o;this.contractAddresses.lidoRelayer&&(o=Wa.connect(this.contractAddresses.lidoRelayer,t));const i=Ya.connect(this.contractAddresses.multicall,t),s=ya.connect(this.contractAddresses.balancerRelayer,t);let r,p,d,l,u,c,y,b,m,f,T;this.contractAddresses.veBal&&(r=new pr(this.contractAddresses.veBal,i)),this.contractAddresses.veBalProxy&&(p=new dr(this.contractAddresses,t)),this.contractAddresses.gaugeClaimHelper&&(d=Ra.connect(this.contractAddresses.gaugeClaimHelper,t)),this.contractAddresses.composableStablePoolFactory&&(l=Ia.connect(this.contractAddresses.composableStablePoolFactory,t)),this.contractAddresses.weightedPoolFactory&&(u=pn.connect(this.contractAddresses.weightedPoolFactory,t)),this.contractAddresses.aaveLinearPoolFactory&&(c=ta.connect(this.contractAddresses.aaveLinearPoolFactory,t)),this.contractAddresses.erc4626LinearPoolFactory&&(y=va.connect(this.contractAddresses.erc4626LinearPoolFactory,t)),this.contractAddresses.eulerLinearPoolFactory&&(b=Ma.connect(this.contractAddresses.eulerLinearPoolFactory,t)),this.contractAddresses.gearboxLinearPoolFactory&&(m=Ua.connect(this.contractAddresses.gearboxLinearPoolFactory,t)),this.contractAddresses.yearnLinearPoolFactory&&(f=cn.connect(this.contractAddresses.yearnLinearPoolFactory,t)),this.contractAddresses.gyroConfigProxy&&(T=qa.connect(this.contractAddresses.gyroConfigProxy,t)),this.instances={aaveLinearPoolFactory:c,balancerHelpers:n,BasePool:this.getBasePool,composableStablePoolFactory:l,ERC20:this.getErc20,erc4626LinearPoolFactory:y,eulerLinearPoolFactory:b,gaugeClaimHelper:d,gearboxLinearPoolFactory:m,gyroConfig:T,liquidityGauge:this.getLiquidityGauge,lidoRelayer:o,multicall:i,relayer:s,veBal:r,veBalProxy:p,weightedPoolFactory:u,yearnLinearPoolFactory:f,vault:a}}get contracts(){return this.instances}getErc20(e,t){return wa.connect(e,t)}getBasePool(e,t){return((e,t)=>new Z(e,ir,t))(e,t)}}class ur{constructor(e,t){this.tokenPrices=e,this.tokenHistoricalPrices=t}async calcImpLoss(e,t){if(1e3*e>=Date.now())throw console.error(`[ImpermanentLossService][calcImpLoss]Error: ${vn.getMessage(An.TIMESTAMP_IN_THE_FUTURE)}`),new vn(An.TIMESTAMP_IN_THE_FUTURE);const a=await this.prepareData(e,t),n=this.getPoolValueDelta(a),o=this.getHoldValueDelta(a);return this.calculateImpermanentLoss(n,o)}calculateImpermanentLoss(e,t){return Math.floor(100*Math.abs(e/t-1)*100)/100}getPoolValueDelta(e){return e.reduce(((e,t)=>e*Math.pow(Math.abs(t.priceDelta+1),t.weight)),1)}getHoldValueDelta(e){return e.reduce(((e,t)=>e+Math.abs(t.priceDelta+1)*t.weight),0)}async prepareData(e,t){const a=t.tokens.filter((e=>e.address!==t.address)),n=this.getWeights(a),o=a.map((e=>e.address)),i=await this.getEntryPrices(e,o),s=await this.getExitPrices(a);return this.getAssets(a,s,i,n)}getAssets(e,t,a,n){return e.map(((e,o)=>({priceDelta:this.getDelta(a[e.address],t[e.address]),weight:n[o]})))}getDelta(e,t){if(0===e)throw console.error(`[ImpermanentLossService][getDelta]Error: ${vn.getMessage(An.ILLEGAL_PARAMETER)}: entry price is 0`),new vn(An.ILLEGAL_PARAMETER);return(t-e)/e}getWeights(e){const t=e.every((e=>!e.weight)),a=Math.round(1/e.length*100)/100,n=t?e.map((()=>a)):e.map((e=>{var t;return Number(null!==(t=e.weight)&&void 0!==t?t:0)}));if(n.some((e=>0===e)))throw console.error(`[ImpermanentLossService][getWeights]Error: ${vn.getMessage(An.MISSING_WEIGHT)}`),new vn(An.MISSING_WEIGHT);return n}async getExitPrices(e){var t;const a=await Promise.all(e.map((e=>this.tokenPrices.find(e.address)))).catch((()=>[]));if(!a.length||a.some((e=>void 0===(null==e?void 0:e.usd))))throw console.error(`[ImpermanentLossService][getExitPrices]Error: ${vn.getMessage(An.MISSING_PRICE_RATE)}`),new vn(An.MISSING_PRICE_RATE);const n=e.map(((e,t)=>({...e,price:a[t]}))),o={};for(const e of n)(null===(t=e.price)||void 0===t?void 0:t.usd)&&(o[e.address]=+e.price.usd);return o}async getEntryPrices(e,t){const a={};for(const n of t){const t=await this.tokenHistoricalPrices.findBy(n,e).catch((e=>{Re.getInstance().warn(`[ImpermanentLossService][getEntryPrices]Error: ${e.message}`)}));if(!(null==t?void 0:t.usd)){throw Re.getInstance().warn(`[ImpermanentLossService][getEntryPrices]Error: ${vn.getMessage(An.MISSING_PRICE_RATE)}`),new vn(An.MISSING_PRICE_RATE)}a[n]=+t.usd}return a}}const cr=145e3,yr=1648465251,br=31536e3,mr=2**(1/4),fr=(e=Math.round((new Date).getTime()/1e3))=>{const t=Math.floor((e-yr)/br);return cr*mr**-t},Tr=e=>365*(cr*mr**-e/7);var hr=Object.freeze({__proto__:null,INITIAL_RATE:cr,START_EPOCH_TIME:yr,weekly:fr,total:Tr,between:(e,t)=>{if(et.address!==e.address)),n=await Promise.all(a.map((async t=>{let a=0;const n=await this.tokenYields.find(t.address);if(n)a="MetaStable"===e.poolType||e.poolType.includes("Gyro")?n*(1-await this.protocolSwapFeePercentage(e)):"ComposableStable"===e.poolType||"Weighted"===e.poolType&&e.poolTypeVersion>=2?t.isExemptFromYieldProtocolFee?n:n*(1-parseFloat(e.protocolYieldFeeCache||"0.5")):n;else{const n=await this.pools.findBy("address",t.address);if(n){const o=await this.swapFees(n);let i=(await this.tokenAprs(n)).total;("ComposableStable"===e.poolType||"Weighted"===e.poolType&&2===e.poolTypeVersion)&&(t.isExemptFromYieldProtocolFee||(i*=1-parseFloat(e.protocolYieldFeeCache||"0.5"))),a=o+i}}return a}))),o=async e=>{var a,n,o,i,s;let r;if(e.weight)return parseFloat(e.weight);if(null===(n=null===(a=e.token)||void 0===a?void 0:a.pool)||void 0===n?void 0:n.poolType){const t=await this.pools.findBy("address",e.address);t&&(r=(await this.bptPrice(t)).toString())}else r=(null===(o=e.price)||void 0===o?void 0:o.usd)||(null===(i=await this.tokenPrices.find(e.address))||void 0===i?void 0:i.usd)||(null===(s=e.token)||void 0===s?void 0:s.latestUSDPrice);if(r){return parseFloat(e.balance)*parseFloat(r)/parseFloat(t)}throw`No price for ${e.address}`},i=await Promise.all(a.map((async(e,t)=>{if(0===n[t])return 0;try{const a=await o(e);return Math.round(n[t]*a)}catch(e){return Re.getInstance().error(e),0}}))),s=i.reduce(((e,t)=>e+t),0);return{total:s,breakdown:E(A(a.map((e=>e.address)),i),v)}}async stakingApr(e,t=1){if(!this.liquidityGauges)return 0;const a=await this.liquidityGauges.findBy("poolId",e.id);if(!a||1==e.chainId&&0===a.workingSupply||e.chainId>1&&0===a.totalSupply||e.chainId>1&&0===a.balInflationRate)return 0;const n=xn[e.chainId].addresses.tokens.bal;if(!n)return 0;const[o,i]=await Promise.all([this.tokenPrices.find(n),this.bptPrice(e)]);if(!(null==o?void 0:o.usd))throw"Missing BAL price";const s=(a.workingSupply+.4)/.4*i;if(a.balInflationRate){const e=86400*a.balInflationRate*365*parseFloat(o.usd);return Math.round(1e4*t*e/s)}if(e.chainId>1){if(!a.rewardTokens)return 0;const e=n&&a.rewardTokens[n];if(!e)return 0;{let t;try{t=await this.rewardTokenApr(n,e);const o=a.totalSupply*i,s=t.value/o;return Math.round(1e4*s)}catch(e){return 0}}}const r=parseFloat(o.usd),p=Math.round((new Date).getTime()/1e3),d=fr(p)/7*365*a.relativeWeight*r;return Math.round(1e4*t*d/s)}async rewardAprs(e){if(!this.liquidityGauges)return{total:0,breakdown:{}};const t=await this.liquidityGauges.findBy("poolId",e.id);if(!t||!t.rewardTokens||Object.keys(t.rewardTokens).length<1)return{total:0,breakdown:{}};const a=xn[e.chainId].addresses.tokens.bal,n=Object.keys(t.rewardTokens).filter((e=>e!=a)).map((async e=>{const a=t.rewardTokens[e];try{return await this.rewardTokenApr(e,a)}catch(t){return{address:e,value:0}}})),o=await this.bptPrice(e),i=t.totalSupply*o;if(0==i)return{total:0,breakdown:{}};const s={};let r=0;for await(const e of Object.values(n)){const t=e.value/i,a=Math.round(1e4*t);r+=a,s[e.address]=a}return{total:r,breakdown:s}}async protocolApr(e){if("0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014"!=e.id||!this.feeDistributor)return 0;const t=new Ir(this.feeDistributor,this.tokenPrices),{lastWeekBalRevenue:a,lastWeekBBAUsdRevenue:n,veBalSupply:o}=await t.data(),i=await this.bptPrice(e);if(!i)throw"bptPrice for veBal pool missing";const s=(a+n)/7;return Math.round(365*s*1e4/(i*o))}async apr(e){if(Cs.includes(e.id))return{swapFees:0,tokenAprs:{total:0,breakdown:{}},stakingApr:{min:0,max:0},rewardAprs:{total:0,breakdown:{}},protocolApr:0,min:0,max:0};const[t,a,n,o,i,s]=await Promise.all([this.swapFees(e),this.tokenAprs(e),this.stakingApr(e),this.stakingApr(e,2.5),this.rewardAprs(e),this.protocolApr(e)]);return{swapFees:t,tokenAprs:a,stakingApr:{min:n,max:o},rewardAprs:i,protocolApr:s,min:t+a.total+i.total+n,max:t+a.total+i.total+s+o}}async last24hFees(e){return new _r(this.yesterdaysPools).last24h(e)}async totalLiquidity(e){try{const t=new go(this.pools,this.tokenPrices);return await t.getLiquidity(e)}catch(t){return Re.getInstance().warn("Liquidity calculcation failed, falling back to subgraph"),e.totalLiquidity}}async bptPrice(e){return parseFloat(await this.totalLiquidity(e))/parseFloat(e.totalShares)}async protocolSwapFeePercentage(e){let t=.5;return t=e.poolType.includes("Gyro")&&this.gyroConfigRepository?await this.gyroConfigRepository.getGyroProtocolFee(e.address):e.protocolSwapFeeCache?parseFloat(e.protocolSwapFeeCache):await this.feeCollector.find("")||.5,t}async rewardTokenApr(e,t){if(t.period_finish.toNumber(){e.includes("Linear")&&Pr.includes(e)&&wr.set(e,"batchSwap")})),wr.set(Be.Element,"batchSwap"),wr.set(Be.Investment,"joinPool"),wr.set(Be.LiquidityBootstrapping,"joinPool"),wr.set(Be.MetaStable,"joinPool"),wr.set(Be.Stable,"joinPool"),wr.set(Be.StablePhantom,"batchSwap"),wr.set(Be.Weighted,"joinPool"),wr.set(Be.ComposableStable,"joinPool");const xr=new Map;Pr.forEach((e=>{e.includes("Linear")&&Pr.includes(e)&&xr.set(e,"batchSwap")})),xr.set(Be.Element,"batchSwap"),xr.set(Be.Investment,"exitPool"),xr.set(Be.LiquidityBootstrapping,"exitPool"),xr.set(Be.MetaStable,"exitPool"),xr.set(Be.Stable,"exitPool"),xr.set(Be.StablePhantom,"batchSwap"),xr.set(Be.Weighted,"exitPool"),xr.set(Be.ComposableStable,"exitPool");class Er{constructor(e){this.pools=e,this.getGraphNodes=async(e,t,a)=>{if(!await this.pools.find(t))throw new vn(An.POOL_DOESNT_EXIST);const n=await this.buildGraphFromRootPool(t,a);if(n.id!==t)throw new Error("Error creating graph nodes");return e?Er.orderByBfs(n).reverse():Er.orderByBfs(n)}}async buildGraphFromRootPool(e,t){const n=await this.pools.find(e);if(!n)throw new vn(An.POOL_DOESNT_EXIST);return(await this.buildGraphFromPool(n.address,0,void 0,a,t))[0]}getTokenTotal(e){const t=e.tokensList.indexOf(e.address);let a=n;const{balancesEvm:o}=nt(e);return o.forEach(((e,n)=>{t!==n&&(a=a.add(e))})),a}async buildGraphFromPool(e,t,n,o,i){var s;const r=await this.pools.findBy("address",e);if(!r){if(n){const a=await this.pools.findBy("address",n.address),i=a.tokensList.indexOf(e),r=null!==(s=a.tokens[i].decimals)&&void 0!==s?s:18,{balancesEvm:p}=nt(a);return Er.createInputTokenNode(t,e,r,n,o,p[i].toString())}throw new vn(An.POOL_DOESNT_EXIST)}const l=wr.get(r.poolType),u=xr.get(r.poolType);if(!l||!u)throw new vn(An.UNSUPPORTED_POOL_TYPE);const c=this.getTokenTotal(r),{spotPriceCalculator:y}=_o.from(r.poolType),b={};let m=18;r.tokens.forEach((e=>{if(Vt(e.address,r.address))return void(m=e.decimals?e.decimals:18);const t=y.calcPoolSpotPrice(e.address,r.address,r);b[e.address]=t}));let f={address:r.address,id:r.id,type:r.poolType,joinAction:l,exitAction:u,isProportionalExit:!1,children:[],marked:!1,index:t.toString(),parent:n,proportionOfParent:o,isLeaf:!1,spotPrices:b,decimals:m,balance:r.totalShares,priceRate:a.toString()};if(this.updateNodeIfProportionalExit(r,f),t++,r.poolType.toString().includes("Linear"))[f,t]=this.createLinearNodeChildren(f,t,r,i);else{const{balancesEvm:e}=nt(r);for(let a=0;a2)&&(t.isProportionalExit=!0)}createLinearNodeChildren(e,t,a,n){var o;if(void 0===a.mainIndex)throw new Error("Issue With Linear Pool");if(n.map((e=>e.toLowerCase())).includes(a.tokensList[a.mainIndex].toLowerCase())){const n=this.createWrappedTokenNode(a,t,e,e.proportionOfParent);return e.children.push(n[0]),[e,n[1]]}{const{balancesEvm:n}=nt(a),i=null!==(o=a.tokens[a.mainIndex].decimals)&&void 0!==o?o:18,s=Er.createInputTokenNode(t,a.tokensList[a.mainIndex],i,e,e.proportionOfParent,n[a.mainIndex].toString());return e.children.push(s[0]),[e,t=s[1]]}}createWrappedTokenNode(e,t,a,n){var o;if(void 0===e.wrappedIndex||void 0===e.mainIndex)throw new Error("Issue With Linear Pool");const{balancesEvm:i,upScaledBalances:s,scalingFactorsRaw:r,priceRates:p}=nt(e),d={type:"WrappedToken",address:e.tokensList[e.wrappedIndex],id:"N/A",children:[],marked:!1,joinAction:"wrap",exitAction:"unwrap",isProportionalExit:!1,index:t.toString(),parent:a,proportionOfParent:n,isLeaf:!1,spotPrices:{},decimals:18,balance:i[e.wrappedIndex].toString(),priceRate:p[e.wrappedIndex].toString()};t++;const l=null!==(o=e.tokens[e.mainIndex].decimals)&&void 0!==o?o:18,u=Ze(s[e.wrappedIndex],r[e.mainIndex]).toString(),c=Er.createInputTokenNode(t,e.tokensList[e.mainIndex],l,d,n,u);return d.children=[c[0]],[d,t=c[1]]}static createInputTokenNode(e,t,n,o,i,s){return[{address:t,id:"N/A",type:"Input",children:[],marked:!1,joinAction:"input",exitAction:"output",isProportionalExit:!1,index:e.toString(),parent:o,proportionOfParent:i,isLeaf:!0,spotPrices:{},decimals:n,balance:s,priceRate:a.toString()},e+1]}static orderByBfs(e){const t=[],a=[];for(e.marked=!0,t.push(e);t.length>0;){const e=t.shift();e&&a.push(e),null==e||e.children.forEach((e=>{e.marked||(e.marked=!0,t.push(e))}))}return a}static getLeafAddresses(e){return e.filter((e=>e.isLeaf)).map((e=>e.address))}static isProportionalPools(e){return e.every((e=>!(e.children.length>1)||e.isProportionalExit))}}class Ar{constructor(){}}Ar.joinInit=t=>e.decode(["uint256","uint256[]"],t),Ar.joinExactTokensInForBPTOut=t=>e.decode(["uint256","uint256[]","uint256"],t),Ar.joinTokenInForExactBPTOut=t=>e.decode(["uint256","uint256","uint256"],t),Ar.joinAllTokensInForExactBPTOut=t=>e.decode(["uint256","uint256"],t),Ar.exitExactBPTInForOneTokenOut=t=>e.decode(["uint256","uint256","uint256"],t),Ar.exitExactBPTInForTokensOut=t=>e.decode(["uint256","uint256"],t),Ar.exitBPTInForExactTokensOut=t=>e.decode(["uint256","uint256[]","uint256"],t);class vr{constructor(e){this.relayerModel=e}joinKind(t){const a=e.decode(["uint256"],t)[0];if(!a)throw new Error("No exit kind.");return a.toNumber()}decodeJoinData(e,t){if(t===oe.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT){return Ar.joinAllTokensInForExactBPTOut(e).toString()}if(t===oe.EXACT_TOKENS_IN_FOR_BPT_OUT){const[,t]=Ar.joinExactTokensInForBPTOut(e);return t}if(t===oe.TOKEN_IN_FOR_EXACT_BPT_OUT){const[,t,a]=Ar.joinTokenInForExactBPTOut(e);return[t.toString(),a]}throw new Error("Non supported join data")}allTokensInForExactBPTOut(){throw new Error("joinAllTokensInForExactBPTOut not supported")}joinExactTokensInForBPTOut(e,t){const a=this.decodeJoinData(e,oe.EXACT_TOKENS_IN_FOR_BPT_OUT),n=this.relayerModel.doChainedRefReplacements(a),o=t._calcBptOutGivenExactTokensIn(n.map((e=>p.from(e))));if("StablePhantom"==t.SubgraphType||"ComposableStable"==t.SubgraphType){const e=t.tokens.find((e=>Vt(e.address,t.address)));if(!e)throw new Error("Pool does not contain BPT as a token");const a=d(e.balance.toString(),e.decimals);t.updateTokenBalanceForPool(t.address,a.sub(o))}else t.updateTokenBalanceForPool(t.address,t.totalShares.add(o));const i=t.tokens.filter((e=>!Vt(e.address,t.address)));return n.forEach(((e,a)=>{const n=d(i[a].balance.toString(),i[a].decimals);t.updateTokenBalanceForPool(i[a].address,n.add(e))})),[o.toString(),i.map((e=>e.address)),n]}joinTokenInForExactBPTOut(e,t){const[a,n]=this.decodeJoinData(e,oe.TOKEN_IN_FOR_EXACT_BPT_OUT),o=this.relayerModel.doChainedRefReplacement(a),i=t.parsePoolPairData(t.tokensList[Number(n)],t.address),s=l(o,18),r=t._tokenInForExactTokenOut(i,$(s.toString())).dp(i.decimalsIn),p=d(r.toString(),i.decimalsIn);return t.updateTokenBalanceForPool(i.tokenIn,i.balanceIn.add(p)),t.updateTokenBalanceForPool(i.tokenOut,i.balanceOut.add(o)),[p.toString(),i.tokenIn,p.toString()]}async doJoinPool(e,t){const a=t[e.poolId],o=this.joinKind(e.encodedUserData);let i="0",s=[],r=[];if(o===oe.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT)i=this.allTokensInForExactBPTOut();else if(o===oe.EXACT_TOKENS_IN_FOR_BPT_OUT)[i,s,r]=this.joinExactTokensInForBPTOut(e.encodedUserData,a);else{if(o!==oe.TOKEN_IN_FOR_EXACT_BPT_OUT)throw new Error("Exit type not implemented");{let t,n;[i,t,n]=this.joinTokenInForExactBPTOut(e.encodedUserData,a),s.push(t),r.push(n)}}return s.push(a.address),r.push(n.sub(i).toString()),e.outputReference&&ar.isChainedReference(e.outputReference)&&this.relayerModel.setChainedReferenceValue(e.outputReference,i),[s,r]}}class Sr{constructor(e){this.relayerModel=e}exitKind(t,a){const n=e.decode(["uint256"],a)[0];if(!n)throw new Error("No exit kind.");return"ComposableStable"===t?n.toNumber()===ye.BPT_IN_FOR_EXACT_TOKENS_OUT?ie.BPT_IN_FOR_EXACT_TOKENS_OUT:n.toNumber()===ye.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT?ie.EXACT_BPT_IN_FOR_TOKENS_OUT:ie.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT:n.toNumber()}decodeExitData(e,t){if(t===ie.BPT_IN_FOR_EXACT_TOKENS_OUT){const[,t,a]=Ar.exitBPTInForExactTokensOut(e);return[t.toString(),a.toString()]}if(t===ie.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT){const[,t,a]=Ar.exitExactBPTInForOneTokenOut(e);return[t.toString(),a.toString()]}if(t===ie.EXACT_BPT_IN_FOR_TOKENS_OUT){const[,t]=Ar.exitExactBPTInForTokensOut(e);return[t.toString()]}throw new Error("Non supported exit data")}exactBptInForTokensOut(e,t){const[a]=this.decodeExitData(e,ie.EXACT_BPT_IN_FOR_TOKENS_OUT),n=this.relayerModel.doChainedRefReplacement(a),o=t._calcTokensOutGivenExactBptIn(p.from(n)).map((e=>e.toString()));if("StablePhantom"==t.SubgraphType||"ComposableStable"==t.SubgraphType){const e=t.tokens.find((e=>Vt(e.address,t.address)));if(!e)throw new Error("Pool does not contain BPT as a token");const a=d(e.balance.toString(),e.decimals);t.updateTokenBalanceForPool(t.address,a.add(n))}else t.updateTokenBalanceForPool(t.address,t.totalShares.sub(n));const i=t.tokens.filter((e=>!Vt(e.address,t.address)));return o.forEach(((e,a)=>{const n=d(i[a].balance.toString(),i[a].decimals);t.updateTokenBalanceForPool(i[a].address,n.sub(e))})),[n,i.map((e=>e.address)),o]}exactBptInForOneTokenOut(e,t){const[a,n]=this.decodeExitData(e,ie.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT),o=this.relayerModel.doChainedRefReplacement(a),i=t.parsePoolPairData(t.address,t.tokensList[Number(n)]),s=l(o,i.decimalsIn),r=t._exactTokenInForTokenOut(i,$(s)).dp(i.decimalsOut),u=d(r.toString(),i.decimalsOut),c=function(e,t){const a=[];return t.forEach((t=>{const n=e.tokens.findIndex((e=>Vt(e.address,t)));if(n<0)throw"Pool does not contain tokenIn";a.push(d(e.tokens[n].balance,e.tokens[n].decimals).toString())})),a}(t,[t.address,i.tokenOut]);t.updateTokenBalanceForPool(i.tokenOut,p.from(c[1]).sub(u)),"StablePhantom"==t.SubgraphType||"ComposableStable"==t.SubgraphType?t.updateTokenBalanceForPool(t.address,p.from(c[0]).add(o)):t.updateTokenBalanceForPool(t.address,t.totalShares.sub(o));const y=t.tokensList.filter((e=>!Vt(e,t.address))),b=new Array(y.length).fill("0");return b[Number(n)]=u.toString(),[o,y,b]}async doExitPool(e,t){const a=t[e.poolId],o=this.exitKind(a.SubgraphType,e.encodedUserData);let i,s=[],r=[];const p=[],d=[];if(o===ie.EXACT_BPT_IN_FOR_TOKENS_OUT)[i,r,s]=this.exactBptInForTokensOut(e.encodedUserData,a);else{if(o!==ie.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT)throw new Error("Exit type not implemented");[i,r,s]=this.exactBptInForOneTokenOut(e.encodedUserData,a)}for(let t=0;tn.sub(e).toString()))),[p,d]}}class kr{constructor(e){this.relayerModel=e}async doSingleSwap(e,t){const a=this.relayerModel.doChainedRefReplacement(e.request.amount.toString()),o=t[e.request.poolId],[,i]=this.doSwap(e.request.assetIn,e.request.assetOut,o,e.request.kind,a),s=n.sub(i);if(!e.outputReference)throw new Error("Missing outputReference");return this.relayerModel.setChainedReferenceValue(e.outputReference.toString(),s.abs().toString()),[s.toString(),a]}async doBatchSwap(e,t){const a=e.assets,o=new Array(a.length).fill(n);let i;for(let t=0;t{const s=a[n.assetInIndex],r=a[n.assetOutIndex],p=t[n.poolId];let d=n.amount;"0"===d&&(d=i);const[l,u]=this.doSwap(s,r,p,e.swapType,d);i=e.swapType===In.SwapExactIn?u.toString():l.toString(),o[n.assetInIndex]=o[n.assetInIndex].add(l),o[n.assetOutIndex]=o[n.assetOutIndex].sub(u)}));for(let t=0;te.toString()))}doSwap(e,t,a,o,i){const s=a.parsePoolPairData(e,t),r=o===In.SwapExactIn;let u=r?p.from(i):n,c=r?n:p.from(i);const y=l(u,s.decimalsIn),b=l(c,s.decimalsOut);if(r){const e=a._exactTokenInForTokenOut(s,$(y.toString())).dp(s.decimalsOut);c=d(e.toString(),s.decimalsOut)}else{const e=a._tokenInForExactTokenOut(s,$(b.toString())).dp(s.decimalsIn);u=d(e.toString(),s.decimalsIn)}return a.updateTokenBalanceForPool(s.tokenIn,s.balanceIn.add(u)),a.updateTokenBalanceForPool(s.tokenOut,s.balanceOut.sub(c)),[u,c]}}class Or{constructor(e){this.relayerModel=e}async doUnwrap(e,t){const o=t[e.poolId],i=o.tokens[o.wrappedIndex],s=o.tokens[o.mainIndex],r=this.relayerModel.doChainedRefReplacement(e.amount.toString()),p=et.divDownFixed(et.mulDownFixed(BigInt(r),d(i.priceRate,18).toBigInt()),a.toBigInt()).toString();this.relayerModel.setChainedReferenceValue(e.outputReference.toString(),p);return[[i.address,s.address],[r,n.sub(p).toString()]]}}class Mr{constructor(e){this.relayerModel=e,this.joinModel=new vr(e),this.exitModel=new Sr(e),this.swapModel=new kr(e),this.unwrapModel=new Or(e)}async doJoin(e,t){return this.joinModel.doJoinPool(e,t)}async doExit(e,t){return this.exitModel.doExitPool(e,t)}async doBatchSwap(e,t){return this.swapModel.doBatchSwap(e,t)}async doSingleSwap(e,t){return this.swapModel.doSingleSwap(e,t)}async doUnwrap(e,t){return this.unwrapModel.doUnwrap(e,t)}}class Cr{constructor(){this.chainedRefs={}}setChainedReferenceValue(e,t){this.chainedRefs[e]=t}getChainedReferenceValue(e){return this.chainedRefs[e]}doChainedRefReplacement(e){return ar.isChainedReference(e.toString())?this.getChainedReferenceValue(e.toString()):e}doChainedRefReplacements(e){return e.map((e=>this.doChainedRefReplacement(e).toString()))}}class Fr{constructor(e,t){this.poolDataService=e,this.wrappedNativeAsset=t,this.poolsArray=[],this.poolsDict={}}dataSource(){return this.poolDataService}async all(e=!1){if(e||0===this.poolsArray.length){const e=S(await this.dataSource().getPools());for(const t of e)if(["Weighted","Investment","Stable","LiquidityBootstrapping"].includes(t.poolType)){const e={address:t.address,balance:t.totalShares,decimals:18,priceRate:"1",weight:"0"};t.tokens.push(e),t.tokensList.push(t.address)}this.poolsArray=e}return this.poolsArray}parseToPoolsDict(e){return Object.fromEntries(S(e).filter((e=>e.tokensList.length>0&&"0"!==e.tokens[0].balance)).map((e=>[e.id,this.parseNewPool(e)])).filter((([,e])=>void 0!==e)))}parseNewPool(e){if(!e.swapEnabled)return;let t={};try{if(["Weighted","Investment","LiquidityBootstrapping"].includes(e.poolType)){t=L.fromPool(e,!1)}else if("Stable"===e.poolType){t=C.fromPool(e)}else if("MetaStable"===e.poolType){t=D.fromPool(e)}else if(e.poolType.toString().includes("Linear")){t=U.fromPool(e)}else if("StablePhantom"===e.poolType){t=B.fromPool(e)}else{if("ComposableStable"!==e.poolType){return void Re.getInstance().warn(`Unknown pool type or type field missing: ${e.poolType} ${e.id}`)}t=H.fromPool(e)}if(!t)throw new Error("Issue with Pool");t.SubgraphType=e.poolType}catch(e){return void console.error("Error parseNewPool")}return t}async poolsDictionary(e=!1){if(e||0===Object.keys(this.poolsDict).length){const t=await this.all(e);this.poolsDict=this.parseToPoolsDict(t)}return this.poolsDict}}var Br,Rr;!function(e){e[e.BatchSwap=0]="BatchSwap",e[e.Join=1]="Join",e[e.Exit=2]="Exit",e[e.Swap=3]="Swap",e[e.Unwrap=4]="Unwrap"}(Br||(Br={}));class Nr{constructor(e,t){this.poolsSource=new Fr(e,t)}updateDeltas(e,t,a){return t.forEach(((t,o)=>{e[t]||(e[t]=n),e[t]=e[t].add(a[o])})),e}async multicall(e,t=!1){const a=new Cr,n=new Mr(a),o=await this.poolsSource.poolsDictionary(t),i={};for(const t of e){let e=[],a=[];switch(t.actionType){case Br.Join:[e,a]=await n.doJoin(t,o);break;case Br.Exit:[e,a]=await n.doExit(t,o);break;case Br.BatchSwap:e=t.assets,a=await n.doBatchSwap(t,o);break;case Br.Swap:e=[t.request.assetOut,t.request.assetIn],a=await n.doSingleSwap(t,o);break;case Br.Unwrap:[e,a]=await n.doUnwrap(t,o)}this.updateDeltas(i,e,a)}return i}static mapSwapRequest(e){return{actionType:Br.Swap,request:e.request,funds:e.funds,outputReference:e.outputReference}}static mapBatchSwapRequest(e){return{actionType:Br.BatchSwap,swaps:e.swaps,assets:e.assets,funds:e.funds,swapType:e.swapType,outputReferences:e.outputReferences}}static mapJoinPoolRequest(e){return{actionType:Br.Join,poolId:e.poolId,encodedUserData:e.joinPoolRequest.userData,outputReference:e.outputReference}}static mapExitPoolRequest(e){return{actionType:Br.Exit,poolId:e.poolId,encodedUserData:e.exitPoolRequest.userData,outputReferences:e.outputReferences}}static mapUnwrapRequest(e,t,a){return{actionType:Br.Unwrap,poolId:a,amount:e,outputReference:t}}}const Lr=ya.createInterface();function Dr(e){Re.getInstance()}class Ur{constructor(e,t,a){this.poolGraph=e,this.simulationService=a,this.createCalls=async(e,t,a,n,o)=>{const{multiRequests:i,encodedCalls:s,outputIndexes:r,deltas:p}=this.createActionCalls(e,t,a,n);o&&s.unshift(this.createSetRelayerApproval(o));return{multiRequests:i,encodedCall:Lr.encodeFunctionData("multicall",[s]),outputIndexes:o?r.map((e=>e+1)):r,deltas:p}},this.amountsOutByJoinPath=async(e,t,a,o,i,s,r,d)=>{const l=await this.simulationService.simulateGeneralisedJoin(this.relayer,t,a,i,e,o,s,r,d),u=l.reduce(((e,t)=>e.add(p.from(t))),n).toString();return{amountsOut:l,totalAmountOut:u}},this.minAmountsOutByJoinPath=(e,t,a)=>({minAmountsOut:t.map((t=>Dt(p.from(t),p.from(e)).toString())),totalMinAmountOut:Dt(p.from(a),p.from(e)).toString()}),this.createActionCalls=(e,t,a,n)=>{const o=[],i=[],s=[],r=!n,p={};return e.forEach(((e,d)=>{const l=e[0].isLeaf,u=[];if(e.forEach(((o,s)=>{var c,y;if(o.children.length>0&&0===o.children.filter((e=>this.shouldBeConsidered(e))).length)return void(o.index="0");const b=o.children.filter((e=>this.shouldBeConsidered(e))).some((e=>"input"===e.joinAction))?t:this.relayer,m=s===e.length-1,f=null!==(y=l&&(null===(c=o.parent)||void 0===c?void 0:c.children.filter((e=>this.shouldBeConsidered(e))).some((e=>"input"===e.joinAction))))&&void 0!==y&&y,T=m||f?t:this.relayer,h=m&&n?n[d]:"0";switch(o.joinAction){case"batchSwap":{const{modelRequest:e,encodedCall:t,assets:n,amounts:s}=this.createSwap(o,d,h,b,T,a,r);u.push(e),i.push(t),this.updateDeltas(p,n,s)}break;case"joinPool":{const{modelRequest:e,encodedCall:t,assets:n,amounts:s,minBptOut:l}=this.createJoinPool(o,d,h,b,T,a,r);u.push(e),i.push(t),this.updateDeltas(p,[o.address,...n],[l,...s])}break;default:return}})),r){const e=100*d,t=ar.encodePeekChainedReferenceValue(ar.toChainedReference(e,!1));i.push(t),s.push(i.indexOf(t))}o.push(u)})),{multiRequests:o,encodedCalls:i,outputIndexes:s,deltas:p}},this.createSetRelayerApproval=e=>ar.encodeSetRelayerApproval(this.relayer,!0,e),this.createSwap=(e,t,a,o,i,s,r)=>{var d;if(1!==e.children.length)throw new Error("Unsupported swap");const l=e.children[0].address,u=this.getOutputRefValue(t,e.children[0]),c=a,y=s&&!r?this.replaceWrappedNativeAsset([l])[0]:l,b={poolId:e.id,kind:In.SwapExactIn,assetIn:y,assetOut:e.address,amount:u.value,userData:"0x"},m={sender:o,recipient:i,fromInternalBalance:this.allImmediateChildrenSendToInternal(e),toInternalBalance:this.allSiblingsSendToInternal(e)},f=p.from(this.getOutputRefValue(t,e).value),T=s&&!r?kt([y],[u.value]):n,h={request:b,funds:m,limit:c,deadline:p.from(Math.ceil(Date.now()/1e3)+3600),value:T,outputReference:f},I=ar.encodeSwap(h);Dr(),Dr(JSON.stringify(h)),Dr(JSON.stringify(null===(d=h.value)||void 0===d?void 0:d.toString()));const _=Nr.mapSwapRequest(h),g=e.children.some((e=>"input"===e.joinAction))?u.value:"0",P=null!=e.parent?"0":p.from(a).mul(-1).toString();return{modelRequest:_,encodedCall:I,assets:[e.address,l],amounts:[P,g]}},this.createJoinPool=(e,t,a,o,i,s,r)=>{var p;const d=[],l=[];e.children.forEach((e=>{d.push(e.address),this.shouldBeConsidered(e)?l.push(this.getOutputRefValue(t,e).value):l.push("0")})),e.type===Be.ComposableStable&&(d.push(e.address),l.push("0"));const u=new Le(this.wrappedNativeAsset),[c,y]=u.sortTokens(d,l);let b=[];const m=c.map((e=>e.toLowerCase())).indexOf(e.address.toLowerCase());let f;b=-1===m?y:[...y.slice(0,m),...y.slice(m+1)],f=e.type===Be.Weighted?pe.joinExactTokensInForBPTOut(b,a):re.joinExactTokensInForBPTOut(b,a);const T=s&&!r?kt(this.replaceWrappedNativeAsset(c),y):n,h=this.allImmediateChildrenSendToInternal(e),I=ar.formatJoinPoolInput({poolId:e.id,kind:0,sender:o,recipient:i,value:T,outputReference:this.getOutputRefValue(t,e).value,joinPoolRequest:{},assets:s&&!r?this.replaceWrappedNativeAsset(c):c,maxAmountsIn:y,userData:f,fromInternalBalance:h}),_=ar.encodeJoinPool(I);Dr(),Dr(JSON.stringify(I)),Dr(JSON.stringify(null===(p=I.value)||void 0===p?void 0:p.toString()));const g=Nr.mapJoinPoolRequest(I),P=y.map((e=>ar.isChainedReference(e)?"0":e)),w=ar.isChainedReference(a)?"0":a,x=e.children.filter((e=>this.shouldBeConsidered(e))).some((e=>"input"===e.joinAction));return{modelRequest:g,encodedCall:_,assets:x?c:[],amounts:x?P:[],minBptOut:null!=e.parent?n.toString():n.sub(w).toString()}},this.getOutputRefValue=(e,t)=>"input"===t.joinAction?{value:t.index,isRef:!1}:"0"===t.index&&t.parent?{value:"0",isRef:!0}:{value:ar.toChainedReference(p.from(t.index).add(100*e)).toString(),isRef:!0},this.shouldBeConsidered=e=>"0"!==e.index,this.sendsToInternalBalance=e=>"input"!==e.joinAction&&"joinPool"!==e.joinAction,this.allImmediateChildrenSendToInternal=e=>{const t=e.children.filter((e=>this.shouldBeConsidered(e)));return 0!==t.length&&t.filter((e=>this.sendsToInternalBalance(e))).length===t.length},this.allSiblingsSendToInternal=e=>{if(!e.parent)return!1;const t=e.parent.children.filter((e=>this.shouldBeConsidered(e)));return t.filter((e=>this.sendsToInternalBalance(e))).length===t.length},this.replaceWrappedNativeAsset=e=>{const t=e.findIndex((e=>e.toLowerCase()===this.wrappedNativeAsset.toLowerCase()));return Gt(e,t,o)};const{tokens:i,contracts:s}=En(t.chainId);this.relayer=s.balancerRelayer,this.wrappedNativeAsset=i.wrappedNativeAsset}checkInputs(e,t){if(0===e.length)throw new vn(An.MISSING_TOKENS);if(t.every((e=>"0"===e)))throw new vn(An.JOIN_WITH_ZERO_AMOUNT);if(e.length!=t.length)throw new vn(An.INPUT_LENGTH_MISMATCH);if(e.some((e=>e===o))&&e.some((e=>e.toLowerCase()===this.wrappedNativeAsset.toLowerCase())))throw new vn(An.INPUT_TOKEN_INVALID)}async joinPool(e,t,a,i,s,r,p,d){this.checkInputs(t,a);const l=await this.poolGraph.getGraphNodes(!0,e,[]),u=t.findIndex((e=>e===o)),c=-1!==u,y=Gt(t,u,this.wrappedNativeAsset.toLowerCase()),b=Ur.getJoinPaths(l,y,a),m=Ur.totalBptZeroPriceImpact(b);Dr();const{multiRequests:f,encodedCall:T,outputIndexes:h}=await this.createCalls(b,i,c,void 0,d),{amountsOut:I,totalAmountOut:_}=await this.amountsOutByJoinPath(i,f,T,y,h,r,p,"0"),{minAmountsOut:g,totalMinAmountOut:P}=this.minAmountsOutByJoinPath(s,I,_),w=Sn(BigInt(_),m.toBigInt(),!0).toString();Dr();const{encodedCall:x,deltas:E}=await this.createCalls(b,i,c,g,d),A=c?E[this.wrappedNativeAsset.toLowerCase()]:n;return Dr(A.toString()),this.assertDeltas(e,E,y,a,P),{to:this.relayer,encodedCall:x,expectedOut:_,minOut:P,priceImpact:w,value:A}}assertDeltas(e,t,a,n,o){var i;const s=Ie(e);if(t[s.toLowerCase()].add(o).abs().gt(3))throw console.error("join assertDeltas, bptOut: ",s,o,null===(i=t[s.toLowerCase()])||void 0===i?void 0:i.toString()),new vn(An.JOIN_DELTA_AMOUNTS);delete t[s.toLowerCase()],a.forEach(((e,a)=>{var o,i;if(!p.from(n[a]).eq(0)&&(null===(o=t[e.toLowerCase()])||void 0===o?void 0:o.toString())!==n[a])throw console.error("join assertDeltas, tokenIn: ",e,n[a],null===(i=t[e.toLowerCase()])||void 0===i?void 0:i.toString()),new vn(An.JOIN_DELTA_AMOUNTS);delete t[e.toLowerCase()]}));for(const e in t)if("0"!==t[e].toString())throw console.error("join assertDeltas, non-input token should be 0: ",e,t[e].toString()),new vn(An.JOIN_DELTA_AMOUNTS)}updateDeltas(e,t,a){return t.forEach(((t,o)=>{const i=t.toLowerCase();e[i]||(e[i]=n),e[i]=e[i].add(a[o])})),e}}Rr=Ur,Ur.getJoinPaths=(e,t,n)=>{const o=[],i=e.filter((e=>t.filter(((e,t)=>p.from(n[t]).gt(0))).map((e=>e.toLowerCase())).includes(e.address.toLowerCase())));i.some((e=>e.isLeaf))&&o.push(e);const s=i.filter((e=>!e.isLeaf));return s.forEach((e=>{const i=n.find(((a,n)=>Vt(t[n],e.address))),r=s.filter((t=>Vt(t.address,e.address))).reduce(((e,t)=>e.add(t.proportionOfParent)),p.from(0)),d=p.from(i).mul(e.proportionOfParent).div(r).toString(),[l]=Er.createInputTokenNode(0,e.address,e.decimals,e.parent,a,e.balance);l.index=d,l.isLeaf=!1;const u=[l];let c=l.parent,y=l;for(;c;){const e=S(c);e.children=e.children.map((e=>e.address===y.address?y:{...e,index:"0"})),u.push(e),y=e,c=e.parent}o.push(u)})),Rr.updateInputAmounts(o,t,n),o},Ur.updateInputAmounts=(e,t,a)=>{const n=(e,t)=>{if(e.length>1){const a=e.reduce(((e,t)=>e.add(t.index)),p.from(0)),n=p.from(t).sub(a);e[0].index=n.add(e[0].index).toString()}},o=e.find((e=>e[0].isLeaf));if(o){const e=Rr.updateTotalProportions(o);o.forEach((n=>{"input"===n.joinAction&&(n=Rr.updateNodeAmount(n,t,a,e))})),t.forEach(((e,t)=>{const i=o.filter((t=>t.isLeaf&&Vt(t.address,e)));n(i,a[t])}))}const i=e.filter((e=>!e[0].isLeaf));i.length>1&&t.forEach(((e,t)=>{const o=i.map((e=>e[0])).filter((t=>Vt(t.address,e)));n(o,a[t])}))},Ur.totalBptZeroPriceImpact=e=>{let t=p.from("0");return e.forEach((e=>{if(e[0].isLeaf){e.filter((e=>e.isLeaf)).forEach((e=>{const a=Rr.bptOutZeroPiForInputNode(e);t=t.add(a)}))}else{const a=Rr.bptOutZeroPiForInputNode(e[0]);t=t.add(a)}})),t},Ur.bptOutZeroPiForInputNode=e=>{if("0"===e.index||"input"!==e.joinAction)return BigInt(0);let t=1,a=e.parent,n=e.address;for(;void 0!==a;){if("batchSwap"===a.joinAction||"joinPool"===a.joinAction){const e=a.spotPrices[n.toLowerCase()];t*=parseFloat(e),n=a.address}a=a.parent}const o=d(t.toFixed(18),18),i=Ye(BigInt(e.decimals)),s=je(BigInt(e.index),i);return et.divDownFixed(s,o.toBigInt())},Ur.updateTotalProportions=e=>{const t={};return e.forEach((e=>{t[e.address]?t[e.address]=t[e.address].add(e.proportionOfParent):t[e.address]=e.proportionOfParent})),t},Ur.updateNodeAmount=(e,t,a,n)=>{const o=t.map((e=>e.toLowerCase())).indexOf(e.address.toLowerCase());if(-1===o)return e.index="0",e;const i=n[e.address],s=e.proportionOfParent.mul(1e18.toString()).div(i).mul(a[o]).div(1e18.toString());return e.index=s.toString(),e};class Vr{constructor(e,t){this.chainId=e,this.simulateMulticall=async(e,t,a,n,o="0")=>{const i={...await this.encodeBalanceAndAllowanceOverrides(a,n),...await this.encodeRelayerApprovalOverride(a,e)};return this.simulateTransaction(e,t,a,i,o)},this.simulateTransaction=async(e,t,a,n,o)=>{const i={...Object.fromEntries(Object.keys(n).map((e=>[e,{storage:n[e].value}]))),[a]:{balance:d("100",18).toHexString()}},s={network_id:this.chainId.toString(),block_number:this.blockNumber,from:a,to:e,input:t,value:o,save_if_fails:!0,simulation_type:"quick",state_objects:i},r=this.tenderlyUrl+"simulate";return(await z.post(r,s,this.opts)).data.transaction.transaction_info.call_trace.output},this.encodeRelayerApprovalOverride=async(e,t)=>{const a={[`${this.vaultAddress}`]:{value:{[`_approvedRelayers[${e}][${t}]`]:(!0).toString()}}};return await this.requestStateOverrides(a)},this.encodeBalanceAndAllowanceOverrides=async(e,t)=>{const a=t.filter((e=>e!==o));if(0===a.length)return{};let n={};a.forEach((t=>n={...n,[`${t}`]:{value:{[`_balances[${e}]`]:s.toString(),[`_allowances[${e}][${this.vaultAddress}]`]:s.toString(),[`balanceOf[${e}]`]:s.toString(),[`allowance[${e}][${this.vaultAddress}]`]:s.toString(),[`balances[${e}]`]:s.toString(),[`allowed[${e}][${this.vaultAddress}]`]:s.toString()}}}));const i=await this.requestStateOverrides(n);if(Object.keys(i).some((e=>2!==Object.keys(i[e].value).length)))throw new Error("Couldn't encode state overrides - states should match the ones in the contracts");return i},this.requestStateOverrides=async e=>{const t=this.tenderlyUrl+"contracts/encode-states",a={networkID:this.chainId.toString(),stateOverrides:e},n=(await z.post(t,a,this.opts)).data.stateOverrides;if(!n||Object.keys(n).length!==Object.keys(e).length)throw new Error("Couldn't encode state overrides - contracts should be verified and whitelisted on Tenderly");return n};const{contracts:a}=En(this.chainId);this.vaultAddress=a.vault,this.tenderlyUrl=`https://api.tenderly.co/api/v1/account/${t.user}/project/${t.project}/`,this.opts={headers:{"X-Access-Key":t.accessKey}},this.blockNumber=t.blockNumber}}var qr;!function(e){e[e.Tenderly=0]="Tenderly",e[e.VaultModel=1]="VaultModel",e[e.Static=2]="Static"}(qr||(qr={}));class Gr{constructor(t,a){this.simulateGeneralisedJoin=async(e,t,a,n,o,i,s,r,p)=>{const d=[];switch(r){case qr.Tenderly:{if(!this.tenderlyHelper)throw new Error("Missing Tenderly config");const t=await this.tenderlyHelper.simulateMulticall(e,a,o,i,p);d.push(...this.decodeResult(t,n));break}case qr.VaultModel:{const e=await this.simulateRequests(t);d.push(...e);break}case qr.Static:{const t=await s.call({to:e,data:a,value:p});try{d.push(...this.decodeResult(t,n))}catch(e){const a=Buffer.from(t.split("x")[1],"hex").toString("utf8");throw new Error(`Transaction reverted with error: ${a}`)}break}default:throw new Error("Simulation type not supported")}return d},this.simulateGeneralisedExit=async(e,t,a,n,o,i,s,r)=>{const p=[];switch(r){case qr.Tenderly:{if(!this.tenderlyHelper)throw new Error("Missing Tenderly config");const t=await this.tenderlyHelper.simulateMulticall(e,a,o,[i]);p.push(...this.decodeResult(t,n));break}case qr.VaultModel:{const e=await this.simulateRequests(t);p.push(...e);break}case qr.Static:{const t=await s.call({to:e,data:a});try{p.push(...this.decodeResult(t,n))}catch(e){const a=Buffer.from(t.split("x")[1],"hex").toString("utf8");throw new Error(`Transaction reverted with error: ${a}`)}break}default:throw new Error("Simulation type not supported")}return p},this.decodeResult=(t,a)=>{const n=e.decode(["bytes[]"],t)[0];return a.map((t=>e.decode(["uint256"],n[t]).toString()))},this.simulateRequests=async e=>{if(void 0===this.vaultModel)throw new Error("Missing Vault Model Config.");const t=[];for(const[a,n]of e.entries()){const e=await this.vaultModel.multicall(n,0===a),o=Object.values(e).filter((e=>e.lt(0)));if(0===o.length)throw new Error("No delta found for token out.");t.push(...o.map((e=>e.mul(-1).toString())))}return t},t.tenderly&&(this.tenderlyHelper=new Vr(t.chainId,t.tenderly)),this.vaultModel=a?new Nr(a,t.addresses.tokens.wrappedNativeAsset):void 0}}const Wr=ya.createInterface();function $r(e){Re.getInstance()}class Hr{constructor(e,t,o){this.poolGraph=e,this.simulationService=o,this.amountsOutByExitPath=async(e,t,a,n,o,i,s)=>await this.simulationService.simulateGeneralisedExit(this.relayer,t,a,o,e,n,i,s),this.amountsOutByTokenOut=(e,t,a)=>{const o={};t.forEach(((e,t)=>{var i;return o[e]=(null!==(i=o[e])&&void 0!==i?i:n).add(a[t])}));return e.map((e=>o[e].toString()))},this.minAmountsOut=(e,t,a)=>({minAmountsOutByExitPath:e.map((e=>Dt(p.from(e),p.from(a)).toString())),minAmountsOutByTokenOut:t.map((e=>Dt(p.from(e),p.from(a)).toString()))}),this.getExitPaths=(e,t)=>{const o=e.map((e=>{const n=[e];for(;n[0].parent;)n.unshift(S(n[0].parent));return n[0].index=n[n.length-1].proportionOfParent.mul(t).div(a).toString(),n})),i=o.reduce(((e,t)=>{const a=t[0].index;return p.from(a).add(e)}),n),s=p.from(t).sub(i);return o[o.length-1][0].index=s.add(o[o.length-1][0].index).toString(),o},this.createUnwrap=(e,t,a,o,i,s)=>{var r,p;const d=ar.toChainedReference(this.getOutputRef(a,e.index)).toString(),l=ar.toChainedReference(this.getOutputRef(a,t.index)),u=null===(r=e.parent)||void 0===r?void 0:r.type,c={wrappedToken:e.address,sender:i,recipient:s,amount:d,outputReference:l},y=ar.encodeUnwrap(c,u);$r(),$r(),$r(JSON.stringify(c));return{modelRequest:Nr.mapUnwrapRequest(d,l,null===(p=e.parent)||void 0===p?void 0:p.id),encodedCall:y,assets:[t.address],amounts:[n.sub(o).toString()]}},this.getOutputRef=(e,t)=>100*e+parseInt(t),this.receivesFromInternal=e=>!!e.parent&&("output"!==e.exitAction&&"unwrap"!==e.exitAction&&"exitPool"!==e.exitAction);const{tokens:i,contracts:s}=En(t.chainId);this.wrappedNativeAsset=i.wrappedNativeAsset,this.relayer=s.balancerRelayer}async getExitInfo(e,t,a,n){$r();const o=await this.getExit(e,t,a,n,[],qr.VaultModel);return{tokensOut:o.tokensOut,estimatedAmountsOut:o.expectedAmountsOut,priceImpact:o.priceImpact,tokensToUnwrap:o.tokensToUnwrap}}async buildExitCall(e,t,a,n,o,i,s,r){$r();const p=await this.getExit(e,t,a,o,null!=r?r:[],i,s),{minAmountsOutByExitPath:d,minAmountsOutByTokenOut:l}=this.minAmountsOut(p.expectedAmountsOutByExitPath,p.expectedAmountsOut,n);$r();const{encodedCall:u,deltas:c}=await this.createCalls(p.exitPaths,a,p.isProportional,d,s);return this.assertDeltas(e,c,t,p.tokensOut,l),{to:this.relayer,encodedCall:u,tokensOut:p.tokensOut,expectedAmountsOut:p.expectedAmountsOut,minAmountsOut:l,priceImpact:p.priceImpact}}async getExit(e,t,a,n,o,i,s){const r=await this.poolGraph.getGraphNodes(!1,e,o),d=Er.isProportionalPools(r);$r();let l=[],u=[],c=[];const y=r.filter((e=>"output"===e.exitAction));if(u=y.map((e=>e.address.toLowerCase())),c=[...new Set(u)].sort(),d){const e=r.map(((e,a)=>(0===a&&(e.index=t),e)));l[0]=e}else l=this.getExitPaths(y,t);const{multiRequests:b,encodedCall:m,outputIndexes:f}=await this.createCalls(l,a,d,void 0,s),T=await this.amountsOutByExitPath(a,b,m,r[0].address,f,n,i),h=y.filter(((e,t)=>p.from(T[t]).gt(e.balance))).map((e=>e.address.toLowerCase()));if(o.some((e=>h.includes(e.toLowerCase()))))throw new Error("Insufficient pool balance to perform generalised exit - try exitting with smaller amounts");if(h.length>0)return await this.getExit(e,t,a,n,[...new Set(h)].sort(),i,s);{const a=this.amountsOutByTokenOut(c,u,T),n=await this.calculatePriceImpact(e,this.poolGraph,c,a,t);return{tokensToUnwrap:o,tokensOut:c,exitPaths:l,isProportional:d,expectedAmountsOut:a,expectedAmountsOutByExitPath:T,priceImpact:n}}}async calculatePriceImpact(e,t,a,n,o){const i=await t.getGraphNodes(!0,e,[]),s=Ur.getJoinPaths(i,a,n),r=Ur.totalBptZeroPriceImpact(s);return Sn(BigInt(o),r.toBigInt(),!1).toString()}assertDeltas(e,t,a,n,o){var i;const s=Ie(e);if(t[s.toLowerCase()].sub(a).abs().gt(3))throw console.error("exit assertDeltas, bptIn: ",s,a,null===(i=t[s.toLowerCase()])||void 0===i?void 0:i.toString()),new vn(An.EXIT_DELTA_AMOUNTS);delete t[s.toLowerCase()],n.forEach(((e,a)=>{var n;if(t[e.toLowerCase()].add(o[a]).abs().gt(1))throw console.error("exit assertDeltas, tokenOut: ",e,o[a],null===(n=t[e.toLowerCase()])||void 0===n?void 0:n.toString()),new vn(An.EXIT_DELTA_AMOUNTS);delete t[e.toLowerCase()]}));for(const e in t)if("0"!==t[e].toString())throw console.error("exit assertDeltas, non-input token should be 0: ",e,t[e].toString()),new vn(An.EXIT_DELTA_AMOUNTS)}async createCalls(e,t,a,n,o){const{multiRequests:i,calls:s,outputIndexes:r,deltas:p}=this.createActionCalls(S(e),t,a,n);o&&s.unshift(ar.encodeSetRelayerApproval(this.relayer,!0,o));return{multiRequests:i,encodedCall:Wr.encodeFunctionData("multicall",[s]),outputIndexes:o?r.map((e=>e+1)):r,deltas:p}}updateDeltas(e,t,a){return t.forEach(((t,o)=>{const i=t.toLowerCase();e[i]||(e[i]=n),e[i]=e[i].add(a[o])})),e}createActionCalls(e,t,n,o){const i=[],s=[],r=[],p=!o,d={},l=(e,a)=>a.children.filter((t=>e.map((e=>e.index)).includes(t.index))).some((e=>"output"===e.exitAction))?t:this.relayer;return e.forEach(((e,u)=>{const c=[],y=e.filter((e=>"output"===e.exitAction));e.forEach((i=>{const b=i.children.find((t=>e.map((e=>e.index)).includes(t.index))),m=((e,a)=>a.parent?l(e,a.parent):t)(e,i),f=l(e,i),T=i.children.filter((t=>e.map((e=>e.index)).includes(t.index))).some((e=>"output"===e.exitAction||"unwrap"===e.exitAction));let h="0";const I=Array(i.children.length).fill("0");switch(o&&T&&(n?i.children.forEach(((e,t)=>{let n;"unwrap"===e.exitAction?(n=y.indexOf(e.children[0]),h=a.mul(o[n]).div(e.priceRate).toString()):"output"===e.exitAction?(n=y.indexOf(e),h=o[n]):h="0",I[t]=h})):h="unwrap"===(null==b?void 0:b.exitAction)?a.mul(o[u]).div(b.priceRate).toString():o[u]),i.exitAction){case"unwrap":{const{modelRequest:e,encodedCall:t,assets:a,amounts:n}=this.createUnwrap(i,b,u,h,m,f);c.push(e),s.push(t),this.updateDeltas(d,a,n);break}case"batchSwap":{const{modelRequest:e,encodedCall:t,assets:a,amounts:n}=this.createSwap(i,b,u,h,m,f);c.push(e),s.push(t),this.updateDeltas(d,a,n);break}case"exitPool":{let e;e=n?this.createExitPoolProportional(i,I,m,f):this.createExitPool(i,b,u,h,m,f);const{modelRequest:t,encodedCall:a,bptIn:o,tokensOut:r,amountsOut:p}=e;c.push(t),s.push(a),this.updateDeltas(d,[i.address,...r],[o,...p]);break}case"output":p&&(s.push(ar.encodePeekChainedReferenceValue(ar.toChainedReference(this.getOutputRef(u,i.index),!1))),r.push(s.length-1));break;default:return}})),i.push(c)})),{multiRequests:i,calls:s,outputIndexes:r,deltas:d}}createSwap(e,t,a,n,o,i){const s=!e.parent,r=s?e.index:ar.toChainedReference(this.getOutputRef(a,e.index)).toString(),d=t.address,l=[d,e.address],u=n,c={poolId:e.id,kind:In.SwapExactIn,assetIn:e.address,assetOut:d,amount:r,userData:"0x"},y={sender:o,recipient:i,fromInternalBalance:this.receivesFromInternal(e),toInternalBalance:this.receivesFromInternal(t)},b=ar.toChainedReference(this.getOutputRef(a,t.index)),m={request:c,funds:y,limit:u,deadline:p.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReference:b};$r(),$r(JSON.stringify(m));const f=ar.encodeSwap(m),T=s?r:"0";return{modelRequest:Nr.mapSwapRequest(m),encodedCall:f,assets:l,amounts:["output"!==t.exitAction?"0":p.from(n).mul(-1).toString(),T]}}createBatchSwap(e,t,n,o,i,s){const r=!e.parent,d=r?e.index:ar.toChainedReference(this.getOutputRef(n,e.index)).toString(),l=[...t.map((e=>e.address)),e.address],u=[...o];u.push(d);const c=[],y=[];t.forEach(((t,n)=>{const o=t.proportionOfParent.mul(d).div(a).toString(),i={poolId:e.id,assetInIndex:l.length-1,assetOutIndex:n,amount:o,userData:"0x"};c.push(i),y.push({index:n,key:ar.toChainedReference(this.getOutputRef(0,t.index))})}));const b=c.reduce(((e,t)=>e.add(t.amount)),p.from(0)),m=p.from(d).sub(b);c[0].amount=m.add(c[0].amount).toString();const f={sender:i,recipient:s,fromInternalBalance:this.receivesFromInternal(e),toInternalBalance:this.receivesFromInternal(t[0])},T={swapType:In.SwapExactIn,swaps:c,assets:l,funds:f,limits:u,deadline:p.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:y};$r(),$r(JSON.stringify(T));const h=ar.encodeBatchSwap(T),I=Nr.mapBatchSwapRequest(T),_=r?d:"0",g=[...t.map(((e,t)=>"output"!==e.exitAction?"0":p.from(o[t]).mul(-1).toString())),_];return{modelRequest:I,encodedCall:h,assets:l,amounts:g}}createExitPool(e,t,a,o,i,s){const r=t.address,p=!e.parent,d=p?e.index:ar.toChainedReference(this.getOutputRef(a,e.index)).toString(),l=[],u=[];e.children.forEach((e=>{l.push(e.address),u.push(e.address===r?o:"0")})),e.type===Be.ComposableStable&&(l.push(e.address),u.push("0"));const c=new Le(this.wrappedNativeAsset),[y,b]=c.sortTokens(l,u);let m=[];const f=y.map((e=>e.toLowerCase())).indexOf(e.address.toLowerCase());let T;m=-1===f?y:[...y.slice(0,f),...y.slice(f+1)],T=e.type===Be.Weighted?pe.exitExactBPTInForOneTokenOut(d,m.indexOf(r)):re.exitExactBPTInForOneTokenOut(d,m.indexOf(r));const h=[{index:y.map((e=>e.toLowerCase())).indexOf(r.toLowerCase()),key:ar.toChainedReference(this.getOutputRef(a,t.index))}],I=this.receivesFromInternal(t),_=ar.formatExitPoolInput({poolId:e.id,poolKind:0,sender:i,recipient:s,outputReferences:h,exitPoolRequest:{},assets:y,minAmountsOut:b,userData:T,toInternalBalance:I});$r(),$r(JSON.stringify(_));const g=ar.encodeExitPool(_),P=Nr.mapExitPoolRequest(_),w=b.map((e=>ar.isChainedReference(e)?"0":n.sub(e).toString())),x=ar.isChainedReference(d)?"0":d;return{modelRequest:P,encodedCall:g,bptIn:p?x:n.toString(),tokensOut:"output"!==t.exitAction?[]:y,amountsOut:"output"!==t.exitAction?[]:w}}createExitPoolProportional(e,t,a,o){const i=!e.parent,s=i?e.index:ar.toChainedReference(this.getOutputRef(0,e.index)).toString(),r=e.children.map((e=>e.address)),p=[...t];e.type===Be.ComposableStable&&(r.push(e.address),p.push("0"));const d=new Le(this.wrappedNativeAsset),[l,u]=d.sortTokens(r,p);let c;c=e.type===Be.Weighted?pe.exitExactBPTInForTokensOut(s):e.type===Be.ComposableStable?be.exitExactBPTInForAllTokensOut(s):re.exitExactBPTInForTokensOut(s);const y=e.children.map((e=>({index:l.map((e=>e.toLowerCase())).indexOf(e.address.toLowerCase()),key:ar.toChainedReference(this.getOutputRef(0,e.index))})));let b=0;e.type===Be.ComposableStable&&(b=3);const m=e.children.every((e=>this.receivesFromInternal(e))),f=ar.formatExitPoolInput({poolId:e.id,poolKind:b,sender:a,recipient:o,outputReferences:y,exitPoolRequest:{},assets:l,minAmountsOut:u,userData:c,toInternalBalance:m});$r(),$r(JSON.stringify(f));const T=ar.encodeExitPool(f),h=Nr.mapExitPoolRequest(f),I=u.map((e=>ar.isChainedReference(e)?"0":n.sub(e).toString())),_=ar.isChainedReference(s)?"0":s,g=i?_:n.toString(),P=l.filter((t=>e.children.filter((e=>"output"===e.exitAction)).map((e=>e.address)).includes(t))),w=I.filter(((e,t)=>P.includes(l[t])));return{modelRequest:h,encodedCall:T,bptIn:g,tokensOut:P,amountsOut:w}}}class Kr{constructor(e){this.yesterdaysPools=e}async last24h(e){let t;return this.yesterdaysPools&&(t=await this.yesterdaysPools.find(e.id)),e.totalSwapVolume?(null==t?void 0:t.totalSwapVolume)?parseFloat(e.totalSwapVolume)-parseFloat(t.totalSwapVolume):e.createTime&&rr(e.createTime)?parseFloat(e.totalSwapVolume):0:0}}class Jr{constructor(e,t){this.checkCreateInputs=({tokenAddresses:e,tokenRateCacheDurations:t,exemptFromYieldProtocolFeeFlags:a,rateProviders:n,swapFeeEvm:o})=>{if(e.length!==t.length||t.length!==a.length||a.length!==n.length)throw new vn(An.INPUT_LENGTH_MISMATCH);if(BigInt(o)<=BigInt(0)||BigInt(o)>BigInt(1e17))throw new vn(An.INVALID_SWAP_FEE_PERCENTAGE)},this.parseCreateParamsForEncoding=({name:e,symbol:t,tokenAddresses:a,amplificationParameter:n,rateProviders:o,tokenRateCacheDurations:i,exemptFromYieldProtocolFeeFlags:s,swapFeeEvm:r,owner:p,salt:d})=>{const l=new Le(this.wrappedNativeAsset),[u,c,y,b]=l.sortTokens(a,o,i,s);return[e,t,u,n,c,y,b,r.toString(),p,d||Xt()]},this.encodeCreateFunctionData=e=>Ia.createInterface().encodeFunctionData("create",e),this.checkInitJoinInputs=({poolId:e,poolAddress:t,tokensIn:a,amountsIn:n})=>{if(!e||!t)throw new vn(An.NO_POOL_DATA);if(a.length!==n.length)throw new vn(An.INPUT_LENGTH_MISMATCH)},this.parseParamsForInitJoin=({joiner:e,poolId:t,poolAddress:a,tokensIn:n,amountsIn:o})=>{const i=new Le(this.wrappedNativeAsset),s=[...n,a],r=[...o,"0"],p=[...o,BigInt.asUintN(256,BigInt(-1)).toString()],[d,l,u]=i.sortTokens(s,r,p),c={poolId:t,sender:e,recipient:e,joinPoolRequest:{assets:d,maxAmountsIn:u,userData:be.joinInit(l),fromInternalBalance:!1}};return{attributes:c,params:[c.poolId,c.sender,c.recipient,c.joinPoolRequest]}},this.encodeInitJoinFunctionData=e=>{const t="joinPool";return{functionName:t,data:nn.createInterface().encodeFunctionData(t,e)}},this.getPoolAddressAndIdWithReceipt=async(e,t)=>{var a;const n=Jt({receipt:t,to:(null===(a=this.contracts.composableStablePoolFactory)||void 0===a?void 0:a.address)||"",contractInterface:Ia.createInterface(),logName:"PoolCreated"}).args.pool,o=this.getPoolInterface(),i=new Z(n,o,e);return{poolAddress:n,poolId:await i.getPoolId()}};const{tokens:a}=En(e.chainId);this.wrappedNativeAsset=a.wrappedNativeAsset,this.contracts=t}create({name:e,symbol:t,tokenAddresses:a,amplificationParameter:n,rateProviders:o,tokenRateCacheDurations:i,exemptFromYieldProtocolFeeFlags:s,swapFeeEvm:r,owner:p,salt:d}){var l;this.checkCreateInputs({rateProviders:o,tokenAddresses:a,tokenRateCacheDurations:i,exemptFromYieldProtocolFeeFlags:s,swapFeeEvm:r});const u=this.parseCreateParamsForEncoding({name:e,symbol:t,tokenAddresses:a,amplificationParameter:n,rateProviders:o,tokenRateCacheDurations:i,exemptFromYieldProtocolFeeFlags:s,swapFeeEvm:r,owner:p,salt:d}),c=this.encodeCreateFunctionData(u);return{to:null===(l=this.contracts.composableStablePoolFactory)||void 0===l?void 0:l.address,data:c}}buildInitJoin({joiner:e,poolId:t,poolAddress:a,tokensIn:n,amountsIn:o}){this.checkInitJoinInputs({tokensIn:n,amountsIn:o,poolId:t,poolAddress:a});const{attributes:i,params:s}=this.parseParamsForInitJoin({joiner:e,poolId:t,poolAddress:a,tokensIn:n,amountsIn:o}),{functionName:r,data:p}=this.encodeInitJoinFunctionData(s);return{to:wn,functionName:r,data:p,attributes:i}}getPoolInterface(){return Ta.createInterface()}}class Xr{constructor(e,t){this.parseCreateParamsForEncoding=({name:e,symbol:t,tokenAddresses:a,normalizedWeights:n,rateProviders:o,swapFeeEvm:i,owner:s,salt:r})=>{const p=new Le(this.wrappedNativeAsset),[d,l,u]=p.sortTokens(a,n,o);return[e,t,d,l,u,i.toString(),s,r||Xt()]},this.encodeCreateFunctionData=e=>pn.createInterface().encodeFunctionData("create",e),this.parseParamsForInitJoin=({joiner:e,poolId:t,tokensIn:a,amountsIn:n})=>{const o=new Le(this.wrappedNativeAsset),[i,s]=o.sortTokens(a,n),r={poolId:t,sender:e,recipient:e,joinPoolRequest:{assets:i,maxAmountsIn:s,userData:pe.joinInit(s),fromInternalBalance:!1}};return{attributes:r,params:[r.poolId,r.sender,r.recipient,r.joinPoolRequest]}},this.encodeInitJoinFunctionData=e=>{const t="joinPool";return{functionName:t,data:nn.createInterface().encodeFunctionData(t,e)}},this.checkInitJoinInputs=({poolId:e,tokensIn:t,amountsIn:a})=>{if(!e)throw new vn(An.NO_POOL_DATA);if(t.length!==a.length)throw new vn(An.INPUT_LENGTH_MISMATCH)};const{tokens:a}=En(e.chainId);this.wrappedNativeAsset=a.wrappedNativeAsset,this.contracts=t}create({name:e,symbol:t,tokenAddresses:a,normalizedWeights:n,rateProviders:o,swapFeeEvm:i,owner:s,salt:r}){var p;this.checkCreateInputs({tokenAddresses:a,normalizedWeights:n,swapFeeEvm:i,rateProviders:o});const d=this.parseCreateParamsForEncoding({name:e,symbol:t,tokenAddresses:a,normalizedWeights:n,rateProviders:o,swapFeeEvm:i,owner:s,salt:r}),l=this.encodeCreateFunctionData(d);return{to:null===(p=this.contracts.weightedPoolFactory)||void 0===p?void 0:p.address,data:l}}checkCreateInputs({tokenAddresses:e,normalizedWeights:t,swapFeeEvm:a,rateProviders:n}){if(e.length!==t.length||t.length!==n.length)throw new vn(An.INPUT_LENGTH_MISMATCH);if(e.length<2)throw new vn(An.BELOW_MIN_TOKENS);if(e.length>8)throw new vn(An.ABOVE_MAX_TOKENS);if(BigInt(a)<=BigInt(0)||BigInt(a)>BigInt(1e17))throw new vn(An.INVALID_SWAP_FEE_PERCENTAGE);if(t.reduce(((e,t)=>et.add(e,BigInt(t))),BigInt(0))!==BigInt(1e18))throw new vn(An.INVALID_WEIGHTS)}buildInitJoin({joiner:e,poolId:t,tokensIn:a,amountsIn:n}){this.checkInitJoinInputs({poolId:t,tokensIn:a,amountsIn:n});const{attributes:o,params:i}=this.parseParamsForInitJoin({joiner:e,poolId:t,tokensIn:a,amountsIn:n}),{functionName:s,data:r}=this.encodeInitJoinFunctionData(i);return{to:wn,functionName:s,data:r,attributes:o}}async getPoolAddressAndIdWithReceipt(e,t){var a;const n=Jt({receipt:t,to:(null===(a=this.contracts.weightedPoolFactory)||void 0===a?void 0:a.address)||"",contractInterface:pn.createInterface(),logName:"PoolCreated"}).args.pool,o=this.getPoolInterface(),i=new Z(n,o,e);return{poolAddress:n,poolId:await i.getPoolId()}}getPoolInterface(){return sn.createInterface()}}var Yr;!function(e){e[e.AAVE_V1=0]="AAVE_V1",e[e.AAVE_V2=1]="AAVE_V2",e[e.AAVE_V3=2]="AAVE_V3",e[e.AMPLEFORTH=3]="AMPLEFORTH",e[e.BEEFY=4]="BEEFY",e[e.EULER=5]="EULER",e[e.GEARBOX=6]="GEARBOX",e[e.IDLE=7]="IDLE",e[e.MORPHO=8]="MORPHO",e[e.RADIANT=9]="RADIANT",e[e.REAPER=10]="REAPER",e[e.SILO=11]="SILO",e[e.STARGATE=12]="STARGATE",e[e.STURDY=13]="STURDY",e[e.TESSERA=14]="TESSERA",e[e.TETU=15]="TETU",e[e.YEARN=16]="YEARN",e[e.MIDAS=17]="MIDAS",e[e.AGAVE=18]="AGAVE"}(Yr||(Yr={}));class jr{constructor(e,t){this.getPoolFactoryInterface=()=>{switch(this.poolType){case Be.AaveLinear:return ta.createInterface();case Be.Linear:case Be.ERC4626Linear:return va.createInterface();case Be.EulerLinear:return Ma.createInterface();case Be.GearboxLinear:return Ua.createInterface();case Be.YearnLinear:return cn.createInterface();default:throw new vn(An.UNSUPPORTED_POOL_TYPE)}},this.getPoolInterface=()=>{switch(this.poolType){case Be.AaveLinear:return Qt.createInterface();case Be.Linear:case Be.ERC4626Linear:return Ea.createInterface();case Be.EulerLinear:return ka.createInterface();case Be.GearboxLinear:return La.createInterface();case Be.YearnLinear:return ln.createInterface();default:throw new vn(An.UNSUPPORTED_POOL_TYPE)}},this.checkCreateInputs=({swapFeeEvm:e,protocolId:t})=>{if(!Yr[t])throw new vn(An.INVALID_PROTOCOL_ID);if(BigInt(e)<=BigInt(0)||BigInt(e)>BigInt(1e17))throw new vn(An.INVALID_SWAP_FEE_PERCENTAGE);this.getFactoryAddress()},this.parseCreateParamsForEncoding=({name:e,symbol:t,mainToken:a,wrappedToken:n,upperTargetEvm:o,swapFeeEvm:i,owner:s,protocolId:r,salt:p})=>this.poolType===Be.EulerLinear?[e,t,a,n,o,i,s,r.toString()]:[e,t,a,n,o,i,s,r.toString(),p||Xt()],this.encodeCreateFunctionData=e=>{const t=this.getPoolFactoryInterface();return this.poolType,Be.EulerLinear,t.encodeFunctionData("create",e)},this.getFactoryAddress=()=>{switch(this.poolType){case Be.AaveLinear:if(this.contracts.aaveLinearPoolFactory)return this.contracts.aaveLinearPoolFactory.address;throw new vn(An.UNSUPPORTED_POOL_TYPE);case Be.Linear:case Be.ERC4626Linear:if(this.contracts.erc4626LinearPoolFactory)return this.contracts.erc4626LinearPoolFactory.address;throw new vn(An.UNSUPPORTED_POOL_TYPE);case Be.EulerLinear:if(this.contracts.eulerLinearPoolFactory)return this.contracts.eulerLinearPoolFactory.address;throw new vn(An.UNSUPPORTED_POOL_TYPE);case Be.GearboxLinear:if(this.contracts.gearboxLinearPoolFactory)return this.contracts.gearboxLinearPoolFactory.address;throw new vn(An.UNSUPPORTED_POOL_TYPE);case Be.YearnLinear:if(this.contracts.yearnLinearPoolFactory)return this.contracts.yearnLinearPoolFactory.address;throw new vn(An.UNSUPPORTED_POOL_TYPE);default:throw new vn(An.UNSUPPORTED_POOL_TYPE)}},this.getPoolAddressAndIdWithReceipt=async(e,t)=>{const a=Jt({receipt:t,to:this.getFactoryAddress()||"",contractInterface:this.getPoolFactoryInterface(),logName:"PoolCreated"}).args.pool,n=this.getPoolInterface(),o=new Z(a,n,e);return{poolAddress:a,poolId:await o.getPoolId()}},this.contracts=e,this.poolType=t}buildInitJoin(){throw new vn(An.UNSUPPORTED_POOL_TYPE)}create({name:e,symbol:t,mainToken:a,wrappedToken:n,upperTargetEvm:o,swapFeeEvm:i,owner:s,protocolId:r,salt:p}){this.checkCreateInputs({swapFeeEvm:i,protocolId:r});const d=this.parseCreateParamsForEncoding({name:e,symbol:t,mainToken:a,wrappedToken:n,upperTargetEvm:o,swapFeeEvm:i,owner:s,protocolId:r,salt:p}),l=this.encodeCreateFunctionData(d);return{to:this.getFactoryAddress(),data:l}}}class zr{constructor(e,t){this.networkConfig=e,this.contracts=t.contracts}of(e){switch(e){case"Weighted":return new Xr(this.networkConfig,this.contracts);case"Investment":case"LiquidityBootstrapping":case"Stable":case"MetaStable":case"StablePhantom":default:throw new vn(An.UNSUPPORTED_POOL_TYPE);case"ComposableStable":return new Jr(this.networkConfig,this.contracts);case"Linear":case"AaveLinear":case"ERC4626Linear":case"EulerLinear":case"GearboxLinear":case"YearnLinear":return new jr(this.contracts,e)}}}class Zr{constructor(e){this.pool=e;const t=(e=>{switch(e){case Be.Weighted:return pe;case Be.Stable:case Be.MetaStable:case Be.StablePhantom:case Be.Element:case Be.Gyro2:case Be.Gyro3:return re;case Be.ComposableStable:return be;default:if(Ht(e))return re}})(e.poolType);if(!t)throw"Pool type not supported";this.encoder=t}buildQueryJoinExactIn({maxAmountsInByToken:e,minimumBPT:t=n}){const a=this.pool.tokensList.findIndex((e=>this.pool.id.includes(e))),i=[...this.pool.tokensList],s=this.pool.tokensList.map((t=>{var a;return null!==(a=e.get(t))&&void 0!==a?a:p.from("0")}));let r;r=a>-1?Wt(s,a):s;const d=this.encoder.joinExactTokensInForBPTOut(r,t);return[this.pool.id,o,o,{assets:i,maxAmountsIn:s,userData:d,fromInternalBalance:!1}]}buildQueryJoinExactOut({maxAmountIn:e,bptOut:t,tokenIn:a}){const n=this.pool.tokensList.findIndex((e=>this.pool.id.includes(e)));let i=[...this.pool.tokensList];n>-1&&(i=Wt(this.pool.tokensList,n));const s=i.indexOf(a),r=this.encoder.joinTokenInForExactBPTOut(t,s),p=e?this.pool.tokensList.map((t=>t===a?e:"0")):[];return[this.pool.id,o,o,{assets:this.pool.tokensList,maxAmountsIn:p,userData:r,fromInternalBalance:!1}]}buildQueryExitToSingleToken({minAmountOut:e,bptIn:t,tokenOut:a}){const n=this.pool.tokensList.findIndex((e=>this.pool.id.includes(e)));let i=[...this.pool.tokensList];n>-1&&(i=Wt(this.pool.tokensList,n));const s=i.indexOf(a),r=this.encoder.exitExactBPTInForOneTokenOut(t,s),p=e?this.pool.tokensList.map((t=>t===a?e:"0")):[];return[this.pool.id,o,o,{assets:this.pool.tokensList,minAmountsOut:p,userData:r,toInternalBalance:!1}]}buildQueryExitProportionally({minAmountsOut:e=[],bptIn:t}){if(!this.encoder.exitExactBPTInForTokensOut)throw"Proportional exit not implemented";const a=this.encoder.exitExactBPTInForTokensOut(t);return[this.pool.id,o,o,{assets:this.pool.tokensList,minAmountsOut:e,userData:a,toInternalBalance:!1}]}buildQueryExitExactOut({minAmountsOut:e,maxBptIn:t=i}){const a=this.pool.tokensList.findIndex((e=>this.pool.id.includes(e)));let n=[...e];a>-1&&(n=Wt(e,a));const s=this.encoder.exitBPTInForExactTokensOut(n,t);return[this.pool.id,o,o,{assets:this.pool.tokensList,minAmountsOut:e,userData:s,toInternalBalance:!1}]}}class Qr{constructor(e){this.liquidityGaugesRepository=e}async relativeWeight(e){const t=await this.liquidityGaugesRepository.findBy("poolId",e);return t?t.relativeWeight:0}async weekly(e){return fr()*await this.relativeWeight(e)}}const ep=(e,t,a)=>{const n=e.tokens.filter((t=>!e.id.toLowerCase().includes(t.address.toLowerCase()))),o=n.findIndex((e=>e.address.toLowerCase()===t.toLowerCase()));if(-1==o)throw new Error("Token not found in pool");const i=n.map((e=>_t(e.balance,e.decimals))),s=p.from(a),r=i.map((e=>e.mul(s).div(i[o])));return{tokens:n.map((e=>e.address)),amounts:r.map((e=>e.toString()))}},tp=(e,t)=>()=>{throw`${t} for poolType ${e} not implemented`};class ap{constructor(e,t,a){this.networkConfig=e,this.repositories=t,this.balancerContracts=a,this.aprService=new gr(this.repositories.pools,this.repositories.tokenPrices,this.repositories.tokenMeta,this.repositories.tokenYields,this.repositories.feeCollector,this.repositories.yesterdaysPools,this.repositories.liquidityGauges,this.repositories.feeDistributor,this.repositories.gyroConfigRepository),this.liquidityService=new go(t.pools,t.tokenPrices),this.simulationService=new Gr(e,this.repositories.poolsForSimulations),this.graphService=new Er(this.repositories.poolsOnChain),this.joinService=new Ur(this.graphService,e,this.simulationService),this.exitService=new Hr(this.graphService,e,this.simulationService),this.feesService=new _r(t.yesterdaysPools),this.volumeService=new Kr(t.yesterdaysPools),this.poolFactory=new zr(e,a),this.impermanentLossService=new ur(t.tokenPrices,t.tokenHistoricalPrices),t.liquidityGauges&&(this.emissionsService=new Qr(t.liquidityGauges)),this.proportionalAmounts=ep}static wrap(e,t){let a,n,o;try{a=_o.from(e.poolType),o={buildJoin:(t,n,o,s)=>a.join.buildJoin({joiner:t,pool:e,tokensIn:n,amountsIn:o,slippage:s,wrappedNativeAsset:i}),calcPriceImpact:async(t,n,o)=>a.priceImpactCalculator.calcPriceImpact(e,t.map(BigInt),BigInt(n),o),buildExitExactBPTIn:(t,n,o,s=!1,r,p=!1)=>{if(a.exit.buildExitExactBPTIn)return a.exit.buildExitExactBPTIn({exiter:t,pool:e,bptIn:n,slippage:o,shouldUnwrapNativeAsset:s,wrappedNativeAsset:i,singleTokenOut:r,toInternalBalance:p});throw"ExitExactBPTIn not supported"},buildExitExactTokensOut:(t,n,o,s,r=!1)=>a.exit.buildExitExactTokensOut({exiter:t,pool:e,tokensOut:n,amountsOut:o,slippage:s,wrappedNativeAsset:i,toInternalBalance:r}),buildRecoveryExit:(t,n,o,i=!1)=>a.exit.buildRecoveryExit({exiter:t,pool:e,bptIn:n,slippage:o,toInternalBalance:i}),calcSpotPrice:(t,n)=>a.spotPriceCalculator.calcPoolSpotPrice(t,n,e),calcProportionalAmounts:(t,a)=>ep(e,t,a)}}catch(t){if("UNSUPPORTED_POOL_TYPE"!=t.code){Re.getInstance().warn(t)}o={buildJoin:tp(e.poolType,"buildJoin"),calcPriceImpact:tp(e.poolType,"calcPriceImpact"),buildExitExactBPTIn:tp(e.poolType,"buildExitExactBPTIn"),buildExitExactTokensOut:tp(e.poolType,"buildExitExactTokensOut"),calcSpotPrice:tp(e.poolType,"calcSpotPrice"),buildRecoveryExit:tp(e.poolType,"buildRecoveryExit")}}try{n=new Zr(e),o={...o,buildQueryJoinExactIn:n.buildQueryJoinExactIn.bind(n),buildQueryJoinExactOut:n.buildQueryJoinExactOut.bind(n),buildQueryExitExactOut:n.buildQueryExitExactOut.bind(n),buildQueryExitToSingleToken:n.buildQueryExitToSingleToken.bind(n),buildQueryExitProportionally:n.buildQueryExitProportionally.bind(n)}}catch(t){o={...o,buildQueryJoinExactIn:tp(e.poolType,"buildQueryJoinExactIn"),buildQueryJoinExactOut:tp(e.poolType,"buildQueryJoinExactOut"),buildQueryExitExactOut:tp(e.poolType,"buildQueryExitExactOut"),buildQueryExitToSingleToken:tp(e.poolType,"buildQueryExitToSingleToken"),buildQueryExitProportionally:tp(e.poolType,"buildQueryExitProportionally")}}const i=t.addresses.tokens.wrappedNativeAsset.toLowerCase(),s=e.tokensList.indexOf(e.address);return{...e,...o,bptIndex:s}}dataSource(){return this.repositories.pools}async apr(e){return this.aprService.apr(e)}async impermanentLoss(e,t){return this.impermanentLossService.calcImpLoss(e,t)}async liquidity(e){return this.liquidityService.getLiquidity(e)}async bptPrice(e){return this.liquidityService.getBptPrice(e)}buildJoin({pool:e,tokensIn:t,amountsIn:a,userAddress:n,slippage:o}){const i=_o.from(e.poolType);if(!i)throw`buildJoin for poolType ${e.poolType} not implemented`;return i.join.buildJoin({joiner:n,pool:e,tokensIn:t,amountsIn:a,slippage:o,wrappedNativeAsset:this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase()})}buildExitExactBPTIn({pool:e,bptAmount:t,userAddress:a,slippage:n,shouldUnwrapNativeAsset:o,singleTokenOut:i}){const s=_o.from(e.poolType);if(!s||!s.exit.buildExitExactBPTIn)throw`buildExit for poolType ${e.poolType} not implemented`;return s.exit.buildExitExactBPTIn({pool:e,exiter:a,bptIn:t,slippage:n,wrappedNativeAsset:this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase(),shouldUnwrapNativeAsset:null!=o&&o,singleTokenOut:null!=i?i:void 0,toInternalBalance:!1})}buildRecoveryExit({pool:e,bptAmount:t,userAddress:a,slippage:n,toInternalBalance:o}){const i=_o.from(e.poolType);if(!i||!i.exit.buildRecoveryExit)throw`buildRecoveryExit for poolType ${e.poolType} not implemented`;return i.exit.buildRecoveryExit({exiter:a,pool:e,bptIn:t,slippage:n,toInternalBalance:!!o})}async generalisedJoin(e,t,a,n,o,i,s,r){return this.joinService.joinPool(e,t,a,n,o,i,s,r)}async generalisedExit(e,t,a,n,o,i,s,r){return this.exitService.buildExitCall(e,t,a,n,o,i,s,r)}calcPriceImpact({pool:e,tokenAmounts:t,bptAmount:a,isJoin:n}){return _o.from(e.poolType).priceImpactCalculator.calcPriceImpact(e,t.map(BigInt),BigInt(a),n)}async getExitInfo(e,t,a,n){return this.exitService.getExitInfo(e,t,a,n)}async fees(e){return this.feesService.last24h(e)}async volume(e){return this.volumeService.last24h(e)}async find(e){const t=await this.dataSource().find(e);if(t)return ap.wrap(t,this.networkConfig)}async findBy(e,t){if("id"==e)return this.find(t);if("address"==e){const e=await this.dataSource().findBy("address",t);if(!e)return;return ap.wrap(e,this.networkConfig)}throw`search by ${e} not implemented`}async all(){const e=await this.dataSource().all();return e?e.map((e=>ap.wrap(e,this.networkConfig))).filter((e=>e)):[]}async where(e){const t=await this.dataSource().where(e);if(!t)return[];return t.map((e=>ap.wrap(e,this.networkConfig))).filter((e=>e))}}const np=new ft("strings/5.7.0");var op,ip;function sp(e,t,a,n,o){if(e===ip.BAD_PREFIX||e===ip.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return e===ip.OVERRUN?a.length-t-1:0}function rp(e,t=op.current){t!=op.current&&(np.checkNormalize(),e=e.normalize(t));let a=[];for(let t=0;t>6|192),a.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);if(t>=e.length||56320!=(64512&o))throw new Error("invalid utf-8 string");const i=65536+((1023&n)<<10)+(1023&o);a.push(i>>18|240),a.push(i>>12&63|128),a.push(i>>6&63|128),a.push(63&i|128)}else a.push(n>>12|224),a.push(n>>6&63|128),a.push(63&n|128)}return m(a)}function pp(e){const t=rp(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return f(T([t,r]).slice(0,32))}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(op||(op={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(ip||(ip={})),Object.freeze({error:function(e,t,a,n,o){return np.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",a)},ignore:sp,replace:function(e,t,a,n,o){return e===ip.OVERLONG?(n.push(o),0):(n.push(65533),sp(e,t,a))}});var dp,lp="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},up={exports:{}};dp=up,function(){var e="input is invalid type",t="object"==typeof window,a=t?window:{};a.JS_SHA3_NO_WINDOW&&(t=!1);var n=!t&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?a=lp:n&&(a=self);var o=!a.JS_SHA3_NO_COMMON_JS&&dp.exports,i=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,s="0123456789abcdef".split(""),r=[4,1024,262144,67108864],p=[0,8,16,24],d=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],l=[224,256,384,512],u=[128,256],c=["hex","buffer","arrayBuffer","array","digest"],y={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!i||!a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var b=function(e,t,a){return function(n){return new k(e,t,e).update(n)[a]()}},m=function(e,t,a){return function(n,o){return new k(e,t,o).update(n)[a]()}},f=function(e,t,a){return function(t,n,o,i){return g["cshake"+e].update(t,n,o,i)[a]()}},T=function(e,t,a){return function(t,n,o,i){return g["kmac"+e].update(t,n,o,i)[a]()}},h=function(e,t,a,n){for(var o=0;o>5,this.byteCount=this.blockCount<<2,this.outputBlocks=a>>5,this.extraBytes=(31&a)>>3;for(var n=0;n<50;++n)this.s[n]=0}function O(e,t,a){k.call(this,e,t,a)}k.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var a,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(e);if(null===t)throw new Error(e);if(i&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||i&&ArrayBuffer.isView(t)))throw new Error(e);a=!0}for(var o,s,r=this.blocks,d=this.byteCount,l=t.length,u=this.blockCount,c=0,y=this.s;c>2]|=t[c]<>2]|=s<>2]|=(192|s>>6)<>2]|=(128|63&s)<=57344?(r[o>>2]|=(224|s>>12)<>2]|=(128|s>>6&63)<>2]|=(128|63&s)<>2]|=(240|s>>18)<>2]|=(128|s>>12&63)<>2]|=(128|s>>6&63)<>2]|=(128|63&s)<=d){for(this.start=o-d,this.block=r[u],o=0;o>=8);a>0;)o.unshift(a),a=255&(e>>=8),++n;return t?o.push(n):o.unshift(n),this.update(o),o.length},k.prototype.encodeString=function(t){var a,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(e);if(null===t)throw new Error(e);if(i&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||i&&ArrayBuffer.isView(t)))throw new Error(e);a=!0}var o=0,s=t.length;if(a)o=s;else for(var r=0;r=57344?o+=3:(p=65536+((1023&p)<<10|1023&t.charCodeAt(++r)),o+=4)}return o+=this.encode(8*o),this.update(t),o},k.prototype.bytepad=function(e,t){for(var a=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[a],t=1;t>4&15]+s[15&e]+s[e>>12&15]+s[e>>8&15]+s[e>>20&15]+s[e>>16&15]+s[e>>28&15]+s[e>>24&15];r%t==0&&(M(a),i=0)}return o&&(e=a[i],p+=s[e>>4&15]+s[15&e],o>1&&(p+=s[e>>12&15]+s[e>>8&15]),o>2&&(p+=s[e>>20&15]+s[e>>16&15])),p},k.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,a=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,r=this.outputBits>>3;e=o?new ArrayBuffer(n+1<<2):new ArrayBuffer(r);for(var p=new Uint32Array(e);s>8&255,p[e+2]=t>>16&255,p[e+3]=t>>24&255;r%a==0&&M(n)}return i&&(e=r<<2,t=n[s],p[e]=255&t,i>1&&(p[e+1]=t>>8&255),i>2&&(p[e+2]=t>>16&255)),p},O.prototype=new k,O.prototype.finalize=function(){return this.encode(this.outputBits,!0),k.prototype.finalize.call(this)};var M=function(e){var t,a,n,o,i,s,r,p,l,u,c,y,b,m,f,T,h,I,_,g,P,w,x,E,A,v,S,k,O,M,C,F,B,R,N,L,D,U,V,q,G,W,$,H,K,J,X,Y,j,z,Z,Q,ee,te,ae,ne,oe,ie,se,re,pe,de,le;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],r=e[3]^e[13]^e[23]^e[33]^e[43],p=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],t=(y=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|r>>>31),a=(b=e[9]^e[19]^e[29]^e[39]^e[49])^(r<<1|s>>>31),e[0]^=t,e[1]^=a,e[10]^=t,e[11]^=a,e[20]^=t,e[21]^=a,e[30]^=t,e[31]^=a,e[40]^=t,e[41]^=a,t=o^(p<<1|l>>>31),a=i^(l<<1|p>>>31),e[2]^=t,e[3]^=a,e[12]^=t,e[13]^=a,e[22]^=t,e[23]^=a,e[32]^=t,e[33]^=a,e[42]^=t,e[43]^=a,t=s^(u<<1|c>>>31),a=r^(c<<1|u>>>31),e[4]^=t,e[5]^=a,e[14]^=t,e[15]^=a,e[24]^=t,e[25]^=a,e[34]^=t,e[35]^=a,e[44]^=t,e[45]^=a,t=p^(y<<1|b>>>31),a=l^(b<<1|y>>>31),e[6]^=t,e[7]^=a,e[16]^=t,e[17]^=a,e[26]^=t,e[27]^=a,e[36]^=t,e[37]^=a,e[46]^=t,e[47]^=a,t=u^(o<<1|i>>>31),a=c^(i<<1|o>>>31),e[8]^=t,e[9]^=a,e[18]^=t,e[19]^=a,e[28]^=t,e[29]^=a,e[38]^=t,e[39]^=a,e[48]^=t,e[49]^=a,m=e[0],f=e[1],J=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,k=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,re=e[31]<<9|e[30]>>>23,pe=e[30]<<9|e[31]>>>23,W=e[40]<<18|e[41]>>>14,$=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,T=e[13]<<12|e[12]>>>20,h=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,j=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,de=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ae=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,D=e[15]<<6|e[14]>>>26,I=e[25]<<11|e[24]>>>21,_=e[24]<<11|e[25]>>>21,z=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,F=e[45]<<29|e[44]>>>3,B=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,A=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,oe=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,V=e[27]<<25|e[26]>>>7,g=e[36]<<21|e[37]>>>11,P=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,H=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,v=e[18]<<20|e[19]>>>12,S=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,G=e[39]<<8|e[38]>>>24,w=e[48]<<14|e[49]>>>18,x=e[49]<<14|e[48]>>>18,e[0]=m^~T&I,e[1]=f^~h&_,e[10]=E^~v&k,e[11]=A^~S&O,e[20]=R^~L&U,e[21]=N^~D&V,e[30]=H^~J&Y,e[31]=K^~X&j,e[40]=te^~ne&ie,e[41]=ae^~oe&se,e[2]=T^~I&g,e[3]=h^~_&P,e[12]=v^~k&M,e[13]=S^~O&C,e[22]=L^~U&q,e[23]=D^~V&G,e[32]=J^~Y&z,e[33]=X^~j&Z,e[42]=ne^~ie&re,e[43]=oe^~se&pe,e[4]=I^~g&w,e[5]=_^~P&x,e[14]=k^~M&F,e[15]=O^~C&B,e[24]=U^~q&W,e[25]=V^~G&$,e[34]=Y^~z&Q,e[35]=j^~Z&ee,e[44]=ie^~re&de,e[45]=se^~pe&le,e[6]=g^~w&m,e[7]=P^~x&f,e[16]=M^~F&E,e[17]=C^~B&A,e[26]=q^~W&R,e[27]=G^~$&N,e[36]=z^~Q&H,e[37]=Z^~ee&K,e[46]=re^~de&te,e[47]=pe^~le&ae,e[8]=w^~m&T,e[9]=x^~f&h,e[18]=F^~E&v,e[19]=B^~A&S,e[28]=W^~R&L,e[29]=$^~N&D,e[38]=Q^~H&J,e[39]=ee^~K&X,e[48]=de^~te&ne,e[49]=le^~ae&oe,e[0]^=d[n],e[1]^=d[n+1]};if(o)dp.exports=g;else for(w=0;w256)&&fp.throwArgumentError("invalid number type","type",e),a&&(o=256),t=p.from(t).toTwos(o),h(t,o/8)}if(n=e.match(yp),n){const o=parseInt(n[1]);return(String(o)!==n[1]||0===o||o>32)&&fp.throwArgumentError("invalid bytes type","type",e),m(t).byteLength!==o&&fp.throwArgumentError(`invalid value for ${e}`,"value",t),a?m((t+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):t}if(n=e.match(mp),n&&Array.isArray(t)){const a=n[1];parseInt(n[2]||String(t.length))!=t.length&&fp.throwArgumentError(`invalid array length for ${e}`,"value",t);const o=[];return t.forEach((function(e){o.push(Tp(a,e,!0))})),T(o)}return fp.throwArgumentError("invalid type","type",e)}function hp(e,t){e.length!=t.length&&fp.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const a=[];return e.forEach((function(e,n){a.push(Tp(e,t[n]))})),f(T(a))}function Ip(e,t){return a=hp(e,t),"0x"+cp.keccak_256(m(a));var a}const _p=pp("PROTOCOL_SWAP_FEE_PERC"),gp=pp("E-CLP"),Pp=Ip(["bytes"],[e.encode(["bytes32","bytes32"],[_p,gp])]);class wp{constructor(e,t,a){this.gyroConfigAddress=e,this.multicall=t,this.gyroConfigInterface=qa.createInterface(),this.gyroConfig=qa.connect(e,a)}async getGyroProtocolFee(t){let a;const n=Ip(["bytes"],[e.encode(["bytes32","uint256"],[_p,t])]),o=[{target:this.gyroConfigAddress,callData:this.gyroConfigInterface.encodeFunctionData("hasKey",[n])},{target:this.gyroConfigAddress,callData:this.gyroConfigInterface.encodeFunctionData("hasKey",[Pp])},{target:this.gyroConfigAddress,callData:this.gyroConfigInterface.encodeFunctionData("hasKey",[_p])}],[,[i,s,r]]=await this.multicall.callStatic.aggregate(o),d=p.from(i).eq(1),u=p.from(s).eq(1),c=p.from(r).eq(1);return a=d?parseFloat(l(await this.gyroConfig.getUint(n),18)):u?parseFloat(l(await this.gyroConfig.getUint(Pp),18)):c?parseFloat(l(await this.gyroConfig.getUint(_p),18)):0,a}}const xp=new t(["function gauge_relative_weight(address gauge, uint timestamp) view returns (uint)"]),Ep=new t(["function gauge_relative_weight(address gauge) view returns (uint)"]);class Ap{constructor(e,t,a){this.multicall=e,this.gaugeControllerAddress=t,this.gaugeControllerCheckpointerAddress=a}async getRelativeWeights(e,t){const a=e.map((e=>this.gaugeControllerCheckpointerAddress&&!t?{target:this.gaugeControllerCheckpointerAddress,callData:Ep.encodeFunctionData("gauge_relative_weight",[u(e)])}:{target:this.gaugeControllerAddress,callData:xp.encodeFunctionData("gauge_relative_weight",[u(e),t||Math.floor(Date.now()/1e3)])})),[,n]=await this.multicall.callStatic.aggregate(a);return e.reduce(((e,t,a)=>(e[t]||(e[t]=parseFloat(It(n[a],18))),e)),{})}}class vp{async get(e){const t=await this.query(e);return(null==t?void 0:t.length)>0?t[0]:void 0}async find(e){return this.get({where:{id:e}})}async findBy(e,t){return this.get({where:{[String(e)]:t}})}async findAllBy(e,t,a=1e3,n=0){const o={where:{[String(e)]:t},first:a,skip:n};return this.query(o)}}class Sp extends vp{constructor(e,t,a){super(),this.chainId=t,this.blockHeight=a,this.client=Is(e)}}class kp extends vp{constructor(e,t,a){super(),this.chainId=t,this.blockHeight=a,this.client=_s(e)}}class Op extends kp{async query(e){e.orderBy||(e.orderBy=Xi.balance),e.orderDirection||(e.orderDirection=ts.desc),!e.block&&this.blockHeight&&(e.block={number:await this.blockHeight()});const{gaugeShares:t}=await this.client.GaugeShares(e);return t.map(this.mapType)}mapType(e){var t;return{id:e.id,balance:e.balance,userAddress:null===(t=e.user)||void 0===t?void 0:t.id,gauge:{id:e.gauge.id,poolId:e.gauge.poolId||void 0,isKilled:e.gauge.isKilled,totalSupply:e.gauge.totalSupply}}}async findByUser(e,t,a){return this.findAllBy(Oe.UserAddress,e,t,a)}async findByGauge(e,t,a){return this.findAllBy(Oe.GaugeId,e,t,a)}}const Mp=new t(["function totalSupply() view returns (uint)","function working_supply() view returns (uint)","function reward_count() view returns (uint)","function reward_tokens(uint rewardIndex) view returns (address)","function reward_data(address rewardToken) view returns (tuple(address token, address distributor, uint period_finish, uint rate, uint last_update, uint integral) data)"]),Cp=new t(["function inflation_rate(uint currentWeekTimestamp) view returns (uint)"]);class Fp{constructor(e,t){this.multicall=e,this.chainId=t}async getTotalSupplies(e){const t=e.map((e=>({target:e,callData:Mp.encodeFunctionData("totalSupply",[])}))),[,a]=await this.multicall.callStatic.aggregate(t),n=a.map((e=>"0x"==e?"0x0":e));return e.reduce(((e,t,a)=>(e[t]||(e[t]=parseFloat(It(n[a],18))),e)),{})}async getWorkingSupplies(e){const t=e.map((e=>({target:e,callData:Mp.encodeFunctionData("working_supply",[])}))),[,a]=await this.multicall.callStatic.aggregate(t),n=a.map((e=>"0x"==e?"0x0":e));return e.reduce(((e,t,a)=>(e[t]||(e[t]=parseFloat(It(n[a],18))),e)),{})}async getInflationRates(e){const t=Math.floor(Date.now()/1e3/604800),a=e.map((e=>({target:e,callData:Cp.encodeFunctionData("inflation_rate",[t])}))),[,n]=await this.multicall.callStatic.aggregate(a),o=n.map((e=>"0x"==e?"0x0":e));return e.reduce(((e,t,a)=>(e[t]||(e[t]=parseFloat(It(o[a],18))),e)),{})}async getRewardCounts(e){let t;if(1==this.chainId){const a=e.map((e=>({target:e,callData:Mp.encodeFunctionData("reward_count",[])}))),[,n]=await this.multicall.callStatic.aggregate(a),o=n.map((e=>"0x"==e?"0x0":e));t=e.reduce(((e,t,a)=>(e[t]||(e[t]=parseInt(o[a])),e)),{})}else t=e.reduce(((e,t)=>(e[t]||(e[t]=1),e)),{});return t}async getRewardTokens(e,t){const a=t||await this.getRewardCounts(e),n=e.filter((e=>a[e]>0)),o=[0],i=n.map(((e,t)=>{const n=[];for(let t=0;t{const n=o[a],i=o[a+1],r=[];for(let e=n;e{const o=[];for(let t=0;tMp.decodeFunctionResult("reward_data",e)[0]));return Object.keys(a).reduce(((e,t,o)=>{const i=n[o],r=a[t].reduce(((e,t,a)=>(e[t]||(e[t]=s[i+a]),e)),{});return e[t]||(e[t]=r),e}),{})}}class Bp{constructor(e){this.gauges=[],this.client=_s(e)}async fetch(){const e=(await this.client.Pools({first:1e3,where:{preferentialGauge_not:null}})).pools.map((e=>e.preferentialGauge));return this.gauges=e,this.gauges}async find(e){return 0==this.gauges.length&&await this.fetch(),this.gauges.find((t=>t.id==e))}async findBy(e,t){if(0==this.gauges.length&&await this.fetch(),"id"==e)return this.find(t);if("poolId"==e)return this.gauges.find((e=>e.poolId==t));if("poolAddress"==e)return this.gauges.find((e=>e.poolAddress==t));throw`search by ${e} not implemented`}}class Rp{constructor(e,t,a,n,o){this.chainId=n,this.workingSupplies={},this.relativeWeights={},this.inflationRates={},this.rewardData={},a&&(this.gaugeController=new Ap(t,a,o)),this.multicall=new Fp(t,n),this.subgraph=new Bp(e)}async fetch(){const e=await this.subgraph.fetch(),t=e.map((e=>e.id));if(1==this.chainId)this.workingSupplies=await this.multicall.getWorkingSupplies(t);else{const t=["0x3b8ca519122cdd8efb272b0d3085453404b25bd0","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2","0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647","0x809b79b53f18e9bc08a961ed4678b901ac93213a"],a=e.filter((e=>!t.includes(e.factory.id.toLowerCase()))).map((e=>e.id));a.length>0&&(this.inflationRates=await this.multicall.getInflationRates(a),this.workingSupplies=await this.multicall.getWorkingSupplies(a))}return this.gaugeController&&(this.relativeWeights=await this.gaugeController.getRelativeWeights(t)),this.rewardData=e.reduce(((e,t)=>{var a;return e[a=t.id]||(e[a]=t.tokens?Object.fromEntries(t.tokens.map((e=>[e.id.split("-")[0],{distributor:"",last_update:p.from(0),integral:p.from(0),token:e.id.split("-")[0],decimals:e.decimals,rate:_t(e.rate||"0",e.decimals),period_finish:p.from(e.periodFinish||"0")}]))):{}),e}),{}),e.map(this.compose.bind(this))}async find(e){return this.gauges||(this.gauges=this.fetch()),(await this.gauges).find((t=>t.id==e))}async findBy(e,t){let a;if(this.gauges||(this.gauges=this.fetch()),"id"==e)return this.find(t);if("address"==e)return this.find(t);if("poolId"==e)a=(await this.gauges).find((e=>e.poolId==t));else{if("poolAddress"!=e)throw`search by ${e} not implemented`;a=(await this.gauges).find((e=>e.poolAddress==t))}return a}compose(e){return{id:e.id,address:e.id,name:e.symbol,poolId:e.poolId,poolAddress:e.poolAddress,totalSupply:parseFloat(e.totalSupply),workingSupply:this.workingSupplies[e.id],relativeWeight:this.relativeWeights[e.id],rewardTokens:this.rewardData[e.id],balInflationRate:this.inflationRates[e.id]}}}class Np{constructor(e,t){this.url=e,this.apiKey=t}async get(e){try{const t=this.toPayload(e),{data:a}=await z.post(this.url,t,{headers:{"x-api-key":this.apiKey}});if(a.errors)throw new Error(a.errors.map((e=>e.message)).join(","));return a.data}catch(e){throw console.error(e),e}return[]}toPayload(e){return JSON.stringify({query:Q({query:e})})}}function Lp(e){return new Promise((t=>setTimeout(t,e)))}class Dp{constructor(e){var t,a;this.pools=[],this.skip=0,this.hasFetched=!1,this.isFetching=!1,this.client=new Np(e.url,e.apiKey);this.query={args:Object.assign({},(null===(t=e.query)||void 0===t?void 0:t.args)||{chainId:1,orderBy:"totalLiquidity",orderDirection:"desc",where:{swapEnabled:{eq:!0},totalShares:{gt:.05}}}),attrs:Object.assign({},(null===(a=e.query)||void 0===a?void 0:a.attrs)||{id:!0,address:!0})},delete this.query.args.skip}fetchFromCache(e,t){return this.pools.slice(t,e+t)}async fetch(e){const t=(null==e?void 0:e.first)||10,a=(null==e?void 0:e.skip)||0;return this.hasFetched||this.fetchAll(e),await this.awaitEnoughPoolsFetched(t,a),this.fetchFromCache(t,a)}async fetchAll(e){this.isFetching=!0,this.hasFetched=!0,this.nextToken&&(this.query.args.nextToken=this.nextToken),this.query.args.first=1e3;const t=new zt(this.query.args).format(new Yt),a=this.query.attrs;a.nextToken=!0;const n={pools:{__args:t,...a}},o=(await this.client.get(n)).pools;if(this.nextToken=o.nextToken,this.pools=this.pools.concat(o.pools.map(this.format)),this.nextToken)return await this.fetchAll(e);this.isFetching=!1}async awaitEnoughPoolsFetched(e,t){for(let a=0;a<1e3;a++){if(this.pools.length>e+t)return;if(!this.isFetching)return;await Lp(10)}}async find(e){return 0==this.pools.length&&await this.fetch(),this.findBy("id",e)}async findBy(e,t){0==this.pools.length&&await this.fetch();const a=this.pools.find((a=>a[e]==t));if(a)return this.format(a)}format(e){var t,a,n,o;if(null===(t=e.apr)||void 0===t?void 0:t.rewardAprs.breakdown){const t=JSON.parse(null===(a=e.apr)||void 0===a?void 0:a.rewardAprs.breakdown);e.apr.rewardAprs.breakdown=t}if(null===(n=e.apr)||void 0===n?void 0:n.tokenAprs.breakdown){const t=JSON.parse(null===(o=e.apr)||void 0===o?void 0:o.tokenAprs.breakdown);e.apr.tokenAprs.breakdown=t}return e}}class Up{constructor(e,t={}){this.providers=e,this.currentProviderIdx=0,this.timeout=t.timeout||1e4}async fetch(e){return this.fallbackQuery("fetch",[e])}get currentProvider(){if(this.providers.length&&!(this.currentProviderIdx>=this.providers.length))return this.providers[this.currentProviderIdx]}async find(e){return this.fallbackQuery("find",[e])}async findBy(e,t){return this.fallbackQuery("findBy",[e,t])}async fallbackQuery(e,t){if(this.currentProviderIdx>=this.providers.length)throw new Error("No working providers found");let a;try{const n=this.providers[this.currentProviderIdx];a=await Promise.race([n[e].apply(n,t),new Promise(((e,t)=>setTimeout((()=>t(new Error("timeout"))),this.timeout)))])}catch(n){const o=n.message;if("timeout"===o){Re.getInstance().warn("Provider "+this.currentProviderIdx+" timed out, falling back to next provider")}else{const e=Re.getInstance();e.warn(`Provider ${this.currentProviderIdx} failed with error, falling back to next provider.`),e.warn(o)}this.currentProviderIdx++,a=await this.fallbackQuery.call(this,e,t)}return a}}class Vp{constructor(e){this.pools=e}async find(e){return this.pools.find((t=>t.id.toLowerCase()===e.toLowerCase()))}async findBy(e,t){return this.pools.find((a=>a[e]===t))}async all(){return this.pools}async where(e){return(await this.all()).filter(e)}}const qp=(e,t)=>{var a,n,o,i,s,r,p,d,l,u,c;return{id:e.id,name:e.name||"",address:e.address,chainId:t,poolType:e.poolType,poolTypeVersion:e.poolTypeVersion||1,swapFee:e.swapFee,swapEnabled:e.swapEnabled,protocolYieldFeeCache:e.protocolYieldFeeCache||"0.5",protocolSwapFeeCache:e.protocolSwapFeeCache||"0.5",amp:null!==(a=e.amp)&&void 0!==a?a:void 0,owner:null!==(n=e.owner)&&void 0!==n?n:void 0,factory:null!==(o=e.factory)&&void 0!==o?o:void 0,symbol:null!==(i=e.symbol)&&void 0!==i?i:void 0,tokens:(e.tokens||[]).map(Gp),tokensList:e.tokensList,tokenAddresses:(e.tokens||[]).map((e=>e.address)),totalLiquidity:e.totalLiquidity,totalShares:e.totalShares,totalSwapFee:e.totalSwapFee,totalSwapVolume:e.totalSwapVolume,priceRateProviders:null!==(s=e.priceRateProviders)&&void 0!==s?s:void 0,createTime:e.createTime,mainIndex:null!==(r=e.mainIndex)&&void 0!==r?r:void 0,wrappedIndex:null!==(p=e.wrappedIndex)&&void 0!==p?p:void 0,totalWeight:e.totalWeight||"1",lowerTarget:null!==(d=e.lowerTarget)&&void 0!==d?d:"0",upperTarget:null!==(l=e.upperTarget)&&void 0!==l?l:"0",isInRecoveryMode:null!==(u=e.isInRecoveryMode)&&void 0!==u&&u,isPaused:null!==(c=e.isPaused)&&void 0!==c&&c}},Gp=e=>{const t=Wp(e.token);return{...e,isExemptFromYieldProtocolFee:e.isExemptFromYieldProtocolFee||!1,token:t}},Wp=e=>{let t=null;return e.pool&&(t={id:e.pool.id,address:e.pool.address,totalShares:e.pool.totalShares,poolType:e.pool.poolType,mainIndex:e.pool.mainIndex||0},(null==e?void 0:e.pool.tokens)&&(t.tokens=e.pool.tokens.map($p))),{pool:t,latestUSDPrice:e.latestUSDPrice||void 0}},$p=e=>({address:e.address,decimals:e.decimals,symbol:e.symbol,balance:e.balance,priceRate:e.priceRate,weight:e.weight,isExemptFromYieldProtocolFee:e.isExemptFromYieldProtocolFee||void 0,token:e.token?Wp(e.token):void 0});class Hp{constructor(e){var t,a;this.skip=0,this.client=Is(e.url),this.blockHeight=e.blockHeight,this.chainId=e.chainId;const n={orderBy:pi.TotalLiquidity,orderDirection:ai.Desc,where:{totalShares:{gt:1e-12}}},o=Object.assign({},(null===(t=e.query)||void 0===t?void 0:t.args)||n),i=Object.assign({},(null===(a=e.query)||void 0===a?void 0:a.attrs)||{});this.query={args:o,attrs:i}}async fetchAllPools(){const e=Re.getInstance();e.time("fetching pools"),this.blockHeight&&(this.query.args.block={number:await this.blockHeight()});const t=new zt(this.query.args).format(new jt),{pool0:a,pool1000:n,pool2000:o}=await this.client.AllPools(t);return e.timeEnd("fetching pools"),[...a,...n,...o].map((e=>qp(e,this.chainId)))}async fetch(e){const t=Re.getInstance();t.time("fetching pools"),(null==e?void 0:e.skip)&&(this.query.args.skip=e.skip),this.blockHeight&&(this.query.args.block={number:await this.blockHeight()}),this.query.args.first=(null==e?void 0:e.first)||this.query.args.first||1e3;const a=new zt(this.query.args).format(new jt),{pools:n}=await this.client.Pools(a);return this.skip=((null==e?void 0:e.skip)||0)+n.length,t.timeEnd("fetching pools"),n.map((e=>qp(e,this.chainId)))}async find(e){return await this.findBy("id",e)}async findBy(e,t){return this.pools||(this.pools=this.fetchAllPools()),(await this.pools).find((a=>a[e]==t))}async all(){return this.pools||(this.pools=this.fetchAllPools()),this.pools}async block(){return this.blockHeight?{number:await this.blockHeight()}:void 0}async where(e){return this.pools||(this.pools=this.fetchAllPools()),(await this.pools).filter(e)}}class Kp{constructor(e,t,a,n){this.poolsSubgraph=e,this.poolsToIgnore=a,this.batchSize=n,this.skip=0,this.provider=t.provider,this.multicall=t.multicall,this.vault=t.vault}filterPools(e){return e.filter((e=>{if(!1===e.swapEnabled)return!1;if(!this.poolsToIgnore)return!0;return-1===this.poolsToIgnore.findIndex((t=>t.toLowerCase()===e.id.toLowerCase()))}))}async fetchDefault(){const e=await this.poolsSubgraph.all(),t=this.filterPools(e),a=Re.getInstance();a.time(`fetching onchain ${t.length} pools`);const n=await Ss(t,this.multicall,this.vault,this.provider,this.batchSize);return a.timeEnd(`fetching onchain ${t.length} pools`),n}async fetch(e){const t=await this.poolsSubgraph.fetch(e),a=this.filterPools(t),n=Re.getInstance();n.time(`fetching onchain ${a.length} pools`);const o=await Ss(a,this.multicall,this.vault,this.provider,this.batchSize);return n.timeEnd(`fetching onchain ${a.length} pools`),o}async find(e,t=!1){return await this.findBy("id",e,t)}async findBy(e,t,a=!1){return this.pools&&!a||(this.pools=this.fetchDefault()),(await this.pools).find((a=>a[e]==t))}async all(){return this.pools||(this.pools=this.fetchDefault()),this.pools}async where(e){return this.pools||(this.pools=this.fetchDefault()),(await this.pools).filter(e)}async refresh(e){const t=await Ss([e],this.multicall,this.vault,this.provider);if(this.pools){const a=(await this.pools).findIndex((t=>t.address===e.address));-1!==a&&(this.pools=Promise.resolve([...(await this.pools).splice(a,1),t[0]]))}return t[0]}}class Jp extends kp{async query(e){!e.block&&this.blockHeight&&(e.block={number:await this.blockHeight()});const{pools:t}=await this.client.PoolGauges(e);return t.map(this.mapType)}mapType(e){return e}}var Xp;!function(e){e.Pool="pool",e.Sender="sender"}(Xp||(Xp={}));class Yp extends Sp{async query(e){e.orderBy||(e.orderBy=Zo.Timestamp),e.orderDirection||(e.orderDirection=ai.Asc),!e.block&&this.blockHeight&&(e.block={number:await this.blockHeight()});const{joinExits:t}=await this.client.JoinExits(e);return t.map(this.mapType)}mapType(e){return{id:e.id,userAddress:e.user.id,poolId:e.pool.id,timestamp:e.timestamp,type:e.type,amounts:e.amounts,tokens:e.pool.tokensList}}async findByUser(e,t,a){return this.findAllBy(Xp.Sender,e,t,a)}async findJoins(e,t){return this.query({where:{sender:e,pool:t,type:"Join"}})}async findExits(e,t){return this.query({where:{sender:e,pool:t,type:"Exit"}})}async findByPool(e,t,a){return this.findAllBy(Xp.Pool,e,t,a)}}class jp extends Sp{async query(e){e.orderBy||(e.orderBy=ii.Balance),e.orderDirection||(e.orderDirection=ai.Desc),!e.block&&this.blockHeight&&(e.block={number:await this.blockHeight()});const{poolShares:t}=await this.client.PoolShares(e);return t.map(this.mapType)}mapType(e){return{id:e.id,userAddress:e.userAddress.id,poolId:e.poolId.id,balance:e.balance}}async findByUser(e,t,a){return this.findAllBy(ke.UserAddress,e,t,a)}async findByPool(e,t,a){return this.findAllBy(ke.PoolId,e,t,a)}}class zp{constructor(e){this.tokens=e}async find(e){return this.tokens.find((t=>t.address.toLowerCase()===e.toLowerCase()))}async findBy(e,t){return this.tokens.find((a=>a[e]===t))}}class Zp{constructor(e){this.tokenPrices=Object.fromEntries(Object.entries(e).map((([e,t])=>[e.toLowerCase(),t])))}async find(e){const t=e.toLowerCase(),a=this.tokenPrices[t];if(a)return a}async findBy(e,t){if("address"==e)return this.find(t)}}class Qp{constructor(e,t=1,a){var n;this.chainId=t,this.prices={},this.baseTokenAddresses=e.map(At),this.url=`${Rs(null==a?void 0:a.isDemoApiKey)}simple/token_price/${this.platform(t)}?vs_currencies=usd,eth`,this.urlNative=`${Rs(null==a?void 0:a.isDemoApiKey)}simple/price/?vs_currencies=eth,usd&ids=`,this.coingeckoApiKeyHeaderName=Ns(null==a?void 0:a.isDemoApiKey),this.apiKey=null==a?void 0:a.coingeckoApiKey,this.debouncer=new Ot(this.fetch.bind(this),200,null!==(n=null==a?void 0:a.tokensPerPriceRequest)&&void 0!==n?n:10)}async fetch(e,{signal:t}={}){var a,n,o;try{const{data:n}=await z.get(`${this.url}&contract_addresses=${e.join(",")}`,{signal:t,headers:{[this.coingeckoApiKeyHeaderName]:null!==(a=this.apiKey)&&void 0!==a?a:""}});return n}catch(e){const t=["Error fetching token prices from coingecko"];return e.isAxiosError?void 0!==(null===(n=e.response)||void 0===n?void 0:n.status)&&t.push(`with status ${null===(o=e.response)||void 0===o?void 0:o.status}`):t.push(e),Promise.reject(t.join(" "))}}fetchNative({signal:e}={}){var t;let a;!function(e){e.ETH="ethereum",e.MATIC="matic-network",e.XDAI="xdai"}(a||(a={}));let n=a.ETH;return 137===this.chainId&&(n=a.MATIC),100===this.chainId&&(n=a.XDAI),z.get(`${this.urlNative}${n}`,{signal:e,headers:{[this.coingeckoApiKeyHeaderName]:null!==(t=this.apiKey)&&void 0!==t?t:""}}).then((({data:e})=>e[n])).catch((e=>{var t;const a=["Error fetching native token from coingecko"];return e.isAxiosError?(null===(t=e.response)||void 0===t?void 0:t.status)&&a.push(`with status ${e.response.status}`):a.push(e),Promise.reject(a.join(" "))})).finally((()=>{}))}find(e){const t=At(e,this.chainId);if(!this.prices[t]){if(0===Object.keys(this.prices).length)for(const e of this.baseTokenAddresses)this.prices[e]=this.debouncer.fetch(e).then((t=>t[e]));if(t===st(this.chainId).Addresses.nativeAsset.toLowerCase())return this.nativePrice||(this.prices[t]=this.fetchNative()),this.prices[t];this.prices[t]=this.debouncer.fetch(t).then((e=>e[t]))}return this.prices[t]}async findBy(e,t){if("address"==e)return this.find(t)}platform(e){switch(e){case 1:case 5:case 42:case 31337:return"ethereum";case 100:return"xdai";case 137:return"polygon-pos";case 250:return"fantom";case 1101:return"polygon-zkevm";case 8453:return"base";case 42161:return"arbitrum-one";case 43114:return"avalanche"}return"2"}}class ed{constructor(e=1,t){this.chainId=e,this.prices={},this.urlBase=`${Rs(null==t?void 0:t.isDemoApiKey)}coins/${this.platform(e)}/contract/%TOKEN_ADDRESS%/market_chart/range?vs_currency=usd`,this.apiKey=null==t?void 0:t.coingeckoApiKey,this.coingeckoApiKeyHeaderName=Ns(null==t?void 0:t.isDemoApiKey)}async fetch(e,t,{signal:a}={}){var n,o;const i=this.urlRange(e,t);try{const{data:e}=await z.get(i,{signal:a,headers:{[this.coingeckoApiKeyHeaderName]:null!==(n=this.apiKey)&&void 0!==n?n:""}});return e}catch(e){if(e.isAxiosError)throw new Error("Error fetching historical token prices from coingecko - "+e.message+" - "+(null===(o=e.response)||void 0===o?void 0:o.statusText));throw new Error("Unknown Error: "+e)}}async find(e){throw"Historic price requires point-in-time timestamp, please use findBy(address, timestamp)"}async findBy(e,t){const a=At(e,this.chainId);return{usd:`${(await this.fetch(a,t)).prices[0][1]}`}}platform(e){switch(e){case 1:case 5:case 42:case 31337:return"ethereum";case 137:return"polygon-pos";case 42161:return"arbitrum-one";case 100:return"xdai"}return"2"}urlRange(e,t){const a=t-3600,n=t+3600;return`${this.urlBase.replace("%TOKEN_ADDRESS%",e)}&from=${a}&to=${n}`}}class td{constructor(e,t=1){this.subgraphUrl=e,this.chainId=t,this.prices={},this.debouncer=new Ot(this.fetch.bind(this),200)}async fetch(e,{signal:t}={}){return e.length,z.post(this.subgraphUrl,{variables:{addresses:e},query:"query($addresses: [String!]) {\n tokens(\n where: {\n id_in: $addresses\n }\n ) {\n address\n latestUSDPrice\n }\n }"},{signal:t}).then((e=>e.data.data)).then((({tokens:e})=>Object.fromEntries(e.map((e=>[e.address,{usd:e.latestUSDPrice||void 0}]))))).finally((()=>{e.length}))}async find(e){const t=At(e,this.chainId);return this.prices[t]||(this.prices[t]=this.debouncer.fetch(t).then((e=>e[t]))),this.prices[t]}async findBy(e,t){if("address"==e)return this.find(t)}}class ad{constructor(e,t,a){this.coingeckoRepository=e,this.subgraphRepository=t,this.aaveRates=a}async find(e){let t;try{if(t=await this.coingeckoRepository.find(e),!(null==t?void 0:t.usd))throw new Error("Price not found")}catch(a){Re.getInstance().warn(a),t=await this.subgraphRepository.find(e)}const a=await this.aaveRates.getRate(e)||1;return t&&t.usd?{...t,usd:(parseFloat(t.usd)*a).toString()}:t}async findBy(e,t){if("address"===e)return this.find(t);throw`Token price search by ${e} not implemented`}}class nd{constructor(e,t){this.coingeckoRepository=e,this.aaveRates=t}async find(e){return this.findBy(e,Math.floor(Date.now()/1e3))}async findBy(e,t){const a=await this.coingeckoRepository.findBy(e,t),n=await this.aaveRates.getRate(e)||1;return a&&a.usd?{...a,usd:(parseFloat(a.usd)*n).toString()}:a}}const od=["function claimTokens(address user, address[] tokens) returns (uint256[])","function claimToken(address user, address token) returns (uint256)"],id=new t(["function getTokensDistributedInWeek(address token, uint timestamp) view returns (uint)","function claimTokens(address user, address[] tokens) returns (uint256[])","function claimToken(address user, address token) returns (uint256)"]),sd=new t(["function totalSupply() view returns (uint)"]);class rd{constructor(e,t,a,n,o,i){this.multicall=e,this.feeDistributorAddress=t,this.balAddress=a,this.veBalAddress=n,this.bbAUsdAddress=o,this.feeDistributor=((e,t)=>new Z(e,od,t))(t,i)}async fetch(e){const t=this.getPreviousWeek(e),a=[{target:this.feeDistributorAddress,callData:id.encodeFunctionData("getTokensDistributedInWeek",[u(this.balAddress),t])},{target:this.feeDistributorAddress,callData:id.encodeFunctionData("getTokensDistributedInWeek",[u(this.bbAUsdAddress),t])},{target:this.veBalAddress,callData:sd.encodeFunctionData("totalSupply",[])}],[,n]=await this.multicall.callStatic.aggregate(a);return{balAmount:parseFloat(It(n[0],18)),bbAUsdAmount:parseFloat(It(n[1],18)),veBalSupply:parseFloat(It(n[2],18)),bbAUsdPrice:parseFloat("1.0"),balAddress:this.balAddress}}async multicallData(e){return this.data||(this.data=await this.fetch(e)),this.data}getPreviousWeek(e){const t=new Date(e);t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0);let a=t.getUTCDay()-4;return a<0&&(a+=7),a+=7,Math.floor(t.getTime()/1e3)-86400*a}async getClaimableBalances(e,t){try{const a=await this.feeDistributor.callStatic.claimTokens(e,t);return this.extractTokenBalance(t,a)}catch(e){return{}}}claimBalances(e,t){return id.encodeFunctionData("claimTokens",[e,t])}extractTokenBalance(e,t){return e.reduce(((e,a,n)=>{var o;return e[a]=null!==(o=t[n])&&void 0!==o?o:p.from(0),e}),{})}}const pd=new t(["function getProtocolFeesCollector() view returns (address)"]),dd=new t(["function getSwapFeePercentage() view returns (uint)"]);let ld;class ud{constructor(e,t){this.provider=t,this.vault=new Z(e,pd,this.provider)}async fetch(){const e=await this.vault.getProtocolFeesCollector(),t=new Z(e,dd,this.provider),a=await t.getSwapFeePercentage();return parseFloat(It(a,18))}async find(){return ld||(ld=this.fetch()),this.swapFeePercentage=await ld,this.swapFeePercentage}async findBy(){return this.find()}}const cd=new t(["function getSwapFeePercentage() view returns (uint)"]);let yd;class bd{constructor(e,t){this.multicall=e,this.protocolFeePercentagesProviderAddress=t}async fetch(){const e=[{target:this.protocolFeePercentagesProviderAddress,callData:cd.encodeFunctionData("getFeeTypePercentage",[0])},{target:this.protocolFeePercentagesProviderAddress,callData:cd.encodeFunctionData("getFeeTypePercentage",[2])}],[,t]=await this.multicall.callStatic.aggregate(e);return{swapFee:parseFloat(It(t[0],18)),yieldFee:parseFloat(It(t[2],18))}}async getFees(){return yd||(yd=this.fetch()),this.protocolFees=await yd,this.protocolFees}}class md{constructor(e="https://yield-tokens.balancer.workers.dev/"){this.url=e}async fetch(){let e={};try{e=(await z.get(this.url)).data}catch(e){Re.getInstance().warn(`Failed to fetch yield tokens: ${e}`)}return e}async find(e){const t=e.toLocaleLowerCase();return this.yields||(this.yields=this.fetch()),this.yields.then((e=>e[t]&&e[t]>0?e[t]:0))}async findBy(e,t){return"address"!=e?0:this.find(t)}}const fd=e=>`{\n blocks(first: 1, orderBy: timestamp, orderDirection: asc, where: { timestamp_gt: ${e} }) {\n number\n }\n}`,Td=async(e,t)=>{const a={query:fd(t)},n=await z.post(e,a),{data:{blocks:o}}=n.data;return parseInt(o[0].number)};class hd{constructor(e){this.endpoint=e,this.blocks={}}async find(e){if("dayAgo"==e){const e=""+(Math.floor(Date.now()/1e3)-86400);return this.blocks[e]||(this.blocks={...this.blocks,[e]:Td(this.endpoint,e)}),this.blocks[e]}}async findBy(e="",t=""){}}var Id=[{chainId:1,address:"0x8888801af4d980682e47f1a9036e589479e835c5",symbol:"mph"},{chainId:1,address:"0x27054b13b1b798b345b591a4d22e6562d47ea75a",symbol:"ast"},{chainId:1,address:"0x3301ee63fb29f863f2333bd4466acb46cd8323e6",symbol:"akita"},{chainId:1,address:"0x616e8bfa43f920657b3497dbf40d6b1a02d4608d",symbol:"aurabal"},{chainId:1,address:"0xc0c293ce456ff0ed870add98a0828dd4d2903dbf",symbol:"aura"},{chainId:1,address:"0x3472a5a71965499acd81997a54bba8d852c6e53d",symbol:"badger"},{chainId:1,address:"0xba100000625a3754423978a60c9317c58a424e3d",symbol:"bal"},{chainId:1,address:"0x804cdb9116a10bb78768d3252355a1b18067bf8f",symbol:"bb-a-dai"},{chainId:1,address:"0x9210f1204b5a24742eba12f710636d76240df3d0",symbol:"bb-a-usdc"},{chainId:1,address:"0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c",symbol:"bb-a-usdt"},{chainId:1,address:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2",symbol:"bb-a-usd"},{chainId:1,address:"0x2d94aa3e47d9d5024503ca8491fce9a2fb4da198",symbol:"bank"},{chainId:1,address:"0x0d8775f648430679a709e98d2b0cb6250d2887ef",symbol:"bat"},{chainId:1,address:"0xf17e65822b568b3903685a7c9f496cf7656cc6c2",symbol:"bico"},{chainId:1,address:"0x799ebfabe77a6e34311eeee9825190b9ece32824",symbol:"btrst"},{chainId:1,address:"0x514910771af9ca656af840dff83e8264ecf986ca",symbol:"link"},{chainId:1,address:"0x3506424f91fd33084466f402d5d97f05f8e3b4af",symbol:"chz"},{chainId:1,address:"0x41e5560054824ea6b0732e656e3ad64e20e94e45",symbol:"cvc"},{chainId:1,address:"0xc00e94cb662c3520282e6f5717214004a7f26888",symbol:"comp"},{chainId:1,address:"0xdef1ca1fb7fbcdc777520aa7f396b4e015f497ab",symbol:"cow"},{chainId:1,address:"0xd533a949740bb3306d119cc777fa900ba034cd52",symbol:"crv"},{chainId:1,address:"0x6b175474e89094c44da98b954eedeac495271d0f",symbol:"dai"},{chainId:1,address:"0xf2051511b9b121394fa75b8f7d4e7424337af687",symbol:"haus"},{chainId:1,address:"0x888888435fde8e7d4c54cab67f206e4199454c60",symbol:"dfx"},{chainId:1,address:"0x798d1be841a82a273720ce31c822c61a67a601c3",symbol:"digg"},{chainId:1,address:"0xf629cbd94d3791c9250152bd8dfbdf380e2a3b9c",symbol:"enj"},{chainId:1,address:"0xc18360217d8f7ab5e7c516566761ea12ce7f9d72",symbol:"ens"},{chainId:1,address:"0x4e15361fd6b4bb609fa63c81a2be19d873717870",symbol:"ftm"},{chainId:1,address:"0x956f47f50a910163d8bf957cf5846d573e7f87ca",symbol:"fei"},{chainId:1,address:"0xed1480d12be41d92f36f5f7bdd88212e381a3677",symbol:"fdt"},{chainId:1,address:"0x586aa273f262909eef8fa02d90ab65f5015e0516",symbol:"fiat"},{chainId:1,address:"0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",symbol:"gtc"},{chainId:1,address:"0x900db999074d9277c5da2a43f252d74366230da0",symbol:"giv"},{chainId:1,address:"0x6810e776880c02933d47db1b9fc05908e5386b96",symbol:"gno"},{chainId:1,address:"0xba485b556399123261a5f9c95d413b4f93107407",symbol:"graviaura"},{chainId:1,address:"0x3ec8798b81485a254928b70cda1cf0a2bb0b74d7",symbol:"gro"},{chainId:1,address:"0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",symbol:"snx"},{chainId:1,address:"0x5a98fcbea516cf06857215779fd812ca3bef1b32",symbol:"ldo"},{chainId:1,address:"0x6dea81c8171d0ba574754ef6f8b412f2ed88c54d",symbol:"lqty"},{chainId:1,address:"0x5f98805a4e8be255a32880fdec7f6728c6568ba0",symbol:"lusd"},{chainId:1,address:"0x965d79f1a1016b574a62986e13ca8ab04dfdd15c",symbol:"m2"},{chainId:1,address:"0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",symbol:"mkr"},{chainId:1,address:"0xd084944d3c05cd115c09d072b9f44ba3e0e45921",symbol:"fold"},{chainId:1,address:"0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0",symbol:"matic"},{chainId:1,address:"0xa3bed4e1c75d00fa6f4e5e6922db7261b5e9acd2",symbol:"mta"},{chainId:1,address:"0x4b13006980acb09645131b91d259eaa111eaf5ba",symbol:"myc"},{chainId:1,address:"0x333a4823466879eef910a04d473505da62142069",symbol:"nation"},{chainId:1,address:"0xcfeaead4947f0705a14ec42ac3d44129e1ef3ed5",symbol:"note"},{chainId:1,address:"0x967da4048cd07ab37855c090aaf366e4ce1b9f48",symbol:"ocean"},{chainId:1,address:"0x64aa3364f17a4d01c6f1751fd97c2bd3d7e7f1d5",symbol:"ohm"},{chainId:1,address:"0xab846fb6c81370327e784ae7cbb6d6a6af6ff4bf",symbol:"pal"},{chainId:1,address:"0xcafe001067cdef266afb7eb5a286dcfd277f3de5",symbol:"psp"},{chainId:1,address:"0x68037790a0229e9ce6eaa8a99ea92964106c4703",symbol:"par"},{chainId:1,address:"0x45804880de22913dafe09f4980848ece6ecbaf78",symbol:"paxg"},{chainId:1,address:"0x89ab32156e46f46d02ade3fecbe5fc4243b9aaed",symbol:"pnt"},{chainId:1,address:"0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec",symbol:"poly"},{chainId:1,address:"0x43d4a3cd90ddd2f8f4f693170c9c8098163502ad",symbol:"d2d"},{chainId:1,address:"0xeb4c2781e4eba804ce9a9803c67d0893436bb27d",symbol:"renbtc"},{chainId:1,address:"0x408e41876cccdc0f92210600ef50372656052a38",symbol:"ren"},{chainId:1,address:"0xfb5453340c03db5ade474b27e68b6a9c6b2823eb",symbol:"robot"},{chainId:1,address:"0xd33526068d116ce69f19a9ee46f0bd304f21a51f",symbol:"rpl"},{chainId:1,address:"0xae78736cd615f374d3085123a210448e74fc6393",symbol:"reth"},{chainId:1,address:"0xfe18be6b3bd88a2d2a7f928d00292e7a9963cfc6",symbol:"sbtc"},{chainId:1,address:"0x476c5e26a75bd202a9683ffd34359c0cc15be0ff",symbol:"srm"},{chainId:1,address:"0x35e78b3982e87ecfd5b3f3265b601c046cdbe232",symbol:"xai"},{chainId:1,address:"0x3affcca64c2a6f4e3b6bd9c64cd2c969efd1ecbe",symbol:"dsla"},{chainId:1,address:"0xf24d8651578a55b0c119b9910759a351a3458895",symbol:"sdbal"},{chainId:1,address:"0x11c1a6b3ed6bb362954b29d3183cfa97a0c806aa",symbol:"str"},{chainId:1,address:"0x8f693ca8d21b157107184d29d398a8d082b38b76",symbol:"data"},{chainId:1,address:"0x470ebf5f030ed85fc1ed4c2d36b9dd02e77cf1b7",symbol:"temple"},{chainId:1,address:"0xa36fdbbae3c9d55a1d67ee5821d53b50b63a1ab9",symbol:"temp"},{chainId:1,address:"0xdac17f958d2ee523a2206206994597c13d831ec7",symbol:"usdt"},{chainId:1,address:"0x9c4a4204b79dd291d6b6571c5be8bbcd0622f050",symbol:"tcr"},{chainId:1,address:"0x226f7b842e0f0120b7e194d05432b3fd14773a9d",symbol:"unn"},{chainId:1,address:"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",symbol:"uni"},{chainId:1,address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",symbol:"usdc"},{chainId:1,address:"0x81f8f0bb1cb2a06649e51913a151f0e7ef6fa321",symbol:"vita"},{chainId:1,address:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",symbol:"weth"},{chainId:1,address:"0xedb171c18ce90b633db442f2a6f72874093b49ef",symbol:"wampl"},{chainId:1,address:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",symbol:"wbtc"},{chainId:1,address:"0xf203ca1769ca8e9e8fe1da9d147db68b6c919817",symbol:"wncg"},{chainId:1,address:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",symbol:"wsteth"},{chainId:1,address:"0x79c71d3436f39ce382d0f58f1b011d88100b9d91",symbol:"xns"},{chainId:1,address:"0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e",symbol:"yfi"},{chainId:1,address:"0xbcca60bb61934080951369a648fb03df4f96263c",symbol:"ausdc"},{chainId:1,address:"0x028171bca77440897b824ca71d1c56cac55b68a3",symbol:"adai"},{chainId:1,address:"0x3ed3b47dd13ec9a98b44e6204a523e766b225811",symbol:"ausdt"},{chainId:137,address:"0x9c2c5fd7b07e95ee044ddeba0e97a665f142394f",symbol:"1inch"},{chainId:137,address:"0xd6df932a45c0f255f85145f286ea0b292b21c90b",symbol:"aave"},{chainId:137,address:"0xc3fdbadc7c795ef1d6ba111e06ff8f16a20ea539",symbol:"addy"},{chainId:137,address:"0xf84bd51eab957c2e7b7d646a3427c5a50848281d",symbol:"agar"},{chainId:137,address:"0x033d942a6b495c4071083f4cde1f17e986fe856c",symbol:"aga"},{chainId:137,address:"0x0e9b89007eee9c958c0eda24ef70723c2c93dd58",symbol:"amaticc"},{chainId:137,address:"0x034b2090b579228482520c589dbd397c53fc51cc",symbol:"vision"},{chainId:137,address:"0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b",symbol:"avax"},{chainId:137,address:"0x49690541e3f6e933a9aa3cffee6010a7bb5b72d7",symbol:"axiav3"},{chainId:137,address:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",symbol:"bal"},{chainId:137,address:"0xdb7cb471dd0b49b29cab4a1c14d070f27216a0ab",symbol:"bank"},{chainId:137,address:"0xfbdd194376de19a88118e84e279b977f165d01b8",symbol:"bifi"},{chainId:137,address:"0xd6ca869a4ec9ed2c7e618062cdc45306d8dbbc14",symbol:"btc2x-fli-p"},{chainId:137,address:"0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39",symbol:"link"},{chainId:137,address:"0x172370d5cd63279efa6d502dab29171933a610af",symbol:"crv"},{chainId:137,address:"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",symbol:"dai"},{chainId:137,address:"0x1d607faa0a51518a7728580c238d912747e71f7a",symbol:"data"},{chainId:137,address:"0x85955046df4668e1dd369d2de9f3aeb98dd2a369",symbol:"dpi"},{chainId:137,address:"0xe7804d91dfcde7f776c90043e03eaa6df87e6395",symbol:"dfx"},{chainId:137,address:"0xf28164a485b0b2c90639e47b0f377b4a438a16b1",symbol:"dquick"},{chainId:137,address:"0x45c32fa6df82ead1e2ef74d17b76547eddfaff89",symbol:"frax"},{chainId:137,address:"0x50b728d8d964fd00c2d0aad81718b71311fef68a",symbol:"snx"},{chainId:137,address:"0x72928d5436ff65e57f72d5566dcd3baedc649a88",symbol:"hdao"},{chainId:137,address:"0x3ad707da309f3845cd602059901e39c4dcd66473",symbol:"eth2x-fli-p"},{chainId:137,address:"0x4f025829c4b13df652f38abd2ab901185ff1e609",symbol:"ieth-fli-p"},{chainId:137,address:"0x340f412860da7b7823df372a2b59ff78b7ae6abc",symbol:"imatic-fli-p"},{chainId:137,address:"0xf287d97b6345bad3d88856b26fb7c0ab3f2c7976",symbol:"matic2x-fli-p"},{chainId:137,address:"0x130ce4e4f76c2265f94a961d70618562de0bb8d2",symbol:"ibtc-fli-p"},{chainId:137,address:"0x596ebe76e2db4470966ea395b0d063ac6197a8c5",symbol:"jrt"},{chainId:137,address:"0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4",symbol:"stmatic"},{chainId:137,address:"0xf501dd45a1198c2e1b5aef5314a68b9006d842e0",symbol:"mta"},{chainId:137,address:"0xeaecc18198a475c921b24b8a6c1c1f0f5f3f7ea0",symbol:"seed"},{chainId:137,address:"0xfe712251173a2cd5f5be2b46bb528328ea3565e1",symbol:"mvi"},{chainId:137,address:"0xa3fa99a148fa48d14ed51d610c367c61876997f1",symbol:"mimatic"},{chainId:137,address:"0xa486c6bc102f409180ccb8a94ba045d39f8fc7cb",symbol:"nex"},{chainId:137,address:"0xe2aa7db6da1dae97c5f5c6914d285fbfcc32a128",symbol:"par"},{chainId:137,address:"0x580a84c73811e1839f75d86d75d88cca0c241ff4",symbol:"qi"},{chainId:137,address:"0x831753dd7087cac61ab5644b308642cc1c33dc13",symbol:"quick"},{chainId:137,address:"0xb5c064f955d8e7f38fe0460c556a72987494ee17",symbol:"quick"},{chainId:137,address:"0x00e5646f60ac6fb446f621d146b6e1886f002905",symbol:"rai"},{chainId:137,address:"0x431cd3c9ac9fc73644bf68bf5691f4b83f9e104f",symbol:"rbw"},{chainId:137,address:"0xdbf31df14b66535af65aac99c32e9ea844e14501",symbol:"renbtc"},{chainId:137,address:"0x501ace9c35e60f03a2af4d484f49f9b1efde9f40",symbol:"solace"},{chainId:137,address:"0xfa68fb4628dff1028cfec22b4162fccd0d45efb6",symbol:"maticx"},{chainId:137,address:"0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a",symbol:"sushi"},{chainId:137,address:"0xdf7837de1f2fa4631d716cf2502f8b230f1dcc32",symbol:"tel"},{chainId:137,address:"0xe6469ba6d2fd6130788e0ea9c0a0515900563b59",symbol:"ust"},{chainId:137,address:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",symbol:"usdt"},{chainId:137,address:"0x5fe2b58c013d7601147dcdd68c143a77499f5531",symbol:"grt"},{chainId:137,address:"0xbbba073c31bf03b8acf7c28ef0738decf3695683",symbol:"sand"},{chainId:137,address:"0x2934b36ca9a4b31e633c5be670c8c8b28b6aa015",symbol:"thx"},{chainId:137,address:"0x2f800db0fdb5223b3c3f354886d907a671414a7f",symbol:"bct"},{chainId:137,address:"0x2e1ad108ff1d8c782fcbbb89aad783ac49586756",symbol:"tusd"},{chainId:137,address:"0x3809dcdd5dde24b37abe64a5a339784c3323c44f",symbol:"swap"},{chainId:137,address:"0x7fbc10850cae055b27039af31bd258430e714c62",symbol:"ubt"},{chainId:137,address:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",symbol:"usdc"},{chainId:137,address:"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",symbol:"weth"},{chainId:137,address:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",symbol:"wmatic"},{chainId:137,address:"0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",symbol:"wbtc"},{chainId:137,address:"0x24834bbec7e39ef42f4a75eaf8e5b6486d3f0e57",symbol:"lunc"},{chainId:137,address:"0xf153eff70dc0bf3b085134928daeea248d9b30d0",symbol:"xmark"},{chainId:42161,address:"0x9f20de1fc9b161b34089cbeae888168b44b03461",symbol:"arbis"},{chainId:42161,address:"0x040d1edc9569d4bab2d15287dc5a4f10f56a56b8",symbol:"bal"},{chainId:42161,address:"0x031d35296154279dc1984dcd93e392b1f946737b",symbol:"cap"},{chainId:42161,address:"0xf97f4df75117a78c1a5a0dbb814af92458539fb4",symbol:"link"},{chainId:42161,address:"0x354a6da3fcde098f8389cad84b0182725c6c91de",symbol:"comp"},{chainId:42161,address:"0xf4d48ce3ee1ac3651998971541badbb9a14d7234",symbol:"cream"},{chainId:42161,address:"0x11cdb42b0eb46d95f990bedd4695a6e3fa034978",symbol:"crv"},{chainId:42161,address:"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1",symbol:"dai"},{chainId:42161,address:"0x8038f3c971414fd1fc220ba727f2d4a0fc98cb65",symbol:"dht"},{chainId:42161,address:"0xf0b5ceefc89684889e5f7e0a7775bd100fcd3709",symbol:"dusd"},{chainId:42161,address:"0x6c2c06790b3e3e3c38e12ee22f8183b37a13ee55",symbol:"dpx"},{chainId:42161,address:"0x32eb7902d4134bf98a28b963d26de779af92a212",symbol:"rdpx"},{chainId:42161,address:"0xc3ae0333f0f34aa734d5493276223d95b8f9cb37",symbol:"dxd"},{chainId:42161,address:"0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a",symbol:"gmx"},{chainId:42161,address:"0xa0b862f60edef4452f25b4160f177db44deb6cf1",symbol:"gno"},{chainId:42161,address:"0xb965029343d55189c25a7f3e0c9394dc0f5d41b1",symbol:"ndx"},{chainId:42161,address:"0x539bde0d7dbd336b79148aa742883198bbf60342",symbol:"magic"},{chainId:42161,address:"0x4e352cf164e64adcbad318c3a1e222e9eba4ce42",symbol:"mcb"},{chainId:42161,address:"0x3f56e0c36d275367b8c502090edf38289b3dea0d",symbol:"mimatic"},{chainId:42161,address:"0x965772e0e9c84b6f359c8597c891108dcf1c5b1a",symbol:"pickle"},{chainId:42161,address:"0x6694340fc020c5e6b96567843da2df01b2ce1eb6",symbol:"stg"},{chainId:42161,address:"0xd4d42f0b6def4ce0383636770ef773390d85c61a",symbol:"sushi"},{chainId:42161,address:"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",symbol:"usdt"},{chainId:42161,address:"0x23a941036ae778ac51ab04cea08ed6e2fe103614",symbol:"grt"},{chainId:42161,address:"0xa72159fc390f0e3c6d415e658264c7c4051e9b87",symbol:"tcr"},{chainId:42161,address:"0x4d15a3a2286d883af0aa1b3f21367843fac63e07",symbol:"tusd"},{chainId:42161,address:"0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0",symbol:"uni"},{chainId:42161,address:"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",symbol:"usdc"},{chainId:42161,address:"0xa684cd057951541187f288294a1e1c2646aa2d24",symbol:"vsta"},{chainId:42161,address:"0x64343594ab9b56e99087bfa6f2335db24c2d1f17",symbol:"vst"},{chainId:42161,address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",symbol:"weth"},{chainId:42161,address:"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f",symbol:"wbtc"},{chainId:42161,address:"0x82e3a8f066a6989666b031d916c43672085b1582",symbol:"yfi"}];class _d{constructor(e,t,a,n,o){if(this.pools=new Hp({url:e.urls.subgraph,chainId:e.chainId,query:n}),this.poolsForSimulations=new ks(Is(e.urls.subgraph),t,e,void 0,n),this.poolsOnChain=new Kp(this.pools,{provider:t,multicall:e.addresses.contracts.multicall,vault:e.addresses.contracts.vault},e.poolsToIgnore,e.multicallBatchSize),this.poolShares=new jp(e.urls.subgraph,e.chainId),this.poolJoinExits=new Yp(e.urls.subgraph,e.chainId),e.urls.gaugesSubgraph&&(this.poolGauges=new Jp(e.urls.gaugesSubgraph,e.chainId),this.gaugeShares=new Op(e.urls.gaugesSubgraph,e.chainId)),e.urls.blockNumberSubgraph){this.blockNumbers=new hd(e.urls.blockNumberSubgraph);const t=async()=>{if(this.blockNumbers)return await this.blockNumbers.find("dayAgo")};this.yesterdaysPools=new Hp({url:e.urls.subgraph,chainId:e.chainId,blockHeight:t,query:n})}else if(e.averageBlockTime){const a=async()=>await t.getBlockNumber()-Math.round(86400/(e.averageBlockTime||2));this.yesterdaysPools=new Hp({url:e.urls.subgraph,chainId:e.chainId,blockHeight:a,query:n})}const i=Id.filter((t=>t.chainId==e.chainId)).map((e=>e.address)),s=new Qp(i,e.chainId,o),r=new td(e.urls.subgraph,e.chainId),p=new xt(a.contracts.multicall,e.chainId);this.tokenPrices=new ad(s,r,p);const d=new ed(e.chainId,o);this.tokenHistoricalPrices=new nd(d,p),this.tokenMeta=new zp([]),e.urls.gaugesSubgraph&&(this.liquidityGauges=new Rp(e.urls.gaugesSubgraph,a.contracts.multicall,e.addresses.contracts.gaugeController||"",e.chainId,e.addresses.contracts.gaugeControllerCheckpointer)),e.addresses.contracts.feeDistributor&&e.addresses.tokens.bal&&e.addresses.tokens.veBal&&e.addresses.tokens.bbaUsd&&(this.feeDistributor=new rd(a.contracts.multicall,e.addresses.contracts.feeDistributor,e.addresses.tokens.bal,e.addresses.tokens.veBal,e.addresses.tokens.bbaUsd,t)),this.feeCollector=new ud(e.addresses.contracts.vault,t),e.addresses.contracts.protocolFeePercentagesProvider&&(this.protocolFees=new bd(a.contracts.multicall,e.addresses.contracts.protocolFeePercentagesProvider)),this.tokenYields=new md,e.addresses.contracts.gyroConfigProxy&&(this.gyroConfigRepository=new wp(e.addresses.contracts.gyroConfigProxy,a.contracts.multicall,t))}}const gd=(e,t)=>"Stable"===e?er.LEGACY_STABLE:"ComposableStable"===e&&1===t?er.COMPOSABLE_STABLE:"ComposableStable"===e?er.COMPOSABLE_STABLE_V2:er.WEIGHTED,Pd=ar.encodeSetRelayerApproval,wd=ar.encodeGaugeWithdraw,xd=ar.encodeGaugeDeposit,Ed=ar.encodePeekChainedReferenceValue,Ad=ya.createInterface(),vd=(e,t)=>{var a;return(null===(a=e.poolType)||void 0===a?void 0:a.match(/.*Linear.*/))?Sd(e,t):[]},Sd=(e,t)=>{if(!(e.id&&t.id&&e.tokens&&t.tokens&&e.mainIndex&&t.mainIndex))throw"Missing tokens";const a=e.tokens[e.mainIndex];return[{poolId:e.id,assetIn:e.address,assetOut:a.address},{poolId:t.id,assetIn:a.address,assetOut:t.address}]},kd=async(e,t)=>{const a=await t.find(e);if(!a)throw`Pool ${e} not found`;const n=async(e,a)=>{let o=[{address:e}];const i=await t.findBy("address",e);if(i&&e!=a){const t=i.tokens.sort(Od),a=await Promise.all(t.map((({address:e})=>n(e,i.address))));o=[{address:e,id:i.id,poolType:i.poolType,poolTypeVersion:i.poolTypeVersion,mainIndex:i.mainIndex,tokens:a.flat()}]}return o},o=a.tokens.sort(Od);return{id:e,address:a.address,tokens:(await Promise.all(o.map((({address:e})=>n(e,a.address))))).flat(),poolType:a.poolType,poolTypeVersion:a.poolTypeVersion,mainIndex:a.mainIndex}},Od=(e,t)=>e.address.toLowerCase()>t.address.toLowerCase()?1:-1,Md=(e,t,a,n,o,i,r=!1,d,l,u)=>{if(!(o.id&&i.id&&o.tokens&&i.tokens&&o.poolType&&i.poolType))throw"Pool data is missing";const c=o.tokens.flatMap((({address:e})=>e)),y=i.tokens.flatMap((({address:e})=>e)),b="ComposableStable"==o.poolType&&1==o.poolTypeVersion?0:-1;let m,f=[];b>-1?(m=[{index:b,key:ar.toChainedReference(`10${b}`)}],f=[ar.toChainedReference(`20${b}`)]):(m=c.map(((e,t)=>({index:t,key:ar.toChainedReference(`10${t}`)}))),f=c.map(((e,t)=>ar.toChainedReference(`20${t}`))));const T=ar.toChainedReference("999"),h=[];let I=!1;"ComposableStable"===o.poolType&&(I=!0),u&&h.push(Pd(t,!0,u)),d&&h.push(wd(d,e,t,a)),h.push(((e,t,a,n,o=-1,i,s,r,p,d=!0)=>{let l;const u="ComposableStable"===t&&1===a;l=o>-1?re.exitExactBPTInForOneTokenOut(s,o):(u?be.exitExactBPTInForAllTokensOut:re.exitExactBPTInForTokensOut)(s);const c=gd(t,a);return ar.encodeExitPool({poolId:e,poolKind:c,sender:r,recipient:p,outputReferences:i,exitPoolRequest:{assets:n,minAmountsOut:new Array(n.length).fill("0"),userData:l,toInternalBalance:d}})})(o.id,o.poolType,o.poolTypeVersion||1,c,b,m,a,d?t:e,t));const _=((e,t,a)=>{const n=({tokens:e,mainIndex:t})=>e&&t&&e[t].address||"",o=e.flatMap(n),i=t.flatMap(n),s=o.map(((e,t)=>e&&[t,i.indexOf(e)]||[-1,-1])).map((([a,n])=>{if(-1===a||-1===n)return[];const o=e[a],i=t[n];return vd(o,i)}));return a>-1?[s[a]]:s})(o.tokens,i.tokens,b);if(_.flat().length>0){const e=_.map(((e,t)=>({path:e,inputAmount:String(m[t].key),outputReference:f[t]}))).filter((({path:e})=>e.length>0));h.push(((e,t,a,n,o=!0)=>{const i=[],r=[],d=[],l=[];a.forEach((e=>{const{path:t,inputAmount:a,outputReference:n}=e;for(let e=0;ei.address!=e)).map((e=>{var t;const a=c.indexOf(e);return String(I&&f[a]||(null===(t=m[a])||void 0===t?void 0:t.key)||0)}));h.push(((e,t,a,n,o,i,r,p,d,l=!0)=>{const u=n.map((()=>s)),c=re.joinExactTokensInForBPTOut(o,i),y=gd(t,a);return ar.encodeJoinPool({poolId:e,kind:y,sender:p,recipient:d,joinPoolRequest:{assets:n,maxAmountsIn:u,userData:c,fromInternalBalance:l},value:"0",outputReference:r})})(i.id,i.poolType,i.poolTypeVersion||1,y,g,n,String(T),t,l?t:e,!0)),!0===r&&h.push(Ed(String(T))),l&&h.push(xd(l,t,e,String(T)));return Ad.encodeFunctionData("multicall",[h])};class Cd{constructor({relayerAddress:e,poolsRepository:t,gaugesRepository:a,provider:n}){this.getExpectedBptOut=Cd.getExpectedBptOut,this.relayerAddress=e,this.poolsRepository=t,this.gaugesRepository=a,this.provider=n}async pool2pool({user:e,from:t,to:a,balance:n,minBptOut:o="0",authorisation:i}){const s=await kd(t,this.poolsRepository),r=await kd(a,this.poolsRepository),p=Md(e,this.relayerAddress,String(n),o,s,r,"0"==o,void 0,void 0,i);return{to:this.relayerAddress,data:p}}async pool2poolWithGauges({user:e,from:t,to:a,balance:n,minBptOut:o="0",authorisation:i}){const s=await this.gaugesRepository.findBy("poolId",t),r=await this.gaugesRepository.findBy("poolId",a);if(!(s&&s.poolId&&r&&r.poolId))throw new Error("Gauge not found");const p=await kd(s.poolId,this.poolsRepository),d=await kd(r.poolId,this.poolsRepository),l=Md(e,this.relayerAddress,String(n),o,p,d,"0"==o,s.id,r.id,i);return{to:this.relayerAddress,data:l}}async gauge2gauge({user:e,from:t,to:a,balance:n,authorisation:o}){const i=[wd(t,e,this.relayerAddress,n),xd(a,this.relayerAddress,e,n)];o&&i.unshift(Pd(this.relayerAddress,!0,o));const s=Ad.encodeFunctionData("multicall",[i]);return{to:this.relayerAddress,data:s}}}Cd.getExpectedBptOut=e=>{const t=Ad.decodeFunctionResult("multicall",e)[0].slice(-2).filter((e=>"0x"!==e));return String(BigInt(t))};class Fd{constructor(e,t=new Ds(e),a=new nr(e)){this.config=e,this.sor=t,this.subgraph=a;Re.getInstance().setLoggingEnabled(!!e.enableLogging),this.networkConfig=Ms(e),this.provider=t.provider,this.balancerContracts=new lr(this.networkConfig.addresses.contracts,t.provider),this.data=new _d(this.networkConfig,t.provider,this.balancerContracts,e.subgraphQuery,e.coingecko),this.swaps=new Qs(this.config),this.relayer=new ar,this.pricing=new or(e,this.swaps),this.pools=new ap(this.networkConfig,this.data,this.balancerContracts),this.data.liquidityGauges&&(this.claimService=new ko(this.data.liquidityGauges,this.data.feeDistributor,this.networkConfig.chainId,this.contracts.multicall,this.networkConfig.addresses.contracts.gaugeClaimHelper,this.networkConfig.addresses.contracts.balancerMinter),this.migrationService=new Cd({relayerAddress:this.networkConfig.addresses.contracts.balancerRelayer,poolsRepository:this.data.pools,gaugesRepository:this.data.liquidityGauges.subgraph,provider:this.provider})),this.vaultModel=new Nr(this.data.poolsForSimulations,this.networkConfig.addresses.tokens.wrappedNativeAsset)}get contracts(){return this.balancerContracts.contracts}}var Bd,Rd;!function(e){e[e.Direct=0]="Direct",e[e.TokenIn=1]="TokenIn",e[e.TokenOut=2]="TokenOut",e[e.Middle=3]="Middle"}(Bd||(Bd={})),function(e){e[e.BatchSwap=0]="BatchSwap",e[e.Join=1]="Join",e[e.Exit=2]="Exit"}(Rd||(Rd={}));class Nd{constructor(e,t,a,n,o,i,s,r,p,d){const l=this.getActionStep(e,t,a,n);this.amountIn=this.getActionAmount(o,Rd.BatchSwap,l,s),this.hasTokenIn=this.actionHasTokenIn(l),this.hasTokenOut=this.actionHasTokenOut(l);const u=this.hasTokenOut?i:"0";this.minOut=this.getActionMinOut(u,r);const[c,y]=this.getActionOutputRef(l,n,s);this.nextOpRefKey=y,this.opRefStart=c,this.sender=this.getSender(this.hasTokenIn,p,d),this.receiver=this.getReceiver(this.hasTokenOut,p,d)}getActionAmount(e,t,a,n){let o=e;return(a===Bd.TokenOut||a===Bd.Middle&&t===Rd.Join||a===Bd.Middle&&t===Rd.Exit)&&(o=ar.toChainedReference(n-1).toString()),o}getActionOutputRef(e,t,a){let n={};return e!==Bd.TokenIn&&e!==Bd.Middle||(n=this.getOutputRef(a,t),a++),[n,a]}getActionMinOut(e,t){return Dt(p.from(e),p.from(t)).toString()}getActionStep(e,t,a,n){let o;return o=a===e&&n===t?Bd.Direct:a===e?Bd.TokenIn:n===t?Bd.TokenOut:Bd.Middle,o}getOutputRef(e,t){return{index:t,key:ar.toChainedReference(e)}}getFromInternal(e,t){return!e&&!t}getToInternal(e,t){return!e&&!t}actionHasTokenIn(e){return e===Bd.Direct||e===Bd.TokenIn}actionHasTokenOut(e){return e===Bd.Direct||e===Bd.TokenOut}getSender(e,t,a){return e?t:a}getReceiver(e,t,a){return e?t:a}getPoolKind(e){let t=0;return["MetaStable","Stable","StablePhantom"].includes(e)?t=1:"ComposableStable"===e&&(t=3),t}}class Ld extends Nd{constructor(e,t,a,n,o,i,s,r){var p;super(t,a,e.assetInIndex,e.assetOutIndex,e.amount,null!==(p=e.returnAmount)&&void 0!==p?p:"0",n,i,s,r),this.opRefKey=n,this.type=Rd.Exit,this.poolId=e.poolId,this.tokenOut=o[e.assetOutIndex],this.toInternalBalance=this.getToInternal(this.hasTokenOut),this.opRef=this.opRefStart}callData(e,t){const a=e.tokensList,n=new Le(t),[o]=n.sortTokens(a),i=this.tokenOut,s=o.findIndex((e=>e.toLowerCase()===i.toLowerCase())),r=Array(a.length).fill("0");r[s]=this.minOut;const p=this.amountIn,d={assets:o,minAmountsOut:r,userData:pe.exitExactBPTInForOneTokenOut(p,s),toInternalBalance:this.toInternalBalance,poolId:this.poolId,poolKind:this.getPoolKind(e.poolType),sender:this.sender,recipient:this.receiver,outputReferences:this.opRef.key?[this.opRef]:[],exitPoolRequest:{}},l=ar.formatExitPoolInput(d);return{params:d,encoded:ar.encodeExitPool(l)}}getAmountIn(){return this.hasTokenIn?this.amountIn:"0"}getAmountOut(){return this.hasTokenOut?this.minOut:"0"}}class Dd extends Nd{constructor(e,t,a,n,o,i,s,r){var p;super(t,a,e.assetInIndex,e.assetOutIndex,e.amount,null!==(p=e.returnAmount)&&void 0!==p?p:"0",n,i,s,r),this.opRefKey=n,this.type=Rd.Join,this.poolId=e.poolId,this.tokenIn=o[e.assetInIndex],this.fromInternal=this.getFromInternal(this.hasTokenIn),this.opRef=this.opRefStart}callData(e,t){const a=e.tokensList,n=new Le(t),[o]=n.sortTokens(a),i=this.tokenIn,s=o.findIndex((e=>e.toLowerCase()===i.toLowerCase())),r=Array(a.length).fill("0");r[s]=this.amountIn;const p=this.minOut,d=pe.joinExactTokensInForBPTOut(r,p),l={poolId:this.poolId,sender:this.sender,recipient:this.receiver,kind:this.getPoolKind(e.poolType),joinPoolRequest:{assets:o,maxAmountsIn:r,userData:d,fromInternalBalance:this.fromInternal},value:"0",outputReference:this.opRef.key?this.opRef.key.toString():"0"};return{params:l,encoded:ar.encodeJoinPool(l)}}getAmountIn(){return this.hasTokenIn?this.amountIn:"0"}getAmountOut(){return this.hasTokenOut?this.minOut:"0"}}class Ud extends Nd{constructor(e,t,a,n,o,i,s,r,p){var d;super(t,a,e.assetInIndex,e.assetOutIndex,e.amount,null!==(d=e.returnAmount)&&void 0!==d?d:"0",n,i,r,p),this.mainTokenInIndex=t,this.mainTokenOutIndex=a,this.opRefKey=n,this.assets=o,this.slippage=i,this.pools=s,this.user=r,this.relayer=p,this.approveTokens=[],this.opRef=[],this.type=Rd.BatchSwap,this.swaps=[{...e,amount:this.amountIn}];const l=this.isBpt(s,o[e.assetInIndex]);l&&this.approveTokens.push(o[e.assetInIndex]),this.fromInternal=this.getFromInternal(this.hasTokenIn,l);const u=this.isBpt(s,o[e.assetOutIndex]);this.toInternal=this.getToInternal(this.hasTokenOut,u),this.limits=this.getLimits(o,e.assetInIndex,e.assetOutIndex,e.amount,this.hasTokenIn,this.hasTokenOut,this.minOut),this.opRefStart.index&&this.opRef.push(this.opRefStart)}getLimits(e,t,a,n,o,i,r){const d=e.map((()=>p.from(0)));return d[t]=o?p.from(n):s,i&&(d[a]=p.from(r).mul(-1)),d}updateLimits(e,t){t.hasTokenIn&&(e[t.swaps[0].assetInIndex]=e[t.swaps[0].assetInIndex].add(t.amountIn)),t.hasTokenOut&&(e[t.swaps[0].assetOutIndex]=e[t.swaps[0].assetOutIndex].sub(t.minOut))}isChainedSwap(e){return this.opRef[this.swaps.length-1]&&this.toInternal===e.fromInternal&&this.receiver===e.sender&&this.opRef[this.swaps.length-1].key.toString()===e.amountIn}canAddSwap(e){return!!this.isChainedSwap(e)||e.fromInternal===this.fromInternal&&e.toInternal===this.toInternal&&e.receiver===this.receiver&&e.sender===this.sender}callData(){const e=[];for(const t of this.approveTokens){const a=ar.encodeApproveVault(t,i.toString());e.push(a)}const t={sender:this.sender,recipient:this.receiver,fromInternalBalance:this.fromInternal,toInternalBalance:this.toInternal},a={swapType:In.SwapExactIn,swaps:this.swaps,assets:this.assets,funds:t,limits:this.limits.map((e=>e.toString())),deadline:p.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:this.opRef},n=ar.encodeBatchSwap(a);return e.push(n),{params:a,encoded:e}}getAmountIn(){return this.limits[this.mainTokenInIndex].toString()}getAmountOut(){return this.limits[this.mainTokenOutIndex].abs().toString()}copy(){return new Ud(this.swaps[0],this.mainTokenInIndex,this.mainTokenOutIndex,this.opRefKey,this.assets,this.slippage,this.pools,this.user,this.relayer)}addSwap(e){const t=this.isChainedSwap(e);this.swaps.push(e.swaps[0]),this.approveTokens=[...new Set([...this.approveTokens,...e.approveTokens])],this.toInternal=e.toInternal,this.receiver=e.receiver,this.hasTokenOut=e.hasTokenOut,this.minOut=e.minOut,this.opRef=[...this.opRef,...e.opRef],t||(this.amountIn=p.from(this.amountIn).add(e.amountIn).toString()),this.updateLimits(this.limits,e)}isBpt(e,t){return e.some((e=>e.address.toLowerCase()===t.toLowerCase()))}}function Vd(e){const t=function(e){const t=[],a=[],n=[];for(const o of e)o.type===Rd.Exit||o.type===Rd.Join?o.hasTokenIn?t.push(o):o.hasTokenOut?a.push(o):n.push(o):n.push(o);return[...t,...n,...a]}(e);return function(e){const t=[];let a;for(const n of e)n.type===Rd.BatchSwap?a?a.canAddSwap(n)?a.addSwap(n):(t.push(a),a=n.copy()):a=n.copy():(a&&(t.push(a),a=void 0),t.push(n));return a&&t.push(a),t}(t)}const qd=new t([{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"address",name:"libraryAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getLibrary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}]);function Gd(e){Re.getInstance()}function Wd(e,t,a){return e!==V.SwapExactOut&&t.toLowerCase()!==o.toLowerCase()&&a.toLowerCase()!==o.toLowerCase()}function $d(e,t,a){if("Weighted"!==a)return!1;const n=t[e.assetOutIndex],o=Ie(e.poolId);return n.toLowerCase()===o.toLowerCase()}function Hd(e,t,a){if("Weighted"!==a)return!1;const n=t[e.assetInIndex],o=Ie(e.poolId);return n.toLowerCase()===o.toLowerCase()}function Kd(e,t,a){return t.some((t=>function(e,t,a){const n=e.find((e=>e.id===t.poolId));return"Weighted"===(null==n?void 0:n.poolType)&&[a[t.assetInIndex],a[t.assetOutIndex]].includes(n.address)}(e,t,a)))}function Jd(e,t,a,n,o,i,s){const r=function(e,t,a,n,o,i,s,r){var p;const d=n.findIndex((t=>t.toLowerCase()===e.toLowerCase())),l=n.findIndex((e=>e.toLowerCase()===t.toLowerCase())),u=[];let c=0;for(const e of a){const t=null===(p=i.find((t=>t.id===e.poolId)))||void 0===p?void 0:p.poolType;if($d(e,n,t)){const t=new Dd(e,d,l,c,n,o,s,r);c=t.nextOpRefKey,u.push(t)}else{if(!Hd(e,n,t)){const t=new Ud(e,d,l,c,n,o,i,s,r);c=t.nextOpRefKey,u.push(t);continue}{const t=new Ld(e,d,l,c,n,o,s,r);c=t.nextOpRefKey,u.push(t)}}}return u}(e.tokenIn,e.tokenOut,e.swaps,e.tokenAddresses,i,t,a,n),d=Vd(r),l=[],u=[];s&&l.push(ar.encodeSetRelayerApproval(n,!0,s));for(const e of d){if(e.type===Rd.Exit||e.type===Rd.Join){const a=t.find((t=>t.id===e.poolId));if(void 0===a)throw new vn(An.NO_POOL_DATA);const{params:n,encoded:i}=e.callData(a,o);l.push(i),u.push(n)}if(e.type===Rd.BatchSwap){const{params:t,encoded:a}=e.callData();l.push(...a),u.push(t)}}!function(e,t,a,n){const o=e.reduce(((e=p.from(0),t)=>e.add(t))),i=t.reduce(((e=p.from(0),t)=>e.add(t)));Gd(o.toString()),Gd(a.swapAmount.toString()),Gd(i.toString()),Gd(Dt(a.returnAmount,p.from(n)).toString()),Gd(a.returnAmount.toString());const s=i.sub(Dt(a.returnAmount,p.from(n)));if(!o.eq(a.swapAmount)||!s.lt("3"))throw new vn(An.RELAY_SWAP_AMOUNTS)}(d.map((e=>p.from(e.getAmountIn()))),d.map((e=>p.from(e.getAmountOut()))),e,i);return{to:n,data:qd.encodeFunctionData("multicall",[l]),rawCalls:l,inputs:u}}export{at as AMP_PRECISION,we as APR_THRESHOLD,ta as AaveLinearPoolFactory__factory,Qt as AaveLinearPool__factory,xt as AaveRates,na as AaveWrapping__factory,Le as AssetHelpers,ia as Authoriser__factory,xn as BALANCER_NETWORK_CONFIG,Yt as BalancerAPIArgsFormatter,vn as BalancerError,An as BalancerErrorCode,Ue as BalancerErrors,ra as BalancerHelpers__factory,We as BalancerMinterAuthorization,da as BalancerMinter__factory,ua as BalancerPoolDataQueries__factory,ya as BalancerRelayer__factory,Fd as BalancerSDK,se as BasePoolEncoder,ma as BatchRelayerLibrary__factory,hd as BlockNumberRepository,ed as CoingeckoHistoricalPriceRepository,Qp as CoingeckoPriceRepository,be as ComposableStablePoolEncoder,ye as ComposableStablePoolExitKind,Ia as ComposableStablePoolFactory__factory,ce as ComposableStablePoolJoinKind,Ta as ComposableStablePool__factory,ga as ConvergentCurvePool__factory,_d as Data,Ot as Debouncer,wa as ERC20__factory,va as ERC4626LinearPoolFactory__factory,Ea as ERC4626LinearPool__factory,Ma as EulerLinearPoolFactory__factory,ka as EulerLinearPool__factory,Fa as FXPool__factory,ud as FeeCollectorRepository,rd as FeeDistributorRepository,Ra as GaugeClaimHelper__factory,Ap as GaugeControllerMulticallRepository,Oe as GaugeShareAttributes,Op as GaugeSharesRepository,Ua as GearboxLinearPoolFactory__factory,La as GearboxLinearPool__factory,zt as GraphQLArgsBuilder,qa as GyroConfig__factory,bn as GyroEV2__factory,nd as HistoricalPriceProvider,Wa as LidoRelayer__factory,Ha as LinearPool__factory,go as Liquidity,Rp as LiquidityGaugeSubgraphRPCProvider,Ja as LiquidityGaugeV5__factory,Fp as LiquidityGaugesMulticallRepository,Bp as LiquidityGaugesSubgraphRepository,de as ManagedPoolEncoder,Cd as Migrations,za as Multicall3__factory,Ya as Multicall__factory,Pe as Network,ve as POOLS,Fe as PoolBalanceOpKind,Se as PoolGaugesAttributes,Jp as PoolGaugesRepository,Xp as PoolJoinExitAttributes,Yp as PoolJoinExitRepository,er as PoolKind,ke as PoolShareAttributes,jp as PoolSharesRepository,Me as PoolSpecialization,Be as PoolType,ap as Pools,Dp as PoolsBalancerAPIRepository,Up as PoolsFallbackRepository,Vp as PoolsStaticRepository,Kp as PoolsSubgraphOnChainRepository,Hp as PoolsSubgraphRepository,bd as ProtocolFeesProvider,Yr as ProtocolId,ar as Relayer,qe as RelayerAction,Ge as RelayerAuthorization,xe as SHALLOW_COMPOSABLE_STABLE_BUFFER,qr as SimulationType,Ds as Sor,ae as StablePhantomPoolJoinKind,re as StablePoolEncoder,ne as StablePoolExitKind,te as StablePoolJoinKind,Qa as StablePool__factory,tn as StaticATokenRateProvider__factory,Zp as StaticTokenPriceProvider,zp as StaticTokenProvider,nr as Subgraph,jt as SubgraphArgsFormatter,td as SubgraphPriceRepository,In as SwapType,Qs as Swaps,ad as TokenPriceProvider,md as TokenYieldsRepository,Ce as UserBalanceOpKind,nn as Vault__factory,fn as VeBal__factory,hn as VeDelegationProxy__factory,pe as WeightedPoolEncoder,ie as WeightedPoolExitKind,pn as WeightedPoolFactory__factory,oe as WeightedPoolJoinKind,sn as WeightedPool__factory,cn as YearnLinearPoolFactory__factory,ln as YearnLinearPool__factory,Ve as accountToAddress,Ut as addSlippage,vt as addressMapIn,hr as balEmissions,Rt as bn,Jd as buildRelayerCalls,Wd as canUseJoinExit,_n as factories,vs as fetchOnChainPoolData,Jt as findEventInReceiptLogs,Ct as formatFixed,Bt as formatFromBigInt18,kt as getEthValue,gn as getLimitsForSlippage,Ss as getOnChainBalances,Ie as getPoolAddress,ge as getPoolNonce,_e as getPoolSpecialization,Xt as getRandomBytes32,qt as insert,Ht as isLinearish,ue as isNormalizedWeights,Vt as isSameAddress,Lt as mulSlippage,Mt as parseFixed,nt as parsePoolInfo,Ft as parseToBigInt18,Wt as removeItem,$t as reorderArrays,Gt as replace,$e as signPermit,Kd as someJoinExit,he as splitPoolId,Dt as subSlippage,le as toNormalizedWeights,At as tokenAddressForPricing,Et as tokensToTokenPrices,Kt as truncateAddresses,St as unwrapToken,Pt as wrappedTokensMap,gt as yieldTokens}; +//# sourceMappingURL=index.esm.js.map diff --git a/package/dist/index.esm.js.map b/package/dist/index.esm.js.map new file mode 100644 index 000000000..92187ace6 --- /dev/null +++ b/package/dist/index.esm.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.esm.js","sources":["../../src/pool-base/encoder.ts","../../src/pool-stable/encoder.ts","../../src/pool-weighted/encoder.ts","../../src/pool-weighted/normalizedWeights.ts","../../src/pool-composable-stable/encoder.ts","../node_modules/tiny-invariant/dist/esm/tiny-invariant.js","../../src/pool-utils/poolId.ts","../../src/lib/constants/network.ts","../../src/lib/constants/pools.ts","../../src/modules/data/pool-gauges/types.ts","../../src/modules/data/pool-shares/types.ts","../../src/modules/data/gauge-shares/types.ts","../../src/types.ts","../../src/lib/utils/logger.ts","../../src/lib/utils/assetHelpers.ts","../../src/lib/utils/errors.ts","../../src/lib/utils/signatures.ts","../../src/lib/utils/permit.ts","../../src/lib/utils/solidityMaths.ts","../../src/lib/utils/poolHelper.ts","../../src/lib/constants/tokens.ts","../node_modules/@ethersproject/logger/lib.esm/index.js","../node_modules/@ethersproject/logger/lib.esm/_version.js","../node_modules/@ethersproject/units/lib.esm/_version.js","../node_modules/@ethersproject/units/lib.esm/index.js","../../src/modules/data/token-prices/aave-rates.ts","../../src/lib/utils/tokens.ts","../../src/lib/utils/debouncer.ts","../../src/lib/utils/math.ts","../../src/lib/utils/slippageHelper.ts","../../src/lib/utils/index.ts","../../src/lib/graphql/formatters/balancer-api.ts","../../src/lib/graphql/formatters/subgraph.ts","../../src/lib/graphql/args-builder.ts","../../src/contracts/factories/AaveLinearPool__factory.ts","../../src/contracts/factories/AaveLinearPoolFactory__factory.ts","../../src/contracts/factories/AaveWrapping__factory.ts","../../src/contracts/factories/Authoriser__factory.ts","../../src/contracts/factories/BalancerHelpers__factory.ts","../../src/contracts/factories/BalancerMinter__factory.ts","../../src/contracts/factories/BalancerPoolDataQueries__factory.ts","../../src/contracts/factories/BalancerRelayer__factory.ts","../../src/contracts/factories/BatchRelayerLibrary__factory.ts","../../src/contracts/factories/ComposableStablePool__factory.ts","../../src/contracts/factories/ComposableStablePoolFactory__factory.ts","../../src/contracts/factories/ConvergentCurvePool__factory.ts","../../src/contracts/factories/ERC20__factory.ts","../../src/contracts/factories/ERC4626LinearPool__factory.ts","../../src/contracts/factories/ERC4626LinearPoolFactory__factory.ts","../../src/contracts/factories/EulerLinearPool__factory.ts","../../src/contracts/factories/EulerLinearPoolFactory__factory.ts","../../src/contracts/factories/FXPool__factory.ts","../../src/contracts/factories/GaugeClaimHelper__factory.ts","../../src/contracts/factories/GearboxLinearPool__factory.ts","../../src/contracts/factories/GearboxLinearPoolFactory__factory.ts","../../src/contracts/factories/GyroConfig__factory.ts","../../src/contracts/factories/LidoRelayer__factory.ts","../../src/contracts/factories/LinearPool__factory.ts","../../src/contracts/factories/LiquidityGaugeV5__factory.ts","../../src/contracts/factories/Multicall__factory.ts","../../src/contracts/factories/Multicall3__factory.ts","../../src/contracts/factories/StablePool__factory.ts","../../src/contracts/factories/StaticATokenRateProvider__factory.ts","../../src/contracts/factories/Vault__factory.ts","../../src/contracts/factories/WeightedPool__factory.ts","../../src/contracts/factories/WeightedPoolFactory__factory.ts","../../src/contracts/factories/YearnLinearPool__factory.ts","../../src/contracts/factories/YearnLinearPoolFactory__factory.ts","../../src/contracts/factories/GyroEV2__factory.ts","../../src/contracts/factories/VeBal__factory.ts","../../src/contracts/factories/VeDelegationProxy__factory.ts","../../src/modules/swaps/types.ts","../../src/modules/swaps/helpers.ts","../../src/lib/constants/config.ts","../../src/balancerErrors.ts","../../src/modules/pricing/priceImpact.ts","../../src/lib/utils/stableMathHelpers.ts","../../src/modules/pools/pool-types/concerns/stable/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/stable/exit.concern.ts","../../src/modules/pools/pool-types/concerns/stable/join.concern.ts","../../src/modules/pools/pool-types/concerns/stable/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/stable/spotPrice.concern.ts","../../src/modules/pools/pool-types/stable.module.ts","../../src/modules/pools/pool-types/concerns/stablePhantom/spotPrice.concern.ts","../../src/modules/pools/pool-types/concerns/composableStable/join.concern.ts","../../src/modules/pools/pool-types/concerns/composableStable/exit.concern.ts","../../src/modules/pools/pool-types/composableStable.module.ts","../../src/modules/pools/pool-types/concerns/weighted/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/weighted/exit.concern.ts","../../src/modules/pools/pool-types/concerns/weighted/join.concern.ts","../../src/modules/pools/pool-types/concerns/weighted/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/weighted/spotPrice.concern.ts","../../src/modules/pools/pool-types/weighted.module.ts","../../src/modules/pools/pool-types/concerns/metaStable/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/metaStable/spotPrice.concern.ts","../../src/modules/pools/pool-types/metaStable.module.ts","../../src/modules/pools/pool-types/concerns/stablePhantom/exit.concern.ts","../../src/modules/pools/pool-types/concerns/stablePhantom/join.concern.ts","../../src/modules/pools/pool-types/stablePhantom.module.ts","../../src/modules/pools/pool-types/concerns/linear/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/linear/exit.concern.ts","../../src/modules/pools/pool-types/concerns/linear/join.concern.ts","../../src/modules/pools/pool-types/concerns/linear/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/linear/spotPrice.concern.ts","../../src/modules/pools/pool-types/linear.module.ts","../../src/modules/pools/pool-types/concerns/fx/exit.concern.ts","../../src/modules/pools/pool-types/concerns/fx/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/fx/spotPrice.concern.ts","../../src/modules/pools/pool-types/concerns/fx/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/fx/join.concern.ts","../../src/modules/pools/pool-types/fx.module.ts","../../src/modules/pools/pool-types/concerns/gyro/exit.concern.ts","../../src/modules/pools/pool-types/concerns/gyro/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/gyro/spotPrice.concern.ts","../../src/modules/pools/pool-types/concerns/gyro/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/gyro/join.concern.ts","../../src/modules/pools/pool-types/gyro.module.ts","../../src/modules/pools/pool-type-concerns.ts","../../src/modules/liquidity/liquidity.module.ts","../../src/modules/claims/helper.ts","../../src/modules/claims/ClaimService.ts","../../src/modules/swaps/queryBatchSwap.ts","../node_modules/tslib/tslib.es6.js","../node_modules/graphql-tag/lib/index.js","../../src/modules/subgraph/generated/balancer-subgraph-types.ts","../../src/modules/subgraph/generated/balancer-gauges.ts","../../src/modules/subgraph/subgraph.ts","../../src/lib/utils/multiCaller3.ts","../../src/modules/data/pool/onchain-data.ts","../../src/modules/sor/pool-data/subgraphPoolDataService.ts","../../src/modules/sor/token-price/subgraphTokenPriceService.ts","../../src/modules/sdk.helpers.ts","../../src/lib/constants/poolsToIgnore.ts","../../src/modules/sor/token-price/apiTokenPriceService.ts","../../src/lib/utils/coingecko-api.ts","../../src/modules/sor/token-price/coingeckoTokenPriceService.ts","../../src/modules/sor/sor.module.ts","../../src/modules/swaps/flashSwap/index.ts","../../src/modules/swaps/swap_builder/swap_utils.ts","../../src/modules/swaps/swap_builder/swap_info_decorator.ts","../../src/modules/swaps/swap_builder/single_swap_builder.ts","../../src/modules/swaps/swap_builder/batch_swap_builder.ts","../../src/modules/swaps/swaps.module.ts","../../src/modules/relayer/types.ts","../../src/modules/relayer/relayer.module.ts","../../src/modules/subgraph/subgraph.module.ts","../../src/modules/pricing/pricing.module.ts","../../src/modules/contracts/implementations/base-pool.ts","../../src/lib/utils/multiCaller.ts","../../src/lib/utils/time.ts","../../src/modules/contracts/implementations/veBAL.ts","../../src/modules/contracts/implementations/veBAL-proxy.ts","../../src/modules/contracts/contracts.module.ts","../../src/modules/pools/impermanentLoss/impermanentLossService.ts","../../src/modules/data/bal/emissions.ts","../../src/modules/pools/apr/protocol-revenue.ts","../../src/modules/pools/fees/fees.ts","../../src/modules/pools/apr/apr.ts","../../src/modules/graph/graph.ts","../../src/pool-weighted/decoder.ts","../../src/modules/vaultModel/poolModel/join.ts","../../src/modules/vaultModel/poolModel/exit.ts","../../src/modules/vaultModel/poolModel/swap.ts","../../src/modules/vaultModel/poolModel/unwrap.ts","../../src/modules/vaultModel/poolModel/poolModel.ts","../../src/modules/vaultModel/relayer.ts","../../src/modules/vaultModel/poolSource.ts","../../src/modules/vaultModel/vaultModel.module.ts","../../src/modules/joins/joins.module.ts","../../src/lib/utils/tenderlyHelper.ts","../../src/modules/simulation/simulation.module.ts","../../src/modules/exits/exits.module.ts","../../src/modules/pools/volume/volume.ts","../../src/modules/pools/factory/composable-stable/composable-stable.factory.ts","../../src/modules/pools/factory/weighted/weighted.factory.ts","../../src/modules/pools/factory/types.ts","../../src/modules/pools/factory/linear/linear.factory.ts","../../src/modules/pools/pool-factory__factory.ts","../../src/modules/pools/queries/params_builder.ts","../../src/modules/pools/queries/get_encoder.ts","../../src/modules/pools/emissions/index.ts","../../src/modules/pools/proportional-amounts/index.ts","../../src/modules/pools/index.ts","../node_modules/@ethersproject/strings/lib.esm/_version.js","../node_modules/@ethersproject/strings/lib.esm/utf8.js","../node_modules/@ethersproject/strings/lib.esm/bytes32.js","../node_modules/js-sha3/src/sha3.js","../node_modules/@ethersproject/solidity/lib.esm/_version.js","../node_modules/@ethersproject/solidity/lib.esm/index.js","../node_modules/@ethersproject/keccak256/lib.esm/index.js","../../src/modules/data/gyro-config/repository.ts","../../src/modules/data/gauge-controller/multicall.ts","../../src/modules/subgraph/repository/abstract-subgraph-repository.ts","../../src/modules/subgraph/repository/balancer-subgraph-repository.ts","../../src/modules/subgraph/repository/gauges-subgraph-repository.ts","../../src/modules/data/gauge-shares/repository.ts","../../src/modules/data/liquidity-gauges/multicall.ts","../../src/modules/data/liquidity-gauges/subgraph.ts","../../src/modules/data/liquidity-gauges/provider.ts","../../src/modules/api/balancer-api.client.ts","../../src/modules/data/pool/balancer-api.ts","../../src/modules/data/pool/fallback.ts","../../src/modules/data/pool/static.ts","../../src/modules/data/pool/subgraph-helpers.ts","../../src/modules/data/pool/subgraph.ts","../../src/modules/data/pool/subgraphOnChain.ts","../../src/modules/data/pool-gauges/repository.ts","../../src/modules/data/pool-joinExit/types.ts","../../src/modules/data/pool-joinExit/repository.ts","../../src/modules/data/pool-shares/repository.ts","../../src/modules/data/token/static.ts","../../src/modules/data/token-prices/static.ts","../../src/modules/data/token-prices/coingecko.ts","../../src/modules/data/token-prices/coingecko-historical.ts","../../src/modules/data/token-prices/subgraph.ts","../../src/modules/data/token-prices/provider.ts","../../src/modules/data/token-prices/historical-price-provider.ts","../../src/modules/contracts/implementations/feeDistributor.ts","../../src/modules/data/fee-distributor/repository.ts","../../src/modules/data/fee-collector/repository.ts","../../src/modules/data/protocol-fees/provider.ts","../../src/modules/data/token-yields/repository.ts","../../src/modules/data/block-number/index.ts","../../src/modules/data/index.ts","../../src/modules/relayer/actions.ts","../../src/modules/liquidity-managment/migrations/helpers.ts","../../src/modules/liquidity-managment/migrations/builder.ts","../../src/modules/liquidity-managment/migrations.ts","../../src/modules/sdk.module.ts","../../src/modules/swaps/joinExit/actions/types.ts","../../src/modules/swaps/joinExit/actions/baseAction.ts","../../src/modules/swaps/joinExit/actions/exit.ts","../../src/modules/swaps/joinExit/actions/join.ts","../../src/modules/swaps/joinExit/actions/swap.ts","../../src/modules/swaps/joinExit/actions/helpers.ts","../../src/modules/swaps/joinExit/joinAndExit.ts"],"sourcesContent":["import { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\n\n// RECOVERY_MODE must match BasePoolUserData.RECOVERY_MODE_EXIT_KIND, the value that (Legacy)BasePool uses to detect the special exit enabled in recovery mode.\nenum BasePoolExitKind {\n RECOVERY_MODE = 255,\n}\n\nexport class BasePoolEncoder {\n /**\n * Encodes the userData parameter for exiting any Pool in recovery mode, by removing tokens in return for\n * an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n */\n static recoveryModeExit = (bptAmountIn: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [BasePoolExitKind.RECOVERY_MODE, bptAmountIn]\n );\n}\n","import { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\n\nexport enum StablePoolJoinKind {\n INIT = 0,\n EXACT_TOKENS_IN_FOR_BPT_OUT,\n TOKEN_IN_FOR_EXACT_BPT_OUT,\n}\n\nexport enum StablePhantomPoolJoinKind {\n INIT = 0,\n COLLECT_PROTOCOL_FEES,\n}\n\nexport enum StablePoolExitKind {\n EXACT_BPT_IN_FOR_ONE_TOKEN_OUT = 0,\n EXACT_BPT_IN_FOR_TOKENS_OUT,\n BPT_IN_FOR_EXACT_TOKENS_OUT,\n}\n\nexport class StablePoolEncoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Encodes the userData parameter for providing the initial liquidity to a StablePool\n * @param initialBalances - the amounts of tokens to send to the pool to form the initial balances\n */\n static joinInit = (amountsIn: BigNumberish[]): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]'],\n [StablePoolJoinKind.INIT, amountsIn]\n );\n\n /**\n * Encodes the userData parameter for collecting protocol fees for StablePhantomPool\n */\n static joinCollectProtocolFees = (): string =>\n defaultAbiCoder.encode(\n ['uint256'],\n [StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]\n );\n\n /**\n * Encodes the userData parameter for joining a StablePool with exact token inputs\n * @param amountsIn - the amounts each of token to deposit in the pool as liquidity\n * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens\n */\n static joinExactTokensInForBPTOut = (\n amountsIn: BigNumberish[],\n minimumBPT: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [StablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT, amountsIn, minimumBPT]\n );\n\n /**\n * Encodes the userData parameter for joining a StablePool with to receive an exact amount of BPT\n * @param bptAmountOut - the amount of BPT to be minted\n * @param enterTokenIndex - the index of the token to be provided as liquidity\n */\n static joinTokenInForExactBPTOut = (\n bptAmountOut: BigNumberish,\n enterTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n StablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,\n bptAmountOut,\n enterTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a StablePool by removing a single token in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n * @param enterTokenIndex - the index of the token to removed from the pool\n */\n static exitExactBPTInForOneTokenOut = (\n bptAmountIn: BigNumberish,\n exitTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n StablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,\n bptAmountIn,\n exitTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a StablePool by removing tokens in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n */\n static exitExactBPTInForTokensOut = (bptAmountIn: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [StablePoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT, bptAmountIn]\n );\n\n /**\n * Encodes the userData parameter for exiting a StablePool by removing exact amounts of tokens\n * @param amountsOut - the amounts of each token to be withdrawn from the pool\n * @param maxBPTAmountIn - the minimum acceptable BPT to burn in return for withdrawn tokens\n */\n static exitBPTInForExactTokensOut = (\n amountsOut: BigNumberish[],\n maxBPTAmountIn: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [\n StablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,\n amountsOut,\n maxBPTAmountIn,\n ]\n );\n}\n","import { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\n\nexport enum WeightedPoolJoinKind {\n INIT = 0,\n EXACT_TOKENS_IN_FOR_BPT_OUT,\n TOKEN_IN_FOR_EXACT_BPT_OUT,\n ALL_TOKENS_IN_FOR_EXACT_BPT_OUT,\n}\n\nexport enum WeightedPoolExitKind {\n EXACT_BPT_IN_FOR_ONE_TOKEN_OUT = 0,\n EXACT_BPT_IN_FOR_TOKENS_OUT,\n BPT_IN_FOR_EXACT_TOKENS_OUT,\n MANAGEMENT_FEE_TOKENS_OUT,\n}\n\nexport class WeightedPoolEncoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Encodes the userData parameter for providing the initial liquidity to a WeightedPool\n * @param initialBalances - the amounts of tokens to send to the pool to form the initial balances\n */\n static joinInit = (amountsIn: BigNumberish[]): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]'],\n [WeightedPoolJoinKind.INIT, amountsIn]\n );\n\n /**\n * Encodes the userData parameter for joining a WeightedPool with exact token inputs\n * @param amountsIn - the amounts each of token to deposit in the pool as liquidity\n * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens\n */\n static joinExactTokensInForBPTOut = (\n amountsIn: BigNumberish[],\n minimumBPT: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT, amountsIn, minimumBPT]\n );\n\n /**\n * Encodes the userData parameter for joining a WeightedPool with a single token to receive an exact amount of BPT\n * @param bptAmountOut - the amount of BPT to be minted\n * @param enterTokenIndex - the index of the token to be provided as liquidity\n */\n static joinTokenInForExactBPTOut = (\n bptAmountOut: BigNumberish,\n enterTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,\n bptAmountOut,\n enterTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for joining a WeightedPool proportionally to receive an exact amount of BPT\n * @param bptAmountOut - the amount of BPT to be minted\n */\n static joinAllTokensInForExactBPTOut = (bptAmountOut: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT, bptAmountOut]\n );\n\n /**\n * Encodes the userData parameter for exiting a WeightedPool by removing a single token in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n * @param enterTokenIndex - the index of the token to removed from the pool\n */\n static exitExactBPTInForOneTokenOut = (\n bptAmountIn: BigNumberish,\n exitTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,\n bptAmountIn,\n exitTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a WeightedPool by removing tokens in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n */\n static exitExactBPTInForTokensOut = (bptAmountIn: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT, bptAmountIn]\n );\n\n /**\n * Encodes the userData parameter for exiting a WeightedPool by removing exact amounts of tokens\n * @param amountsOut - the amounts of each token to be withdrawn from the pool\n * @param maxBPTAmountIn - the minimum acceptable BPT to burn in return for withdrawn tokens\n */\n static exitBPTInForExactTokensOut = (\n amountsOut: BigNumberish[],\n maxBPTAmountIn: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [\n WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,\n amountsOut,\n maxBPTAmountIn,\n ]\n );\n}\n\nexport class ManagedPoolEncoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Encodes the userData parameter for exiting a ManagedPool for withdrawing management fees.\n * This can only be done by the pool owner.\n */\n static exitForManagementFees = (): string =>\n defaultAbiCoder.encode(\n ['uint256'],\n [WeightedPoolExitKind.MANAGEMENT_FEE_TOKENS_OUT]\n );\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { Zero, WeiPerEther as ONE } from '@ethersproject/constants';\n\n// Should match MAX_WEIGHTED_TOKENS from v2-helpers/constants\n// Including would introduce a dependency\nconst MaxWeightedTokens = 100;\n\n/**\n * Normalize an array of token weights to ensure they sum to `1e18`\n * @param weights - an array of token weights to be normalized\n * @returns an equivalent set of normalized weights\n */\nexport function toNormalizedWeights(weights: BigNumber[]): BigNumber[] {\n // When the number is exactly equal to the max, normalizing with common inputs\n // leads to a value < 0.01, which reverts. In this case fill in the weights exactly.\n if (weights.length == MaxWeightedTokens) {\n return Array(MaxWeightedTokens).fill(ONE.div(MaxWeightedTokens));\n }\n\n const sum = weights.reduce((total, weight) => total.add(weight), Zero);\n if (sum.eq(ONE)) return weights;\n\n const normalizedWeights = [];\n let normalizedSum = Zero;\n for (let index = 0; index < weights.length; index++) {\n if (index < weights.length - 1) {\n normalizedWeights[index] = weights[index].mul(ONE).div(sum);\n normalizedSum = normalizedSum.add(normalizedWeights[index]);\n } else {\n normalizedWeights[index] = ONE.sub(normalizedSum);\n }\n }\n\n return normalizedWeights;\n}\n\n/**\n * Check whether a set of weights are normalized\n * @param weights - an array of potentially unnormalized weights\n * @returns a boolean of whether the weights are normalized\n */\nexport const isNormalizedWeights = (weights: BigNumberish[]): boolean => {\n const totalWeight = weights.reduce(\n (total: BigNumber, weight) => total.add(weight),\n Zero\n );\n return totalWeight.eq(ONE);\n};\n","import { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\nimport { StablePhantomPoolJoinKind } from '../pool-stable/index';\n\nexport enum ComposableStablePoolJoinKind {\n INIT = 0,\n EXACT_TOKENS_IN_FOR_BPT_OUT,\n TOKEN_IN_FOR_EXACT_BPT_OUT,\n}\n\nexport enum ComposableStablePoolExitKind {\n EXACT_BPT_IN_FOR_ONE_TOKEN_OUT = 0,\n BPT_IN_FOR_EXACT_TOKENS_OUT,\n EXACT_BPT_IN_FOR_ALL_TOKENS_OUT,\n}\n\nexport class ComposableStablePoolEncoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Encodes the userData parameter for providing the initial liquidity to a ComposableStablePool\n * @param initialBalances - the amounts of tokens to send to the pool to form the initial balances\n */\n static joinInit = (amountsIn: BigNumberish[]): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]'],\n [ComposableStablePoolJoinKind.INIT, amountsIn]\n );\n\n /**\n * Encodes the userData parameter for collecting protocol fees for StablePhantomPool\n */\n static joinCollectProtocolFees = (): string =>\n defaultAbiCoder.encode(\n ['uint256'],\n [StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]\n );\n\n /**\n * Encodes the userData parameter for joining a ComposableStablePool with exact token inputs\n * @param amountsIn - the amounts each of token to deposit in the pool as liquidity\n * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens\n */\n static joinExactTokensInForBPTOut = (\n amountsIn: BigNumberish[],\n minimumBPT: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [\n ComposableStablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,\n amountsIn,\n minimumBPT,\n ]\n );\n\n /**\n * Encodes the userData parameter for joining a ComposableStablePool with to receive an exact amount of BPT\n * @param bptAmountOut - the amount of BPT to be minted\n * @param enterTokenIndex - the index of the token to be provided as liquidity\n */\n static joinTokenInForExactBPTOut = (\n bptAmountOut: BigNumberish,\n enterTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n ComposableStablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,\n bptAmountOut,\n enterTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a ComposableStablePool by removing a single token in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n * @param enterTokenIndex - the index of the token to removed from the pool\n */\n static exitExactBPTInForOneTokenOut = (\n bptAmountIn: BigNumberish,\n exitTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,\n bptAmountIn,\n exitTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a StablePool by removing tokens in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n */\n static exitExactBPTInForAllTokensOut = (bptAmountIn: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [\n ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT,\n bptAmountIn,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a ComposableStablePool by removing exact amounts of tokens\n * @param amountsOut - the amounts of each token to be withdrawn from the pool\n * @param maxBPTAmountIn - the max acceptable BPT to burn in return for withdrawn tokens\n */\n static exitBPTInForExactTokensOut = (\n amountsOut: BigNumberish[],\n maxBPTAmountIn: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [\n ComposableStablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,\n amountsOut,\n maxBPTAmountIn,\n ]\n );\n}\n","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\n\nexport { invariant as default };\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { PoolSpecialization } from '../types';\nimport invariant from 'tiny-invariant';\n\n/**\n * Splits a poolId into its components, i.e. pool address, pool specialization and its nonce\n * @param poolId - a bytes32 string of the pool's ID\n * @returns an object with the decomposed poolId\n */\nexport const splitPoolId = (\n poolId: string\n): {\n address: string;\n specialization: PoolSpecialization;\n nonce: BigNumber;\n} => {\n return {\n address: getPoolAddress(poolId),\n specialization: getPoolSpecialization(poolId),\n nonce: getPoolNonce(poolId),\n };\n};\n\n/**\n * Extracts a pool's address from its poolId\n * @param poolId - a bytes32 string of the pool's ID\n * @returns the pool's address\n */\nexport const getPoolAddress = (poolId: string): string => {\n invariant(poolId.length === 66, 'Invalid poolId length');\n return poolId.slice(0, 42);\n};\n\n/**\n * Extracts a pool's specialization from its poolId\n * @param poolId - a bytes32 string of the pool's ID\n * @returns the pool's specialization\n */\nexport const getPoolSpecialization = (poolId: string): PoolSpecialization => {\n invariant(poolId.length === 66, 'Invalid poolId length');\n\n // Only have 3 pool specializations so we can just pull the relevant character\n const specializationCode = parseInt(poolId[45]);\n invariant(specializationCode < 3, 'Invalid pool specialization');\n\n return specializationCode;\n};\n\n/**\n * Extracts a pool's nonce from its poolId\n * @param poolId - a bytes32 string of the pool's ID\n * @returns the pool's nonce\n */\nexport const getPoolNonce = (poolId: string): BigNumber => {\n invariant(poolId.length === 66, 'Invalid poolId length');\n return BigNumber.from(`0x${poolId.slice(46)}`);\n};\n","export enum Network {\n MAINNET = 1,\n GOERLI = 5,\n GÖRLI = 5,\n OPTIMISM = 10,\n GNOSIS = 100,\n POLYGON = 137,\n FANTOM = 250,\n BASE = 8453,\n ZKEVM = 1101,\n ARBITRUM = 42161,\n AVALANCHE = 43114,\n SEPOLIA = 11155111,\n}\n","import { Network } from '@/lib/constants/network';\n\n// Do not display APR values greater than this amount; they are likely to be nonsensical\n// These can arise from pools with extremely low balances (e.g., completed LBPs)\nexport const APR_THRESHOLD = 10_000;\n\n/**\n * For proportional exits from ComposableStable pools the ExactBPTInForTokensOut\n * exit type was removed. Therefore we have to use BPTInForExactTokensOut which\n * makes proportional exits using a user's total BPT balance impossible. In\n * order to 'fix' this we need to subtract a little bit from the bptIn value\n * when calculating the ExactTokensOut. The variable below is that \"little bit\".\n */\nexport const SHALLOW_COMPOSABLE_STABLE_BUFFER = 1e6; // EVM scale, so this is 1 Mwei\n\ntype FactoryType =\n | 'oracleWeightedPool'\n | 'weightedPool'\n | 'stablePool'\n | 'managedPool'\n | 'liquidityBootstrappingPool'\n | 'boostedPool'\n | 'composableStablePool';\n\ntype PoolMetadata = {\n name: string;\n hasIcon: boolean;\n};\n\nexport type NamedPools = {\n staBAL: string;\n bbAaveUSD: {\n v1: string;\n v2: string;\n };\n xMatic: {\n v1: string;\n v2: string;\n };\n stMatic: {\n v1: string;\n v2: string;\n };\n mai4: {\n mai4: string;\n maiBbaUsd: string;\n };\n veBAL: string;\n};\n\ntype Pools = {\n IdsMap: Partial;\n Pagination: {\n PerPage: number;\n PerPool: number;\n PerPoolInitial: number;\n };\n DelegateOwner: string;\n ZeroAddress: string;\n DynamicFees: {\n Gauntlet: string[];\n };\n BlockList: string[];\n ExcludedPoolTypes: string[];\n Stable: {\n AllowList: string[];\n };\n Investment: {\n AllowList: string[];\n };\n Factories: Record;\n Stakable: {\n AllowList: string[];\n };\n Metadata: Record;\n};\n\nconst POOLS_GOERLI: Pools = {\n IdsMap: {\n staBAL:\n '0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062',\n bbAaveUSD: {\n v1: '0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f',\n v2: '0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7',\n },\n veBAL: '0xf8a0623ab66f985effc1c69d05f1af4badb01b00000200000000000000000060',\n },\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [\n '0x22d398c68030ef6b1c55321cca6e0cecc5c93b2f000200000000000000000678',\n ],\n ExcludedPoolTypes: ['Element', 'AaveLinear', 'Linear', 'ERC4626Linear', 'FX'],\n Stable: {\n AllowList: [\n '0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f',\n '0xb60e46d90f2de35f7062a27d3a98749414036d5d000200000000000000000061',\n '0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062',\n '0xc957b1acceb21707b782eb8eee2ed8e20088463d000200000000000000000076',\n '0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7',\n '0x14f93df8a4e37bfdb49d2cec4789df7a010603d700000000000000000000011d',\n '0x00a62d31b6c776b6813543bc99ff265f7222dbe100000000000000000000011e',\n '0x0c925fce89a22e36ebd9b3c6e0262234e853d2f600000000000000000000019c',\n ],\n },\n Investment: {\n AllowList: [],\n },\n Factories: {\n '0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0': 'oracleWeightedPool',\n '0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9': 'weightedPool',\n '0x44afeb87c871d8fea9398a026dea2bd3a13f5769': 'stablePool',\n '0xa55f73e2281c60206ba43a3590db07b8955832be': 'stablePool', // Metastable\n '0xb48cc42c45d262534e46d5965a9ac496f1b7a830': 'liquidityBootstrappingPool',\n '0xb0c726778c3ae4b3454d85557a48e8fa502bdd6a': 'liquidityBootstrappingPool', // LBP (zero protocol fee)\n '0x41e9036ae350baedcc7107760a020dca3c0731ec': 'boostedPool',\n '0xb848f50141f3d4255b37ac288c25c109104f2158': 'composableStablePool',\n '0x94f68b54191f62f781fe8298a8a5fa3ed772d227': 'weightedPool', // weighted pool v2\n },\n Stakable: {\n AllowList: [\n '0x16faf9f73748013155b7bc116a3008b57332d1e600020000000000000000005b',\n '0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f',\n '0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062',\n '0x67f8fcb9d3c463da05de1392efdbb2a87f8599ea000200000000000000000059',\n ],\n },\n Metadata: {\n '0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: false,\n },\n },\n};\n\nconst POOLS_MAINNET: Pools = {\n IdsMap: {\n staBAL:\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063',\n bbAaveUSD: {\n v1: '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe',\n v2: '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d',\n },\n veBAL: '0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014',\n },\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: [\n 'Element',\n 'AaveLinear',\n 'Linear',\n 'ERC4626Linear',\n 'Gyro2',\n 'Gyro3',\n 'GyroE',\n 'FX',\n ],\n Stable: {\n AllowList: [\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063', // staBAL3 (DAI-USD-USDC)\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066', // WBTC-renBTC-sBTC\n '0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e', // PAR-sEUR-EURS\n '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080', // Lido Metastable\n '0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112', // Rocket Pool Metastable\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe', // Mainnet bb-a-USD\n '0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed', // wstETH/WETH #2\n '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249', // b-auraBAL-Stable (auraBal / 8020 BALETH)\n '0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d', // sdBAL Stable Pool (sdBAL / 8020 BALETH)\n '0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d', // Fiat DAO Stable Pool\n '0xf93579002dbe8046c43fefe86ec78b1112247bb80000000000000000000002bc', // USDD 3 pool\n '0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351', // MAI stable pool\n '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d', // bb-a-USD V2\n '0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b', // DOLA/INV stable pool\n ],\n },\n Investment: {\n AllowList: [\n '0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af', // iROBOT mainnet\n '0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a', // Techemy mainnet\n '0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2', // WSB-DEFI mainnet\n ],\n },\n Factories: {\n '0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0': 'oracleWeightedPool',\n '0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9': 'weightedPool',\n '0xc66ba2b6595d3613ccab350c886ace23866ede24': 'stablePool',\n '0x67d27634e44793fe63c467035e31ea8635117cd4': 'stablePool', // Metastable\n '0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de': 'liquidityBootstrappingPool', // Mainnet LBP\n '0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e': 'liquidityBootstrappingPool', // Mainnet LBP (zero protocol fee)\n '0x48767f9f868a4a7b86a90736632f6e44c2df7fa9': 'managedPool', // Mainnet Managed\n '0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2': 'boostedPool', // mainnet stablephantom\n '0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c': 'stablePool', // stable pool v2\n '0xf9ac7b9df2b3454e841110cce5550bd5ac6f875f': 'composableStablePool', // ComposableStable\n '0xcc508a455f5b0073973107db6a878ddbdab957bc': 'weightedPool', // weighted pool v2\n },\n Stakable: {\n AllowList: [\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063',\n '0x072f14b85add63488ddad88f855fda4a99d6ac9b000200000000000000000027',\n '0x0b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a',\n '0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000013',\n '0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112',\n '0x27c9f71cc31464b906e0006d4fcbc8900f48f15f00020000000000000000010f',\n '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080',\n '0x350196326aeaa9b98f1903fb5e8fc2686f85318c000200000000000000000084',\n '0x3e5fa9518ea95c3e533eb377c001702a9aacaa32000200000000000000000052',\n '0x51735bdfbfe3fc13dea8dc6502e2e958989429610002000000000000000000a0',\n '0x5d66fff62c17d841935b60df5f07f6cf79bd0f4700020000000000000000014c',\n '0x5f7fa48d765053f8dd85e052843e12d23e3d7bc50002000000000000000000c0',\n '0x702605f43471183158938c1a3e5f5a359d7b31ba00020000000000000000009f',\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe',\n '0x7edde0cb05ed19e03a9a47cd5e53fc57fde1c80c0002000000000000000000c8',\n '0x8f4205e1604133d1875a3e771ae7e4f2b086563900020000000000000000010e',\n '0x90291319f1d4ea3ad4db0dd8fe9e12baf749e84500020000000000000000013c',\n '0x96646936b91d6b9d7d0c47c496afbf3d6ec7b6f8000200000000000000000019',\n '0x96ba9025311e2f47b840a1f68ed57a3df1ea8747000200000000000000000160',\n '0xa02e4b3d18d4e6b8d18ac421fbc3dfff8933c40a00020000000000000000004b',\n '0xa6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e',\n '0xbaeec99c90e3420ec6c1e7a769d2a856d2898e4d00020000000000000000008a',\n '0xbf96189eee9357a95c7719f4f5047f76bde804e5000200000000000000000087',\n '0xe2469f47ab58cf9cf59f9822e3c5de4950a41c49000200000000000000000089',\n '0xe99481dc77691d8e2456e5f3f61c1810adfc1503000200000000000000000018',\n '0xec60a5fef79a92c741cb74fdd6bfc340c0279b01000200000000000000000015',\n '0xedf085f65b4f6c155e13155502ef925c9a756003000200000000000000000123',\n '0xefaa1604e82e1b3af8430b90192c1b9e8197e377000200000000000000000021',\n '0xf4c0dd9b82da36c07605df83c8a416f11724d88b000200000000000000000026',\n '0xf5aaf7ee8c39b651cebf5f1f50c10631e78e0ef9000200000000000000000069',\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066',\n '0x92762b42a06dcdddc5b7362cfb01e631c4d44b40000200000000000000000182',\n '0xde8c195aa41c11a0c4787372defbbddaa31306d2000200000000000000000181',\n '0x17ddd9646a69c9445cd8a9f921d4cd93bf50d108000200000000000000000159',\n '0xc45d42f801105e861e86658648e3678ad7aa70f900010000000000000000011e',\n '0x2d344a84bac123660b021eebe4eb6f12ba25fe8600020000000000000000018a',\n '0xb460daa847c45f1c4a41cb05bfb3b51c92e41b36000200000000000000000194',\n '0x5122e01d819e58bb2e22528c0d68d310f0aa6fd7000200000000000000000163',\n '0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed',\n '0xe8cc7e765647625b95f59c15848379d10b9ab4af0002000000000000000001de',\n '0x85370d9e3bb111391cc89f6de344e801760461830002000000000000000001ef',\n '0xa7ff759dbef9f3efdd1d59beee44b966acafe214000200000000000000000180',\n '0x3f7c10701b14197e2695dec6428a2ca4cf7fc3b800020000000000000000023c',\n '0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d',\n '0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d',\n '0xcfca23ca9ca720b6e98e3eb9b6aa0ffc4a5c08b9000200000000000000000274',\n '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249',\n '0x0578292cb20a443ba1cde459c985ce14ca2bdee5000100000000000000000269',\n '0x8eb6c82c3081bbbd45dcac5afa631aac53478b7c000100000000000000000270',\n '0x1b65fe4881800b91d4277ba738b567cbb200a60d0002000000000000000002cc',\n '0x99a14324cfd525a34bbc93ac7e348929909d57fd00020000000000000000030e',\n '0x9b532ab955417afd0d012eb9f7389457cd0ea712000000000000000000000338',\n '0x48607651416a943bf5ac71c41be1420538e78f87000200000000000000000327',\n '0x6a5ead5433a50472642cd268e584dafa5a394490000200000000000000000366',\n '0x0fd5663d4893ae0d579d580584806aadd2dd0b8b000200000000000000000367',\n '0x441b8a1980f2f2e43a9397099d15cc2fe6d3625000020000000000000000035f',\n '0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351',\n '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d',\n ],\n },\n Metadata: {\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: true,\n },\n '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: true,\n },\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063': {\n name: 'Balancer Stable USD',\n hasIcon: true,\n },\n '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249': {\n name: 'AuraBAL Stable Pool',\n hasIcon: false,\n },\n },\n};\n\nconst POOLS_POLYGON: Pools = {\n IdsMap: {\n xMatic: {\n v1: '0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4',\n v2: '0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c',\n },\n stMatic: {\n v1: '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366',\n v2: '0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d',\n },\n mai4: {\n mai4: '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012',\n maiBbaUsd:\n '0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e',\n },\n },\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: [\n 'Element',\n 'AaveLinear',\n 'Linear',\n 'ERC4626Linear',\n 'Gyro2',\n 'Gyro3',\n 'GyroE',\n 'FX',\n ],\n Stable: {\n AllowList: [\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012', // polygon MAI/DAI/USDC/USDT\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e', // polygon WBTC/renBTC\n '0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b', // polygon,\n '0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068', // tusd polygon\n '0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b', // dusd polygon\n '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366', // polygon staked matic\n '0xb4670d1389c758e4380c4211bcbc85342688b9c50002000000000000000003d8', // vQi,\n '0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455', // 4pool\n '0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4', // maticx metastable\n '0xb4b22bd6cdad0ab828be6f8a4086dfa54e9b373600020000000000000000058f', // Polygon tetuBAL-80BAL-20WETH\n '0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba', // tetuBAL-80BAL-20WETH V2 (with short name)\n '0x0b8319061732b34cab22445fa83b81f950e4b7ed000000000000000000000709',\n '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366',\n '0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d',\n '0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c',\n '0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e', // mai / bb-am-USD\n '0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b', // bb-am-USD\n '0xa48d164f6eb0edc68bd03b56fa59e12f24499ad10000000000000000000007c4', // ageur stable\n ],\n },\n Investment: {\n AllowList: [''],\n },\n Factories: {\n '0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0': 'oracleWeightedPool',\n '0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9': 'weightedPool',\n '0xc66ba2b6595d3613ccab350c886ace23866ede24': 'stablePool',\n '0xdae7e32adc5d490a43ccba1f0c736033f2b4efca': 'stablePool', // Metastable\n '0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de': 'liquidityBootstrappingPool', // LBP\n '0x41b953164995c11c81da73d212ed8af25741b7ac': 'liquidityBootstrappingPool', // LBP (zero protocol fee)\n '0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193': 'managedPool', // Polygon Managed\n '0xc128a9954e6c874ea3d62ce62b468ba073093f25': 'boostedPool', // polygon stablephantom\n '0xca96c4f198d343e251b1a01f3eba061ef3da73c1': 'stablePool', // stable pool v2,\n '0x136fd06fa01ecf624c7f2b3cb15742c1339dc2c4': 'composableStablePool', // ComposableStable\n '0x0e39c3d9b2ec765efd9c5c70bb290b1fcd8536e3': 'weightedPool', // weighted pool v2\n },\n Stakable: {\n AllowList: [\n '0x0297e37f1873d2dab4487aa67cd56b58e2f27875000100000000000000000002',\n '0x03cd191f589d12b0582a99808cf19851e468e6b500010000000000000000000a',\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012',\n '0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068',\n '0x10f21c9bd8128a29aa785ab2de0d044dcdd79436000200000000000000000059',\n '0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000032',\n '0x36128d5436d2d70cab39c9af9cce146c38554ff0000100000000000000000008',\n '0x5a6ae1fd70d04ba4a279fc219dfabc53825cb01d00020000000000000000020e',\n '0x614b5038611729ed49e0ded154d8a5d3af9d1d9e00010000000000000000001d',\n '0x7c9cf12d783821d5c63d8e9427af5c44bad92445000100000000000000000051',\n '0x805ca3ccc61cc231851dee2da6aabff0a7714aa7000200000000000000000361',\n '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366',\n '0xb204bf10bc3a5435017d3db247f56da601dfe08a0002000000000000000000fe',\n '0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455',\n '0xce66904b68f1f070332cbc631de7ee98b650b499000100000000000000000009',\n '0xcf354603a9aebd2ff9f33e1b04246d8ea204ae9500020000000000000000005a',\n '0xdb1db6e248d7bb4175f6e5a382d0a03fe3dcc813000100000000000000000035',\n '0xea4e073c8ac859f2994c07e627178719c8002dc00002000000000000000003dc',\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e',\n '0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4',\n '0x2dbc9ab0160087ae59474fb7bed95b9e808fa6bc0001000000000000000003db',\n '0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba',\n '0x8f9dd2064eb38e8e40f2ab67bde27c0e16ea9b080002000000000000000004ca',\n '0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b',\n '0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e',\n '0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d',\n '0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c',\n ],\n },\n Metadata: {},\n};\n\nconst POOLS_ARBITRUM: Pools = {\n IdsMap: {},\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: ['Element', 'AaveLinear', 'Linear', 'ERC4626Linear', 'FX'],\n Stable: {\n AllowList: [\n '0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012', // arbitrum\n '0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016', // arbitrum\n '0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020', // tusd arbitrum\n '0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d', // mai\n '0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f', // VST\n '0xd89746affa5483627a87e55713ec1905114394950002000000000000000000bf', // fluid stable\n '0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102', // vesta new stable\n '0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159', // stETH\n ],\n },\n Investment: {\n AllowList: [''],\n },\n Factories: {\n '0x7dfdef5f355096603419239ce743bfaf1120312b': 'weightedPool', // Arbitrum Weighted\n '0xcf0a32bbef8f064969f21f7e02328fb577382018': 'weightedPool', // Arbitrum WeightedOracle\n '0x2433477a10fc5d31b9513c638f19ee85caed53fd': 'stablePool', // Arbitrum Stable\n '0xebfd5681977e38af65a7487dc70b8221d089ccad': 'stablePool', // Arbitrum MetaStable\n '0x142b9666a0a3a30477b052962dda81547e7029ab': 'liquidityBootstrappingPool', // Arbitrum LBP (old)\n '0x1802953277fd955f9a254b80aa0582f193cf1d77': 'liquidityBootstrappingPool', // Arbitrum LBP (new)\n '0xacd615b3705b9c880e4e7293f1030b34e57b4c1c': 'managedPool', // arbitrum managed\n '0xdae7e32adc5d490a43ccba1f0c736033f2b4efca': 'boostedPool', // arbitrum stablephantom\n '0xef44d6786b2b4d544b7850fe67ce6381626bf2d6': 'stablePool', // stable pool v2\n '0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33': 'composableStablePool', // ComposableStable\n '0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c': 'weightedPool', // weighted pool v2\n },\n Stakable: {\n AllowList: [\n '0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d',\n '0x0adeb25cb5920d4f7447af4a0428072edc2cee2200020000000000000000004a',\n '0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016',\n '0x1779900c7707885720d39aa741f4086886307e9e00020000000000000000004b',\n '0x4a3a22a3e7fee0ffbb66f1c28bfac50f75546fc7000200000000000000000008',\n '0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f',\n '0x64541216bafffeec8ea535bb71fbc927831d0595000100000000000000000002',\n '0x651e00ffd5ecfa7f3d4f33d62ede0a97cf62ede2000200000000000000000006',\n '0xb28670b3e7ad27bd41fb5938136bf9e9cba90d6500020000000000000000001e',\n '0xb340b6b1a34019853cb05b2de6ee8ffd0b89a008000100000000000000000036',\n '0xb5b77f1ad2b520df01612399258e7787af63025d000200000000000000000010',\n '0xc2f082d33b5b8ef3a7e3de30da54efd3114512ac000200000000000000000017',\n '0xc61ff48f94d801c1ceface0289085197b5ec44f000020000000000000000004d',\n '0xcc65a812ce382ab909a11e434dbf75b34f1cc59d000200000000000000000001',\n '0xe1b40094f1446722c424c598ac412d590e0b3ffb000200000000000000000076',\n '0xb3028ca124b80cfe6e9ca57b70ef2f0ccc41ebd40002000000000000000000ba',\n '0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102',\n '0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159',\n '0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158',\n ],\n },\n Metadata: {},\n};\n\nconst POOLS_GNOSIS: Pools = {\n IdsMap: {},\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: [\n 'Element',\n 'AaveLinear',\n 'Linear',\n 'ERC4626Linear',\n 'FX',\n 'Gyro2',\n 'Gyro3',\n 'GyroE',\n 'HighAmpComposableStable',\n 'FX',\n ],\n Stable: {\n AllowList: [\n '0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000004',\n '0x707b7d4a1bae449d546dcab869256591bbb3d70b000000000000000000000000',\n ],\n },\n Investment: {\n AllowList: [],\n },\n Factories: {},\n Stakable: {\n AllowList: [],\n },\n Metadata: {},\n};\n\nconst POOLS_GENERIC: Pools = {\n IdsMap: {},\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: ['Element', 'AaveLinear', 'Linear', 'ERC4626Linear', 'FX'],\n Stable: {\n AllowList: [\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063',\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066',\n '0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e',\n '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080', // Lido Metastable\n '0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112', // Rocket Pool Metastable\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012', // polygon\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e', // polygon\n '0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012', // arbitrum\n '0x9f19a375709baf0e8e35c2c5c65aca676c4c7191000200000000000000000022', // polygon PAR/PAR,\n '0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016', // arbitrum\n '0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b', // polygon,\n '0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068', // tusd polygon\n '0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020', // tusd arbitrum\n '0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b', // dusd polygon\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe', // Mainnet bb-a-USD\n '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366', // staked matic\n ],\n },\n Investment: {\n AllowList: [\n '0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af', // iROBOT mainnet\n '0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a', // Techemy mainnet\n '0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2', // WSB-DEFI mainnet\n ],\n },\n Factories: {\n '0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0': 'oracleWeightedPool',\n '0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9': 'weightedPool',\n '0xc66ba2b6595d3613ccab350c886ace23866ede24': 'stablePool',\n '0x67d27634e44793fe63c467035e31ea8635117cd4': 'stablePool', // Metastable\n '0x7dfdef5f355096603419239ce743bfaf1120312b': 'weightedPool', // Arbitrum Weighted\n '0xcf0a32bbef8f064969f21f7e02328fb577382018': 'weightedPool', // Arbitrum WeightedOracle\n '0x2433477a10fc5d31b9513c638f19ee85caed53fd': 'stablePool', // Arbitrum Stable\n '0xebfd5681977e38af65a7487dc70b8221d089ccad': 'stablePool', // Arbitrum MetaStable\n '0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de': 'liquidityBootstrappingPool', // Mainnet LBP\n '0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e': 'liquidityBootstrappingPool', // Mainnet LBP (zero protocol fee)\n '0x142b9666a0a3a30477b052962dda81547e7029ab': 'liquidityBootstrappingPool', // Arbitrum LBP (old)\n '0x1802953277fd955f9a254b80aa0582f193cf1d77': 'liquidityBootstrappingPool', // Arbitrum LBP (new)\n '0x48767f9f868a4a7b86a90736632f6e44c2df7fa9': 'managedPool', // Mainnet Managed\n '0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193': 'managedPool', // Polygon Managed\n '0xacd615b3705b9c880e4e7293f1030b34e57b4c1c': 'managedPool', // arbitrum managed\n '0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2': 'boostedPool', // mainnet stablephantom\n '0xdae7e32adc5d490a43ccba1f0c736033f2b4efca': 'boostedPool', // arbitrum stablephantom\n '0xc128a9954e6c874ea3d62ce62b468ba073093f25': 'boostedPool', // polygon stablephantom\n },\n Stakable: {\n AllowList: [],\n },\n Metadata: {\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: true,\n },\n '0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: true,\n },\n '0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e': {\n name: 'Balancer Stable USD',\n hasIcon: true,\n },\n },\n};\n\nconst POOLS_MAP = {\n [Network.GOERLI]: POOLS_GOERLI,\n [Network.MAINNET]: POOLS_MAINNET,\n [Network.POLYGON]: POOLS_POLYGON,\n [Network.ARBITRUM]: POOLS_ARBITRUM,\n [Network.GNOSIS]: POOLS_GNOSIS,\n};\n\nexport function POOLS(networkId: Network): Pools {\n const id = networkId as keyof typeof POOLS_MAP;\n return POOLS_MAP[id] ? POOLS_MAP[id] : POOLS_GENERIC;\n}\n","export enum PoolGaugesAttributes {\n Id = 'id',\n Address = 'address',\n PoolId = 'poolId',\n}\n\nexport interface PoolGauges {\n preferentialGauge: {\n id: string;\n };\n gauges: {\n id: string;\n relativeWeightCap?: string | null;\n }[];\n}\n","export enum PoolShareAttributes {\n Balance = 'balance',\n Id = 'id',\n PoolId = 'poolId',\n UserAddress = 'userAddress',\n}\n\nexport interface PoolShare {\n id: string;\n userAddress: string;\n poolId: string;\n balance: string;\n}\n","export enum GaugeShareAttributes {\n Id = 'id',\n UserAddress = 'user',\n GaugeId = 'gauge',\n Balance = 'balance',\n}\n\nexport interface GaugeShare {\n id: string;\n balance: string;\n userAddress: string;\n gauge: {\n id: string;\n poolId?: string;\n isKilled: boolean;\n totalSupply: string;\n };\n}\n","import { Network } from './lib/constants/network';\nimport type { BigNumberish } from '@ethersproject/bignumber';\nimport type { Contract } from '@ethersproject/contracts';\nimport type { PoolDataService, TokenPriceService } from '@balancer-labs/sor';\nimport type {\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n JoinPoolAttributes,\n} from './modules/pools/pool-types/concerns/types';\nimport type {\n Findable,\n Searchable,\n LiquidityGauge,\n PoolAttribute,\n TokenAttribute,\n Cacheable,\n} from '@/modules/data/types';\nimport type {\n BaseFeeDistributor,\n GaugeSharesRepository,\n PoolGaugesRepository,\n PoolSharesRepository,\n ProtocolFeesProvider,\n PoolJoinExitRepository,\n} from './modules/data';\nimport type { GraphQLArgs } from './lib/graphql';\nimport type { AprBreakdown } from '@/modules/pools/apr/apr';\nimport { SubgraphPoolDataService } from '@/modules/sor/pool-data/subgraphPoolDataService';\nimport * as Queries from '@/modules/pools/queries/types';\nimport { GyroConfigRepository } from '@/modules/data/gyro-config/repository';\n\nexport * from '@/modules/data/types';\nexport { Network, AprBreakdown };\n\nexport type Address = string;\n\nexport interface BalancerSdkConfig {\n //use a known network or provide an entirely custom config\n network: Network | BalancerNetworkConfig;\n rpcUrl: string;\n //overwrite the subgraph url if you don't want to use the balancer labs maintained version\n customSubgraphUrl?: string;\n subgraphQuery?: GraphQLQuery;\n //optionally overwrite parts of the standard SOR config\n sor?: Partial;\n tenderly?: BalancerTenderlyConfig;\n enableLogging?: boolean;\n coingecko?: CoingeckoConfig;\n}\n\nexport interface BalancerTenderlyConfig {\n accessKey: string;\n user: string;\n project: string;\n blockNumber?: number;\n}\n\nexport interface BalancerSdkSorConfig {\n //use a built-in service or provide a custom implementation of a TokenPriceService\n //defaults to coingecko\n tokenPriceService: 'api' | 'coingecko' | 'subgraph' | TokenPriceService;\n //use a built-in service or provide a custom implementation of a PoolDataService\n //defaults to subgraph\n poolDataService: 'subgraph' | PoolDataService;\n //if a custom PoolDataService is provided, on chain balance fetching needs to be handled externally\n //default to true.\n fetchOnChainBalances: boolean;\n}\n\nexport interface ContractAddresses {\n vault: string;\n multicall: string;\n poolDataQueries: string;\n gaugeClaimHelper?: string;\n balancerHelpers: string;\n balancerMinter?: string;\n lidoRelayer?: string;\n balancerRelayer: string;\n gaugeController?: string;\n feeDistributor?: string;\n veBal?: string;\n veBalProxy?: string;\n protocolFeePercentagesProvider?: string;\n weightedPoolFactory?: string;\n composableStablePoolFactory?: string;\n\n aaveLinearPoolFactory?: string;\n erc4626LinearPoolFactory?: string;\n eulerLinearPoolFactory?: string;\n gearboxLinearPoolFactory?: string;\n yearnLinearPoolFactory?: string;\n\n [key: string]: string | undefined;\n}\n\nexport interface BalancerNetworkConfig {\n chainId: Network;\n addresses: {\n contracts: ContractAddresses;\n tokens: {\n wrappedNativeAsset: string;\n lbpRaisingTokens?: string[];\n stETH?: string;\n wstETH?: string;\n bal: string;\n veBal?: string;\n bbaUsd?: string;\n };\n };\n tenderly?: BalancerTenderlyConfig;\n urls: {\n subgraph: string;\n gaugesSubgraph?: string;\n blockNumberSubgraph?: string;\n };\n thirdParty: {\n coingecko: {\n nativeAssetId: string;\n platformId: string;\n };\n };\n averageBlockTime?: number; // In seconds, used if blockNumberSubgraph not set\n multicallBatchSize?: number; // Only zkEVM needs a smaller batch size of 128, defaults to 1024\n pools: {\n wETHwstETH?: PoolReference;\n };\n poolsToIgnore?: string[];\n sorConnectingTokens?: { symbol: string; address: string }[];\n sorTriPathMidPoolIds?: string[];\n}\n\nexport interface BalancerDataRepositories {\n feeDistributor?: BaseFeeDistributor;\n feeCollector: Findable;\n gaugeShares?: GaugeSharesRepository;\n gyroConfigRepository?: GyroConfigRepository;\n liquidityGauges?: Findable;\n protocolFees?: ProtocolFeesProvider;\n /**\n * Why do we need 3 different pools repositories?\n */\n pools: Findable & Searchable;\n // Does it need to be different from the pools repository?\n poolsForSimulations: SubgraphPoolDataService;\n poolGauges?: PoolGaugesRepository;\n poolJoinExits: PoolJoinExitRepository;\n // Perhaps better to use a function to get upto date balances when needed.\n poolsOnChain: Findable &\n Searchable &\n Cacheable;\n poolShares: PoolSharesRepository;\n tokenHistoricalPrices: Findable;\n tokenMeta: Findable;\n tokenPrices: Findable;\n tokenYields: Findable;\n // Replace with a swapFeeRepository, we don't need historic pools for any other reason than to get the swap fee\n yesterdaysPools?: Findable & Searchable;\n}\n\nexport type PoolReference = {\n id: string;\n address: string;\n};\n\nexport enum PoolSpecialization {\n GeneralPool = 0,\n MinimalSwapInfoPool,\n TwoTokenPool,\n}\n\n// Joins\n\nexport type JoinPoolRequest = {\n assets: string[];\n maxAmountsIn: BigNumberish[];\n userData: string;\n fromInternalBalance: boolean;\n};\n\n// Exit\n\nexport type ExitPoolRequest = {\n assets: string[];\n minAmountsOut: string[];\n userData: string;\n toInternalBalance: boolean;\n};\n\n// Balance Operations\n\nexport enum UserBalanceOpKind {\n DepositInternal = 0,\n WithdrawInternal,\n TransferInternal,\n TransferExternal,\n}\n\nexport type UserBalanceOp = {\n kind: UserBalanceOpKind;\n asset: string;\n amount: BigNumberish;\n sender: string;\n recipient: string;\n};\n\nexport enum PoolBalanceOpKind {\n Withdraw = 0,\n Deposit = 1,\n Update = 2,\n}\n\nexport type PoolBalanceOp = {\n kind: PoolBalanceOpKind;\n poolId: string;\n token: string;\n amount: BigNumberish;\n};\n\nexport interface TransactionData {\n contract?: Contract;\n function: string;\n params: string[];\n outputs?: {\n amountsIn?: string[];\n amountsOut?: string[];\n };\n}\n\nexport type Currency = 'eth' | 'usd';\n\nexport type Price = { [currency in Currency]?: string };\nexport type TokenPrices = { [address: string]: Price };\nexport type HistoricalPrices = {\n prices: [[number, number]];\n market_caps: [[number, number]];\n total_volumes: [[number, number]];\n};\n\nexport interface Token {\n address: string;\n decimals?: number;\n symbol?: string;\n price?: Price;\n}\n\nexport interface PoolToken extends Token {\n balance: string;\n priceRate?: string;\n weight?: string | null;\n isExemptFromYieldProtocolFee?: boolean;\n token?: SubPoolMeta;\n}\n\nexport interface SubPoolMeta {\n pool: SubPool | null;\n latestUSDPrice?: string;\n latestFXPrice?: string;\n}\n\nexport interface SubPool {\n id: string;\n address: string;\n poolType: PoolType;\n totalShares: string;\n mainIndex: number;\n tokens?: PoolToken[];\n}\n\nexport interface OnchainTokenData {\n balance: string;\n weight: number;\n decimals: number;\n logoURI: string | undefined;\n name: string;\n symbol: string;\n}\n\nexport interface OnchainPoolData {\n tokens: Record;\n totalSupply: string;\n decimals: number;\n swapFee: string;\n amp?: string;\n swapEnabled: boolean;\n tokenRates?: string[];\n}\n\nexport enum PoolType {\n Weighted = 'Weighted',\n Investment = 'Investment',\n Stable = 'Stable',\n ComposableStable = 'ComposableStable',\n MetaStable = 'MetaStable',\n StablePhantom = 'StablePhantom',\n LiquidityBootstrapping = 'LiquidityBootstrapping',\n Element = 'Element',\n Gyro2 = 'Gyro2',\n Gyro3 = 'Gyro3',\n GyroE = 'GyroE',\n Managed = 'Managed',\n // Linear Pools defined below all operate the same mathematically but have different factories and names in Subgraph\n AaveLinear = 'AaveLinear',\n Linear = 'Linear',\n EulerLinear = 'EulerLinear',\n ERC4626Linear = 'ERC4626Linear',\n BeefyLinear = 'BeefyLinear',\n GearboxLinear = 'GearboxLinear',\n MidasLinear = 'MidasLinear',\n ReaperLinear = 'ReaperLinear',\n SiloLinear = 'SiloLinear',\n TetuLinear = 'TetuLinear',\n YearnLinear = 'YearnLinear',\n FX = 'FX',\n}\n\nexport interface Pool {\n id: string;\n name: string;\n address: string;\n chainId: number;\n poolType: PoolType;\n poolTypeVersion: number;\n swapFee: string;\n protocolYieldFeeCache: string;\n protocolSwapFeeCache: string;\n owner?: string;\n factory?: string;\n tokens: PoolToken[];\n tokensList: string[];\n tokenAddresses?: string[];\n totalLiquidity: string;\n totalShares: string;\n totalSwapFee?: string;\n totalSwapVolume?: string;\n onchain?: OnchainPoolData;\n createTime?: number;\n mainTokens?: string[];\n wrappedTokens?: string[];\n unwrappedTokens?: string[];\n isNew?: boolean;\n volumeSnapshot?: string;\n feesSnapshot?: string;\n boost?: string;\n symbol?: string;\n swapEnabled: boolean;\n amp?: string;\n wrappedIndex?: number;\n mainIndex?: number;\n apr?: AprBreakdown;\n liquidity?: string;\n totalWeight: string;\n lowerTarget: string;\n upperTarget: string;\n priceRateProviders?: PriceRateProvider[];\n lastJoinExitInvariant?: string;\n isInRecoveryMode?: boolean;\n isPaused?: boolean;\n tokenRates?: string[];\n}\n\nexport interface PriceRateProvider {\n address: string;\n token: {\n address: string;\n };\n}\n\n/**\n * Pool use-cases / controller layer\n */\nexport interface PoolWithMethods extends Pool, Queries.ParamsBuilder {\n /**\n * Build join pool transaction parameters with exact tokens in and minimum BPT out based on slippage tolerance\n * @param joiner Account address joining pool\n * @param tokensIn Token addresses provided for joining pool (same length and order as amountsIn)\n * @param amountsIn Token amounts provided for joining pool in EVM scale\n * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildJoin: (\n joiner: string,\n tokensIn: string[],\n amountsIn: string[],\n slippage: string\n ) => JoinPoolAttributes;\n\n /**\n * Calculate price impact of bptAmount against zero price impact BPT amount.\n * @param tokenAmounts Token amounts. Needs a value for each pool token.\n * @param bptAmount BPT amount for comparison (in EVM scale).\n * @param isJoin boolean indicating if the price impact is for a join or exit.\n * @returns price impact in EVM scale.\n */\n calcPriceImpact: (\n tokenAmounts: string[],\n bptAmount: string,\n isJoin: boolean\n ) => Promise;\n\n /**\n * Build exit pool transaction parameters with exact BPT in and minimum token amounts out based on slippage tolerance\n * @param exiter Account address exiting pool\n * @param bptIn BPT provided for exiting pool in EVM scale\n * @param slippage Maximum slippage tolerance in bps. i.e. 50 = 5%\n * @param shouldUnwrapNativeAsset Indicates whether wrapped native asset should be unwrapped after exit. Defaults to false.\n * @param singleTokenOut Optional: token address that if provided will exit to given token\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildExitExactBPTIn: (\n exiter: string,\n bptIn: string,\n slippage: string,\n shouldUnwrapNativeAsset?: boolean,\n singleTokenOut?: string,\n toInternalBalance?: boolean\n ) => ExitExactBPTInAttributes;\n\n /**\n * Build exit pool transaction parameters with exact tokens out and maximum BPT in based on slippage tolerance\n * @param exiter Account address exiting pool\n * @param tokensOut Tokens provided for exiting pool (same length and order as amountsOut)\n * @param amountsOut Amounts provided for exiting pool in EVM scale\n * @param slippage Maximum slippage tolerance in bps. i.e. 50 = 5%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildExitExactTokensOut: (\n exiter: string,\n tokensOut: string[],\n amountsOut: string[],\n slippage: string,\n toInternalBalance?: boolean\n ) => ExitExactTokensOutAttributes;\n\n /**\n * Build recovery exit pool transaction parameters with exact BPT in and minimum token amounts out based on slippage tolerance\n * @param exiter Account address exiting pool\n * @param bptIn BPT amount in EVM scale\n * @param slippage Maximum slippage tolerance in basis points. i.e. 50 = 5%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildRecoveryExit: (\n exiter: string,\n bptIn: string,\n slippage: string,\n toInternalBalance?: boolean\n ) => ExitExactBPTInAttributes;\n\n /**\n * Calculate spot price for swapping tokenIn with tokenOut\n * @param tokenIn Token address\n * @param tokenOut Token address\n * @returns spot price for swapping tokenIn with tokenOut in EVM scale\n */\n calcSpotPrice: (tokenIn: string, tokenOut: string) => string;\n\n bptIndex: number;\n}\n\nexport interface GraphQLQuery {\n args: GraphQLArgs;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n attrs: any;\n}\n\nexport type CoingeckoConfig = {\n coingeckoApiKey: string;\n tokensPerPriceRequest?: number;\n isDemoApiKey?: boolean;\n};\n","export class Logger {\n private enableLogging: boolean;\n\n private static instance: Logger;\n\n private constructor() {\n this.enableLogging = true; // Logging is initially enabled\n }\n\n static getInstance(): Logger {\n if (!Logger.instance) {\n Logger.instance = new Logger();\n }\n return Logger.instance;\n }\n\n setLoggingEnabled(enabled: boolean): void {\n this.enableLogging = enabled;\n }\n\n info(message: string): void {\n if (this.enableLogging) {\n console.log(`[INFO] ${message}`);\n }\n }\n\n warn(message: string): void {\n if (this.enableLogging) {\n console.warn(`[WARN] ${message}`);\n }\n }\n\n error(message: string): void {\n if (this.enableLogging) {\n console.error(`[ERROR] ${message}`);\n }\n }\n\n time(message: string): void {\n if (this.enableLogging) {\n console.time(`[TIME] ${message}`);\n }\n }\n\n timeEnd(message: string): void {\n if (this.enableLogging) {\n console.timeEnd(`[TIME] ${message}`);\n }\n }\n}\n","import { getAddress } from '@ethersproject/address';\nimport { AddressZero } from '@ethersproject/constants';\nimport invariant from 'tiny-invariant';\n\nconst cmpTokens = (tokenA: string, tokenB: string): number =>\n tokenA.toLowerCase() > tokenB.toLowerCase() ? 1 : -1;\n\nconst transposeMatrix = (matrix: unknown[][]): unknown[][] =>\n matrix[0].map((_, columnIndex) => matrix.map((row) => row[columnIndex]));\n\nexport class AssetHelpers {\n public readonly ETH: string = AddressZero;\n public readonly WETH: string;\n\n constructor(wethAddress: string) {\n this.WETH = getAddress(wethAddress);\n }\n\n static isEqual = (addressA: string, addressB: string): boolean =>\n getAddress(addressA) === getAddress(addressB);\n\n /**\n * Tests whether `token` is ETH (represented by `0x0000...0000`).\n *\n * @param token - the address of the asset to be checked\n */\n isETH = (token: string): boolean => AssetHelpers.isEqual(token, this.ETH);\n\n /**\n * Tests whether `token` is WETH.\n *\n * @param token - the address of the asset to be checked\n */\n isWETH = (token: string): boolean => AssetHelpers.isEqual(token, this.WETH);\n\n /**\n * Converts an asset to the equivalent ERC20 address.\n *\n * For ERC20s this will return the passed address but passing ETH (`0x0000...0000`) will return the WETH address\n * @param token - the address of the asset to be translated to an equivalent ERC20\n * @returns the address of translated ERC20 asset\n */\n translateToERC20 = (token: string): string =>\n this.isETH(token) ? this.WETH : token;\n\n /**\n * Sorts an array of token addresses into ascending order to match the format expected by the Vault.\n *\n * Passing additional arrays will result in each being sorted to maintain relative ordering to token addresses.\n *\n * The zero address (representing ETH) is sorted as if it were the WETH address.\n * This matches the behaviour expected by the Vault when receiving an array of addresses.\n *\n * @param tokens - an array of token addresses to be sorted in ascending order\n * @param others - a set of arrays to be sorted in the same order as the tokens, e.g. token weights or asset manager addresses\n * @returns an array of the form `[tokens, ...others]` where each subarray has been sorted to maintain its ordering relative to `tokens`\n *\n * @example\n * const [tokens] = sortTokens([tokenB, tokenC, tokenA])\n * const [tokens, weights] = sortTokens([tokenB, tokenC, tokenA], [weightB, weightC, weightA])\n * // where tokens = [tokenA, tokenB, tokenC], weights = [weightA, weightB, weightC]\n */\n sortTokens(\n tokens: string[],\n ...others: unknown[][]\n ): [string[], ...unknown[][]] {\n others.forEach((array) =>\n invariant(tokens.length === array.length, 'array length mismatch')\n );\n\n // We want to sort ETH as if were WETH so we translate to ERC20s\n const erc20Tokens = tokens.map(this.translateToERC20);\n\n const transpose = transposeMatrix([erc20Tokens, ...others]) as [\n string,\n ...unknown[]\n ][];\n const sortedTranspose = transpose.sort(([tokenA], [tokenB]) =>\n cmpTokens(tokenA, tokenB)\n );\n const [sortedErc20s, ...sortedOthers] = transposeMatrix(\n sortedTranspose\n ) as [string[], ...unknown[][]];\n\n // If one of the tokens was ETH, we need to translate back from WETH\n const sortedTokens = tokens.includes(this.ETH)\n ? sortedErc20s.map((token) => (this.isWETH(token) ? this.ETH : token))\n : sortedErc20s;\n return [sortedTokens, ...sortedOthers];\n }\n}\n","const balancerErrorCodes: Record = {\n '000': 'ADD_OVERFLOW',\n '001': 'SUB_OVERFLOW',\n '002': 'SUB_UNDERFLOW',\n '003': 'MUL_OVERFLOW',\n '004': 'ZERO_DIVISION',\n '005': 'DIV_INTERNAL',\n '006': 'X_OUT_OF_BOUNDS',\n '007': 'Y_OUT_OF_BOUNDS',\n '008': 'PRODUCT_OUT_OF_BOUNDS',\n '009': 'INVALID_EXPONENT',\n '100': 'OUT_OF_BOUNDS',\n '101': 'UNSORTED_ARRAY',\n '102': 'UNSORTED_TOKENS',\n '103': 'INPUT_LENGTH_MISMATCH',\n '104': 'ZERO_TOKEN',\n '200': 'MIN_TOKENS',\n '201': 'MAX_TOKENS',\n '202': 'MAX_SWAP_FEE_PERCENTAGE',\n '203': 'MIN_SWAP_FEE_PERCENTAGE',\n '204': 'MINIMUM_BPT',\n '205': 'CALLER_NOT_VAULT',\n '206': 'UNINITIALIZED',\n '207': 'BPT_IN_MAX_AMOUNT',\n '208': 'BPT_OUT_MIN_AMOUNT',\n '209': 'EXPIRED_PERMIT',\n '210': 'NOT_TWO_TOKENS',\n '211': 'DISABLED',\n '300': 'MIN_AMP',\n '301': 'MAX_AMP',\n '302': 'MIN_WEIGHT',\n '303': 'MAX_STABLE_TOKENS',\n '304': 'MAX_IN_RATIO',\n '305': 'MAX_OUT_RATIO',\n '306': 'MIN_BPT_IN_FOR_TOKEN_OUT',\n '307': 'MAX_OUT_BPT_FOR_TOKEN_IN',\n '308': 'NORMALIZED_WEIGHT_INVARIANT',\n '309': 'INVALID_TOKEN',\n '310': 'UNHANDLED_JOIN_KIND',\n '311': 'ZERO_INVARIANT',\n '312': 'ORACLE_INVALID_SECONDS_QUERY',\n '313': 'ORACLE_NOT_INITIALIZED',\n '314': 'ORACLE_QUERY_TOO_OLD',\n '315': 'ORACLE_INVALID_INDEX',\n '316': 'ORACLE_BAD_SECS',\n '317': 'AMP_END_TIME_TOO_CLOSE',\n '318': 'AMP_ONGOING_UPDATE',\n '319': 'AMP_RATE_TOO_HIGH',\n '320': 'AMP_NO_ONGOING_UPDATE',\n '321': 'STABLE_INVARIANT_DIDNT_CONVERGE',\n '322': 'STABLE_GET_BALANCE_DIDNT_CONVERGE',\n '323': 'RELAYER_NOT_CONTRACT',\n '324': 'BASE_POOL_RELAYER_NOT_CALLED',\n '325': 'REBALANCING_RELAYER_REENTERED',\n '326': 'GRADUAL_UPDATE_TIME_TRAVEL',\n '327': 'SWAPS_DISABLED',\n '328': 'CALLER_IS_NOT_LBP_OWNER',\n '329': 'PRICE_RATE_OVERFLOW',\n '330': 'INVALID_JOIN_EXIT_KIND_WHILE_SWAPS_DISABLED',\n '331': 'WEIGHT_CHANGE_TOO_FAST',\n '332': 'LOWER_GREATER_THAN_UPPER_TARGET',\n '333': 'UPPER_TARGET_TOO_HIGH',\n '334': 'UNHANDLED_BY_LINEAR_POOL',\n '335': 'OUT_OF_TARGET_RANGE',\n '336': 'UNHANDLED_EXIT_KIND ',\n '337': 'UNAUTHORIZED_EXIT',\n '338': 'MAX_MANAGEMENT_SWAP_FEE_PERCENTAGE',\n '339': 'UNHANDLED_BY_MANAGED_POOL',\n '340': 'UNHANDLED_BY_PHANTOM_POOL',\n '341': 'TOKEN_DOES_NOT_HAVE_RATE_PROVIDER',\n '342': 'INVALID_INITIALIZATION',\n '343': 'OUT_OF_NEW_TARGET_RANGE',\n '344': 'UNAUTHORIZED_OPERATION',\n '345': 'UNINITIALIZED_POOL_CONTROLLER',\n '400': 'REENTRANCY',\n '401': 'SENDER_NOT_ALLOWED',\n '402': 'PAUSED',\n '403': 'PAUSE_WINDOW_EXPIRED',\n '404': 'MAX_PAUSE_WINDOW_DURATION',\n '405': 'MAX_BUFFER_PERIOD_DURATION',\n '406': 'INSUFFICIENT_BALANCE',\n '407': 'INSUFFICIENT_ALLOWANCE',\n '408': 'ERC20_TRANSFER_FROM_ZERO_ADDRESS',\n '409': 'ERC20_TRANSFER_TO_ZERO_ADDRESS',\n '410': 'ERC20_MINT_TO_ZERO_ADDRESS',\n '411': 'ERC20_BURN_FROM_ZERO_ADDRESS',\n '412': 'ERC20_APPROVE_FROM_ZERO_ADDRESS',\n '413': 'ERC20_APPROVE_TO_ZERO_ADDRESS',\n '414': 'ERC20_TRANSFER_EXCEEDS_ALLOWANCE',\n '415': 'ERC20_DECREASED_ALLOWANCE_BELOW_ZERO',\n '416': 'ERC20_TRANSFER_EXCEEDS_BALANCE',\n '417': 'ERC20_BURN_EXCEEDS_ALLOWANCE',\n '418': 'SAFE_ERC20_CALL_FAILED',\n '419': 'ADDRESS_INSUFFICIENT_BALANCE',\n '420': 'ADDRESS_CANNOT_SEND_VALUE',\n '421': 'SAFE_CAST_VALUE_CANT_FIT_INT256',\n '422': 'GRANT_SENDER_NOT_ADMIN',\n '423': 'REVOKE_SENDER_NOT_ADMIN',\n '424': 'RENOUNCE_SENDER_NOT_ALLOWED',\n '425': 'BUFFER_PERIOD_EXPIRED',\n '426': 'CALLER_IS_NOT_OWNER',\n '427': 'NEW_OWNER_IS_ZERO',\n '428': 'CODE_DEPLOYMENT_FAILED',\n '429': 'CALL_TO_NON_CONTRACT',\n '430': 'LOW_LEVEL_CALL_FAILED',\n '431': 'NOT_PAUSED',\n '432': 'ADDRESS_ALREADY_ALLOWLISTED',\n '433': 'ADDRESS_NOT_ALLOWLISTED',\n '434': 'ERC20_BURN_EXCEEDS_BALANCE',\n '500': 'INVALID_POOL_ID',\n '501': 'CALLER_NOT_POOL',\n '502': 'SENDER_NOT_ASSET_MANAGER',\n '503': 'USER_DOESNT_ALLOW_RELAYER',\n '504': 'INVALID_SIGNATURE',\n '505': 'EXIT_BELOW_MIN',\n '506': 'JOIN_ABOVE_MAX',\n '507': 'SWAP_LIMIT',\n '508': 'SWAP_DEADLINE',\n '509': 'CANNOT_SWAP_SAME_TOKEN',\n '510': 'UNKNOWN_AMOUNT_IN_FIRST_SWAP',\n '511': 'MALCONSTRUCTED_MULTIHOP_SWAP',\n '512': 'INTERNAL_BALANCE_OVERFLOW',\n '513': 'INSUFFICIENT_INTERNAL_BALANCE',\n '514': 'INVALID_ETH_INTERNAL_BALANCE',\n '515': 'INVALID_POST_LOAN_BALANCE',\n '516': 'INSUFFICIENT_ETH',\n '517': 'UNALLOCATED_ETH',\n '518': 'ETH_TRANSFER',\n '519': 'CANNOT_USE_ETH_SENTINEL',\n '520': 'TOKENS_MISMATCH',\n '521': 'TOKEN_NOT_REGISTERED',\n '522': 'TOKEN_ALREADY_REGISTERED',\n '523': 'TOKENS_ALREADY_SET',\n '524': 'TOKENS_LENGTH_MUST_BE_2',\n '525': 'NONZERO_TOKEN_BALANCE',\n '526': 'BALANCE_TOTAL_OVERFLOW',\n '527': 'POOL_NO_TOKENS',\n '528': 'INSUFFICIENT_FLASH_LOAN_BALANCE',\n '600': 'SWAP_FEE_PERCENTAGE_TOO_HIGH',\n '601': 'FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH',\n '602': 'INSUFFICIENT_FLASH_LOAN_FEE_AMOUNT',\n};\n\nexport class BalancerErrors {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n static isErrorCode = (error: string): boolean => {\n if (!error.includes('BAL#')) return false;\n\n const errorCode = error.replace('BAL#', '');\n return Object.keys(balancerErrorCodes).includes(errorCode);\n };\n\n /**\n * Decodes a Balancer error code into the corresponding reason\n * @param error - a Balancer error code of the form `BAL#000`\n * @returns The decoded error reason\n */\n static parseErrorCode = (error: string): string => {\n if (!error.includes('BAL#')) throw new Error('Error code not found');\n const errorCode = error.replace('BAL#', '');\n\n const actualError = balancerErrorCodes[errorCode];\n\n if (!actualError) throw new Error('Error code not found');\n\n return actualError;\n };\n\n /**\n * Decodes a Balancer error code into the corresponding reason\n * @param error - a Balancer error code of the form `BAL#000`\n * @returns The decoded error reason if passed a valid error code, otherwise returns passed input\n */\n static tryParseErrorCode = (error: string): string => {\n try {\n return BalancerErrors.parseErrorCode(error);\n } catch {\n return error;\n }\n };\n\n /**\n * Tests whether a string is a known Balancer error message\n * @param error - a string to be checked verified as a Balancer error message\n */\n static isBalancerError = (error: string): boolean =>\n Object.values(balancerErrorCodes).includes(error);\n\n /**\n * Encodes an error string into the corresponding error code\n * @param error - a Balancer error message string\n * @returns a Balancer error code of the form `BAL#000`\n */\n static encodeError = (error: string): string => {\n const encodedError = Object.entries(balancerErrorCodes).find(\n ([, message]) => message === error\n );\n\n if (!encodedError) throw Error('Error message not found');\n\n return `BAL#${encodedError[0]}`;\n };\n}\n","import { MaxUint256 as MAX_DEADLINE } from '@ethersproject/constants';\nimport { Contract } from '@ethersproject/contracts';\nimport { hexValue, hexZeroPad, splitSignature } from '@ethersproject/bytes';\nimport { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { Signer, TypedDataSigner } from '@ethersproject/abstract-signer';\n\nexport type Account = string | Signer | Contract;\n\nexport async function accountToAddress(account: Account): Promise {\n if (typeof account == 'string') return account;\n if (Signer.isSigner(account)) return account.getAddress();\n if (account.address) return account.address;\n throw new Error('Could not read account address');\n}\n\nexport enum RelayerAction {\n JoinPool = 'JoinPool',\n ExitPool = 'ExitPool',\n Swap = 'Swap',\n BatchSwap = 'BatchSwap',\n SetRelayerApproval = 'SetRelayerApproval',\n}\n\nexport class RelayerAuthorization {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n static encodeCalldataAuthorization = (\n calldata: string,\n deadline: BigNumberish,\n signature: string\n ): string => {\n const encodedDeadline = hexZeroPad(hexValue(deadline), 32).slice(2);\n const { v, r, s } = splitSignature(signature);\n const encodedV = hexZeroPad(hexValue(v), 32).slice(2);\n const encodedR = r.slice(2);\n const encodedS = s.slice(2);\n return `${calldata}${encodedDeadline}${encodedV}${encodedR}${encodedS}`;\n };\n\n static signJoinAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.JoinPool,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signExitAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.ExitPool,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signSwapAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.Swap,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signBatchSwapAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.BatchSwap,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signSetRelayerApprovalAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.SetRelayerApproval,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signAuthorizationFor = async (\n type: RelayerAction,\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline: BigNumberish = MAX_DEADLINE,\n nonce?: BigNumberish\n ): Promise => {\n const { chainId } = await validator.provider.getNetwork();\n if (!nonce) {\n const userAddress = await user.getAddress();\n nonce = (await validator.getNextNonce(userAddress)) as BigNumberish;\n }\n\n const domain = {\n name: 'Balancer V2 Vault',\n version: '1',\n chainId,\n verifyingContract: validator.address,\n };\n\n const types = {\n [type]: [\n { name: 'calldata', type: 'bytes' },\n { name: 'sender', type: 'address' },\n { name: 'nonce', type: 'uint256' },\n { name: 'deadline', type: 'uint256' },\n ],\n };\n\n const value = {\n calldata: allowedCalldata,\n sender: await accountToAddress(allowedSender),\n nonce: nonce.toString(),\n deadline: deadline.toString(),\n };\n\n return user._signTypedData(domain, types, value);\n };\n}\n\nexport class BalancerMinterAuthorization {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n static signSetMinterApproval = async (\n minterContract: Contract,\n minter: Account,\n approval: boolean,\n user: Signer & TypedDataSigner,\n deadline: BigNumberish = MAX_DEADLINE,\n nonce?: BigNumberish\n ): Promise<{ v: number; r: string; s: string; deadline: BigNumber }> => {\n const { chainId } = await minterContract.provider.getNetwork();\n if (!nonce) {\n const userAddress = await user.getAddress();\n nonce = (await minterContract.getNextNonce(userAddress)) as BigNumberish;\n }\n\n const domain = {\n name: 'Balancer Minter',\n version: '1',\n chainId,\n verifyingContract: minterContract.address,\n };\n\n const types = {\n SetMinterApproval: [\n { name: 'minter', type: 'address' },\n { name: 'approval', type: 'bool' },\n { name: 'nonce', type: 'uint256' },\n { name: 'deadline', type: 'uint256' },\n ],\n };\n\n const value = {\n minter: await accountToAddress(minter),\n approval,\n nonce: nonce.toString(),\n deadline: deadline.toString(),\n };\n\n const signature = await user._signTypedData(domain, types, value);\n\n return {\n ...splitSignature(signature),\n deadline: BigNumber.from(deadline),\n };\n };\n}\n","import { Signer, TypedDataSigner } from '@ethersproject/abstract-signer';\nimport { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { splitSignature } from '@ethersproject/bytes';\nimport { MaxUint256 as MAX_DEADLINE } from '@ethersproject/constants';\nimport { Contract } from '@ethersproject/contracts';\nimport { Account, accountToAddress } from './signatures';\n\nexport const signPermit = async (\n token: Contract,\n owner: Signer & TypedDataSigner,\n spender: Account,\n amount: BigNumberish,\n deadline: BigNumberish = MAX_DEADLINE,\n nonce?: BigNumberish\n): Promise<{\n v: number;\n r: string;\n s: string;\n deadline: BigNumber;\n nonce: BigNumber;\n}> => {\n const { chainId } = await token.provider.getNetwork();\n const ownerAddress = await owner.getAddress();\n\n if (!nonce) nonce = (await token.nonces(ownerAddress)) as BigNumberish;\n\n const domain = {\n name: await token.name(),\n version: '1',\n chainId,\n verifyingContract: token.address,\n };\n\n const types = {\n Permit: [\n { name: 'owner', type: 'address' },\n { name: 'spender', type: 'address' },\n { name: 'value', type: 'uint256' },\n { name: 'nonce', type: 'uint256' },\n { name: 'deadline', type: 'uint256' },\n ],\n };\n\n const value = {\n owner: ownerAddress,\n spender: await accountToAddress(spender),\n value: amount,\n nonce,\n deadline,\n };\n\n const signature = await owner._signTypedData(domain, types, value);\n return {\n ...splitSignature(signature),\n deadline: BigNumber.from(deadline),\n nonce: BigNumber.from(nonce),\n };\n};\n","export const BZERO = BigInt(0);\nexport const BONE = BigInt(1);\nexport const ONE = BigInt('1000000000000000000'); // 18 decimal places\n\nconst _require = (b: boolean, message: string) => {\n if (!b) throw new Error(message);\n};\n\n/**\n * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\n * it had 18 decimals.\n */\nexport function _computeScalingFactor(tokenDecimals: bigint): bigint {\n // Tokens with more than 18 decimals are not supported.\n const decimalsDifference = BigInt(18) - tokenDecimals;\n return ONE * BigInt(10) ** decimalsDifference;\n}\n\n/**\n * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\n * scaling or not.\n */\nexport function _upscale(amount: bigint, scalingFactor: bigint): bigint {\n // Upscale rounding wouldn't necessarily always go in the same direction: in a swap for example the balance of\n // token in should be rounded up, and that of token out rounded down. This is the only place where we round in\n // the same direction for all amounts, as the impact of this rounding is expected to be minimal (and there's no\n // rounding error unless `_scalingFactor()` is overriden).\n return SolidityMaths.mulDownFixed(amount, scalingFactor);\n}\n\n/**\n * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\n * the `amounts` array.\n */\nexport function _upscaleArray(\n amounts: bigint[],\n scalingFactors: bigint[]\n): bigint[] {\n const upscaledAmounts = new Array(amounts.length);\n for (let i = 0; i < amounts.length; ++i) {\n upscaledAmounts[i] = SolidityMaths.mulDownFixed(\n amounts[i],\n scalingFactors[i]\n );\n }\n return upscaledAmounts;\n}\n\n/**\n * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\n * whether it needed scaling or not. The result is rounded down.\n */\nexport function _downscaleDown(amount: bigint, scalingFactor: bigint): bigint {\n return SolidityMaths.divDownFixed(amount, scalingFactor);\n}\n\n/**\n * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\n * *mutates* the `amounts` array.\n */\nexport function _downscaleDownArray(\n amounts: bigint[],\n scalingFactors: bigint[]\n): bigint[] {\n const downscaledAmounts = new Array(amounts.length);\n for (let i = 0; i < amounts.length; ++i) {\n downscaledAmounts[i] = SolidityMaths.divDownFixed(\n amounts[i],\n scalingFactors[i]\n );\n }\n return downscaledAmounts;\n}\n\n/**\n * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\n * whether it needed scaling or not. The result is rounded up.\n */\nexport function _downscaleUp(amount: bigint, scalingFactor: bigint): bigint {\n return SolidityMaths.divUpFixed(amount, scalingFactor);\n}\n\nexport class SolidityMaths {\n /**\n * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\n */\n // add(a: bigint, b: bigint): bigint {\n // const c = a + b;\n // // _require(c >= a, Errors.ADD_OVERFLOW);\n // return c;\n // }\n\n /**\n * @dev Returns the addition of two signed integers, reverting on overflow.\n */\n static add(a: bigint, b: bigint): bigint {\n const c = a + b;\n _require((b >= 0 && c >= a) || (b < 0 && c < a), 'Errors.ADD_OVERFLOW');\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\n */\n static sub(a: bigint, b: bigint): bigint {\n _require(b <= a, 'Errors.SUB_OVERFLOW');\n const c = a - b;\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two signed integers, reverting on overflow.\n */\n // sub(int256 a, int256 b) internal pure returns (int256) {\n // int256 c = a - b;\n // // _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\n // return c;\n // }\n\n /**\n * @dev Returns the largest bigint in the array.\n */\n static max(args: bigint[]): bigint {\n if (args.length === 0) throw new Error('Errors.EMPTY_ARRAY');\n if (args.length === 1) return args[0];\n return args.reduce((previous, current) =>\n current > previous ? current : previous\n );\n }\n\n /**\n * @dev Returns the smallest of two numbers of 256 bits.\n */\n static min(a: bigint, b: bigint): bigint {\n return a < b ? a : b;\n }\n\n static mul(a: bigint, b: bigint): bigint {\n const c = a * b;\n _require(a == BZERO || c / a == b, 'Errors.MUL_OVERFLOW');\n return c;\n }\n\n static div(a: bigint, b: bigint, roundUp: boolean): bigint {\n return roundUp ? this.divUp(a, b) : this.divDown(a, b);\n }\n\n static divDown(a: bigint, b: bigint): bigint {\n _require(b != BZERO, 'Errors.ZERO_DIVISION');\n return a / b;\n }\n\n static divUp(a: bigint, b: bigint): bigint {\n _require(b != BZERO, 'Errors.ZERO_DIVISION');\n\n if (a == BZERO) {\n return BZERO;\n } else {\n return BONE + (a - BONE) / b;\n }\n }\n\n // Modification: Taken from the fixed point class\n static MAX_POW_RELATIVE_ERROR = BigInt(10000);\n\n static mulUpFixed(a: bigint, b: bigint): bigint {\n const product = a * b;\n _require(a == BZERO || product / a == b, 'Errors.MUL_OVERFLOW');\n\n if (product == BZERO) {\n return BZERO;\n } else {\n // The traditional divUp formula is:\n // divUp(x, y) := (x + y - 1) / y\n // To avoid intermediate overflow in the addition, we distribute the division and get:\n // divUp(x, y) := (x - 1) / y + 1\n // Note that this requires x != 0, which we already tested for.\n\n return (product - BONE) / ONE + BONE;\n }\n }\n\n // Modification: Taken from the fixed point class\n static divDownFixed(a: bigint, b: bigint): bigint {\n _require(b != BZERO, 'Errors.ZERO_DIVISION');\n if (a == BZERO) {\n return BZERO;\n } else {\n const aInflated = a * ONE;\n // _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\n\n return aInflated / b;\n }\n }\n\n // Modification: Taken from the fixed point class\n static divUpFixed(a: bigint, b: bigint): bigint {\n _require(b != BZERO, 'Errors.ZERO_DIVISION');\n\n if (a == BZERO) {\n return BZERO;\n } else {\n const aInflated = a * ONE;\n _require(aInflated / a == ONE, 'Errors.DIV_INTERNAL'); // mul overflow\n\n // The traditional divUp formula is:\n // divUp(x, y) := (x + y - 1) / y\n // To avoid intermediate overflow in the addition, we distribute the division and get:\n // divUp(x, y) := (x - 1) / y + 1\n // Note that this requires x != 0, which we already tested for.\n\n return (aInflated - BONE) / b + BONE;\n }\n }\n\n // Modification: Taken from the fixed point class\n static powUpFixed(x: bigint, y: bigint): bigint {\n const raw = LogExpMath.pow(x, y);\n const maxError = this.add(\n this.mulUpFixed(raw, this.MAX_POW_RELATIVE_ERROR),\n BONE\n );\n\n return this.add(raw, maxError);\n }\n\n // Modification: Taken from the fixed point class\n static complementFixed(x: bigint): bigint {\n return x < ONE ? ONE - x : BZERO;\n }\n\n static mulDownFixed(a: bigint, b: bigint): bigint {\n const product = a * b;\n _require(a == BZERO || product / a == b, 'Errors.MUL_OVERFLOW');\n\n return product / ONE;\n }\n}\n\nclass LogExpMath {\n // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\n // two numbers, and multiply by ONE when dividing them.\n\n // All arguments and return values are 18 decimal fixed point numbers.\n static ONE_18 = BigInt('1000000000000000000');\n\n // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\n // case of ln36, 36 decimals.\n static ONE_20 = BigInt('100000000000000000000');\n static ONE_36 = BigInt('1000000000000000000000000000000000000');\n\n // The domain of natural exponentiation is bound by the word size and number of decimals used.\n //\n // Because internally the result will be stored using 20 decimals, the largest possible result is\n // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\n // The smallest possible result is 10^(-18), which makes largest negative argument\n // ln(10^(-18)) = -41.446531673892822312.\n // We use 130.0 and -41.0 to have some safety margin.\n static MAX_NATURAL_EXPONENT = BigInt('130000000000000000000');\n static MIN_NATURAL_EXPONENT = BigInt('-41000000000000000000');\n\n // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\n // 256 bit integer.\n static LN_36_LOWER_BOUND: bigint =\n BigInt(LogExpMath.ONE_18) - BigInt('100000000000000000');\n static LN_36_UPPER_BOUND: bigint =\n BigInt(LogExpMath.ONE_18) + BigInt('100000000000000000');\n\n static MILD_EXPONENT_BOUND: bigint =\n BigInt(2) ** BigInt(254) / LogExpMath.ONE_20;\n\n // 18 decimal constants\n static x0 = BigInt('128000000000000000000'); // 2ˆ7\n static a0 = BigInt(\n '38877084059945950922200000000000000000000000000000000000'\n ); // eˆ(x0) (no decimals)\n static x1 = BigInt('64000000000000000000'); // 2ˆ6\n static a1 = BigInt('6235149080811616882910000000'); // eˆ(x1) (no decimals)\n\n // 20 decimal constants\n static x2 = BigInt('3200000000000000000000'); // 2ˆ5\n static a2 = BigInt('7896296018268069516100000000000000'); // eˆ(x2)\n static x3 = BigInt('1600000000000000000000'); // 2ˆ4\n static a3 = BigInt('888611052050787263676000000'); // eˆ(x3)\n static x4 = BigInt('800000000000000000000'); // 2ˆ3\n static a4 = BigInt('298095798704172827474000'); // eˆ(x4)\n static x5 = BigInt('400000000000000000000'); // 2ˆ2\n static a5 = BigInt('5459815003314423907810'); // eˆ(x5)\n static x6 = BigInt('200000000000000000000'); // 2ˆ1\n static a6 = BigInt('738905609893065022723'); // eˆ(x6)\n static x7 = BigInt('100000000000000000000'); // 2ˆ0\n static a7 = BigInt('271828182845904523536'); // eˆ(x7)\n static x8 = BigInt('50000000000000000000'); // 2ˆ-1\n static a8 = BigInt('164872127070012814685'); // eˆ(x8)\n static x9 = BigInt('25000000000000000000'); // 2ˆ-2\n static a9 = BigInt('128402541668774148407'); // eˆ(x9)\n static x10 = BigInt('12500000000000000000'); // 2ˆ-3\n static a10 = BigInt('113314845306682631683'); // eˆ(x10)\n static x11 = BigInt('6250000000000000000'); // 2ˆ-4\n static a11 = BigInt('106449445891785942956'); // eˆ(x11)\n\n // All arguments and return values are 18 decimal fixed point numbers.\n static pow(x: bigint, y: bigint): bigint {\n if (y === BZERO) {\n // We solve the 0^0 indetermination by making it equal one.\n return this.ONE_18;\n }\n\n if (x == BZERO) {\n return BZERO;\n }\n\n // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\n // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\n // x^y = exp(y * ln(x)).\n\n // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\n _require(\n x <\n BigInt(\n '57896044618658097711785492504343953926634992332820282019728792003956564819968'\n ),\n 'Errors.X_OUT_OF_BOUNDS'\n );\n const x_int256 = x;\n\n // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\n // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\n\n // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\n _require(y < this.MILD_EXPONENT_BOUND, 'Errors.Y_OUT_OF_BOUNDS');\n const y_int256 = y;\n\n let logx_times_y;\n if (\n this.LN_36_LOWER_BOUND < x_int256 &&\n x_int256 < this.LN_36_UPPER_BOUND\n ) {\n const ln_36_x = this._ln_36(x_int256);\n\n // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\n // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\n // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\n // (downscaled) last 18 decimals.\n logx_times_y =\n (ln_36_x / this.ONE_18) * y_int256 +\n ((ln_36_x % this.ONE_18) * y_int256) / this.ONE_18;\n } else {\n logx_times_y = this._ln(x_int256) * y_int256;\n }\n logx_times_y /= this.ONE_18;\n\n // Finally, we compute exp(y * ln(x)) to arrive at x^y\n _require(\n this.MIN_NATURAL_EXPONENT <= logx_times_y &&\n logx_times_y <= this.MAX_NATURAL_EXPONENT,\n 'Errors.PRODUCT_OUT_OF_BOUNDS'\n );\n\n // return uint256(exp(logx_times_y));\n return this.exp(logx_times_y);\n }\n\n static exp(x: bigint): bigint {\n _require(\n x >= this.MIN_NATURAL_EXPONENT && x <= this.MAX_NATURAL_EXPONENT,\n 'Errors.INVALID_EXPONENT'\n );\n\n if (x < 0) {\n // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\n // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\n // Fixed point division requires multiplying by ONE_18.\n return (this.ONE_18 * this.ONE_18) / this.exp(BigInt(-1) * x);\n }\n\n // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\n // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\n // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\n // decomposition.\n // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\n // decomposition, which will be lower than the smallest x_n.\n // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\n // We mutate x by subtracting x_n, making it the remainder of the decomposition.\n\n // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\n // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\n // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\n // decomposition.\n\n // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\n // it and compute the accumulated product.\n\n let firstAN;\n if (x >= this.x0) {\n x -= this.x0;\n firstAN = this.a0;\n } else if (x >= this.x1) {\n x -= this.x1;\n firstAN = this.a1;\n } else {\n firstAN = BigInt(1); // One with no decimal places\n }\n\n // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\n // smaller terms.\n x *= BigInt(100);\n\n // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\n // one. Recall that fixed point multiplication requires dividing by ONE_20.\n let product = this.ONE_20;\n\n if (x >= this.x2) {\n x -= this.x2;\n product = (product * this.a2) / this.ONE_20;\n }\n if (x >= this.x3) {\n x -= this.x3;\n product = (product * this.a3) / this.ONE_20;\n }\n if (x >= this.x4) {\n x -= this.x4;\n product = (product * this.a4) / this.ONE_20;\n }\n if (x >= this.x5) {\n x -= this.x5;\n product = (product * this.a5) / this.ONE_20;\n }\n if (x >= this.x6) {\n x -= this.x6;\n product = (product * this.a6) / this.ONE_20;\n }\n if (x >= this.x7) {\n x -= this.x7;\n product = (product * this.a7) / this.ONE_20;\n }\n if (x >= this.x8) {\n x -= this.x8;\n product = (product * this.a8) / this.ONE_20;\n }\n if (x >= this.x9) {\n x -= this.x9;\n product = (product * this.a9) / this.ONE_20;\n }\n\n // x10 and x11 are unnecessary here since we have high enough precision already.\n\n // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\n // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\n\n let seriesSum = this.ONE_20; // The initial one in the sum, with 20 decimal places.\n let term; // Each term in the sum, where the nth term is (x^n / n!).\n\n // The first term is simply x.\n term = x;\n seriesSum += term;\n\n // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\n // multiplying by it requires dividing by this.ONE_20, but dividing by the non-fixed point n values does not.\n\n term = (term * x) / this.ONE_20 / BigInt(2);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(3);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(4);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(5);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(6);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(7);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(8);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(9);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(10);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(11);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(12);\n seriesSum += term;\n\n // 12 Taylor terms are sufficient for 18 decimal precision.\n\n // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\n // approximation of the exponentiation of the remainder (both with 20 decimals). All that remains is to multiply\n // all three (one 20 decimal fixed point multiplication, dividing by this.ONE_20, and one integer multiplication),\n // and then drop two digits to return an 18 decimal value.\n\n return (((product * seriesSum) / this.ONE_20) * firstAN) / BigInt(100);\n }\n\n static _ln_36(x: bigint): bigint {\n // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\n // worthwhile.\n\n // First, we transform x to a 36 digit fixed point value.\n x *= this.ONE_18;\n\n // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\n // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\n\n // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\n // division by ONE_36.\n const z = ((x - this.ONE_36) * this.ONE_36) / (x + this.ONE_36);\n const z_squared = (z * z) / this.ONE_36;\n\n // num is the numerator of the series: the z^(2 * n + 1) term\n let num = z;\n\n // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\n let seriesSum = num;\n\n // In each step, the numerator is multiplied by z^2\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(3);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(5);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(7);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(9);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(11);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(13);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(15);\n\n // 8 Taylor terms are sufficient for 36 decimal precision.\n\n // All that remains is multiplying by 2 (non fixed point).\n return seriesSum * BigInt(2);\n }\n\n /**\n * @dev Internal natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\n */\n static _ln(a: bigint): bigint {\n if (a < this.ONE_18) {\n // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\n // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\n // Fixed point division requires multiplying by this.ONE_18.\n return BigInt(-1) * this._ln((this.ONE_18 * this.ONE_18) / a);\n }\n\n // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\n // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\n // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\n // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\n // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\n // decomposition, which will be lower than the smallest a_n.\n // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\n // We mutate a by subtracting a_n, making it the remainder of the decomposition.\n\n // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\n // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\n // this.ONE_18 to convert them to fixed point.\n // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\n // by it and compute the accumulated sum.\n\n let sum = BZERO;\n if (a >= this.a0 * this.ONE_18) {\n a /= this.a0; // Integer, not fixed point division\n sum += this.x0;\n }\n\n if (a >= this.a1 * this.ONE_18) {\n a /= this.a1; // Integer, not fixed point division\n sum += this.x1;\n }\n\n // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\n sum *= BigInt(100);\n a *= BigInt(100);\n\n // Because further a_n are 20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\n\n if (a >= this.a2) {\n a = (a * this.ONE_20) / this.a2;\n sum += this.x2;\n }\n\n if (a >= this.a3) {\n a = (a * this.ONE_20) / this.a3;\n sum += this.x3;\n }\n\n if (a >= this.a4) {\n a = (a * this.ONE_20) / this.a4;\n sum += this.x4;\n }\n\n if (a >= this.a5) {\n a = (a * this.ONE_20) / this.a5;\n sum += this.x5;\n }\n\n if (a >= this.a6) {\n a = (a * this.ONE_20) / this.a6;\n sum += this.x6;\n }\n\n if (a >= this.a7) {\n a = (a * this.ONE_20) / this.a7;\n sum += this.x7;\n }\n\n if (a >= this.a8) {\n a = (a * this.ONE_20) / this.a8;\n sum += this.x8;\n }\n\n if (a >= this.a9) {\n a = (a * this.ONE_20) / this.a9;\n sum += this.x9;\n }\n\n if (a >= this.a10) {\n a = (a * this.ONE_20) / this.a10;\n sum += this.x10;\n }\n\n if (a >= this.a11) {\n a = (a * this.ONE_20) / this.a11;\n sum += this.x11;\n }\n\n // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\n // that converges rapidly for values of `a` close to one - the same one used in ln_36.\n // Let z = (a - 1) / (a + 1).\n // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\n\n // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\n // division by ONE_20.\n const z = ((a - this.ONE_20) * this.ONE_20) / (a + this.ONE_20);\n const z_squared = (z * z) / this.ONE_20;\n\n // num is the numerator of the series: the z^(2 * n + 1) term\n let num = z;\n\n // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\n let seriesSum = num;\n\n // In each step, the numerator is multiplied by z^2\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(3);\n\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(5);\n\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(7);\n\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(9);\n\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(11);\n\n // 6 Taylor terms are sufficient for 36 decimal precision.\n\n // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\n seriesSum *= BigInt(2);\n\n // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\n // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\n // value.\n\n return (sum + seriesSum) / BigInt(100);\n }\n}\n","import { parseFixed } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport { Pool } from '../../types';\nimport {\n SolidityMaths,\n _computeScalingFactor,\n _upscaleArray,\n} from '@/lib/utils/solidityMaths';\nimport { AssetHelpers } from '@/lib/utils/assetHelpers';\n\nexport const AMP_PRECISION = 3; // number of decimals -> precision 1000\n\ntype ParsedPoolInfo = {\n bptIndex: number;\n higherBalanceTokenIndex: number;\n ampWithPrecision: bigint;\n balancesEvm: bigint[];\n balancesEvmWithoutBpt: bigint[];\n priceRates: bigint[];\n priceRatesWithoutBpt: bigint[];\n swapFeeEvm: bigint;\n poolTokens: string[];\n poolTokensWithoutBpt: string[];\n weights: bigint[];\n scalingFactors: bigint[];\n scalingFactorsWithoutBpt: bigint[];\n scalingFactorsRaw: bigint[];\n scalingFactorsRawWithoutBpt: bigint[];\n upScaledBalances: bigint[];\n upScaledBalancesWithoutBpt: bigint[];\n totalSharesEvm: bigint;\n};\n\n/**\n * Parse pool info into EVM amounts. Sorts by token order if wrappedNativeAsset param passed.\n * @param pool Pool object to be parsed\n * @param wrappedNativeAsset e.g. wETH address\n * @param unwrapNativeAsset if true, changes wETH address to ETH address\n * @returns parsed pool info\n */\nexport const parsePoolInfo = (\n pool: Pool,\n wrappedNativeAsset?: string,\n unwrapNativeAsset?: boolean\n): ParsedPoolInfo => {\n let poolTokens = unwrapNativeAsset\n ? pool.tokens.map((token) =>\n token.address === wrappedNativeAsset ? AddressZero : token.address\n )\n : pool.tokens.map((token) => token.address);\n let decimals = pool.tokens.map((token) => {\n return token.decimals ?? 18;\n });\n let balancesEvm = pool.tokens.map((token) =>\n parseFixed(token.balance, token.decimals).toBigInt()\n );\n let weights = pool.tokens.map((token) => {\n return parseFixed(token.weight ?? '1', 18).toBigInt();\n });\n let priceRates = pool.tokens.map((token) => {\n return parseFixed(token.priceRate ?? '1', 18).toBigInt();\n });\n\n let scalingFactorsRaw = decimals.map((d) => _computeScalingFactor(BigInt(d)));\n let scalingFactors = scalingFactorsRaw.map((sf, i) =>\n SolidityMaths.mulDownFixed(sf, priceRates[i])\n );\n // This assumes token.balance is in human scale (e.g. from SG)\n let upScaledBalances = _upscaleArray(balancesEvm, scalingFactors);\n if (wrappedNativeAsset) {\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n [\n poolTokens,\n decimals,\n scalingFactors,\n scalingFactorsRaw,\n balancesEvm,\n upScaledBalances,\n weights,\n priceRates,\n ] = assetHelpers.sortTokens(\n poolTokens,\n decimals,\n scalingFactors,\n scalingFactorsRaw,\n balancesEvm,\n upScaledBalances,\n weights,\n priceRates\n ) as [\n string[],\n number[],\n bigint[],\n bigint[],\n bigint[],\n bigint[],\n bigint[],\n bigint[]\n ];\n }\n\n // Solidity maths uses precison method for amp that must be replicated\n const ampWithPrecision = parseFixed(\n pool.amp ?? '1',\n AMP_PRECISION\n ).toBigInt();\n\n const higherBalanceTokenIndex = upScaledBalances.indexOf(\n SolidityMaths.max(upScaledBalances)\n );\n\n const scalingFactorsWithoutBpt = [...scalingFactors];\n const scalingFactorsRawWithoutBpt = [...scalingFactorsRaw];\n const poolTokensWithoutBpt = [...poolTokens];\n const balancesEvmWithoutBpt = [...balancesEvm];\n const priceRatesWithoutBpt = [...priceRates];\n const upScaledBalancesWithoutBpt = [...upScaledBalances];\n\n const bptIndex = poolTokens.indexOf(pool.address);\n if (bptIndex !== -1) {\n scalingFactorsWithoutBpt.splice(bptIndex, 1);\n scalingFactorsRawWithoutBpt.splice(bptIndex, 1);\n poolTokensWithoutBpt.splice(bptIndex, 1);\n balancesEvmWithoutBpt.splice(bptIndex, 1);\n priceRatesWithoutBpt.splice(bptIndex, 1);\n upScaledBalancesWithoutBpt.splice(bptIndex, 1);\n }\n\n return {\n bptIndex,\n higherBalanceTokenIndex,\n ampWithPrecision,\n balancesEvm,\n balancesEvmWithoutBpt,\n priceRates,\n priceRatesWithoutBpt,\n swapFeeEvm: parseFixed(pool.swapFee, 18).toBigInt(),\n poolTokens,\n poolTokensWithoutBpt,\n weights,\n scalingFactors,\n scalingFactorsWithoutBpt,\n scalingFactorsRaw,\n scalingFactorsRawWithoutBpt,\n upScaledBalances,\n upScaledBalancesWithoutBpt,\n totalSharesEvm: parseFixed(pool.totalShares || '0', 18).toBigInt(),\n };\n};\n","import { Network } from '@/lib/constants/network';\n\n/**\n * TYPES\n */\ntype CommonTokens = {\n nativeAsset: string;\n wNativeAsset: string;\n WETH: string;\n BAL: string;\n bbaUSD?: string;\n bbaUSDv2?: string;\n};\n\ntype TokenConstants = {\n Popular: {\n Symbols: string[];\n };\n Addresses: CommonTokens;\n PriceChainMap?: Record;\n};\n\n/**\n * CONSTANTS\n */\nexport const DEFAULT_TOKEN_DECIMALS = 18;\n\nexport const TOKENS_MAINNET: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'AAVE', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n WETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n BAL: '0xba100000625a3754423978a60c9317c58a424e3d',\n bbaUSD: '0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2',\n bbaUSDv2: '0xA13a9247ea42D743238089903570127DdA72fE44',\n },\n};\n\nexport const TOKENS_POLYGON: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'AAVE', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',\n WETH: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619',\n BAL: '0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3',\n },\n};\n\nexport const TOKENS_ARBITRUM: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'AAVE', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',\n WETH: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',\n BAL: '0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8',\n },\n};\n\nexport const TOKENS_GNOSIS: TokenConstants = {\n Popular: {\n Symbols: ['xDAI', 'WXDAI', 'WETH', 'BAL'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0xe91d153e0b41518a2ce8dd3d7944fa863463a97d',\n WETH: '0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1',\n BAL: '0x7eF541E2a22058048904fE5744f9c7E4C57AF717',\n },\n};\nexport const TOKENS_GOERLI: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'USDT', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1',\n WETH: '0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1',\n BAL: '0xfA8449189744799aD2AcE7e0EBAC8BB7575eff47',\n bbaUSD: '0x13ACD41C585d7EbB4a9460f7C8f50BE60DC080Cd',\n },\n PriceChainMap: {\n /**\n * Addresses must be lower case and map from goerli to mainnet, e.g\n * [goerli address]: mainnet address\n */\n '0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1':\n '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n '0x37f03a12241e9fd3658ad6777d289c3fb8512bc9':\n '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',\n '0xfa8449189744799ad2ace7e0ebac8bb7575eff47':\n '0xba100000625a3754423978a60c9317c58a424e3d',\n '0xe0c9275e44ea80ef17579d33c55136b7da269aeb':\n '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n '0x8c9e6c40d3402480ace624730524facc5482798c':\n '0x6b175474e89094c44da98b954eedeac495271d0f',\n '0x1f1f156e0317167c11aa412e3d1435ea29dc3cce':\n '0xdac17f958d2ee523a2206206994597c13d831ec7',\n '0x4cb1892fddf14f772b2e39e299f44b2e5da90d04':\n '0x3ed3b47dd13ec9a98b44e6204a523e766b225811',\n '0x811151066392fd641fe74a9b55a712670572d161':\n '0xbcca60bb61934080951369a648fb03df4f96263c',\n '0x89534a24450081aa267c79b07411e9617d984052':\n '0x028171bca77440897b824ca71d1c56cac55b68a3',\n '0x829f35cebbcd47d3c120793c12f7a232c903138b':\n '0x956f47f50a910163d8bf957cf5846d573e7f87ca',\n '0xff386a3d08f80ac38c77930d173fa56c6286dc8b':\n '0x6810e776880c02933d47db1b9fc05908e5386b96',\n },\n};\n\nexport const TOKENS_GENERIC: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'AAVE', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n WETH: '0x0000000000000000000000000000000000000000',\n BAL: '0x0000000000000000000000000000000000000000',\n },\n};\n\nexport const TOKENS_MAP = {\n [Network.GOERLI]: TOKENS_GOERLI,\n [Network.MAINNET]: TOKENS_MAINNET,\n [Network.POLYGON]: TOKENS_POLYGON,\n [Network.ARBITRUM]: TOKENS_ARBITRUM,\n [Network.GNOSIS]: TOKENS_GNOSIS,\n};\n\nexport function TOKENS(networkId: Network): TokenConstants {\n const id = networkId as keyof typeof TOKENS_MAP;\n return TOKENS_MAP[id] ? TOKENS_MAP[id] : TOKENS_GENERIC;\n}\n","\"use strict\";\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\nconst LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\nimport { version } from \"./_version\";\nlet _globalLogger = null;\nfunction _checkNormalize() {\n try {\n const missing = [];\n // Make sure all forms of normalization are supported\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n }\n catch (error) {\n missing.push(form);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\");\n }\n }\n catch (error) {\n return error.message;\n }\n return null;\n}\nconst _normalizeError = _checkNormalize();\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[\"DEBUG\"] = \"DEBUG\";\n LogLevel[\"INFO\"] = \"INFO\";\n LogLevel[\"WARNING\"] = \"WARNING\";\n LogLevel[\"ERROR\"] = \"ERROR\";\n LogLevel[\"OFF\"] = \"OFF\";\n})(LogLevel || (LogLevel = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ///////////////////\n // Generic Errors\n // Unknown Error\n ErrorCode[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n // Not Implemented\n ErrorCode[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n // Unsupported Operation\n // - operation\n ErrorCode[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n // Network Error (i.e. Ethereum Network, such as an invalid chain ID)\n // - event (\"noNetwork\" is not re-thrown in provider.ready; otherwise thrown)\n ErrorCode[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n // Some sort of bad response from the server\n ErrorCode[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n // Timeout\n ErrorCode[\"TIMEOUT\"] = \"TIMEOUT\";\n ///////////////////\n // Operational Errors\n // Buffer Overrun\n ErrorCode[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n ErrorCode[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ///////////////////\n // Argument Errors\n // Missing new operator to an object\n // - name: The name of the class\n ErrorCode[\"MISSING_NEW\"] = \"MISSING_NEW\";\n // Invalid argument (e.g. value is incompatible with type) to a function:\n // - argument: The argument name that was invalid\n // - value: The value of the argument\n ErrorCode[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ///////////////////\n // Blockchain Errors\n // Call exception\n // - transaction: the transaction\n // - address?: the contract address\n // - args?: The arguments passed into the function\n // - method?: The Solidity method signature\n // - errorSignature?: The EIP848 error signature\n // - errorArgs?: The EIP848 error parameters\n // - reason: The reason (only for EIP848 \"Error(string)\")\n ErrorCode[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n ErrorCode[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n // Nonce has already been used\n // - transaction: the transaction attempted\n ErrorCode[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n ErrorCode[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n ErrorCode[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n // The transaction was replaced by one with a higher gas price\n // - reason: \"cancelled\", \"replaced\" or \"repriced\"\n // - cancelled: true if reason == \"cancelled\" or reason == \"replaced\")\n // - hash: original transaction hash\n // - replacement: the full TransactionsResponse for the replacement\n // - receipt: the receipt of the replacement\n ErrorCode[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ///////////////////\n // Interaction Errors\n // The user rejected the action, such as signing a message or sending\n // a transaction\n ErrorCode[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n})(ErrorCode || (ErrorCode = {}));\n;\nconst HEX = \"0123456789abcdef\";\nexport class Logger {\n constructor(version) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n _log(logLevel, args) {\n const level = logLevel.toLowerCase();\n if (LogLevels[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel > LogLevels[level]) {\n return;\n }\n console.log.apply(console, args);\n }\n debug(...args) {\n this._log(Logger.levels.DEBUG, args);\n }\n info(...args) {\n this._log(Logger.levels.INFO, args);\n }\n warn(...args) {\n this._log(Logger.levels.WARNING, args);\n }\n makeError(message, code, params) {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n try {\n if (value instanceof Uint8Array) {\n let hex = \"\";\n for (let i = 0; i < value.length; i++) {\n hex += HEX[value[i] >> 4];\n hex += HEX[value[i] & 0x0f];\n }\n messageDetails.push(key + \"=Uint8Array(0x\" + hex + \")\");\n }\n else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\n }\n catch (error) {\n messageDetails.push(key + \"=\" + JSON.stringify(params[key].toString()));\n }\n });\n messageDetails.push(`code=${code}`);\n messageDetails.push(`version=${this.version}`);\n const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https:/\\/links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n // @TODO: Any??\n const error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function (key) {\n error[key] = params[key];\n });\n return error;\n }\n throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\", form: _normalizeError\n });\n }\n }\n checkSafeUint53(value, message) {\n if (typeof (value) !== \"number\") {\n return;\n }\n if (message == null) {\n message = \"value not safe\";\n }\n if (value < 0 || value >= 0x1fffffffffffff) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value: value\n });\n }\n if (value % 1) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value: value\n });\n }\n }\n checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n }\n else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger.errors.UNEXPECTED_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n }\n checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n }\n else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n static globalLogger() {\n if (!_globalLogger) {\n _globalLogger = new Logger(version);\n }\n return _globalLogger;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n static setLogLevel(logLevel) {\n const level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n Logger.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n }\n static from(version) {\n return new Logger(version);\n }\n}\nLogger.errors = ErrorCode;\nLogger.levels = LogLevel;\n//# sourceMappingURL=index.js.map","export const version = \"logger/5.7.0\";\n//# sourceMappingURL=_version.js.map","export const version = \"units/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { formatFixed, parseFixed } from \"@ethersproject/bignumber\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nconst names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\",\n];\n// Some environments have issues with RegEx that contain back-tracking, so we cannot\n// use them.\nexport function commify(value) {\n const comps = String(value).split(\".\");\n if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === \".\" || value === \"-.\") {\n logger.throwArgumentError(\"invalid value\", \"value\", value);\n }\n // Make sure we have at least one whole digit (0 if none)\n let whole = comps[0];\n let negative = \"\";\n if (whole.substring(0, 1) === \"-\") {\n negative = \"-\";\n whole = whole.substring(1);\n }\n // Make sure we have at least 1 whole digit with no leading zeros\n while (whole.substring(0, 1) === \"0\") {\n whole = whole.substring(1);\n }\n if (whole === \"\") {\n whole = \"0\";\n }\n let suffix = \"\";\n if (comps.length === 2) {\n suffix = \".\" + (comps[1] || \"0\");\n }\n while (suffix.length > 2 && suffix[suffix.length - 1] === \"0\") {\n suffix = suffix.substring(0, suffix.length - 1);\n }\n const formatted = [];\n while (whole.length) {\n if (whole.length <= 3) {\n formatted.unshift(whole);\n break;\n }\n else {\n const index = whole.length - 3;\n formatted.unshift(whole.substring(index));\n whole = whole.substring(0, index);\n }\n }\n return negative + formatted.join(\",\") + suffix;\n}\nexport function formatUnits(value, unitName) {\n if (typeof (unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) {\n unitName = 3 * index;\n }\n }\n return formatFixed(value, (unitName != null) ? unitName : 18);\n}\nexport function parseUnits(value, unitName) {\n if (typeof (value) !== \"string\") {\n logger.throwArgumentError(\"value must be a string\", \"value\", value);\n }\n if (typeof (unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) {\n unitName = 3 * index;\n }\n }\n return parseFixed(value, (unitName != null) ? unitName : 18);\n}\nexport function formatEther(wei) {\n return formatUnits(wei, 18);\n}\nexport function parseEther(ether) {\n return parseUnits(ether, 18);\n}\n//# sourceMappingURL=index.js.map","import { Interface } from '@ethersproject/abi';\nimport { formatUnits } from '@ethersproject/units';\nimport { Multicall } from '@/contracts';\nimport { Network } from '@/types';\n\nexport const yieldTokens = {\n [Network.MAINNET]: {\n waUSDT: '0xf8fd466f12e236f4c96f7cce6c79eadb819abf58',\n waUSDC: '0xd093fa4fb80d09bb30817fdcd442d4d02ed3e5de',\n waDAI: '0x02d60b84491589974263d922d9cc7a3152618ef6',\n },\n [Network.POLYGON]: {\n wamDAI: '0xee029120c72b0607344f35b17cdd90025e647b00',\n wamUSDC: '0x221836a597948dce8f3568e044ff123108acc42a',\n wamUSDT: '0x19c60a251e525fa88cd6f3768416a8024e98fc19',\n },\n};\n\nexport const wrappedTokensMap = {\n [Network.MAINNET]: {\n // USDT\n [yieldTokens[Network.MAINNET].waUSDT]: {\n aToken: '0x3ed3b47dd13ec9a98b44e6204a523e766b225811',\n underlying: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n },\n // USDC\n [yieldTokens[Network.MAINNET].waUSDC]: {\n aToken: '0xbcca60bb61934080951369a648fb03df4f96263c',\n underlying: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n },\n // DAI\n [yieldTokens[Network.MAINNET].waDAI]: {\n aToken: '0x028171bca77440897b824ca71d1c56cac55b68a3',\n underlying: '0x6b175474e89094c44da98b954eedeac495271d0f',\n },\n },\n [Network.POLYGON]: {\n // USDT\n [yieldTokens[Network.POLYGON].wamUSDT]: {\n aToken: '0x60d55f02a771d515e077c9c2403a1ef324885cec',\n underlying: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f',\n },\n // USDC\n [yieldTokens[Network.POLYGON].wamUSDC]: {\n aToken: '0x1a13f4ca1d028320a707d99520abfefca3998b7f',\n underlying: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',\n },\n // DAI\n [yieldTokens[Network.POLYGON].wamDAI]: {\n aToken: '0x27f8d03b3a2196956ed754badc28d73be8830a6e',\n underlying: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063',\n },\n },\n};\n\nconst wrappedATokenInterface = new Interface([\n 'function rate() view returns (uint256)',\n]);\n\nexport interface IAaveRates {\n getRate: (address: string) => Promise;\n}\n\nexport class AaveRates implements IAaveRates {\n rates?: Promise<{ [wrappedATokenAddress: string]: number }>;\n\n constructor(private multicall: Multicall, private network: Network) {}\n\n private async fetch(\n network: Network.MAINNET | Network.POLYGON\n ): Promise<{ [wrappedATokenAddress: string]: number }> {\n console.time('Fetching aave rates');\n const addresses = Object.values(yieldTokens[network]);\n const payload = addresses.map((wrappedATokenAddress) => ({\n target: wrappedATokenAddress,\n callData: wrappedATokenInterface.encodeFunctionData('rate', []),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const rates = addresses.reduce((p: { [key: string]: number }, a, i) => {\n p[a] ||= res[i] == '0x' ? 0 : parseFloat(formatUnits(res[i], 27));\n return p;\n }, {});\n console.timeEnd('Fetching aave rates');\n\n return rates;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async getRate(wrappedAToken: string): Promise {\n //To prevent bricked linear pools from effecting this call\n /*if (this.network != Network.MAINNET && this.network != Network.POLYGON) {\n return 1;\n }\n if (!Object.values(yieldTokens[this.network]).includes(wrappedAToken)) {\n return 1;\n }\n if (!this.rates) {\n this.rates = this.fetch(this.network);\n }\n\n return (await this.rates)[wrappedAToken];*/\n\n return 1;\n }\n}\n","import { Token, TokenPrices, Network } from '@/types';\nimport { TOKENS } from '@/lib/constants/tokens';\nimport { wrappedTokensMap as aaveWrappedMap } from '@/modules/data/token-prices/aave-rates';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\n\nexport function tokensToTokenPrices(tokens: Token[]): TokenPrices {\n const tokenPrices: TokenPrices = {};\n tokens.forEach((token) => {\n if (token.price) {\n tokenPrices[token.address] = token.price;\n }\n });\n\n return tokenPrices;\n}\n\nexport function tokenAddressForPricing(\n address: string,\n chainId: Network\n): string {\n let a = address.toLowerCase();\n a = addressMapIn(a, chainId);\n a = unwrapToken(a, chainId);\n\n return a;\n}\n\n/**\n * Maps testnet tokens, eg: on Göreli to a mainnet one.\n * Used to get the pricing information on networks not supported by a price feed.\n *\n * @param address Address on a testnet network\n */\nexport const addressMapIn = (address: string, chainId: Network): string => {\n const addressMap = TOKENS(chainId).PriceChainMap;\n return (addressMap && addressMap[address.toLowerCase()]) || address;\n};\n\n/**\n * Finds an underlying token address for a wrapped one\n *\n * @param wrappedAddress\n * @param chainId\n * @returns underlying token address\n */\nexport const unwrapToken = (\n wrappedAddress: string,\n chainId: Network\n): string => {\n const lowercase = wrappedAddress.toLocaleLowerCase();\n\n const aaveChain = chainId as keyof typeof aaveWrappedMap;\n if (\n aaveWrappedMap[aaveChain] != undefined &&\n aaveWrappedMap[aaveChain] != null\n ) {\n // Double if to avoid skipping just to at after compile: Object.keys()?.includes\n if (Object.keys(aaveWrappedMap[aaveChain]).includes(lowercase)) {\n return aaveWrappedMap[aaveChain][\n lowercase as keyof (typeof aaveWrappedMap)[typeof aaveChain]\n ].aToken;\n } else {\n return lowercase;\n }\n } else {\n return lowercase;\n }\n};\n\n// filter native asset (e.g. ETH) amounts\nexport const getEthValue = (tokens: string[], amounts: string[]): BigNumber => {\n const values = amounts.filter((amount, i) => tokens[i] === AddressZero);\n return values[0] ? BigNumber.from(values[0]) : BigNumber.from(0);\n};\n","/* eslint-disable @typescript-eslint/no-empty-function */\n\n/**\n * Debouncer for different attributes requested over time, which need to be aggregated into a single resolving call\n *\n * Choosing deferred promise since we have setTimeout that returns a promise\n * Some reference for history buffs: https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns\n */\n\ninterface Promised {\n promise: Promise;\n resolve: (value: T) => void;\n reject: (reason: unknown) => void;\n}\n\nconst makePromise = (): Promised => {\n let resolve: (value: T) => void = () => {};\n let reject: (reason: unknown) => void = () => {};\n const promise = new Promise((res, rej) => {\n [resolve, reject] = [res, rej];\n });\n return { promise, reject, resolve };\n};\n\n/**\n * Aggregates attributes and exectutes a debounced call\n *\n * @param fn Function to debounce\n * @param wait Debouncing waiting time [ms]\n * @param limit Maximum number of attributes to execute in one promise\n * @returns Debouncer instance\n */\nexport class Debouncer {\n requestSets = []>[]; // new Set(); // collection of requested attributes\n promisedCalls: Promised[] = []; // When requesting a price we return a deferred promise\n promisedCount = 0; // New request coming when setTimeout is executing will make a new promise\n timeout?: ReturnType;\n debounceCancel = (): void => {}; // Allow to cancel mid-flight requests\n\n constructor(\n private fn: (attrs: A[]) => Promise,\n private wait = 200,\n private limit = 100\n ) {}\n\n fetch(attr?: A): Promise {\n this.requestSets[this.promisedCount] ||= new Set();\n\n // Accumulate attributes for debounced execution\n if (attr) {\n this.requestSets[this.promisedCount].add(attr);\n }\n\n // Execute immediately when limit is reached\n if (this.requestSets[this.promisedCount].size >= this.limit) {\n return this.execute(0);\n }\n\n // Return a running promise\n if (this.promisedCalls[this.promisedCount]) {\n return this.promisedCalls[this.promisedCount].promise;\n }\n\n // If no promise is running, start a new one\n return this.execute(this.wait);\n }\n\n execute(timeout = 0): Promise {\n // if no promise is running, start a new one\n if (!this.promisedCalls[this.promisedCount]) {\n this.promisedCalls[this.promisedCount] = makePromise();\n }\n\n const { promise, resolve, reject } = this.promisedCalls[this.promisedCount];\n\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n\n const call = () => {\n const requestAttrs = [...this.requestSets[this.promisedCount]];\n this.promisedCount++;\n this.fn(requestAttrs)\n .then((results) => {\n resolve(results);\n this.debounceCancel = () => {};\n })\n .catch((reason) => {\n if (\n reason.response &&\n reason.response.data &&\n reason.response.data.error\n ) {\n reason = reason.response.data.error;\n }\n reject(reason);\n });\n };\n\n if (timeout > 0) {\n this.timeout = setTimeout(call.bind(this), timeout);\n } else {\n call();\n }\n\n this.debounceCancel = () => {\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n reject('Cancelled');\n delete this.promisedCalls[this.promisedCount];\n };\n\n return promise;\n }\n}\n","import {\n BigNumber,\n BigNumberish,\n parseFixed as _parseFixed,\n formatFixed as _formatFixed,\n} from '@ethersproject/bignumber';\n\n/**\n * Scales a number up by 10 ^ decimals. Also ensures the returned value is an\n * integer, any additional decimals post scaling are removed.\n * @param value The value to be scaled up\n * @param decimals The total decimal places / order of magnitude to scale by\n * @returns The scaled value\n */\nexport function parseFixed(value: string, decimals?: BigNumberish): BigNumber {\n const valueWithTrimmedDecimals = new RegExp(`[0-9]+\\\\.?[0-9]{0,${decimals}}`);\n const result = value.match(valueWithTrimmedDecimals);\n let parsedValue = value;\n if (result) {\n parsedValue = result[0];\n }\n\n return _parseFixed(parsedValue, decimals);\n}\n\n/**\n * Scales a number down by 10 ^ decimals. Also ensures the returned value doesn't\n * have a .0 at the end, so integers are returned as integers.\n * @param value The value to be scaled down\n * @param decimals The total decimal places / order of magnitude to scale down by\n * @returns The scaled value\n */\nexport function formatFixed(\n value: BigNumberish,\n decimals: BigNumberish\n): string {\n const ethersFormat = _formatFixed(value, decimals);\n return ethersFormat.replace(/(.0$)/, '');\n}\n\nexport function parseToBigInt18(value: string): bigint {\n return parseFixed(value, 18).toBigInt();\n}\n\nexport function formatFromBigInt18(value: bigint): string {\n return _formatFixed(BigNumber.from(value), 18);\n}\n\n/**\n * Like parseEther but for numbers. Converts floating point to BigNumber using 18 decimals\n */\nexport const bn = (value: number): BigNumber => _parseFixed(`${value}`, 18);\n","import { BigNumber } from '@ethersproject/bignumber';\n\nconst bpsPerOne = BigNumber.from('10000'); // number of basis points in 100%\n\n/**\n * Multiplies input by slippage amount\n *\n * @param amount Input amount (not parsed)\n * @param slippage Slippage value in bps - i.e. 50 = 0.5%\n * @returns Result delta from multiplying amount and slippage\n */\nexport const mulSlippage = (\n amount: BigNumber,\n slippage: BigNumber\n): BigNumber => {\n const delta = amount.mul(slippage).div(bpsPerOne);\n return delta;\n};\n\n/**\n * Reduce input amount by slippage factor\n *\n * @param amount Input in EVM amounts\n * @param slippage Slippage value in bps - i.e. 50 = 0.5%\n * @returns Result amount subtracting slippage\n */\nexport const subSlippage = (\n amount: BigNumber,\n slippage: BigNumber\n): BigNumber => {\n const delta = mulSlippage(amount, slippage);\n return amount.sub(delta);\n};\n\n/**\n * Increase input amount by slippage factor\n *\n * @param amount Input in EVM amounts\n * @param slippage Slippage value in bps - i.e. 50 = 0.5%\n * @returns Result amount adding slippage\n */\nexport const addSlippage = (\n amount: BigNumber,\n slippage: BigNumber\n): BigNumber => {\n const delta = mulSlippage(amount, slippage);\n return amount.add(delta);\n};\n","import { Address, PoolType } from '@/types';\nimport { getAddress } from '@ethersproject/address';\nimport { Log, TransactionReceipt } from '@ethersproject/providers';\nimport { Interface, LogDescription } from '@ethersproject/abi';\nimport { Logger } from '@/lib/utils/logger';\n\nexport * from './assetHelpers';\nexport * from './errors';\nexport * from './permit';\nexport * from './poolHelper';\nexport * from './signatures';\nexport * from './tokens';\nexport * from './debouncer';\nexport * from './math';\nexport * from './slippageHelper';\n\nexport const isSameAddress = (address1: string, address2: string): boolean =>\n getAddress(address1) === getAddress(address2);\n\nexport function insert(arr: T[], index: number, newItem: T): T[] {\n if (index < 0 || index > arr.length) {\n return arr;\n }\n return [\n // part of the array before the specified index\n ...arr.slice(0, index),\n // inserted item\n newItem,\n // part of the array after the specified index\n ...arr.slice(index),\n ];\n}\n\n/**\n * Returns a new array with item on the specified index replaced by newItem\n * @param arr\n * @param index\n * @param newItem\n */\nexport function replace(arr: T[], index: number, newItem: T): T[] {\n if (index < 0 || index >= arr.length) {\n return arr;\n }\n return [\n // part of the array before the specified index\n ...arr.slice(0, index),\n // inserted item\n newItem,\n // part of the array after the specified index\n ...arr.slice(index + 1),\n ];\n}\n\n/**\n * Removes item from array at specified index and returns new array. (Does not mutate original)\n * @param arr Original array\n * @param index Index of item to be removed\n * @returns New array with item at index removed\n */\nexport function removeItem(arr: T[], index: number): T[] {\n const newArray = [...arr];\n if (index < 0 || index >= arr.length) {\n return newArray;\n }\n newArray.splice(index, 1);\n return newArray;\n}\n\n/**\n * REORDER ARRAYS USING A REFERENCE AND ORIGINAL ARRAY,\n * Example:\n * Input -> reference: [c,b,a], original: [a,b,c], others: [[1,2,3], [4,5,6]]\n * Sorts like -> [[c,b,a],[3,2,1],[6,5,4]]\n * Returns -> [6,5,4]\n * @param reference\n * @param original\n * @param others\n * @returns Sorted others\n */\nexport function reorderArrays(\n reference: T[],\n original: T[],\n ...others: unknown[][]\n): unknown[][] {\n if (\n reference.length !== original.length ||\n others.some((arr) => arr.length !== original.length)\n ) {\n throw new Error('Array length mismatch');\n }\n const indexesOfOriginal = reference.map((value) => original.indexOf(value));\n if (indexesOfOriginal.indexOf(-1) >= 0) {\n throw new Error('Invalid reference or original array');\n }\n const othersResorted: unknown[][] = [];\n indexesOfOriginal.forEach((indexOfOriginal, i) => {\n others.forEach((arr, arrIndex) => {\n if (!othersResorted[arrIndex]) {\n othersResorted[arrIndex] = [];\n }\n othersResorted[arrIndex][i] = arr[indexOfOriginal];\n });\n });\n return othersResorted;\n}\n\nexport function isLinearish(poolType: string): boolean {\n const supportedPoolTypes: string[] = Object.values(PoolType);\n if (poolType.includes('Linear') && supportedPoolTypes.includes(poolType))\n return true;\n else return false;\n}\n\nexport function truncateAddresses(addresses: string[]): string[] {\n return addresses.map((t) => `${t.slice(0, 6)}...${t.slice(38, 42)}`);\n}\n\nexport const findEventInReceiptLogs = ({\n receipt,\n to,\n contractInterface,\n logName,\n}: {\n receipt: TransactionReceipt;\n to: Address;\n contractInterface: Interface;\n logName: string;\n}): LogDescription => {\n const event = receipt.logs\n .filter((log: Log) => {\n return isSameAddress(log.address, to);\n })\n .map((log) => {\n try {\n return contractInterface.parseLog(log);\n } catch (error) {\n const logger = Logger.getInstance();\n logger.warn(error as string);\n return null;\n }\n })\n .find((parsedLog) => parsedLog?.name === logName);\n if (!event) {\n throw new Error('Event not found in logs');\n }\n return event;\n};\n\nexport const getRandomBytes32 = (): string => {\n const getRandomBytes8 = () => Math.random().toString(16).slice(2, 10);\n const randomBytes32 = Array(8).fill(null).map(getRandomBytes8).join('');\n return `0x${randomBytes32}`;\n};\n","import { GraphQLArgs, GraphQLArgsFormatter } from '../types';\n\nexport class BalancerAPIArgsFormatter implements GraphQLArgsFormatter {\n format(args: GraphQLArgs): GraphQLArgs {\n return args;\n }\n}\n","import { GraphQLArgs, GraphQLArgsFormatter, GraphQLFilter } from '../types';\n\nexport class SubgraphArgsFormatter implements GraphQLArgsFormatter {\n operatorMap: Record;\n\n constructor() {\n this.operatorMap = {\n gt: '_gt',\n lt: '_lt',\n eq: '',\n in: '_in',\n not_in: '_not_in',\n contains: '_contains',\n };\n }\n\n format(args: GraphQLArgs): GraphQLArgs {\n const whereQuery: Record = {};\n if (args.where) {\n Object.entries(args.where).forEach(([name, filter]) => {\n Object.entries(filter).forEach(([operator, value]) => {\n whereQuery[`${name}${this.operatorMap[operator]}`] = value;\n });\n });\n }\n\n return {\n ...args,\n ...{ where: whereQuery },\n };\n }\n}\n","import { mergeWith } from 'lodash';\nimport { GraphQLArgs, GraphQLArgsFormatter } from './types';\n\nexport * from './formatters';\n\nexport class GraphQLArgsBuilder {\n constructor(readonly args: GraphQLArgs) {}\n\n merge(other: GraphQLArgsBuilder): GraphQLArgsBuilder {\n const mergedArgs = mergeWith(\n this.args,\n other.args,\n (objValue: unknown, srcValue: unknown) => {\n if (Array.isArray(objValue)) {\n return objValue.concat(srcValue);\n }\n }\n );\n\n return new GraphQLArgsBuilder(mergedArgs);\n }\n\n format(formatter: GraphQLArgsFormatter): unknown {\n return formatter.format(this.args);\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n AaveLinearPool,\n AaveLinearPoolInterface,\n} from \"../AaveLinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct AaveLinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class AaveLinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): AaveLinearPoolInterface {\n return new utils.Interface(_abi) as AaveLinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): AaveLinearPool {\n return new Contract(address, _abi, signerOrProvider) as AaveLinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n AaveLinearPoolFactory,\n AaveLinearPoolFactoryInterface,\n} from \"../AaveLinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"AaveLinearPoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract AaveLinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class AaveLinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): AaveLinearPoolFactoryInterface {\n return new utils.Interface(_abi) as AaveLinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): AaveLinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as AaveLinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { AaveWrapping, AaveWrappingInterface } from \"../AaveWrapping\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approveVault\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStaticATokenLM\",\n name: \"staticToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"toUnderlying\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapAaveStaticToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStaticATokenLM\",\n name: \"staticToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"fromUnderlying\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapAaveDynamicToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n] as const;\n\nexport class AaveWrapping__factory {\n static readonly abi = _abi;\n static createInterface(): AaveWrappingInterface {\n return new utils.Interface(_abi) as AaveWrappingInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): AaveWrapping {\n return new Contract(address, _abi, signerOrProvider) as AaveWrapping;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { Authoriser, AuthoriserInterface } from \"../Authoriser\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"admin\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"previousAdminRole\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"newAdminRole\",\n type: \"bytes32\",\n },\n ],\n name: \"RoleAdminChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n ],\n name: \"RoleGranted\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n ],\n name: \"RoleRevoked\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DEFAULT_ADMIN_ROLE\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"actionId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n name: \"canPerform\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n ],\n name: \"getRoleAdmin\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\",\n },\n ],\n name: \"getRoleMember\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n ],\n name: \"getRoleMemberCount\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"grantRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"roles\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"grantRoles\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"roles\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"address[]\",\n name: \"accounts\",\n type: \"address[]\",\n },\n ],\n name: \"grantRolesToMany\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"hasRole\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"renounceRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"revokeRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"roles\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"revokeRoles\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"roles\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"address[]\",\n name: \"accounts\",\n type: \"address[]\",\n },\n ],\n name: \"revokeRolesFromMany\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class Authoriser__factory {\n static readonly abi = _abi;\n static createInterface(): AuthoriserInterface {\n return new utils.Interface(_abi) as AuthoriserInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): Authoriser {\n return new Contract(address, _abi, signerOrProvider) as Authoriser;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BalancerHelpers,\n BalancerHelpersInterface,\n} from \"../BalancerHelpers\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"_vault\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"minAmountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.ExitPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"maxAmountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.JoinPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"vault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class BalancerHelpers__factory {\n static readonly abi = _abi;\n static createInterface(): BalancerHelpersInterface {\n return new utils.Interface(_abi) as BalancerHelpersInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BalancerHelpers {\n return new Contract(address, _abi, signerOrProvider) as BalancerHelpers;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BalancerMinter,\n BalancerMinterInterface,\n} from \"../BalancerMinter\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IBalancerTokenAdmin\",\n name: \"tokenAdmin\",\n type: \"address\",\n },\n {\n internalType: \"contract IGaugeController\",\n name: \"gaugeController\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"minted\",\n type: \"uint256\",\n },\n ],\n name: \"Minted\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"approval\",\n type: \"bool\",\n },\n ],\n name: \"MinterApprovalSet\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"allowed_to_mint_for\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBalancerToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBalancerTokenAdmin\",\n outputs: [\n {\n internalType: \"contract IBalancerTokenAdmin\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getGaugeController\",\n outputs: [\n {\n internalType: \"contract IGaugeController\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"getMinterApproval\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n ],\n name: \"mint\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"mintFor\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n ],\n name: \"mintMany\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"mintManyFor\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"mint_for\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[8]\",\n name: \"gauges\",\n type: \"address[8]\",\n },\n ],\n name: \"mint_many\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n ],\n name: \"minted\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"approval\",\n type: \"bool\",\n },\n ],\n name: \"setMinterApproval\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"approval\",\n type: \"bool\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"setMinterApprovalWithSignature\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n ],\n name: \"toggle_approve_mint\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class BalancerMinter__factory {\n static readonly abi = _abi;\n static createInterface(): BalancerMinterInterface {\n return new utils.Interface(_abi) as BalancerMinterInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BalancerMinter {\n return new Contract(address, _abi, signerOrProvider) as BalancerMinter;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BalancerPoolDataQueries,\n BalancerPoolDataQueriesInterface,\n} from \"../BalancerPoolDataQueries\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"_vault\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getAmpForPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getInRecoveryModeForPools\",\n outputs: [\n {\n internalType: \"bool[]\",\n name: \"\",\n type: \"bool[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getIsPausedForPools\",\n outputs: [\n {\n internalType: \"bool[]\",\n name: \"\",\n type: \"bool[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getLinearTargetsForPools\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"\",\n type: \"uint256[][]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getNormalizedWeightsForPools\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"\",\n type: \"uint256[][]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"poolIds\",\n type: \"bytes32[]\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"loadTokenBalanceUpdatesAfterBlock\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadTotalSupply\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadSwapFees\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadLinearWrappedTokenRates\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadLinearTargets\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadNormalizedWeights\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadScalingFactors\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadAmps\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadRates\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n internalType: \"enum TotalSupplyType[]\",\n name: \"totalSupplyTypes\",\n type: \"uint8[]\",\n },\n {\n internalType: \"enum SwapFeeType[]\",\n name: \"swapFeeTypes\",\n type: \"uint8[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"linearPoolIdxs\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"weightedPoolIdxs\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"scalingFactorPoolIdxs\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"ampPoolIdxs\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"ratePoolIdxs\",\n type: \"uint256[]\",\n },\n ],\n internalType: \"struct PoolDataQueryConfig\",\n name: \"config\",\n type: \"tuple\",\n },\n ],\n name: \"getPoolData\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"balances\",\n type: \"uint256[][]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"totalSupplies\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"swapFees\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"linearWrappedTokenRates\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[][]\",\n name: \"linearTargets\",\n type: \"uint256[][]\",\n },\n {\n internalType: \"uint256[][]\",\n name: \"weights\",\n type: \"uint256[][]\",\n },\n {\n internalType: \"uint256[][]\",\n name: \"scalingFactors\",\n type: \"uint256[][]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amps\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"rates\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"ignoreIdxs\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"poolIds\",\n type: \"bytes32[]\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"loadInRecoveryMode\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadIsPaused\",\n type: \"bool\",\n },\n ],\n internalType: \"struct PoolStatusQueryConfig\",\n name: \"config\",\n type: \"tuple\",\n },\n ],\n name: \"getPoolStatus\",\n outputs: [\n {\n internalType: \"bool[]\",\n name: \"isPaused\",\n type: \"bool[]\",\n },\n {\n internalType: \"bool[]\",\n name: \"inRecoveryMode\",\n type: \"bool[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"poolIds\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n ],\n name: \"getPoolTokenBalancesWithUpdatesAfterBlock\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"\",\n type: \"uint256[][]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getRateForPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getScalingFactorsForPools\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"\",\n type: \"uint256[][]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n {\n internalType: \"enum SwapFeeType[]\",\n name: \"swapFeeTypes\",\n type: \"uint8[]\",\n },\n ],\n name: \"getSwapFeePercentageForPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n {\n internalType: \"enum TotalSupplyType[]\",\n name: \"totalSupplyTypes\",\n type: \"uint8[]\",\n },\n ],\n name: \"getTotalSupplyForPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getWrappedTokenRateForLinearPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"vault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class BalancerPoolDataQueries__factory {\n static readonly abi = _abi;\n static createInterface(): BalancerPoolDataQueriesInterface {\n return new utils.Interface(_abi) as BalancerPoolDataQueriesInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BalancerPoolDataQueries {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as BalancerPoolDataQueries;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BalancerRelayer,\n BalancerRelayerInterface,\n} from \"../BalancerRelayer\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"libraryAddress\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [],\n name: \"getLibrary\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes[]\",\n name: \"data\",\n type: \"bytes[]\",\n },\n ],\n name: \"multicall\",\n outputs: [\n {\n internalType: \"bytes[]\",\n name: \"results\",\n type: \"bytes[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n stateMutability: \"payable\",\n type: \"receive\",\n },\n] as const;\n\nexport class BalancerRelayer__factory {\n static readonly abi = _abi;\n static createInterface(): BalancerRelayerInterface {\n return new utils.Interface(_abi) as BalancerRelayerInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BalancerRelayer {\n return new Contract(address, _abi, signerOrProvider) as BalancerRelayer;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BatchRelayerLibrary,\n BatchRelayerLibraryInterface,\n} from \"../BatchRelayerLibrary\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wstETH\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerMinter\",\n name: \"minter\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approveVault\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"assetInIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"assetOutIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.BatchSwapStep[]\",\n name: \"swaps\",\n type: \"tuple[]\",\n },\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"int256[]\",\n name: \"limits\",\n type: \"int256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"key\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct VaultActions.OutputReference[]\",\n name: \"outputReferences\",\n type: \"tuple[]\",\n },\n ],\n name: \"batchSwap\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum VaultActions.PoolKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"minAmountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.ExitPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"key\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct VaultActions.OutputReference[]\",\n name: \"outputReferences\",\n type: \"tuple[]\",\n },\n ],\n name: \"exitPool\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStakingLiquidityGauge[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n ],\n name: \"gaugeClaimRewards\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStakingLiquidityGauge\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"gaugeDeposit\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"gaugeMint\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"approval\",\n type: \"bool\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"gaugeSetMinterApproval\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStakingLiquidityGauge\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"gaugeWithdraw\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getEntrypoint\",\n outputs: [\n {\n internalType: \"contract IBalancerRelayer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum VaultActions.PoolKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"maxAmountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.JoinPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"joinPool\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.UserBalanceOpKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"asset\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n ],\n internalType: \"struct IVault.UserBalanceOp[]\",\n name: \"ops\",\n type: \"tuple[]\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"manageUserBalance\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"ref\",\n type: \"uint256\",\n },\n ],\n name: \"peekChainedReferenceValue\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"relayer\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"authorisation\",\n type: \"bytes\",\n },\n ],\n name: \"setRelayerApproval\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"stakeETH\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"stakeETHAndWrap\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.SingleSwap\",\n name: \"singleSwap\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"limit\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"swap\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStaticATokenLM\",\n name: \"staticToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"toUnderlying\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapAaveStaticToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract ICToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapCompoundV2\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC4626\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapERC4626\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IEulerToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapEuler\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IGearboxDieselToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"dieselAmount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapGearbox\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IReaperTokenVault\",\n name: \"vaultToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapReaperVaultToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IShareToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapShareToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract ITetuSmartVault\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapTetu\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IUnbuttonToken\",\n name: \"wrapperToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapUnbuttonToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapWstETH\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IYearnTokenVault\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapYearn\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20Permit\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"vaultPermit\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20PermitDAI\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"holder\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"expiry\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"allowed\",\n type: \"bool\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"vaultPermitDAI\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStaticATokenLM\",\n name: \"staticToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"fromUnderlying\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapAaveDynamicToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract ICToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapCompoundV2\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC4626\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapERC4626\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IEulerToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"eulerProtocol\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapEuler\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IGearboxDieselToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"mainAmount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapGearbox\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IReaperTokenVault\",\n name: \"vaultToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapReaperVaultToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IShareToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapShareToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapStETH\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract ITetuSmartVault\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapTetu\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IUnbuttonToken\",\n name: \"wrapperToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"uAmount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapUnbuttonToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IYearnTokenVault\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapYearn\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n] as const;\n\nexport class BatchRelayerLibrary__factory {\n static readonly abi = _abi;\n static createInterface(): BatchRelayerLibraryInterface {\n return new utils.Interface(_abi) as BatchRelayerLibraryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BatchRelayerLibrary {\n return new Contract(address, _abi, signerOrProvider) as BatchRelayerLibrary;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ComposableStablePool,\n ComposableStablePoolInterface,\n} from \"../ComposableStablePool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"tokenRateCacheDurations\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bool[]\",\n name: \"exemptFromYieldProtocolFeeFlags\",\n type: \"bool[]\",\n },\n {\n internalType: \"uint256\",\n name: \"amplificationParameter\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n internalType: \"struct ComposableStablePool.NewPoolParams\",\n name: \"params\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"startValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"endValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"startTime\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"endTime\",\n type: \"uint256\",\n },\n ],\n name: \"AmpUpdateStarted\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"currentValue\",\n type: \"uint256\",\n },\n ],\n name: \"AmpUpdateStopped\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"feeType\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"protocolFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"ProtocolFeePercentageCacheUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenIndex\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"rate\",\n type: \"uint256\",\n },\n ],\n name: \"TokenRateCacheUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenIndex\",\n type: \"uint256\",\n },\n {\n indexed: true,\n internalType: \"contract IRateProvider\",\n name: \"provider\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"cacheDuration\",\n type: \"uint256\",\n },\n ],\n name: \"TokenRateProviderSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getActualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAmplificationParameter\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"isUpdating\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"precision\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastJoinExitData\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lastJoinExitAmplification\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"lastPostJoinExitInvariant\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMinimumBpt\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"feeType\",\n type: \"uint256\",\n },\n ],\n name: \"getProtocolFeePercentageCache\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolSwapFeeDelegation\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRateProviders\",\n outputs: [\n {\n internalType: \"contract IRateProvider[]\",\n name: \"\",\n type: \"address[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"getTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"getTokenRateCache\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"rate\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"oldRate\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"duration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"expires\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"isTokenExemptFromYieldProtocolFee\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"swapRequest\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"poolConfig\",\n type: \"bytes\",\n },\n ],\n name: \"setAssetManagerPoolConfig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"duration\",\n type: \"uint256\",\n },\n ],\n name: \"setTokenRateCacheDuration\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"rawEndValue\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"endTime\",\n type: \"uint256\",\n },\n ],\n name: \"startAmplificationParameterUpdate\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"stopAmplificationParameterUpdate\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"updateProtocolFeePercentageCache\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"updateTokenRateCache\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class ComposableStablePool__factory {\n static readonly abi = _abi;\n static createInterface(): ComposableStablePoolInterface {\n return new utils.Interface(_abi) as ComposableStablePoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ComposableStablePool {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as ComposableStablePool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ComposableStablePoolFactory,\n ComposableStablePoolFactoryInterface,\n} from \"../ComposableStablePoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"amplificationParameter\",\n type: \"uint256\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"tokenRateCacheDurations\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bool[]\",\n name: \"exemptFromYieldProtocolFeeFlags\",\n type: \"bool[]\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract ComposableStablePool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class ComposableStablePoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): ComposableStablePoolFactoryInterface {\n return new utils.Interface(_abi) as ComposableStablePoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ComposableStablePoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as ComposableStablePoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ConvergentCurvePool,\n ConvergentCurvePoolInterface,\n} from \"../ConvergentCurvePool\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"_underlying\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"_bond\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"_expiration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_unitSeconds\",\n type: \"uint256\",\n },\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"_percentFee\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_percentFeeGov\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"_governance\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"collectedBase\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"collectedBond\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"remainingBase\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"remainingBond\",\n type: \"uint256\",\n },\n ],\n name: \"FeeCollection\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"FEE_BOUND\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"bond\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"bondDecimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseApproval\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"expiration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"feesBond\",\n outputs: [\n {\n internalType: \"uint128\",\n name: \"\",\n type: \"uint128\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"feesUnderlying\",\n outputs: [\n {\n internalType: \"uint128\",\n name: \"\",\n type: \"uint128\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"governance\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"increaseApproval\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"currentBalances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFee\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"currentBalances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFee\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"swapRequest\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"currentBalanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"currentBalanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"percentFee\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"percentFeeGov\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amountX\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"reserveX\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"reserveY\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"out\",\n type: \"bool\",\n },\n ],\n name: \"solveTradeInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"underlying\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"underlyingDecimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unitSeconds\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class ConvergentCurvePool__factory {\n static readonly abi = _abi;\n static createInterface(): ConvergentCurvePoolInterface {\n return new utils.Interface(_abi) as ConvergentCurvePoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ConvergentCurvePool {\n return new Contract(address, _abi, signerOrProvider) as ConvergentCurvePool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { ERC20, ERC20Interface } from \"../ERC20\";\n\nconst _abi = [\n {\n constant: true,\n inputs: [],\n name: \"name\",\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_from\",\n type: \"address\",\n },\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n name: \"\",\n type: \"uint8\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n name: \"balance\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n },\n {\n name: \"_spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n payable: true,\n stateMutability: \"payable\",\n type: \"fallback\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n] as const;\n\nexport class ERC20__factory {\n static readonly abi = _abi;\n static createInterface(): ERC20Interface {\n return new utils.Interface(_abi) as ERC20Interface;\n }\n static connect(address: string, signerOrProvider: Signer | Provider): ERC20 {\n return new Contract(address, _abi, signerOrProvider) as ERC20;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ERC4626LinearPool,\n ERC4626LinearPoolInterface,\n} from \"../ERC4626LinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct ERC4626LinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class ERC4626LinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): ERC4626LinearPoolInterface {\n return new utils.Interface(_abi) as ERC4626LinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ERC4626LinearPool {\n return new Contract(address, _abi, signerOrProvider) as ERC4626LinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ERC4626LinearPoolFactory,\n ERC4626LinearPoolFactoryInterface,\n} from \"../ERC4626LinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"Erc4626LinearPoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract LinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class ERC4626LinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): ERC4626LinearPoolFactoryInterface {\n return new utils.Interface(_abi) as ERC4626LinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ERC4626LinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as ERC4626LinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n EulerLinearPool,\n EulerLinearPoolInterface,\n} from \"../EulerLinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct EulerLinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class EulerLinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): EulerLinearPoolInterface {\n return new utils.Interface(_abi) as EulerLinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): EulerLinearPool {\n return new Contract(address, _abi, signerOrProvider) as EulerLinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n EulerLinearPoolFactory,\n EulerLinearPoolFactoryInterface,\n} from \"../EulerLinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"_eulerProtocol\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"EulerLinearPoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract LinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"eulerProtocol\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class EulerLinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): EulerLinearPoolFactoryInterface {\n return new utils.Interface(_abi) as EulerLinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): EulerLinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as EulerLinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { FXPool, FXPoolInterface } from \"../FXPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"_assetsToRegister\",\n type: \"address[]\",\n },\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"_protocolPercentFee\",\n type: \"uint256\",\n },\n {\n internalType: \"string\",\n name: \"_name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"_symbol\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"numeraire\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"reserve\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"weight\",\n type: \"uint256\",\n },\n ],\n name: \"AssetIncluded\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"derivative\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"numeraire\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"reserve\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"assimilator\",\n type: \"address\",\n },\n ],\n name: \"AssimilatorIncluded\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"newCollector\",\n type: \"address\",\n },\n ],\n name: \"ChangeCollectorAddress\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"isEmergency\",\n type: \"bool\",\n },\n ],\n name: \"EmergencyAlarm\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lptAmountBurned\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"amountsWithdrawn\",\n type: \"uint256[]\",\n },\n ],\n name: \"EmergencyWithdraw\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"feesCollected\",\n type: \"uint256\",\n },\n ],\n name: \"FeesAccrued\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"feesCollected\",\n type: \"uint256\",\n },\n ],\n name: \"FeesCollected\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lptAmountBurned\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"amountsWithdrawn\",\n type: \"uint256[]\",\n },\n ],\n name: \"OnExitPool\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lptAmountMinted\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"amountsDeposited\",\n type: \"uint256[]\",\n },\n ],\n name: \"OnJoinPool\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\",\n },\n ],\n name: \"OwnershipTransferred\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"alpha\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"beta\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"delta\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"epsilon\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lambda\",\n type: \"uint256\",\n },\n ],\n name: \"ParametersSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"Paused\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"updater\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newProtocolPercentage\",\n type: \"uint256\",\n },\n ],\n name: \"ProtocolFeeShareUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"trader\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"origin\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"originAmount\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"targetAmount\",\n type: \"uint256\",\n },\n ],\n name: \"Trade\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"Unpaused\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_derivative\",\n type: \"address\",\n },\n ],\n name: \"assimilator\",\n outputs: [\n {\n internalType: \"address\",\n name: \"assimilator_\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"collectorAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"curve\",\n outputs: [\n {\n internalType: \"int128\",\n name: \"alpha\",\n type: \"int128\",\n },\n {\n internalType: \"int128\",\n name: \"beta\",\n type: \"int128\",\n },\n {\n internalType: \"int128\",\n name: \"delta\",\n type: \"int128\",\n },\n {\n internalType: \"int128\",\n name: \"epsilon\",\n type: \"int128\",\n },\n {\n internalType: \"int128\",\n name: \"lambda\",\n type: \"int128\",\n },\n {\n internalType: \"uint256\",\n name: \"cap\",\n type: \"uint256\",\n },\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"fxPoolAddress\",\n type: \"address\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n name: \"derivatives\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"emergency\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"_assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"_assetWeights\",\n type: \"uint256[]\",\n },\n ],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"liquidity\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"total_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"individual_\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n name: \"numeraires\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"swapRequest\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"paused\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"protocolPercentFee\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"renounceOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n name: \"reserves\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_cap\",\n type: \"uint256\",\n },\n ],\n name: \"setCap\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_collectorAddress\",\n type: \"address\",\n },\n ],\n name: \"setCollectorAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"_emergency\",\n type: \"bool\",\n },\n ],\n name: \"setEmergency\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_alpha\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_beta\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_feeAtHalt\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_epsilon\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_lambda\",\n type: \"uint256\",\n },\n ],\n name: \"setParams\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_protocolPercentFee\",\n type: \"uint256\",\n },\n ],\n name: \"setProtocolPercentFee\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalUnclaimedFeesInNumeraire\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\",\n },\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"totalDepositNumeraire\",\n type: \"uint256\",\n },\n ],\n name: \"viewDeposit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"viewParameters\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"alpha_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"beta_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"delta_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"epsilon_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"lambda_\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_curvesToBurn\",\n type: \"uint256\",\n },\n ],\n name: \"viewWithdraw\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class FXPool__factory {\n static readonly abi = _abi;\n static createInterface(): FXPoolInterface {\n return new utils.Interface(_abi) as FXPoolInterface;\n }\n static connect(address: string, signerOrProvider: Signer | Provider): FXPool {\n return new Contract(address, _abi, signerOrProvider) as FXPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n GaugeClaimHelper,\n GaugeClaimHelperInterface,\n} from \"../GaugeClaimHelper\";\n\nconst _abi = [\n {\n inputs: [],\n name: \"CLAIM_FREQUENCY\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IRewardsOnlyGauge\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"claimRewardsFromGauge\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IRewardsOnlyGauge[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"claimRewardsFromGauges\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IRewardsOnlyGauge\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"getPendingRewards\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class GaugeClaimHelper__factory {\n static readonly abi = _abi;\n static createInterface(): GaugeClaimHelperInterface {\n return new utils.Interface(_abi) as GaugeClaimHelperInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GaugeClaimHelper {\n return new Contract(address, _abi, signerOrProvider) as GaugeClaimHelper;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n GearboxLinearPool,\n GearboxLinearPoolInterface,\n} from \"../GearboxLinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct GearboxLinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class GearboxLinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): GearboxLinearPoolInterface {\n return new utils.Interface(_abi) as GearboxLinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GearboxLinearPool {\n return new Contract(address, _abi, signerOrProvider) as GearboxLinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n GearboxLinearPoolFactory,\n GearboxLinearPoolFactoryInterface,\n} from \"../GearboxLinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"GearboxLinearPoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract GearboxLinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class GearboxLinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): GearboxLinearPoolFactoryInterface {\n return new utils.Interface(_abi) as GearboxLinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GearboxLinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as GearboxLinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { GyroConfig, GyroConfigInterface } from \"../GyroConfig\";\n\nconst _abi = [\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"previousValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newValue\",\n type: \"uint256\",\n },\n ],\n name: \"ConfigChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"ConfigFrozen\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"ConfigUnset\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"newGovernor\",\n type: \"address\",\n },\n ],\n name: \"GovernorChangeRequested\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"oldGovernor\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"newGovernor\",\n type: \"address\",\n },\n ],\n name: \"GovernorChanged\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"acceptGovernance\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newGovernor\",\n type: \"address\",\n },\n ],\n name: \"changeGovernor\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"freeze\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"defaultValue\",\n type: \"address\",\n },\n ],\n name: \"getAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"getAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"getConfigMeta\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"getUint\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"governor\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"hasKey\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_governor\",\n type: \"address\",\n },\n ],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"listKeys\",\n outputs: [\n {\n internalType: \"bytes32[]\",\n name: \"\",\n type: \"bytes32[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pendingGovernor\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"newValue\",\n type: \"address\",\n },\n ],\n name: \"setAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"newValue\",\n type: \"uint256\",\n },\n ],\n name: \"setUint\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"unset\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class GyroConfig__factory {\n static readonly abi = _abi;\n static createInterface(): GyroConfigInterface {\n return new utils.Interface(_abi) as GyroConfigInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GyroConfig {\n return new Contract(address, _abi, signerOrProvider) as GyroConfig;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { LidoRelayer, LidoRelayerInterface } from \"../LidoRelayer\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IwstETH\",\n name: \"wstETH\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"assetInIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"assetOutIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.BatchSwapStep[]\",\n name: \"swaps\",\n type: \"tuple[]\",\n },\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"int256[]\",\n name: \"limits\",\n type: \"int256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n ],\n name: \"batchSwap\",\n outputs: [\n {\n internalType: \"int256[]\",\n name: \"swapAmounts\",\n type: \"int256[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"minAmountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.ExitPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"exitPool\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getStETH\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWstETH\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"maxAmountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.JoinPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"joinPool\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.SingleSwap\",\n name: \"singleSwap\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"limit\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n ],\n name: \"swap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"swapAmount\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n stateMutability: \"payable\",\n type: \"receive\",\n },\n] as const;\n\nexport class LidoRelayer__factory {\n static readonly abi = _abi;\n static createInterface(): LidoRelayerInterface {\n return new utils.Interface(_abi) as LidoRelayerInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): LidoRelayer {\n return new Contract(address, _abi, signerOrProvider) as LidoRelayer;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { LinearPool, LinearPoolInterface } from \"../LinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"poolConfig\",\n type: \"bytes\",\n },\n ],\n name: \"setAssetManagerPoolConfig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class LinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): LinearPoolInterface {\n return new utils.Interface(_abi) as LinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): LinearPool {\n return new Contract(address, _abi, signerOrProvider) as LinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n LiquidityGaugeV5,\n LiquidityGaugeV5Interface,\n} from \"../LiquidityGaugeV5\";\n\nconst _abi = [\n {\n name: \"Deposit\",\n inputs: [\n {\n name: \"provider\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Withdraw\",\n inputs: [\n {\n name: \"provider\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"UpdateLiquidityLimit\",\n inputs: [\n {\n name: \"user\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"original_balance\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"original_supply\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"working_balance\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"working_supply\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Transfer\",\n inputs: [\n {\n name: \"_from\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"_to\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"_value\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Approval\",\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"_spender\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"_value\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n inputs: [\n {\n name: \"minter\",\n type: \"address\",\n },\n {\n name: \"veBoostProxy\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_addr\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_claim_rewards\",\n type: \"bool\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_claim_rewards\",\n type: \"bool\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"claim_rewards\",\n inputs: [],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"claim_rewards\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"claim_rewards\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_receiver\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"transferFrom\",\n inputs: [\n {\n name: \"_from\",\n type: \"address\",\n },\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"transfer\",\n inputs: [\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"approve\",\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"permit\",\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n },\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_deadline\",\n type: \"uint256\",\n },\n {\n name: \"_v\",\n type: \"uint8\",\n },\n {\n name: \"_r\",\n type: \"bytes32\",\n },\n {\n name: \"_s\",\n type: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"increaseAllowance\",\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_added_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"decreaseAllowance\",\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_subtracted_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"user_checkpoint\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"set_rewards_receiver\",\n inputs: [\n {\n name: \"_receiver\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"kick\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit_reward_token\",\n inputs: [\n {\n name: \"_reward_token\",\n type: \"address\",\n },\n {\n name: \"_amount\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"add_reward\",\n inputs: [\n {\n name: \"_reward_token\",\n type: \"address\",\n },\n {\n name: \"_distributor\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"set_reward_distributor\",\n inputs: [\n {\n name: \"_reward_token\",\n type: \"address\",\n },\n {\n name: \"_distributor\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"set_killed\",\n inputs: [\n {\n name: \"_is_killed\",\n type: \"bool\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"claimed_reward\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_token\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"claimable_reward\",\n inputs: [\n {\n name: \"_user\",\n type: \"address\",\n },\n {\n name: \"_reward_token\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"claimable_reward_write\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_token\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"claimable_tokens\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_checkpoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"future_epoch_time\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"inflation_rate\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"decimals\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"version\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"allowance\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n },\n {\n name: \"spender\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"initialize\",\n inputs: [\n {\n name: \"_lp_token\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"balanceOf\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"totalSupply\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"name\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"symbol\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"DOMAIN_SEPARATOR\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"nonces\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"factory\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"lp_token\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"is_killed\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"reward_count\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"reward_data\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n components: [\n {\n name: \"token\",\n type: \"address\",\n },\n {\n name: \"distributor\",\n type: \"address\",\n },\n {\n name: \"period_finish\",\n type: \"uint256\",\n },\n {\n name: \"rate\",\n type: \"uint256\",\n },\n {\n name: \"last_update\",\n type: \"uint256\",\n },\n {\n name: \"integral\",\n type: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"rewards_receiver\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"reward_integral_for\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n {\n name: \"arg1\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"working_balances\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"working_supply\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_inv_supply_of\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_checkpoint_of\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_fraction\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"period\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"int128\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"reward_tokens\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"period_timestamp\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_inv_supply\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n] as const;\n\nexport class LiquidityGaugeV5__factory {\n static readonly abi = _abi;\n static createInterface(): LiquidityGaugeV5Interface {\n return new utils.Interface(_abi) as LiquidityGaugeV5Interface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): LiquidityGaugeV5 {\n return new Contract(address, _abi, signerOrProvider) as LiquidityGaugeV5;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { Multicall, MulticallInterface } from \"../Multicall\";\n\nconst _abi = [\n {\n constant: false,\n inputs: [\n {\n components: [\n {\n name: \"target\",\n type: \"address\",\n },\n {\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate\",\n outputs: [\n {\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n name: \"returnData\",\n type: \"bytes[]\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class Multicall__factory {\n static readonly abi = _abi;\n static createInterface(): MulticallInterface {\n return new utils.Interface(_abi) as MulticallInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): Multicall {\n return new Contract(address, _abi, signerOrProvider) as Multicall;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { Multicall3, Multicall3Interface } from \"../Multicall3\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes[]\",\n name: \"returnData\",\n type: \"bytes[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"allowFailure\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call3[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate3\",\n outputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"allowFailure\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call3Value[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate3Value\",\n outputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"blockAndAggregate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"blockHash\",\n type: \"bytes32\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBasefee\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"basefee\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n ],\n name: \"getBlockHash\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"blockHash\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBlockNumber\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getChainId\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"chainid\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockCoinbase\",\n outputs: [\n {\n internalType: \"address\",\n name: \"coinbase\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockDifficulty\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"difficulty\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockGasLimit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"gaslimit\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockTimestamp\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"timestamp\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"addr\",\n type: \"address\",\n },\n ],\n name: \"getEthBalance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"balance\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastBlockHash\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"blockHash\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"requireSuccess\",\n type: \"bool\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"tryAggregate\",\n outputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"requireSuccess\",\n type: \"bool\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"tryBlockAndAggregate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"blockHash\",\n type: \"bytes32\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n] as const;\n\nexport class Multicall3__factory {\n static readonly abi = _abi;\n static createInterface(): Multicall3Interface {\n return new utils.Interface(_abi) as Multicall3Interface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): Multicall3 {\n return new Contract(address, _abi, signerOrProvider) as Multicall3;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { StablePool, StablePoolInterface } from \"../StablePool\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"amplificationParameter\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"startValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"endValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"startTime\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"endTime\",\n type: \"uint256\",\n },\n ],\n name: \"AmpUpdateStarted\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"currentValue\",\n type: \"uint256\",\n },\n ],\n name: \"AmpUpdateStopped\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAmplificationParameter\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"isUpdating\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"precision\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"swapRequest\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"poolConfig\",\n type: \"bytes\",\n },\n ],\n name: \"setAssetManagerPoolConfig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"rawEndValue\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"endTime\",\n type: \"uint256\",\n },\n ],\n name: \"startAmplificationParameterUpdate\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"stopAmplificationParameterUpdate\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class StablePool__factory {\n static readonly abi = _abi;\n static createInterface(): StablePoolInterface {\n return new utils.Interface(_abi) as StablePoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): StablePool {\n return new Contract(address, _abi, signerOrProvider) as StablePool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n StaticATokenRateProvider,\n StaticATokenRateProviderInterface,\n} from \"../StaticATokenRateProvider\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IStaticAToken\",\n name: \"_waToken\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"waToken\",\n outputs: [\n {\n internalType: \"contract IStaticAToken\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class StaticATokenRateProvider__factory {\n static readonly abi = _abi;\n static createInterface(): StaticATokenRateProviderInterface {\n return new utils.Interface(_abi) as StaticATokenRateProviderInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): StaticATokenRateProvider {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as StaticATokenRateProvider;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { Vault, VaultInterface } from \"../Vault\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"authorizer\",\n type: \"address\",\n },\n {\n internalType: \"contract IWETH\",\n name: \"weth\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IAuthorizer\",\n name: \"newAuthorizer\",\n type: \"address\",\n },\n ],\n name: \"AuthorizerChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"ExternalBalanceTransfer\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IFlashLoanRecipient\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"feeAmount\",\n type: \"uint256\",\n },\n ],\n name: \"FlashLoan\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"int256\",\n name: \"delta\",\n type: \"int256\",\n },\n ],\n name: \"InternalBalanceChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"liquidityProvider\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n indexed: false,\n internalType: \"int256[]\",\n name: \"deltas\",\n type: \"int256[]\",\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"protocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n name: \"PoolBalanceChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"int256\",\n name: \"cashDelta\",\n type: \"int256\",\n },\n {\n indexed: false,\n internalType: \"int256\",\n name: \"managedDelta\",\n type: \"int256\",\n },\n ],\n name: \"PoolBalanceManaged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"poolAddress\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"enum IVault.PoolSpecialization\",\n name: \"specialization\",\n type: \"uint8\",\n },\n ],\n name: \"PoolRegistered\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"relayer\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\",\n },\n ],\n name: \"RelayerApprovalChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amountIn\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amountOut\",\n type: \"uint256\",\n },\n ],\n name: \"Swap\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n ],\n name: \"TokensDeregistered\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n indexed: false,\n internalType: \"address[]\",\n name: \"assetManagers\",\n type: \"address[]\",\n },\n ],\n name: \"TokensRegistered\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"WETH\",\n outputs: [\n {\n internalType: \"contract IWETH\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"assetInIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"assetOutIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.BatchSwapStep[]\",\n name: \"swaps\",\n type: \"tuple[]\",\n },\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"int256[]\",\n name: \"limits\",\n type: \"int256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n ],\n name: \"batchSwap\",\n outputs: [\n {\n internalType: \"int256[]\",\n name: \"assetDeltas\",\n type: \"int256[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n ],\n name: \"deregisterTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"minAmountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.ExitPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"exitPool\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IFlashLoanRecipient\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amounts\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"flashLoan\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n ],\n name: \"getInternalBalance\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n ],\n name: \"getPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"enum IVault.PoolSpecialization\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"getPoolTokenInfo\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"cash\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"managed\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n ],\n name: \"getPoolTokens\",\n outputs: [\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract ProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"relayer\",\n type: \"address\",\n },\n ],\n name: \"hasApprovedRelayer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"maxAmountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.JoinPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"joinPool\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.PoolBalanceOpKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct IVault.PoolBalanceOp[]\",\n name: \"ops\",\n type: \"tuple[]\",\n },\n ],\n name: \"managePoolBalance\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.UserBalanceOpKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"asset\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n ],\n internalType: \"struct IVault.UserBalanceOp[]\",\n name: \"ops\",\n type: \"tuple[]\",\n },\n ],\n name: \"manageUserBalance\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"assetInIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"assetOutIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.BatchSwapStep[]\",\n name: \"swaps\",\n type: \"tuple[]\",\n },\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n ],\n name: \"queryBatchSwap\",\n outputs: [\n {\n internalType: \"int256[]\",\n name: \"\",\n type: \"int256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.PoolSpecialization\",\n name: \"specialization\",\n type: \"uint8\",\n },\n ],\n name: \"registerPool\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"address[]\",\n name: \"assetManagers\",\n type: \"address[]\",\n },\n ],\n name: \"registerTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"newAuthorizer\",\n type: \"address\",\n },\n ],\n name: \"setAuthorizer\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"relayer\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\",\n },\n ],\n name: \"setRelayerApproval\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.SingleSwap\",\n name: \"singleSwap\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"limit\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n ],\n name: \"swap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"amountCalculated\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n stateMutability: \"payable\",\n type: \"receive\",\n },\n] as const;\n\nexport class Vault__factory {\n static readonly abi = _abi;\n static createInterface(): VaultInterface {\n return new utils.Interface(_abi) as VaultInterface;\n }\n static connect(address: string, signerOrProvider: Signer | Provider): Vault {\n return new Contract(address, _abi, signerOrProvider) as Vault;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { WeightedPool, WeightedPoolInterface } from \"../WeightedPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"normalizedWeights\",\n type: \"uint256[]\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"address[]\",\n name: \"assetManagers\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct WeightedPool.NewPoolParams\",\n name: \"params\",\n type: \"tuple\",\n },\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"feeType\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"protocolFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"ProtocolFeePercentageCacheUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getATHRateProduct\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getActualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastPostJoinExitInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getNormalizedWeights\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"feeType\",\n type: \"uint256\",\n },\n ],\n name: \"getProtocolFeePercentageCache\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolSwapFeeDelegation\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRateProviders\",\n outputs: [\n {\n internalType: \"contract IRateProvider[]\",\n name: \"\",\n type: \"address[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"poolConfig\",\n type: \"bytes\",\n },\n ],\n name: \"setAssetManagerPoolConfig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"updateProtocolFeePercentageCache\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class WeightedPool__factory {\n static readonly abi = _abi;\n static createInterface(): WeightedPoolInterface {\n return new utils.Interface(_abi) as WeightedPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): WeightedPool {\n return new Contract(address, _abi, signerOrProvider) as WeightedPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n WeightedPoolFactory,\n WeightedPoolFactoryInterface,\n} from \"../WeightedPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"normalizedWeights\",\n type: \"uint256[]\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class WeightedPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): WeightedPoolFactoryInterface {\n return new utils.Interface(_abi) as WeightedPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): WeightedPoolFactory {\n return new Contract(address, _abi, signerOrProvider) as WeightedPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n YearnLinearPool,\n YearnLinearPoolInterface,\n} from \"../YearnLinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct YearnLinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class YearnLinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): YearnLinearPoolInterface {\n return new utils.Interface(_abi) as YearnLinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): YearnLinearPool {\n return new Contract(address, _abi, signerOrProvider) as YearnLinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n YearnLinearPoolFactory,\n YearnLinearPoolFactoryInterface,\n} from \"../YearnLinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"YearnLinearPoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract LinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class YearnLinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): YearnLinearPoolFactoryInterface {\n return new utils.Interface(_abi) as YearnLinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): YearnLinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as YearnLinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { GyroEV2, GyroEV2Interface, GyroECLPPool } from \"../GyroEV2\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"token0\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"token1\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"oracleEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n internalType: \"struct ExtensibleWeightedPool2Tokens.NewPoolParams\",\n name: \"baseParams\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"int256\",\n name: \"alpha\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"beta\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"c\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"s\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"lambda\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Params\",\n name: \"eclpParams\",\n type: \"tuple\",\n },\n {\n components: [\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"tauAlpha\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"tauBeta\",\n type: \"tuple\",\n },\n {\n internalType: \"int256\",\n name: \"u\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"v\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"w\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"z\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"dSq\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.DerivedParams\",\n name: \"derivedEclpParams\",\n type: \"tuple\",\n },\n {\n internalType: \"address\",\n name: \"rateProvider0\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"rateProvider1\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"capManager\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"capEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint120\",\n name: \"perAddressCap\",\n type: \"uint120\",\n },\n {\n internalType: \"uint128\",\n name: \"globalCap\",\n type: \"uint128\",\n },\n ],\n internalType: \"struct ICappedLiquidity.CapParams\",\n name: \"capParams\",\n type: \"tuple\",\n },\n {\n internalType: \"address\",\n name: \"pauseManager\",\n type: \"address\",\n },\n ],\n internalType: \"struct GyroECLPPool.GyroParams\",\n name: \"params\",\n type: \"tuple\",\n },\n {\n internalType: \"address\",\n name: \"configAddress\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"capManager\",\n type: \"address\",\n },\n ],\n name: \"CapManagerUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"capEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint120\",\n name: \"perAddressCap\",\n type: \"uint120\",\n },\n {\n internalType: \"uint128\",\n name: \"globalCap\",\n type: \"uint128\",\n },\n ],\n indexed: false,\n internalType: \"struct ICappedLiquidity.CapParams\",\n name: \"params\",\n type: \"tuple\",\n },\n ],\n name: \"CapParamsUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"derivedParamsValidated\",\n type: \"bool\",\n },\n ],\n name: \"ECLPDerivedParamsValidated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paramsValidated\",\n type: \"bool\",\n },\n ],\n name: \"ECLPParamsValidated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"invariantAfterJoin\",\n type: \"uint256\",\n },\n ],\n name: \"InvariantAterInitializeJoin\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"oldInvariant\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newInvariant\",\n type: \"uint256\",\n },\n ],\n name: \"InvariantOldAndNew\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"OracleEnabledChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"oracleUpdatedIndex\",\n type: \"uint256\",\n },\n ],\n name: \"OracleIndexUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"oldPauseManager\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"newPauseManager\",\n type: \"address\",\n },\n ],\n name: \"PauseManagerChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"PausedLocally\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n indexed: false,\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"invariant\",\n type: \"tuple\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"SwapParams\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"UnpausedLocally\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_dSq\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsAlpha\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsBeta\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsC\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsLambda\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsS\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_tauAlphaX\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_tauAlphaY\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_tauBetaX\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_tauBetaY\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_u\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_v\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_w\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_z\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"capManager\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"capParams\",\n outputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"capEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint120\",\n name: \"perAddressCap\",\n type: \"uint120\",\n },\n {\n internalType: \"uint128\",\n name: \"globalCap\",\n type: \"uint128\",\n },\n ],\n internalType: \"struct ICappedLiquidity.CapParams\",\n name: \"\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_pauseManager\",\n type: \"address\",\n },\n ],\n name: \"changePauseManager\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"startIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"endIndex\",\n type: \"uint256\",\n },\n ],\n name: \"dirtyUninitializedOracleSamples\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableOracle\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getECLPParams\",\n outputs: [\n {\n components: [\n {\n internalType: \"int256\",\n name: \"alpha\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"beta\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"c\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"s\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"lambda\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Params\",\n name: \"params\",\n type: \"tuple\",\n },\n {\n components: [\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"tauAlpha\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"tauBeta\",\n type: \"tuple\",\n },\n {\n internalType: \"int256\",\n name: \"u\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"v\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"w\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"z\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"dSq\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.DerivedParams\",\n name: \"d\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLargestSafeQueryWindow\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IPriceOracle.Variable\",\n name: \"variable\",\n type: \"uint8\",\n },\n ],\n name: \"getLatest\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMiscData\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"logInvariant\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"logTotalSupply\",\n type: \"int256\",\n },\n {\n internalType: \"uint256\",\n name: \"oracleSampleCreationTimestamp\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"oracleIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"oracleEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getNormalizedWeights\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IPriceOracle.Variable\",\n name: \"variable\",\n type: \"uint8\",\n },\n {\n internalType: \"uint256\",\n name: \"ago\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct IPriceOracle.OracleAccumulatorQuery[]\",\n name: \"queries\",\n type: \"tuple[]\",\n },\n ],\n name: \"getPastAccumulators\",\n outputs: [\n {\n internalType: \"int256[]\",\n name: \"results\",\n type: \"int256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPrice\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"spotPrice\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\",\n },\n ],\n name: \"getSample\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"logPairPrice\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"accLogPairPrice\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"logBptPrice\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"accLogBptPrice\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"logInvariant\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"accLogInvariant\",\n type: \"int256\",\n },\n {\n internalType: \"uint256\",\n name: \"timestamp\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IPriceOracle.Variable\",\n name: \"variable\",\n type: \"uint8\",\n },\n {\n internalType: \"uint256\",\n name: \"secs\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"ago\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct IPriceOracle.OracleAverageQuery[]\",\n name: \"queries\",\n type: \"tuple[]\",\n },\n ],\n name: \"getTimeWeightedAverage\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"results\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTokenRates\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"rate0\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"rate1\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTotalSamples\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"gyroConfig\",\n outputs: [\n {\n internalType: \"contract IGyroConfig\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pauseManager\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"rateProvider0\",\n outputs: [\n {\n internalType: \"contract IRateProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"rateProvider1\",\n outputs: [\n {\n internalType: \"contract IRateProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_capManager\",\n type: \"address\",\n },\n ],\n name: \"setCapManager\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"capEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint120\",\n name: \"perAddressCap\",\n type: \"uint120\",\n },\n {\n internalType: \"uint128\",\n name: \"globalCap\",\n type: \"uint128\",\n },\n ],\n internalType: \"struct ICappedLiquidity.CapParams\",\n name: \"params\",\n type: \"tuple\",\n },\n ],\n name: \"setCapParams\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class GyroEV2__factory {\n static readonly abi = _abi;\n static createInterface(): GyroEV2Interface {\n return new utils.Interface(_abi) as GyroEV2Interface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GyroEV2 {\n return new Contract(address, _abi, signerOrProvider) as GyroEV2;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { VeBal, VeBalInterface } from \"../VeBal\";\n\nconst _abi = [\n {\n name: \"Deposit\",\n inputs: [\n {\n name: \"provider\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"locktime\",\n type: \"uint256\",\n indexed: true,\n },\n {\n name: \"type\",\n type: \"int128\",\n indexed: false,\n },\n {\n name: \"ts\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Withdraw\",\n inputs: [\n {\n name: \"provider\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"ts\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Supply\",\n inputs: [\n {\n name: \"prevSupply\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"supply\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n inputs: [\n {\n name: \"token_addr\",\n type: \"address\",\n },\n {\n name: \"_name\",\n type: \"string\",\n },\n {\n name: \"_symbol\",\n type: \"string\",\n },\n {\n name: \"_authorizer_adaptor\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"token\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"name\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"symbol\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"decimals\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"admin\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"commit_smart_wallet_checker\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"apply_smart_wallet_checker\",\n inputs: [],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"get_last_user_slope\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"int128\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"user_point_history__ts\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_idx\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"locked__end\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"checkpoint\",\n inputs: [],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit_for\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"create_lock\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_unlock_time\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"increase_amount\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"increase_unlock_time\",\n inputs: [\n {\n name: \"_unlock_time\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"withdraw\",\n inputs: [],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"balanceOf\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"balanceOf\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n {\n name: \"_t\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"balanceOfAt\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n {\n name: \"_block\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"totalSupply\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"totalSupply\",\n inputs: [\n {\n name: \"t\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"totalSupplyAt\",\n inputs: [\n {\n name: \"_block\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"supply\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"locked\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n components: [\n {\n name: \"amount\",\n type: \"int128\",\n },\n {\n name: \"end\",\n type: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"epoch\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"point_history\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n components: [\n {\n name: \"bias\",\n type: \"int128\",\n },\n {\n name: \"slope\",\n type: \"int128\",\n },\n {\n name: \"ts\",\n type: \"uint256\",\n },\n {\n name: \"blk\",\n type: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"user_point_history\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n {\n name: \"arg1\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n components: [\n {\n name: \"bias\",\n type: \"int128\",\n },\n {\n name: \"slope\",\n type: \"int128\",\n },\n {\n name: \"ts\",\n type: \"uint256\",\n },\n {\n name: \"blk\",\n type: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"user_point_epoch\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"slope_changes\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"int128\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"future_smart_wallet_checker\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"smart_wallet_checker\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n] as const;\n\nexport class VeBal__factory {\n static readonly abi = _abi;\n static createInterface(): VeBalInterface {\n return new utils.Interface(_abi) as VeBalInterface;\n }\n static connect(address: string, signerOrProvider: Signer | Provider): VeBal {\n return new Contract(address, _abi, signerOrProvider) as VeBal;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n VeDelegationProxy,\n VeDelegationProxyInterface,\n} from \"../VeDelegationProxy\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"votingEscrow\",\n type: \"address\",\n },\n {\n internalType: \"contract IVeDelegation\",\n name: \"delegation\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"newImplementation\",\n type: \"address\",\n },\n ],\n name: \"DelegationImplementationUpdated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"adjustedBalanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"adjusted_balance_of\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDelegationImplementation\",\n outputs: [\n {\n internalType: \"contract IVeDelegation\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVotingEscrow\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"killDelegation\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IVeDelegation\",\n name: \"delegation\",\n type: \"address\",\n },\n ],\n name: \"setDelegation\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class VeDelegationProxy__factory {\n static readonly abi = _abi;\n static createInterface(): VeDelegationProxyInterface {\n return new utils.Interface(_abi) as VeDelegationProxyInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): VeDelegationProxy {\n return new Contract(address, _abi, signerOrProvider) as VeDelegationProxy;\n }\n}\n","import { SwapInfo } from '@balancer-labs/sor';\nimport { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { Vault } from '@/contracts/Vault';\n\nexport interface TokenAmounts {\n [token: string]: string;\n}\n\nexport interface SwapsOptions {\n maxPools?: number;\n gasPrice?: string;\n deadline?: string;\n maxSlippage?: number;\n}\n\nexport enum SwapType {\n SwapExactIn,\n SwapExactOut,\n}\n\nexport type FundManagement = {\n sender: string;\n recipient: string;\n fromInternalBalance: boolean;\n toInternalBalance: boolean;\n};\n\nexport type SingleSwap = {\n poolId: string;\n kind: SwapType;\n assetIn: string;\n assetOut: string;\n amount: BigNumberish;\n userData: string;\n};\n\nexport type Swap = {\n request: SingleSwap;\n funds: FundManagement;\n limit: BigNumberish;\n deadline: BigNumberish;\n value?: BigNumberish;\n outputReference?: BigNumberish;\n};\n\nexport type BatchSwapStep = {\n poolId: string;\n assetInIndex: number;\n assetOutIndex: number;\n amount: string;\n userData: string;\n};\n\nexport type BatchSwap = {\n kind: SwapType;\n swaps: BatchSwapStep[];\n assets: string[];\n funds: FundManagement;\n limits: BigNumberish[];\n deadline: BigNumberish;\n value?: BigNumberish;\n outputReferences?: { index: BigNumberish; key: BigNumberish }[];\n};\n\nexport interface SwapInput {\n tokenIn: string;\n tokenOut: string;\n swapType: SwapType;\n amount: string;\n}\n\nexport interface QuerySimpleFlashSwapParameters {\n poolIds: string[];\n assets: BatchSwap['assets'];\n flashLoanAmount: string;\n vaultContract: Vault;\n}\n\nexport interface SimpleFlashSwapParameters {\n poolIds: string[];\n assets: BatchSwap['assets'];\n flashLoanAmount: string;\n walletAddress: string;\n}\n\nexport interface QuerySimpleFlashSwapResponse {\n profits: Record;\n isProfitable: boolean;\n}\n\nexport interface FindRouteParameters {\n tokenIn: string;\n tokenOut: string;\n amount: BigNumber;\n gasPrice: BigNumber;\n maxPools?: number;\n}\n\nexport interface BuildTransactionParameters {\n userAddress: string;\n recipient?: string;\n swapInfo: SwapInfo;\n kind: SwapType;\n deadline: string;\n maxSlippage: number;\n}\n\nexport interface SwapTransactionRequest {\n to: string;\n data: string;\n value?: BigNumber;\n}\n\nexport interface SwapAttributes {\n to: string;\n functionName: string;\n attributes: Swap | BatchSwap;\n data: string;\n value?: BigNumber;\n}\n","import { BigNumberish, BigNumber } from '@ethersproject/bignumber';\nimport { Zero, WeiPerEther } from '@ethersproject/constants';\n\nimport { SwapType } from './types';\nimport { isSameAddress } from '@/lib/utils';\n\n/**\n * Helper to create limits using a defined slippage amount.\n * @param tokensIn - Array of token in addresses.\n * @param tokensOut - Array of token out addresses.\n * @param swapType - Type of swap - SwapExactIn or SwapExactOut\n * @param deltas - An array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array.\n * @param assets - array contains the addresses of all assets involved in the swaps.\n * @param slippage - Slippage to be applied. i.e. 5%=50000000000000000.\n * @returns Returns an array (same length as assets) with limits applied for each asset.\n */\nexport function getLimitsForSlippage(\n tokensIn: string[],\n tokensOut: string[],\n swapType: SwapType,\n deltas: BigNumberish[],\n assets: string[],\n slippage: BigNumberish\n): BigNumberish[] {\n // Limits:\n // +ve means max to send\n // -ve mean min to receive\n // For a multihop the intermediate tokens should be 0\n const limits: BigNumber[] = new Array(assets.length).fill(Zero);\n\n assets.forEach((token, i) => {\n if (tokensIn.some((tokenIn) => isSameAddress(token, tokenIn))) {\n // For SwapExactOut slippage is on tokenIn, i.e. amtIn + slippage\n const slippageAmount = BigNumber.from(slippage).add(WeiPerEther);\n limits[i] =\n swapType === SwapType.SwapExactOut\n ? limits[i].add(\n BigNumber.from(deltas[i]).mul(slippageAmount).div(WeiPerEther)\n )\n : limits[i].add(deltas[i]);\n }\n\n if (tokensOut.some((tokenOut) => isSameAddress(token, tokenOut))) {\n // For SwapExactIn slippage is on tokenOut, i.e. amtOut - slippage\n const slippageAmount = WeiPerEther.sub(BigNumber.from(slippage));\n limits[i] =\n swapType === SwapType.SwapExactIn\n ? limits[i].add(\n BigNumber.from(deltas[i]).mul(slippageAmount).div(WeiPerEther)\n )\n : limits[i].add(deltas[i]);\n }\n });\n\n return limits;\n}\n","import { Network } from './network';\nimport { BalancerNetworkConfig } from '@/types';\nimport addressesByNetwork from './addresses.json';\n\nexport const balancerVault = '0xBA12222222228d8Ba445958a75a0704d566BF2C8';\n\n// Info fetched using npm package slot20\nexport const BPT_SLOT = 0;\nexport const BPT_DECIMALS = 18;\n\nexport const BALANCER_NETWORK_CONFIG: Record = {\n [Network.MAINNET]: {\n chainId: Network.MAINNET, //1\n addresses: {\n //Mainnet deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/mainnet.html\n contracts: {\n multicall: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441',\n poolDataQueries: '0xf5CDdF6feD9C589f1Be04899F48f9738531daD59',\n lidoRelayer: '0xdcdbf71A870cc60C6F9B621E28a7D3Ffd6Dd4965',\n veBal: '0xC128a9954e6c874eA3d62ce62B468bA073093F25',\n gaugeControllerCheckpointer:\n '0x8e5698dc4897dc12243c8642e77b4f21349db97c',\n veBalProxy: '0x6f5a2eE11E7a772AeB5114A20d0D7c0ff61EB8A0',\n gyroConfigProxy: '0xac89cc9d78bbad7eb3a02601b4d65daa1f908aa6',\n ...addressesByNetwork[Network.MAINNET].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.MAINNET].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.MAINNET].contracts.weth,\n bbaUsd: addressesByNetwork[Network.MAINNET].tokens.bb_a_usd,\n lbpRaisingTokens: [\n '0x6b175474e89094c44da98b954eedeac495271d0f', // DAI\n '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // USDC\n '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH\n ],\n stETH: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',\n wstETH: '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',\n veBal: '0xC128a9954e6c874eA3d62ce62B468bA073093F25',\n ...addressesByNetwork[Network.MAINNET].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'ethereum',\n },\n },\n pools: {\n wETHwstETH: {\n id: '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080',\n address: '0x32296969ef14eb0c6d29669c550d4a0449130230',\n },\n },\n poolsToIgnore: [\n '0xbd482ffb3e6e50dc1c437557c3bea2b68f3683ee0000000000000000000003c6', // a pool made by an external dev who was playing with a novel rate provider mechanism in production.\n '0x0afbd58beca09545e4fb67772faf3858e610bcd00000000000000000000004b9',\n '0xf22ff21e17157340575158ad7394e068048dd98b0000000000000000000004b8',\n '0xf71d0774b214c4cf51e33eb3d30ef98132e4dbaa00000000000000000000046e',\n ],\n sorConnectingTokens: [\n {\n symbol: 'wEth',\n address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n },\n {\n symbol: 'wstEth',\n address: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',\n },\n {\n symbol: 'DOLA',\n address: '0x865377367054516e17014CcdED1e7d814EDC9ce4',\n },\n {\n symbol: 'rEth',\n address: '0xae78736cd615f374d3085123a210448e74fc6393',\n },\n {\n symbol: 'ETHx',\n address: '0xa35b1b31ce002fbf2058d22f30f95d405200a15b',\n },\n ],\n sorTriPathMidPoolIds: [\n '0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112', // rETH/WETH\n ],\n },\n [Network.POLYGON]: {\n chainId: Network.POLYGON, //137\n addresses: {\n //Polygon deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/polygon.html\n contracts: {\n multicall: '0xa1B2b503959aedD81512C37e9dce48164ec6a94d',\n poolDataQueries: '0x84813aA3e079A665C0B80F944427eE83cBA63617',\n gaugeClaimHelper: '0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33',\n gyroConfigProxy: '0xfdc2e9e03f515804744a40d0f8d25c16e93fbe67',\n ...addressesByNetwork[Network.POLYGON].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.POLYGON].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.POLYGON].contracts.weth,\n lbpRaisingTokens: [\n '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063', // DAI\n '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', // USDC\n '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', // WMATIC\n ],\n ...addressesByNetwork[Network.POLYGON].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-prune-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-polygon',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/ianlapham/polygon-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: '',\n platformId: 'polygon-pos',\n },\n },\n pools: {},\n poolsToIgnore: [\n '0x600bd01b6526611079e12e1ff93aba7a3e34226f0000000000000000000009e4', // This pool has rateProviders with incorrect scaling\n '0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455', // Stable pool with Convergence issues\n ],\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',\n },\n {\n symbol: 'bbrz2',\n address: '0xe22483774bd8611be2ad2f4194078dac9159f4ba',\n }, // Joins Stables<>BRZ via https://app.balancer.fi/#/polygon/pool/0x4a0b73f0d13ff6d43e304a174697e3d5cfd310a400020000000000000000091c\n ],\n },\n [Network.ARBITRUM]: {\n chainId: Network.ARBITRUM, //42161\n //Arbitrum deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/arbitrum.html\n addresses: {\n contracts: {\n multicall: '0x269ff446d9892c9e19082564df3f5e8741e190a1',\n poolDataQueries: '0x7Ba29fE8E83dd6097A7298075C4AFfdBda3121cC',\n gaugeClaimHelper: '0xa0dabebaad1b243bbb243f933013d560819eb66f',\n gyroConfigProxy: '0x9b683ca24b0e013512e2566b68704dbe9677413c',\n ...addressesByNetwork[Network.ARBITRUM].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.ARBITRUM].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.ARBITRUM].contracts.weth,\n lbpRaisingTokens: [\n '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1', // DAI\n '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8', // USDC\n '0x82af49447d8a07e3bd95bd0d56f35241523fbab1', // WETH\n ],\n ...addressesByNetwork[Network.ARBITRUM].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-arbitrum-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-arbitrum',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/ianlapham/arbitrum-one-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'arbitrum-one',\n },\n },\n pools: {},\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',\n },\n ],\n sorTriPathMidPoolIds: [\n '0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158', // wstEth/USDC.e to open up auraBAL/USDC\n '0x0052688295413b32626d226a205b95cdb337de860002000000000000000003d1', // arb/USDC.e to open up aura/USDC\n '0xa1a8bf131571a2139feb79401aa4a2e9482df6270002000000000000000004b4', // wstEth/Stable4Pool\n ],\n },\n [Network.GOERLI]: {\n chainId: Network.GOERLI, //5\n //Goerli deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/goerli.html\n addresses: {\n contracts: {\n multicall: '0x77dCa2C955b15e9dE4dbBCf1246B4B85b651e50e',\n poolDataQueries: '0x6d3197d069F8F9f1Fe7e23665Bc64CB77ED8b089',\n veBal: '0x33A99Dcc4C85C014cf12626959111D5898bbCAbF',\n veBalProxy: '0xA1F107D1cD709514AE8A914eCB757E95f9cedB31',\n erc4626LinearPoolFactory: '0xba240c856498e2d7a70af4911aafae0d6b565a5b',\n aaveLinearPoolFactory: '0x76578ecf9a141296ec657847fb45b0585bcda3a6',\n ...addressesByNetwork[Network.GOERLI].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.GOERLI].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.GOERLI].contracts.weth,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-goerli-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-goerli',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/blocklytics/goerli-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'ethereum',\n },\n },\n pools: {},\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1',\n },\n ],\n },\n [Network.OPTIMISM]: {\n chainId: Network.OPTIMISM, //10\n // Optimism deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/optimism.html\n addresses: {\n contracts: {\n multicall: '0x2dc0e2aa608532da689e89e237df582b783e552c',\n poolDataQueries: '0x6B5dA774890Db7B7b96C6f44e6a4b0F657399E2e',\n gyroConfigProxy: '0x32acb44fc929339b9f16f0449525cc590d2a23f3',\n ...addressesByNetwork[Network.OPTIMISM].contracts,\n },\n tokens: {\n bal: '0xfe8b128ba8c78aabc59d4c64cee7ff28e9379921',\n wrappedNativeAsset: addressesByNetwork[Network.OPTIMISM].contracts.weth,\n lbpRaisingTokens: [\n '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1', // DAI\n '0x7f5c764cbc14f9669b88837ca1490cca17c31607', // USDC\n '0x4200000000000000000000000000000000000006', // WETH\n ],\n ...addressesByNetwork[Network.OPTIMISM].tokens,\n },\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'optimistic-ethereum',\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-optimism',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-optimism',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/lyra-finance/optimism-mainnet-blocks',\n },\n pools: {},\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x4200000000000000000000000000000000000006',\n },\n ],\n },\n [Network.GNOSIS]: {\n chainId: Network.GNOSIS, //100\n // Gnosis deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/gnosis.html\n addresses: {\n contracts: {\n multicall: '0xbb6fab6b627947dae0a75808250d8b2652952cb5',\n poolDataQueries: '0x3f170631ed9821Ca51A59D996aB095162438DC10',\n ...addressesByNetwork[Network.GNOSIS].contracts,\n },\n tokens: {\n wrappedNativeAsset: addressesByNetwork[Network.GNOSIS].contracts.weth,\n bal: addressesByNetwork[Network.GNOSIS].contracts.bal,\n ...addressesByNetwork[Network.GNOSIS].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gnosis-chain-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-gnosis-chain',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'xdai',\n platformId: 'xdai',\n },\n },\n averageBlockTime: 5,\n pools: {},\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d',\n },\n {\n symbol: 'wsEth',\n address: '0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6',\n },\n ],\n sorTriPathMidPoolIds: [\n '0xeb30c85cc528537f5350cf5684ce6a4538e13394000200000000000000000059', // 3POOL_BPT/wstETH\n '0x7644fa5d0ea14fcf3e813fdf93ca9544f8567655000000000000000000000066', // sBAL3\n ],\n },\n [Network.FANTOM]: {\n chainId: Network.FANTOM, //250\n //Fantom deployment addresses: https://docs.beets.fi/technicals/deployments\n addresses: {\n contracts: {\n vault: '0x20dd72Ed959b6147912C2e529F0a0C651c33c9ce',\n multicall: '0x66335d7ad8011f6aa3f48aadcb523b62b38ed961',\n poolDataQueries: '0xb132F1E145DcC085980C531e2dA81f2b84efc14F',\n gaugeClaimHelper: '0x0000000000000000000000000000000000000000', // no guages on fantom\n balancerRelayer: '0x419f7925b8c9e409b6ee8792242556fa210a7a09',\n balancerHelpers: '0xfE18C7C70b0a2c6541bEde0367124278BC345Dc8',\n weightedPoolFactory: '0x60467cb225092cE0c989361934311175f437Cf53',\n composableStablePoolFactory:\n '0x44814E3A603bb7F1198617995c5696C232F6e8Ed',\n yearnLinearPoolFactory: '0x1f73ae6ed391a2b1e84ff988a1bb5394b78a4a71',\n },\n tokens: {\n bal: '0xF24Bcf4d1e507740041C9cFd2DddB29585aDCe1e', //beets\n wrappedNativeAsset: '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83',\n lbpRaisingTokens: [\n '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83', // WFTM\n '0x04068DA6C83AFCFA0e13ba15A6696662335D5B75', // USDC\n '0x8D11eC38a3EB5E956B052f67Da8Bdc9bef8Abf3E', // DAI\n ],\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-v2-fantom',\n gaugesSubgraph: '', // no guages on fantom\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/beethovenxfi/fantom-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'ftm',\n platformId: 'fantom',\n },\n },\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [\n {\n symbol: 'wftm',\n address: '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83',\n },\n ],\n },\n [Network.SEPOLIA]: {\n chainId: Network.SEPOLIA, //11155111\n addresses: {\n contracts: {\n multicall: '0xcA11bde05977b3631167028862bE2a173976CA11',\n poolDataQueries: '0x9805dcfD25e6De36bad8fe9D3Fe2c9b44B764102',\n ...addressesByNetwork[Network.SEPOLIA].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.SEPOLIA].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.SEPOLIA].contracts.weth,\n ...addressesByNetwork[Network.SEPOLIA].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-sepolia-v2/version/latest',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'ethereum',\n },\n },\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [],\n },\n [Network.ZKEVM]: {\n chainId: Network.ZKEVM, //1101\n addresses: {\n contracts: {\n balancerMinter: '0x475D18169BE8a89357A9ee3Ab00ca386d20fA229',\n multicall: '0xcA11bde05977b3631167028862bE2a173976CA11',\n poolDataQueries: '0xF24917fB88261a37Cc57F686eBC831a5c0B9fD39',\n ...addressesByNetwork[Network.ZKEVM].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.ZKEVM].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.ZKEVM].contracts.weth,\n ...addressesByNetwork[Network.ZKEVM].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-polygon-zk-v2/version/latest',\n gaugesSubgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-gauges-polygon-zk/version/latest',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'polygon-zkevm',\n },\n },\n averageBlockTime: 4,\n multicallBatchSize: 128,\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9',\n },\n {\n symbol: 'wsEth',\n address: '0x5D8cfF95D7A57c0BF50B30b43c7CC0D52825D4a9',\n },\n ],\n },\n [Network.AVALANCHE]: {\n chainId: Network.AVALANCHE, //43114\n addresses: {\n contracts: {\n balancerMinter: '0xEa924b45a3fcDAAdf4E5cFB1665823B8F8F2039B',\n multicall: '0xcA11bde05977b3631167028862bE2a173976CA11',\n poolDataQueries: '0x67af5D428d38C5176a286a2371Df691cDD914Fb8',\n ...addressesByNetwork[Network.AVALANCHE].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.AVALANCHE].contracts.bal,\n wrappedNativeAsset:\n addressesByNetwork[Network.AVALANCHE].contracts.weth,\n ...addressesByNetwork[Network.AVALANCHE].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-avalanche-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-avalanche',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/iliaazhel/avalanche-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'avalanche-2',\n platformId: 'avalanche',\n },\n },\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [\n {\n symbol: 'WAVAX',\n address: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7',\n },\n {\n symbol: 'sAVAX',\n address: '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be',\n },\n ],\n },\n [Network.BASE]: {\n chainId: Network.BASE, //8453\n addresses: {\n contracts: {\n balancerMinter: '0xc7E5ED1054A24Ef31D827E6F86caA58B3Bc168d7',\n multicall: '0xcA11bde05977b3631167028862bE2a173976CA11',\n poolDataQueries: '',\n ...addressesByNetwork[Network.BASE].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.BASE].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.BASE].contracts.weth,\n ...addressesByNetwork[Network.BASE].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-base-v2/version/latest',\n gaugesSubgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-gauges-base/version/latest',\n blockNumberSubgraph:\n 'https://api.studio.thegraph.com/query/48427/bleu-base-blocks/version/latest',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'base',\n },\n },\n averageBlockTime: 2,\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x4200000000000000000000000000000000000006',\n },\n ],\n sorTriPathMidPoolIds: [\n '0x2db50a0e0310723ef0c2a165cb9a9f80d772ba2f00020000000000000000000d', // weth/staBal\n ],\n },\n};\n\nexport const networkAddresses = (\n chainId: number\n): BalancerNetworkConfig['addresses'] =>\n BALANCER_NETWORK_CONFIG[chainId as Network].addresses;\n","export enum BalancerErrorCode {\n ABOVE_MAX_TOKENS = 'ABOVE_MAX_TOKENS',\n BELOW_MIN_TOKENS = 'BELOW_MIN_TOKENS',\n EXIT_DELTA_AMOUNTS = 'EXIT_DELTA_AMOUNTS',\n FEE_PROVIDER_NOT_PROVIDED = 'FEE_PROVIDER_NOT_PROVIDED',\n GAUGES_HELPER_ADDRESS_NOT_PROVIDED = 'GAUGES_HELPER_ADDRESS_NOT_PROVIDED',\n GAUGES_NOT_FOUND = 'GAUGES_NOT_FOUND',\n GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED = 'GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED',\n GAUGES_REWARD_TOKEN_EMPTY = 'GAUGES_REWARD_TOKEN_EMPTY',\n ILLEGAL_PARAMETER = 'ILLEGAL_PARAMETER',\n INTERNAL_ERROR_INVALID_ABI = 'INTERNAL_ERROR_INVALID_ABI',\n INPUT_LENGTH_MISMATCH = 'INPUT_LENGTH_MISMATCH',\n INPUT_OUT_OF_BOUNDS = 'INPUT_OUT_OF_BOUNDS',\n INPUT_TOKEN_INVALID = 'INPUT_TOKEN_INVALID',\n INVALID_PROTOCOL_ID = 'INVALID_PROTOCOL_ID',\n INVALID_SWAP_FEE_PERCENTAGE = 'INVALID_SWAP_FEE_PERCENTAGE',\n INVALID_WEIGHTS = 'INVALID_WEIGHTS',\n JOIN_DELTA_AMOUNTS = 'JOIN_DELTA_AMOUNTS',\n JOIN_WITH_ZERO_AMOUNT = 'JOIN_WITH_ZERO_AMOUNT',\n MISSING_AMP = 'MISSING_AMP',\n MISSING_DECIMALS = 'MISSING_DECIMALS',\n MISSING_PRICE_RATE = 'MISSING_PRICE_RATE',\n MISSING_TOKENS = 'MISSING_TOKENS',\n MISSING_WEIGHT = 'MISSING_WEIGHT',\n NO_POOL_DATA = 'NO_POOL_DATA',\n NO_VALUE_PARAMETER = 'NO_VALUE_PARAMETER',\n POOL_DOESNT_EXIST = 'POOL_DOESNT_EXIST',\n QUERY_BATCH_SWAP = 'QUERY_BATCH_SWAP',\n RELAY_SWAP_AMOUNTS = 'RELAY_SWAP_AMOUNTS',\n REWARD_TOKEN_ZERO = 'REWARD_TOKEN_ZERO',\n TIMESTAMP_IN_THE_FUTURE = 'TIMESTAMP_IN_THE_FUTURE',\n TOKEN_MISMATCH = 'TOKEN_MISMATCH',\n UNSUPPORTED_PAIR = 'UNSUPPORTED_PAIR',\n UNSUPPORTED_POOL_TYPE = 'UNSUPPORTED_POOL_TYPE',\n UNSUPPORTED_POOL_TYPE_VERSION = 'UNSUPPORTED_POOL_TYPE_VERSION',\n}\n\nexport class BalancerError extends Error {\n constructor(public code: BalancerErrorCode) {\n super(BalancerError.getMessage(code));\n this.name = 'BalancerError';\n }\n\n static getMessage(code: BalancerErrorCode): string {\n switch (code) {\n case BalancerErrorCode.ABOVE_MAX_TOKENS:\n return 'the array contains more tokens than the maximum allowed';\n case BalancerErrorCode.BELOW_MIN_TOKENS:\n return 'the array does not contain the minimum quantity of tokens';\n case BalancerErrorCode.EXIT_DELTA_AMOUNTS:\n return 'Error when checking exit call deltas';\n case BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED:\n return 'Fee Provider Repository has not been provided';\n case BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED:\n return 'Liquidity Gauges Helper Contract address has not been provided';\n case BalancerErrorCode.GAUGES_NOT_FOUND:\n return 'Liquidity Gauges not found with given addresses';\n case BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED:\n return 'Liquidity Gauges Reward Minter Contract address has not been provided';\n case BalancerErrorCode.GAUGES_REWARD_TOKEN_EMPTY:\n return 'No Reward Tokens for Liquidity Gauges provided';\n case BalancerErrorCode.INPUT_LENGTH_MISMATCH:\n return 'input length mismatch';\n case BalancerErrorCode.INPUT_OUT_OF_BOUNDS:\n return 'input out of bounds';\n case BalancerErrorCode.INPUT_TOKEN_INVALID:\n return 'input token invalid';\n case BalancerErrorCode.INVALID_PROTOCOL_ID:\n return 'The provided protocol id does not correspond to a protocol';\n case BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE:\n return 'The swap fee needs to be greater than zero and less than 1e17(10%)';\n case BalancerErrorCode.INVALID_WEIGHTS:\n return 'The sum of the weights needs to be equal to 1e18(100%)';\n case BalancerErrorCode.JOIN_DELTA_AMOUNTS:\n return 'Error when checking join call deltas';\n case BalancerErrorCode.JOIN_WITH_ZERO_AMOUNT:\n return 'Cant join pool with 0 amount of token in';\n case BalancerErrorCode.MISSING_AMP:\n return 'missing amp';\n case BalancerErrorCode.MISSING_DECIMALS:\n return 'missing decimals';\n case BalancerErrorCode.MISSING_PRICE_RATE:\n return 'missing price rate';\n case BalancerErrorCode.MISSING_TOKENS:\n return 'missing tokens';\n case BalancerErrorCode.MISSING_WEIGHT:\n return 'missing weight';\n case BalancerErrorCode.NO_POOL_DATA:\n return 'no pool data';\n case BalancerErrorCode.NO_VALUE_PARAMETER:\n return 'Illegal value passed as parameter';\n case BalancerErrorCode.POOL_DOESNT_EXIST:\n return 'balancer pool does not exist';\n case BalancerErrorCode.RELAY_SWAP_AMOUNTS:\n return 'Error when checking swap amounts';\n case BalancerErrorCode.REWARD_TOKEN_ZERO:\n return 'All Zero Values for Reward Tokens';\n case BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE:\n return 'Timestamp cannot be in the future';\n case BalancerErrorCode.TOKEN_MISMATCH:\n return 'token mismatch';\n case BalancerErrorCode.UNSUPPORTED_PAIR:\n return 'unsupported token pair';\n case BalancerErrorCode.UNSUPPORTED_POOL_TYPE:\n return 'unsupported pool type';\n default:\n return 'Unknown error';\n }\n }\n}\n","import { ONE, SolidityMaths } from '@/lib/utils/solidityMaths';\n\nexport function calcPriceImpact(\n bptAmount: bigint,\n bptZeroPriceImpact: bigint,\n isJoin: boolean\n): bigint {\n if (isJoin) return calcPriceImpactJoin(bptAmount, bptZeroPriceImpact);\n else return calcPriceImpactExit(bptAmount, bptZeroPriceImpact);\n}\n\nfunction calcPriceImpactJoin(\n bptAmount: bigint,\n bptZeroPriceImpact: bigint\n): bigint {\n // 1 - (bptAmount/bptZeroPI)\n const pi = ONE - SolidityMaths.divDownFixed(bptAmount, bptZeroPriceImpact);\n return pi < 0 ? BigInt(0) : pi;\n}\nfunction calcPriceImpactExit(\n bptAmount: bigint,\n bptZeroPriceImpact: bigint\n): bigint {\n // (bptAmount/bptZeroPI) - 1\n const pi = SolidityMaths.divDownFixed(bptAmount, bptZeroPriceImpact) - ONE;\n return pi < 0 ? BigInt(0) : pi;\n}\n","import { BZERO, SolidityMaths } from './solidityMaths';\n\nconst AMP_PRECISION = BigInt(1e3);\n\nexport function bptSpotPrice(\n amp: bigint,\n balances: bigint[],\n bptSupply: bigint,\n tokenIndexIn: number\n): bigint {\n const totalCoins = balances.length;\n const D = _calculateInvariant(amp, balances, true);\n let S = BZERO;\n let D_P = D / BigInt(totalCoins);\n for (let i = 0; i < totalCoins; i++) {\n if (i != tokenIndexIn) {\n S = S + balances[i];\n D_P = (D_P * D) / (BigInt(totalCoins) * balances[i]);\n }\n }\n const x = balances[tokenIndexIn];\n const alpha = amp * BigInt(totalCoins);\n const beta = alpha * S; // units: 10 ** 21\n const gamma = BigInt(AMP_PRECISION) - alpha;\n const partial_x = BigInt(2) * alpha * x + beta + gamma * D;\n const minus_partial_D =\n D_P * BigInt(totalCoins + 1) * AMP_PRECISION - gamma * x;\n const ans = SolidityMaths.divUpFixed(\n (partial_x * bptSupply) / minus_partial_D,\n D\n );\n return ans;\n}\n\nfunction _calculateInvariant(\n amp: bigint,\n balances: bigint[],\n roundUp: boolean\n): bigint {\n /**********************************************************************************************\n // invariant //\n // D = invariant D^(n+1) //\n // A = amplification coefficient A n^n S + D = A D n^n + ----------- //\n // S = sum of balances n^n P //\n // P = product of balances //\n // n = number of tokens //\n *********x************************************************************************************/\n\n // We support rounding up or down.\n\n let sum = BZERO;\n const numTokens = balances.length;\n for (let i = 0; i < numTokens; i++) {\n sum = sum + balances[i];\n }\n if (sum == BZERO) {\n return BZERO;\n }\n\n let prevInvariant = BZERO;\n let invariant = sum;\n const ampTimesTotal = amp * BigInt(numTokens);\n\n for (let i = 0; i < 255; i++) {\n let P_D = balances[0] * BigInt(numTokens);\n for (let j = 1; j < numTokens; j++) {\n P_D = SolidityMaths.div(\n SolidityMaths.mul(\n SolidityMaths.mul(P_D, balances[j]),\n BigInt(numTokens)\n ),\n invariant,\n roundUp\n );\n }\n prevInvariant = invariant;\n invariant = SolidityMaths.div(\n SolidityMaths.mul(\n SolidityMaths.mul(BigInt(numTokens), invariant),\n invariant\n ) +\n SolidityMaths.div(\n SolidityMaths.mul(SolidityMaths.mul(ampTimesTotal, sum), P_D),\n AMP_PRECISION,\n roundUp\n ),\n SolidityMaths.mul(BigInt(numTokens + 1), invariant) +\n // No need to use checked arithmetic for the amp precision, the amp is guaranteed to be at least 1\n SolidityMaths.div(\n SolidityMaths.mul(ampTimesTotal - AMP_PRECISION, P_D),\n AMP_PRECISION,\n !roundUp\n ),\n roundUp\n );\n\n if (invariant > prevInvariant) {\n if (invariant - prevInvariant <= 1) {\n return invariant;\n }\n } else if (prevInvariant - invariant <= 1) {\n return invariant;\n }\n }\n\n throw new Error('Errors.STABLE_INVARIANT_DIDNT_CONVERGE');\n}\n","import { PriceImpactConcern } from '@/modules/pools/pool-types/concerns/types';\nimport { ONE, BZERO, _upscale } from '@/lib/utils/solidityMaths';\nimport { calcPriceImpact } from '@/modules/pricing/priceImpact';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Pool } from '@/types';\nimport { bptSpotPrice } from '@/lib/utils/stableMathHelpers';\nimport { parsePoolInfo } from '@/lib/utils';\n\n// Note: this concern is used by Stable, MetaStable and StablePhantom pools\nexport class StablePoolPriceImpact implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n // upscales amp, swapfee, totalshares\n const {\n ampWithPrecision,\n scalingFactorsWithoutBpt,\n totalSharesEvm,\n upScaledBalancesWithoutBpt,\n } = parsePoolInfo(pool);\n\n // Check against array without BPT because concern is being reused by stablePhantom pools\n // Stable and MetaStable pools don't have BPT in the token list, so array without BPT is the same as the original array\n if (tokenAmounts.length !== upScaledBalancesWithoutBpt.length)\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n\n let bptZeroPriceImpact = BZERO;\n for (let i = 0; i < upScaledBalancesWithoutBpt.length; i++) {\n const price = bptSpotPrice(\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n totalSharesEvm,\n i\n );\n const amountUpscaled = _upscale(\n tokenAmounts[i],\n scalingFactorsWithoutBpt[i]\n );\n const newTerm = (price * amountUpscaled) / ONE;\n bptZeroPriceImpact += newTerm;\n }\n return bptZeroPriceImpact;\n }\n\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n const bptZeroPriceImpact = this.bptZeroPriceImpact(pool, tokenAmounts);\n return calcPriceImpact(bptAmount, bptZeroPriceImpact, isJoin).toString();\n }\n}\n","import { BigNumber, parseFixed } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport * as SOR from '@balancer-labs/sor';\nimport {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n ExitExactBPTInParameters,\n ExitExactTokensOutParameters,\n ExitPool,\n ExitPoolAttributes,\n} from '../types';\nimport { AssetHelpers, isSameAddress, parsePoolInfo } from '@/lib/utils';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { addSlippage, subSlippage } from '@/lib/utils/slippageHelper';\nimport { balancerVault } from '@/lib/constants/config';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport {\n _downscaleDown,\n _downscaleDownArray,\n _upscaleArray,\n} from '@/lib/utils/solidityMaths';\nimport { Pool } from '@/types';\nimport { BasePoolEncoder } from '@/pool-base';\nimport { StablePoolPriceImpact } from '../stable/priceImpact.concern';\n\ninterface SortedValues {\n poolTokens: string[];\n ampWithPrecision: bigint;\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n}\n\ntype ExactBPTInSortedValues = SortedValues & {\n scalingFactors: bigint[];\n singleTokenOutIndex: number;\n};\n\ntype ExactTokensOutSortedValues = SortedValues & {\n upScaledAmountsOut: bigint[];\n downScaledAmountsOut: string[];\n};\ntype CalcBptInGivenExactTokensOutParams = ExactTokensOutSortedValues &\n Pick;\n\ntype SortValuesParams = {\n pool: Pool;\n wrappedNativeAsset: string;\n shouldUnwrapNativeAsset?: boolean;\n};\n\ntype SortValuesExactBptInParams = SortValuesParams & {\n singleTokenOut?: string;\n};\n\ntype SortValuesExactTokensOutParams = SortValuesParams & {\n amountsOut: string[];\n tokensOut: string[];\n};\n\ntype EncodeExitParams = Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'toInternalBalance'\n> & {\n poolTokens: string[];\n poolId: string;\n userData: string;\n minAmountsOut: string[];\n};\n\nexport class StablePoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n });\n const sortedValues = this.sortValuesExitExactBptIn({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n });\n const { minAmountsOut, expectedAmountsOut } =\n sortedValues.singleTokenOutIndex >= 0\n ? this.calcTokenOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n })\n : this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData =\n sortedValues.singleTokenOutIndex >= 0\n ? StablePoolEncoder.exitExactBPTInForOneTokenOut(\n bptIn,\n sortedValues.singleTokenOutIndex\n )\n : StablePoolEncoder.exitExactBPTInForTokensOut(bptIn);\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n this.checkInputsExactTokensOut(amountsOut, tokensOut, pool);\n\n const sortedValues = this.sortValuesExitExactTokensOut({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n });\n const { expectedBPTIn, maxBPTIn } = this.calcBptInGivenExactTokensOut({\n ...sortedValues,\n slippage,\n });\n\n const { downScaledAmountsOut, poolTokens } = sortedValues;\n const userData = StablePoolEncoder.exitBPTInForExactTokensOut(\n downScaledAmountsOut,\n maxBPTIn\n );\n const encodedData = this.encodeExitPool({\n poolId: pool.id,\n userData,\n poolTokens,\n minAmountsOut: downScaledAmountsOut,\n exiter,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n downScaledAmountsOut.map(BigInt),\n BigInt(expectedBPTIn),\n false\n );\n\n return {\n ...encodedData,\n expectedBPTIn,\n maxBPTIn,\n priceImpact,\n };\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut: undefined,\n pool,\n shouldUnwrapNativeAsset: false,\n });\n const sortedValues = parsePoolInfo(pool);\n const { minAmountsOut, expectedAmountsOut } =\n this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n singleTokenOutIndex: -1,\n bptIn,\n slippage,\n });\n\n const userData = BasePoolEncoder.recoveryModeExit(bptIn);\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt inserted in the transaction\n * @param singleTokenOut (optional) the address of the single token that will be withdrawn, if null|undefined, all tokens will be withdrawn proportionally.\n * @param pool the pool that is being exited\n * @param shouldUnwrapNativeAsset Set true if the weth should be unwrapped to Eth\n */\n checkInputsExactBPTIn = ({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n }: Pick<\n ExitExactBPTInParameters,\n 'bptIn' | 'singleTokenOut' | 'pool' | 'shouldUnwrapNativeAsset'\n >): void => {\n if (!bptIn.length || parseFixed(bptIn, 18).isNegative()) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n if (\n singleTokenOut &&\n singleTokenOut !== AddressZero &&\n !pool.tokens\n .map((t) => t.address)\n .some((a) => isSameAddress(a, singleTokenOut))\n ) {\n throw new BalancerError(BalancerErrorCode.TOKEN_MISMATCH);\n }\n\n if (!shouldUnwrapNativeAsset && singleTokenOut === AddressZero)\n throw new Error(\n 'shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values'\n );\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n /**\n * Checks if the input of buildExitExactTokensOut is valid\n * @param amountsOut Must have an amount for each token, if the user will not withdraw any amount for a token, the value shall be '0'\n * @param tokensOut Must contain all the tokens of the pool\n * @param pool The pool that is being exited\n */\n checkInputsExactTokensOut = (\n amountsOut: string[],\n tokensOut: string[],\n pool: Pool\n ): void => {\n if (\n tokensOut.length != amountsOut.length ||\n tokensOut.length != pool.tokensList.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n sortValuesExitExactBptIn = ({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n }: SortValuesExactBptInParams): ExactBPTInSortedValues => {\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n // Parse pool info into EVM amounts in order to match amountsIn scalling\n const { poolTokens } = parsedPoolInfo;\n let singleTokenOutIndex = -1;\n if (singleTokenOut) {\n singleTokenOutIndex = poolTokens.indexOf(singleTokenOut);\n }\n return {\n ...parsedPoolInfo,\n singleTokenOutIndex,\n };\n };\n sortValuesExitExactTokensOut = ({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n }: SortValuesExactTokensOutParams): ExactTokensOutSortedValues => {\n const shouldUnwrapNativeAsset = tokensOut.some((a) => a === AddressZero);\n // Parse pool info into EVM amounts in order to match amountsOut scaling\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n const { scalingFactors } = parsedPoolInfo;\n\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts in into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, downScaledAmountsOut] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n // Maths should use upscaled amounts, e.g. 1USDC => 1e18 not 1e6\n const upScaledAmountsOut = _upscaleArray(\n downScaledAmountsOut.map((a) => BigInt(a)),\n scalingFactors.map((a) => BigInt(a))\n );\n\n return {\n ...parsedPoolInfo,\n upScaledAmountsOut,\n downScaledAmountsOut,\n };\n };\n calcTokenOutGivenExactBptIn = ({\n poolTokens,\n ampWithPrecision,\n upScaledBalances,\n totalSharesEvm,\n swapFeeEvm,\n singleTokenOutIndex,\n bptIn,\n slippage,\n scalingFactors,\n }: Pick<\n ExactBPTInSortedValues,\n | 'poolTokens'\n | 'ampWithPrecision'\n | 'upScaledBalances'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n | 'singleTokenOutIndex'\n | 'scalingFactors'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n // Calculate amount out given BPT in\n const amountOut = SOR.StableMathBigInt._calcTokenOutGivenExactBptIn(\n ampWithPrecision,\n upScaledBalances,\n singleTokenOutIndex,\n BigInt(bptIn),\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n const downscaledAmountOut = _downscaleDown(\n BigInt(amountOut) - BigInt(1), // The -1 is to solve rounding errors, sometimes the amount comes 1 point lower than expected\n scalingFactors[singleTokenOutIndex]\n ).toString();\n\n const expectedAmountsOut = Array(poolTokens.length).fill('0');\n const minAmountsOut = Array(poolTokens.length).fill('0');\n\n expectedAmountsOut[singleTokenOutIndex] = downscaledAmountOut;\n // Apply slippage tolerance\n minAmountsOut[singleTokenOutIndex] = subSlippage(\n BigNumber.from(downscaledAmountOut),\n BigNumber.from(slippage)\n ).toString();\n\n return { minAmountsOut, expectedAmountsOut };\n };\n\n calcTokensOutGivenExactBptIn = ({\n upScaledBalances,\n totalSharesEvm,\n scalingFactors,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n | 'upScaledBalances'\n | 'totalSharesEvm'\n | 'scalingFactors'\n | 'singleTokenOutIndex'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n const amountsOut = SOR.StableMathBigInt._calcTokensOutGivenExactBptIn(\n upScaledBalances,\n BigInt(bptIn),\n totalSharesEvm\n );\n // Maths return numbers scaled to 18 decimals. Must scale down to token decimals.\n const amountsOutScaledDown = _downscaleDownArray(\n amountsOut,\n scalingFactors\n );\n\n const expectedAmountsOut = amountsOutScaledDown.map((amount) =>\n amount.toString()\n );\n // Apply slippage tolerance\n const minAmountsOut = amountsOutScaledDown.map((amount) => {\n const minAmount = subSlippage(\n BigNumber.from(amount),\n BigNumber.from(slippage)\n );\n return minAmount.toString();\n });\n return { minAmountsOut, expectedAmountsOut };\n };\n calcBptInGivenExactTokensOut = ({\n ampWithPrecision,\n upScaledBalances,\n upScaledAmountsOut,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: CalcBptInGivenExactTokensOutParams): {\n maxBPTIn: string;\n expectedBPTIn: string;\n } => {\n // Calculate expected BPT in given tokens out\n const bptIn = SOR.StableMathBigInt._calcBptInGivenExactTokensOut(\n ampWithPrecision,\n upScaledBalances,\n upScaledAmountsOut,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n // Apply slippage tolerance\n const maxBPTIn = addSlippage(\n BigNumber.from(bptIn),\n BigNumber.from(slippage)\n ).toString();\n return { maxBPTIn, expectedBPTIn: bptIn };\n };\n\n encodeExitPool = ({\n poolId,\n exiter,\n poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n }: EncodeExitParams): ExitPoolAttributes => {\n const to = balancerVault;\n const functionName = 'exitPool';\n const attributes: ExitPool = {\n poolId,\n sender: exiter,\n recipient: exiter,\n exitPoolRequest: {\n assets: poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n },\n };\n // Encode transaction data into an ABI byte string which can be sent to the network to be executed\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.exitPoolRequest,\n ]);\n return { data, to, functionName, attributes };\n };\n}\n","import * as SOR from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { balancerVault } from '@/lib/constants/config';\nimport { AssetHelpers, getEthValue, parsePoolInfo } from '@/lib/utils';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { _upscaleArray } from '@/lib/utils/solidityMaths';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport { Pool } from '@/types';\n\nimport { StablePoolPriceImpact } from '../stable/priceImpact.concern';\nimport {\n JoinConcern,\n JoinPool,\n JoinPoolAttributes,\n JoinPoolParameters,\n} from '../types';\nimport { AddressZero } from '@ethersproject/constants';\n\ntype SortedValues = {\n poolTokens: string[];\n ampWithPrecision: bigint;\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n upScaledAmountsIn: bigint[];\n sortedAmountsIn: string[];\n};\n\ntype EncodeJoinPoolParams = {\n joiner: string;\n poolId: string;\n minBPTOut: string;\n} & Pick &\n Pick;\n\nexport class StablePoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n this.checkInputs(tokensIn, amountsIn, pool);\n const sortedValues = this.sortValues({\n pool,\n wrappedNativeAsset,\n tokensIn,\n amountsIn,\n });\n\n const { expectedBPTOut, minBPTOut } = this.calcBptOutGivenExactTokensIn({\n ...sortedValues,\n slippage,\n });\n\n const encodedData = this.encodeJoinPool({\n joiner,\n amountsIn,\n tokensIn,\n poolId: pool.id,\n minBPTOut,\n ...sortedValues,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n sortedValues.sortedAmountsIn.map(BigInt),\n BigInt(expectedBPTOut),\n true\n );\n\n return {\n ...encodedData,\n minBPTOut,\n expectedBPTOut,\n priceImpact,\n };\n };\n\n /**\n * Check if the input parameters of the buildJoin function are right\n * @param amountsIn Must have an amount for each token, if the user will not deposit any amount for a token, the value shall be '0'\n * @param tokensIn Must contain all the tokens of the pool\n * @param pool The pool that is being joined\n */\n checkInputs = (amountsIn: string[], tokensIn: string[], pool: Pool): void => {\n if (\n tokensIn.length != amountsIn.length ||\n tokensIn.length != pool.tokensList.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n\n sortValues = ({\n pool,\n wrappedNativeAsset,\n amountsIn,\n tokensIn,\n }: Pick<\n JoinPoolParameters,\n 'pool' | 'wrappedNativeAsset' | 'amountsIn' | 'tokensIn'\n >): SortedValues => {\n // Parse pool info into EVM amounts in order to match amountsIn scalling\n const {\n poolTokens,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n scalingFactors,\n upScaledBalances,\n } = parsePoolInfo(pool, wrappedNativeAsset, tokensIn.includes(AddressZero));\n\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts in into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, sortedAmountsIn] = assetHelpers.sortTokens(\n tokensIn,\n amountsIn\n ) as [string[], string[]];\n\n // Maths should use upscaled amounts, e.g. 1USDC => 1e18 not 1e6\n const upScaledAmountsIn = _upscaleArray(\n sortedAmountsIn.map((a) => BigInt(a)),\n scalingFactors.map((a) => BigInt(a))\n );\n return {\n poolTokens,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n upScaledBalances,\n upScaledAmountsIn,\n sortedAmountsIn,\n };\n };\n\n calcBptOutGivenExactTokensIn = ({\n ampWithPrecision,\n upScaledBalances,\n upScaledAmountsIn,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: Pick &\n Pick<\n SortedValues,\n | 'ampWithPrecision'\n | 'upScaledBalances'\n | 'upScaledAmountsIn'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n >): { expectedBPTOut: string; minBPTOut: string } => {\n const expectedBPTOut = SOR.StableMathBigInt._calcBptOutGivenExactTokensIn(\n ampWithPrecision,\n upScaledBalances,\n upScaledAmountsIn,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n const minBPTOut = subSlippage(\n BigNumber.from(expectedBPTOut),\n BigNumber.from(slippage)\n ).toString();\n\n return {\n expectedBPTOut,\n minBPTOut,\n };\n };\n\n encodeJoinPool = ({\n poolId,\n joiner,\n poolTokens,\n sortedAmountsIn,\n amountsIn,\n tokensIn,\n minBPTOut,\n }: EncodeJoinPoolParams): Pick<\n JoinPoolAttributes,\n 'value' | 'data' | 'to' | 'functionName' | 'attributes'\n > => {\n const userData = StablePoolEncoder.joinExactTokensInForBPTOut(\n sortedAmountsIn,\n minBPTOut\n );\n\n const to = balancerVault;\n const functionName = 'joinPool';\n const attributes: JoinPool = {\n poolId,\n sender: joiner,\n recipient: joiner,\n joinPoolRequest: {\n assets: poolTokens,\n maxAmountsIn: sortedAmountsIn,\n userData,\n fromInternalBalance: false,\n },\n };\n const vaultInterface = Vault__factory.createInterface();\n // encode transaction data into an ABI byte string which can be sent to the network to be executed\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ]);\n\n // If joining with a native asset value must be set in call\n const value = getEthValue(tokensIn, amountsIn);\n\n return {\n attributes,\n data,\n functionName,\n to,\n value,\n };\n };\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { parseFixed } from '@/lib/utils/math';\n\nconst SCALING_FACTOR = 18;\n\nexport class StablePoolLiquidity implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = BigNumber.from(0);\n let sumValue = BigNumber.from(0);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(token.price.usd.toString(), SCALING_FACTOR);\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n\n const value = balance.mul(price);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance.gt(0)) {\n const avgPrice = sumValue.div(sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n\n const value = balance.mul(avgPrice);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n }\n\n return formatFixed(sumValue, SCALING_FACTOR * 2).toString();\n }\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, StablePool, ZERO } from '@balancer-labs/sor';\nimport { Pool } from '@/types';\n\nexport class StablePoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const stablePool = StablePool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = stablePool.parsePoolPairData(tokenIn, tokenOut);\n return stablePool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n }\n}\n","import { StablePoolExit } from './concerns/stable/exit.concern';\nimport { StablePoolJoin } from './concerns/stable/join.concern';\nimport { StablePoolLiquidity } from './concerns/stable/liquidity.concern';\nimport { StablePoolSpotPrice } from './concerns/stable/spotPrice.concern';\nimport { StablePoolPriceImpact } from './concerns/stable/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class Stable implements PoolType {\n constructor(\n public exit: ExitConcern = new StablePoolExit(),\n public join: JoinConcern = new StablePoolJoin(),\n public liquidity: LiquidityConcern = new StablePoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new StablePoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new StablePoolPriceImpact()\n ) {}\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, PhantomStablePool, ZERO } from '@balancer-labs/sor';\nimport { Pool } from '@/types';\n\nexport class PhantomStablePoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const metaStablePool = PhantomStablePool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = metaStablePool.parsePoolPairData(tokenIn, tokenOut);\n return metaStablePool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n }\n}\n","import { StableMathBigInt } from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { balancerVault } from '@/lib/constants/config';\nimport {\n AssetHelpers,\n parsePoolInfo,\n insert,\n reorderArrays,\n getEthValue,\n} from '@/lib/utils';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { _upscaleArray } from '@/lib/utils/solidityMaths';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { Pool } from '@/types';\n\nimport { StablePoolPriceImpact } from '../stable/priceImpact.concern';\nimport {\n JoinPoolParameters,\n JoinConcern,\n JoinPoolAttributes,\n JoinPool,\n} from '../types';\nimport { AddressZero } from '@ethersproject/constants';\n\ninterface SortedValues {\n sortedAmountsIn: string[];\n scalingFactorsWithoutBpt: bigint[];\n upScaledBalancesWithoutBpt: bigint[];\n ampWithPrecision: bigint;\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n bptIndex: number;\n poolTokens: string[];\n}\n\ntype SortedInputs = SortedValues &\n Pick & {\n poolId: string;\n };\n\nexport class ComposableStablePoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n this.checkInputs(tokensIn, amountsIn, pool.tokensList);\n\n const sortedValues = this.sortValuesBasedOnPoolVersion({\n pool,\n wrappedNativeAsset,\n amountsIn,\n tokensIn,\n });\n\n const encodedData = this.buildExactTokensInForBPTOut({\n ...sortedValues,\n slippage,\n joiner,\n poolId: pool.id,\n });\n\n // If joining with a native asset value must be set in call\n const value = getEthValue(tokensIn, amountsIn);\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n sortedValues.sortedAmountsIn.map(BigInt),\n BigInt(encodedData.expectedBPTOut),\n true\n );\n\n return {\n ...encodedData,\n to: balancerVault,\n value,\n priceImpact,\n };\n };\n\n /**\n * Sorts inputs and pool value to be correct order and scale for maths and Vault interaction.\n * @param pool Pool data\n * @param wrappedNativeAsset (Used for sorting)\n * @param amountsIn Downscaled amounts in\n * @param tokensIn Addresses of token in\n * @returns Sorted values\n */\n sortValuesBasedOnPoolVersion({\n pool,\n wrappedNativeAsset,\n amountsIn,\n tokensIn,\n }: Pick<\n JoinPoolParameters,\n 'pool' | 'wrappedNativeAsset' | 'amountsIn' | 'tokensIn'\n >): SortedValues {\n /**\n * V1: Does not have proportional exits.\n * V2: Reintroduced proportional exits. Has vulnerability.\n * V3: Fixed vulnerability. Functionally the same as V2.\n * V4: Update to use new create method with new salt parameter\n * V5: Fixed vulnerability. Functionally the same as V4.\n */\n return this.sortV1(wrappedNativeAsset, tokensIn, amountsIn, pool);\n // Not release yet and needs tests to confirm\n // else if (values.pool.poolTypeVersion === 5)\n // sortedValues = this.sortV4(\n // values.tokensIn,\n // values.amountsIn,\n // values.pool\n // );\n }\n\n /**\n * Ensure tokensIn and amountsIn match pool tokens length\n * @param tokensIn\n * @param amountsIn\n * @param poolTokens\n */\n checkInputs(\n tokensIn: string[],\n amountsIn: string[],\n poolTokens: string[]\n ): void {\n if (\n tokensIn.length != amountsIn.length ||\n tokensIn.length != poolTokens.length - 1\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n }\n\n /**\n * Encodes user data with slippage applied to expected BPT out.\n * @param expectedBPTOut\n * @param slippage\n * @param amountsIn\n * @returns\n */\n encodeUserDataExactTokensInForBPTOut(\n expectedBPTOut: bigint,\n slippage: string,\n amountsIn: string[]\n ): { userData: string; minBPTOut: string } {\n const minBPTOut = subSlippage(\n BigNumber.from(expectedBPTOut),\n BigNumber.from(slippage)\n ).toString();\n\n //NEEDS TO ENCODE USER DATA WITHOUT BPT AMOUNT\n return {\n userData: ComposableStablePoolEncoder.joinExactTokensInForBPTOut(\n amountsIn, // No BPT amount\n minBPTOut\n ),\n minBPTOut,\n };\n }\n\n /**\n * Encode transaction data into an ABI byte string which can be sent to the network to be executed\n * @param poolId\n * @param sender\n * @param recipient\n * @param assetsWithBpt\n * @param encodedUserData\n * @param maxAmountsInWithBpt\n * @returns\n */\n encodeJoinPool(\n poolId: string,\n sender: string,\n recipient: string,\n assetsWithBpt: string[],\n encodedUserData: string,\n maxAmountsInWithBpt: string[]\n ): Pick {\n const functionName = 'joinPool';\n //assets AND maxAmountsIn NEEDS THE BPT VALUE IN THE ARRAY\n const attributes: JoinPool = {\n poolId,\n sender,\n recipient,\n joinPoolRequest: {\n assets: assetsWithBpt,\n maxAmountsIn: maxAmountsInWithBpt,\n userData: encodedUserData,\n fromInternalBalance: false,\n },\n };\n\n const vaultInterface = Vault__factory.createInterface();\n\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ]);\n\n return {\n functionName,\n attributes,\n data,\n };\n }\n\n /**\n * Sorts and scales values correctly for V1-V3 ComposableStable pool.\n * @param wrappedNativeAsset (Used for sorting)\n * @param tokensIn Addresses of token in\n * @param amountsIn Downscaled amounts in\n * @param pool Pool data\n * @returns Sorted values\n */\n sortV1(\n wrappedNativeAsset: string,\n tokensIn: string[],\n amountsIn: string[],\n pool: Pool\n ): SortedValues {\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts in into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, sortedAmountsIn] = assetHelpers.sortTokens(\n tokensIn,\n amountsIn\n ) as [string[], string[]];\n\n const {\n poolTokens,\n ampWithPrecision,\n swapFeeEvm,\n totalSharesEvm,\n bptIndex,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n } = parsePoolInfo(pool, wrappedNativeAsset, tokensIn.includes(AddressZero));\n return {\n sortedAmountsIn,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n bptIndex,\n poolTokens,\n };\n }\n\n buildExactTokensInForBPTOut(\n sortedValues: SortedInputs\n ): Pick<\n JoinPoolAttributes,\n 'minBPTOut' | 'functionName' | 'attributes' | 'data' | 'expectedBPTOut'\n > {\n const {\n sortedAmountsIn,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n bptIndex,\n poolTokens,\n slippage,\n poolId,\n joiner,\n } = sortedValues;\n // BPT out will be in correct scale and price rate is always 1e18 do doesn't need to be considered\n // Maths needs to have BPT values removed\n const expectedBPTOut = this.calcBptOutGivenExactTokensIn(\n sortedAmountsIn,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm\n );\n\n const userData = this.encodeUserDataExactTokensInForBPTOut(\n expectedBPTOut,\n slippage,\n sortedAmountsIn\n );\n\n const { functionName, data, attributes } = this.encodeJoinPool(\n poolId,\n joiner,\n joiner,\n poolTokens,\n userData.userData,\n insert(sortedAmountsIn, bptIndex, '0') // Adds value for BPT\n );\n\n return {\n functionName,\n data,\n attributes,\n minBPTOut: userData.minBPTOut,\n expectedBPTOut: expectedBPTOut.toString(),\n };\n }\n\n calcBptOutGivenExactTokensIn(\n amountsIn: string[],\n scalingFactorsWithoutBpt: bigint[],\n upScaledBalancesWithoutBpt: bigint[],\n ampWithPrecision: bigint,\n totalSharesEvm: bigint,\n swapFeeEvm: bigint\n ): bigint {\n /*\n Maths should use: \n - upscaled amounts, e.g. 1USDC = 1e18\n - rates (scaling factors should include these)\n */\n const upScaledAmountsIn = _upscaleArray(\n amountsIn.map(BigInt),\n scalingFactorsWithoutBpt.map(BigInt)\n );\n const expectedBPTOut = StableMathBigInt._calcBptOutGivenExactTokensIn(\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n upScaledAmountsIn, // Should not have BPT\n totalSharesEvm,\n swapFeeEvm\n );\n // BPT out will be in correct scale and price rate is always 1e18 do doesn't need to be considered\n return expectedBPTOut;\n }\n\n // This uses sorting where BPT is always at index 0.\n // Not currently released but keep for when it is.\n sortV4(tokensIn: string[], amountsIn: string[], pool: Pool): SortedValues {\n // This will keep ordering as read from Pool\n const {\n poolTokens,\n poolTokensWithoutBpt,\n ampWithPrecision,\n swapFeeEvm,\n totalSharesEvm,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n } = parsePoolInfo(pool);\n\n // Reorder amountsIn to match pool token order TODO - May have issues when adding native tokens to this mix.\n const [sortedAmountsIn] = reorderArrays(\n poolTokensWithoutBpt,\n tokensIn,\n amountsIn\n ) as [string[]];\n return {\n sortedAmountsIn,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n bptIndex: 0,\n poolTokens,\n };\n }\n}\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\n\nimport * as SOR from '@balancer-labs/sor';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport {\n AssetHelpers,\n insert,\n isSameAddress,\n parsePoolInfo,\n} from '@/lib/utils';\nimport { addSlippage, subSlippage } from '@/lib/utils/slippageHelper';\nimport {\n _downscaleDown,\n _downscaleDownArray,\n _upscaleArray,\n} from '@/lib/utils/solidityMaths';\nimport { balancerVault } from '@/lib/constants/config';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { Pool } from '@/types';\nimport {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactBPTInParameters,\n ExitExactTokensOutAttributes,\n ExitExactTokensOutParameters,\n ExitPool,\n ExitPoolAttributes,\n} from '../types';\nimport { BasePoolEncoder } from '@/pool-base';\nimport { StablePoolPriceImpact } from '../stable/priceImpact.concern';\n\ninterface SortedValues {\n poolTokens: string[];\n ampWithPrecision: bigint;\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n bptIndex: number;\n upScaledBalancesWithoutBpt: bigint[];\n scalingFactors: bigint[];\n scalingFactorsWithoutBpt: bigint[];\n}\n\ntype ExactBPTInSortedValues = SortedValues & {\n singleTokenOutIndexWithoutBpt: number;\n};\ntype ExactTokensOutSortedValues = SortedValues & {\n upScaledAmountsOutWithoutBpt: bigint[];\n downscaledAmountsOutWithoutBpt: string[];\n downscaledAmountsOutWithBpt: string[];\n};\n\ntype CalcBptInGivenExactTokensOutParams = ExactTokensOutSortedValues &\n Pick;\n\ntype SortValuesParams = {\n pool: Pool;\n wrappedNativeAsset: string;\n shouldUnwrapNativeAsset?: boolean;\n};\n\ntype SortValuesExactBptInParams = SortValuesParams & {\n singleTokenOut?: string;\n};\n\ntype SortValuesExactTokensOutParams = SortValuesParams & {\n amountsOut: string[];\n tokensOut: string[];\n};\n\ntype EncodeExitParams = Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'toInternalBalance'\n> & {\n poolTokens: string[];\n poolId: string;\n userData: string;\n minAmountsOut: string[];\n};\n\nexport class ComposableStablePoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n });\n\n const sortedValues = this.sortValuesExitExactBptIn({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n });\n\n const { minAmountsOut, expectedAmountsOut } =\n sortedValues.singleTokenOutIndexWithoutBpt >= 0\n ? this.calcTokenOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n })\n : this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData =\n sortedValues.singleTokenOutIndexWithoutBpt >= 0\n ? ComposableStablePoolEncoder.exitExactBPTInForOneTokenOut(\n bptIn,\n sortedValues.singleTokenOutIndexWithoutBpt\n )\n : ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut(bptIn);\n\n // MinAmounts needs a value for BPT for encoding\n const minAmountsOutWithBpt = insert(\n minAmountsOut,\n sortedValues.bptIndex,\n '0'\n );\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n userData,\n minAmountsOut: minAmountsOutWithBpt,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n this.checkInputsExactTokensOut(tokensOut, amountsOut, pool);\n const sortedValues = this.sortValuesExitExactTokensOut({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n });\n\n const { bptIn, maxBPTIn } = this.calcBptInGivenExactTokensOut({\n ...sortedValues,\n slippage,\n });\n\n // Have to make sure amountsOut does not have value for BPT index\n const userData = ComposableStablePoolEncoder.exitBPTInForExactTokensOut(\n sortedValues.downscaledAmountsOutWithoutBpt,\n maxBPTIn\n );\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n minAmountsOut: sortedValues.downscaledAmountsOutWithBpt,\n userData,\n exiter,\n poolId: pool.id,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n sortedValues.downscaledAmountsOutWithoutBpt.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n maxBPTIn,\n expectedBPTIn: bptIn,\n priceImpact,\n };\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n this.checkInputsRecoveryExit({\n bptIn,\n pool,\n });\n // Recovery exits don't use rates. We use them as part of scalingFactor so default to 1 incase of issues\n pool.tokens.forEach((t) => (t.priceRate = '1'));\n\n const sortedValues = parsePoolInfo(pool);\n\n const { minAmountsOut, expectedAmountsOut } =\n this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData = BasePoolEncoder.recoveryModeExit(bptIn);\n\n // MinAmounts needs a value for BPT for encoding\n const minAmountsOutWithBpt = insert(\n minAmountsOut,\n sortedValues.bptIndex,\n '0'\n );\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n userData,\n minAmountsOut: minAmountsOutWithBpt,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt amoun in EVM scale\n * @param singleTokenOut (optional) the address of the single token that will be withdrawn, if null|undefined, all tokens will be withdrawn proportionally.\n * @param pool the pool that is being exited\n * @param shouldUnwrapNativeAsset Set true if the weth should be unwrapped to Eth\n */\n checkInputsExactBPTIn = ({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n }: Pick<\n ExitExactBPTInParameters,\n 'bptIn' | 'singleTokenOut' | 'pool' | 'shouldUnwrapNativeAsset'\n >): void => {\n if (BigNumber.from(bptIn).lte(0)) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n if (!singleTokenOut && pool.poolTypeVersion < 2) {\n throw new Error('Unsupported Exit Type For Pool');\n }\n if (\n singleTokenOut &&\n singleTokenOut !== AddressZero &&\n !pool.tokens\n .map((t) => t.address)\n .some((a) => isSameAddress(a, singleTokenOut))\n ) {\n throw new BalancerError(BalancerErrorCode.TOKEN_MISMATCH);\n }\n\n if (!shouldUnwrapNativeAsset && singleTokenOut === AddressZero)\n throw new Error(\n 'shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values'\n );\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n\n /**\n * Checks if the input of buildExitExactTokensOut is valid\n */\n checkInputsExactTokensOut = (\n tokensOut: string[],\n amountsOut: string[],\n pool: Pool\n ): void => {\n // Should have a token for input for each non-BPT pool token\n // Should be an amount out for each token out\n if (\n tokensOut.length != amountsOut.length ||\n tokensOut.length != pool.tokensList.length - 1\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt amount in EVM scale\n * @param pool the pool that is being exited\n */\n checkInputsRecoveryExit = ({\n bptIn,\n pool,\n }: Pick): void => {\n if (BigNumber.from(bptIn).lte(0)) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n if (!pool.isInRecoveryMode) {\n throw new Error(\n 'Exit type not supported because pool is not in Recovery Mode'\n );\n }\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n\n /**\n * Sorts and returns the values of amounts, tokens, balances, indexes, that are necessary to do the maths and build the exit transactions\n * @param pool\n * @param singleTokenOut\n * @param wrappedNativeAsset\n * @param shouldUnwrapNativeAsset\n * @param amountsOut\n * @param tokensOut\n */\n sortValuesExitExactBptIn = ({\n pool,\n singleTokenOut,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n }: SortValuesExactBptInParams): ExactBPTInSortedValues => {\n const parsedValues = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n let singleTokenOutIndexWithoutBpt = -1;\n if (singleTokenOut) {\n singleTokenOutIndexWithoutBpt =\n parsedValues.poolTokensWithoutBpt.indexOf(singleTokenOut);\n }\n return {\n ...parsedValues,\n singleTokenOutIndexWithoutBpt,\n };\n };\n /**\n * Sorts and returns the values of amounts, tokens, balances, indexes, that are necessary to do the maths and build the exit transactions\n * @param pool\n * @param singleTokenOut\n * @param wrappedNativeAsset\n * @param amountsOut\n * @param tokensOut\n */\n sortValuesExitExactTokensOut = ({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n }: SortValuesExactTokensOutParams): ExactTokensOutSortedValues => {\n const shouldUnwrapNativeAsset = tokensOut.some((a) => a === AddressZero);\n const parsedValues = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts out into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, downscaledAmountsOutWithoutBpt] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n const downscaledAmountsOutWithBpt = insert(\n downscaledAmountsOutWithoutBpt,\n parsedValues.bptIndex,\n '0'\n );\n\n // This should not be required but there is currently a rounding issue with maths and this will ensure tx\n const downscaledAmountsOutWithBptWithRounding =\n downscaledAmountsOutWithBpt.map((a) => {\n const value = BigNumber.from(a);\n return value.isZero() ? a : value.sub(1).toString();\n });\n\n // Maths should use upscaled amounts with rates, e.g. 1USDC => 1e18 not 1e6\n const upScaledAmountsOutWithoutBpt = _upscaleArray(\n downscaledAmountsOutWithoutBpt.map((a) => BigInt(a)),\n parsedValues.scalingFactorsWithoutBpt\n );\n\n return {\n ...parsedValues,\n upScaledAmountsOutWithoutBpt,\n downscaledAmountsOutWithBpt: downscaledAmountsOutWithBptWithRounding,\n downscaledAmountsOutWithoutBpt,\n };\n };\n /**\n * Calculate the minimum and expect amountOut of the exit with exact bpt in transaction, and passes it to minAmountsOut and expectedAmountsOut arrays passed as parameters;\n * @param sortedValues\n * @param expectedAmountsOut\n * @param minAmountsOut\n * @param bptIn\n * @param slippage\n */\n calcTokenOutGivenExactBptIn = ({\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n singleTokenOutIndexWithoutBpt,\n scalingFactorsWithoutBpt,\n totalSharesEvm,\n swapFeeEvm,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n | 'ampWithPrecision'\n | 'upScaledBalancesWithoutBpt'\n | 'singleTokenOutIndexWithoutBpt'\n | 'scalingFactorsWithoutBpt'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n // Calculate amount out given BPT in\n const amountOut = SOR.StableMathBigInt._calcTokenOutGivenExactBptIn(\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n singleTokenOutIndexWithoutBpt,\n BigInt(bptIn),\n totalSharesEvm,\n swapFeeEvm\n );\n const expectedAmountsOut = Array(upScaledBalancesWithoutBpt.length).fill(\n '0'\n );\n const minAmountsOut = Array(upScaledBalancesWithoutBpt.length).fill('0');\n // Downscales to token decimals and removes priceRate\n const downscaledAmountOut = _downscaleDown(\n amountOut,\n scalingFactorsWithoutBpt[singleTokenOutIndexWithoutBpt]\n );\n\n expectedAmountsOut[singleTokenOutIndexWithoutBpt] =\n downscaledAmountOut.toString();\n // Apply slippage tolerance\n minAmountsOut[singleTokenOutIndexWithoutBpt] = subSlippage(\n BigNumber.from(downscaledAmountOut),\n BigNumber.from(slippage)\n ).toString();\n\n return { minAmountsOut, expectedAmountsOut };\n };\n\n calcTokensOutGivenExactBptIn = ({\n upScaledBalancesWithoutBpt,\n totalSharesEvm,\n scalingFactorsWithoutBpt,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n 'upScaledBalancesWithoutBpt' | 'totalSharesEvm' | 'scalingFactorsWithoutBpt'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n const amountsOut = SOR.StableMathBigInt._calcTokensOutGivenExactBptIn(\n upScaledBalancesWithoutBpt,\n BigInt(bptIn),\n totalSharesEvm\n );\n // Maths return numbers scaled to 18 decimals. Must scale down to token decimals.\n const amountsOutScaledDown = _downscaleDownArray(\n amountsOut,\n scalingFactorsWithoutBpt\n );\n\n const expectedAmountsOut = amountsOutScaledDown.map((amount) =>\n amount.toString()\n );\n // Apply slippage tolerance\n const minAmountsOut = amountsOutScaledDown.map((amount) => {\n const minAmount = subSlippage(\n BigNumber.from(amount),\n BigNumber.from(slippage)\n );\n return minAmount.toString();\n });\n return { minAmountsOut, expectedAmountsOut };\n };\n\n /**\n * Calculate the bptIn and maxBPTIn of the exit with exact tokens out transaction and returns them;\n * @param ampWithPrecision\n * @param upScaledBalancesWithoutBpt\n * @param upScaledAmountsOut\n * @param totalSharesEvm\n * @param swapFeeEvm\n * @param slippage\n */\n calcBptInGivenExactTokensOut = ({\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n upScaledAmountsOutWithoutBpt,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: CalcBptInGivenExactTokensOutParams): {\n bptIn: string;\n maxBPTIn: string;\n } => {\n const bptIn = SOR.StableMathBigInt._calcBptInGivenExactTokensOut(\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n upScaledAmountsOutWithoutBpt,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n // Apply slippage tolerance\n const maxBPTIn = addSlippage(\n BigNumber.from(bptIn),\n BigNumber.from(slippage)\n ).toString();\n\n return { bptIn, maxBPTIn };\n };\n\n /**\n * Encodes the function data and does the final building of the exit(with exact tokens out) transaction\n * @param params\n */\n encodeExitPool = (params: EncodeExitParams): ExitPoolAttributes => {\n const {\n exiter,\n poolId,\n minAmountsOut,\n userData,\n poolTokens,\n toInternalBalance,\n } = params;\n\n const to = balancerVault;\n const functionName = 'exitPool';\n const attributes: ExitPool = {\n poolId: poolId,\n sender: exiter,\n recipient: exiter,\n exitPoolRequest: {\n assets: poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n },\n };\n\n // encode transaction data into an ABI byte string which can be sent to the network to be executed\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.exitPoolRequest,\n ]);\n\n return {\n to,\n functionName,\n attributes,\n data,\n };\n };\n}\n","import { StablePoolLiquidity } from './concerns/stable/liquidity.concern';\nimport { PhantomStablePoolSpotPrice } from './concerns/stablePhantom/spotPrice.concern';\nimport { StablePoolPriceImpact } from './concerns/stable/priceImpact.concern';\nimport { ComposableStablePoolJoin } from './concerns/composableStable/join.concern';\nimport { ComposableStablePoolExit } from './concerns/composableStable/exit.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class ComposableStable implements PoolType {\n constructor(\n public exit: ExitConcern = new ComposableStablePoolExit(),\n public liquidity: LiquidityConcern = new StablePoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new PhantomStablePoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new StablePoolPriceImpact(),\n public join: JoinConcern = new ComposableStablePoolJoin()\n ) {}\n}\n","import { PriceImpactConcern } from '@/modules/pools/pool-types/concerns/types';\nimport { calcPriceImpact } from '@/modules/pricing/priceImpact';\nimport { ONE, BZERO, _upscale } from '@/lib/utils/solidityMaths';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Pool } from '@/types';\nimport { parsePoolInfo } from '@/lib/utils';\n\nexport class WeightedPoolPriceImpact implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n if (tokenAmounts.length !== pool.tokensList.length)\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n\n // totalShares, balances and weights all scaled up to 18 decimals\n const { scalingFactorsRaw, totalSharesEvm, upScaledBalances, weights } =\n parsePoolInfo(pool);\n\n let bptZeroPriceImpact = BZERO;\n for (let i = 0; i < tokenAmounts.length; i++) {\n const price = (weights[i] * totalSharesEvm) / upScaledBalances[i];\n const amountUpscaled = _upscale(tokenAmounts[i], scalingFactorsRaw[i]);\n const newTerm = (price * amountUpscaled) / ONE;\n bptZeroPriceImpact += newTerm;\n }\n return bptZeroPriceImpact;\n }\n\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n const bptZeroPriceImpact = this.bptZeroPriceImpact(pool, tokenAmounts);\n return calcPriceImpact(bptAmount, bptZeroPriceImpact, isJoin).toString();\n }\n}\n","import { BigNumber, parseFixed } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport * as SOR from '@balancer-labs/sor';\nimport {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n ExitExactBPTInParameters,\n ExitExactTokensOutParameters,\n ExitPool,\n ExitPoolAttributes,\n} from '../types';\nimport { AssetHelpers, isSameAddress, parsePoolInfo } from '@/lib/utils';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { addSlippage, subSlippage } from '@/lib/utils/slippageHelper';\nimport { balancerVault } from '@/lib/constants/config';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport {\n _downscaleDown,\n _downscaleDownArray,\n _upscaleArray,\n} from '@/lib/utils/solidityMaths';\nimport { Pool } from '@/types';\nimport { BasePoolEncoder } from '@/pool-base';\nimport { WeightedPoolPriceImpact } from '../weighted/priceImpact.concern';\n\ninterface SortedValues {\n poolTokens: string[];\n weights: bigint[];\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n}\n\ntype ExactBPTInSortedValues = SortedValues & {\n scalingFactors: bigint[];\n singleTokenOutIndex: number;\n};\n\ntype ExactTokensOutSortedValues = SortedValues & {\n upScaledAmountsOut: bigint[];\n downScaledAmountsOut: string[];\n};\ntype CalcBptInGivenExactTokensOutParams = ExactTokensOutSortedValues &\n Pick;\n\ntype SortValuesParams = {\n pool: Pool;\n wrappedNativeAsset: string;\n shouldUnwrapNativeAsset?: boolean;\n};\n\ntype SortValuesExactBptInParams = SortValuesParams & {\n singleTokenOut?: string;\n};\n\ntype SortValuesExactTokensOutParams = SortValuesParams & {\n amountsOut: string[];\n tokensOut: string[];\n};\n\ntype EncodeExitParams = Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'toInternalBalance'\n> & {\n poolTokens: string[];\n poolId: string;\n userData: string;\n minAmountsOut: string[];\n};\n\nexport class WeightedPoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n });\n const sortedValues = this.sortValuesExitExactBptIn({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n });\n const { minAmountsOut, expectedAmountsOut } =\n sortedValues.singleTokenOutIndex >= 0\n ? this.calcTokenOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n })\n : this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData =\n sortedValues.singleTokenOutIndex >= 0\n ? WeightedPoolEncoder.exitExactBPTInForOneTokenOut(\n bptIn,\n sortedValues.singleTokenOutIndex\n )\n : WeightedPoolEncoder.exitExactBPTInForTokensOut(bptIn);\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new WeightedPoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n this.checkInputsExactTokensOut(amountsOut, tokensOut, pool);\n\n const sortedValues = this.sortValuesExitExactTokensOut({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n });\n const { expectedBPTIn, maxBPTIn } = this.calcBptInGivenExactTokensOut({\n ...sortedValues,\n slippage,\n });\n\n const { downScaledAmountsOut, poolTokens } = sortedValues;\n const userData = WeightedPoolEncoder.exitBPTInForExactTokensOut(\n downScaledAmountsOut,\n maxBPTIn\n );\n const encodedData = this.encodeExitPool({\n poolId: pool.id,\n userData,\n poolTokens,\n minAmountsOut: downScaledAmountsOut,\n exiter,\n toInternalBalance,\n });\n\n const priceImpactConcern = new WeightedPoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n downScaledAmountsOut.map(BigInt),\n BigInt(expectedBPTIn),\n false\n );\n\n return {\n ...encodedData,\n expectedBPTIn,\n maxBPTIn,\n priceImpact,\n };\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut: undefined,\n pool,\n shouldUnwrapNativeAsset: false,\n });\n // Recovery exits don't use rates. We use them as part of scalingFactor so default to 1 incase of issues\n pool.tokens.forEach((t) => (t.priceRate = '1'));\n const sortedValues = parsePoolInfo(pool);\n const { minAmountsOut, expectedAmountsOut } =\n this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n singleTokenOutIndex: -1,\n });\n\n const userData = BasePoolEncoder.recoveryModeExit(bptIn);\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new WeightedPoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt inserted in the transaction\n * @param singleTokenOut (optional) the address of the single token that will be withdrawn, if null|undefined, all tokens will be withdrawn proportionally.\n * @param pool the pool that is being exited\n * @param shouldUnwrapNativeAsset Set true if the weth should be unwrapped to Eth\n */\n checkInputsExactBPTIn = ({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n }: Pick<\n ExitExactBPTInParameters,\n 'bptIn' | 'singleTokenOut' | 'pool' | 'shouldUnwrapNativeAsset'\n >): void => {\n if (!bptIn.length || parseFixed(bptIn, 18).isNegative()) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n if (\n singleTokenOut &&\n singleTokenOut !== AddressZero &&\n !pool.tokens\n .map((t) => t.address)\n .some((a) => isSameAddress(a, singleTokenOut))\n ) {\n throw new BalancerError(BalancerErrorCode.TOKEN_MISMATCH);\n }\n\n if (!shouldUnwrapNativeAsset && singleTokenOut === AddressZero)\n throw new Error(\n 'shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values'\n );\n\n // Check if there's any relevant weighted pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n };\n /**\n * Checks if the input of buildExitExactTokensOut is valid\n * @param amountsOut Must have an amount for each token, if the user will not withdraw any amount for a token, the value shall be '0'\n * @param tokensOut Must contain all the tokens of the pool\n * @param pool The pool that is being exited\n */\n checkInputsExactTokensOut = (\n amountsOut: string[],\n tokensOut: string[],\n pool: Pool\n ): void => {\n if (\n tokensOut.length != amountsOut.length ||\n tokensOut.length != pool.tokensList.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n // Check if there's any important weighted pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n };\n sortValuesExitExactBptIn = ({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n }: SortValuesExactBptInParams): ExactBPTInSortedValues => {\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n // Parse pool info into EVM amounts in order to match amountsIn scalling\n const { poolTokens } = parsedPoolInfo;\n let singleTokenOutIndex = -1;\n if (singleTokenOut) {\n singleTokenOutIndex = poolTokens.indexOf(singleTokenOut.toLowerCase());\n }\n return {\n ...parsedPoolInfo,\n singleTokenOutIndex,\n };\n };\n sortValuesExitExactTokensOut = ({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n }: SortValuesExactTokensOutParams): ExactTokensOutSortedValues => {\n const shouldUnwrapNativeAsset = tokensOut.some((a) => a === AddressZero);\n // Parse pool info into EVM amounts in order to match amountsOut scaling\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n const { scalingFactors } = parsedPoolInfo;\n\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts in into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, downScaledAmountsOut] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n // Maths should use upscaled amounts, e.g. 1USDC => 1e18 not 1e6\n const upScaledAmountsOut = _upscaleArray(\n downScaledAmountsOut.map((a) => BigInt(a)),\n scalingFactors.map((a) => BigInt(a))\n );\n\n return {\n ...parsedPoolInfo,\n upScaledAmountsOut,\n downScaledAmountsOut,\n };\n };\n calcTokenOutGivenExactBptIn = ({\n poolTokens,\n weights,\n upScaledBalances,\n totalSharesEvm,\n swapFeeEvm,\n singleTokenOutIndex,\n bptIn,\n slippage,\n scalingFactors,\n }: Pick<\n ExactBPTInSortedValues,\n | 'poolTokens'\n | 'weights'\n | 'upScaledBalances'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n | 'singleTokenOutIndex'\n | 'scalingFactors'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n // Calculate amount out given BPT in\n const amountOut = SOR.WeightedMaths._calcTokenOutGivenExactBptIn(\n upScaledBalances[singleTokenOutIndex],\n weights[singleTokenOutIndex],\n BigInt(bptIn),\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n const downscaledAmountOut = _downscaleDown(\n BigInt(amountOut) - BigInt(1), // The -1 is to solve rounding errors, sometimes the amount comes 1 point lower than expected\n scalingFactors[singleTokenOutIndex]\n ).toString();\n\n const expectedAmountsOut = Array(poolTokens.length).fill('0');\n const minAmountsOut = Array(poolTokens.length).fill('0');\n\n expectedAmountsOut[singleTokenOutIndex] = downscaledAmountOut;\n // Apply slippage tolerance\n minAmountsOut[singleTokenOutIndex] = subSlippage(\n BigNumber.from(downscaledAmountOut),\n BigNumber.from(slippage)\n ).toString();\n\n return { minAmountsOut, expectedAmountsOut };\n };\n\n calcTokensOutGivenExactBptIn = ({\n upScaledBalances,\n totalSharesEvm,\n scalingFactors,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n | 'upScaledBalances'\n | 'totalSharesEvm'\n | 'scalingFactors'\n | 'singleTokenOutIndex'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n // Calculate amounts out given BPT in\n const amountsOut = SOR.WeightedMaths._calcTokensOutGivenExactBptIn(\n upScaledBalances,\n BigInt(bptIn),\n totalSharesEvm\n ).map((amount) => amount.toString());\n // Maths return numbers scaled to 18 decimals. Must scale down to token decimals.\n const amountsOutScaledDown = _downscaleDownArray(\n amountsOut.map((a) => BigInt(a)),\n scalingFactors\n );\n\n const expectedAmountsOut = amountsOutScaledDown.map((amount) =>\n amount.toString()\n );\n // Apply slippage tolerance\n const minAmountsOut = amountsOutScaledDown.map((amount) => {\n const minAmount = subSlippage(\n BigNumber.from(amount),\n BigNumber.from(slippage)\n );\n return minAmount.toString();\n });\n return { minAmountsOut, expectedAmountsOut };\n };\n calcBptInGivenExactTokensOut = ({\n weights,\n upScaledBalances,\n upScaledAmountsOut,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: CalcBptInGivenExactTokensOutParams): {\n maxBPTIn: string;\n expectedBPTIn: string;\n } => {\n // Calculate expected BPT in given tokens out\n const bptIn = SOR.WeightedMaths._calcBptInGivenExactTokensOut(\n upScaledBalances,\n weights,\n upScaledAmountsOut,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n // Apply slippage tolerance\n const maxBPTIn = addSlippage(\n BigNumber.from(bptIn),\n BigNumber.from(slippage)\n ).toString();\n return { maxBPTIn, expectedBPTIn: bptIn };\n };\n\n encodeExitPool = ({\n poolId,\n exiter,\n poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n }: EncodeExitParams): ExitPoolAttributes => {\n const to = balancerVault;\n const functionName = 'exitPool';\n const attributes: ExitPool = {\n poolId,\n sender: exiter,\n recipient: exiter,\n exitPoolRequest: {\n assets: poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n },\n };\n // Encode transaction data into an ABI byte string which can be sent to the network to be executed\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.exitPoolRequest,\n ]);\n return { data, to, functionName, attributes };\n };\n}\n","import { WeightedMaths } from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { balancerVault } from '@/lib/constants/config';\nimport { AssetHelpers, getEthValue, parsePoolInfo } from '@/lib/utils';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { _upscaleArray } from '@/lib/utils/solidityMaths';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { Address, Pool } from '@/types';\nimport {\n JoinConcern,\n JoinPool,\n JoinPoolAttributes,\n JoinPoolParameters,\n} from '../types';\nimport { WeightedPoolPriceImpact } from '../weighted/priceImpact.concern';\n\ntype SortedValues = {\n poolTokens: string[];\n weights: bigint[];\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n upScaledAmountsIn: bigint[];\n sortedAmountsIn: string[];\n};\n\nexport class WeightedPoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n this.checkInputs(amountsIn, tokensIn, pool);\n\n const sortedValues = this.sortValues({\n pool,\n wrappedNativeAsset,\n tokensIn,\n amountsIn,\n });\n\n const { expectedBPTOut, minBPTOut } = this.calcBptOutGivenExactTokensIn({\n ...sortedValues,\n slippage,\n });\n\n const encodedFunctionData = this.encodeJoinPool({\n ...sortedValues,\n poolId: pool.id,\n joiner,\n minBPTOut,\n tokensIn,\n amountsIn,\n });\n\n const priceImpactConcern = new WeightedPoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n sortedValues.sortedAmountsIn.map(BigInt),\n BigInt(expectedBPTOut),\n true\n );\n\n return {\n ...encodedFunctionData,\n minBPTOut,\n expectedBPTOut,\n priceImpact,\n };\n };\n\n /**\n * Check if the input parameters of the buildJoin function are right\n * @param amountsIn Must have an amount for each token, if the user will not deposit any amount for a token, the value shall be '0'\n * @param tokensIn Must contain all the tokens of the pool\n * @param pool The pool that is being joined\n */\n checkInputs = (tokensIn: string[], amountsIn: string[], pool: Pool): void => {\n if (\n tokensIn.length != amountsIn.length ||\n tokensIn.length != pool.tokensList.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n\n // Check if there's any relevant weighted pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (pool.tokens.some((token) => !token.weight))\n throw new BalancerError(BalancerErrorCode.MISSING_WEIGHT);\n };\n\n sortValues = ({\n pool,\n tokensIn,\n amountsIn,\n wrappedNativeAsset,\n }: Pick<\n JoinPoolParameters,\n 'pool' | 'wrappedNativeAsset' | 'amountsIn' | 'tokensIn'\n >): SortedValues => {\n const shouldUnwrapNativeAsset = tokensIn.some((a) => a === AddressZero);\n // Parse pool info into EVM amounts in order to match amountsIn scalling\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // sort inputs\n const [, sortedAmountsIn] = assetHelpers.sortTokens(\n tokensIn,\n amountsIn\n ) as [string[], string[]];\n const upScaledAmountsIn = _upscaleArray(\n sortedAmountsIn.map(BigInt),\n parsedPoolInfo.scalingFactors\n );\n // sort pool info\n return {\n ...parsedPoolInfo,\n sortedAmountsIn,\n upScaledAmountsIn,\n };\n };\n\n calcBptOutGivenExactTokensIn = ({\n upScaledBalances,\n weights,\n upScaledAmountsIn,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: Pick &\n Pick<\n SortedValues,\n | 'upScaledBalances'\n | 'weights'\n | 'upScaledAmountsIn'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n >): { expectedBPTOut: string; minBPTOut: string } => {\n const expectedBPTOut = WeightedMaths._calcBptOutGivenExactTokensIn(\n upScaledBalances,\n weights,\n upScaledAmountsIn,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n const minBPTOut = subSlippage(\n BigNumber.from(expectedBPTOut),\n BigNumber.from(slippage)\n ).toString();\n\n return {\n expectedBPTOut,\n minBPTOut,\n };\n };\n encodeJoinPool = ({\n sortedAmountsIn,\n poolTokens,\n poolId,\n joiner,\n minBPTOut,\n amountsIn,\n tokensIn,\n }: Pick &\n Pick & {\n joiner: Address;\n poolId: string;\n minBPTOut: string;\n }): Pick<\n JoinPoolAttributes,\n 'value' | 'data' | 'to' | 'functionName' | 'attributes'\n > => {\n const userData = WeightedPoolEncoder.joinExactTokensInForBPTOut(\n sortedAmountsIn,\n minBPTOut\n );\n const to = balancerVault;\n const functionName = 'joinPool';\n const attributes: JoinPool = {\n poolId,\n sender: joiner,\n recipient: joiner,\n joinPoolRequest: {\n assets: poolTokens,\n maxAmountsIn: sortedAmountsIn,\n userData,\n fromInternalBalance: false,\n },\n };\n const vaultInterface = Vault__factory.createInterface();\n // encode transaction data into an ABI byte string which can be sent to the network to be executed\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ]);\n\n const value = getEthValue(tokensIn, amountsIn);\n\n return {\n to,\n functionName,\n data,\n attributes,\n value,\n };\n };\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { parseFixed, formatFixed } from '@/lib/utils/math';\n\nconst SCALING_FACTOR = 18;\n\nexport class WeightedPoolLiquidity implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumWeight = BigNumber.from(0);\n let sumValue = BigNumber.from(0);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n if (!token.price?.usd) {\n continue;\n }\n\n let price: BigNumber;\n if (parseFloat(token.price.usd) < 1) {\n price = parseFixed(parseFloat(token.price.usd).toFixed(10), 10).mul(\n 1e8\n );\n } else {\n price = parseFixed(token.price.usd, SCALING_FACTOR);\n }\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n const weight = parseFixed(token.weight || '0', SCALING_FACTOR);\n\n const value = balance.mul(price);\n sumValue = sumValue.add(value);\n sumWeight = sumWeight.add(weight);\n }\n\n // Scale the known prices of x% of the pool to get value of 100% of the pool.\n const totalWeight = tokens.reduce(\n (total: BigNumber, token) =>\n total.add(parseFixed(token.weight || '0', SCALING_FACTOR)),\n BigNumber.from(0)\n );\n if (sumWeight.gt(0)) {\n const liquidity = sumValue.mul(totalWeight).div(sumWeight);\n return formatFixed(liquidity, SCALING_FACTOR * 2);\n }\n\n return '0';\n }\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, WeightedPool, ZERO } from '@balancer-labs/sor';\nimport { Pool, PoolToken } from '@/types';\n\nexport class WeightedPoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const isBPTAsToken = tokenIn === pool.address || tokenOut === pool.address;\n if (isBPTAsToken) {\n const bptAsToken: PoolToken = {\n address: pool.address,\n balance: pool.totalShares,\n decimals: 18,\n priceRate: '1',\n weight: '0',\n };\n pool.tokens.push(bptAsToken);\n pool.tokensList.push(pool.address);\n }\n const weightedPool = WeightedPool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = weightedPool.parsePoolPairData(tokenIn, tokenOut);\n const spotPrice = weightedPool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n if (isBPTAsToken) {\n pool.tokens.pop();\n pool.tokensList.pop();\n }\n return spotPrice;\n }\n}\n","import { WeightedPoolExit } from './concerns/weighted/exit.concern';\nimport { WeightedPoolJoin } from './concerns/weighted/join.concern';\nimport { WeightedPoolLiquidity } from './concerns/weighted/liquidity.concern';\nimport { WeightedPoolSpotPrice } from './concerns/weighted/spotPrice.concern';\nimport { WeightedPoolPriceImpact } from './concerns/weighted/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class Weighted implements PoolType {\n constructor(\n public exit: ExitConcern = new WeightedPoolExit(),\n public join: JoinConcern = new WeightedPoolJoin(),\n public liquidity: LiquidityConcern = new WeightedPoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new WeightedPoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new WeightedPoolPriceImpact()\n ) {}\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { formatFixed } from '@ethersproject/bignumber';\nimport { parseFixed } from '@/lib/utils/math';\nimport { Zero } from '@ethersproject/constants';\n\nconst SCALING_FACTOR = 18;\n\nexport class MetaStablePoolLiquidity implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = Zero;\n let sumValue = Zero;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(token.price.usd.toString(), SCALING_FACTOR);\n\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n\n const value = balance.mul(price);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance.gt(0)) {\n const avgPrice = sumValue.div(sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n\n const value = balance.mul(avgPrice);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n }\n\n return formatFixed(sumValue, SCALING_FACTOR * 2).toString();\n }\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, MetaStablePool, ZERO } from '@balancer-labs/sor';\nimport { Pool } from '@/types';\n\nexport class MetaStablePoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const metaStablePool = MetaStablePool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = metaStablePool.parsePoolPairData(tokenIn, tokenOut);\n return metaStablePool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n }\n}\n","import { MetaStablePoolLiquidity } from './concerns/metaStable/liquidity.concern';\nimport { MetaStablePoolSpotPrice } from './concerns/metaStable/spotPrice.concern';\nimport { StablePoolPriceImpact } from './concerns/stable/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n SpotPriceConcern,\n PriceImpactConcern,\n} from './concerns/types';\nimport { StablePoolExit } from '@/modules/pools/pool-types/concerns/stable/exit.concern';\nimport { StablePoolJoin } from '@/modules/pools/pool-types/concerns/stable/join.concern';\n\nexport class MetaStable implements PoolType {\n constructor(\n public exit: ExitConcern = new StablePoolExit(),\n public join: JoinConcern = new StablePoolJoin(),\n public liquidity: LiquidityConcern = new MetaStablePoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new MetaStablePoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new StablePoolPriceImpact()\n ) {}\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport {\n ExitConcern,\n ExitExactBPTInParameters,\n ExitExactTokensOutParameters,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n} from '../types';\n\nexport class StablePhantomPoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n /**\n * Exit type only supported when pool is in paused state and pause window\n * has expired, so this type of exit will not be supported.\n */\n throw new Error('Exit type not supported');\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n throw new Error('Exit type not supported');\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n throw new Error('Exit type not supported');\n };\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { JoinPoolParameters, JoinConcern, JoinPoolAttributes } from '../types';\n\nexport class StablePhantomPoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n throw new Error('Join type not supported');\n };\n}\n","import { StablePhantomPoolExit } from './concerns/stablePhantom/exit.concern';\nimport { StablePhantomPoolJoin } from './concerns/stablePhantom/join.concern';\nimport { StablePoolLiquidity } from './concerns/stable/liquidity.concern';\nimport { PhantomStablePoolSpotPrice } from './concerns/stablePhantom/spotPrice.concern';\nimport { StablePoolPriceImpact } from './concerns/stable/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n PriceImpactConcern,\n LiquidityConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class StablePhantom implements PoolType {\n constructor(\n public exit: ExitConcern = new StablePhantomPoolExit(),\n public join: JoinConcern = new StablePhantomPoolJoin(),\n public liquidity: LiquidityConcern = new StablePoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new PhantomStablePoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new StablePoolPriceImpact()\n ) {}\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { PriceImpactConcern } from '../types';\nimport { Pool } from '@/types';\n\nexport class LinearPriceImpact implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n throw new Error('Linear Pool bptZeroPriceImpact Not Implented');\n }\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n // Linear pools don't have price impact\n return '0';\n }\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport * as SOR from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts';\nimport { balancerVault } from '@/lib/constants/config';\nimport { insert, parsePoolInfo, removeItem } from '@/lib/utils';\nimport { _downscaleDownArray } from '@/lib/utils/solidityMaths';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { BasePoolEncoder } from '@/pool-base';\n\nimport {\n ExitConcern,\n ExitExactBPTInParameters,\n ExitExactTokensOutParameters,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n ExitPoolAttributes,\n ExitPool,\n} from '../types';\nimport { LinearPriceImpact } from '../linear/priceImpact.concern';\n\ninterface SortedValues {\n bptIndex: number;\n poolTokens: string[];\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n}\n\ntype ExactBPTInSortedValues = SortedValues & {\n scalingFactors: bigint[];\n};\n\ntype EncodeExitParams = Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'toInternalBalance'\n> & {\n poolTokens: string[];\n poolId: string;\n userData: string;\n minAmountsOut: string[];\n};\n\nexport class LinearPoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n throw new Error('Exit type not supported');\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n throw new Error('Exit type not supported');\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut: undefined,\n pool,\n shouldUnwrapNativeAsset: false,\n });\n // Recovery exits don't use rates. We use them as part of scalingFactor so default to 1 incase of issues\n pool.tokens.forEach((t) => (t.priceRate = '1'));\n const sortedValues = parsePoolInfo(pool);\n const { minAmountsOut, expectedAmountsOut } =\n this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData = BasePoolEncoder.recoveryModeExit(bptIn);\n\n // MinAmounts needs a value for BPT for encoding\n const minAmountsOutWithBpt = insert(\n minAmountsOut,\n sortedValues.bptIndex,\n '0'\n );\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut: minAmountsOutWithBpt,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new LinearPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt amount in EVM scale\n * @param pool the pool that is being exited\n */\n checkInputsExactBPTIn = ({\n bptIn,\n pool,\n }: Pick<\n ExitExactBPTInParameters,\n 'bptIn' | 'singleTokenOut' | 'pool' | 'shouldUnwrapNativeAsset'\n >): void => {\n if (BigNumber.from(bptIn).lte(0)) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n };\n\n calcTokensOutGivenExactBptIn = ({\n bptIndex,\n upScaledBalances,\n totalSharesEvm,\n scalingFactors,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n 'bptIndex' | 'upScaledBalances' | 'totalSharesEvm' | 'scalingFactors'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n const amountsOut = SOR.LinearMaths._calcTokensOutGivenExactBptIn(\n upScaledBalances,\n BigInt(bptIn),\n totalSharesEvm,\n bptIndex\n );\n // Maths return numbers scaled to 18 decimals. Must scale down to token decimals.\n const amountsOutScaledDown = _downscaleDownArray(\n amountsOut,\n scalingFactors\n );\n\n const expectedAmountsOut = removeItem(amountsOutScaledDown, bptIndex).map(\n (amount) => amount.toString()\n );\n // Apply slippage tolerance\n const minAmountsOut = expectedAmountsOut.map((amount) => {\n const minAmount = subSlippage(\n BigNumber.from(amount),\n BigNumber.from(slippage)\n );\n return minAmount.toString();\n });\n return { minAmountsOut, expectedAmountsOut };\n };\n\n /**\n * Encodes the function data and does the final building of the exit(with exact tokens out) transaction\n * @param params\n */\n encodeExitPool = (params: EncodeExitParams): ExitPoolAttributes => {\n const {\n exiter,\n poolId,\n minAmountsOut,\n userData,\n poolTokens,\n toInternalBalance,\n } = params;\n\n const to = balancerVault;\n const functionName = 'exitPool';\n const attributes: ExitPool = {\n poolId: poolId,\n sender: exiter,\n recipient: exiter,\n exitPoolRequest: {\n assets: poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n },\n };\n\n // encode transaction data into an ABI byte string which can be sent to the network to be executed\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.exitPoolRequest,\n ]);\n\n return {\n to,\n functionName,\n attributes,\n data,\n };\n };\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { JoinPoolParameters, JoinConcern, JoinPoolAttributes } from '../types';\n\nexport class LinearPoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n throw new Error('Join type not supported');\n };\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { parseFixed, formatFixed } from '@/lib/utils/math';\nimport { Zero } from '@ethersproject/constants';\n\nconst SCALING_FACTOR = 18;\nconst ONE = parseFixed('1', SCALING_FACTOR);\n\nexport class LinearPoolLiquidity implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = Zero;\n let sumValue = Zero;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(token.price.usd.toString(), SCALING_FACTOR);\n\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n const value = balance.mul(price);\n\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance.gt(0)) {\n const avgPrice = sumValue.div(sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const priceRate = parseFixed(token.priceRate || '1', SCALING_FACTOR);\n\n // Apply priceRate to scale the balance correctly\n const balance = parseFixed(token.balance, SCALING_FACTOR)\n .mul(priceRate)\n .div(ONE);\n\n const value = balance.mul(avgPrice);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n }\n\n return formatFixed(sumValue, SCALING_FACTOR * 2);\n }\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, LinearPool, ZERO } from '@balancer-labs/sor';\nimport { Pool } from '@/types';\n\nexport class LinearPoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const linearPool = LinearPool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = linearPool.parsePoolPairData(tokenIn, tokenOut);\n return linearPool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n }\n}\n","import { LinearPoolExit } from './concerns/linear/exit.concern';\nimport { LinearPoolJoin } from './concerns/linear/join.concern';\nimport { LinearPoolLiquidity } from './concerns/linear/liquidity.concern';\nimport { LinearPoolSpotPrice } from './concerns/linear/spotPrice.concern';\nimport { LinearPriceImpact } from './concerns/linear/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class Linear implements PoolType {\n constructor(\n public exit: ExitConcern = new LinearPoolExit(),\n public join: JoinConcern = new LinearPoolJoin(),\n public liquidity: LiquidityConcern = new LinearPoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new LinearPoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new LinearPriceImpact()\n ) {}\n}\n","import {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n} from '@/modules/pools/pool-types/concerns/types';\n\nexport class FXExitConcern implements ExitConcern {\n buildExitExactTokensOut(): ExitExactTokensOutAttributes {\n throw new Error('FXExitConcern Not implemented');\n }\n\n buildRecoveryExit(): ExitExactBPTInAttributes {\n throw new Error('FXExitConcern Not implemented');\n }\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { formatFixed } from '@ethersproject/bignumber';\nimport { parseFixed } from '@/lib/utils/math';\nimport { SolidityMaths } from '@/lib/utils/solidityMaths';\n\nconst SCALING_FACTOR = 18;\n\nexport class FXLiquidityConcern implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = BigInt(0);\n let sumValue = BigInt(0);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(\n token.price.usd.toString(),\n SCALING_FACTOR\n ).toBigInt();\n const balance = parseFixed(token.balance, SCALING_FACTOR).toBigInt();\n\n const value = SolidityMaths.mulDownFixed(balance, price);\n sumValue = SolidityMaths.add(sumValue, value);\n sumBalance = SolidityMaths.add(sumBalance, balance);\n }\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance > BigInt(0)) {\n const avgPrice = SolidityMaths.divDownFixed(sumValue, sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const balance = parseFixed(token.balance, SCALING_FACTOR).toBigInt();\n\n const value = SolidityMaths.mulDownFixed(balance, avgPrice);\n sumValue = SolidityMaths.add(sumValue, value);\n sumBalance = SolidityMaths.add(sumBalance, balance);\n }\n }\n return formatFixed(sumValue.toString(), SCALING_FACTOR).toString();\n }\n}\n","import { SpotPriceConcern } from '@/modules/pools/pool-types/concerns/types';\n\nexport class FXSpotPriceConcern implements SpotPriceConcern {\n calcPoolSpotPrice(): string {\n throw new Error('FXSpotPriceConcern Not implemented');\n }\n}\n","import { PriceImpactConcern } from '@/modules/pools/pool-types/concerns/types';\nimport { Pool } from '@/types';\n\nexport class FXPriceImpactConcern implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n console.log(pool, tokenAmounts);\n throw new Error('Not implemented');\n }\n\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n console.log(pool, tokenAmounts, bptAmount, isJoin);\n throw new Error('Not implemented');\n }\n}\n","import {\n JoinConcern,\n JoinPoolAttributes,\n} from '@/modules/pools/pool-types/concerns/types';\n\nexport class FXJoinConcern implements JoinConcern {\n buildJoin(): JoinPoolAttributes {\n throw new Error('FXJoinConcern Not implemented');\n }\n}\n","import { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from '@/modules/pools/pool-types/concerns/types';\nimport { FXExitConcern } from '@/modules/pools/pool-types/concerns/fx/exit.concern';\nimport { FXLiquidityConcern } from '@/modules/pools/pool-types/concerns/fx/liquidity.concern';\nimport { FXSpotPriceConcern } from '@/modules/pools/pool-types/concerns/fx/spotPrice.concern';\nimport { FXPriceImpactConcern } from '@/modules/pools/pool-types/concerns/fx/priceImpact.concern';\nimport { FXJoinConcern } from '@/modules/pools/pool-types/concerns/fx/join.concern';\n\nexport class FX implements PoolType {\n constructor(\n public exit: ExitConcern = new FXExitConcern(),\n public liquidity: LiquidityConcern = new FXLiquidityConcern(),\n public spotPriceCalculator: SpotPriceConcern = new FXSpotPriceConcern(),\n public priceImpactCalculator: PriceImpactConcern = new FXPriceImpactConcern(),\n public join: JoinConcern = new FXJoinConcern()\n ) {}\n}\n","import {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactBPTInParameters,\n ExitExactTokensOutAttributes,\n ExitExactTokensOutParameters,\n} from '@/modules/pools/pool-types/concerns/types';\n\nexport class GyroExitConcern implements ExitConcern {\n buildExitExactTokensOut({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes {\n console.log(\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset\n );\n throw new Error('Not implemented');\n }\n\n buildRecoveryExit({\n exiter,\n pool,\n bptIn,\n slippage,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage'\n >): ExitExactBPTInAttributes {\n console.log(exiter, pool, bptIn, slippage);\n throw new Error('Not implemented');\n }\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { formatFixed } from '@ethersproject/bignumber';\nimport { parseFixed } from '@/lib/utils/math';\nimport { SolidityMaths } from '@/lib/utils/solidityMaths';\n\nconst SCALING_FACTOR = 18;\n\nexport class GyroLiquidityConcern implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = BigInt(0);\n let sumValue = BigInt(0);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(\n token.price.usd.toString(),\n SCALING_FACTOR\n ).toBigInt();\n const balance = parseFixed(token.balance, SCALING_FACTOR).toBigInt();\n\n const value = SolidityMaths.mulDownFixed(balance, price);\n sumValue = SolidityMaths.add(sumValue, value);\n sumBalance = SolidityMaths.add(sumBalance, balance);\n }\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance > BigInt(0)) {\n const avgPrice = SolidityMaths.divDownFixed(sumValue, sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const balance = parseFixed(token.balance, SCALING_FACTOR).toBigInt();\n\n const value = SolidityMaths.mulDownFixed(balance, avgPrice);\n sumValue = SolidityMaths.add(sumValue, value);\n sumBalance = SolidityMaths.add(sumBalance, balance);\n }\n }\n return formatFixed(sumValue.toString(), SCALING_FACTOR).toString();\n }\n}\n","import { SpotPriceConcern } from '@/modules/pools/pool-types/concerns/types';\n\nexport class GyroSpotPriceConcern implements SpotPriceConcern {\n calcPoolSpotPrice(): string {\n throw new Error('GyroSpotPriceConcern Not implemented');\n }\n}\n","import { PriceImpactConcern } from '@/modules/pools/pool-types/concerns/types';\nimport { Pool } from '@/types';\n\nexport class GyroPriceImpactConcern implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n console.log(pool, tokenAmounts);\n throw new Error('Not implemented');\n }\n\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n console.log(pool, tokenAmounts, bptAmount, isJoin);\n throw new Error('Not implemented');\n }\n}\n","import {\n JoinConcern,\n JoinPoolAttributes,\n} from '@/modules/pools/pool-types/concerns/types';\n\nexport class GyroJoinConcern implements JoinConcern {\n buildJoin(): JoinPoolAttributes {\n throw new Error('GyroJoinConcern Not implemented');\n }\n}\n","import { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from '@/modules/pools/pool-types/concerns/types';\nimport { GyroExitConcern } from '@/modules/pools/pool-types/concerns/gyro/exit.concern';\nimport { GyroLiquidityConcern } from '@/modules/pools/pool-types/concerns/gyro/liquidity.concern';\nimport { GyroSpotPriceConcern } from '@/modules/pools/pool-types/concerns/gyro/spotPrice.concern';\nimport { GyroPriceImpactConcern } from '@/modules/pools/pool-types/concerns/gyro/priceImpact.concern';\nimport { GyroJoinConcern } from '@/modules/pools/pool-types/concerns/gyro/join.concern';\n\nexport class Gyro implements PoolType {\n constructor(\n public exit: ExitConcern = new GyroExitConcern(),\n public liquidity: LiquidityConcern = new GyroLiquidityConcern(),\n public spotPriceCalculator: SpotPriceConcern = new GyroSpotPriceConcern(),\n public priceImpactCalculator: PriceImpactConcern = new GyroPriceImpactConcern(),\n public join: JoinConcern = new GyroJoinConcern()\n ) {}\n}\n","import { BalancerSdkConfig, PoolType } from '@/types';\nimport { Stable } from './pool-types/stable.module';\nimport { ComposableStable } from './pool-types/composableStable.module';\nimport { Weighted } from './pool-types/weighted.module';\nimport { MetaStable } from './pool-types/metaStable.module';\nimport { StablePhantom } from './pool-types/stablePhantom.module';\nimport { Linear } from './pool-types/linear.module';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { isLinearish } from '@/lib/utils';\nimport { FX } from '@/modules/pools/pool-types/fx.module';\nimport { Gyro } from '@/modules/pools/pool-types/gyro.module';\n\n/**\n * Wrapper around pool type specific methods.\n *\n * Returns a class instance of a type specific method handlers.\n */\nexport class PoolTypeConcerns {\n constructor(\n config: BalancerSdkConfig,\n public weighted = new Weighted(),\n public stable = new Stable(),\n public composableStable = new ComposableStable(),\n public metaStable = new MetaStable(),\n public stablePhantom = new StablePhantom(),\n public linear = new Linear()\n ) {}\n\n static from(\n poolType: PoolType\n ):\n | Weighted\n | Stable\n | ComposableStable\n | MetaStable\n | StablePhantom\n | Linear {\n // Calculate spot price using pool type\n switch (poolType) {\n case 'ComposableStable': {\n return new ComposableStable();\n }\n case 'FX': {\n return new FX();\n }\n case 'GyroE':\n case 'Gyro2':\n case 'Gyro3': {\n return new Gyro();\n }\n case 'MetaStable': {\n return new MetaStable();\n }\n case 'Stable': {\n return new Stable();\n }\n case 'StablePhantom': {\n return new StablePhantom();\n }\n case 'Investment':\n case 'LiquidityBootstrapping':\n case 'Weighted': {\n return new Weighted();\n }\n default: {\n // Handles all Linear pool types\n if (isLinearish(poolType)) return new Linear();\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n }\n }\n}\n","import { Findable, Pool, PoolToken, Price } from '@/types';\nimport { PoolAttribute } from '../data';\nimport { PoolTypeConcerns } from '../pools/pool-type-concerns';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { formatFixed, parseFixed } from '@/lib/utils/math';\n\nconst SCALE = 18;\n\nexport interface PoolBPTValue {\n address: string;\n liquidity: string;\n}\n\nexport class Liquidity {\n constructor(\n private pools: Findable,\n private tokenPrices: Findable\n ) {}\n\n async getLiquidity(pool: Pool): Promise {\n // Remove any tokens with same address as pool as they are pre-printed BPT\n const parsedTokens = pool.tokens.filter((token) => {\n return token.address !== pool.address;\n });\n\n // For all tokens that are pools (BPT), recurse into them and fetch their liquidity\n const subPoolLiquidity = await Promise.all(\n parsedTokens.map(async (token) => {\n const pool = await this.pools.findBy('address', token.address);\n if (!pool) return;\n\n const liquidity = parseFixed(await this.getLiquidity(pool), SCALE);\n const totalBPT = parseFixed(pool.totalShares, SCALE);\n const bptInParentPool = parseFixed(token.balance, SCALE);\n const liquidityInParentPool = totalBPT.eq(0)\n ? 0\n : liquidity.mul(bptInParentPool).div(totalBPT);\n\n return {\n address: pool.address,\n liquidity: liquidityInParentPool.toString(),\n };\n })\n );\n\n const totalSubPoolLiquidity = subPoolLiquidity.reduce(\n (totalLiquidity, subPool) => {\n return totalLiquidity.add(\n subPool ? subPool.liquidity : BigNumber.from(0)\n );\n },\n BigNumber.from(0)\n );\n\n // Filter tokens within pool that are not BPT themselves\n const nonPoolTokens = parsedTokens.filter((token) => {\n return !subPoolLiquidity.find((pool) => pool?.address === token.address);\n });\n\n // Update price using tokenPrices repository\n const nonPoolTokensWithUpdatedPrice: PoolToken[] = await Promise.all(\n nonPoolTokens.map(async (token) => {\n const tokenPrice = await this.tokenPrices.find(token.address);\n const poolToken: PoolToken = {\n address: token.address,\n decimals: token.decimals,\n priceRate: token.priceRate,\n price: (tokenPrice?.usd && tokenPrice) || {\n usd: token.token?.latestUSDPrice,\n },\n balance: token.balance,\n weight: token.weight,\n };\n return poolToken;\n })\n );\n\n // TODO: Just in case we need it soon. Otherwise remove without mercy.\n // Any of the tokens is missing the price, use subgraph totalLiquidity\n // if(nonPoolTokensWithUpdatedPrice.map((t) => t.price?.usd).indexOf(undefined) > -1) {\n // return pool.totalLiquidity\n // }\n\n const tokenLiquidity = PoolTypeConcerns.from(\n pool.poolType\n ).liquidity.calcTotal(nonPoolTokensWithUpdatedPrice);\n\n const parsedTokenLiquidity = parseFixed(tokenLiquidity, SCALE);\n\n const totalLiquidity = totalSubPoolLiquidity.add(parsedTokenLiquidity);\n\n return formatFixed(totalLiquidity, SCALE);\n }\n\n async getBptPrice(pool: Pool): Promise {\n const liquidity = await this.getLiquidity(pool);\n return (parseFloat(liquidity) / parseFloat(pool.totalShares)).toString();\n }\n}\n","import { LiquidityGauge } from '@/modules/data';\nimport { BigNumber } from '@ethersproject/bignumber';\n\nexport interface Tokens {\n [tokenAddress: string]: BigNumber;\n}\n\nexport interface GaugeTokens {\n [gaugeAddress: string]: Tokens;\n}\n\nexport interface ReduceGaugeTokens {\n (p: GaugeTokens, address: string, index: number): GaugeTokens;\n}\n\nexport interface ReduceGaugeRewards {\n (\n rewards: GaugeTokens,\n path: { gauge: string; token: string },\n index: number\n ): GaugeTokens;\n}\n\nexport const ZERO = BigNumber.from('0');\n\nexport const filterTokens = (tokens: Tokens): Tokens => {\n if (!tokens) return {};\n return Object.keys(tokens)\n .filter((token) => tokens[token].gt(ZERO))\n .reduce((obj: Tokens, token) => {\n obj[token] = tokens[token];\n return obj;\n }, {});\n};\n\nexport const populateGauge = (\n gauge: LiquidityGauge,\n rewards: GaugeTokens,\n tokens: GaugeTokens\n): LiquidityGauge => {\n if (!rewards[gauge.address] && !tokens[gauge.address]) return gauge;\n const claimableRewards = filterTokens(rewards[gauge.address]);\n const claimableTokens = filterTokens(tokens[gauge.address]);\n gauge.claimableTokens ||= {\n ...claimableRewards,\n ...claimableTokens,\n };\n return gauge;\n};\n\nexport const populateGauges = (\n gauges: LiquidityGauge[],\n claimableRewards: GaugeTokens,\n claimableTokens: GaugeTokens\n): LiquidityGauge[] => {\n return gauges\n .map((gauge) => populateGauge(gauge, claimableRewards, claimableTokens))\n .filter(\n (it) => it.claimableTokens && Object.keys(it.claimableTokens).length\n );\n};\n\nexport const reduceClaimableRewards = (res0x: string[]): ReduceGaugeRewards => {\n return (\n rewards: GaugeTokens,\n path: { gauge: string; token: string },\n index: number\n ): GaugeTokens => {\n const value = BigNumber.from(`${res0x[index]}`);\n if (value.gt(ZERO)) {\n rewards[path.gauge] ||= {};\n rewards[path.gauge][path.token] = value;\n }\n return rewards;\n };\n};\n\nexport const reduceClaimableTokens = (\n res0x: string[],\n balAddress: string\n): ReduceGaugeTokens => {\n return (p: GaugeTokens, address: string, index: number): GaugeTokens => {\n const value = BigNumber.from(`${res0x[index]}`);\n if (value.gt(ZERO)) {\n p[address] ||= {};\n p[address][balAddress] = value;\n }\n return p;\n };\n};\n\nexport const reduceRewardTokens = (\n result: { [gaugeAddress: string]: string[] },\n gauge: LiquidityGauge\n): { [gaugeAddress: string]: string[] } => {\n if (gauge.rewardTokens) {\n for (const key of Object.keys(gauge.rewardTokens)) {\n result[gauge.id] ||= [];\n result[gauge.id].push(key);\n }\n }\n return result;\n};\n","import { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Network } from '@/lib/constants';\nimport { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { Multicall } from '@/contracts';\nimport {\n FeeDistributorRepository,\n LiquidityGauge,\n LiquidityGaugeSubgraphRPCProvider,\n} from '@/modules/data';\nimport { Interface } from '@ethersproject/abi';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport {\n GaugeTokens,\n populateGauges,\n reduceClaimableRewards,\n reduceClaimableTokens,\n reduceRewardTokens,\n ZERO,\n} from './helper';\n\nconst liquidityGaugeV5Interface = new Interface([\n 'function claim_rewards(address sender, address receiver) returns (uint256)',\n 'function claimable_tokens(address addr) view returns (uint256)',\n 'function claimable_reward(address addr, address token) view returns (uint256)',\n]);\n\nconst balancerMinterInterface = new Interface([\n 'function mintMany(address[] gauges) returns (uint256)',\n]);\n\nconst gaugeClaimHelperInterface = new Interface([\n 'function getPendingRewards(address gauge, address user, address token) view returns (uint256)',\n 'function claimRewardsFromGauges(address[] gauges, address user)',\n]);\n\nexport interface TransactionData {\n to: string;\n from: string;\n callData: string;\n tokensOut: string[];\n expectedTokensValue: BigNumber[];\n functionName: string;\n}\n\nexport interface TokenBalance {\n [token: string]: BigNumber;\n}\n\nexport interface IClaimService {\n getClaimableRewardTokens(userAddress: string): Promise;\n buildClaimRewardTokensRequest(\n gaugeAddresses: string[],\n userAddress: string\n ): Promise;\n getClaimableVeBalTokens(\n userAddress: string,\n claimableTokens: string[]\n ): Promise;\n buildClaimVeBalTokensRequest(\n userAddress: string,\n claimableTokens: string[]\n ): Promise;\n}\n\nexport class ClaimService implements IClaimService {\n private readonly liquidityGauges: LiquidityGaugeSubgraphRPCProvider;\n private readonly gaugeClaimHelperAddress?: string;\n private readonly balancerMinterAddress?: string;\n private readonly chainId: Network;\n private readonly feeDistributor: FeeDistributorRepository | undefined;\n\n constructor(\n liquidityGauges: LiquidityGaugeSubgraphRPCProvider,\n feeDistributor: FeeDistributorRepository | undefined,\n chainId: Network,\n private multicall: Multicall,\n gaugeClaimHelperAddress?: string,\n balancerMinterAddress?: string\n ) {\n this.liquidityGauges = liquidityGauges;\n this.feeDistributor = feeDistributor;\n this.chainId = chainId;\n this.gaugeClaimHelperAddress = gaugeClaimHelperAddress;\n this.balancerMinterAddress = balancerMinterAddress;\n }\n\n /**\n * Get a list of liquidity gauges populated with the claimable tokens for the user.\n *\n * @param userAddress the user's account address\n */\n async getClaimableRewardTokens(\n userAddress: string\n ): Promise {\n const gauges = await this.getGauges();\n if (!gauges.length)\n throw new BalancerError(BalancerErrorCode.GAUGES_NOT_FOUND);\n\n const gaugeAddresses = gauges.map((it) => it.address);\n const rewardTokens = this.getRewardTokens(gauges);\n\n const claimableTokens = await this.retrieveClaimableTokens(\n gaugeAddresses,\n userAddress\n );\n const claimableRewards = await this.retrieveClaimableRewards(\n rewardTokens,\n userAddress\n );\n return populateGauges(gauges, claimableRewards, claimableTokens);\n }\n\n /**\n * Returns the data to be signed to claim the tokens on a list of liquidity gauges.\n * Only the tokens with balance will be claimed.\n *\n * @param gaugeAddresses the liquidity gauges' addresses\n * @param userAddress the user's account address\n * @throws error if no claimable token is found\n */\n async buildClaimRewardTokensRequest(\n gaugeAddresses: string[],\n userAddress: string\n ): Promise {\n if (this.chainId === 1 || this.chainId === 5) {\n if (!this.balancerMinterAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED\n );\n } else {\n if (!this.gaugeClaimHelperAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED\n );\n }\n const allGauges = await this.getClaimableRewardTokens(userAddress);\n const gauges = allGauges\n .filter((it) =>\n gaugeAddresses\n .map((it) => it.toLowerCase())\n .includes(it.address.toLowerCase())\n )\n .filter(\n (it) => it.claimableTokens && Object.keys(it.claimableTokens).length\n );\n const claimableTokens = Array.from(\n new Set(\n gauges\n .map((gauge) => gauge.claimableTokens)\n .map((tokens) => Object.keys(tokens || {}))\n .flatMap((it) => it)\n )\n );\n if (!claimableTokens.length)\n throw new BalancerError(BalancerErrorCode.GAUGES_REWARD_TOKEN_EMPTY);\n const expectedValues = claimableTokens.map((tokenAddress) => {\n return gauges.reduce((value: BigNumber, gauge) => {\n if (\n gauge.claimableTokens &&\n gauge.claimableTokens[tokenAddress] &&\n gauge.claimableTokens[tokenAddress] !== ZERO\n )\n value = gauge.claimableTokens[tokenAddress].add(value);\n return value;\n }, BigNumber.from(0));\n });\n if (!expectedValues.length || expectedValues.every((it) => it.eq(ZERO)))\n throw new BalancerError(BalancerErrorCode.REWARD_TOKEN_ZERO);\n if (this.chainId === 1 || this.chainId === 5) {\n if (!this.balancerMinterAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED\n );\n const callData = balancerMinterInterface.encodeFunctionData('mintMany', [\n gaugeAddresses,\n ]);\n return {\n to: this.balancerMinterAddress,\n from: userAddress,\n callData: callData,\n tokensOut: claimableTokens,\n expectedTokensValue: expectedValues,\n functionName: 'mintMany',\n };\n } else {\n if (!this.gaugeClaimHelperAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED\n );\n const callData = gaugeClaimHelperInterface.encodeFunctionData(\n 'claimRewardsFromGauges',\n [gaugeAddresses, userAddress]\n );\n return {\n to: this.gaugeClaimHelperAddress,\n from: userAddress,\n callData: callData,\n tokensOut: claimableTokens,\n expectedTokensValue: expectedValues,\n functionName: 'claimRewardsFromGauges',\n };\n }\n }\n\n /**\n * returns all the tokens' balance for protocol revenue and veBal incentives.\n *\n * @param userAddress the user's account address\n * @param claimableTokens the list of tokens for which the balance is desired\n */\n async getClaimableVeBalTokens(\n userAddress: string,\n claimableTokens: string[]\n ): Promise {\n if (!this.feeDistributor)\n throw new BalancerError(BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED);\n return this.feeDistributor?.getClaimableBalances(\n userAddress,\n claimableTokens\n );\n }\n\n /**\n * Returns the data to be signed to claim the tokens for protocol revenue and veBal incentives.\n *\n * @param userAddress the user's account address\n * @param claimableTokens the list of tokens to be claimed\n * @throws error if no claimable token is found\n */\n async buildClaimVeBalTokensRequest(\n userAddress: string,\n claimableTokens: string[]\n ): Promise {\n if (!this.feeDistributor)\n throw new BalancerError(BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED);\n const tokenBalance = await this.feeDistributor.getClaimableBalances(\n userAddress,\n claimableTokens\n );\n const expectedTokensValue = claimableTokens.map(\n (it) => tokenBalance[it] ?? ZERO\n );\n if (expectedTokensValue.every((it) => it.eq(ZERO)))\n throw new BalancerError(BalancerErrorCode.REWARD_TOKEN_ZERO);\n const callData = this.feeDistributor.claimBalances(\n userAddress,\n claimableTokens\n );\n return {\n to: this.feeDistributor.feeDistributor.address,\n from: userAddress,\n callData: callData,\n tokensOut: claimableTokens,\n expectedTokensValue: expectedTokensValue,\n functionName: 'claimTokens',\n };\n }\n\n // Private Functions\n\n private async getGauges(): Promise {\n return await this.liquidityGauges.fetch();\n }\n\n private getRewardTokens(gauges: LiquidityGauge[]): {\n [gaugeAddress: string]: string[];\n } {\n return gauges.reduce(reduceRewardTokens, {});\n }\n\n private async retrieveClaimableRewards(\n rewardTokens: { [address: string]: string[] },\n userAddress: string\n ): Promise {\n const gaugeAddresses = Object.keys(rewardTokens);\n const { payload, paths } = this.getPayload(\n gaugeAddresses,\n rewardTokens,\n userAddress\n );\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n return paths.reduce(reduceClaimableRewards(res0x), {});\n }\n\n private getPayload(\n gaugeAddresses: string[],\n rewardTokens: { [address: string]: string[] },\n userAddress: string\n ): {\n payload: { target: string; callData: string }[];\n paths: { gauge: string; token: string }[];\n } {\n const payload = [];\n const paths: { gauge: string; token: string }[] = [];\n for (const gaugeAddress of gaugeAddresses) {\n for (const tokenAddress of rewardTokens[gaugeAddress]) {\n paths.push({ gauge: gaugeAddress, token: tokenAddress });\n payload.push(\n this.getArguments(userAddress, gaugeAddress, tokenAddress)\n );\n }\n }\n return { payload, paths };\n }\n\n private getArguments(\n userAddress: string,\n gaugeAddress: string,\n tokenAddress: string\n ): { target: string; callData: string } {\n if (this.chainId === 1 || this.chainId === 5) {\n return {\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'claimable_reward',\n [userAddress, tokenAddress]\n ),\n };\n }\n if (!this.gaugeClaimHelperAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED\n );\n return {\n target: this.gaugeClaimHelperAddress,\n callData: gaugeClaimHelperInterface.encodeFunctionData(\n 'getPendingRewards',\n [gaugeAddress, userAddress, tokenAddress]\n ),\n };\n }\n\n private async retrieveClaimableTokens(\n gaugeAddresses: string[],\n userAddress: string\n ): Promise {\n if (this.chainId === Network.MAINNET || this.chainId === Network.GOERLI) {\n const balAddress = BALANCER_NETWORK_CONFIG[this.chainId].addresses.tokens\n .bal as string;\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'claimable_tokens',\n [userAddress]\n ),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n return gaugeAddresses.reduce(\n reduceClaimableTokens(res0x, balAddress),\n {}\n );\n }\n return {};\n }\n}\n","import { BigNumberish } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport { SOR, SwapTypes, SwapInfo } from '@balancer-labs/sor';\nimport { SwapType, BatchSwapStep, FundManagement } from './types';\nimport { Vault } from '@/contracts/Vault';\n\n/*\n * queryBatchSwap simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\n * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\n *\n * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\n * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\n * receives are the same that an equivalent `batchSwap` call would receive.\n */\nexport async function queryBatchSwap(\n vaultContract: Vault,\n swapType: SwapType,\n swaps: BatchSwapStep[],\n assets: string[]\n): Promise {\n const funds: FundManagement = {\n sender: AddressZero,\n recipient: AddressZero,\n fromInternalBalance: false,\n toInternalBalance: false,\n };\n\n try {\n const deltas = await vaultContract.callStatic.queryBatchSwap(\n swapType,\n swaps,\n assets,\n funds\n );\n return deltas.map((d: BigNumberish) => d.toString());\n } catch (err) {\n throw `queryBatchSwap call error: ${err}`;\n }\n}\n\n/*\nUse SOR to get swapInfo for tokenIn>tokenOut.\nSwapInfos.swaps has path information.\n*/\nexport async function getSorSwapInfo(\n tokenIn: string,\n tokenOut: string,\n swapType: SwapType,\n amount: string,\n sor: SOR\n): Promise {\n const swapTypeSOR: SwapTypes =\n swapType === SwapType.SwapExactIn\n ? SwapTypes.SwapExactIn\n : SwapTypes.SwapExactOut;\n const swapInfo = await sor.getSwaps(\n tokenIn.toLowerCase(),\n tokenOut.toLowerCase(),\n swapTypeSOR,\n amount\n );\n return swapInfo;\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import { __assign } from \"tslib\";\nimport { parse } from 'graphql';\nvar docCache = new Map();\nvar fragmentSourceMap = new Map();\nvar printFragmentWarnings = true;\nvar experimentalFragmentVariables = false;\nfunction normalize(string) {\n return string.replace(/[\\s,]+/g, ' ').trim();\n}\nfunction cacheKeyFromLoc(loc) {\n return normalize(loc.source.body.substring(loc.start, loc.end));\n}\nfunction processFragments(ast) {\n var seenKeys = new Set();\n var definitions = [];\n ast.definitions.forEach(function (fragmentDefinition) {\n if (fragmentDefinition.kind === 'FragmentDefinition') {\n var fragmentName = fragmentDefinition.name.value;\n var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc);\n var sourceKeySet = fragmentSourceMap.get(fragmentName);\n if (sourceKeySet && !sourceKeySet.has(sourceKey)) {\n if (printFragmentWarnings) {\n console.warn(\"Warning: fragment with name \" + fragmentName + \" already exists.\\n\"\n + \"graphql-tag enforces all fragment names across your application to be unique; read more about\\n\"\n + \"this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names\");\n }\n }\n else if (!sourceKeySet) {\n fragmentSourceMap.set(fragmentName, sourceKeySet = new Set);\n }\n sourceKeySet.add(sourceKey);\n if (!seenKeys.has(sourceKey)) {\n seenKeys.add(sourceKey);\n definitions.push(fragmentDefinition);\n }\n }\n else {\n definitions.push(fragmentDefinition);\n }\n });\n return __assign(__assign({}, ast), { definitions: definitions });\n}\nfunction stripLoc(doc) {\n var workSet = new Set(doc.definitions);\n workSet.forEach(function (node) {\n if (node.loc)\n delete node.loc;\n Object.keys(node).forEach(function (key) {\n var value = node[key];\n if (value && typeof value === 'object') {\n workSet.add(value);\n }\n });\n });\n var loc = doc.loc;\n if (loc) {\n delete loc.startToken;\n delete loc.endToken;\n }\n return doc;\n}\nfunction parseDocument(source) {\n var cacheKey = normalize(source);\n if (!docCache.has(cacheKey)) {\n var parsed = parse(source, {\n experimentalFragmentVariables: experimentalFragmentVariables,\n allowLegacyFragmentVariables: experimentalFragmentVariables\n });\n if (!parsed || parsed.kind !== 'Document') {\n throw new Error('Not a valid GraphQL document.');\n }\n docCache.set(cacheKey, stripLoc(processFragments(parsed)));\n }\n return docCache.get(cacheKey);\n}\nexport function gql(literals) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof literals === 'string') {\n literals = [literals];\n }\n var result = literals[0];\n args.forEach(function (arg, i) {\n if (arg && arg.kind === 'Document') {\n result += arg.loc.source.body;\n }\n else {\n result += arg;\n }\n result += literals[i + 1];\n });\n return parseDocument(result);\n}\nexport function resetCaches() {\n docCache.clear();\n fragmentSourceMap.clear();\n}\nexport function disableFragmentWarnings() {\n printFragmentWarnings = false;\n}\nexport function enableExperimentalFragmentVariables() {\n experimentalFragmentVariables = true;\n}\nexport function disableExperimentalFragmentVariables() {\n experimentalFragmentVariables = false;\n}\nvar extras = {\n gql: gql,\n resetCaches: resetCaches,\n disableFragmentWarnings: disableFragmentWarnings,\n enableExperimentalFragmentVariables: enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables: disableExperimentalFragmentVariables\n};\n(function (gql_1) {\n gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;\n})(gql || (gql = {}));\ngql[\"default\"] = gql;\nexport default gql;\n//# sourceMappingURL=index.js.map","import { GraphQLClient } from 'graphql-request';\nimport * as Dom from 'graphql-request/dist/types.dom';\nimport gql from 'graphql-tag';\nexport type Maybe = T | null;\nexport type InputMaybe = Maybe;\nexport type Exact = { [K in keyof T]: T[K] };\nexport type MakeOptional = Omit & { [SubKey in K]?: Maybe };\nexport type MakeMaybe = Omit & { [SubKey in K]: Maybe };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: string;\n String: string;\n Boolean: boolean;\n Int: number;\n Float: number;\n BigDecimal: string;\n BigInt: string;\n Bytes: string;\n Int8: any;\n};\n\nexport type AmpUpdate = {\n __typename?: 'AmpUpdate';\n endAmp: Scalars['BigInt'];\n endTimestamp: Scalars['BigInt'];\n id: Scalars['ID'];\n poolId: Pool;\n scheduledTimestamp: Scalars['Int'];\n startAmp: Scalars['BigInt'];\n startTimestamp: Scalars['BigInt'];\n};\n\nexport type AmpUpdate_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n endAmp?: InputMaybe;\n endAmp_gt?: InputMaybe;\n endAmp_gte?: InputMaybe;\n endAmp_in?: InputMaybe>;\n endAmp_lt?: InputMaybe;\n endAmp_lte?: InputMaybe;\n endAmp_not?: InputMaybe;\n endAmp_not_in?: InputMaybe>;\n endTimestamp?: InputMaybe;\n endTimestamp_gt?: InputMaybe;\n endTimestamp_gte?: InputMaybe;\n endTimestamp_in?: InputMaybe>;\n endTimestamp_lt?: InputMaybe;\n endTimestamp_lte?: InputMaybe;\n endTimestamp_not?: InputMaybe;\n endTimestamp_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n scheduledTimestamp?: InputMaybe;\n scheduledTimestamp_gt?: InputMaybe;\n scheduledTimestamp_gte?: InputMaybe;\n scheduledTimestamp_in?: InputMaybe>;\n scheduledTimestamp_lt?: InputMaybe;\n scheduledTimestamp_lte?: InputMaybe;\n scheduledTimestamp_not?: InputMaybe;\n scheduledTimestamp_not_in?: InputMaybe>;\n startAmp?: InputMaybe;\n startAmp_gt?: InputMaybe;\n startAmp_gte?: InputMaybe;\n startAmp_in?: InputMaybe>;\n startAmp_lt?: InputMaybe;\n startAmp_lte?: InputMaybe;\n startAmp_not?: InputMaybe;\n startAmp_not_in?: InputMaybe>;\n startTimestamp?: InputMaybe;\n startTimestamp_gt?: InputMaybe;\n startTimestamp_gte?: InputMaybe;\n startTimestamp_in?: InputMaybe>;\n startTimestamp_lt?: InputMaybe;\n startTimestamp_lte?: InputMaybe;\n startTimestamp_not?: InputMaybe;\n startTimestamp_not_in?: InputMaybe>;\n};\n\nexport enum AmpUpdate_OrderBy {\n EndAmp = 'endAmp',\n EndTimestamp = 'endTimestamp',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n ScheduledTimestamp = 'scheduledTimestamp',\n StartAmp = 'startAmp',\n StartTimestamp = 'startTimestamp'\n}\n\nexport type Balancer = {\n __typename?: 'Balancer';\n id: Scalars['ID'];\n poolCount: Scalars['Int'];\n pools?: Maybe>;\n protocolFeesCollector?: Maybe;\n totalLiquidity: Scalars['BigDecimal'];\n totalProtocolFee?: Maybe;\n totalSwapCount: Scalars['BigInt'];\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n};\n\n\nexport type BalancerPoolsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type BalancerSnapshot = {\n __typename?: 'BalancerSnapshot';\n id: Scalars['ID'];\n poolCount: Scalars['Int'];\n timestamp: Scalars['Int'];\n totalLiquidity: Scalars['BigDecimal'];\n totalProtocolFee?: Maybe;\n totalSwapCount: Scalars['BigInt'];\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n vault: Balancer;\n};\n\nexport type BalancerSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolCount?: InputMaybe;\n poolCount_gt?: InputMaybe;\n poolCount_gte?: InputMaybe;\n poolCount_in?: InputMaybe>;\n poolCount_lt?: InputMaybe;\n poolCount_lte?: InputMaybe;\n poolCount_not?: InputMaybe;\n poolCount_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n totalLiquidity?: InputMaybe;\n totalLiquidity_gt?: InputMaybe;\n totalLiquidity_gte?: InputMaybe;\n totalLiquidity_in?: InputMaybe>;\n totalLiquidity_lt?: InputMaybe;\n totalLiquidity_lte?: InputMaybe;\n totalLiquidity_not?: InputMaybe;\n totalLiquidity_not_in?: InputMaybe>;\n totalProtocolFee?: InputMaybe;\n totalProtocolFee_gt?: InputMaybe;\n totalProtocolFee_gte?: InputMaybe;\n totalProtocolFee_in?: InputMaybe>;\n totalProtocolFee_lt?: InputMaybe;\n totalProtocolFee_lte?: InputMaybe;\n totalProtocolFee_not?: InputMaybe;\n totalProtocolFee_not_in?: InputMaybe>;\n totalSwapCount?: InputMaybe;\n totalSwapCount_gt?: InputMaybe;\n totalSwapCount_gte?: InputMaybe;\n totalSwapCount_in?: InputMaybe>;\n totalSwapCount_lt?: InputMaybe;\n totalSwapCount_lte?: InputMaybe;\n totalSwapCount_not?: InputMaybe;\n totalSwapCount_not_in?: InputMaybe>;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n vault?: InputMaybe;\n vault_?: InputMaybe;\n vault_contains?: InputMaybe;\n vault_contains_nocase?: InputMaybe;\n vault_ends_with?: InputMaybe;\n vault_ends_with_nocase?: InputMaybe;\n vault_gt?: InputMaybe;\n vault_gte?: InputMaybe;\n vault_in?: InputMaybe>;\n vault_lt?: InputMaybe;\n vault_lte?: InputMaybe;\n vault_not?: InputMaybe;\n vault_not_contains?: InputMaybe;\n vault_not_contains_nocase?: InputMaybe;\n vault_not_ends_with?: InputMaybe;\n vault_not_ends_with_nocase?: InputMaybe;\n vault_not_in?: InputMaybe>;\n vault_not_starts_with?: InputMaybe;\n vault_not_starts_with_nocase?: InputMaybe;\n vault_starts_with?: InputMaybe;\n vault_starts_with_nocase?: InputMaybe;\n};\n\nexport enum BalancerSnapshot_OrderBy {\n Id = 'id',\n PoolCount = 'poolCount',\n Timestamp = 'timestamp',\n TotalLiquidity = 'totalLiquidity',\n TotalProtocolFee = 'totalProtocolFee',\n TotalSwapCount = 'totalSwapCount',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume',\n Vault = 'vault',\n VaultId = 'vault__id',\n VaultPoolCount = 'vault__poolCount',\n VaultProtocolFeesCollector = 'vault__protocolFeesCollector',\n VaultTotalLiquidity = 'vault__totalLiquidity',\n VaultTotalProtocolFee = 'vault__totalProtocolFee',\n VaultTotalSwapCount = 'vault__totalSwapCount',\n VaultTotalSwapFee = 'vault__totalSwapFee',\n VaultTotalSwapVolume = 'vault__totalSwapVolume'\n}\n\nexport type Balancer_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolCount?: InputMaybe;\n poolCount_gt?: InputMaybe;\n poolCount_gte?: InputMaybe;\n poolCount_in?: InputMaybe>;\n poolCount_lt?: InputMaybe;\n poolCount_lte?: InputMaybe;\n poolCount_not?: InputMaybe;\n poolCount_not_in?: InputMaybe>;\n pools_?: InputMaybe;\n protocolFeesCollector?: InputMaybe;\n protocolFeesCollector_contains?: InputMaybe;\n protocolFeesCollector_gt?: InputMaybe;\n protocolFeesCollector_gte?: InputMaybe;\n protocolFeesCollector_in?: InputMaybe>;\n protocolFeesCollector_lt?: InputMaybe;\n protocolFeesCollector_lte?: InputMaybe;\n protocolFeesCollector_not?: InputMaybe;\n protocolFeesCollector_not_contains?: InputMaybe;\n protocolFeesCollector_not_in?: InputMaybe>;\n totalLiquidity?: InputMaybe;\n totalLiquidity_gt?: InputMaybe;\n totalLiquidity_gte?: InputMaybe;\n totalLiquidity_in?: InputMaybe>;\n totalLiquidity_lt?: InputMaybe;\n totalLiquidity_lte?: InputMaybe;\n totalLiquidity_not?: InputMaybe;\n totalLiquidity_not_in?: InputMaybe>;\n totalProtocolFee?: InputMaybe;\n totalProtocolFee_gt?: InputMaybe;\n totalProtocolFee_gte?: InputMaybe;\n totalProtocolFee_in?: InputMaybe>;\n totalProtocolFee_lt?: InputMaybe;\n totalProtocolFee_lte?: InputMaybe;\n totalProtocolFee_not?: InputMaybe;\n totalProtocolFee_not_in?: InputMaybe>;\n totalSwapCount?: InputMaybe;\n totalSwapCount_gt?: InputMaybe;\n totalSwapCount_gte?: InputMaybe;\n totalSwapCount_in?: InputMaybe>;\n totalSwapCount_lt?: InputMaybe;\n totalSwapCount_lte?: InputMaybe;\n totalSwapCount_not?: InputMaybe;\n totalSwapCount_not_in?: InputMaybe>;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n};\n\nexport enum Balancer_OrderBy {\n Id = 'id',\n PoolCount = 'poolCount',\n Pools = 'pools',\n ProtocolFeesCollector = 'protocolFeesCollector',\n TotalLiquidity = 'totalLiquidity',\n TotalProtocolFee = 'totalProtocolFee',\n TotalSwapCount = 'totalSwapCount',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume'\n}\n\nexport type BlockChangedFilter = {\n number_gte: Scalars['Int'];\n};\n\nexport type Block_Height = {\n hash?: InputMaybe;\n number?: InputMaybe;\n number_gte?: InputMaybe;\n};\n\nexport type CircuitBreaker = {\n __typename?: 'CircuitBreaker';\n bptPrice: Scalars['BigDecimal'];\n id: Scalars['ID'];\n lowerBoundPercentage: Scalars['BigDecimal'];\n pool: Pool;\n token: PoolToken;\n upperBoundPercentage: Scalars['BigDecimal'];\n};\n\nexport type CircuitBreaker_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n bptPrice?: InputMaybe;\n bptPrice_gt?: InputMaybe;\n bptPrice_gte?: InputMaybe;\n bptPrice_in?: InputMaybe>;\n bptPrice_lt?: InputMaybe;\n bptPrice_lte?: InputMaybe;\n bptPrice_not?: InputMaybe;\n bptPrice_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n lowerBoundPercentage?: InputMaybe;\n lowerBoundPercentage_gt?: InputMaybe;\n lowerBoundPercentage_gte?: InputMaybe;\n lowerBoundPercentage_in?: InputMaybe>;\n lowerBoundPercentage_lt?: InputMaybe;\n lowerBoundPercentage_lte?: InputMaybe;\n lowerBoundPercentage_not?: InputMaybe;\n lowerBoundPercentage_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n token?: InputMaybe;\n token_?: InputMaybe;\n token_contains?: InputMaybe;\n token_contains_nocase?: InputMaybe;\n token_ends_with?: InputMaybe;\n token_ends_with_nocase?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_contains_nocase?: InputMaybe;\n token_not_ends_with?: InputMaybe;\n token_not_ends_with_nocase?: InputMaybe;\n token_not_in?: InputMaybe>;\n token_not_starts_with?: InputMaybe;\n token_not_starts_with_nocase?: InputMaybe;\n token_starts_with?: InputMaybe;\n token_starts_with_nocase?: InputMaybe;\n upperBoundPercentage?: InputMaybe;\n upperBoundPercentage_gt?: InputMaybe;\n upperBoundPercentage_gte?: InputMaybe;\n upperBoundPercentage_in?: InputMaybe>;\n upperBoundPercentage_lt?: InputMaybe;\n upperBoundPercentage_lte?: InputMaybe;\n upperBoundPercentage_not?: InputMaybe;\n upperBoundPercentage_not_in?: InputMaybe>;\n};\n\nexport enum CircuitBreaker_OrderBy {\n BptPrice = 'bptPrice',\n Id = 'id',\n LowerBoundPercentage = 'lowerBoundPercentage',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n Token = 'token',\n TokenAddress = 'token__address',\n TokenAssetManager = 'token__assetManager',\n TokenBalance = 'token__balance',\n TokenCashBalance = 'token__cashBalance',\n TokenDecimals = 'token__decimals',\n TokenId = 'token__id',\n TokenIndex = 'token__index',\n TokenIsExemptFromYieldProtocolFee = 'token__isExemptFromYieldProtocolFee',\n TokenManagedBalance = 'token__managedBalance',\n TokenName = 'token__name',\n TokenOldPriceRate = 'token__oldPriceRate',\n TokenPaidProtocolFees = 'token__paidProtocolFees',\n TokenPriceRate = 'token__priceRate',\n TokenSymbol = 'token__symbol',\n TokenWeight = 'token__weight',\n UpperBoundPercentage = 'upperBoundPercentage'\n}\n\nexport type GradualWeightUpdate = {\n __typename?: 'GradualWeightUpdate';\n endTimestamp: Scalars['BigInt'];\n endWeights: Array;\n id: Scalars['ID'];\n poolId: Pool;\n scheduledTimestamp: Scalars['Int'];\n startTimestamp: Scalars['BigInt'];\n startWeights: Array;\n};\n\nexport type GradualWeightUpdate_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n endTimestamp?: InputMaybe;\n endTimestamp_gt?: InputMaybe;\n endTimestamp_gte?: InputMaybe;\n endTimestamp_in?: InputMaybe>;\n endTimestamp_lt?: InputMaybe;\n endTimestamp_lte?: InputMaybe;\n endTimestamp_not?: InputMaybe;\n endTimestamp_not_in?: InputMaybe>;\n endWeights?: InputMaybe>;\n endWeights_contains?: InputMaybe>;\n endWeights_contains_nocase?: InputMaybe>;\n endWeights_not?: InputMaybe>;\n endWeights_not_contains?: InputMaybe>;\n endWeights_not_contains_nocase?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n scheduledTimestamp?: InputMaybe;\n scheduledTimestamp_gt?: InputMaybe;\n scheduledTimestamp_gte?: InputMaybe;\n scheduledTimestamp_in?: InputMaybe>;\n scheduledTimestamp_lt?: InputMaybe;\n scheduledTimestamp_lte?: InputMaybe;\n scheduledTimestamp_not?: InputMaybe;\n scheduledTimestamp_not_in?: InputMaybe>;\n startTimestamp?: InputMaybe;\n startTimestamp_gt?: InputMaybe;\n startTimestamp_gte?: InputMaybe;\n startTimestamp_in?: InputMaybe>;\n startTimestamp_lt?: InputMaybe;\n startTimestamp_lte?: InputMaybe;\n startTimestamp_not?: InputMaybe;\n startTimestamp_not_in?: InputMaybe>;\n startWeights?: InputMaybe>;\n startWeights_contains?: InputMaybe>;\n startWeights_contains_nocase?: InputMaybe>;\n startWeights_not?: InputMaybe>;\n startWeights_not_contains?: InputMaybe>;\n startWeights_not_contains_nocase?: InputMaybe>;\n};\n\nexport enum GradualWeightUpdate_OrderBy {\n EndTimestamp = 'endTimestamp',\n EndWeights = 'endWeights',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n ScheduledTimestamp = 'scheduledTimestamp',\n StartTimestamp = 'startTimestamp',\n StartWeights = 'startWeights'\n}\n\nexport enum InvestType {\n Exit = 'Exit',\n Join = 'Join'\n}\n\nexport type JoinExit = {\n __typename?: 'JoinExit';\n amounts: Array;\n id: Scalars['ID'];\n pool: Pool;\n sender: Scalars['Bytes'];\n timestamp: Scalars['Int'];\n tx: Scalars['Bytes'];\n type: InvestType;\n user: User;\n valueUSD?: Maybe;\n};\n\nexport type JoinExit_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n amounts?: InputMaybe>;\n amounts_contains?: InputMaybe>;\n amounts_contains_nocase?: InputMaybe>;\n amounts_not?: InputMaybe>;\n amounts_not_contains?: InputMaybe>;\n amounts_not_contains_nocase?: InputMaybe>;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n sender?: InputMaybe;\n sender_contains?: InputMaybe;\n sender_gt?: InputMaybe;\n sender_gte?: InputMaybe;\n sender_in?: InputMaybe>;\n sender_lt?: InputMaybe;\n sender_lte?: InputMaybe;\n sender_not?: InputMaybe;\n sender_not_contains?: InputMaybe;\n sender_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n tx?: InputMaybe;\n tx_contains?: InputMaybe;\n tx_gt?: InputMaybe;\n tx_gte?: InputMaybe;\n tx_in?: InputMaybe>;\n tx_lt?: InputMaybe;\n tx_lte?: InputMaybe;\n tx_not?: InputMaybe;\n tx_not_contains?: InputMaybe;\n tx_not_in?: InputMaybe>;\n type?: InputMaybe;\n type_in?: InputMaybe>;\n type_not?: InputMaybe;\n type_not_in?: InputMaybe>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n valueUSD?: InputMaybe;\n valueUSD_gt?: InputMaybe;\n valueUSD_gte?: InputMaybe;\n valueUSD_in?: InputMaybe>;\n valueUSD_lt?: InputMaybe;\n valueUSD_lte?: InputMaybe;\n valueUSD_not?: InputMaybe;\n valueUSD_not_in?: InputMaybe>;\n};\n\nexport enum JoinExit_OrderBy {\n Amounts = 'amounts',\n Id = 'id',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n Sender = 'sender',\n Timestamp = 'timestamp',\n Tx = 'tx',\n Type = 'type',\n User = 'user',\n UserId = 'user__id',\n ValueUsd = 'valueUSD'\n}\n\nexport type LatestPrice = {\n __typename?: 'LatestPrice';\n asset: Scalars['Bytes'];\n block: Scalars['BigInt'];\n id: Scalars['ID'];\n poolId: Pool;\n price: Scalars['BigDecimal'];\n pricingAsset: Scalars['Bytes'];\n};\n\nexport type LatestPrice_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n asset?: InputMaybe;\n asset_contains?: InputMaybe;\n asset_gt?: InputMaybe;\n asset_gte?: InputMaybe;\n asset_in?: InputMaybe>;\n asset_lt?: InputMaybe;\n asset_lte?: InputMaybe;\n asset_not?: InputMaybe;\n asset_not_contains?: InputMaybe;\n asset_not_in?: InputMaybe>;\n block?: InputMaybe;\n block_gt?: InputMaybe;\n block_gte?: InputMaybe;\n block_in?: InputMaybe>;\n block_lt?: InputMaybe;\n block_lte?: InputMaybe;\n block_not?: InputMaybe;\n block_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n price?: InputMaybe;\n price_gt?: InputMaybe;\n price_gte?: InputMaybe;\n price_in?: InputMaybe>;\n price_lt?: InputMaybe;\n price_lte?: InputMaybe;\n price_not?: InputMaybe;\n price_not_in?: InputMaybe>;\n pricingAsset?: InputMaybe;\n pricingAsset_contains?: InputMaybe;\n pricingAsset_gt?: InputMaybe;\n pricingAsset_gte?: InputMaybe;\n pricingAsset_in?: InputMaybe>;\n pricingAsset_lt?: InputMaybe;\n pricingAsset_lte?: InputMaybe;\n pricingAsset_not?: InputMaybe;\n pricingAsset_not_contains?: InputMaybe;\n pricingAsset_not_in?: InputMaybe>;\n};\n\nexport enum LatestPrice_OrderBy {\n Asset = 'asset',\n Block = 'block',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n Price = 'price',\n PricingAsset = 'pricingAsset'\n}\n\nexport type ManagementOperation = {\n __typename?: 'ManagementOperation';\n cashDelta: Scalars['BigDecimal'];\n id: Scalars['ID'];\n managedDelta: Scalars['BigDecimal'];\n poolTokenId: PoolToken;\n timestamp: Scalars['Int'];\n type: OperationType;\n};\n\nexport type ManagementOperation_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n cashDelta?: InputMaybe;\n cashDelta_gt?: InputMaybe;\n cashDelta_gte?: InputMaybe;\n cashDelta_in?: InputMaybe>;\n cashDelta_lt?: InputMaybe;\n cashDelta_lte?: InputMaybe;\n cashDelta_not?: InputMaybe;\n cashDelta_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n managedDelta?: InputMaybe;\n managedDelta_gt?: InputMaybe;\n managedDelta_gte?: InputMaybe;\n managedDelta_in?: InputMaybe>;\n managedDelta_lt?: InputMaybe;\n managedDelta_lte?: InputMaybe;\n managedDelta_not?: InputMaybe;\n managedDelta_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolTokenId?: InputMaybe;\n poolTokenId_?: InputMaybe;\n poolTokenId_contains?: InputMaybe;\n poolTokenId_contains_nocase?: InputMaybe;\n poolTokenId_ends_with?: InputMaybe;\n poolTokenId_ends_with_nocase?: InputMaybe;\n poolTokenId_gt?: InputMaybe;\n poolTokenId_gte?: InputMaybe;\n poolTokenId_in?: InputMaybe>;\n poolTokenId_lt?: InputMaybe;\n poolTokenId_lte?: InputMaybe;\n poolTokenId_not?: InputMaybe;\n poolTokenId_not_contains?: InputMaybe;\n poolTokenId_not_contains_nocase?: InputMaybe;\n poolTokenId_not_ends_with?: InputMaybe;\n poolTokenId_not_ends_with_nocase?: InputMaybe;\n poolTokenId_not_in?: InputMaybe>;\n poolTokenId_not_starts_with?: InputMaybe;\n poolTokenId_not_starts_with_nocase?: InputMaybe;\n poolTokenId_starts_with?: InputMaybe;\n poolTokenId_starts_with_nocase?: InputMaybe;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n type?: InputMaybe;\n type_in?: InputMaybe>;\n type_not?: InputMaybe;\n type_not_in?: InputMaybe>;\n};\n\nexport enum ManagementOperation_OrderBy {\n CashDelta = 'cashDelta',\n Id = 'id',\n ManagedDelta = 'managedDelta',\n PoolTokenId = 'poolTokenId',\n PoolTokenIdAddress = 'poolTokenId__address',\n PoolTokenIdAssetManager = 'poolTokenId__assetManager',\n PoolTokenIdBalance = 'poolTokenId__balance',\n PoolTokenIdCashBalance = 'poolTokenId__cashBalance',\n PoolTokenIdDecimals = 'poolTokenId__decimals',\n PoolTokenIdId = 'poolTokenId__id',\n PoolTokenIdIndex = 'poolTokenId__index',\n PoolTokenIdIsExemptFromYieldProtocolFee = 'poolTokenId__isExemptFromYieldProtocolFee',\n PoolTokenIdManagedBalance = 'poolTokenId__managedBalance',\n PoolTokenIdName = 'poolTokenId__name',\n PoolTokenIdOldPriceRate = 'poolTokenId__oldPriceRate',\n PoolTokenIdPaidProtocolFees = 'poolTokenId__paidProtocolFees',\n PoolTokenIdPriceRate = 'poolTokenId__priceRate',\n PoolTokenIdSymbol = 'poolTokenId__symbol',\n PoolTokenIdWeight = 'poolTokenId__weight',\n Timestamp = 'timestamp',\n Type = 'type'\n}\n\nexport enum OperationType {\n Deposit = 'Deposit',\n Update = 'Update',\n Withdraw = 'Withdraw'\n}\n\n/** Defines the order direction, either ascending or descending */\nexport enum OrderDirection {\n Asc = 'asc',\n Desc = 'desc'\n}\n\nexport type Pool = {\n __typename?: 'Pool';\n address: Scalars['Bytes'];\n alpha?: Maybe;\n amp?: Maybe;\n ampUpdates?: Maybe>;\n baseToken?: Maybe;\n beta?: Maybe;\n c?: Maybe;\n circuitBreakers?: Maybe>;\n createTime: Scalars['Int'];\n dSq?: Maybe;\n delta?: Maybe;\n epsilon?: Maybe;\n expiryTime?: Maybe;\n factory?: Maybe;\n historicalValues?: Maybe>;\n holdersCount: Scalars['BigInt'];\n id: Scalars['ID'];\n isInRecoveryMode?: Maybe;\n isPaused?: Maybe;\n joinExitEnabled?: Maybe;\n lambda?: Maybe;\n lastJoinExitAmp?: Maybe;\n lastPostJoinExitInvariant?: Maybe;\n latestAmpUpdate?: Maybe;\n lowerTarget?: Maybe;\n mainIndex?: Maybe;\n managementAumFee?: Maybe;\n managementFee?: Maybe;\n mustAllowlistLPs?: Maybe;\n name?: Maybe;\n oracleEnabled: Scalars['Boolean'];\n owner?: Maybe;\n poolType?: Maybe;\n poolTypeVersion?: Maybe;\n priceRateProviders?: Maybe>;\n principalToken?: Maybe;\n protocolAumFeeCache?: Maybe;\n protocolId?: Maybe;\n protocolIdData?: Maybe;\n protocolSwapFeeCache?: Maybe;\n protocolYieldFeeCache?: Maybe;\n root3Alpha?: Maybe;\n s?: Maybe;\n shares?: Maybe>;\n snapshots?: Maybe>;\n sqrtAlpha?: Maybe;\n sqrtBeta?: Maybe;\n strategyType: Scalars['Int'];\n /** Indicates if a pool can be swapped against. Combines multiple sources, including offchain curation */\n swapEnabled: Scalars['Boolean'];\n /** External indication from an offchain permissioned actor */\n swapEnabledCurationSignal?: Maybe;\n /** The native swapEnabled boolean. internal to the pool. Only applies to Gyro, LBPs and InvestmentPools */\n swapEnabledInternal?: Maybe;\n swapFee: Scalars['BigDecimal'];\n swaps?: Maybe>;\n swapsCount: Scalars['BigInt'];\n symbol?: Maybe;\n tauAlphaX?: Maybe;\n tauAlphaY?: Maybe;\n tauBetaX?: Maybe;\n tauBetaY?: Maybe;\n tokens?: Maybe>;\n tokensList: Array;\n totalAumFeeCollectedInBPT?: Maybe;\n totalLiquidity: Scalars['BigDecimal'];\n totalLiquiditySansBPT?: Maybe;\n totalProtocolFee?: Maybe;\n totalProtocolFeePaidInBPT?: Maybe;\n totalShares: Scalars['BigDecimal'];\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n totalWeight?: Maybe;\n tx?: Maybe;\n u?: Maybe;\n unitSeconds?: Maybe;\n upperTarget?: Maybe;\n v?: Maybe;\n vaultID: Balancer;\n w?: Maybe;\n weightUpdates?: Maybe>;\n wrappedIndex?: Maybe;\n z?: Maybe;\n};\n\n\nexport type PoolAmpUpdatesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolCircuitBreakersArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolHistoricalValuesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolPriceRateProvidersArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolSharesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolSnapshotsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolSwapsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolTokensArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolWeightUpdatesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type PoolContract = {\n __typename?: 'PoolContract';\n id: Scalars['ID'];\n pool: Pool;\n};\n\nexport type PoolContract_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n};\n\nexport enum PoolContract_OrderBy {\n Id = 'id',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z'\n}\n\nexport type PoolHistoricalLiquidity = {\n __typename?: 'PoolHistoricalLiquidity';\n block: Scalars['BigInt'];\n id: Scalars['ID'];\n poolId: Pool;\n poolLiquidity: Scalars['BigDecimal'];\n poolShareValue: Scalars['BigDecimal'];\n poolTotalShares: Scalars['BigDecimal'];\n pricingAsset: Scalars['Bytes'];\n};\n\nexport type PoolHistoricalLiquidity_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n block?: InputMaybe;\n block_gt?: InputMaybe;\n block_gte?: InputMaybe;\n block_in?: InputMaybe>;\n block_lt?: InputMaybe;\n block_lte?: InputMaybe;\n block_not?: InputMaybe;\n block_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n poolLiquidity?: InputMaybe;\n poolLiquidity_gt?: InputMaybe;\n poolLiquidity_gte?: InputMaybe;\n poolLiquidity_in?: InputMaybe>;\n poolLiquidity_lt?: InputMaybe;\n poolLiquidity_lte?: InputMaybe;\n poolLiquidity_not?: InputMaybe;\n poolLiquidity_not_in?: InputMaybe>;\n poolShareValue?: InputMaybe;\n poolShareValue_gt?: InputMaybe;\n poolShareValue_gte?: InputMaybe;\n poolShareValue_in?: InputMaybe>;\n poolShareValue_lt?: InputMaybe;\n poolShareValue_lte?: InputMaybe;\n poolShareValue_not?: InputMaybe;\n poolShareValue_not_in?: InputMaybe>;\n poolTotalShares?: InputMaybe;\n poolTotalShares_gt?: InputMaybe;\n poolTotalShares_gte?: InputMaybe;\n poolTotalShares_in?: InputMaybe>;\n poolTotalShares_lt?: InputMaybe;\n poolTotalShares_lte?: InputMaybe;\n poolTotalShares_not?: InputMaybe;\n poolTotalShares_not_in?: InputMaybe>;\n pricingAsset?: InputMaybe;\n pricingAsset_contains?: InputMaybe;\n pricingAsset_gt?: InputMaybe;\n pricingAsset_gte?: InputMaybe;\n pricingAsset_in?: InputMaybe>;\n pricingAsset_lt?: InputMaybe;\n pricingAsset_lte?: InputMaybe;\n pricingAsset_not?: InputMaybe;\n pricingAsset_not_contains?: InputMaybe;\n pricingAsset_not_in?: InputMaybe>;\n};\n\nexport enum PoolHistoricalLiquidity_OrderBy {\n Block = 'block',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n PoolLiquidity = 'poolLiquidity',\n PoolShareValue = 'poolShareValue',\n PoolTotalShares = 'poolTotalShares',\n PricingAsset = 'pricingAsset'\n}\n\nexport type PoolShare = {\n __typename?: 'PoolShare';\n balance: Scalars['BigDecimal'];\n id: Scalars['ID'];\n poolId: Pool;\n userAddress: User;\n};\n\nexport type PoolShare_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n balance?: InputMaybe;\n balance_gt?: InputMaybe;\n balance_gte?: InputMaybe;\n balance_in?: InputMaybe>;\n balance_lt?: InputMaybe;\n balance_lte?: InputMaybe;\n balance_not?: InputMaybe;\n balance_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n userAddress?: InputMaybe;\n userAddress_?: InputMaybe;\n userAddress_contains?: InputMaybe;\n userAddress_contains_nocase?: InputMaybe;\n userAddress_ends_with?: InputMaybe;\n userAddress_ends_with_nocase?: InputMaybe;\n userAddress_gt?: InputMaybe;\n userAddress_gte?: InputMaybe;\n userAddress_in?: InputMaybe>;\n userAddress_lt?: InputMaybe;\n userAddress_lte?: InputMaybe;\n userAddress_not?: InputMaybe;\n userAddress_not_contains?: InputMaybe;\n userAddress_not_contains_nocase?: InputMaybe;\n userAddress_not_ends_with?: InputMaybe;\n userAddress_not_ends_with_nocase?: InputMaybe;\n userAddress_not_in?: InputMaybe>;\n userAddress_not_starts_with?: InputMaybe;\n userAddress_not_starts_with_nocase?: InputMaybe;\n userAddress_starts_with?: InputMaybe;\n userAddress_starts_with_nocase?: InputMaybe;\n};\n\nexport enum PoolShare_OrderBy {\n Balance = 'balance',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n UserAddress = 'userAddress',\n UserAddressId = 'userAddress__id'\n}\n\nexport type PoolSnapshot = {\n __typename?: 'PoolSnapshot';\n amounts: Array;\n holdersCount: Scalars['BigInt'];\n id: Scalars['ID'];\n liquidity: Scalars['BigDecimal'];\n pool: Pool;\n protocolFee?: Maybe;\n swapFees: Scalars['BigDecimal'];\n swapVolume: Scalars['BigDecimal'];\n swapsCount: Scalars['BigInt'];\n timestamp: Scalars['Int'];\n totalShares: Scalars['BigDecimal'];\n};\n\nexport type PoolSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n amounts?: InputMaybe>;\n amounts_contains?: InputMaybe>;\n amounts_contains_nocase?: InputMaybe>;\n amounts_not?: InputMaybe>;\n amounts_not_contains?: InputMaybe>;\n amounts_not_contains_nocase?: InputMaybe>;\n and?: InputMaybe>>;\n holdersCount?: InputMaybe;\n holdersCount_gt?: InputMaybe;\n holdersCount_gte?: InputMaybe;\n holdersCount_in?: InputMaybe>;\n holdersCount_lt?: InputMaybe;\n holdersCount_lte?: InputMaybe;\n holdersCount_not?: InputMaybe;\n holdersCount_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n liquidity?: InputMaybe;\n liquidity_gt?: InputMaybe;\n liquidity_gte?: InputMaybe;\n liquidity_in?: InputMaybe>;\n liquidity_lt?: InputMaybe;\n liquidity_lte?: InputMaybe;\n liquidity_not?: InputMaybe;\n liquidity_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n protocolFee?: InputMaybe;\n protocolFee_gt?: InputMaybe;\n protocolFee_gte?: InputMaybe;\n protocolFee_in?: InputMaybe>;\n protocolFee_lt?: InputMaybe;\n protocolFee_lte?: InputMaybe;\n protocolFee_not?: InputMaybe;\n protocolFee_not_in?: InputMaybe>;\n swapFees?: InputMaybe;\n swapFees_gt?: InputMaybe;\n swapFees_gte?: InputMaybe;\n swapFees_in?: InputMaybe>;\n swapFees_lt?: InputMaybe;\n swapFees_lte?: InputMaybe;\n swapFees_not?: InputMaybe;\n swapFees_not_in?: InputMaybe>;\n swapVolume?: InputMaybe;\n swapVolume_gt?: InputMaybe;\n swapVolume_gte?: InputMaybe;\n swapVolume_in?: InputMaybe>;\n swapVolume_lt?: InputMaybe;\n swapVolume_lte?: InputMaybe;\n swapVolume_not?: InputMaybe;\n swapVolume_not_in?: InputMaybe>;\n swapsCount?: InputMaybe;\n swapsCount_gt?: InputMaybe;\n swapsCount_gte?: InputMaybe;\n swapsCount_in?: InputMaybe>;\n swapsCount_lt?: InputMaybe;\n swapsCount_lte?: InputMaybe;\n swapsCount_not?: InputMaybe;\n swapsCount_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n totalShares?: InputMaybe;\n totalShares_gt?: InputMaybe;\n totalShares_gte?: InputMaybe;\n totalShares_in?: InputMaybe>;\n totalShares_lt?: InputMaybe;\n totalShares_lte?: InputMaybe;\n totalShares_not?: InputMaybe;\n totalShares_not_in?: InputMaybe>;\n};\n\nexport enum PoolSnapshot_OrderBy {\n Amounts = 'amounts',\n HoldersCount = 'holdersCount',\n Id = 'id',\n Liquidity = 'liquidity',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n ProtocolFee = 'protocolFee',\n SwapFees = 'swapFees',\n SwapVolume = 'swapVolume',\n SwapsCount = 'swapsCount',\n Timestamp = 'timestamp',\n TotalShares = 'totalShares'\n}\n\nexport type PoolToken = {\n __typename?: 'PoolToken';\n address: Scalars['String'];\n assetManager: Scalars['Bytes'];\n balance: Scalars['BigDecimal'];\n cashBalance: Scalars['BigDecimal'];\n circuitBreaker?: Maybe;\n decimals: Scalars['Int'];\n id: Scalars['ID'];\n index?: Maybe;\n isExemptFromYieldProtocolFee?: Maybe;\n managedBalance: Scalars['BigDecimal'];\n managements?: Maybe>;\n name: Scalars['String'];\n oldPriceRate?: Maybe;\n paidProtocolFees?: Maybe;\n poolId?: Maybe;\n priceRate: Scalars['BigDecimal'];\n symbol: Scalars['String'];\n token: Token;\n weight?: Maybe;\n};\n\n\nexport type PoolTokenManagementsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type PoolToken_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_contains_nocase?: InputMaybe;\n address_ends_with?: InputMaybe;\n address_ends_with_nocase?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_contains_nocase?: InputMaybe;\n address_not_ends_with?: InputMaybe;\n address_not_ends_with_nocase?: InputMaybe;\n address_not_in?: InputMaybe>;\n address_not_starts_with?: InputMaybe;\n address_not_starts_with_nocase?: InputMaybe;\n address_starts_with?: InputMaybe;\n address_starts_with_nocase?: InputMaybe;\n and?: InputMaybe>>;\n assetManager?: InputMaybe;\n assetManager_contains?: InputMaybe;\n assetManager_gt?: InputMaybe;\n assetManager_gte?: InputMaybe;\n assetManager_in?: InputMaybe>;\n assetManager_lt?: InputMaybe;\n assetManager_lte?: InputMaybe;\n assetManager_not?: InputMaybe;\n assetManager_not_contains?: InputMaybe;\n assetManager_not_in?: InputMaybe>;\n balance?: InputMaybe;\n balance_gt?: InputMaybe;\n balance_gte?: InputMaybe;\n balance_in?: InputMaybe>;\n balance_lt?: InputMaybe;\n balance_lte?: InputMaybe;\n balance_not?: InputMaybe;\n balance_not_in?: InputMaybe>;\n cashBalance?: InputMaybe;\n cashBalance_gt?: InputMaybe;\n cashBalance_gte?: InputMaybe;\n cashBalance_in?: InputMaybe>;\n cashBalance_lt?: InputMaybe;\n cashBalance_lte?: InputMaybe;\n cashBalance_not?: InputMaybe;\n cashBalance_not_in?: InputMaybe>;\n circuitBreaker?: InputMaybe;\n circuitBreaker_?: InputMaybe;\n circuitBreaker_contains?: InputMaybe;\n circuitBreaker_contains_nocase?: InputMaybe;\n circuitBreaker_ends_with?: InputMaybe;\n circuitBreaker_ends_with_nocase?: InputMaybe;\n circuitBreaker_gt?: InputMaybe;\n circuitBreaker_gte?: InputMaybe;\n circuitBreaker_in?: InputMaybe>;\n circuitBreaker_lt?: InputMaybe;\n circuitBreaker_lte?: InputMaybe;\n circuitBreaker_not?: InputMaybe;\n circuitBreaker_not_contains?: InputMaybe;\n circuitBreaker_not_contains_nocase?: InputMaybe;\n circuitBreaker_not_ends_with?: InputMaybe;\n circuitBreaker_not_ends_with_nocase?: InputMaybe;\n circuitBreaker_not_in?: InputMaybe>;\n circuitBreaker_not_starts_with?: InputMaybe;\n circuitBreaker_not_starts_with_nocase?: InputMaybe;\n circuitBreaker_starts_with?: InputMaybe;\n circuitBreaker_starts_with_nocase?: InputMaybe;\n decimals?: InputMaybe;\n decimals_gt?: InputMaybe;\n decimals_gte?: InputMaybe;\n decimals_in?: InputMaybe>;\n decimals_lt?: InputMaybe;\n decimals_lte?: InputMaybe;\n decimals_not?: InputMaybe;\n decimals_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n index?: InputMaybe;\n index_gt?: InputMaybe;\n index_gte?: InputMaybe;\n index_in?: InputMaybe>;\n index_lt?: InputMaybe;\n index_lte?: InputMaybe;\n index_not?: InputMaybe;\n index_not_in?: InputMaybe>;\n isExemptFromYieldProtocolFee?: InputMaybe;\n isExemptFromYieldProtocolFee_in?: InputMaybe>;\n isExemptFromYieldProtocolFee_not?: InputMaybe;\n isExemptFromYieldProtocolFee_not_in?: InputMaybe>;\n managedBalance?: InputMaybe;\n managedBalance_gt?: InputMaybe;\n managedBalance_gte?: InputMaybe;\n managedBalance_in?: InputMaybe>;\n managedBalance_lt?: InputMaybe;\n managedBalance_lte?: InputMaybe;\n managedBalance_not?: InputMaybe;\n managedBalance_not_in?: InputMaybe>;\n managements_?: InputMaybe;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n oldPriceRate?: InputMaybe;\n oldPriceRate_gt?: InputMaybe;\n oldPriceRate_gte?: InputMaybe;\n oldPriceRate_in?: InputMaybe>;\n oldPriceRate_lt?: InputMaybe;\n oldPriceRate_lte?: InputMaybe;\n oldPriceRate_not?: InputMaybe;\n oldPriceRate_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n paidProtocolFees?: InputMaybe;\n paidProtocolFees_gt?: InputMaybe;\n paidProtocolFees_gte?: InputMaybe;\n paidProtocolFees_in?: InputMaybe>;\n paidProtocolFees_lt?: InputMaybe;\n paidProtocolFees_lte?: InputMaybe;\n paidProtocolFees_not?: InputMaybe;\n paidProtocolFees_not_in?: InputMaybe>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n priceRate?: InputMaybe;\n priceRate_gt?: InputMaybe;\n priceRate_gte?: InputMaybe;\n priceRate_in?: InputMaybe>;\n priceRate_lt?: InputMaybe;\n priceRate_lte?: InputMaybe;\n priceRate_not?: InputMaybe;\n priceRate_not_in?: InputMaybe>;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n token?: InputMaybe;\n token_?: InputMaybe;\n token_contains?: InputMaybe;\n token_contains_nocase?: InputMaybe;\n token_ends_with?: InputMaybe;\n token_ends_with_nocase?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_contains_nocase?: InputMaybe;\n token_not_ends_with?: InputMaybe;\n token_not_ends_with_nocase?: InputMaybe;\n token_not_in?: InputMaybe>;\n token_not_starts_with?: InputMaybe;\n token_not_starts_with_nocase?: InputMaybe;\n token_starts_with?: InputMaybe;\n token_starts_with_nocase?: InputMaybe;\n weight?: InputMaybe;\n weight_gt?: InputMaybe;\n weight_gte?: InputMaybe;\n weight_in?: InputMaybe>;\n weight_lt?: InputMaybe;\n weight_lte?: InputMaybe;\n weight_not?: InputMaybe;\n weight_not_in?: InputMaybe>;\n};\n\nexport enum PoolToken_OrderBy {\n Address = 'address',\n AssetManager = 'assetManager',\n Balance = 'balance',\n CashBalance = 'cashBalance',\n CircuitBreaker = 'circuitBreaker',\n CircuitBreakerBptPrice = 'circuitBreaker__bptPrice',\n CircuitBreakerId = 'circuitBreaker__id',\n CircuitBreakerLowerBoundPercentage = 'circuitBreaker__lowerBoundPercentage',\n CircuitBreakerUpperBoundPercentage = 'circuitBreaker__upperBoundPercentage',\n Decimals = 'decimals',\n Id = 'id',\n Index = 'index',\n IsExemptFromYieldProtocolFee = 'isExemptFromYieldProtocolFee',\n ManagedBalance = 'managedBalance',\n Managements = 'managements',\n Name = 'name',\n OldPriceRate = 'oldPriceRate',\n PaidProtocolFees = 'paidProtocolFees',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n PriceRate = 'priceRate',\n Symbol = 'symbol',\n Token = 'token',\n TokenAddress = 'token__address',\n TokenDecimals = 'token__decimals',\n TokenFxOracleDecimals = 'token__fxOracleDecimals',\n TokenId = 'token__id',\n TokenLatestFxPrice = 'token__latestFXPrice',\n TokenLatestUsdPrice = 'token__latestUSDPrice',\n TokenLatestUsdPriceTimestamp = 'token__latestUSDPriceTimestamp',\n TokenName = 'token__name',\n TokenSymbol = 'token__symbol',\n TokenTotalBalanceNotional = 'token__totalBalanceNotional',\n TokenTotalBalanceUsd = 'token__totalBalanceUSD',\n TokenTotalSwapCount = 'token__totalSwapCount',\n TokenTotalVolumeNotional = 'token__totalVolumeNotional',\n TokenTotalVolumeUsd = 'token__totalVolumeUSD',\n Weight = 'weight'\n}\n\nexport type Pool_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_in?: InputMaybe>;\n alpha?: InputMaybe;\n alpha_gt?: InputMaybe;\n alpha_gte?: InputMaybe;\n alpha_in?: InputMaybe>;\n alpha_lt?: InputMaybe;\n alpha_lte?: InputMaybe;\n alpha_not?: InputMaybe;\n alpha_not_in?: InputMaybe>;\n amp?: InputMaybe;\n ampUpdates_?: InputMaybe;\n amp_gt?: InputMaybe;\n amp_gte?: InputMaybe;\n amp_in?: InputMaybe>;\n amp_lt?: InputMaybe;\n amp_lte?: InputMaybe;\n amp_not?: InputMaybe;\n amp_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n baseToken?: InputMaybe;\n baseToken_contains?: InputMaybe;\n baseToken_gt?: InputMaybe;\n baseToken_gte?: InputMaybe;\n baseToken_in?: InputMaybe>;\n baseToken_lt?: InputMaybe;\n baseToken_lte?: InputMaybe;\n baseToken_not?: InputMaybe;\n baseToken_not_contains?: InputMaybe;\n baseToken_not_in?: InputMaybe>;\n beta?: InputMaybe;\n beta_gt?: InputMaybe;\n beta_gte?: InputMaybe;\n beta_in?: InputMaybe>;\n beta_lt?: InputMaybe;\n beta_lte?: InputMaybe;\n beta_not?: InputMaybe;\n beta_not_in?: InputMaybe>;\n c?: InputMaybe;\n c_gt?: InputMaybe;\n c_gte?: InputMaybe;\n c_in?: InputMaybe>;\n c_lt?: InputMaybe;\n c_lte?: InputMaybe;\n c_not?: InputMaybe;\n c_not_in?: InputMaybe>;\n circuitBreakers_?: InputMaybe;\n createTime?: InputMaybe;\n createTime_gt?: InputMaybe;\n createTime_gte?: InputMaybe;\n createTime_in?: InputMaybe>;\n createTime_lt?: InputMaybe;\n createTime_lte?: InputMaybe;\n createTime_not?: InputMaybe;\n createTime_not_in?: InputMaybe>;\n dSq?: InputMaybe;\n dSq_gt?: InputMaybe;\n dSq_gte?: InputMaybe;\n dSq_in?: InputMaybe>;\n dSq_lt?: InputMaybe;\n dSq_lte?: InputMaybe;\n dSq_not?: InputMaybe;\n dSq_not_in?: InputMaybe>;\n delta?: InputMaybe;\n delta_gt?: InputMaybe;\n delta_gte?: InputMaybe;\n delta_in?: InputMaybe>;\n delta_lt?: InputMaybe;\n delta_lte?: InputMaybe;\n delta_not?: InputMaybe;\n delta_not_in?: InputMaybe>;\n epsilon?: InputMaybe;\n epsilon_gt?: InputMaybe;\n epsilon_gte?: InputMaybe;\n epsilon_in?: InputMaybe>;\n epsilon_lt?: InputMaybe;\n epsilon_lte?: InputMaybe;\n epsilon_not?: InputMaybe;\n epsilon_not_in?: InputMaybe>;\n expiryTime?: InputMaybe;\n expiryTime_gt?: InputMaybe;\n expiryTime_gte?: InputMaybe;\n expiryTime_in?: InputMaybe>;\n expiryTime_lt?: InputMaybe;\n expiryTime_lte?: InputMaybe;\n expiryTime_not?: InputMaybe;\n expiryTime_not_in?: InputMaybe>;\n factory?: InputMaybe;\n factory_contains?: InputMaybe;\n factory_gt?: InputMaybe;\n factory_gte?: InputMaybe;\n factory_in?: InputMaybe>;\n factory_lt?: InputMaybe;\n factory_lte?: InputMaybe;\n factory_not?: InputMaybe;\n factory_not_contains?: InputMaybe;\n factory_not_in?: InputMaybe>;\n historicalValues_?: InputMaybe;\n holdersCount?: InputMaybe;\n holdersCount_gt?: InputMaybe;\n holdersCount_gte?: InputMaybe;\n holdersCount_in?: InputMaybe>;\n holdersCount_lt?: InputMaybe;\n holdersCount_lte?: InputMaybe;\n holdersCount_not?: InputMaybe;\n holdersCount_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n isInRecoveryMode?: InputMaybe;\n isInRecoveryMode_in?: InputMaybe>;\n isInRecoveryMode_not?: InputMaybe;\n isInRecoveryMode_not_in?: InputMaybe>;\n isPaused?: InputMaybe;\n isPaused_in?: InputMaybe>;\n isPaused_not?: InputMaybe;\n isPaused_not_in?: InputMaybe>;\n joinExitEnabled?: InputMaybe;\n joinExitEnabled_in?: InputMaybe>;\n joinExitEnabled_not?: InputMaybe;\n joinExitEnabled_not_in?: InputMaybe>;\n lambda?: InputMaybe;\n lambda_gt?: InputMaybe;\n lambda_gte?: InputMaybe;\n lambda_in?: InputMaybe>;\n lambda_lt?: InputMaybe;\n lambda_lte?: InputMaybe;\n lambda_not?: InputMaybe;\n lambda_not_in?: InputMaybe>;\n lastJoinExitAmp?: InputMaybe;\n lastJoinExitAmp_gt?: InputMaybe;\n lastJoinExitAmp_gte?: InputMaybe;\n lastJoinExitAmp_in?: InputMaybe>;\n lastJoinExitAmp_lt?: InputMaybe;\n lastJoinExitAmp_lte?: InputMaybe;\n lastJoinExitAmp_not?: InputMaybe;\n lastJoinExitAmp_not_in?: InputMaybe>;\n lastPostJoinExitInvariant?: InputMaybe;\n lastPostJoinExitInvariant_gt?: InputMaybe;\n lastPostJoinExitInvariant_gte?: InputMaybe;\n lastPostJoinExitInvariant_in?: InputMaybe>;\n lastPostJoinExitInvariant_lt?: InputMaybe;\n lastPostJoinExitInvariant_lte?: InputMaybe;\n lastPostJoinExitInvariant_not?: InputMaybe;\n lastPostJoinExitInvariant_not_in?: InputMaybe>;\n latestAmpUpdate?: InputMaybe;\n latestAmpUpdate_?: InputMaybe;\n latestAmpUpdate_contains?: InputMaybe;\n latestAmpUpdate_contains_nocase?: InputMaybe;\n latestAmpUpdate_ends_with?: InputMaybe;\n latestAmpUpdate_ends_with_nocase?: InputMaybe;\n latestAmpUpdate_gt?: InputMaybe;\n latestAmpUpdate_gte?: InputMaybe;\n latestAmpUpdate_in?: InputMaybe>;\n latestAmpUpdate_lt?: InputMaybe;\n latestAmpUpdate_lte?: InputMaybe;\n latestAmpUpdate_not?: InputMaybe;\n latestAmpUpdate_not_contains?: InputMaybe;\n latestAmpUpdate_not_contains_nocase?: InputMaybe;\n latestAmpUpdate_not_ends_with?: InputMaybe;\n latestAmpUpdate_not_ends_with_nocase?: InputMaybe;\n latestAmpUpdate_not_in?: InputMaybe>;\n latestAmpUpdate_not_starts_with?: InputMaybe;\n latestAmpUpdate_not_starts_with_nocase?: InputMaybe;\n latestAmpUpdate_starts_with?: InputMaybe;\n latestAmpUpdate_starts_with_nocase?: InputMaybe;\n lowerTarget?: InputMaybe;\n lowerTarget_gt?: InputMaybe;\n lowerTarget_gte?: InputMaybe;\n lowerTarget_in?: InputMaybe>;\n lowerTarget_lt?: InputMaybe;\n lowerTarget_lte?: InputMaybe;\n lowerTarget_not?: InputMaybe;\n lowerTarget_not_in?: InputMaybe>;\n mainIndex?: InputMaybe;\n mainIndex_gt?: InputMaybe;\n mainIndex_gte?: InputMaybe;\n mainIndex_in?: InputMaybe>;\n mainIndex_lt?: InputMaybe;\n mainIndex_lte?: InputMaybe;\n mainIndex_not?: InputMaybe;\n mainIndex_not_in?: InputMaybe>;\n managementAumFee?: InputMaybe;\n managementAumFee_gt?: InputMaybe;\n managementAumFee_gte?: InputMaybe;\n managementAumFee_in?: InputMaybe>;\n managementAumFee_lt?: InputMaybe;\n managementAumFee_lte?: InputMaybe;\n managementAumFee_not?: InputMaybe;\n managementAumFee_not_in?: InputMaybe>;\n managementFee?: InputMaybe;\n managementFee_gt?: InputMaybe;\n managementFee_gte?: InputMaybe;\n managementFee_in?: InputMaybe>;\n managementFee_lt?: InputMaybe;\n managementFee_lte?: InputMaybe;\n managementFee_not?: InputMaybe;\n managementFee_not_in?: InputMaybe>;\n mustAllowlistLPs?: InputMaybe;\n mustAllowlistLPs_in?: InputMaybe>;\n mustAllowlistLPs_not?: InputMaybe;\n mustAllowlistLPs_not_in?: InputMaybe>;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n oracleEnabled?: InputMaybe;\n oracleEnabled_in?: InputMaybe>;\n oracleEnabled_not?: InputMaybe;\n oracleEnabled_not_in?: InputMaybe>;\n owner?: InputMaybe;\n owner_contains?: InputMaybe;\n owner_gt?: InputMaybe;\n owner_gte?: InputMaybe;\n owner_in?: InputMaybe>;\n owner_lt?: InputMaybe;\n owner_lte?: InputMaybe;\n owner_not?: InputMaybe;\n owner_not_contains?: InputMaybe;\n owner_not_in?: InputMaybe>;\n poolType?: InputMaybe;\n poolTypeVersion?: InputMaybe;\n poolTypeVersion_gt?: InputMaybe;\n poolTypeVersion_gte?: InputMaybe;\n poolTypeVersion_in?: InputMaybe>;\n poolTypeVersion_lt?: InputMaybe;\n poolTypeVersion_lte?: InputMaybe;\n poolTypeVersion_not?: InputMaybe;\n poolTypeVersion_not_in?: InputMaybe>;\n poolType_contains?: InputMaybe;\n poolType_contains_nocase?: InputMaybe;\n poolType_ends_with?: InputMaybe;\n poolType_ends_with_nocase?: InputMaybe;\n poolType_gt?: InputMaybe;\n poolType_gte?: InputMaybe;\n poolType_in?: InputMaybe>;\n poolType_lt?: InputMaybe;\n poolType_lte?: InputMaybe;\n poolType_not?: InputMaybe;\n poolType_not_contains?: InputMaybe;\n poolType_not_contains_nocase?: InputMaybe;\n poolType_not_ends_with?: InputMaybe;\n poolType_not_ends_with_nocase?: InputMaybe;\n poolType_not_in?: InputMaybe>;\n poolType_not_starts_with?: InputMaybe;\n poolType_not_starts_with_nocase?: InputMaybe;\n poolType_starts_with?: InputMaybe;\n poolType_starts_with_nocase?: InputMaybe;\n priceRateProviders_?: InputMaybe;\n principalToken?: InputMaybe;\n principalToken_contains?: InputMaybe;\n principalToken_gt?: InputMaybe;\n principalToken_gte?: InputMaybe;\n principalToken_in?: InputMaybe>;\n principalToken_lt?: InputMaybe;\n principalToken_lte?: InputMaybe;\n principalToken_not?: InputMaybe;\n principalToken_not_contains?: InputMaybe;\n principalToken_not_in?: InputMaybe>;\n protocolAumFeeCache?: InputMaybe;\n protocolAumFeeCache_gt?: InputMaybe;\n protocolAumFeeCache_gte?: InputMaybe;\n protocolAumFeeCache_in?: InputMaybe>;\n protocolAumFeeCache_lt?: InputMaybe;\n protocolAumFeeCache_lte?: InputMaybe;\n protocolAumFeeCache_not?: InputMaybe;\n protocolAumFeeCache_not_in?: InputMaybe>;\n protocolId?: InputMaybe;\n protocolIdData?: InputMaybe;\n protocolIdData_?: InputMaybe;\n protocolIdData_contains?: InputMaybe;\n protocolIdData_contains_nocase?: InputMaybe;\n protocolIdData_ends_with?: InputMaybe;\n protocolIdData_ends_with_nocase?: InputMaybe;\n protocolIdData_gt?: InputMaybe;\n protocolIdData_gte?: InputMaybe;\n protocolIdData_in?: InputMaybe>;\n protocolIdData_lt?: InputMaybe;\n protocolIdData_lte?: InputMaybe;\n protocolIdData_not?: InputMaybe;\n protocolIdData_not_contains?: InputMaybe;\n protocolIdData_not_contains_nocase?: InputMaybe;\n protocolIdData_not_ends_with?: InputMaybe;\n protocolIdData_not_ends_with_nocase?: InputMaybe;\n protocolIdData_not_in?: InputMaybe>;\n protocolIdData_not_starts_with?: InputMaybe;\n protocolIdData_not_starts_with_nocase?: InputMaybe;\n protocolIdData_starts_with?: InputMaybe;\n protocolIdData_starts_with_nocase?: InputMaybe;\n protocolId_gt?: InputMaybe;\n protocolId_gte?: InputMaybe;\n protocolId_in?: InputMaybe>;\n protocolId_lt?: InputMaybe;\n protocolId_lte?: InputMaybe;\n protocolId_not?: InputMaybe;\n protocolId_not_in?: InputMaybe>;\n protocolSwapFeeCache?: InputMaybe;\n protocolSwapFeeCache_gt?: InputMaybe;\n protocolSwapFeeCache_gte?: InputMaybe;\n protocolSwapFeeCache_in?: InputMaybe>;\n protocolSwapFeeCache_lt?: InputMaybe;\n protocolSwapFeeCache_lte?: InputMaybe;\n protocolSwapFeeCache_not?: InputMaybe;\n protocolSwapFeeCache_not_in?: InputMaybe>;\n protocolYieldFeeCache?: InputMaybe;\n protocolYieldFeeCache_gt?: InputMaybe;\n protocolYieldFeeCache_gte?: InputMaybe;\n protocolYieldFeeCache_in?: InputMaybe>;\n protocolYieldFeeCache_lt?: InputMaybe;\n protocolYieldFeeCache_lte?: InputMaybe;\n protocolYieldFeeCache_not?: InputMaybe;\n protocolYieldFeeCache_not_in?: InputMaybe>;\n root3Alpha?: InputMaybe;\n root3Alpha_gt?: InputMaybe;\n root3Alpha_gte?: InputMaybe;\n root3Alpha_in?: InputMaybe>;\n root3Alpha_lt?: InputMaybe;\n root3Alpha_lte?: InputMaybe;\n root3Alpha_not?: InputMaybe;\n root3Alpha_not_in?: InputMaybe>;\n s?: InputMaybe;\n s_gt?: InputMaybe;\n s_gte?: InputMaybe;\n s_in?: InputMaybe>;\n s_lt?: InputMaybe;\n s_lte?: InputMaybe;\n s_not?: InputMaybe;\n s_not_in?: InputMaybe>;\n shares_?: InputMaybe;\n snapshots_?: InputMaybe;\n sqrtAlpha?: InputMaybe;\n sqrtAlpha_gt?: InputMaybe;\n sqrtAlpha_gte?: InputMaybe;\n sqrtAlpha_in?: InputMaybe>;\n sqrtAlpha_lt?: InputMaybe;\n sqrtAlpha_lte?: InputMaybe;\n sqrtAlpha_not?: InputMaybe;\n sqrtAlpha_not_in?: InputMaybe>;\n sqrtBeta?: InputMaybe;\n sqrtBeta_gt?: InputMaybe;\n sqrtBeta_gte?: InputMaybe;\n sqrtBeta_in?: InputMaybe>;\n sqrtBeta_lt?: InputMaybe;\n sqrtBeta_lte?: InputMaybe;\n sqrtBeta_not?: InputMaybe;\n sqrtBeta_not_in?: InputMaybe>;\n strategyType?: InputMaybe;\n strategyType_gt?: InputMaybe;\n strategyType_gte?: InputMaybe;\n strategyType_in?: InputMaybe>;\n strategyType_lt?: InputMaybe;\n strategyType_lte?: InputMaybe;\n strategyType_not?: InputMaybe;\n strategyType_not_in?: InputMaybe>;\n swapEnabled?: InputMaybe;\n swapEnabledCurationSignal?: InputMaybe;\n swapEnabledCurationSignal_in?: InputMaybe>;\n swapEnabledCurationSignal_not?: InputMaybe;\n swapEnabledCurationSignal_not_in?: InputMaybe>;\n swapEnabledInternal?: InputMaybe;\n swapEnabledInternal_in?: InputMaybe>;\n swapEnabledInternal_not?: InputMaybe;\n swapEnabledInternal_not_in?: InputMaybe>;\n swapEnabled_in?: InputMaybe>;\n swapEnabled_not?: InputMaybe;\n swapEnabled_not_in?: InputMaybe>;\n swapFee?: InputMaybe;\n swapFee_gt?: InputMaybe;\n swapFee_gte?: InputMaybe;\n swapFee_in?: InputMaybe>;\n swapFee_lt?: InputMaybe;\n swapFee_lte?: InputMaybe;\n swapFee_not?: InputMaybe;\n swapFee_not_in?: InputMaybe>;\n swapsCount?: InputMaybe;\n swapsCount_gt?: InputMaybe;\n swapsCount_gte?: InputMaybe;\n swapsCount_in?: InputMaybe>;\n swapsCount_lt?: InputMaybe;\n swapsCount_lte?: InputMaybe;\n swapsCount_not?: InputMaybe;\n swapsCount_not_in?: InputMaybe>;\n swaps_?: InputMaybe;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n tauAlphaX?: InputMaybe;\n tauAlphaX_gt?: InputMaybe;\n tauAlphaX_gte?: InputMaybe;\n tauAlphaX_in?: InputMaybe>;\n tauAlphaX_lt?: InputMaybe;\n tauAlphaX_lte?: InputMaybe;\n tauAlphaX_not?: InputMaybe;\n tauAlphaX_not_in?: InputMaybe>;\n tauAlphaY?: InputMaybe;\n tauAlphaY_gt?: InputMaybe;\n tauAlphaY_gte?: InputMaybe;\n tauAlphaY_in?: InputMaybe>;\n tauAlphaY_lt?: InputMaybe;\n tauAlphaY_lte?: InputMaybe;\n tauAlphaY_not?: InputMaybe;\n tauAlphaY_not_in?: InputMaybe>;\n tauBetaX?: InputMaybe;\n tauBetaX_gt?: InputMaybe;\n tauBetaX_gte?: InputMaybe;\n tauBetaX_in?: InputMaybe>;\n tauBetaX_lt?: InputMaybe;\n tauBetaX_lte?: InputMaybe;\n tauBetaX_not?: InputMaybe;\n tauBetaX_not_in?: InputMaybe>;\n tauBetaY?: InputMaybe;\n tauBetaY_gt?: InputMaybe;\n tauBetaY_gte?: InputMaybe;\n tauBetaY_in?: InputMaybe>;\n tauBetaY_lt?: InputMaybe;\n tauBetaY_lte?: InputMaybe;\n tauBetaY_not?: InputMaybe;\n tauBetaY_not_in?: InputMaybe>;\n tokensList?: InputMaybe>;\n tokensList_contains?: InputMaybe>;\n tokensList_contains_nocase?: InputMaybe>;\n tokensList_not?: InputMaybe>;\n tokensList_not_contains?: InputMaybe>;\n tokensList_not_contains_nocase?: InputMaybe>;\n tokens_?: InputMaybe;\n totalAumFeeCollectedInBPT?: InputMaybe;\n totalAumFeeCollectedInBPT_gt?: InputMaybe;\n totalAumFeeCollectedInBPT_gte?: InputMaybe;\n totalAumFeeCollectedInBPT_in?: InputMaybe>;\n totalAumFeeCollectedInBPT_lt?: InputMaybe;\n totalAumFeeCollectedInBPT_lte?: InputMaybe;\n totalAumFeeCollectedInBPT_not?: InputMaybe;\n totalAumFeeCollectedInBPT_not_in?: InputMaybe>;\n totalLiquidity?: InputMaybe;\n totalLiquiditySansBPT?: InputMaybe;\n totalLiquiditySansBPT_gt?: InputMaybe;\n totalLiquiditySansBPT_gte?: InputMaybe;\n totalLiquiditySansBPT_in?: InputMaybe>;\n totalLiquiditySansBPT_lt?: InputMaybe;\n totalLiquiditySansBPT_lte?: InputMaybe;\n totalLiquiditySansBPT_not?: InputMaybe;\n totalLiquiditySansBPT_not_in?: InputMaybe>;\n totalLiquidity_gt?: InputMaybe;\n totalLiquidity_gte?: InputMaybe;\n totalLiquidity_in?: InputMaybe>;\n totalLiquidity_lt?: InputMaybe;\n totalLiquidity_lte?: InputMaybe;\n totalLiquidity_not?: InputMaybe;\n totalLiquidity_not_in?: InputMaybe>;\n totalProtocolFee?: InputMaybe;\n totalProtocolFeePaidInBPT?: InputMaybe;\n totalProtocolFeePaidInBPT_gt?: InputMaybe;\n totalProtocolFeePaidInBPT_gte?: InputMaybe;\n totalProtocolFeePaidInBPT_in?: InputMaybe>;\n totalProtocolFeePaidInBPT_lt?: InputMaybe;\n totalProtocolFeePaidInBPT_lte?: InputMaybe;\n totalProtocolFeePaidInBPT_not?: InputMaybe;\n totalProtocolFeePaidInBPT_not_in?: InputMaybe>;\n totalProtocolFee_gt?: InputMaybe;\n totalProtocolFee_gte?: InputMaybe;\n totalProtocolFee_in?: InputMaybe>;\n totalProtocolFee_lt?: InputMaybe;\n totalProtocolFee_lte?: InputMaybe;\n totalProtocolFee_not?: InputMaybe;\n totalProtocolFee_not_in?: InputMaybe>;\n totalShares?: InputMaybe;\n totalShares_gt?: InputMaybe;\n totalShares_gte?: InputMaybe;\n totalShares_in?: InputMaybe>;\n totalShares_lt?: InputMaybe;\n totalShares_lte?: InputMaybe;\n totalShares_not?: InputMaybe;\n totalShares_not_in?: InputMaybe>;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n totalWeight?: InputMaybe;\n totalWeight_gt?: InputMaybe;\n totalWeight_gte?: InputMaybe;\n totalWeight_in?: InputMaybe>;\n totalWeight_lt?: InputMaybe;\n totalWeight_lte?: InputMaybe;\n totalWeight_not?: InputMaybe;\n totalWeight_not_in?: InputMaybe>;\n tx?: InputMaybe;\n tx_contains?: InputMaybe;\n tx_gt?: InputMaybe;\n tx_gte?: InputMaybe;\n tx_in?: InputMaybe>;\n tx_lt?: InputMaybe;\n tx_lte?: InputMaybe;\n tx_not?: InputMaybe;\n tx_not_contains?: InputMaybe;\n tx_not_in?: InputMaybe>;\n u?: InputMaybe;\n u_gt?: InputMaybe;\n u_gte?: InputMaybe;\n u_in?: InputMaybe>;\n u_lt?: InputMaybe;\n u_lte?: InputMaybe;\n u_not?: InputMaybe;\n u_not_in?: InputMaybe>;\n unitSeconds?: InputMaybe;\n unitSeconds_gt?: InputMaybe;\n unitSeconds_gte?: InputMaybe;\n unitSeconds_in?: InputMaybe>;\n unitSeconds_lt?: InputMaybe;\n unitSeconds_lte?: InputMaybe;\n unitSeconds_not?: InputMaybe;\n unitSeconds_not_in?: InputMaybe>;\n upperTarget?: InputMaybe;\n upperTarget_gt?: InputMaybe;\n upperTarget_gte?: InputMaybe;\n upperTarget_in?: InputMaybe>;\n upperTarget_lt?: InputMaybe;\n upperTarget_lte?: InputMaybe;\n upperTarget_not?: InputMaybe;\n upperTarget_not_in?: InputMaybe>;\n v?: InputMaybe;\n v_gt?: InputMaybe;\n v_gte?: InputMaybe;\n v_in?: InputMaybe>;\n v_lt?: InputMaybe;\n v_lte?: InputMaybe;\n v_not?: InputMaybe;\n v_not_in?: InputMaybe>;\n vaultID?: InputMaybe;\n vaultID_?: InputMaybe;\n vaultID_contains?: InputMaybe;\n vaultID_contains_nocase?: InputMaybe;\n vaultID_ends_with?: InputMaybe;\n vaultID_ends_with_nocase?: InputMaybe;\n vaultID_gt?: InputMaybe;\n vaultID_gte?: InputMaybe;\n vaultID_in?: InputMaybe>;\n vaultID_lt?: InputMaybe;\n vaultID_lte?: InputMaybe;\n vaultID_not?: InputMaybe;\n vaultID_not_contains?: InputMaybe;\n vaultID_not_contains_nocase?: InputMaybe;\n vaultID_not_ends_with?: InputMaybe;\n vaultID_not_ends_with_nocase?: InputMaybe;\n vaultID_not_in?: InputMaybe>;\n vaultID_not_starts_with?: InputMaybe;\n vaultID_not_starts_with_nocase?: InputMaybe;\n vaultID_starts_with?: InputMaybe;\n vaultID_starts_with_nocase?: InputMaybe;\n w?: InputMaybe;\n w_gt?: InputMaybe;\n w_gte?: InputMaybe;\n w_in?: InputMaybe>;\n w_lt?: InputMaybe;\n w_lte?: InputMaybe;\n w_not?: InputMaybe;\n w_not_in?: InputMaybe>;\n weightUpdates_?: InputMaybe;\n wrappedIndex?: InputMaybe;\n wrappedIndex_gt?: InputMaybe;\n wrappedIndex_gte?: InputMaybe;\n wrappedIndex_in?: InputMaybe>;\n wrappedIndex_lt?: InputMaybe;\n wrappedIndex_lte?: InputMaybe;\n wrappedIndex_not?: InputMaybe;\n wrappedIndex_not_in?: InputMaybe>;\n z?: InputMaybe;\n z_gt?: InputMaybe;\n z_gte?: InputMaybe;\n z_in?: InputMaybe>;\n z_lt?: InputMaybe;\n z_lte?: InputMaybe;\n z_not?: InputMaybe;\n z_not_in?: InputMaybe>;\n};\n\nexport enum Pool_OrderBy {\n Address = 'address',\n Alpha = 'alpha',\n Amp = 'amp',\n AmpUpdates = 'ampUpdates',\n BaseToken = 'baseToken',\n Beta = 'beta',\n C = 'c',\n CircuitBreakers = 'circuitBreakers',\n CreateTime = 'createTime',\n DSq = 'dSq',\n Delta = 'delta',\n Epsilon = 'epsilon',\n ExpiryTime = 'expiryTime',\n Factory = 'factory',\n HistoricalValues = 'historicalValues',\n HoldersCount = 'holdersCount',\n Id = 'id',\n IsInRecoveryMode = 'isInRecoveryMode',\n IsPaused = 'isPaused',\n JoinExitEnabled = 'joinExitEnabled',\n Lambda = 'lambda',\n LastJoinExitAmp = 'lastJoinExitAmp',\n LastPostJoinExitInvariant = 'lastPostJoinExitInvariant',\n LatestAmpUpdate = 'latestAmpUpdate',\n LatestAmpUpdateEndAmp = 'latestAmpUpdate__endAmp',\n LatestAmpUpdateEndTimestamp = 'latestAmpUpdate__endTimestamp',\n LatestAmpUpdateId = 'latestAmpUpdate__id',\n LatestAmpUpdateScheduledTimestamp = 'latestAmpUpdate__scheduledTimestamp',\n LatestAmpUpdateStartAmp = 'latestAmpUpdate__startAmp',\n LatestAmpUpdateStartTimestamp = 'latestAmpUpdate__startTimestamp',\n LowerTarget = 'lowerTarget',\n MainIndex = 'mainIndex',\n ManagementAumFee = 'managementAumFee',\n ManagementFee = 'managementFee',\n MustAllowlistLPs = 'mustAllowlistLPs',\n Name = 'name',\n OracleEnabled = 'oracleEnabled',\n Owner = 'owner',\n PoolType = 'poolType',\n PoolTypeVersion = 'poolTypeVersion',\n PriceRateProviders = 'priceRateProviders',\n PrincipalToken = 'principalToken',\n ProtocolAumFeeCache = 'protocolAumFeeCache',\n ProtocolId = 'protocolId',\n ProtocolIdData = 'protocolIdData',\n ProtocolIdDataId = 'protocolIdData__id',\n ProtocolIdDataName = 'protocolIdData__name',\n ProtocolSwapFeeCache = 'protocolSwapFeeCache',\n ProtocolYieldFeeCache = 'protocolYieldFeeCache',\n Root3Alpha = 'root3Alpha',\n S = 's',\n Shares = 'shares',\n Snapshots = 'snapshots',\n SqrtAlpha = 'sqrtAlpha',\n SqrtBeta = 'sqrtBeta',\n StrategyType = 'strategyType',\n SwapEnabled = 'swapEnabled',\n SwapEnabledCurationSignal = 'swapEnabledCurationSignal',\n SwapEnabledInternal = 'swapEnabledInternal',\n SwapFee = 'swapFee',\n Swaps = 'swaps',\n SwapsCount = 'swapsCount',\n Symbol = 'symbol',\n TauAlphaX = 'tauAlphaX',\n TauAlphaY = 'tauAlphaY',\n TauBetaX = 'tauBetaX',\n TauBetaY = 'tauBetaY',\n Tokens = 'tokens',\n TokensList = 'tokensList',\n TotalAumFeeCollectedInBpt = 'totalAumFeeCollectedInBPT',\n TotalLiquidity = 'totalLiquidity',\n TotalLiquiditySansBpt = 'totalLiquiditySansBPT',\n TotalProtocolFee = 'totalProtocolFee',\n TotalProtocolFeePaidInBpt = 'totalProtocolFeePaidInBPT',\n TotalShares = 'totalShares',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume',\n TotalWeight = 'totalWeight',\n Tx = 'tx',\n U = 'u',\n UnitSeconds = 'unitSeconds',\n UpperTarget = 'upperTarget',\n V = 'v',\n VaultId = 'vaultID',\n VaultIdId = 'vaultID__id',\n VaultIdPoolCount = 'vaultID__poolCount',\n VaultIdProtocolFeesCollector = 'vaultID__protocolFeesCollector',\n VaultIdTotalLiquidity = 'vaultID__totalLiquidity',\n VaultIdTotalProtocolFee = 'vaultID__totalProtocolFee',\n VaultIdTotalSwapCount = 'vaultID__totalSwapCount',\n VaultIdTotalSwapFee = 'vaultID__totalSwapFee',\n VaultIdTotalSwapVolume = 'vaultID__totalSwapVolume',\n W = 'w',\n WeightUpdates = 'weightUpdates',\n WrappedIndex = 'wrappedIndex',\n Z = 'z'\n}\n\nexport type PriceRateProvider = {\n __typename?: 'PriceRateProvider';\n address: Scalars['Bytes'];\n cacheDuration?: Maybe;\n cacheExpiry?: Maybe;\n id: Scalars['ID'];\n lastCached?: Maybe;\n poolId: Pool;\n rate?: Maybe;\n token: PoolToken;\n};\n\nexport type PriceRateProvider_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n cacheDuration?: InputMaybe;\n cacheDuration_gt?: InputMaybe;\n cacheDuration_gte?: InputMaybe;\n cacheDuration_in?: InputMaybe>;\n cacheDuration_lt?: InputMaybe;\n cacheDuration_lte?: InputMaybe;\n cacheDuration_not?: InputMaybe;\n cacheDuration_not_in?: InputMaybe>;\n cacheExpiry?: InputMaybe;\n cacheExpiry_gt?: InputMaybe;\n cacheExpiry_gte?: InputMaybe;\n cacheExpiry_in?: InputMaybe>;\n cacheExpiry_lt?: InputMaybe;\n cacheExpiry_lte?: InputMaybe;\n cacheExpiry_not?: InputMaybe;\n cacheExpiry_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n lastCached?: InputMaybe;\n lastCached_gt?: InputMaybe;\n lastCached_gte?: InputMaybe;\n lastCached_in?: InputMaybe>;\n lastCached_lt?: InputMaybe;\n lastCached_lte?: InputMaybe;\n lastCached_not?: InputMaybe;\n lastCached_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n rate?: InputMaybe;\n rate_gt?: InputMaybe;\n rate_gte?: InputMaybe;\n rate_in?: InputMaybe>;\n rate_lt?: InputMaybe;\n rate_lte?: InputMaybe;\n rate_not?: InputMaybe;\n rate_not_in?: InputMaybe>;\n token?: InputMaybe;\n token_?: InputMaybe;\n token_contains?: InputMaybe;\n token_contains_nocase?: InputMaybe;\n token_ends_with?: InputMaybe;\n token_ends_with_nocase?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_contains_nocase?: InputMaybe;\n token_not_ends_with?: InputMaybe;\n token_not_ends_with_nocase?: InputMaybe;\n token_not_in?: InputMaybe>;\n token_not_starts_with?: InputMaybe;\n token_not_starts_with_nocase?: InputMaybe;\n token_starts_with?: InputMaybe;\n token_starts_with_nocase?: InputMaybe;\n};\n\nexport enum PriceRateProvider_OrderBy {\n Address = 'address',\n CacheDuration = 'cacheDuration',\n CacheExpiry = 'cacheExpiry',\n Id = 'id',\n LastCached = 'lastCached',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n Rate = 'rate',\n Token = 'token',\n TokenAddress = 'token__address',\n TokenAssetManager = 'token__assetManager',\n TokenBalance = 'token__balance',\n TokenCashBalance = 'token__cashBalance',\n TokenDecimals = 'token__decimals',\n TokenId = 'token__id',\n TokenIndex = 'token__index',\n TokenIsExemptFromYieldProtocolFee = 'token__isExemptFromYieldProtocolFee',\n TokenManagedBalance = 'token__managedBalance',\n TokenName = 'token__name',\n TokenOldPriceRate = 'token__oldPriceRate',\n TokenPaidProtocolFees = 'token__paidProtocolFees',\n TokenPriceRate = 'token__priceRate',\n TokenSymbol = 'token__symbol',\n TokenWeight = 'token__weight'\n}\n\nexport type ProtocolIdData = {\n __typename?: 'ProtocolIdData';\n id: Scalars['ID'];\n name: Scalars['String'];\n};\n\nexport type ProtocolIdData_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n};\n\nexport enum ProtocolIdData_OrderBy {\n Id = 'id',\n Name = 'name'\n}\n\nexport type Query = {\n __typename?: 'Query';\n /** Access to subgraph metadata */\n _meta?: Maybe<_Meta_>;\n ampUpdate?: Maybe;\n ampUpdates: Array;\n balancer?: Maybe;\n balancerSnapshot?: Maybe;\n balancerSnapshots: Array;\n balancers: Array;\n circuitBreaker?: Maybe;\n circuitBreakers: Array;\n gradualWeightUpdate?: Maybe;\n gradualWeightUpdates: Array;\n joinExit?: Maybe;\n joinExits: Array;\n latestPrice?: Maybe;\n latestPrices: Array;\n managementOperation?: Maybe;\n managementOperations: Array;\n pool?: Maybe;\n poolContract?: Maybe;\n poolContracts: Array;\n poolHistoricalLiquidities: Array;\n poolHistoricalLiquidity?: Maybe;\n poolShare?: Maybe;\n poolShares: Array;\n poolSnapshot?: Maybe;\n poolSnapshots: Array;\n poolToken?: Maybe;\n poolTokens: Array;\n pools: Array;\n priceRateProvider?: Maybe;\n priceRateProviders: Array;\n protocolIdData?: Maybe;\n protocolIdDatas: Array;\n swap?: Maybe;\n swapFeeUpdate?: Maybe;\n swapFeeUpdates: Array;\n swaps: Array;\n token?: Maybe;\n tokenPrice?: Maybe;\n tokenPrices: Array;\n tokenSnapshot?: Maybe;\n tokenSnapshots: Array;\n tokens: Array;\n tradePair?: Maybe;\n tradePairSnapshot?: Maybe;\n tradePairSnapshots: Array;\n tradePairs: Array;\n user?: Maybe;\n userInternalBalance?: Maybe;\n userInternalBalances: Array;\n users: Array;\n};\n\n\nexport type Query_MetaArgs = {\n block?: InputMaybe;\n};\n\n\nexport type QueryAmpUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryAmpUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryBalancerArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryBalancerSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryBalancerSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryBalancersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryCircuitBreakerArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryCircuitBreakersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGradualWeightUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGradualWeightUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryJoinExitArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryJoinExitsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryLatestPriceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryLatestPricesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryManagementOperationArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryManagementOperationsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolContractArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolContractsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolHistoricalLiquiditiesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolHistoricalLiquidityArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolShareArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolSharesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPriceRateProviderArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPriceRateProvidersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryProtocolIdDataArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryProtocolIdDatasArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QuerySwapArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QuerySwapFeeUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QuerySwapFeeUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QuerySwapsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTokenPriceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTokenPricesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTokenSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTokenSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTradePairArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTradePairSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTradePairSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTradePairsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryUserArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryUserInternalBalanceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryUserInternalBalancesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryUsersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\nexport type Subscription = {\n __typename?: 'Subscription';\n /** Access to subgraph metadata */\n _meta?: Maybe<_Meta_>;\n ampUpdate?: Maybe;\n ampUpdates: Array;\n balancer?: Maybe;\n balancerSnapshot?: Maybe;\n balancerSnapshots: Array;\n balancers: Array;\n circuitBreaker?: Maybe;\n circuitBreakers: Array;\n gradualWeightUpdate?: Maybe;\n gradualWeightUpdates: Array;\n joinExit?: Maybe;\n joinExits: Array;\n latestPrice?: Maybe;\n latestPrices: Array;\n managementOperation?: Maybe;\n managementOperations: Array;\n pool?: Maybe;\n poolContract?: Maybe;\n poolContracts: Array;\n poolHistoricalLiquidities: Array;\n poolHistoricalLiquidity?: Maybe;\n poolShare?: Maybe;\n poolShares: Array;\n poolSnapshot?: Maybe;\n poolSnapshots: Array;\n poolToken?: Maybe;\n poolTokens: Array;\n pools: Array;\n priceRateProvider?: Maybe;\n priceRateProviders: Array;\n protocolIdData?: Maybe;\n protocolIdDatas: Array;\n swap?: Maybe;\n swapFeeUpdate?: Maybe;\n swapFeeUpdates: Array;\n swaps: Array;\n token?: Maybe;\n tokenPrice?: Maybe;\n tokenPrices: Array;\n tokenSnapshot?: Maybe;\n tokenSnapshots: Array;\n tokens: Array;\n tradePair?: Maybe;\n tradePairSnapshot?: Maybe;\n tradePairSnapshots: Array;\n tradePairs: Array;\n user?: Maybe;\n userInternalBalance?: Maybe;\n userInternalBalances: Array;\n users: Array;\n};\n\n\nexport type Subscription_MetaArgs = {\n block?: InputMaybe;\n};\n\n\nexport type SubscriptionAmpUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionAmpUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionBalancerArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionBalancerSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionBalancerSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionBalancersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionCircuitBreakerArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionCircuitBreakersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGradualWeightUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGradualWeightUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionJoinExitArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionJoinExitsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionLatestPriceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionLatestPricesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionManagementOperationArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionManagementOperationsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolContractArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolContractsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolHistoricalLiquiditiesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolHistoricalLiquidityArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolShareArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolSharesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPriceRateProviderArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPriceRateProvidersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionProtocolIdDataArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionProtocolIdDatasArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionSwapArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionSwapFeeUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionSwapFeeUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionSwapsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTokenPriceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTokenPricesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTokenSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTokenSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTradePairArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTradePairSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTradePairSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTradePairsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionUserArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionUserInternalBalanceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionUserInternalBalancesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionUsersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\nexport type Swap = {\n __typename?: 'Swap';\n caller: Scalars['Bytes'];\n id: Scalars['ID'];\n poolId: Pool;\n timestamp: Scalars['Int'];\n tokenAmountIn: Scalars['BigDecimal'];\n tokenAmountOut: Scalars['BigDecimal'];\n tokenIn: Scalars['Bytes'];\n tokenInSym: Scalars['String'];\n tokenOut: Scalars['Bytes'];\n tokenOutSym: Scalars['String'];\n tx: Scalars['Bytes'];\n userAddress: User;\n valueUSD: Scalars['BigDecimal'];\n};\n\nexport type SwapFeeUpdate = {\n __typename?: 'SwapFeeUpdate';\n endSwapFeePercentage: Scalars['BigDecimal'];\n endTimestamp: Scalars['BigInt'];\n id: Scalars['ID'];\n pool: Pool;\n scheduledTimestamp: Scalars['Int'];\n startSwapFeePercentage: Scalars['BigDecimal'];\n startTimestamp: Scalars['BigInt'];\n};\n\nexport type SwapFeeUpdate_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n endSwapFeePercentage?: InputMaybe;\n endSwapFeePercentage_gt?: InputMaybe;\n endSwapFeePercentage_gte?: InputMaybe;\n endSwapFeePercentage_in?: InputMaybe>;\n endSwapFeePercentage_lt?: InputMaybe;\n endSwapFeePercentage_lte?: InputMaybe;\n endSwapFeePercentage_not?: InputMaybe;\n endSwapFeePercentage_not_in?: InputMaybe>;\n endTimestamp?: InputMaybe;\n endTimestamp_gt?: InputMaybe;\n endTimestamp_gte?: InputMaybe;\n endTimestamp_in?: InputMaybe>;\n endTimestamp_lt?: InputMaybe;\n endTimestamp_lte?: InputMaybe;\n endTimestamp_not?: InputMaybe;\n endTimestamp_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n scheduledTimestamp?: InputMaybe;\n scheduledTimestamp_gt?: InputMaybe;\n scheduledTimestamp_gte?: InputMaybe;\n scheduledTimestamp_in?: InputMaybe>;\n scheduledTimestamp_lt?: InputMaybe;\n scheduledTimestamp_lte?: InputMaybe;\n scheduledTimestamp_not?: InputMaybe;\n scheduledTimestamp_not_in?: InputMaybe>;\n startSwapFeePercentage?: InputMaybe;\n startSwapFeePercentage_gt?: InputMaybe;\n startSwapFeePercentage_gte?: InputMaybe;\n startSwapFeePercentage_in?: InputMaybe>;\n startSwapFeePercentage_lt?: InputMaybe;\n startSwapFeePercentage_lte?: InputMaybe;\n startSwapFeePercentage_not?: InputMaybe;\n startSwapFeePercentage_not_in?: InputMaybe>;\n startTimestamp?: InputMaybe;\n startTimestamp_gt?: InputMaybe;\n startTimestamp_gte?: InputMaybe;\n startTimestamp_in?: InputMaybe>;\n startTimestamp_lt?: InputMaybe;\n startTimestamp_lte?: InputMaybe;\n startTimestamp_not?: InputMaybe;\n startTimestamp_not_in?: InputMaybe>;\n};\n\nexport enum SwapFeeUpdate_OrderBy {\n EndSwapFeePercentage = 'endSwapFeePercentage',\n EndTimestamp = 'endTimestamp',\n Id = 'id',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n ScheduledTimestamp = 'scheduledTimestamp',\n StartSwapFeePercentage = 'startSwapFeePercentage',\n StartTimestamp = 'startTimestamp'\n}\n\nexport type Swap_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n caller?: InputMaybe;\n caller_contains?: InputMaybe;\n caller_gt?: InputMaybe;\n caller_gte?: InputMaybe;\n caller_in?: InputMaybe>;\n caller_lt?: InputMaybe;\n caller_lte?: InputMaybe;\n caller_not?: InputMaybe;\n caller_not_contains?: InputMaybe;\n caller_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n tokenAmountIn?: InputMaybe;\n tokenAmountIn_gt?: InputMaybe;\n tokenAmountIn_gte?: InputMaybe;\n tokenAmountIn_in?: InputMaybe>;\n tokenAmountIn_lt?: InputMaybe;\n tokenAmountIn_lte?: InputMaybe;\n tokenAmountIn_not?: InputMaybe;\n tokenAmountIn_not_in?: InputMaybe>;\n tokenAmountOut?: InputMaybe;\n tokenAmountOut_gt?: InputMaybe;\n tokenAmountOut_gte?: InputMaybe;\n tokenAmountOut_in?: InputMaybe>;\n tokenAmountOut_lt?: InputMaybe;\n tokenAmountOut_lte?: InputMaybe;\n tokenAmountOut_not?: InputMaybe;\n tokenAmountOut_not_in?: InputMaybe>;\n tokenIn?: InputMaybe;\n tokenInSym?: InputMaybe;\n tokenInSym_contains?: InputMaybe;\n tokenInSym_contains_nocase?: InputMaybe;\n tokenInSym_ends_with?: InputMaybe;\n tokenInSym_ends_with_nocase?: InputMaybe;\n tokenInSym_gt?: InputMaybe;\n tokenInSym_gte?: InputMaybe;\n tokenInSym_in?: InputMaybe>;\n tokenInSym_lt?: InputMaybe;\n tokenInSym_lte?: InputMaybe;\n tokenInSym_not?: InputMaybe;\n tokenInSym_not_contains?: InputMaybe;\n tokenInSym_not_contains_nocase?: InputMaybe;\n tokenInSym_not_ends_with?: InputMaybe;\n tokenInSym_not_ends_with_nocase?: InputMaybe;\n tokenInSym_not_in?: InputMaybe>;\n tokenInSym_not_starts_with?: InputMaybe;\n tokenInSym_not_starts_with_nocase?: InputMaybe;\n tokenInSym_starts_with?: InputMaybe;\n tokenInSym_starts_with_nocase?: InputMaybe;\n tokenIn_contains?: InputMaybe;\n tokenIn_gt?: InputMaybe;\n tokenIn_gte?: InputMaybe;\n tokenIn_in?: InputMaybe>;\n tokenIn_lt?: InputMaybe;\n tokenIn_lte?: InputMaybe;\n tokenIn_not?: InputMaybe;\n tokenIn_not_contains?: InputMaybe;\n tokenIn_not_in?: InputMaybe>;\n tokenOut?: InputMaybe;\n tokenOutSym?: InputMaybe;\n tokenOutSym_contains?: InputMaybe;\n tokenOutSym_contains_nocase?: InputMaybe;\n tokenOutSym_ends_with?: InputMaybe;\n tokenOutSym_ends_with_nocase?: InputMaybe;\n tokenOutSym_gt?: InputMaybe;\n tokenOutSym_gte?: InputMaybe;\n tokenOutSym_in?: InputMaybe>;\n tokenOutSym_lt?: InputMaybe;\n tokenOutSym_lte?: InputMaybe;\n tokenOutSym_not?: InputMaybe;\n tokenOutSym_not_contains?: InputMaybe;\n tokenOutSym_not_contains_nocase?: InputMaybe;\n tokenOutSym_not_ends_with?: InputMaybe;\n tokenOutSym_not_ends_with_nocase?: InputMaybe;\n tokenOutSym_not_in?: InputMaybe>;\n tokenOutSym_not_starts_with?: InputMaybe;\n tokenOutSym_not_starts_with_nocase?: InputMaybe;\n tokenOutSym_starts_with?: InputMaybe;\n tokenOutSym_starts_with_nocase?: InputMaybe;\n tokenOut_contains?: InputMaybe;\n tokenOut_gt?: InputMaybe;\n tokenOut_gte?: InputMaybe;\n tokenOut_in?: InputMaybe>;\n tokenOut_lt?: InputMaybe;\n tokenOut_lte?: InputMaybe;\n tokenOut_not?: InputMaybe;\n tokenOut_not_contains?: InputMaybe;\n tokenOut_not_in?: InputMaybe>;\n tx?: InputMaybe;\n tx_contains?: InputMaybe;\n tx_gt?: InputMaybe;\n tx_gte?: InputMaybe;\n tx_in?: InputMaybe>;\n tx_lt?: InputMaybe;\n tx_lte?: InputMaybe;\n tx_not?: InputMaybe;\n tx_not_contains?: InputMaybe;\n tx_not_in?: InputMaybe>;\n userAddress?: InputMaybe;\n userAddress_?: InputMaybe;\n userAddress_contains?: InputMaybe;\n userAddress_contains_nocase?: InputMaybe;\n userAddress_ends_with?: InputMaybe;\n userAddress_ends_with_nocase?: InputMaybe;\n userAddress_gt?: InputMaybe;\n userAddress_gte?: InputMaybe;\n userAddress_in?: InputMaybe>;\n userAddress_lt?: InputMaybe;\n userAddress_lte?: InputMaybe;\n userAddress_not?: InputMaybe;\n userAddress_not_contains?: InputMaybe;\n userAddress_not_contains_nocase?: InputMaybe;\n userAddress_not_ends_with?: InputMaybe;\n userAddress_not_ends_with_nocase?: InputMaybe;\n userAddress_not_in?: InputMaybe>;\n userAddress_not_starts_with?: InputMaybe;\n userAddress_not_starts_with_nocase?: InputMaybe;\n userAddress_starts_with?: InputMaybe;\n userAddress_starts_with_nocase?: InputMaybe;\n valueUSD?: InputMaybe;\n valueUSD_gt?: InputMaybe;\n valueUSD_gte?: InputMaybe;\n valueUSD_in?: InputMaybe>;\n valueUSD_lt?: InputMaybe;\n valueUSD_lte?: InputMaybe;\n valueUSD_not?: InputMaybe;\n valueUSD_not_in?: InputMaybe>;\n};\n\nexport enum Swap_OrderBy {\n Caller = 'caller',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n Timestamp = 'timestamp',\n TokenAmountIn = 'tokenAmountIn',\n TokenAmountOut = 'tokenAmountOut',\n TokenIn = 'tokenIn',\n TokenInSym = 'tokenInSym',\n TokenOut = 'tokenOut',\n TokenOutSym = 'tokenOutSym',\n Tx = 'tx',\n UserAddress = 'userAddress',\n UserAddressId = 'userAddress__id',\n ValueUsd = 'valueUSD'\n}\n\nexport type Token = {\n __typename?: 'Token';\n address: Scalars['String'];\n decimals: Scalars['Int'];\n fxOracleDecimals?: Maybe;\n id: Scalars['ID'];\n latestFXPrice?: Maybe;\n latestPrice?: Maybe;\n latestUSDPrice?: Maybe;\n latestUSDPriceTimestamp?: Maybe;\n name?: Maybe;\n pool?: Maybe;\n symbol?: Maybe;\n totalBalanceNotional: Scalars['BigDecimal'];\n totalBalanceUSD: Scalars['BigDecimal'];\n totalSwapCount: Scalars['BigInt'];\n totalVolumeNotional: Scalars['BigDecimal'];\n totalVolumeUSD: Scalars['BigDecimal'];\n};\n\nexport type TokenPrice = {\n __typename?: 'TokenPrice';\n amount: Scalars['BigDecimal'];\n asset: Scalars['Bytes'];\n block: Scalars['BigInt'];\n id: Scalars['ID'];\n poolId: Pool;\n price: Scalars['BigDecimal'];\n pricingAsset: Scalars['Bytes'];\n timestamp: Scalars['Int'];\n};\n\nexport type TokenPrice_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n amount?: InputMaybe;\n amount_gt?: InputMaybe;\n amount_gte?: InputMaybe;\n amount_in?: InputMaybe>;\n amount_lt?: InputMaybe;\n amount_lte?: InputMaybe;\n amount_not?: InputMaybe;\n amount_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n asset?: InputMaybe;\n asset_contains?: InputMaybe;\n asset_gt?: InputMaybe;\n asset_gte?: InputMaybe;\n asset_in?: InputMaybe>;\n asset_lt?: InputMaybe;\n asset_lte?: InputMaybe;\n asset_not?: InputMaybe;\n asset_not_contains?: InputMaybe;\n asset_not_in?: InputMaybe>;\n block?: InputMaybe;\n block_gt?: InputMaybe;\n block_gte?: InputMaybe;\n block_in?: InputMaybe>;\n block_lt?: InputMaybe;\n block_lte?: InputMaybe;\n block_not?: InputMaybe;\n block_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n price?: InputMaybe;\n price_gt?: InputMaybe;\n price_gte?: InputMaybe;\n price_in?: InputMaybe>;\n price_lt?: InputMaybe;\n price_lte?: InputMaybe;\n price_not?: InputMaybe;\n price_not_in?: InputMaybe>;\n pricingAsset?: InputMaybe;\n pricingAsset_contains?: InputMaybe;\n pricingAsset_gt?: InputMaybe;\n pricingAsset_gte?: InputMaybe;\n pricingAsset_in?: InputMaybe>;\n pricingAsset_lt?: InputMaybe;\n pricingAsset_lte?: InputMaybe;\n pricingAsset_not?: InputMaybe;\n pricingAsset_not_contains?: InputMaybe;\n pricingAsset_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n};\n\nexport enum TokenPrice_OrderBy {\n Amount = 'amount',\n Asset = 'asset',\n Block = 'block',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n Price = 'price',\n PricingAsset = 'pricingAsset',\n Timestamp = 'timestamp'\n}\n\nexport type TokenSnapshot = {\n __typename?: 'TokenSnapshot';\n id: Scalars['ID'];\n timestamp: Scalars['Int'];\n token: Token;\n totalBalanceNotional: Scalars['BigDecimal'];\n totalBalanceUSD: Scalars['BigDecimal'];\n totalSwapCount: Scalars['BigInt'];\n totalVolumeNotional: Scalars['BigDecimal'];\n totalVolumeUSD: Scalars['BigDecimal'];\n};\n\nexport type TokenSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n token?: InputMaybe;\n token_?: InputMaybe;\n token_contains?: InputMaybe;\n token_contains_nocase?: InputMaybe;\n token_ends_with?: InputMaybe;\n token_ends_with_nocase?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_contains_nocase?: InputMaybe;\n token_not_ends_with?: InputMaybe;\n token_not_ends_with_nocase?: InputMaybe;\n token_not_in?: InputMaybe>;\n token_not_starts_with?: InputMaybe;\n token_not_starts_with_nocase?: InputMaybe;\n token_starts_with?: InputMaybe;\n token_starts_with_nocase?: InputMaybe;\n totalBalanceNotional?: InputMaybe;\n totalBalanceNotional_gt?: InputMaybe;\n totalBalanceNotional_gte?: InputMaybe;\n totalBalanceNotional_in?: InputMaybe>;\n totalBalanceNotional_lt?: InputMaybe;\n totalBalanceNotional_lte?: InputMaybe;\n totalBalanceNotional_not?: InputMaybe;\n totalBalanceNotional_not_in?: InputMaybe>;\n totalBalanceUSD?: InputMaybe;\n totalBalanceUSD_gt?: InputMaybe;\n totalBalanceUSD_gte?: InputMaybe;\n totalBalanceUSD_in?: InputMaybe>;\n totalBalanceUSD_lt?: InputMaybe;\n totalBalanceUSD_lte?: InputMaybe;\n totalBalanceUSD_not?: InputMaybe;\n totalBalanceUSD_not_in?: InputMaybe>;\n totalSwapCount?: InputMaybe;\n totalSwapCount_gt?: InputMaybe;\n totalSwapCount_gte?: InputMaybe;\n totalSwapCount_in?: InputMaybe>;\n totalSwapCount_lt?: InputMaybe;\n totalSwapCount_lte?: InputMaybe;\n totalSwapCount_not?: InputMaybe;\n totalSwapCount_not_in?: InputMaybe>;\n totalVolumeNotional?: InputMaybe;\n totalVolumeNotional_gt?: InputMaybe;\n totalVolumeNotional_gte?: InputMaybe;\n totalVolumeNotional_in?: InputMaybe>;\n totalVolumeNotional_lt?: InputMaybe;\n totalVolumeNotional_lte?: InputMaybe;\n totalVolumeNotional_not?: InputMaybe;\n totalVolumeNotional_not_in?: InputMaybe>;\n totalVolumeUSD?: InputMaybe;\n totalVolumeUSD_gt?: InputMaybe;\n totalVolumeUSD_gte?: InputMaybe;\n totalVolumeUSD_in?: InputMaybe>;\n totalVolumeUSD_lt?: InputMaybe;\n totalVolumeUSD_lte?: InputMaybe;\n totalVolumeUSD_not?: InputMaybe;\n totalVolumeUSD_not_in?: InputMaybe>;\n};\n\nexport enum TokenSnapshot_OrderBy {\n Id = 'id',\n Timestamp = 'timestamp',\n Token = 'token',\n TokenAddress = 'token__address',\n TokenDecimals = 'token__decimals',\n TokenFxOracleDecimals = 'token__fxOracleDecimals',\n TokenId = 'token__id',\n TokenLatestFxPrice = 'token__latestFXPrice',\n TokenLatestUsdPrice = 'token__latestUSDPrice',\n TokenLatestUsdPriceTimestamp = 'token__latestUSDPriceTimestamp',\n TokenName = 'token__name',\n TokenSymbol = 'token__symbol',\n TokenTotalBalanceNotional = 'token__totalBalanceNotional',\n TokenTotalBalanceUsd = 'token__totalBalanceUSD',\n TokenTotalSwapCount = 'token__totalSwapCount',\n TokenTotalVolumeNotional = 'token__totalVolumeNotional',\n TokenTotalVolumeUsd = 'token__totalVolumeUSD',\n TotalBalanceNotional = 'totalBalanceNotional',\n TotalBalanceUsd = 'totalBalanceUSD',\n TotalSwapCount = 'totalSwapCount',\n TotalVolumeNotional = 'totalVolumeNotional',\n TotalVolumeUsd = 'totalVolumeUSD'\n}\n\nexport type Token_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_contains_nocase?: InputMaybe;\n address_ends_with?: InputMaybe;\n address_ends_with_nocase?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_contains_nocase?: InputMaybe;\n address_not_ends_with?: InputMaybe;\n address_not_ends_with_nocase?: InputMaybe;\n address_not_in?: InputMaybe>;\n address_not_starts_with?: InputMaybe;\n address_not_starts_with_nocase?: InputMaybe;\n address_starts_with?: InputMaybe;\n address_starts_with_nocase?: InputMaybe;\n and?: InputMaybe>>;\n decimals?: InputMaybe;\n decimals_gt?: InputMaybe;\n decimals_gte?: InputMaybe;\n decimals_in?: InputMaybe>;\n decimals_lt?: InputMaybe;\n decimals_lte?: InputMaybe;\n decimals_not?: InputMaybe;\n decimals_not_in?: InputMaybe>;\n fxOracleDecimals?: InputMaybe;\n fxOracleDecimals_gt?: InputMaybe;\n fxOracleDecimals_gte?: InputMaybe;\n fxOracleDecimals_in?: InputMaybe>;\n fxOracleDecimals_lt?: InputMaybe;\n fxOracleDecimals_lte?: InputMaybe;\n fxOracleDecimals_not?: InputMaybe;\n fxOracleDecimals_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n latestFXPrice?: InputMaybe;\n latestFXPrice_gt?: InputMaybe;\n latestFXPrice_gte?: InputMaybe;\n latestFXPrice_in?: InputMaybe>;\n latestFXPrice_lt?: InputMaybe;\n latestFXPrice_lte?: InputMaybe;\n latestFXPrice_not?: InputMaybe;\n latestFXPrice_not_in?: InputMaybe>;\n latestPrice?: InputMaybe;\n latestPrice_?: InputMaybe;\n latestPrice_contains?: InputMaybe;\n latestPrice_contains_nocase?: InputMaybe;\n latestPrice_ends_with?: InputMaybe;\n latestPrice_ends_with_nocase?: InputMaybe;\n latestPrice_gt?: InputMaybe;\n latestPrice_gte?: InputMaybe;\n latestPrice_in?: InputMaybe>;\n latestPrice_lt?: InputMaybe;\n latestPrice_lte?: InputMaybe;\n latestPrice_not?: InputMaybe;\n latestPrice_not_contains?: InputMaybe;\n latestPrice_not_contains_nocase?: InputMaybe;\n latestPrice_not_ends_with?: InputMaybe;\n latestPrice_not_ends_with_nocase?: InputMaybe;\n latestPrice_not_in?: InputMaybe>;\n latestPrice_not_starts_with?: InputMaybe;\n latestPrice_not_starts_with_nocase?: InputMaybe;\n latestPrice_starts_with?: InputMaybe;\n latestPrice_starts_with_nocase?: InputMaybe;\n latestUSDPrice?: InputMaybe;\n latestUSDPriceTimestamp?: InputMaybe;\n latestUSDPriceTimestamp_gt?: InputMaybe;\n latestUSDPriceTimestamp_gte?: InputMaybe;\n latestUSDPriceTimestamp_in?: InputMaybe>;\n latestUSDPriceTimestamp_lt?: InputMaybe;\n latestUSDPriceTimestamp_lte?: InputMaybe;\n latestUSDPriceTimestamp_not?: InputMaybe;\n latestUSDPriceTimestamp_not_in?: InputMaybe>;\n latestUSDPrice_gt?: InputMaybe;\n latestUSDPrice_gte?: InputMaybe;\n latestUSDPrice_in?: InputMaybe>;\n latestUSDPrice_lt?: InputMaybe;\n latestUSDPrice_lte?: InputMaybe;\n latestUSDPrice_not?: InputMaybe;\n latestUSDPrice_not_in?: InputMaybe>;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n totalBalanceNotional?: InputMaybe;\n totalBalanceNotional_gt?: InputMaybe;\n totalBalanceNotional_gte?: InputMaybe;\n totalBalanceNotional_in?: InputMaybe>;\n totalBalanceNotional_lt?: InputMaybe;\n totalBalanceNotional_lte?: InputMaybe;\n totalBalanceNotional_not?: InputMaybe;\n totalBalanceNotional_not_in?: InputMaybe>;\n totalBalanceUSD?: InputMaybe;\n totalBalanceUSD_gt?: InputMaybe;\n totalBalanceUSD_gte?: InputMaybe;\n totalBalanceUSD_in?: InputMaybe>;\n totalBalanceUSD_lt?: InputMaybe;\n totalBalanceUSD_lte?: InputMaybe;\n totalBalanceUSD_not?: InputMaybe;\n totalBalanceUSD_not_in?: InputMaybe>;\n totalSwapCount?: InputMaybe;\n totalSwapCount_gt?: InputMaybe;\n totalSwapCount_gte?: InputMaybe;\n totalSwapCount_in?: InputMaybe>;\n totalSwapCount_lt?: InputMaybe;\n totalSwapCount_lte?: InputMaybe;\n totalSwapCount_not?: InputMaybe;\n totalSwapCount_not_in?: InputMaybe>;\n totalVolumeNotional?: InputMaybe;\n totalVolumeNotional_gt?: InputMaybe;\n totalVolumeNotional_gte?: InputMaybe;\n totalVolumeNotional_in?: InputMaybe>;\n totalVolumeNotional_lt?: InputMaybe;\n totalVolumeNotional_lte?: InputMaybe;\n totalVolumeNotional_not?: InputMaybe;\n totalVolumeNotional_not_in?: InputMaybe>;\n totalVolumeUSD?: InputMaybe;\n totalVolumeUSD_gt?: InputMaybe;\n totalVolumeUSD_gte?: InputMaybe;\n totalVolumeUSD_in?: InputMaybe>;\n totalVolumeUSD_lt?: InputMaybe;\n totalVolumeUSD_lte?: InputMaybe;\n totalVolumeUSD_not?: InputMaybe;\n totalVolumeUSD_not_in?: InputMaybe>;\n};\n\nexport enum Token_OrderBy {\n Address = 'address',\n Decimals = 'decimals',\n FxOracleDecimals = 'fxOracleDecimals',\n Id = 'id',\n LatestFxPrice = 'latestFXPrice',\n LatestPrice = 'latestPrice',\n LatestPriceAsset = 'latestPrice__asset',\n LatestPriceBlock = 'latestPrice__block',\n LatestPriceId = 'latestPrice__id',\n LatestPricePrice = 'latestPrice__price',\n LatestPricePricingAsset = 'latestPrice__pricingAsset',\n LatestUsdPrice = 'latestUSDPrice',\n LatestUsdPriceTimestamp = 'latestUSDPriceTimestamp',\n Name = 'name',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n Symbol = 'symbol',\n TotalBalanceNotional = 'totalBalanceNotional',\n TotalBalanceUsd = 'totalBalanceUSD',\n TotalSwapCount = 'totalSwapCount',\n TotalVolumeNotional = 'totalVolumeNotional',\n TotalVolumeUsd = 'totalVolumeUSD'\n}\n\nexport type TradePair = {\n __typename?: 'TradePair';\n /** Token Address - Token Address */\n id: Scalars['ID'];\n token0: Token;\n token1: Token;\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n};\n\nexport type TradePairSnapshot = {\n __typename?: 'TradePairSnapshot';\n id: Scalars['ID'];\n pair: TradePair;\n timestamp: Scalars['Int'];\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n};\n\nexport type TradePairSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pair?: InputMaybe;\n pair_?: InputMaybe;\n pair_contains?: InputMaybe;\n pair_contains_nocase?: InputMaybe;\n pair_ends_with?: InputMaybe;\n pair_ends_with_nocase?: InputMaybe;\n pair_gt?: InputMaybe;\n pair_gte?: InputMaybe;\n pair_in?: InputMaybe>;\n pair_lt?: InputMaybe;\n pair_lte?: InputMaybe;\n pair_not?: InputMaybe;\n pair_not_contains?: InputMaybe;\n pair_not_contains_nocase?: InputMaybe;\n pair_not_ends_with?: InputMaybe;\n pair_not_ends_with_nocase?: InputMaybe;\n pair_not_in?: InputMaybe>;\n pair_not_starts_with?: InputMaybe;\n pair_not_starts_with_nocase?: InputMaybe;\n pair_starts_with?: InputMaybe;\n pair_starts_with_nocase?: InputMaybe;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n};\n\nexport enum TradePairSnapshot_OrderBy {\n Id = 'id',\n Pair = 'pair',\n PairId = 'pair__id',\n PairTotalSwapFee = 'pair__totalSwapFee',\n PairTotalSwapVolume = 'pair__totalSwapVolume',\n Timestamp = 'timestamp',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume'\n}\n\nexport type TradePair_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n token0?: InputMaybe;\n token0_?: InputMaybe;\n token0_contains?: InputMaybe;\n token0_contains_nocase?: InputMaybe;\n token0_ends_with?: InputMaybe;\n token0_ends_with_nocase?: InputMaybe;\n token0_gt?: InputMaybe;\n token0_gte?: InputMaybe;\n token0_in?: InputMaybe>;\n token0_lt?: InputMaybe;\n token0_lte?: InputMaybe;\n token0_not?: InputMaybe;\n token0_not_contains?: InputMaybe;\n token0_not_contains_nocase?: InputMaybe;\n token0_not_ends_with?: InputMaybe;\n token0_not_ends_with_nocase?: InputMaybe;\n token0_not_in?: InputMaybe>;\n token0_not_starts_with?: InputMaybe;\n token0_not_starts_with_nocase?: InputMaybe;\n token0_starts_with?: InputMaybe;\n token0_starts_with_nocase?: InputMaybe;\n token1?: InputMaybe;\n token1_?: InputMaybe;\n token1_contains?: InputMaybe;\n token1_contains_nocase?: InputMaybe;\n token1_ends_with?: InputMaybe;\n token1_ends_with_nocase?: InputMaybe;\n token1_gt?: InputMaybe;\n token1_gte?: InputMaybe;\n token1_in?: InputMaybe>;\n token1_lt?: InputMaybe;\n token1_lte?: InputMaybe;\n token1_not?: InputMaybe;\n token1_not_contains?: InputMaybe;\n token1_not_contains_nocase?: InputMaybe;\n token1_not_ends_with?: InputMaybe;\n token1_not_ends_with_nocase?: InputMaybe;\n token1_not_in?: InputMaybe>;\n token1_not_starts_with?: InputMaybe;\n token1_not_starts_with_nocase?: InputMaybe;\n token1_starts_with?: InputMaybe;\n token1_starts_with_nocase?: InputMaybe;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n};\n\nexport enum TradePair_OrderBy {\n Id = 'id',\n Token0 = 'token0',\n Token0Address = 'token0__address',\n Token0Decimals = 'token0__decimals',\n Token0FxOracleDecimals = 'token0__fxOracleDecimals',\n Token0Id = 'token0__id',\n Token0LatestFxPrice = 'token0__latestFXPrice',\n Token0LatestUsdPrice = 'token0__latestUSDPrice',\n Token0LatestUsdPriceTimestamp = 'token0__latestUSDPriceTimestamp',\n Token0Name = 'token0__name',\n Token0Symbol = 'token0__symbol',\n Token0TotalBalanceNotional = 'token0__totalBalanceNotional',\n Token0TotalBalanceUsd = 'token0__totalBalanceUSD',\n Token0TotalSwapCount = 'token0__totalSwapCount',\n Token0TotalVolumeNotional = 'token0__totalVolumeNotional',\n Token0TotalVolumeUsd = 'token0__totalVolumeUSD',\n Token1 = 'token1',\n Token1Address = 'token1__address',\n Token1Decimals = 'token1__decimals',\n Token1FxOracleDecimals = 'token1__fxOracleDecimals',\n Token1Id = 'token1__id',\n Token1LatestFxPrice = 'token1__latestFXPrice',\n Token1LatestUsdPrice = 'token1__latestUSDPrice',\n Token1LatestUsdPriceTimestamp = 'token1__latestUSDPriceTimestamp',\n Token1Name = 'token1__name',\n Token1Symbol = 'token1__symbol',\n Token1TotalBalanceNotional = 'token1__totalBalanceNotional',\n Token1TotalBalanceUsd = 'token1__totalBalanceUSD',\n Token1TotalSwapCount = 'token1__totalSwapCount',\n Token1TotalVolumeNotional = 'token1__totalVolumeNotional',\n Token1TotalVolumeUsd = 'token1__totalVolumeUSD',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume'\n}\n\nexport type User = {\n __typename?: 'User';\n id: Scalars['ID'];\n sharesOwned?: Maybe>;\n swaps?: Maybe>;\n userInternalBalances?: Maybe>;\n};\n\n\nexport type UserSharesOwnedArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserSwapsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserUserInternalBalancesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type UserInternalBalance = {\n __typename?: 'UserInternalBalance';\n balance: Scalars['BigDecimal'];\n id: Scalars['ID'];\n token: Scalars['Bytes'];\n tokenInfo?: Maybe;\n userAddress?: Maybe;\n};\n\nexport type UserInternalBalance_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n balance?: InputMaybe;\n balance_gt?: InputMaybe;\n balance_gte?: InputMaybe;\n balance_in?: InputMaybe>;\n balance_lt?: InputMaybe;\n balance_lte?: InputMaybe;\n balance_not?: InputMaybe;\n balance_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n token?: InputMaybe;\n tokenInfo?: InputMaybe;\n tokenInfo_?: InputMaybe;\n tokenInfo_contains?: InputMaybe;\n tokenInfo_contains_nocase?: InputMaybe;\n tokenInfo_ends_with?: InputMaybe;\n tokenInfo_ends_with_nocase?: InputMaybe;\n tokenInfo_gt?: InputMaybe;\n tokenInfo_gte?: InputMaybe;\n tokenInfo_in?: InputMaybe>;\n tokenInfo_lt?: InputMaybe;\n tokenInfo_lte?: InputMaybe;\n tokenInfo_not?: InputMaybe;\n tokenInfo_not_contains?: InputMaybe;\n tokenInfo_not_contains_nocase?: InputMaybe;\n tokenInfo_not_ends_with?: InputMaybe;\n tokenInfo_not_ends_with_nocase?: InputMaybe;\n tokenInfo_not_in?: InputMaybe>;\n tokenInfo_not_starts_with?: InputMaybe;\n tokenInfo_not_starts_with_nocase?: InputMaybe;\n tokenInfo_starts_with?: InputMaybe;\n tokenInfo_starts_with_nocase?: InputMaybe;\n token_contains?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_in?: InputMaybe>;\n userAddress?: InputMaybe;\n userAddress_?: InputMaybe;\n userAddress_contains?: InputMaybe;\n userAddress_contains_nocase?: InputMaybe;\n userAddress_ends_with?: InputMaybe;\n userAddress_ends_with_nocase?: InputMaybe;\n userAddress_gt?: InputMaybe;\n userAddress_gte?: InputMaybe;\n userAddress_in?: InputMaybe>;\n userAddress_lt?: InputMaybe;\n userAddress_lte?: InputMaybe;\n userAddress_not?: InputMaybe;\n userAddress_not_contains?: InputMaybe;\n userAddress_not_contains_nocase?: InputMaybe;\n userAddress_not_ends_with?: InputMaybe;\n userAddress_not_ends_with_nocase?: InputMaybe;\n userAddress_not_in?: InputMaybe>;\n userAddress_not_starts_with?: InputMaybe;\n userAddress_not_starts_with_nocase?: InputMaybe;\n userAddress_starts_with?: InputMaybe;\n userAddress_starts_with_nocase?: InputMaybe;\n};\n\nexport enum UserInternalBalance_OrderBy {\n Balance = 'balance',\n Id = 'id',\n Token = 'token',\n TokenInfo = 'tokenInfo',\n TokenInfoAddress = 'tokenInfo__address',\n TokenInfoDecimals = 'tokenInfo__decimals',\n TokenInfoFxOracleDecimals = 'tokenInfo__fxOracleDecimals',\n TokenInfoId = 'tokenInfo__id',\n TokenInfoLatestFxPrice = 'tokenInfo__latestFXPrice',\n TokenInfoLatestUsdPrice = 'tokenInfo__latestUSDPrice',\n TokenInfoLatestUsdPriceTimestamp = 'tokenInfo__latestUSDPriceTimestamp',\n TokenInfoName = 'tokenInfo__name',\n TokenInfoSymbol = 'tokenInfo__symbol',\n TokenInfoTotalBalanceNotional = 'tokenInfo__totalBalanceNotional',\n TokenInfoTotalBalanceUsd = 'tokenInfo__totalBalanceUSD',\n TokenInfoTotalSwapCount = 'tokenInfo__totalSwapCount',\n TokenInfoTotalVolumeNotional = 'tokenInfo__totalVolumeNotional',\n TokenInfoTotalVolumeUsd = 'tokenInfo__totalVolumeUSD',\n UserAddress = 'userAddress',\n UserAddressId = 'userAddress__id'\n}\n\nexport type User_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n sharesOwned_?: InputMaybe;\n swaps_?: InputMaybe;\n userInternalBalances_?: InputMaybe;\n};\n\nexport enum User_OrderBy {\n Id = 'id',\n SharesOwned = 'sharesOwned',\n Swaps = 'swaps',\n UserInternalBalances = 'userInternalBalances'\n}\n\nexport type _Block_ = {\n __typename?: '_Block_';\n /** The hash of the block */\n hash?: Maybe;\n /** The block number */\n number: Scalars['Int'];\n /** Integer representation of the timestamp stored in blocks for the chain */\n timestamp?: Maybe;\n};\n\n/** The type for the top-level _meta field */\nexport type _Meta_ = {\n __typename?: '_Meta_';\n /**\n * Information about a specific subgraph block. The hash of the block\n * will be null if the _meta field has a block constraint that asks for\n * a block number. It will be filled if the _meta field has no block constraint\n * and therefore asks for the latest block\n *\n */\n block: _Block_;\n /** The deployment ID */\n deployment: Scalars['String'];\n /** If `true`, the subgraph encountered indexing errors at some past block */\n hasIndexingErrors: Scalars['Boolean'];\n};\n\nexport enum _SubgraphErrorPolicy_ {\n /** Data will be returned even if the subgraph has indexing errors */\n Allow = 'allow',\n /** If the subgraph has indexing errors, data will be omitted. The default. */\n Deny = 'deny'\n}\n\nexport type PoolShareQueryVariables = Exact<{\n id: Scalars['ID'];\n block?: InputMaybe;\n}>;\n\n\nexport type PoolShareQuery = { __typename?: 'Query', poolShare?: { __typename?: 'PoolShare', id: string, balance: string, userAddress: { __typename?: 'User', id: string }, poolId: { __typename?: 'Pool', id: string, address: string } } | null };\n\nexport type PoolSharesQueryVariables = Exact<{\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolSharesQuery = { __typename?: 'Query', poolShares: Array<{ __typename?: 'PoolShare', id: string, balance: string, userAddress: { __typename?: 'User', id: string }, poolId: { __typename?: 'Pool', id: string, address: string } }> };\n\nexport type SubgraphPoolShareFragment = { __typename?: 'PoolShare', id: string, balance: string, userAddress: { __typename?: 'User', id: string }, poolId: { __typename?: 'Pool', id: string, address: string } };\n\nexport type PoolsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolsQuery = { __typename?: 'Query', pools: Array<{ __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null }> };\n\nexport type AllPoolsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type AllPoolsQuery = { __typename?: 'Query', pool0: Array<{ __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null }>, pool1000: Array<{ __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null }>, pool2000: Array<{ __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null }> };\n\nexport type PoolQueryVariables = Exact<{\n id: Scalars['ID'];\n block?: InputMaybe;\n}>;\n\n\nexport type PoolQuery = { __typename?: 'Query', pool?: { __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null } | null };\n\nexport type SubgraphPoolFragment = { __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null };\n\nexport type SubgraphPoolTokenFragment = { __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } };\n\nexport type SubgraphSubPoolTokenFragment = { __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null };\n\nexport type TokenAttrsFragment = { __typename?: 'Token', address: string, symbol?: string | null, decimals: number };\n\nexport type SubgraphSubPoolFragment = { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null };\n\nexport type TokenTreeFragment = { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null };\n\nexport type SubgraphPriceRateProviderFragment = { __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } };\n\nexport type PoolHistoricalLiquiditiesQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolHistoricalLiquiditiesQuery = { __typename?: 'Query', poolHistoricalLiquidities: Array<{ __typename?: 'PoolHistoricalLiquidity', id: string, poolTotalShares: string, poolLiquidity: string, poolShareValue: string, pricingAsset: string, block: string, poolId: { __typename?: 'Pool', id: string } }> };\n\nexport type PoolSnapshotsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolSnapshotsQuery = { __typename?: 'Query', poolSnapshots: Array<{ __typename?: 'PoolSnapshot', id: string, totalShares: string, swapVolume: string, swapFees: string, timestamp: number, pool: { __typename?: 'Pool', id: string } }> };\n\nexport type SubgraphPoolSnapshotFragment = { __typename?: 'PoolSnapshot', id: string, totalShares: string, swapVolume: string, swapFees: string, timestamp: number, pool: { __typename?: 'Pool', id: string } };\n\nexport type JoinExitsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type JoinExitsQuery = { __typename?: 'Query', joinExits: Array<{ __typename?: 'JoinExit', amounts: Array, id: string, sender: string, timestamp: number, tx: string, type: InvestType, user: { __typename?: 'User', id: string }, pool: { __typename?: 'Pool', id: string, tokensList: Array } }> };\n\nexport type SubgraphJoinExitFragment = { __typename?: 'JoinExit', amounts: Array, id: string, sender: string, timestamp: number, tx: string, type: InvestType, user: { __typename?: 'User', id: string }, pool: { __typename?: 'Pool', id: string, tokensList: Array } };\n\nexport type BalancersQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type BalancersQuery = { __typename?: 'Query', balancers: Array<{ __typename?: 'Balancer', id: string, totalLiquidity: string, totalSwapVolume: string, totalSwapFee: string, totalSwapCount: string, poolCount: number }> };\n\nexport type SubgraphBalancerFragment = { __typename?: 'Balancer', id: string, totalLiquidity: string, totalSwapVolume: string, totalSwapFee: string, totalSwapCount: string, poolCount: number };\n\nexport type TokenPricesQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type TokenPricesQuery = { __typename?: 'Query', tokenPrices: Array<{ __typename?: 'TokenPrice', id: string, asset: string, amount: string, pricingAsset: string, price: string, block: string, timestamp: number, poolId: { __typename?: 'Pool', id: string } }> };\n\nexport type SubgraphTokenPriceFragment = { __typename?: 'TokenPrice', id: string, asset: string, amount: string, pricingAsset: string, price: string, block: string, timestamp: number, poolId: { __typename?: 'Pool', id: string } };\n\nexport type TokenLatestPricesQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type TokenLatestPricesQuery = { __typename?: 'Query', latestPrices: Array<{ __typename?: 'LatestPrice', id: string, asset: string, price: string, pricingAsset: string, poolId: { __typename?: 'Pool', id: string } }> };\n\nexport type TokenLatestPriceQueryVariables = Exact<{\n id: Scalars['ID'];\n}>;\n\n\nexport type TokenLatestPriceQuery = { __typename?: 'Query', latestPrice?: { __typename?: 'LatestPrice', id: string, asset: string, price: string, pricingAsset: string, poolId: { __typename?: 'Pool', id: string } } | null };\n\nexport type SubgraphTokenLatestPriceFragment = { __typename?: 'LatestPrice', id: string, asset: string, price: string, pricingAsset: string, poolId: { __typename?: 'Pool', id: string } };\n\nexport type UserQueryVariables = Exact<{\n id: Scalars['ID'];\n block?: InputMaybe;\n}>;\n\n\nexport type UserQuery = { __typename?: 'Query', user?: { __typename?: 'User', id: string, sharesOwned?: Array<{ __typename?: 'PoolShare', balance: string, poolId: { __typename?: 'Pool', id: string } }> | null } | null };\n\nexport type UsersQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type UsersQuery = { __typename?: 'Query', users: Array<{ __typename?: 'User', id: string, sharesOwned?: Array<{ __typename?: 'PoolShare', balance: string, poolId: { __typename?: 'Pool', id: string } }> | null }> };\n\nexport type SubgraphUserFragment = { __typename?: 'User', id: string, sharesOwned?: Array<{ __typename?: 'PoolShare', balance: string, poolId: { __typename?: 'Pool', id: string } }> | null };\n\nexport const SubgraphPoolShareFragmentDoc = gql`\n fragment SubgraphPoolShare on PoolShare {\n id\n balance\n userAddress {\n id\n }\n poolId {\n id\n address\n }\n}\n `;\nexport const SubgraphSubPoolFragmentDoc = gql`\n fragment SubgraphSubPool on Pool {\n id\n totalShares\n address\n poolType\n mainIndex\n}\n `;\nexport const SubgraphSubPoolTokenFragmentDoc = gql`\n fragment SubgraphSubPoolToken on PoolToken {\n address\n balance\n weight\n priceRate\n symbol\n decimals\n isExemptFromYieldProtocolFee\n}\n `;\nexport const TokenTreeFragmentDoc = gql`\n fragment TokenTree on Token {\n latestUSDPrice\n latestFXPrice\n pool {\n ...SubgraphSubPool\n tokens(first: 100, orderBy: index) {\n ...SubgraphSubPoolToken\n token {\n latestUSDPrice\n pool {\n ...SubgraphSubPool\n tokens(first: 100, orderBy: index) {\n ...SubgraphSubPoolToken\n token {\n latestUSDPrice\n pool {\n ...SubgraphSubPool\n }\n }\n }\n }\n }\n }\n }\n}\n ${SubgraphSubPoolFragmentDoc}\n${SubgraphSubPoolTokenFragmentDoc}`;\nexport const SubgraphPoolTokenFragmentDoc = gql`\n fragment SubgraphPoolToken on PoolToken {\n id\n symbol\n name\n decimals\n address\n balance\n managedBalance\n weight\n priceRate\n isExemptFromYieldProtocolFee\n token {\n ...TokenTree\n }\n}\n ${TokenTreeFragmentDoc}`;\nexport const SubgraphPriceRateProviderFragmentDoc = gql`\n fragment SubgraphPriceRateProvider on PriceRateProvider {\n address\n token {\n address\n }\n}\n `;\nexport const SubgraphPoolFragmentDoc = gql`\n fragment SubgraphPool on Pool {\n id\n address\n poolType\n poolTypeVersion\n factory\n strategyType\n symbol\n name\n swapEnabled\n swapFee\n protocolYieldFeeCache\n protocolSwapFeeCache\n owner\n totalWeight\n totalSwapVolume\n totalSwapFee\n totalLiquidity\n totalShares\n tokens(first: 100, orderBy: index) {\n ...SubgraphPoolToken\n }\n swapsCount\n holdersCount\n tokensList\n amp\n priceRateProviders(first: 100) {\n ...SubgraphPriceRateProvider\n }\n expiryTime\n unitSeconds\n createTime\n principalToken\n baseToken\n wrappedIndex\n mainIndex\n lowerTarget\n upperTarget\n sqrtAlpha\n sqrtBeta\n root3Alpha\n isInRecoveryMode\n isPaused\n alpha\n beta\n c\n s\n lambda\n tauAlphaX\n tauAlphaY\n tauBetaX\n tauBetaY\n u\n v\n w\n z\n dSq\n delta\n epsilon\n}\n ${SubgraphPoolTokenFragmentDoc}\n${SubgraphPriceRateProviderFragmentDoc}`;\nexport const TokenAttrsFragmentDoc = gql`\n fragment TokenAttrs on Token {\n address\n symbol\n decimals\n}\n `;\nexport const SubgraphPoolSnapshotFragmentDoc = gql`\n fragment SubgraphPoolSnapshot on PoolSnapshot {\n id\n pool {\n id\n }\n totalShares\n swapVolume\n swapFees\n timestamp\n}\n `;\nexport const SubgraphJoinExitFragmentDoc = gql`\n fragment SubgraphJoinExit on JoinExit {\n amounts\n id\n sender\n timestamp\n tx\n type\n user {\n id\n }\n pool {\n id\n tokensList\n }\n}\n `;\nexport const SubgraphBalancerFragmentDoc = gql`\n fragment SubgraphBalancer on Balancer {\n id\n totalLiquidity\n totalSwapVolume\n totalSwapFee\n totalSwapCount\n poolCount\n}\n `;\nexport const SubgraphTokenPriceFragmentDoc = gql`\n fragment SubgraphTokenPrice on TokenPrice {\n id\n poolId {\n id\n }\n asset\n amount\n pricingAsset\n price\n block\n timestamp\n}\n `;\nexport const SubgraphTokenLatestPriceFragmentDoc = gql`\n fragment SubgraphTokenLatestPrice on LatestPrice {\n id\n asset\n price\n poolId {\n id\n }\n pricingAsset\n}\n `;\nexport const SubgraphUserFragmentDoc = gql`\n fragment SubgraphUser on User {\n id\n sharesOwned(first: 1000) {\n balance\n poolId {\n id\n }\n }\n}\n `;\nexport const PoolShareDocument = gql`\n query PoolShare($id: ID!, $block: Block_height) {\n poolShare(id: $id, block: $block) {\n ...SubgraphPoolShare\n }\n}\n ${SubgraphPoolShareFragmentDoc}`;\nexport const PoolSharesDocument = gql`\n query PoolShares($first: Int, $orderBy: PoolShare_orderBy, $orderDirection: OrderDirection, $skip: Int, $where: PoolShare_filter, $block: Block_height) {\n poolShares(\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n skip: $skip\n where: $where\n block: $block\n ) {\n ...SubgraphPoolShare\n }\n}\n ${SubgraphPoolShareFragmentDoc}`;\nexport const PoolsDocument = gql`\n query Pools($skip: Int, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter, $block: Block_height) {\n pools(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPool\n }\n}\n ${SubgraphPoolFragmentDoc}`;\nexport const AllPoolsDocument = gql`\n query AllPools($skip: Int, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter, $block: Block_height) {\n pool0: pools(\n first: 1000\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPool\n }\n pool1000: pools(\n first: 1000\n skip: 1000\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPool\n }\n pool2000: pools(\n first: 1000\n skip: 2000\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPool\n }\n}\n ${SubgraphPoolFragmentDoc}`;\nexport const PoolDocument = gql`\n query Pool($id: ID!, $block: Block_height) {\n pool(id: $id, block: $block) {\n ...SubgraphPool\n }\n}\n ${SubgraphPoolFragmentDoc}`;\nexport const PoolHistoricalLiquiditiesDocument = gql`\n query PoolHistoricalLiquidities($skip: Int, $first: Int, $orderBy: PoolHistoricalLiquidity_orderBy, $orderDirection: OrderDirection, $where: PoolHistoricalLiquidity_filter, $block: Block_height) {\n poolHistoricalLiquidities(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n id\n poolId {\n id\n }\n poolTotalShares\n poolLiquidity\n poolShareValue\n pricingAsset\n block\n }\n}\n `;\nexport const PoolSnapshotsDocument = gql`\n query PoolSnapshots($skip: Int, $first: Int, $orderBy: PoolSnapshot_orderBy, $orderDirection: OrderDirection, $where: PoolSnapshot_filter, $block: Block_height) {\n poolSnapshots(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPoolSnapshot\n }\n}\n ${SubgraphPoolSnapshotFragmentDoc}`;\nexport const JoinExitsDocument = gql`\n query JoinExits($skip: Int, $first: Int, $orderBy: JoinExit_orderBy, $orderDirection: OrderDirection, $where: JoinExit_filter, $block: Block_height) {\n joinExits(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphJoinExit\n }\n}\n ${SubgraphJoinExitFragmentDoc}`;\nexport const BalancersDocument = gql`\n query Balancers($skip: Int, $first: Int, $orderBy: Balancer_orderBy, $orderDirection: OrderDirection, $where: Balancer_filter, $block: Block_height) {\n balancers(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphBalancer\n }\n}\n ${SubgraphBalancerFragmentDoc}`;\nexport const TokenPricesDocument = gql`\n query TokenPrices($skip: Int, $first: Int, $orderBy: TokenPrice_orderBy, $orderDirection: OrderDirection, $where: TokenPrice_filter, $block: Block_height) {\n tokenPrices(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphTokenPrice\n }\n}\n ${SubgraphTokenPriceFragmentDoc}`;\nexport const TokenLatestPricesDocument = gql`\n query TokenLatestPrices($skip: Int, $first: Int, $orderBy: LatestPrice_orderBy, $orderDirection: OrderDirection, $where: LatestPrice_filter, $block: Block_height) {\n latestPrices(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphTokenLatestPrice\n }\n}\n ${SubgraphTokenLatestPriceFragmentDoc}`;\nexport const TokenLatestPriceDocument = gql`\n query TokenLatestPrice($id: ID!) {\n latestPrice(id: $id) {\n ...SubgraphTokenLatestPrice\n }\n}\n ${SubgraphTokenLatestPriceFragmentDoc}`;\nexport const UserDocument = gql`\n query User($id: ID!, $block: Block_height) {\n user(id: $id, block: $block) {\n ...SubgraphUser\n }\n}\n ${SubgraphUserFragmentDoc}`;\nexport const UsersDocument = gql`\n query Users($skip: Int, $first: Int, $orderBy: User_orderBy, $orderDirection: OrderDirection, $where: User_filter, $block: Block_height) {\n users(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphUser\n }\n}\n ${SubgraphUserFragmentDoc}`;\n\nexport type SdkFunctionWrapper = (action: (requestHeaders?:Record) => Promise, operationName: string, operationType?: string) => Promise;\n\n\nconst defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action();\n\nexport function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) {\n return {\n PoolShare(variables: PoolShareQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolShareDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolShare', 'query');\n },\n PoolShares(variables?: PoolSharesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolSharesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolShares', 'query');\n },\n Pools(variables?: PoolsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Pools', 'query');\n },\n AllPools(variables?: AllPoolsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(AllPoolsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'AllPools', 'query');\n },\n Pool(variables: PoolQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Pool', 'query');\n },\n PoolHistoricalLiquidities(variables?: PoolHistoricalLiquiditiesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolHistoricalLiquiditiesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolHistoricalLiquidities', 'query');\n },\n PoolSnapshots(variables?: PoolSnapshotsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolSnapshotsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolSnapshots', 'query');\n },\n JoinExits(variables?: JoinExitsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(JoinExitsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'JoinExits', 'query');\n },\n Balancers(variables?: BalancersQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(BalancersDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Balancers', 'query');\n },\n TokenPrices(variables?: TokenPricesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(TokenPricesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'TokenPrices', 'query');\n },\n TokenLatestPrices(variables?: TokenLatestPricesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(TokenLatestPricesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'TokenLatestPrices', 'query');\n },\n TokenLatestPrice(variables: TokenLatestPriceQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(TokenLatestPriceDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'TokenLatestPrice', 'query');\n },\n User(variables: UserQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(UserDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'User', 'query');\n },\n Users(variables?: UsersQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(UsersDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Users', 'query');\n }\n };\n}\nexport type Sdk = ReturnType;","import { GraphQLClient } from 'graphql-request';\nimport * as Dom from 'graphql-request/dist/types.dom';\nimport gql from 'graphql-tag';\nexport type Maybe = T | null;\nexport type InputMaybe = Maybe;\nexport type Exact = { [K in keyof T]: T[K] };\nexport type MakeOptional = Omit & { [SubKey in K]?: Maybe };\nexport type MakeMaybe = Omit & { [SubKey in K]: Maybe };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: string;\n String: string;\n Boolean: boolean;\n Int: number;\n Float: number;\n BigDecimal: string;\n BigInt: string;\n Bytes: string;\n Int8: any;\n};\n\nexport type BlockChangedFilter = {\n number_gte: Scalars['Int'];\n};\n\nexport type Block_Height = {\n hash?: InputMaybe;\n number?: InputMaybe;\n number_gte?: InputMaybe;\n};\n\nexport enum Chain {\n Arbitrum = 'Arbitrum',\n Avalanche = 'Avalanche',\n Base = 'Base',\n Gnosis = 'Gnosis',\n Optimism = 'Optimism',\n Polygon = 'Polygon',\n PolygonZkEvm = 'PolygonZkEvm'\n}\n\nexport type Gauge = {\n __typename?: 'Gauge';\n /** Timestamp at which Balancer DAO added the gauge to GaugeController [seconds] */\n addedTimestamp: Scalars['Int'];\n /** Address of the gauge */\n address: Scalars['Bytes'];\n /** Equal to: - */\n id: Scalars['ID'];\n /** Reference to LiquidityGauge */\n liquidityGauge?: Maybe;\n /** Reference to RootGauge */\n rootGauge?: Maybe;\n /** Type of the gauge */\n type: GaugeType;\n};\n\nexport type GaugeFactory = {\n __typename?: 'GaugeFactory';\n /** List of gauges created through the factory */\n gauges?: Maybe>;\n /** Factory contract address */\n id: Scalars['ID'];\n /** Number of gauges created through the factory */\n numGauges: Scalars['Int'];\n};\n\n\nexport type GaugeFactoryGaugesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type GaugeFactory_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n gauges_?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n numGauges?: InputMaybe;\n numGauges_gt?: InputMaybe;\n numGauges_gte?: InputMaybe;\n numGauges_in?: InputMaybe>;\n numGauges_lt?: InputMaybe;\n numGauges_lte?: InputMaybe;\n numGauges_not?: InputMaybe;\n numGauges_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n};\n\nexport enum GaugeFactory_OrderBy {\n gauges = 'gauges',\n id = 'id',\n numGauges = 'numGauges'\n}\n\nexport type GaugeShare = {\n __typename?: 'GaugeShare';\n /** User's balance of gauge deposit tokens */\n balance: Scalars['BigDecimal'];\n /** Reference to LiquidityGauge entity */\n gauge: LiquidityGauge;\n /** Equal to: - */\n id: Scalars['ID'];\n /** Reference to User entity */\n user: User;\n};\n\nexport type GaugeShare_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n balance?: InputMaybe;\n balance_gt?: InputMaybe;\n balance_gte?: InputMaybe;\n balance_in?: InputMaybe>;\n balance_lt?: InputMaybe;\n balance_lte?: InputMaybe;\n balance_not?: InputMaybe;\n balance_not_in?: InputMaybe>;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n};\n\nexport enum GaugeShare_OrderBy {\n balance = 'balance',\n gauge = 'gauge',\n gauge__id = 'gauge__id',\n gauge__isKilled = 'gauge__isKilled',\n gauge__isPreferentialGauge = 'gauge__isPreferentialGauge',\n gauge__poolAddress = 'gauge__poolAddress',\n gauge__poolId = 'gauge__poolId',\n gauge__relativeWeightCap = 'gauge__relativeWeightCap',\n gauge__streamer = 'gauge__streamer',\n gauge__symbol = 'gauge__symbol',\n gauge__totalSupply = 'gauge__totalSupply',\n id = 'id',\n user = 'user',\n user__id = 'user__id'\n}\n\nexport type GaugeType = {\n __typename?: 'GaugeType';\n /** Type ID */\n id: Scalars['ID'];\n /** Name of the type - empty string if call reverts */\n name: Scalars['String'];\n};\n\nexport type GaugeType_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n};\n\nexport enum GaugeType_OrderBy {\n id = 'id',\n name = 'name'\n}\n\nexport type GaugeVote = {\n __typename?: 'GaugeVote';\n /** Reference to Gauge entity */\n gauge: Gauge;\n /** Equal to: - */\n id: Scalars['ID'];\n /** Timestamp at which user voted [seconds] */\n timestamp?: Maybe;\n /** Reference to User entity */\n user: User;\n /** Weight of veBAL power user has used to vote */\n weight?: Maybe;\n};\n\nexport type GaugeVote_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n weight?: InputMaybe;\n weight_gt?: InputMaybe;\n weight_gte?: InputMaybe;\n weight_in?: InputMaybe>;\n weight_lt?: InputMaybe;\n weight_lte?: InputMaybe;\n weight_not?: InputMaybe;\n weight_not_in?: InputMaybe>;\n};\n\nexport enum GaugeVote_OrderBy {\n gauge = 'gauge',\n gauge__addedTimestamp = 'gauge__addedTimestamp',\n gauge__address = 'gauge__address',\n gauge__id = 'gauge__id',\n id = 'id',\n timestamp = 'timestamp',\n user = 'user',\n user__id = 'user__id',\n weight = 'weight'\n}\n\nexport type Gauge_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n addedTimestamp?: InputMaybe;\n addedTimestamp_gt?: InputMaybe;\n addedTimestamp_gte?: InputMaybe;\n addedTimestamp_in?: InputMaybe>;\n addedTimestamp_lt?: InputMaybe;\n addedTimestamp_lte?: InputMaybe;\n addedTimestamp_not?: InputMaybe;\n addedTimestamp_not_in?: InputMaybe>;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n liquidityGauge?: InputMaybe;\n liquidityGauge_?: InputMaybe;\n liquidityGauge_contains?: InputMaybe;\n liquidityGauge_contains_nocase?: InputMaybe;\n liquidityGauge_ends_with?: InputMaybe;\n liquidityGauge_ends_with_nocase?: InputMaybe;\n liquidityGauge_gt?: InputMaybe;\n liquidityGauge_gte?: InputMaybe;\n liquidityGauge_in?: InputMaybe>;\n liquidityGauge_lt?: InputMaybe;\n liquidityGauge_lte?: InputMaybe;\n liquidityGauge_not?: InputMaybe;\n liquidityGauge_not_contains?: InputMaybe;\n liquidityGauge_not_contains_nocase?: InputMaybe;\n liquidityGauge_not_ends_with?: InputMaybe;\n liquidityGauge_not_ends_with_nocase?: InputMaybe;\n liquidityGauge_not_in?: InputMaybe>;\n liquidityGauge_not_starts_with?: InputMaybe;\n liquidityGauge_not_starts_with_nocase?: InputMaybe;\n liquidityGauge_starts_with?: InputMaybe;\n liquidityGauge_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n rootGauge?: InputMaybe;\n rootGauge_?: InputMaybe;\n rootGauge_contains?: InputMaybe;\n rootGauge_contains_nocase?: InputMaybe;\n rootGauge_ends_with?: InputMaybe;\n rootGauge_ends_with_nocase?: InputMaybe;\n rootGauge_gt?: InputMaybe;\n rootGauge_gte?: InputMaybe;\n rootGauge_in?: InputMaybe>;\n rootGauge_lt?: InputMaybe;\n rootGauge_lte?: InputMaybe;\n rootGauge_not?: InputMaybe;\n rootGauge_not_contains?: InputMaybe;\n rootGauge_not_contains_nocase?: InputMaybe;\n rootGauge_not_ends_with?: InputMaybe;\n rootGauge_not_ends_with_nocase?: InputMaybe;\n rootGauge_not_in?: InputMaybe>;\n rootGauge_not_starts_with?: InputMaybe;\n rootGauge_not_starts_with_nocase?: InputMaybe;\n rootGauge_starts_with?: InputMaybe;\n rootGauge_starts_with_nocase?: InputMaybe;\n type?: InputMaybe;\n type_?: InputMaybe;\n type_contains?: InputMaybe;\n type_contains_nocase?: InputMaybe;\n type_ends_with?: InputMaybe;\n type_ends_with_nocase?: InputMaybe;\n type_gt?: InputMaybe;\n type_gte?: InputMaybe;\n type_in?: InputMaybe>;\n type_lt?: InputMaybe;\n type_lte?: InputMaybe;\n type_not?: InputMaybe;\n type_not_contains?: InputMaybe;\n type_not_contains_nocase?: InputMaybe;\n type_not_ends_with?: InputMaybe;\n type_not_ends_with_nocase?: InputMaybe;\n type_not_in?: InputMaybe>;\n type_not_starts_with?: InputMaybe;\n type_not_starts_with_nocase?: InputMaybe;\n type_starts_with?: InputMaybe;\n type_starts_with_nocase?: InputMaybe;\n};\n\nexport enum Gauge_OrderBy {\n addedTimestamp = 'addedTimestamp',\n address = 'address',\n id = 'id',\n liquidityGauge = 'liquidityGauge',\n liquidityGauge__id = 'liquidityGauge__id',\n liquidityGauge__isKilled = 'liquidityGauge__isKilled',\n liquidityGauge__isPreferentialGauge = 'liquidityGauge__isPreferentialGauge',\n liquidityGauge__poolAddress = 'liquidityGauge__poolAddress',\n liquidityGauge__poolId = 'liquidityGauge__poolId',\n liquidityGauge__relativeWeightCap = 'liquidityGauge__relativeWeightCap',\n liquidityGauge__streamer = 'liquidityGauge__streamer',\n liquidityGauge__symbol = 'liquidityGauge__symbol',\n liquidityGauge__totalSupply = 'liquidityGauge__totalSupply',\n rootGauge = 'rootGauge',\n rootGauge__chain = 'rootGauge__chain',\n rootGauge__id = 'rootGauge__id',\n rootGauge__isKilled = 'rootGauge__isKilled',\n rootGauge__recipient = 'rootGauge__recipient',\n rootGauge__relativeWeightCap = 'rootGauge__relativeWeightCap',\n type = 'type',\n type__id = 'type__id',\n type__name = 'type__name'\n}\n\nexport type LiquidityGauge = {\n __typename?: 'LiquidityGauge';\n /** Factory contract address */\n factory: GaugeFactory;\n /** Reference to Gauge entity - created when LiquidityGauge is added to GaugeController */\n gauge?: Maybe;\n /** LiquidityGauge contract address */\n id: Scalars['ID'];\n /** Whether Balancer DAO killed the gauge */\n isKilled: Scalars['Boolean'];\n /** Whether the LiquidityGauge is the most recent added to GaugeController */\n isPreferentialGauge: Scalars['Boolean'];\n /** Reference to Pool entity */\n pool?: Maybe;\n /** Address of the pool (lp_token of the gauge) */\n poolAddress: Scalars['Bytes'];\n /** Pool ID if lp_token is a Balancer pool; null otherwise */\n poolId?: Maybe;\n /** Relative weight cap of the gauge (0.01 = 1%) - V2 factories only */\n relativeWeightCap?: Maybe;\n /** List of reward tokens depositted in the gauge - ChildChainLiquidityGauge only */\n rewardTokensList?: Maybe>;\n /** List of user shares */\n shares?: Maybe>;\n /** Address of the contract that streams reward tokens to the gauge - ChildChainLiquidityGauge only */\n streamer?: Maybe;\n /** ERC20 token symbol */\n symbol: Scalars['String'];\n /** List of reward tokens depositted in the gauge */\n tokens?: Maybe>;\n /** Total of BPTs users have staked in the LiquidityGauge */\n totalSupply: Scalars['BigDecimal'];\n};\n\n\nexport type LiquidityGaugeSharesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type LiquidityGaugeTokensArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type LiquidityGauge_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n factory?: InputMaybe;\n factory_?: InputMaybe;\n factory_contains?: InputMaybe;\n factory_contains_nocase?: InputMaybe;\n factory_ends_with?: InputMaybe;\n factory_ends_with_nocase?: InputMaybe;\n factory_gt?: InputMaybe;\n factory_gte?: InputMaybe;\n factory_in?: InputMaybe>;\n factory_lt?: InputMaybe;\n factory_lte?: InputMaybe;\n factory_not?: InputMaybe;\n factory_not_contains?: InputMaybe;\n factory_not_contains_nocase?: InputMaybe;\n factory_not_ends_with?: InputMaybe;\n factory_not_ends_with_nocase?: InputMaybe;\n factory_not_in?: InputMaybe>;\n factory_not_starts_with?: InputMaybe;\n factory_not_starts_with_nocase?: InputMaybe;\n factory_starts_with?: InputMaybe;\n factory_starts_with_nocase?: InputMaybe;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n isKilled?: InputMaybe;\n isKilled_in?: InputMaybe>;\n isKilled_not?: InputMaybe;\n isKilled_not_in?: InputMaybe>;\n isPreferentialGauge?: InputMaybe;\n isPreferentialGauge_in?: InputMaybe>;\n isPreferentialGauge_not?: InputMaybe;\n isPreferentialGauge_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n poolAddress?: InputMaybe;\n poolAddress_contains?: InputMaybe;\n poolAddress_gt?: InputMaybe;\n poolAddress_gte?: InputMaybe;\n poolAddress_in?: InputMaybe>;\n poolAddress_lt?: InputMaybe;\n poolAddress_lte?: InputMaybe;\n poolAddress_not?: InputMaybe;\n poolAddress_not_contains?: InputMaybe;\n poolAddress_not_in?: InputMaybe>;\n poolId?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n relativeWeightCap?: InputMaybe;\n relativeWeightCap_gt?: InputMaybe;\n relativeWeightCap_gte?: InputMaybe;\n relativeWeightCap_in?: InputMaybe>;\n relativeWeightCap_lt?: InputMaybe;\n relativeWeightCap_lte?: InputMaybe;\n relativeWeightCap_not?: InputMaybe;\n relativeWeightCap_not_in?: InputMaybe>;\n rewardTokensList?: InputMaybe>;\n rewardTokensList_contains?: InputMaybe>;\n rewardTokensList_contains_nocase?: InputMaybe>;\n rewardTokensList_not?: InputMaybe>;\n rewardTokensList_not_contains?: InputMaybe>;\n rewardTokensList_not_contains_nocase?: InputMaybe>;\n shares_?: InputMaybe;\n streamer?: InputMaybe;\n streamer_contains?: InputMaybe;\n streamer_gt?: InputMaybe;\n streamer_gte?: InputMaybe;\n streamer_in?: InputMaybe>;\n streamer_lt?: InputMaybe;\n streamer_lte?: InputMaybe;\n streamer_not?: InputMaybe;\n streamer_not_contains?: InputMaybe;\n streamer_not_in?: InputMaybe>;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n tokens_?: InputMaybe;\n totalSupply?: InputMaybe;\n totalSupply_gt?: InputMaybe;\n totalSupply_gte?: InputMaybe;\n totalSupply_in?: InputMaybe>;\n totalSupply_lt?: InputMaybe;\n totalSupply_lte?: InputMaybe;\n totalSupply_not?: InputMaybe;\n totalSupply_not_in?: InputMaybe>;\n};\n\nexport enum LiquidityGauge_OrderBy {\n factory = 'factory',\n factory__id = 'factory__id',\n factory__numGauges = 'factory__numGauges',\n gauge = 'gauge',\n gauge__addedTimestamp = 'gauge__addedTimestamp',\n gauge__address = 'gauge__address',\n gauge__id = 'gauge__id',\n id = 'id',\n isKilled = 'isKilled',\n isPreferentialGauge = 'isPreferentialGauge',\n pool = 'pool',\n poolAddress = 'poolAddress',\n poolId = 'poolId',\n pool__address = 'pool__address',\n pool__id = 'pool__id',\n pool__poolId = 'pool__poolId',\n relativeWeightCap = 'relativeWeightCap',\n rewardTokensList = 'rewardTokensList',\n shares = 'shares',\n streamer = 'streamer',\n symbol = 'symbol',\n tokens = 'tokens',\n totalSupply = 'totalSupply'\n}\n\nexport type LockSnapshot = {\n __typename?: 'LockSnapshot';\n /** veBAL balance at the moment user locks */\n bias: Scalars['BigDecimal'];\n /** Equal to - */\n id: Scalars['ID'];\n /** veBAL decay rate (per second) */\n slope: Scalars['BigDecimal'];\n /** Timestamp at which the snapshot was taken [seconds] */\n timestamp: Scalars['Int'];\n /** Reference to User entity */\n user: User;\n};\n\nexport type LockSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n bias?: InputMaybe;\n bias_gt?: InputMaybe;\n bias_gte?: InputMaybe;\n bias_in?: InputMaybe>;\n bias_lt?: InputMaybe;\n bias_lte?: InputMaybe;\n bias_not?: InputMaybe;\n bias_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n slope?: InputMaybe;\n slope_gt?: InputMaybe;\n slope_gte?: InputMaybe;\n slope_in?: InputMaybe>;\n slope_lt?: InputMaybe;\n slope_lte?: InputMaybe;\n slope_not?: InputMaybe;\n slope_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n};\n\nexport enum LockSnapshot_OrderBy {\n bias = 'bias',\n id = 'id',\n slope = 'slope',\n timestamp = 'timestamp',\n user = 'user',\n user__id = 'user__id'\n}\n\nexport type OmniVotingEscrowLock = {\n __typename?: 'OmniVotingEscrowLock';\n /** veBAL balance at the moment user locks */\n bias: Scalars['BigDecimal'];\n /** Chain where the lock was bridged to */\n dstChainId: Scalars['Int'];\n /** Equal to: - */\n id: Scalars['ID'];\n /** User on the local chain (reference to User entity) */\n localUser: User;\n /** User address on the remote chain */\n remoteUser: Scalars['Bytes'];\n /** veBAL decay rate (per second) */\n slope: Scalars['BigDecimal'];\n /** Timestamp the lock was created [seconds] */\n timestamp: Scalars['Int'];\n /** Reference to VotingEscrow entity */\n votingEscrowID: VotingEscrow;\n};\n\nexport type OmniVotingEscrowLock_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n bias?: InputMaybe;\n bias_gt?: InputMaybe;\n bias_gte?: InputMaybe;\n bias_in?: InputMaybe>;\n bias_lt?: InputMaybe;\n bias_lte?: InputMaybe;\n bias_not?: InputMaybe;\n bias_not_in?: InputMaybe>;\n dstChainId?: InputMaybe;\n dstChainId_gt?: InputMaybe;\n dstChainId_gte?: InputMaybe;\n dstChainId_in?: InputMaybe>;\n dstChainId_lt?: InputMaybe;\n dstChainId_lte?: InputMaybe;\n dstChainId_not?: InputMaybe;\n dstChainId_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n localUser?: InputMaybe;\n localUser_?: InputMaybe;\n localUser_contains?: InputMaybe;\n localUser_contains_nocase?: InputMaybe;\n localUser_ends_with?: InputMaybe;\n localUser_ends_with_nocase?: InputMaybe;\n localUser_gt?: InputMaybe;\n localUser_gte?: InputMaybe;\n localUser_in?: InputMaybe>;\n localUser_lt?: InputMaybe;\n localUser_lte?: InputMaybe;\n localUser_not?: InputMaybe;\n localUser_not_contains?: InputMaybe;\n localUser_not_contains_nocase?: InputMaybe;\n localUser_not_ends_with?: InputMaybe;\n localUser_not_ends_with_nocase?: InputMaybe;\n localUser_not_in?: InputMaybe>;\n localUser_not_starts_with?: InputMaybe;\n localUser_not_starts_with_nocase?: InputMaybe;\n localUser_starts_with?: InputMaybe;\n localUser_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n remoteUser?: InputMaybe;\n remoteUser_contains?: InputMaybe;\n remoteUser_gt?: InputMaybe;\n remoteUser_gte?: InputMaybe;\n remoteUser_in?: InputMaybe>;\n remoteUser_lt?: InputMaybe;\n remoteUser_lte?: InputMaybe;\n remoteUser_not?: InputMaybe;\n remoteUser_not_contains?: InputMaybe;\n remoteUser_not_in?: InputMaybe>;\n slope?: InputMaybe;\n slope_gt?: InputMaybe;\n slope_gte?: InputMaybe;\n slope_in?: InputMaybe>;\n slope_lt?: InputMaybe;\n slope_lte?: InputMaybe;\n slope_not?: InputMaybe;\n slope_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n votingEscrowID?: InputMaybe;\n votingEscrowID_?: InputMaybe;\n votingEscrowID_contains?: InputMaybe;\n votingEscrowID_contains_nocase?: InputMaybe;\n votingEscrowID_ends_with?: InputMaybe;\n votingEscrowID_ends_with_nocase?: InputMaybe;\n votingEscrowID_gt?: InputMaybe;\n votingEscrowID_gte?: InputMaybe;\n votingEscrowID_in?: InputMaybe>;\n votingEscrowID_lt?: InputMaybe;\n votingEscrowID_lte?: InputMaybe;\n votingEscrowID_not?: InputMaybe;\n votingEscrowID_not_contains?: InputMaybe;\n votingEscrowID_not_contains_nocase?: InputMaybe;\n votingEscrowID_not_ends_with?: InputMaybe;\n votingEscrowID_not_ends_with_nocase?: InputMaybe;\n votingEscrowID_not_in?: InputMaybe>;\n votingEscrowID_not_starts_with?: InputMaybe;\n votingEscrowID_not_starts_with_nocase?: InputMaybe;\n votingEscrowID_starts_with?: InputMaybe;\n votingEscrowID_starts_with_nocase?: InputMaybe;\n};\n\nexport enum OmniVotingEscrowLock_OrderBy {\n bias = 'bias',\n dstChainId = 'dstChainId',\n id = 'id',\n localUser = 'localUser',\n localUser__id = 'localUser__id',\n remoteUser = 'remoteUser',\n slope = 'slope',\n timestamp = 'timestamp',\n votingEscrowID = 'votingEscrowID',\n votingEscrowID__id = 'votingEscrowID__id',\n votingEscrowID__stakedSupply = 'votingEscrowID__stakedSupply'\n}\n\n/** Defines the order direction, either ascending or descending */\nexport enum OrderDirection {\n asc = 'asc',\n desc = 'desc'\n}\n\nexport type Pool = {\n __typename?: 'Pool';\n /** Address of the pool (lp_token of the gauge) */\n address: Scalars['Bytes'];\n /** List of gauges created for the pool */\n gauges?: Maybe>;\n /** List of the pool's gauges addresses */\n gaugesList: Array;\n /** Address of the pool (lp_token of the gauge) */\n id: Scalars['ID'];\n /** Pool ID if lp_token is a Balancer pool; null otherwise */\n poolId?: Maybe;\n /** Most recent, unkilled gauge in the GaugeController */\n preferentialGauge?: Maybe;\n};\n\n\nexport type PoolGaugesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type Pool_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n gaugesList?: InputMaybe>;\n gaugesList_contains?: InputMaybe>;\n gaugesList_contains_nocase?: InputMaybe>;\n gaugesList_not?: InputMaybe>;\n gaugesList_not_contains?: InputMaybe>;\n gaugesList_not_contains_nocase?: InputMaybe>;\n gauges_?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n preferentialGauge?: InputMaybe;\n preferentialGauge_?: InputMaybe;\n preferentialGauge_contains?: InputMaybe;\n preferentialGauge_contains_nocase?: InputMaybe;\n preferentialGauge_ends_with?: InputMaybe;\n preferentialGauge_ends_with_nocase?: InputMaybe;\n preferentialGauge_gt?: InputMaybe;\n preferentialGauge_gte?: InputMaybe;\n preferentialGauge_in?: InputMaybe>;\n preferentialGauge_lt?: InputMaybe;\n preferentialGauge_lte?: InputMaybe;\n preferentialGauge_not?: InputMaybe;\n preferentialGauge_not_contains?: InputMaybe;\n preferentialGauge_not_contains_nocase?: InputMaybe;\n preferentialGauge_not_ends_with?: InputMaybe;\n preferentialGauge_not_ends_with_nocase?: InputMaybe;\n preferentialGauge_not_in?: InputMaybe>;\n preferentialGauge_not_starts_with?: InputMaybe;\n preferentialGauge_not_starts_with_nocase?: InputMaybe;\n preferentialGauge_starts_with?: InputMaybe;\n preferentialGauge_starts_with_nocase?: InputMaybe;\n};\n\nexport enum Pool_OrderBy {\n address = 'address',\n gauges = 'gauges',\n gaugesList = 'gaugesList',\n id = 'id',\n poolId = 'poolId',\n preferentialGauge = 'preferentialGauge',\n preferentialGauge__id = 'preferentialGauge__id',\n preferentialGauge__isKilled = 'preferentialGauge__isKilled',\n preferentialGauge__isPreferentialGauge = 'preferentialGauge__isPreferentialGauge',\n preferentialGauge__poolAddress = 'preferentialGauge__poolAddress',\n preferentialGauge__poolId = 'preferentialGauge__poolId',\n preferentialGauge__relativeWeightCap = 'preferentialGauge__relativeWeightCap',\n preferentialGauge__streamer = 'preferentialGauge__streamer',\n preferentialGauge__symbol = 'preferentialGauge__symbol',\n preferentialGauge__totalSupply = 'preferentialGauge__totalSupply'\n}\n\nexport type Query = {\n __typename?: 'Query';\n /** Access to subgraph metadata */\n _meta?: Maybe<_Meta_>;\n gauge?: Maybe;\n gaugeFactories: Array;\n gaugeFactory?: Maybe;\n gaugeShare?: Maybe;\n gaugeShares: Array;\n gaugeType?: Maybe;\n gaugeTypes: Array;\n gaugeVote?: Maybe;\n gaugeVotes: Array;\n gauges: Array;\n liquidityGauge?: Maybe;\n liquidityGauges: Array;\n lockSnapshot?: Maybe;\n lockSnapshots: Array;\n omniVotingEscrowLock?: Maybe;\n omniVotingEscrowLocks: Array;\n pool?: Maybe;\n pools: Array;\n rewardToken?: Maybe;\n rewardTokens: Array;\n rootGauge?: Maybe;\n rootGauges: Array;\n singleRecipientGauge?: Maybe;\n singleRecipientGauges: Array;\n user?: Maybe;\n users: Array;\n votingEscrow?: Maybe;\n votingEscrowLock?: Maybe;\n votingEscrowLocks: Array;\n votingEscrows: Array;\n};\n\n\nexport type Query_MetaArgs = {\n block?: InputMaybe;\n};\n\n\nexport type QueryGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeFactoriesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGaugeFactoryArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeShareArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeSharesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGaugeTypeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeTypesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGaugeVoteArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeVotesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryLiquidityGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryLiquidityGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryLockSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryLockSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryOmniVotingEscrowLockArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryOmniVotingEscrowLocksArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryRewardTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryRewardTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryRootGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryRootGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QuerySingleRecipientGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QuerySingleRecipientGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryUserArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryUsersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryVotingEscrowArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryVotingEscrowLockArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryVotingEscrowLocksArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryVotingEscrowsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\nexport type RewardToken = {\n __typename?: 'RewardToken';\n /** ERC20 token decimals - zero if call to decimals() reverts */\n decimals: Scalars['Int'];\n /** Reference to LiquidityGauge entity */\n gauge: LiquidityGauge;\n /** Equal to: - */\n id: Scalars['ID'];\n /** Timestamp at which finishes the period of rewards */\n periodFinish?: Maybe;\n /** Rate of reward tokens streamed per second */\n rate?: Maybe;\n /** ERC20 token symbol - empty string if call to symbol() reverts */\n symbol: Scalars['String'];\n /** Amount of reward tokens that has been deposited into the gauge */\n totalDeposited: Scalars['BigDecimal'];\n};\n\nexport type RewardToken_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n decimals?: InputMaybe;\n decimals_gt?: InputMaybe;\n decimals_gte?: InputMaybe;\n decimals_in?: InputMaybe>;\n decimals_lt?: InputMaybe;\n decimals_lte?: InputMaybe;\n decimals_not?: InputMaybe;\n decimals_not_in?: InputMaybe>;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n periodFinish?: InputMaybe;\n periodFinish_gt?: InputMaybe;\n periodFinish_gte?: InputMaybe;\n periodFinish_in?: InputMaybe>;\n periodFinish_lt?: InputMaybe;\n periodFinish_lte?: InputMaybe;\n periodFinish_not?: InputMaybe;\n periodFinish_not_in?: InputMaybe>;\n rate?: InputMaybe;\n rate_gt?: InputMaybe;\n rate_gte?: InputMaybe;\n rate_in?: InputMaybe>;\n rate_lt?: InputMaybe;\n rate_lte?: InputMaybe;\n rate_not?: InputMaybe;\n rate_not_in?: InputMaybe>;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n totalDeposited?: InputMaybe;\n totalDeposited_gt?: InputMaybe;\n totalDeposited_gte?: InputMaybe;\n totalDeposited_in?: InputMaybe>;\n totalDeposited_lt?: InputMaybe;\n totalDeposited_lte?: InputMaybe;\n totalDeposited_not?: InputMaybe;\n totalDeposited_not_in?: InputMaybe>;\n};\n\nexport enum RewardToken_OrderBy {\n decimals = 'decimals',\n gauge = 'gauge',\n gauge__id = 'gauge__id',\n gauge__isKilled = 'gauge__isKilled',\n gauge__isPreferentialGauge = 'gauge__isPreferentialGauge',\n gauge__poolAddress = 'gauge__poolAddress',\n gauge__poolId = 'gauge__poolId',\n gauge__relativeWeightCap = 'gauge__relativeWeightCap',\n gauge__streamer = 'gauge__streamer',\n gauge__symbol = 'gauge__symbol',\n gauge__totalSupply = 'gauge__totalSupply',\n id = 'id',\n periodFinish = 'periodFinish',\n rate = 'rate',\n symbol = 'symbol',\n totalDeposited = 'totalDeposited'\n}\n\nexport type RootGauge = {\n __typename?: 'RootGauge';\n /** Chain where emissions by this gauge will be bridged to */\n chain: Chain;\n /** Factory contract address */\n factory: GaugeFactory;\n /** Reference to Gauge entity - created when LiquidityGauge is added to GaugeController */\n gauge?: Maybe;\n /** RootGauge contract address */\n id: Scalars['ID'];\n /** Whether Balancer DAO killed the gauge */\n isKilled: Scalars['Boolean'];\n /** Address where emissions by this gauge will be bridged to */\n recipient: Scalars['Bytes'];\n /** Relative weight cap of the gauge (0.01 = 1%) - V2 factories only */\n relativeWeightCap?: Maybe;\n};\n\nexport type RootGauge_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n chain?: InputMaybe;\n chain_in?: InputMaybe>;\n chain_not?: InputMaybe;\n chain_not_in?: InputMaybe>;\n factory?: InputMaybe;\n factory_?: InputMaybe;\n factory_contains?: InputMaybe;\n factory_contains_nocase?: InputMaybe;\n factory_ends_with?: InputMaybe;\n factory_ends_with_nocase?: InputMaybe;\n factory_gt?: InputMaybe;\n factory_gte?: InputMaybe;\n factory_in?: InputMaybe>;\n factory_lt?: InputMaybe;\n factory_lte?: InputMaybe;\n factory_not?: InputMaybe;\n factory_not_contains?: InputMaybe;\n factory_not_contains_nocase?: InputMaybe;\n factory_not_ends_with?: InputMaybe;\n factory_not_ends_with_nocase?: InputMaybe;\n factory_not_in?: InputMaybe>;\n factory_not_starts_with?: InputMaybe;\n factory_not_starts_with_nocase?: InputMaybe;\n factory_starts_with?: InputMaybe;\n factory_starts_with_nocase?: InputMaybe;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n isKilled?: InputMaybe;\n isKilled_in?: InputMaybe>;\n isKilled_not?: InputMaybe;\n isKilled_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n recipient?: InputMaybe;\n recipient_contains?: InputMaybe;\n recipient_gt?: InputMaybe;\n recipient_gte?: InputMaybe;\n recipient_in?: InputMaybe>;\n recipient_lt?: InputMaybe;\n recipient_lte?: InputMaybe;\n recipient_not?: InputMaybe;\n recipient_not_contains?: InputMaybe;\n recipient_not_in?: InputMaybe>;\n relativeWeightCap?: InputMaybe;\n relativeWeightCap_gt?: InputMaybe;\n relativeWeightCap_gte?: InputMaybe;\n relativeWeightCap_in?: InputMaybe>;\n relativeWeightCap_lt?: InputMaybe;\n relativeWeightCap_lte?: InputMaybe;\n relativeWeightCap_not?: InputMaybe;\n relativeWeightCap_not_in?: InputMaybe>;\n};\n\nexport enum RootGauge_OrderBy {\n chain = 'chain',\n factory = 'factory',\n factory__id = 'factory__id',\n factory__numGauges = 'factory__numGauges',\n gauge = 'gauge',\n gauge__addedTimestamp = 'gauge__addedTimestamp',\n gauge__address = 'gauge__address',\n gauge__id = 'gauge__id',\n id = 'id',\n isKilled = 'isKilled',\n recipient = 'recipient',\n relativeWeightCap = 'relativeWeightCap'\n}\n\nexport type SingleRecipientGauge = {\n __typename?: 'SingleRecipientGauge';\n /** Factory contract address */\n factory: GaugeFactory;\n /** Reference to Gauge entity - created when SingleRecipientGauge is added to GaugeController */\n gauge?: Maybe;\n /** SingleRecipientGauge contract address */\n id: Scalars['ID'];\n /** Whether Balancer DAO killed the gauge */\n isKilled: Scalars['Boolean'];\n /** Address where emissions for this gauge will be sent to */\n recipient: Scalars['Bytes'];\n /** Relative weight cap of the gauge (0.01 = 1%) - V2 factories only */\n relativeWeightCap?: Maybe;\n};\n\nexport type SingleRecipientGauge_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n factory?: InputMaybe;\n factory_?: InputMaybe;\n factory_contains?: InputMaybe;\n factory_contains_nocase?: InputMaybe;\n factory_ends_with?: InputMaybe;\n factory_ends_with_nocase?: InputMaybe;\n factory_gt?: InputMaybe;\n factory_gte?: InputMaybe;\n factory_in?: InputMaybe>;\n factory_lt?: InputMaybe;\n factory_lte?: InputMaybe;\n factory_not?: InputMaybe;\n factory_not_contains?: InputMaybe;\n factory_not_contains_nocase?: InputMaybe;\n factory_not_ends_with?: InputMaybe;\n factory_not_ends_with_nocase?: InputMaybe;\n factory_not_in?: InputMaybe>;\n factory_not_starts_with?: InputMaybe;\n factory_not_starts_with_nocase?: InputMaybe;\n factory_starts_with?: InputMaybe;\n factory_starts_with_nocase?: InputMaybe;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n isKilled?: InputMaybe;\n isKilled_in?: InputMaybe>;\n isKilled_not?: InputMaybe;\n isKilled_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n recipient?: InputMaybe;\n recipient_contains?: InputMaybe;\n recipient_gt?: InputMaybe;\n recipient_gte?: InputMaybe;\n recipient_in?: InputMaybe>;\n recipient_lt?: InputMaybe;\n recipient_lte?: InputMaybe;\n recipient_not?: InputMaybe;\n recipient_not_contains?: InputMaybe;\n recipient_not_in?: InputMaybe>;\n relativeWeightCap?: InputMaybe;\n relativeWeightCap_gt?: InputMaybe;\n relativeWeightCap_gte?: InputMaybe;\n relativeWeightCap_in?: InputMaybe>;\n relativeWeightCap_lt?: InputMaybe;\n relativeWeightCap_lte?: InputMaybe;\n relativeWeightCap_not?: InputMaybe;\n relativeWeightCap_not_in?: InputMaybe>;\n};\n\nexport enum SingleRecipientGauge_OrderBy {\n factory = 'factory',\n factory__id = 'factory__id',\n factory__numGauges = 'factory__numGauges',\n gauge = 'gauge',\n gauge__addedTimestamp = 'gauge__addedTimestamp',\n gauge__address = 'gauge__address',\n gauge__id = 'gauge__id',\n id = 'id',\n isKilled = 'isKilled',\n recipient = 'recipient',\n relativeWeightCap = 'relativeWeightCap'\n}\n\nexport type Subscription = {\n __typename?: 'Subscription';\n /** Access to subgraph metadata */\n _meta?: Maybe<_Meta_>;\n gauge?: Maybe;\n gaugeFactories: Array;\n gaugeFactory?: Maybe;\n gaugeShare?: Maybe;\n gaugeShares: Array;\n gaugeType?: Maybe;\n gaugeTypes: Array;\n gaugeVote?: Maybe;\n gaugeVotes: Array;\n gauges: Array;\n liquidityGauge?: Maybe;\n liquidityGauges: Array;\n lockSnapshot?: Maybe;\n lockSnapshots: Array;\n omniVotingEscrowLock?: Maybe;\n omniVotingEscrowLocks: Array;\n pool?: Maybe;\n pools: Array;\n rewardToken?: Maybe;\n rewardTokens: Array;\n rootGauge?: Maybe;\n rootGauges: Array;\n singleRecipientGauge?: Maybe;\n singleRecipientGauges: Array;\n user?: Maybe;\n users: Array;\n votingEscrow?: Maybe;\n votingEscrowLock?: Maybe;\n votingEscrowLocks: Array;\n votingEscrows: Array;\n};\n\n\nexport type Subscription_MetaArgs = {\n block?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeFactoriesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugeFactoryArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeShareArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeSharesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugeTypeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeTypesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugeVoteArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeVotesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionLiquidityGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionLiquidityGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionLockSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionLockSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionOmniVotingEscrowLockArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionOmniVotingEscrowLocksArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionRewardTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionRewardTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionRootGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionRootGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionSingleRecipientGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionSingleRecipientGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionUserArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionUsersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionVotingEscrowArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionVotingEscrowLockArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionVotingEscrowLocksArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionVotingEscrowsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\nexport type User = {\n __typename?: 'User';\n /** List of gauge the user has shares */\n gaugeShares?: Maybe>;\n /** List of votes on gauges */\n gaugeVotes?: Maybe>;\n /** User address */\n id: Scalars['ID'];\n /** List of omni locks the user created */\n omniVotingLocks?: Maybe>;\n /** List of locks the user created */\n votingLocks?: Maybe>;\n};\n\n\nexport type UserGaugeSharesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserGaugeVotesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserOmniVotingLocksArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserVotingLocksArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type User_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n gaugeShares_?: InputMaybe;\n gaugeVotes_?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n omniVotingLocks_?: InputMaybe;\n or?: InputMaybe>>;\n votingLocks_?: InputMaybe;\n};\n\nexport enum User_OrderBy {\n gaugeShares = 'gaugeShares',\n gaugeVotes = 'gaugeVotes',\n id = 'id',\n omniVotingLocks = 'omniVotingLocks',\n votingLocks = 'votingLocks'\n}\n\nexport type VotingEscrow = {\n __typename?: 'VotingEscrow';\n /** VotingEscrow contract address */\n id: Scalars['ID'];\n /** List of veBAL locks created */\n locks?: Maybe>;\n /** List of veBAL locks created */\n omniLocks?: Maybe>;\n /** Amount of B-80BAL-20WETH BPT locked, only applies on mainnet */\n stakedSupply?: Maybe;\n};\n\n\nexport type VotingEscrowLocksArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type VotingEscrowOmniLocksArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type VotingEscrowLock = {\n __typename?: 'VotingEscrowLock';\n /** veBAL balance at the moment user locks */\n bias: Scalars['BigDecimal'];\n /** Equal to: - */\n id: Scalars['ID'];\n /** Amount of B-80BAL-20WETH BPT the user has locked */\n lockedBalance: Scalars['BigDecimal'];\n /** veBAL decay rate (per second) */\n slope: Scalars['BigDecimal'];\n /** Timestamp at which the lock was created [seconds] */\n timestamp: Scalars['Int'];\n /** Timestamp at which B-80BAL-20WETH BPT can be unlocked by user [seconds] */\n unlockTime: Scalars['BigInt'];\n /** Timestamp at which the lcok was created [seconds]. Same as timestamp */\n updatedAt: Scalars['Int'];\n /** Reference to User entity */\n user: User;\n /** Reference to VotingEscrow entity */\n votingEscrowID: VotingEscrow;\n};\n\nexport type VotingEscrowLock_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n bias?: InputMaybe;\n bias_gt?: InputMaybe;\n bias_gte?: InputMaybe;\n bias_in?: InputMaybe>;\n bias_lt?: InputMaybe;\n bias_lte?: InputMaybe;\n bias_not?: InputMaybe;\n bias_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n lockedBalance?: InputMaybe;\n lockedBalance_gt?: InputMaybe;\n lockedBalance_gte?: InputMaybe;\n lockedBalance_in?: InputMaybe>;\n lockedBalance_lt?: InputMaybe;\n lockedBalance_lte?: InputMaybe;\n lockedBalance_not?: InputMaybe;\n lockedBalance_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n slope?: InputMaybe;\n slope_gt?: InputMaybe;\n slope_gte?: InputMaybe;\n slope_in?: InputMaybe>;\n slope_lt?: InputMaybe;\n slope_lte?: InputMaybe;\n slope_not?: InputMaybe;\n slope_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n unlockTime?: InputMaybe;\n unlockTime_gt?: InputMaybe;\n unlockTime_gte?: InputMaybe;\n unlockTime_in?: InputMaybe>;\n unlockTime_lt?: InputMaybe;\n unlockTime_lte?: InputMaybe;\n unlockTime_not?: InputMaybe;\n unlockTime_not_in?: InputMaybe>;\n updatedAt?: InputMaybe;\n updatedAt_gt?: InputMaybe;\n updatedAt_gte?: InputMaybe;\n updatedAt_in?: InputMaybe>;\n updatedAt_lt?: InputMaybe;\n updatedAt_lte?: InputMaybe;\n updatedAt_not?: InputMaybe;\n updatedAt_not_in?: InputMaybe>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n votingEscrowID?: InputMaybe;\n votingEscrowID_?: InputMaybe;\n votingEscrowID_contains?: InputMaybe;\n votingEscrowID_contains_nocase?: InputMaybe;\n votingEscrowID_ends_with?: InputMaybe;\n votingEscrowID_ends_with_nocase?: InputMaybe;\n votingEscrowID_gt?: InputMaybe;\n votingEscrowID_gte?: InputMaybe;\n votingEscrowID_in?: InputMaybe>;\n votingEscrowID_lt?: InputMaybe;\n votingEscrowID_lte?: InputMaybe;\n votingEscrowID_not?: InputMaybe;\n votingEscrowID_not_contains?: InputMaybe;\n votingEscrowID_not_contains_nocase?: InputMaybe;\n votingEscrowID_not_ends_with?: InputMaybe;\n votingEscrowID_not_ends_with_nocase?: InputMaybe;\n votingEscrowID_not_in?: InputMaybe>;\n votingEscrowID_not_starts_with?: InputMaybe;\n votingEscrowID_not_starts_with_nocase?: InputMaybe;\n votingEscrowID_starts_with?: InputMaybe;\n votingEscrowID_starts_with_nocase?: InputMaybe;\n};\n\nexport enum VotingEscrowLock_OrderBy {\n bias = 'bias',\n id = 'id',\n lockedBalance = 'lockedBalance',\n slope = 'slope',\n timestamp = 'timestamp',\n unlockTime = 'unlockTime',\n updatedAt = 'updatedAt',\n user = 'user',\n user__id = 'user__id',\n votingEscrowID = 'votingEscrowID',\n votingEscrowID__id = 'votingEscrowID__id',\n votingEscrowID__stakedSupply = 'votingEscrowID__stakedSupply'\n}\n\nexport type VotingEscrow_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n locks_?: InputMaybe;\n omniLocks_?: InputMaybe;\n or?: InputMaybe>>;\n stakedSupply?: InputMaybe;\n stakedSupply_gt?: InputMaybe;\n stakedSupply_gte?: InputMaybe;\n stakedSupply_in?: InputMaybe>;\n stakedSupply_lt?: InputMaybe;\n stakedSupply_lte?: InputMaybe;\n stakedSupply_not?: InputMaybe;\n stakedSupply_not_in?: InputMaybe>;\n};\n\nexport enum VotingEscrow_OrderBy {\n id = 'id',\n locks = 'locks',\n omniLocks = 'omniLocks',\n stakedSupply = 'stakedSupply'\n}\n\nexport type _Block_ = {\n __typename?: '_Block_';\n /** The hash of the block */\n hash?: Maybe;\n /** The block number */\n number: Scalars['Int'];\n /** Integer representation of the timestamp stored in blocks for the chain */\n timestamp?: Maybe;\n};\n\n/** The type for the top-level _meta field */\nexport type _Meta_ = {\n __typename?: '_Meta_';\n /**\n * Information about a specific subgraph block. The hash of the block\n * will be null if the _meta field has a block constraint that asks for\n * a block number. It will be filled if the _meta field has no block constraint\n * and therefore asks for the latest block\n *\n */\n block: _Block_;\n /** The deployment ID */\n deployment: Scalars['String'];\n /** If `true`, the subgraph encountered indexing errors at some past block */\n hasIndexingErrors: Scalars['Boolean'];\n};\n\nexport enum _SubgraphErrorPolicy_ {\n /** Data will be returned even if the subgraph has indexing errors */\n allow = 'allow',\n /** If the subgraph has indexing errors, data will be omitted. The default. */\n deny = 'deny'\n}\n\nexport type GaugeShareQueryVariables = Exact<{\n id: Scalars['ID'];\n block?: InputMaybe;\n}>;\n\n\nexport type GaugeShareQuery = { __typename?: 'Query', gaugeShare?: { __typename?: 'GaugeShare', id: string, balance: string, user: { __typename?: 'User', id: string }, gauge: { __typename?: 'LiquidityGauge', id: string, isKilled: boolean, poolId?: string | null, poolAddress: string, totalSupply: string } } | null };\n\nexport type GaugeSharesQueryVariables = Exact<{\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type GaugeSharesQuery = { __typename?: 'Query', gaugeShares: Array<{ __typename?: 'GaugeShare', id: string, balance: string, user: { __typename?: 'User', id: string }, gauge: { __typename?: 'LiquidityGauge', id: string, isKilled: boolean, poolId?: string | null, poolAddress: string, totalSupply: string } }> };\n\nexport type SubgraphGaugeShareFragment = { __typename?: 'GaugeShare', id: string, balance: string, user: { __typename?: 'User', id: string }, gauge: { __typename?: 'LiquidityGauge', id: string, isKilled: boolean, poolId?: string | null, poolAddress: string, totalSupply: string } };\n\nexport type LiquidityGaugesQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type LiquidityGaugesQuery = { __typename?: 'Query', liquidityGauges: Array<{ __typename?: 'LiquidityGauge', id: string, symbol: string, poolAddress: string, poolId?: string | null, streamer?: string | null, totalSupply: string, factory: { __typename?: 'GaugeFactory', id: string, numGauges: number }, tokens?: Array<{ __typename?: 'RewardToken', id: string, symbol: string, decimals: number, totalDeposited: string, rate?: string | null, periodFinish?: string | null }> | null }> };\n\nexport type SubgraphLiquidityGaugeFragment = { __typename?: 'LiquidityGauge', id: string, symbol: string, poolAddress: string, poolId?: string | null, streamer?: string | null, totalSupply: string, factory: { __typename?: 'GaugeFactory', id: string, numGauges: number }, tokens?: Array<{ __typename?: 'RewardToken', id: string, symbol: string, decimals: number, totalDeposited: string, rate?: string | null, periodFinish?: string | null }> | null };\n\nexport type PoolsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolsQuery = { __typename?: 'Query', pools: Array<{ __typename?: 'Pool', id: string, poolId?: string | null, preferentialGauge?: { __typename?: 'LiquidityGauge', id: string, symbol: string, poolAddress: string, poolId?: string | null, streamer?: string | null, totalSupply: string, factory: { __typename?: 'GaugeFactory', id: string, numGauges: number }, tokens?: Array<{ __typename?: 'RewardToken', id: string, symbol: string, decimals: number, totalDeposited: string, rate?: string | null, periodFinish?: string | null }> | null } | null }> };\n\nexport type SubgraphPoolWithPreferentialGaugeFragment = { __typename?: 'Pool', id: string, poolId?: string | null, preferentialGauge?: { __typename?: 'LiquidityGauge', id: string, symbol: string, poolAddress: string, poolId?: string | null, streamer?: string | null, totalSupply: string, factory: { __typename?: 'GaugeFactory', id: string, numGauges: number }, tokens?: Array<{ __typename?: 'RewardToken', id: string, symbol: string, decimals: number, totalDeposited: string, rate?: string | null, periodFinish?: string | null }> | null } | null };\n\nexport type PoolGaugesQueryVariables = Exact<{\n where?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolGaugesQuery = { __typename?: 'Query', pools: Array<{ __typename?: 'Pool', gauges?: Array<{ __typename?: 'LiquidityGauge', id: string, relativeWeightCap?: string | null }> | null, preferentialGauge?: { __typename?: 'LiquidityGauge', id: string } | null }> };\n\nexport const SubgraphGaugeShareFragmentDoc = gql`\n fragment SubgraphGaugeShare on GaugeShare {\n id\n balance\n user {\n id\n }\n gauge {\n id\n isKilled\n poolId\n poolAddress\n totalSupply\n }\n}\n `;\nexport const SubgraphLiquidityGaugeFragmentDoc = gql`\n fragment SubgraphLiquidityGauge on LiquidityGauge {\n id\n symbol\n poolAddress\n poolId\n streamer\n factory {\n id\n numGauges\n }\n totalSupply\n tokens {\n id\n symbol\n decimals\n totalDeposited\n rate\n periodFinish\n }\n}\n `;\nexport const SubgraphPoolWithPreferentialGaugeFragmentDoc = gql`\n fragment SubgraphPoolWithPreferentialGauge on Pool {\n id\n poolId\n preferentialGauge {\n ...SubgraphLiquidityGauge\n }\n}\n ${SubgraphLiquidityGaugeFragmentDoc}`;\nexport const GaugeShareDocument = gql`\n query GaugeShare($id: ID!, $block: Block_height) {\n gaugeShare(id: $id, block: $block) {\n ...SubgraphGaugeShare\n }\n}\n ${SubgraphGaugeShareFragmentDoc}`;\nexport const GaugeSharesDocument = gql`\n query GaugeShares($first: Int, $orderBy: GaugeShare_orderBy, $orderDirection: OrderDirection, $skip: Int, $where: GaugeShare_filter, $block: Block_height) {\n gaugeShares(\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n skip: $skip\n where: $where\n block: $block\n ) {\n ...SubgraphGaugeShare\n }\n}\n ${SubgraphGaugeShareFragmentDoc}`;\nexport const LiquidityGaugesDocument = gql`\n query LiquidityGauges($skip: Int, $first: Int, $orderBy: LiquidityGauge_orderBy, $orderDirection: OrderDirection, $where: LiquidityGauge_filter, $block: Block_height) {\n liquidityGauges(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphLiquidityGauge\n }\n}\n ${SubgraphLiquidityGaugeFragmentDoc}`;\nexport const PoolsDocument = gql`\n query Pools($skip: Int, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter, $block: Block_height) {\n pools(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPoolWithPreferentialGauge\n }\n}\n ${SubgraphPoolWithPreferentialGaugeFragmentDoc}`;\nexport const PoolGaugesDocument = gql`\n query PoolGauges($where: Pool_filter, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $skip: Int, $block: Block_height) {\n pools(\n where: $where\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n skip: $skip\n block: $block\n ) {\n gauges {\n id\n relativeWeightCap\n }\n preferentialGauge {\n id\n }\n }\n}\n `;\n\nexport type SdkFunctionWrapper = (action: (requestHeaders?:Record) => Promise, operationName: string, operationType?: string) => Promise;\n\n\nconst defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action();\n\nexport function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) {\n return {\n GaugeShare(variables: GaugeShareQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(GaugeShareDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'GaugeShare', 'query');\n },\n GaugeShares(variables?: GaugeSharesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(GaugeSharesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'GaugeShares', 'query');\n },\n LiquidityGauges(variables?: LiquidityGaugesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(LiquidityGaugesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'LiquidityGauges', 'query');\n },\n Pools(variables?: PoolsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Pools', 'query');\n },\n PoolGauges(variables?: PoolGaugesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolGaugesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolGauges', 'query');\n }\n };\n}\nexport type Sdk = ReturnType;","import { GraphQLClient } from 'graphql-request';\nimport { getSdk, Sdk } from './generated/balancer-subgraph-types';\nimport * as Gauges from './generated/balancer-gauges';\nimport * as V2 from './generated/balancer-subgraph-types';\n\nexport * from './generated/balancer-subgraph-types';\n\nexport type SubgraphClient = Sdk;\nexport type GaugesClient = Gauges.Sdk;\nexport type SubgraphLiquidityGauge = Gauges.LiquidityGauge;\nexport type SubgraphPool = V2.SubgraphPoolFragment;\n\nexport function createSubgraphClient(subgraphUrl: string): SubgraphClient {\n const client = new GraphQLClient(subgraphUrl);\n\n return getSdk(client);\n}\n\nexport function createGaugesClient(url: string): GaugesClient {\n const client = new GraphQLClient(url);\n\n return Gauges.getSdk(client);\n}\n","import { set } from 'lodash';\nimport { Fragment, JsonFragment, Interface, Result } from '@ethersproject/abi';\nimport { CallOverrides } from '@ethersproject/contracts';\nimport { Multicall3, Multicall3__factory } from '@/contracts';\nimport { Provider } from '@ethersproject/providers';\n\nexport class Multicaller3 {\n private interface: Interface;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private calls: [string, string, any][] = [];\n private paths: string[] = [];\n address = '0xcA11bde05977b3631167028862bE2a173976CA11';\n multicall: Multicall3;\n\n constructor(\n abi: string | Array,\n provider: Provider,\n private options: CallOverrides = {}\n ) {\n this.interface = new Interface(abi);\n this.multicall = Multicall3__factory.connect(this.address, provider);\n }\n\n call(\n path: string,\n address: string,\n functionName: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n params?: any[]\n ): Multicaller3 {\n this.calls.push([address, functionName, params]);\n this.paths.push(path);\n return this;\n }\n\n async execute(\n from: Record = {},\n batchSize = 1024 // Define the number of function calls in each batch\n ): Promise> {\n const obj = from;\n const results = await this.executeMulticall(batchSize);\n results.forEach((result, i) =>\n set(obj, this.paths[i], result.length > 1 ? result : result[0])\n );\n this.calls = [];\n this.paths = [];\n return obj;\n }\n\n private async executeMulticall(batchSize: number): Promise {\n const numBatches = Math.ceil(this.calls.length / batchSize);\n const results: Result[] = [];\n\n const batchPromises = [];\n\n for (let batchIndex = 0; batchIndex < numBatches; batchIndex++) {\n const batchCalls = this.calls.slice(\n batchIndex * batchSize,\n (batchIndex + 1) * batchSize\n );\n\n const batchRequests = batchCalls.map(\n ([address, functionName, params]) => ({\n target: address,\n allowFailure: true,\n callData: this.interface.encodeFunctionData(functionName, params),\n })\n );\n\n batchPromises.push(\n this.multicall.callStatic.aggregate3(batchRequests, this.options)\n );\n }\n\n const batchResults = await Promise.all(batchPromises);\n\n batchResults.forEach((res, batchIndex) => {\n const offset = batchIndex * batchSize;\n\n for (let i = 0; i < res.length; i++) {\n const callIndex = offset + i;\n const { success, returnData } = res[i];\n\n if (success) {\n try {\n const result = this.interface.decodeFunctionResult(\n this.calls[callIndex][1],\n returnData\n );\n results[callIndex] = result;\n } catch (e) {\n console.error('Multicall error', this.paths[callIndex]);\n results[callIndex] = [];\n }\n } else {\n console.error('Failed request in multicall', this.paths[callIndex]);\n results[callIndex] = [];\n }\n }\n });\n\n return results;\n }\n}\n","import { Multicaller3 } from '@/lib/utils/multiCaller3';\nimport { SubgraphPoolBase } from '@/.';\nimport { Provider } from '@ethersproject/providers';\nimport { formatFixed } from '@ethersproject/bignumber';\nimport { SubgraphToken } from '@balancer-labs/sor';\nimport { PoolToken, Pool } from '@/types';\n\nconst abi = [\n 'function getSwapFeePercentage() view returns (uint256)',\n 'function percentFee() view returns (uint256)',\n 'function protocolPercentFee() view returns (uint256)',\n 'function getNormalizedWeights() view returns (uint256[])',\n 'function totalSupply() view returns (uint256)',\n 'function getVirtualSupply() view returns (uint256)',\n 'function getActualSupply() view returns (uint256)',\n 'function getTargets() view returns (uint256 lowerTarget, uint256 upperTarget)',\n 'function getTokenRates() view returns (uint256, uint256)',\n 'function getWrappedTokenRate() view returns (uint256)',\n 'function getAmplificationParameter() view returns (uint256 value, bool isUpdating, uint256 precision)',\n 'function getPausedState() view returns (bool)',\n 'function inRecoveryMode() view returns (bool)',\n 'function getRate() view returns (uint256)',\n 'function getScalingFactors() view returns (uint256[] memory)', // do we need this here?\n 'function getPoolTokens(bytes32) view returns (address[], uint256[])',\n];\n\nconst getTotalSupplyFn = (poolType: string) => {\n if (poolType.includes('Linear') || ['StablePhantom'].includes(poolType)) {\n return 'getVirtualSupply';\n } else if (poolType === 'ComposableStable') {\n return 'getActualSupply';\n } else {\n return 'totalSupply';\n }\n};\n\nconst getSwapFeeFn = (poolType: string) => {\n if (poolType === 'Element') {\n return 'percentFee';\n } else if (poolType === 'FX') {\n return 'protocolPercentFee';\n } else {\n return 'getSwapFeePercentage';\n }\n};\n\ntype GenericToken = SubgraphToken | PoolToken;\ntype GenericPool = Omit & {\n tokens: GenericToken[];\n};\n\ninterface OnchainData {\n poolTokens: [string[], string[]];\n totalShares: string;\n swapFee: string;\n isPaused?: boolean;\n inRecoveryMode?: boolean;\n rate?: string;\n scalingFactors?: string[];\n weights?: string[];\n targets?: [string, string];\n wrappedTokenRate?: string;\n amp?: [string, boolean, string];\n tokenRates?: [string, string];\n}\n\nconst defaultCalls = (\n id: string,\n address: string,\n vaultAddress: string,\n poolType: string,\n multicaller: Multicaller3\n) => {\n multicaller.call(`${id}.poolTokens`, vaultAddress, 'getPoolTokens', [id]);\n multicaller.call(`${id}.totalShares`, address, getTotalSupplyFn(poolType));\n multicaller.call(`${id}.swapFee`, address, getSwapFeeFn(poolType));\n // Following where added to the pools query contract, however legacy onchain data didn't have them.\n // multicaller.call(`${id}.isPaused`, address, 'getPausedState');\n // multicaller.call(`${id}.inRecoveryMode`, address, 'inRecoveryMode');\n // multicaller.call(`${id}.rate`, address, 'getRate');\n // multicaller.call(`${id}.scalingFactors`, address, 'getScalingFactors');\n};\n\nconst weightedCalls = (\n id: string,\n address: string,\n multicaller: Multicaller3\n) => {\n multicaller.call(`${id}.weights`, address, 'getNormalizedWeights');\n};\n\nconst linearCalls = (\n id: string,\n address: string,\n multicaller: Multicaller3\n) => {\n multicaller.call(`${id}.targets`, address, 'getTargets');\n multicaller.call(`${id}.wrappedTokenRate`, address, 'getWrappedTokenRate');\n};\n\nconst stableCalls = (\n id: string,\n address: string,\n multicaller: Multicaller3\n) => {\n multicaller.call(`${id}.amp`, address, 'getAmplificationParameter');\n};\n\nconst gyroECalls = (id: string, address: string, multicaller: Multicaller3) => {\n multicaller.call(`${id}.tokenRates`, address, 'getTokenRates');\n};\n\nconst poolTypeCalls = (poolType: string, poolTypeVersion = 1) => {\n const do_nothing = () => ({});\n switch (poolType) {\n case 'Weighted':\n case 'LiquidityBootstrapping':\n case 'Investment':\n return weightedCalls;\n case 'Stable':\n case 'StablePhantom':\n case 'MetaStable':\n case 'ComposableStable':\n return stableCalls;\n case 'GyroE':\n if (poolTypeVersion === 2) {\n return gyroECalls;\n } else {\n return do_nothing;\n }\n case 'Gyro2':\n if (poolTypeVersion === 2) {\n // Gyro2 V2 has tokenRates same as GyroE V2\n return gyroECalls;\n } else {\n return do_nothing;\n }\n case 'AaveLinear':\n if (poolTypeVersion === 1) {\n return linearCalls;\n } else {\n return do_nothing;\n }\n default:\n return do_nothing;\n }\n};\n\nconst merge = (pool: T, result: OnchainData) => ({\n ...pool,\n tokens: result.poolTokens\n ? pool.tokens.map((token) => {\n const idx = result.poolTokens[0]\n .map((t) => t.toLowerCase())\n .indexOf(token.address);\n const wrappedToken =\n pool.wrappedIndex && pool.tokensList[pool.wrappedIndex];\n const tokenDecimals =\n token.decimals === undefined ? 18 : token.decimals;\n return {\n ...token,\n balance: formatFixed(result.poolTokens[1][idx], tokenDecimals),\n weight:\n (result.weights && formatFixed(result.weights[idx], 18)) ||\n token.weight,\n priceRate:\n (result.wrappedTokenRate &&\n wrappedToken &&\n wrappedToken.toLowerCase() === token.address.toLowerCase() &&\n formatFixed(result.wrappedTokenRate, 18)) ||\n token.priceRate,\n } as SubgraphToken;\n })\n : pool.tokens,\n totalShares: result.totalShares\n ? formatFixed(result.totalShares, 18)\n : pool.totalShares,\n swapFee: result.swapFee ? formatFixed(result.swapFee, 18) : pool.swapFee,\n amp:\n (result.amp &&\n result.amp[0] &&\n formatFixed(result.amp[0], String(result.amp[2]).length - 1)) ||\n pool.amp,\n lowerTarget:\n (result.targets && formatFixed(result.targets[0], 18)) || pool.lowerTarget,\n upperTarget:\n (result.targets && formatFixed(result.targets[1], 18)) || pool.upperTarget,\n tokenRates:\n (result.tokenRates &&\n result.tokenRates.map((rate) => formatFixed(rate, 18))) ||\n pool.tokenRates,\n // rate: result.rate,\n // isPaused: result.isPaused,\n // inRecoveryMode: result.inRecoveryMode,\n // scalingFactors: result.scalingFactors,\n});\n\nexport const fetchOnChainPoolData = async (\n pools: {\n id: string;\n address: string;\n poolType: string;\n poolTypeVersion?: number;\n }[],\n vaultAddress: string,\n provider: Provider,\n batchSize = 1024\n): Promise<{ [id: string]: OnchainData }> => {\n if (pools.length === 0) {\n return {};\n }\n\n const multicaller = new Multicaller3(abi, provider);\n\n pools.forEach(({ id, address, poolType, poolTypeVersion }) => {\n defaultCalls(id, address, vaultAddress, poolType, multicaller);\n poolTypeCalls(poolType, poolTypeVersion)(id, address, multicaller);\n });\n\n const results = (await multicaller.execute({}, batchSize)) as {\n [id: string]: OnchainData;\n };\n\n return results;\n};\n\nexport async function getOnChainBalances(\n subgraphPoolsOriginal: T[],\n _multiAddress: string,\n vaultAddress: string,\n provider: Provider,\n batchSize = 1024\n): Promise {\n if (subgraphPoolsOriginal.length === 0) return subgraphPoolsOriginal;\n\n const poolsWithOnchainData: T[] = [];\n\n const onchainData = (await fetchOnChainPoolData(\n subgraphPoolsOriginal,\n vaultAddress,\n provider,\n batchSize\n )) as { [id: string]: OnchainData };\n\n subgraphPoolsOriginal.forEach((pool) => {\n const data = onchainData[pool.id];\n poolsWithOnchainData.push(merge(pool, data));\n });\n\n return poolsWithOnchainData;\n}\n","import { PoolDataService, SubgraphPoolBase } from '@balancer-labs/sor';\nimport {\n OrderDirection,\n Pool_OrderBy,\n PoolsQueryVariables,\n SubgraphClient,\n} from '@/modules/subgraph/subgraph';\nimport { parseInt } from 'lodash';\nimport { getOnChainBalances } from './onChainData3';\nimport { Provider } from '@ethersproject/providers';\nimport {\n BalancerNetworkConfig,\n BalancerSdkSorConfig,\n GraphQLQuery,\n} from '@/types';\nimport { GraphQLArgs } from '@/lib/graphql/types';\nimport {\n GraphQLArgsBuilder,\n SubgraphArgsFormatter,\n} from '@/lib/graphql/args-builder';\n\nimport { Logger } from '@/lib/utils/logger';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function mapPools(pools: any[]): SubgraphPoolBase[] {\n return pools.map((pool) => ({\n ...pool,\n poolType: pool.poolType || '',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tokens: (pool.tokens || []).map((token: any) => ({\n ...token,\n weight: token.weight || null,\n })),\n totalWeight: pool.totalWeight || undefined,\n amp: pool.amp || undefined,\n expiryTime: pool.expiryTime ? parseInt(pool.expiryTime) : undefined,\n unitSeconds: pool.unitSeconds ? parseInt(pool.unitSeconds) : undefined,\n principalToken: pool.principalToken || undefined,\n baseToken: pool.baseToken || undefined,\n }));\n}\n\nexport class SubgraphPoolDataService implements PoolDataService {\n private readonly defaultArgs: GraphQLArgs;\n constructor(\n private readonly client: SubgraphClient,\n private readonly provider: Provider,\n private readonly network: BalancerNetworkConfig,\n private readonly sorConfig?: BalancerSdkSorConfig,\n query?: GraphQLQuery\n ) {\n // Default args can be overwritten by passing in a queryArgs object to .getPools\n this.defaultArgs = query?.args || {\n orderBy: Pool_OrderBy.TotalLiquidity,\n orderDirection: OrderDirection.Desc,\n where: {\n swapEnabled: {\n eq: true,\n },\n totalShares: {\n gt: 0.000000000001,\n },\n },\n };\n }\n\n /**\n * Returns pools from the subgraph filtered by queryArgs with on-chain balances\n *\n * @param queryArgs\n * @returns SubgraphPoolBase[]\n */\n async getPools(queryArgs?: GraphQLArgs): Promise {\n const pools = await this.getSubgraphPools(queryArgs);\n\n const filteredPools = pools.filter((p) => {\n if (!this.network.poolsToIgnore) return true;\n const index = this.network.poolsToIgnore.findIndex(\n (id) => id.toLowerCase() === p.id.toLowerCase()\n );\n return index === -1;\n });\n\n const mapped = mapPools(filteredPools);\n\n if (this.sorConfig && this.sorConfig.fetchOnChainBalances === false) {\n return mapped;\n }\n\n const logger = Logger.getInstance();\n logger.time(`fetching on-chain balances for ${mapped.length} pools`);\n\n const onChainBalances = await getOnChainBalances(\n mapped,\n this.network.addresses.contracts.multicall,\n this.network.addresses.contracts.vault,\n this.provider,\n this.network.multicallBatchSize\n );\n\n logger.timeEnd(`fetching on-chain balances for ${mapped.length} pools`);\n\n return onChainBalances;\n }\n\n private async getSubgraphPools(queryArgs?: GraphQLArgs) {\n const formattedQuery = new GraphQLArgsBuilder(\n queryArgs || this.defaultArgs\n ).format(new SubgraphArgsFormatter()) as PoolsQueryVariables;\n\n if (formattedQuery.first) {\n const { pools } = await this.client.Pools(formattedQuery);\n return pools;\n }\n\n const { pool0, pool1000, pool2000 } = await this.client.AllPools(\n formattedQuery\n );\n\n const pools = [...pool0, ...pool1000, ...pool2000];\n\n return pools;\n }\n}\n","import { TokenPriceService } from '@balancer-labs/sor';\nimport { SubgraphClient } from '@/modules/subgraph/subgraph';\nimport { keyBy } from 'lodash';\n\nexport class SubgraphTokenPriceService implements TokenPriceService {\n private readonly weth: string;\n\n constructor(private readonly client: SubgraphClient, weth: string) {\n //the subgraph addresses are all toLowerCase\n this.weth = weth.toLowerCase();\n }\n\n public async getNativeAssetPriceInToken(\n tokenAddress: string\n ): Promise {\n const ethPerToken = await this.getLatestPriceInEthFromSubgraph(\n tokenAddress\n );\n\n if (!ethPerToken) {\n throw Error('No price found in the subgraph');\n }\n\n // We want the price of 1 ETH in terms of the token base units\n return `${1 / ethPerToken}`;\n }\n\n public async getLatestPriceInEthFromSubgraph(\n tokenAddress: string\n ): Promise {\n tokenAddress = tokenAddress.toLowerCase();\n\n const { latestPrices } = await this.client.TokenLatestPrices({\n where: { asset_in: [tokenAddress, this.weth] },\n });\n const pricesKeyedOnId = keyBy(latestPrices, 'id');\n\n //the ids are set as ${asset}-${pricingAsset}\n //first try to find an exact match\n if (pricesKeyedOnId[`${tokenAddress}-${this.weth}`]) {\n return parseFloat(pricesKeyedOnId[`${tokenAddress}-${this.weth}`].price);\n }\n\n //no exact match, try to traverse the path\n const matchingLatestPrices = latestPrices.filter(\n (price) => price.asset === tokenAddress\n );\n\n //pick the first one we match on.\n //There is no timestamp on latestPrice, should get introduced to allow for sorting by latest\n for (const tokenPrice of matchingLatestPrices) {\n const pricingAssetPricedInEth =\n pricesKeyedOnId[`${tokenPrice.pricingAsset}-${this.weth}`];\n\n //1 BAL = 20 USDC, 1 USDC = 0.00025 ETH, 1 BAL = 20 * 0.00025\n if (pricingAssetPricedInEth) {\n return (\n parseFloat(tokenPrice.price) *\n parseFloat(pricingAssetPricedInEth.price)\n );\n }\n }\n\n return null;\n }\n}\n","import { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { BalancerNetworkConfig, BalancerSdkConfig } from '@/types';\nexport function getNetworkConfig(\n config: BalancerSdkConfig\n): BalancerNetworkConfig {\n if (typeof config.network === 'number') {\n const networkConfig = BALANCER_NETWORK_CONFIG[config.network];\n\n return {\n ...networkConfig,\n urls: {\n ...networkConfig.urls,\n subgraph: config.customSubgraphUrl ?? networkConfig.urls.subgraph,\n },\n tenderly: config.tenderly,\n };\n }\n\n return {\n ...config.network,\n urls: {\n ...config.network.urls,\n subgraph: config.customSubgraphUrl ?? config.network.urls.subgraph,\n },\n tenderly: config.network.tenderly,\n };\n}\n","export const POOLS_TO_IGNORE = [\n '0x00c2a4be503869fa751c2dbcb7156cc970b5a8da000000000000000000000477',\n '0x02d928e68d8f10c0358566152677db51e1e2dc8c00000000000000000000051e',\n '0x04248aabca09e9a1a3d5129a7ba05b7f17de768400000000000000000000050e',\n '0x05513ca725b6ce035ca2641075474eb469f05f4c00020000000000000000041f',\n '0x0a0fb4ff697de5ac5b6770cd8ee1b72af80b57cf000000000000000000000496',\n '0x0afbd58beca09545e4fb67772faf3858e610bcd00000000000000000000004b9',\n '0x0d05aac44ac7dd3c7ba5d50be93eb884a057d23400000000000000000000051c',\n '0x11839d635e2f0270da37e8ef4324d4d5d54329570002000000000000000004d8',\n '0x126e7643235ec0ab9c103c507642dc3f4ca23c66000000000000000000000468',\n '0x133d241f225750d2c92948e464a5a80111920331000000000000000000000476',\n '0x159cb00338fb63f263fd6f621df619cef71da9540000000000000000000004d5',\n '0x173063a30e095313eee39411f07e95a8a806014e0002000000000000000003ab',\n '0x1bd2f176a812e312077bca87e37c08432bb09f3e0000000000000000000005a1',\n '0x20b156776114e8a801e9767d90c6ccccc8adf398000000000000000000000499',\n '0x246ffb4d928e394a02e45761fecdba6c2e79b8eb000000000000000000000541',\n '0x25accb7943fd73dda5e23ba6329085a3c24bfb6a000200000000000000000387',\n '0x26c2b83fc8535deead276f5cc3ad9c1a2192e02700020000000000000000056b',\n '0x2b218683178d029bab6c9789b1073aa6c96e517600000000000000000000058c',\n '0x2ba7aa2213fa2c909cd9e46fed5a0059542b36b00000000000000000000003a3',\n '0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c0000000000000000000000fd',\n '0x2e52c64fd319e380cdbcfc4577ea1fda558a32e40002000000000000000005ba',\n '0x2f4eb100552ef93840d5adc30560e5513dfffacb000000000000000000000334',\n '0x2ff1a9dbdacd55297452cfd8a4d94724bc22a5f7000000000000000000000484',\n '0x3035917be42af437cbdd774be26b9ec90a2bd677000200000000000000000543',\n '0x331d50e0b00fc1c32742f151e56b9b616227e23e00000000000000000000047c',\n '0x334c96d792e4b26b841d28f53235281cec1be1f200020000000000000000038a',\n '0x335d1709d4da9aca59d16328db5cd4ea66bfe06b0000000000000000000004d6',\n '0x395d8a1d9ad82b5abe558f8abbfe183b27138af40000000000000000000004e5',\n '0x3bb22fc9033b802f2ac47c18885f63476f158afc000000000000000000000483',\n '0x3c640f0d3036ad85afa2d5a9e32be651657b874f00000000000000000000046b',\n '0x3cdae4f12a67ba563499e102f309c73213cb241c000000000000000000000335',\n '0x3dbb8d974b82e82ce79c20c0f5995f4f1f533ede000000000000000000000470',\n '0x3f7a7fd7f214be45ec26820fd01ac3be4fc75aa70002000000000000000004c5',\n '0x3fcb7085b8f2f473f80bf6d879cae99ea4de934400000000000000000000056d',\n '0x41503c9d499ddbd1dcdf818a1b05e9774203bf46000000000000000000000594',\n '0x4228290ee9cab692938ff0b4ba303fbcdb68e9f200020000000000000000057d',\n '0x454ed96955d04d2f5cdd05e0fd1c77975bfe5307000000000000000000000410',\n '0x481c5fc05d63a58aa2f0f2aa417c021b5d419cb200000000000000000000056a',\n '0x483006684f422a9448023b2382615c57c5ecf18f000000000000000000000488',\n '0x4a82b580365cff9b146281ab72500957a849abdc000000000000000000000494',\n '0x4c81255cc9ed7062180ea99962fe05ac0d57350b0000000000000000000005a3',\n '0x4c8d2e60863e8d7e1033eda2b3d84e92a641802000000000000000000000040f',\n '0x4cbde5c4b4b53ebe4af4adb85404725985406163000000000000000000000595',\n '0x4ce0bd7debf13434d3ae127430e9bd4291bfb61f00020000000000000000038b',\n '0x4ce277df0feb5b4d07a0ca2adcf5326e4005239d000000000000000000000518',\n '0x4fd4687ec38220f805b6363c3c1e52d0df3b5023000200000000000000000473',\n '0x4fd63966879300cafafbb35d157dc5229278ed230000000000000000000000e9',\n '0x50cf90b954958480b8df7958a9e965752f62712400000000000000000000046f',\n '0x53bc3cba3832ebecbfa002c12023f8ab1aa3a3a0000000000000000000000411',\n '0x5a6a8cffb4347ff7fc484bf5f0f8a2e234d34255000200000000000000000275',\n '0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b',\n '0x60683b05e9a39e3509d8fdb9c959f23170f8a0fa000000000000000000000489',\n '0x60d604890feaa0b5460b28a424407c24fe89374a0000000000000000000004fc',\n '0x639883476960a23b38579acfd7d71561a0f408cf000200000000000000000505',\n '0x652d486b80c461c397b0d95612a404da936f3db30000000000000000000000e7',\n '0x6667c6fa9f2b3fc1cc8d85320b62703d938e43850000000000000000000004fb',\n '0x6a1eb2e9b45e772f55bd9a34659a04b6f75da68700000000000000000000040d',\n '0x6c56e72c551b5ac4bf54a620a76077ca768c8fe40002000000000000000004da',\n '0x70b7d3b3209a59fb0400e17f67f3ee8c37363f4900020000000000000000018f',\n '0x7337224d59cb16c2dc6938cd45a7b2c60c865d6a0000000000000000000004d4',\n '0x74cbfaf94a3577c539a9dcee9870a6349a33b34f000000000000000000000534',\n '0x779d01f939d78a918a3de18cc236ee89221dfd4e0000000000000000000004c7',\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe',\n '0x804cdb9116a10bb78768d3252355a1b18067bf8f0000000000000000000000fb',\n '0x813e3fe1761f714c502d1d2d3a7cceb33f37f59d00000000000000000000040c',\n '0x82698aecc9e28e9bb27608bd52cf57f704bd1b83000000000000000000000336',\n '0x8a6b25e33b12d1bb6929a8793961076bd1f9d3eb0002000000000000000003e8',\n '0x8e6ec57a822c2f527f2df7c7d7d361df3e7530a1000000000000000000000498',\n '0x8f4063446f5011bc1c9f79a819efe87776f23704000000000000000000000197',\n '0x9001cbbd96f54a658ff4e6e65ab564ded76a543100000000000000000000050a',\n '0x9210f1204b5a24742eba12f710636d76240df3d00000000000000000000000fc',\n '0x9516a2d25958edb8da246a320f2c7d94a0dbe25d000000000000000000000519',\n '0x959216bb492b2efa72b15b7aacea5b5c984c3cca000200000000000000000472',\n '0x968024662b9566b42d78af23a0f441bc8723fa83000200000000000000000418',\n '0x99c88ad7dc566616548adde8ed3effa730eb6c3400000000000000000000049a',\n '0x9b1c8407a360443a9e5eca004713e4088fab8ac0000000000000000000000497',\n '0x9b692f571b256140a39a34676bffa30634c586e100000000000000000000059d',\n '0x9d7f992c900fbea0ec314bdd71b7cc1becf76a33000200000000000000000573',\n '0x9fb771d530b0ceba5160f7bfe2dd1e8b8aa1340300000000000000000000040e',\n '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d',\n '0xa1697f9af0875b63ddc472d6eebada8c1fab85680000000000000000000004f9',\n '0xa3823e50f20982656557a4a6a9c06ba5467ae9080000000000000000000000e6',\n '0xa718042e5622099e5f0ace4e7122058ab39e1bbe000200000000000000000475',\n '0xa8b103a10a94f4f2d7ed2fdcd5545e807557330700000000000000000000048e',\n '0xac5b4ef7ede2f2843a704e96dcaa637f4ba3dc3f00000000000000000000051d',\n '0xac976bb42cb0c85635644e8c7c74d0e0286aa61c0000000000000000000003cb',\n '0xae37d54ae477268b9997d4161b96b8200755935c000000000000000000000337',\n '0xae8535c23afedda9304b03c68a3563b75fc8f92b0000000000000000000005a0',\n '0xb0f75e97a114a4eb4a425edc48990e6760726709000000000000000000000198',\n '0xb5e3de837f869b0248825e0175da73d4e8c3db6b000200000000000000000474',\n '0xb841b062ea8ccf5c4cb78032e91de4ae875560420002000000000000000005b7',\n '0xb9bd68a77ccf8314c0dfe51bc291c77590c4e9e6000200000000000000000385',\n '0xbb6881874825e60e1160416d6c426eae65f2459e000000000000000000000592',\n '0xbc0f2372008005471874e426e86ccfae7b4de79d000000000000000000000485',\n '0xbf2ef8bdc2fc0f3203b3a01778e3ec5009aeef3300000000000000000000058d',\n '0xbfa413a2ff0f20456d57b643746133f54bfe0cd20000000000000000000004c3',\n '0xc2b021133d1b0cf07dba696fd5dd89338428225b000000000000000000000598',\n '0xc443c15033fcb6cf72cc24f1bda0db070ddd9786000000000000000000000593',\n '0xc50d4347209f285247bda8a09fc1c12ce42031c3000000000000000000000590',\n '0xc5dc1316ab670a2eed5716d7f19ced321191f38200000000000000000000056e',\n '0xc8c79fcd0e859e7ec81118e91ce8e4379a481ee6000000000000000000000196',\n '0xcaa052584b462198a5a9356c28bce0634d65f65c0000000000000000000004db',\n '0xcbfa4532d8b2ade2c261d3dd5ef2a2284f7926920000000000000000000004fa',\n '0xcfae6e251369467f465f13836ac8135bd42f8a56000000000000000000000591',\n '0xd4e7c1f3da1144c9e2cfd1b015eda7652b4a439900000000000000000000046a',\n '0xd6e355036f41dc261b3f1ed3bbc6003e87aadb4f000000000000000000000495',\n '0xd7edb56f63b2a0191742aea32df1f98ca81ed9c600000000000000000000058e',\n '0xd997f35c9b1281b82c8928039d14cddab5e13c2000000000000000000000019c',\n '0xdba274b4d04097b90a72b62467d828cefd708037000000000000000000000486',\n '0xdc063deafce952160ec112fa382ac206305657e60000000000000000000004c4',\n '0xdec02e6642e2c999af429f5ce944653cad15e093000000000000000000000469',\n '0xe03af00fabe8401560c1ff7d242d622a5b601573000000000000000000000493',\n '0xe0fcbf4d98f0ad982db260f86cf28b49845403c5000000000000000000000504',\n '0xe2d16b0a39f3fbb4389a0e8f1efcbecfb3d1e6e10000000000000000000005a7',\n '0xe4dc3c1998ac693d68f4c77476d7c815694c3e94000200000000000000000416',\n '0xe6bcc79f328eec93d4ec8f7ed35534d9ab549faa0000000000000000000000e8',\n '0xe8c56405bc405840154d9b572927f4197d110de10000000000000000000005a4',\n '0xeb486af868aeb3b6e53066abc9623b1041b42bc000000000000000000000046c',\n '0xeb567dde03f3da7fe185bdacd5ab495ab220769d000000000000000000000548',\n '0xec3626fee40ef95e7c0cbb1d495c8b67b34d398300000000000000000000053d',\n '0xf22ff21e17157340575158ad7394e068048dd98b0000000000000000000004b8',\n '0xf57c794f42da72b38c8f610ff3b5e8502e48cbde00000000000000000000055c',\n '0xf71d0774b214c4cf51e33eb3d30ef98132e4dbaa00000000000000000000046e',\n '0xfa24a90a3f2bbe5feea92b95cd0d14ce709649f900000000000000000000058f',\n '0xfd11ccdbdb7ab91cb9427a6d6bf570c95876d1950000000000000000000004c2',\n '0xfebb0bbf162e64fb9d0dfe186e517d84c395f016000000000000000000000502',\n '0xfef969638c52899f91781f1be594af6f40b99bad00000000000000000000047b',\n '0x02e139d53ebf4033bf78ab66c6a1e7f1f204487f0002000000000000000009f9',\n '0x03090a9811181a2afe830a3a0b467698ccf3a8b1000000000000000000000bf5',\n '0x0320c1c5b6df19a194d48882aaec1c72940081d9000000000000000000000a7d',\n '0x04b54ea92d73de2d62d651db7d9778f0c49157d8000200000000000000000ba2',\n '0x0503dd6b2d3dd463c9bef67fb5156870af63393e00000000000000000000042e',\n '0x0889b240a5876aae745ac19f1771853671dc5d36000000000000000000000b3f',\n '0x0bc54e914f53f98d16035f4f0d948f3e09c2fac0000200000000000000000bac',\n '0x0c06e87c7b88d998f645b91c1f53b51294b12bca000100000000000000000bb9',\n '0x10b040038f87219d9b42e025e3bd9b8095c87dd9000000000000000000000b11',\n '0x117a3d474976274b37b7b94af5dcade5c90c6e85000000000000000000000aca',\n '0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000a5f',\n '0x1379b816b9be611431d693290289c204720ca56d000100000000000000000b6f',\n '0x150e7b885bdfce974f2abe88a72fdbd692175c6f0002000000000000000009fd',\n '0x178e029173417b1f9c8bc16dcec6f697bc323746000000000000000000000758',\n '0x1aafc31091d93c3ff003cff5d2d8f7ba2e7284250000000000000000000003b3',\n '0x216690738aac4aa0c4770253ca26a28f0115c595000000000000000000000b2c',\n '0x216d6db0c28204014618482c369d7fbf0a8f3232000100000000000000000b60',\n '0x230ecdb2a7cee56d6889965a023aa0473d6da507000000000000000000000bf3',\n '0x252ff6a3a6fd7b5e8e999de8e3f5c3b306ed1401000200000000000000000bec',\n '0x25e57f4612912614e6c99616bd2abb9b5ae71e99000000000000000000000bf0',\n '0x2645b13fd2c5295296e94a76280b968bdcbbdfed000000000000000000000c11',\n '0x284eb68520c8fa83361c1a3a5910aec7f873c18b000000000000000000000ac9',\n '0x2c8dbe8eb86135d9f2f26d196748c088d47f73e7000200000000000000000a29',\n '0x31bccf9e28b94e5dacebaa67fe8bc1603cecd904000000000000000000000a01',\n '0x341068a547c3cde3c09e338714010dd01b32f93f000200000000000000000a34',\n '0x3db543faf7a92052de7860c5c9debabee59ed5bd000000000000000000000a62',\n '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd00000000000000000000070d',\n '0x3efb91c4f9b103ee45885695c67794591916f34e000200000000000000000b43',\n '0x402cfdb7781fa85d52f425352661128250b79e12000000000000000000000be3',\n '0x43894de14462b421372bcfe445fa51b1b4a0ff3d000000000000000000000b36',\n '0x4739e50b59b552d490d3fdc60d200977a38510c0000000000000000000000b10',\n '0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b',\n '0x4a0b73f0d13ff6d43e304a174697e3d5cfd310a400020000000000000000091c',\n '0x4a77ef015ddcd972fd9ba2c7d5d658689d090f1a000000000000000000000b38',\n '0x4ae3661afa119892f0cc8c43edaf6a94989ac171000000000000000000000c06',\n '0x4ccb966d8246240afb7a1a24628efb930870b1c40002000000000000000009fc',\n '0x52cc8389c6b93d740325729cc7c958066cee4262000000000000000000000b0f',\n '0x5b77107fcdf2b41903bab2bc555d4fc14cf7667d000000000000000000000b32',\n '0x5bae72b75caab1f260d21bc028c630140607d6e8000000000000000000000ac6',\n '0x600bd01b6526611079e12e1ff93aba7a3e34226f0000000000000000000009e4',\n '0x63ce19ccd39930725b8a3d2733627804718ab83d000000000000000000000bf2',\n '0x64efad69f099813021b41f4cac6e749fd55e188f000000000000000000000b39',\n '0x6933ec1ca55c06a894107860c92acdfd2dd8512f000000000000000000000428',\n '0x6abe4e7a497b8293c258389c1b00d177e4f257ed00010000000000000000080d',\n '0x6c8c7fc50247a47038015eb1fd5dc105d05dafba000200000000000000000ba0',\n '0x7079a25dec33be61bbd81b2fb69b468e80d3e72c0000000000000000000009ff',\n '0x71bd10c2a590b5858f5576550c163976a48af906000000000000000000000b27',\n '0x7c82a23b4c48d796dee36a9ca215b641c6a8709d000000000000000000000acd',\n '0x7f4f4942f2a14b6ab7b08b10ada1aacede4ee8d4000200000000000000000b44',\n '0x86aef31951e0a3a54333bd9e72f9a95587d058c5000200000000000000000912',\n '0x882c7a84231484b3e9f3fd45ac04b1eb5d35b076000200000000000000000a91',\n '0x894c82800526e0391e709c0983a5aea3718b7f6d000000000000000000000ac5',\n '0x89b28a9494589b09dbccb69911c189f74fdadc5a000000000000000000000b33',\n '0x89bb15076c9f2d86aa98ec6cffc1a71e31c38953000000000000000000000bf1',\n '0x89f1146fee52b5d9166e9c83cc388b6d8f69f1380001000000000000000009e7',\n '0x8a819a4cabd6efcb4e5504fe8679a1abd831dd8f00000000000000000000042d',\n '0x8b58a1e7fff52001c22386c2918d45938a6a9be30001000000000000000008d9',\n '0x8b8225bfedebaf1708c55743acb4ad43fd4d0f21000200000000000000000918',\n '0x8fbd0f8e490735cfc3abf4f29cbddd5c3289b9a7000000000000000000000b5b',\n '0x8fd39252d683fdb60bddd4df4b53c9380b496d59000200000000000000000b45',\n '0x9321e2250767d79bab5aa06daa8606a2b3b7b4c5000000000000000000000bf4',\n '0x949a12b95ec5b80c375b98963a5d6b33b0d0efff0002000000000000000009fe',\n '0x9a020bdc2faff5bd24c6acc2020d01ff9f2c627a000000000000000000000ae2',\n '0x9cf9358300e34bf9373d30129a1e718d8d058b54000200000000000000000913',\n '0x9e34631547adcf2f8cefa0f5f223955c7b137571000000000000000000000ad5',\n '0xa5a935833f6a5312715f182733eab088452335d7000100000000000000000bee',\n '0xa5fe91dde37d8bf2dacacc0168b115d28ed03f84000000000000000000000b35',\n '0xa8bf1c584519be0184311c48adbdc4c15cb2e8c1000000000000000000000bf6',\n '0xab269164a10fab22bc87c39946da06c870b172d6000000000000000000000bfc',\n '0xac2cae8d2f78a4a8f92f20dbe74042cd0a8d5af3000000000000000000000be2',\n '0xae646817e458c0be890b81e8d880206710e3c44e000000000000000000000acb',\n '0xaef2c171dbe64b0c18977e16e70bfd29d4ee0256000000000000000000000ac8',\n '0xb0c830dceb4ef55a60192472c20c8bf19df03488000000000000000000000be1',\n '0xb266ac3b7c98d7bcb28731dac0ef42dba1b276be000000000000000000000be4',\n '0xb371aa09f5a110ab69b39a84b5469d29f9b22b76000000000000000000000b37',\n '0xb3d658d5b95bf04e2932370dd1ff976fe18dd66a000000000000000000000ace',\n '0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e',\n '0xb59be8f3c85a9dd6e2899103b6fbf6ea405b99a4000000000000000000000b34',\n '0xb878ecce26838fbba4f78cb5b791a0e09152c067000000000000000000000427',\n '0xb973ca96a3f0d61045f53255e319aedb6ed4924000000000000000000000042f',\n '0xbd4e35784c832d0f9049b54cb3609e5907c5b495000100000000000000000b14',\n '0xc55ec796a4debe625d95436a3531f4950b11bdcf000000000000000000000b3e',\n '0xc7e6389e364f4275eb442ef215ed21877028e2af000000000000000000000ac7',\n '0xc83b55bbd005f1f84906545fcdb145dee53523e0000200000000000000000b30',\n '0xcb21a9e647c95127ed784626485b3104cb28d0e7000000000000000000000425',\n '0xd00f9ca46ce0e4a63067c4657986f0167b0de1e5000000000000000000000b42',\n '0xd2f3b9e67c69762dd1c88f1d3dadd1649a190761000200000000000000000bf7',\n '0xd4accb350f9cf59fe3cf7a5ee6ed9ace6a568ea9000200000000000000000b75',\n '0xda1cd1711743e57dd57102e9e61b75f3587703da000000000000000000000acc',\n '0xdae301690004946424e41051ace1791083be42a1000000000000000000000b40',\n '0xde0a77ab6689b980c30306b10f9131a007e1af81000200000000000000000ba1',\n '0xe051605a83deae38d26a7346b100ef1ac2ef8a0b0000000000000000000003ce',\n '0xe1fb90d0d3b47e551d494d7ebe8f209753526b01000000000000000000000ac4',\n '0xe2272cddb2cc408e79e02a73d1db9acc24a843d5000200000000000000000ba7',\n '0xe2dc0e0f2c358d6e31836dee69a558ab8d1390e70000000000000000000009fa',\n '0xe4885ed2818cc9e840a25f94f9b2a28169d1aea7000000000000000000000b29',\n '0xe6909c2f18a29d97217a6146f045e1780606991f000100000000000000000bfe',\n '0xe78b25c06db117fdf8f98583cdaaa6c92b79e917000000000000000000000b2b',\n '0xea11645ac7d8f2def94c9d8d86bd766296c9b6b6000000000000000000000b3a',\n '0xeb480dbbdd921cd6c359e4cc4c65ddea6395e2a1000200000000000000000946',\n '0xed35f28f837e96f81240ebb82e0e3f518c7e8a2f000100000000000000000bb5',\n '0xf0211cceebe6fcc45052b4e57ee95d233f5669d2000100000000000000000c01',\n '0xf22a66046b5307842f21b311ecb4c462c24c0635000000000000000000000b15',\n '0xf28f17be00f8ca3c9b7f66a4aad5513757fb3341000200000000000000000b5a',\n '0xf42ed61450458ee4620f5ef4f29adb25a6ef0fb6000000000000000000000bf8',\n '0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56000000000000000000000445',\n '0xf93579002dbe8046c43fefe86ec78b1112247bb8000000000000000000000759',\n '0xf984eb2b8a7ef780245a797a2fccd82f346409ca000000000000000000000a59',\n '0xfa2c0bd8327c99db5bde4c9e9e5cbf30946351bb000000000000000000000948',\n '0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea600000000000000000000075a',\n '0x1ac55c31dac78ca943cb8ebfca5945ce09e036e2000000000000000000000024',\n '0x225e0047671939a8d78e08ebd692788abe63f15c000000000000000000000009',\n '0x41211bba6d37f5a74b22e667533f080c7c7f3f1300000000000000000000000b',\n '0x4de21b365d6543661d0e105e579a34b963862497000200000000000000000045',\n '0x581ec1f5e7ced12b186deae32256adb53bdd5b08000000000000000000000001',\n '0x66f33ae36dd80327744207a48122f874634b3ada000100000000000000000013',\n '0xa3ed6f78edc29f69df8a0d16b1d1ccf9871f918c000000000000000000000032',\n '0xa611a551b95b205ccd9490657acf7899daee5db700000000000000000000002e',\n '0xb95829adbacd8af89e291dee78bc09e24de51d6b000000000000000000000043',\n '0xb973ca96a3f0d61045f53255e319aedb6ed49240000200000000000000000011',\n '0xba1a5b19d09a79dada039b1f974015c5a989d5fd000100000000000000000046',\n '0xbb9cd48d33033f5effbedec9dd700c7d7e1dcf5000000000000000000000000e',\n '0xd16f72b02da5f51231fde542a8b9e2777a478c8800000000000000000000000f',\n '0xd4015683b8153666190e0b2bec352580ebc4caca00000000000000000000000d',\n '0xe15cac1df3621e001f76210ab12a7f1a1691481f000000000000000000000044',\n '0xe7f88d7d4ef2eb18fcf9dd7216ba7da1c46f3dd600000000000000000000000a',\n '0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56000200000000000000000012',\n '0xfedb19ec000d38d92af4b21436870f115db22725000000000000000000000010',\n '0xffff76a3280e95dc855696111c2562da09db2ac000000000000000000000000c',\n '0x00fcd3d55085e998e291a0005cedecf58ac14c4000020000000000000000047f',\n '0x077794c30afeccdf5ad2abc0588e8cee7197b71a000000000000000000000352',\n '0x117a3d474976274b37b7b94af5dcade5c90c6e85000000000000000000000381',\n '0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000353',\n '0x19b1c92631405a0a9495ccba0becf4f2e8e908bd000000000000000000000410',\n '0x1e550b7764da9638fdd32c8a701364de31f45ee800000000000000000000047c',\n '0x1fa7f727934226aedab636d62a084931b97d366b000000000000000000000411',\n '0x23ca0306b21ea71552b148cf3c4db4fc85ae19290000000000000000000000c9',\n '0x284eb68520c8fa83361c1a3a5910aec7f873c18b000000000000000000000380',\n '0x2a96254ca32020b20ed3506f8f75318da24709f9000200000000000000000456',\n '0x36942963e3b6f37ecc45a4e72349558514233f0000000000000000000000048a',\n '0x3f53a862919ccfa023cb6ace91378a79fb0f6bf500000000000000000000040f',\n '0x40af308e3d07ec769d85eb80afb116525ff4ac99000000000000000000000485',\n '0x418de00ae109e6f874d872658767866d680eaa1900000000000000000000047d',\n '0x45c4d1376943ab28802b995acffc04903eb5223f000000000000000000000470',\n '0x4689122d360c4725d244c5cfea22861333d862e6000100000000000000000468',\n '0x4739e50b59b552d490d3fdc60d200977a38510c0000000000000000000000409',\n '0x49a0e3334496442a9706e481617724e7e37eaa080000000000000000000003ff',\n '0x519cce718fcd11ac09194cff4517f12d263be067000000000000000000000382',\n '0x52cc8389c6b93d740325729cc7c958066cee4262000000000000000000000408',\n '0x567ecfcb22205d279bb8eed3e066989902bf03d5000000000000000000000452',\n '0x585d95df0231fa08aeee35ff0c16b92fd0ecdc3300020000000000000000045f',\n '0x5a7f39435fd9c381e4932fa2047c9a5136a5e3e7000000000000000000000400',\n '0x5bae72b75caab1f260d21bc028c630140607d6e8000000000000000000000350',\n '0x6cb787a419c3e6ee2e9ff365856c29cd10659113000000000000000000000474',\n '0x7c82a23b4c48d796dee36a9ca215b641c6a8709d000000000000000000000406',\n '0x81fc12c60ee5b753cf5fd0adc342dfb5f3817e3200000000000000000000035d',\n '0x894c82800526e0391e709c0983a5aea3718b7f6d00000000000000000000034f',\n '0x970712708a08e8fb152be4d81b2dc586923f5369000200000000000000000479',\n '0x9bf7c3b63c77b4b4f2717776f15a4bec1b532a280000000000000000000000c8',\n '0x9cebf13bb702f253abf1579294694a1edad00eaa000000000000000000000486',\n '0x9e34631547adcf2f8cefa0f5f223955c7b137571000000000000000000000407',\n '0x9fb7d6dcac7b6aa20108bad226c35b85a9e31b63000200000000000000000412',\n '0xa1ea76c42b2938cfa9abea12357881006c52851300000000000000000000048f',\n '0xa50f89e9f439fde2a6fe05883721a00475da3c4500000000000000000000048b',\n '0xa612b6aed2e7ca1a3a4f23fbca9128461bbb7718000000000000000000000274',\n '0xa8af146d79ac0bb981e4e0d8b788ec5711b1d5d000000000000000000000047b',\n '0xad28940024117b442a9efb6d0f25c8b59e1c950b00000000000000000000046f',\n '0xae646817e458c0be890b81e8d880206710e3c44e00000000000000000000039d',\n '0xaef2c171dbe64b0c18977e16e70bfd29d4ee0256000000000000000000000351',\n '0xbbf9d705b75f408cfcaee91da32966124d2c6f7d00000000000000000000047e',\n '0xbd724eb087d4cc0f61a5fed1fffaf937937e14de000000000000000000000473',\n '0xbe0f30217be1e981add883848d0773a86d2d2cd4000000000000000000000471',\n '0xc46be4b8bb6b5a3d3120660efae9c5416318ed40000000000000000000000472',\n '0xc69771058481551261709d8db44977e9afde645000010000000000000000042a',\n '0xc6eee8cb7643ec2f05f46d569e9ec8ef8b41b389000000000000000000000475',\n '0xcba9ff45cfb9ce238afde32b0148eb82cbe635620000000000000000000003fd',\n '0xcf8b555b7754556cf2ac2165e77ee23ed8517d7900020000000000000000045e',\n '0xd0dc20e6342db2de82692b8dc842301ff9121805000200000000000000000454',\n '0xd3d5d45f4edf82ba0dfaf061d230766032a10e07000200000000000000000413',\n '0xd6d20527c7b0669989ee082b9d3a1c63af742290000000000000000000000483',\n '0xda1cd1711743e57dd57102e9e61b75f3587703da0000000000000000000003fc',\n '0xe1fb90d0d3b47e551d494d7ebe8f209753526b0100000000000000000000034e',\n '0xee02583596aee94cccb7e8ccd3921d955f17982a00000000000000000000040a',\n '0xf984eb2b8a7ef780245a797a2fccd82f346409ca00000000000000000000034d',\n '0xff8f84e8c87532af96aef5582ee451572233678b000200000000000000000478',\n '0x054e7b0c73e1ee5aed6864fa511658fc2b54bcaa000000000000000000000015',\n '0x3f1a2c4a3a751f6626bd90ef16e104f0772d4d6b00020000000000000000001b',\n '0x7275c131b1f67e8b53b4691f92b0e35a4c1c6e22000000000000000000000010',\n '0xa154009870e9b6431305f19b09f9cfd7284d4e7a000000000000000000000013',\n '0xa1d14d922a575232066520eda11e27760946c991000000000000000000000012',\n '0xa826a114b0c7db4d1ff4a4be845a78998c64564c000000000000000000000008',\n '0xea67626e1f0b59e0d172a04f5702ef90bcdf440c00000000000000000000000f',\n '0xeb496161099d45b3ea4892408ef745c6182eb56e00000000000000000000000e',\n '0xece571847897fd61e764d455dc15cf1cd9de8d6f000000000000000000000014',\n '0xed3e2f496cbcd8e212192fb8d1499842f04a0d19000000000000000000000009',\n '0x02c9dcb975262719a61f9b40bdf0987ead9add3a000000000000000000000006',\n '0x16c9a4d841e88e52b51936106010f27085a529ec00000000000000000000000c',\n '0x32be2d0ddeaf3333501b24a28668ce373ba8e763000200000000000000000014',\n '0x32f03464fdf909fdf3798f87ff3712b10c59bd86000000000000000000000005',\n '0x4b718e0e2fea1da68b763cd50c446fba03ceb2ea00000000000000000000000b',\n '0x68a69c596b3839023c0e08d09682314f582314e5000200000000000000000011',\n '0x6f34a44fce1506352a171232163e7716dd073ade000200000000000000000015',\n '0x9e2d87f904862671eb49cb358e74284762cc9f42000200000000000000000013',\n '0xac4b72c01072a52b73ca71105504f1372efcce0d000000000000000000000003',\n '0xbfd65c6160cfd638a85c645e6e6d8acac5dac935000000000000000000000004',\n '0xe274c9deb6ed34cfe4130f8d0a8a948dea5bb28600000000000000000000000d',\n];\n","import { TokenPriceService } from '@balancer-labs/sor';\nimport { gql, request } from 'graphql-request';\nimport { Network } from '@/types';\n\nexport class ApiTokenPriceService implements TokenPriceService {\n private chainKey: string;\n\n private balancerApiUrl = 'https://api-v3.balancer.fi/';\n\n private tokenPriceQuery = gql`\n query queryTokenPrices($chainKey: GqlChain!) {\n tokenGetCurrentPrices(chains: [$chainKey]) {\n address\n price\n }\n }\n `;\n\n constructor(private readonly chainId: number) {\n this.chainKey = Network[chainId];\n }\n async getNativeAssetPriceInToken(tokenAddress: string): Promise {\n const { tokenGetCurrentPrices: tokenPrices } = await request(\n this.balancerApiUrl,\n this.tokenPriceQuery,\n {\n chainKey: this.chainKey,\n }\n );\n const tokenPriceUsd = (\n tokenPrices as { address: string; price: number }[]\n ).find(\n ({ address }) => address.toLowerCase() === tokenAddress.toLowerCase()\n );\n if (!tokenPriceUsd) {\n throw new Error('Token Price not found in the API');\n }\n const nativeAssetPriceUsd = (\n tokenPrices as { address: string; price: number }[]\n ).find(\n ({ address }) =>\n address.toLowerCase() ===\n NativeAssetAddress[this.chainKey as keyof typeof NativeAssetAddress]\n );\n if (!nativeAssetPriceUsd) {\n throw new Error('Native Token Price not found in the API');\n }\n const tokenPriceInNativeAsset =\n tokenPriceUsd.price / nativeAssetPriceUsd.price;\n return String(tokenPriceInNativeAsset);\n }\n}\n\nenum NativeAssetAddress {\n MAINNET = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n POLYGON = '0x0000000000000000000000000000000000001010',\n ARBITRUM = '0x912ce59144191c1204e64559fe8253a0e49e6548',\n AVALANCHE = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n BASE = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n FANTOM = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n GNOSIS = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n OPTIMISM = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n ZKEVM = '0xa2036f0538221a77a3937f1379699f44945018d0',\n}\n","export function getCoingeckoApiBaseUrl(isDemoApi = true): string {\n if (isDemoApi) {\n return 'https://api.coingecko.com/api/v3/';\n }\n return 'https://pro-api.coingecko.com/api/v3/';\n}\n\nexport function getCoingeckoApiKeyHeaderName(isDemoApi = true): string {\n if (isDemoApi) {\n return 'x-cg-demo-api-key';\n }\n return 'x-cg-pro-api-key';\n}\n","import { TokenPriceService } from '@balancer-labs/sor';\nimport axios from 'axios';\nimport { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { Network, BalancerNetworkConfig, CoingeckoConfig } from '@/types';\nimport {\n getCoingeckoApiBaseUrl,\n getCoingeckoApiKeyHeaderName,\n} from '@/lib/utils/coingecko-api';\n\nexport class CoingeckoTokenPriceService implements TokenPriceService {\n private readonly urlBase: string;\n private readonly apiKey: string;\n private readonly coingeckoApiKeyHeaderName: string;\n constructor(private readonly chainId: number, coingecko: CoingeckoConfig) {\n this.urlBase = `${getCoingeckoApiBaseUrl(\n coingecko?.isDemoApiKey\n )}simple/token_price/${this.platformId}?vs_currencies=${\n this.nativeAssetId\n }`;\n this.coingeckoApiKeyHeaderName = getCoingeckoApiKeyHeaderName(\n coingecko?.isDemoApiKey\n );\n this.apiKey = coingecko.coingeckoApiKey;\n }\n\n public async getNativeAssetPriceInToken(\n tokenAddress: string\n ): Promise {\n const ethPerToken = await this.getTokenPriceInNativeAsset(tokenAddress);\n\n // We get the price of token in terms of ETH\n // We want the price of 1 ETH in terms of the token base units\n return `${1 / parseFloat(ethPerToken)}`;\n }\n\n /**\n * @dev Assumes that the native asset has 18 decimals\n * @param tokenAddress - the address of the token contract\n * @returns the price of 1 ETH in terms of the token base units\n */\n async getTokenPriceInNativeAsset(tokenAddress: string): Promise {\n const endpoint = `${this.urlBase}&contract_addresses=${tokenAddress}`;\n\n const { data } = await axios.get(endpoint, {\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n [this.coingeckoApiKeyHeaderName]: this.apiKey ?? '',\n },\n });\n\n if (\n data[tokenAddress.toLowerCase()] === undefined ||\n data[tokenAddress.toLowerCase()][this.nativeAssetId] === undefined\n ) {\n throw Error('No price returned from Coingecko');\n }\n\n return data[tokenAddress.toLowerCase()][this.nativeAssetId];\n }\n\n private get platformId(): string {\n const networkConfig: BalancerNetworkConfig =\n BALANCER_NETWORK_CONFIG[this.chainId as Network];\n return networkConfig.thirdParty.coingecko.platformId || '2';\n }\n\n private get nativeAssetId(): string {\n const networkConfig: BalancerNetworkConfig =\n BALANCER_NETWORK_CONFIG[this.chainId as Network];\n return networkConfig.thirdParty.coingecko.nativeAssetId || '';\n }\n}\n","import { SOR, SorConfig, TokenPriceService } from '@balancer-labs/sor';\nimport { Provider, JsonRpcProvider } from '@ethersproject/providers';\nimport { SubgraphPoolDataService } from './pool-data/subgraphPoolDataService';\nimport {\n SubgraphClient,\n createSubgraphClient,\n} from '@/modules/subgraph/subgraph';\nimport {\n BalancerNetworkConfig,\n BalancerSdkConfig,\n BalancerSdkSorConfig,\n CoingeckoConfig,\n} from '@/types';\nimport { SubgraphTokenPriceService } from './token-price/subgraphTokenPriceService';\nimport { getNetworkConfig } from '@/modules/sdk.helpers';\nimport { POOLS_TO_IGNORE } from '@/lib/constants/poolsToIgnore';\nimport { ApiTokenPriceService } from '@/modules/sor/token-price/apiTokenPriceService';\nimport { CoingeckoTokenPriceService } from '@/modules/sor/token-price/coingeckoTokenPriceService';\n\nexport class Sor extends SOR {\n constructor(sdkConfig: BalancerSdkConfig) {\n const network = getNetworkConfig(sdkConfig);\n const sorConfig = Sor.getSorConfig(sdkConfig);\n const sorNetworkConfig = Sor.getSorNetworkConfig(network);\n const provider = new JsonRpcProvider(\n sdkConfig.rpcUrl,\n sdkConfig.network as number\n );\n const subgraphClient = createSubgraphClient(network.urls.subgraph);\n\n const poolDataService = Sor.getPoolDataService(\n network,\n sorConfig,\n provider,\n subgraphClient\n );\n\n const tokenPriceService = Sor.getTokenPriceService(\n network,\n sorConfig,\n subgraphClient,\n sdkConfig.coingecko\n );\n\n super(provider, sorNetworkConfig, poolDataService, tokenPriceService);\n }\n\n private static getSorConfig(config: BalancerSdkConfig): BalancerSdkSorConfig {\n return {\n tokenPriceService: 'api',\n poolDataService: 'subgraph',\n fetchOnChainBalances: true,\n ...config.sor,\n };\n }\n\n private static getSorNetworkConfig(\n network: BalancerNetworkConfig\n ): SorConfig {\n return {\n ...network,\n vault: network.addresses.contracts.vault,\n weth: network.addresses.tokens.wrappedNativeAsset,\n lbpRaisingTokens: network.addresses.tokens?.lbpRaisingTokens,\n wETHwstETH: network.pools.wETHwstETH,\n connectingTokens: network.sorConnectingTokens,\n triPathMidPoolIds: network.sorTriPathMidPoolIds,\n };\n }\n\n private static getPoolDataService(\n network: BalancerNetworkConfig,\n sorConfig: BalancerSdkSorConfig,\n provider: Provider,\n subgraphClient: SubgraphClient\n ) {\n // For SOR we want to ignore all configured pools (for Vault/Simulation we don't)\n const allPoolsToIgnore = [\n ...(network.poolsToIgnore ?? []),\n ...POOLS_TO_IGNORE,\n ];\n return typeof sorConfig.poolDataService === 'object'\n ? sorConfig.poolDataService\n : new SubgraphPoolDataService(\n subgraphClient,\n provider,\n { ...network, poolsToIgnore: allPoolsToIgnore },\n sorConfig\n );\n }\n\n private static getTokenPriceService(\n network: BalancerNetworkConfig,\n sorConfig: BalancerSdkSorConfig,\n subgraphClient: SubgraphClient,\n coingeckoConfig?: CoingeckoConfig\n ): TokenPriceService {\n if (sorConfig.tokenPriceService === 'coingecko' && coingeckoConfig) {\n return new CoingeckoTokenPriceService(network.chainId, coingeckoConfig);\n }\n if (typeof sorConfig.tokenPriceService === 'object') {\n return sorConfig.tokenPriceService;\n } else if (sorConfig.tokenPriceService === 'subgraph') {\n return new SubgraphTokenPriceService(\n subgraphClient,\n network.addresses.tokens.wrappedNativeAsset\n );\n }\n return new ApiTokenPriceService(network.chainId);\n }\n}\n","import {\n QuerySimpleFlashSwapParameters,\n QuerySimpleFlashSwapResponse,\n SimpleFlashSwapParameters,\n SwapType,\n} from '../types';\nimport { queryBatchSwap } from '../queryBatchSwap';\nimport { BatchSwap } from '../types';\nimport { sum } from 'lodash';\n\nfunction checkSimpleFlashSwapParams(params: {\n poolIds: string[];\n assets: string[];\n}) {\n if (params.poolIds.length > 2) {\n throw new Error('Simple flash swap only supports a maximum of two pools');\n }\n\n if (params.assets.length > 2) {\n throw new Error(\n 'Simple flash swap only supports a maximum of to two assets (tokens)'\n );\n }\n}\n\nfunction createSwaps(\n poolIds: SimpleFlashSwapParameters['poolIds'],\n amount: string\n): BatchSwap['swaps'] {\n return [\n {\n poolId: poolIds[0],\n assetInIndex: 0,\n assetOutIndex: 1,\n amount,\n userData: '0x',\n },\n {\n poolId: poolIds[1],\n assetInIndex: 1,\n assetOutIndex: 0,\n amount: '0',\n userData: '0x',\n },\n ];\n}\n\nexport function convertSimpleFlashSwapToBatchSwapParameters({\n poolIds,\n assets,\n flashLoanAmount,\n walletAddress,\n}: SimpleFlashSwapParameters & {\n walletAddress: string;\n}): BatchSwap {\n checkSimpleFlashSwapParams({ poolIds, assets });\n\n const swaps = createSwaps(poolIds, flashLoanAmount);\n\n const funds = {\n sender: walletAddress,\n fromInternalBalance: false,\n recipient: walletAddress,\n toInternalBalance: false,\n };\n\n const limits = ['0', '0'];\n\n const deadline = '999999999999999999';\n\n return {\n kind: SwapType.SwapExactIn,\n swaps,\n assets,\n funds,\n limits,\n deadline,\n };\n}\n\nfunction deltaToExpectedProfit(delta: string) {\n return Number(delta) * -1;\n}\n\nfunction calcProfit(profits: string[]) {\n return sum(profits);\n}\n\n/**\n * Simple interface to test if a simple flash swap is valid and see potential profits.\n *\n * A \"simple\" flash swap is an arbitrage executed with only two tokens and two pools,\n * swapping in the first pool and then back in the second pool for a profit. For more\n * complex flash swaps, you will have to use the batch swap method.\n *\n * Learn more: A [Flash Swap](https://dev.balancer.fi/resources/swaps/flash-swaps).\n *\n * _NB: This method doesn't execute a flashSwap\n *\n * @param {SimpleFlashSwapParameters} params - BatchSwap information used for query.\n * @param {Contract} params.vaultContract - the ethersjs contract for the Balancer Vault.\n * @param {string} params.flashLoanAmount - initial input amount for the flash loan (first asset)\n * @param {string[]} params.poolIds - array of Balancer pool ids\n * @param {string[]} params.assets - array of token addresses\n * @returns {Promise} Returns an ethersjs transaction response\n */\nexport async function querySimpleFlashSwap(\n params: QuerySimpleFlashSwapParameters\n): Promise {\n checkSimpleFlashSwapParams(params);\n\n const [tokenAddress0, tokenAddress1] = params.assets;\n\n try {\n const deltas = await queryBatchSwap(\n params.vaultContract,\n SwapType.SwapExactIn,\n createSwaps(params.poolIds, params.flashLoanAmount),\n params.assets\n );\n\n const profits = {\n [tokenAddress0]: deltaToExpectedProfit(deltas[0]).toString(),\n [tokenAddress1]: deltaToExpectedProfit(deltas[1]).toString(),\n };\n\n return {\n profits,\n isProfitable:\n calcProfit([profits[tokenAddress0], profits[tokenAddress1]]) > 0,\n };\n } catch (err) {\n throw `Failed to querySimpleFlashSwap: ${err}`;\n }\n}\n","import { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { JsonFragment } from '@ethersproject/abi';\nimport { networkAddresses } from '@/lib/constants/config';\nimport { BatchRelayerLibrary__factory } from '@/contracts';\n\n/**\n * Maps SOR data to get the tokenIn used in swaps.\n * Logic related to a relayer wrapping and unwrapping tokens.\n * SOR returns list of already wrapped tokenAddresses used in the swap.\n * However tokenIn defined as an input is the unwrapped token.\n * Note: tokenAddresses are transformed in SOR lib wrapInfo.setWrappedInfo\n * TODO: Once PR is merged, this table can be removed.\n */\ntype WrappedList = {\n [key: string]: string;\n};\n\nconst underlyingToWrappedMap: WrappedList = {\n // stETH => wstETH\n '0xae7ab96520de3a18e5e111b5eaab095312d7fe84':\n '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',\n\n // AMPL => WAMPL\n '0xd46ba6d942050d489dbd938a2c909a5d5039a161':\n '0xedb171c18ce90b633db442f2a6f72874093b49ef',\n\n // aAMPL -> ubAAMPL\n '0x1e6bb68acec8fefbd87d192be09bb274170a0548':\n '0xF03387d8d0FF326ab586A58E0ab4121d106147DF',\n};\n\n/**\n * Vault swaps are operating on wrapped tokens. When user is sending an unwrapped token, it's wrapped in a relayer.\n * SOR is returning an array of tokens already wrapped.\n * Converts tokenIn to match tokenIn used in a swap.\n *\n * TODO: add tokenIn and tokenOut addressed used for swap in the SOR results as tokenInForSwap, tokenOutForSwap\n *\n * @param token token address\n * @returns wrapped token address\n */\nfunction tokenForSwaps(token: string): string {\n let wrapped = token;\n // eslint-disable-next-line no-prototype-builtins\n if (underlyingToWrappedMap.hasOwnProperty(token)) {\n wrapped = underlyingToWrappedMap[token as keyof WrappedList];\n }\n return wrapped;\n}\n\nexport enum Relayers {\n vault = 1,\n lido = 2,\n}\n\nexport interface SwapRelayer {\n id: Relayers;\n address: string;\n}\n\n/**\n * Resolves a contract address for sending swap transaction to.\n * Balancer is using relayers to automatically wrap / unwrap tokens not compatibile with ERC20.\n */\nfunction relayerResolver(\n assetIn: string,\n assetOut: string,\n chainId: number\n): SwapRelayer {\n const { tokens, contracts } = networkAddresses(chainId);\n\n let to = {\n id: Relayers.vault,\n address: contracts.vault,\n };\n\n if (tokens.stETH && contracts.lidoRelayer)\n if ([assetIn, assetOut].includes(tokens.stETH))\n to = {\n id: Relayers.lido,\n address: contracts.lidoRelayer,\n };\n\n return to;\n}\n\nfunction swapFragment(relayer: SwapRelayer): JsonFragment[] {\n if (relayer.id === Relayers.lido)\n return BatchRelayerLibrary__factory.abi.filter(\n (f) =>\n f.type === 'function' &&\n f.name &&\n ['swap', 'batchSwap'].includes(f.name)\n );\n else\n return Vault__factory.abi.filter(\n (f) =>\n f.type === 'function' &&\n f.name &&\n ['swap', 'batchSwap'].includes(f.name)\n );\n}\n\nfunction batchSwapFragment(\n assetIn: string,\n assetOut: string,\n chainId: number\n): JsonFragment[] {\n const { tokens, contracts } = networkAddresses(chainId);\n if (tokens.stETH && contracts.lidoRelayer) {\n if ([assetIn, assetOut].includes(tokens.stETH)) {\n const relayerSignaturesForSwaps = BatchRelayerLibrary__factory.abi.filter(\n (f) => f.type === 'function' && f.name === 'batchSwap'\n );\n return relayerSignaturesForSwaps;\n }\n }\n const vaultSignaturesForSwaps = Vault__factory.abi.filter(\n (f) => f.type === 'function' && f.name === 'batchSwap'\n );\n return vaultSignaturesForSwaps;\n}\n\nexport { tokenForSwaps, relayerResolver, swapFragment, batchSwapFragment };\n","import { SwapInfo } from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { tokenForSwaps } from './swap_utils';\nimport { SwapType } from '../types';\n\ninterface AmountForLimit {\n amount: BigNumber;\n max: (slippage: number) => BigNumber;\n min: (slippage: number) => BigNumber;\n}\n\ninterface SDKSwapInfo extends SwapInfo {\n /** Name mapping to improve readability. */\n amountIn: BigNumber;\n amountOut: BigNumber;\n /** Name mapping for amounts used specifically for limits calculations. */\n amountInForLimits: AmountForLimit;\n amountOutForLimits: AmountForLimit;\n /** Wrapped token addresses used in the swap. */\n tokenInForSwaps: string;\n tokenOutFromSwaps: string;\n}\n\n/** Applies slippage to a number */\nfunction amountForLimit(amount: BigNumber): AmountForLimit {\n return {\n amount,\n max: (maxSlippage: number): BigNumber => {\n return amount.mul(1e4 + maxSlippage).div(1e4);\n },\n min: (maxSlippage: number): BigNumber => {\n return amount.mul(1e4 - maxSlippage).div(1e4);\n },\n };\n}\n\nfunction decorateSorSwapInfo(\n swapInfo: SwapInfo,\n swapType: SwapType\n): SDKSwapInfo {\n const amountIn =\n swapType === SwapType.SwapExactIn\n ? swapInfo.swapAmount\n : swapInfo.returnAmount;\n const amountOut =\n swapType === SwapType.SwapExactIn\n ? swapInfo.returnAmount\n : swapInfo.swapAmount;\n const amountInForLimits =\n swapType === SwapType.SwapExactIn\n ? swapInfo.swapAmountForSwaps || swapInfo.swapAmount\n : swapInfo.returnAmountFromSwaps || swapInfo.returnAmount;\n const amountOutForLimits =\n swapType === SwapType.SwapExactIn\n ? swapInfo.returnAmountFromSwaps || swapInfo.returnAmount\n : swapInfo.swapAmountForSwaps || swapInfo.swapAmount;\n const tokenInForSwaps = tokenForSwaps(swapInfo.tokenIn);\n const tokenOutFromSwaps = tokenForSwaps(swapInfo.tokenOut);\n\n return {\n ...swapInfo,\n amountIn,\n amountOut,\n amountInForLimits: amountForLimit(amountInForLimits),\n amountOutForLimits: amountForLimit(amountOutForLimits),\n tokenInForSwaps,\n tokenOutFromSwaps,\n };\n}\n\nexport { SDKSwapInfo, tokenForSwaps, decorateSorSwapInfo };\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { FundManagement, SingleSwap, Swap, SwapType } from '../types';\nimport { Interface, JsonFragment } from '@ethersproject/abi';\nimport { SwapInfo } from '@balancer-labs/sor';\nimport { SDKSwapInfo, decorateSorSwapInfo } from './swap_info_decorator';\nimport { AddressZero } from '@ethersproject/constants';\nimport { swapFragment, relayerResolver, SwapRelayer } from './swap_utils';\n\nclass SingleSwapBuilder {\n private swapInfo: SDKSwapInfo;\n funds?: FundManagement;\n limit?: BigNumberish;\n deadline?: string;\n relayer: SwapRelayer;\n readonly functionName = 'swap';\n\n /**\n * Building swap transaction data\n *\n * @param swapInfo SOR result\n * @param kind\n * @param chainId used to resolve relayer addresses\n */\n constructor(\n swapInfo: SwapInfo,\n private readonly kind: SwapType,\n private readonly chainId: number\n ) {\n this.swapInfo = decorateSorSwapInfo(swapInfo, kind);\n this.relayer = relayerResolver(\n this.swapInfo.tokenIn,\n this.swapInfo.tokenOut,\n this.chainId\n );\n }\n\n setFunds(sender: string, recipient?: string): void {\n this.funds = {\n sender,\n recipient: recipient || sender,\n fromInternalBalance: false,\n toInternalBalance: false,\n };\n }\n\n /**\n * @param deadline block timestamp\n */\n setDeadline(deadline: string): void {\n this.deadline = deadline;\n }\n\n get amount(): BigNumber {\n return this.kind === SwapType.SwapExactOut\n ? this.swapInfo.amountOutForLimits.amount\n : this.swapInfo.amountInForLimits.amount;\n }\n\n /**\n * Calculates the limit for token amount.\n * https://dev.balancer.fi/guides/swaps/single-swaps\n * https://dev.balancer.fi/resources/swaps/single-swap\n *\n * For swap:\n * The meaning of limit depends on the value of kind\n * GIVEN_IN: The minimum amount of tokens we would accept to receive from the swap.\n * GIVEN_OUT: The maximum amount of tokens we would be sending to swap.\n *\n * @param maxSlippage [bps], eg: 1 === 0.01%, 100 === 1%\n */\n setLimits(maxSlippage: number): void {\n this.limit =\n this.kind === SwapType.SwapExactIn\n ? this.swapInfo.amountOutForLimits.min(maxSlippage).toString()\n : this.swapInfo.amountInForLimits.max(maxSlippage).toString();\n }\n\n get singleSwap(): SingleSwap {\n const poolId = this.swapInfo.swaps[0].poolId;\n const kind = this.kind;\n const assetIn = this.swapInfo.tokenInForSwaps;\n const assetOut = this.swapInfo.tokenOutFromSwaps;\n const amount = this.amount.toString();\n const userData = '0x';\n\n return {\n poolId,\n kind,\n assetIn,\n assetOut,\n amount,\n userData,\n };\n }\n\n attributes(): Swap {\n if (!this.funds || !this.limit || !this.deadline) {\n throw new Error('Uninitialized arguments');\n }\n\n // TODO: Raise errors when some parameters are missing\n let attrs: Swap = {\n request: this.singleSwap,\n funds: this.funds,\n limit: this.limit,\n deadline: this.deadline,\n };\n\n // TODO: Call this logic from a relayer module maybe? Do we actually need to do that?\n // additional parameters on a contract:\n // https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/standalone-utils/contracts/relayer/VaultActions.sol#L44\n const fragment = this.fragment();\n if (fragment[0].inputs && fragment[0].inputs?.length > 4) {\n attrs = {\n ...attrs,\n value: '0',\n outputReference: '0',\n };\n }\n\n return attrs;\n }\n\n data(): string {\n const contractInterface = new Interface(this.fragment());\n\n return contractInterface.encodeFunctionData(\n 'swap',\n Object.values(this.attributes())\n );\n }\n\n value(maxSlippage: number): BigNumber {\n let amount = BigNumber.from(0);\n if (this.swapInfo.tokenIn === AddressZero)\n amount =\n this.kind === SwapType.SwapExactIn\n ? this.swapInfo.amountIn\n : this.swapInfo.amountInForLimits.max(maxSlippage);\n return amount;\n }\n\n to(): string {\n return this.relayer.address;\n }\n\n private fragment(): JsonFragment[] {\n return swapFragment(this.relayer).filter(\n (f) => f.name === this.functionName\n );\n }\n}\n\nexport { SingleSwapBuilder };\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { BatchSwap, FundManagement, SwapType } from '../types';\nimport { Interface, JsonFragment } from '@ethersproject/abi';\nimport { SwapInfo } from '@balancer-labs/sor';\nimport { SDKSwapInfo, decorateSorSwapInfo } from './swap_info_decorator';\nimport { AddressZero } from '@ethersproject/constants';\nimport { swapFragment, relayerResolver, SwapRelayer } from './swap_utils';\n\nclass BatchSwapBuilder {\n private swapInfo: SDKSwapInfo;\n funds?: FundManagement;\n limits?: BigNumberish[];\n deadline?: string;\n relayer: SwapRelayer;\n readonly functionName = 'batchSwap';\n\n /**\n * Building swap transaction data\n *\n * @param swapInfo SOR result\n * @param kind\n */\n constructor(\n swapInfo: SwapInfo,\n private readonly kind: SwapType,\n private readonly chainId: number\n ) {\n this.swapInfo = decorateSorSwapInfo(swapInfo, kind);\n this.relayer = relayerResolver(\n this.swapInfo.tokenIn,\n this.swapInfo.tokenOut,\n this.chainId\n );\n }\n\n setFunds(sender: string, recipient?: string): void {\n this.funds = {\n sender,\n recipient: recipient || sender,\n fromInternalBalance: false,\n toInternalBalance: false,\n };\n }\n\n /**\n * @param deadline block timestamp\n */\n setDeadline(deadline: string): void {\n this.deadline = deadline;\n }\n\n /**\n * Given IN it's the minimum amount we are willing to accept.\n * Given OUT it's the fixed amount defined as output.\n */\n minAmountOut(maxSlippage: number): BigNumber {\n return this.kind === SwapType.SwapExactIn\n ? this.swapInfo.amountOutForLimits.min(maxSlippage)\n : this.swapInfo.amountOutForLimits.amount;\n }\n\n /**\n * Given IN it's the fixed amount we define as input.\n * Given OUT it's the maximum amount we are willing to pay for the request.\n */\n maxAmountIn(maxSlippage: number): BigNumber {\n return this.kind === SwapType.SwapExactOut\n ? this.swapInfo.amountInForLimits.max(maxSlippage)\n : this.swapInfo.amountInForLimits.amount;\n }\n\n /**\n * Calculates limits for token amount.\n * Maximum number of tokens to send is a positive number\n * Minimum amount of tokens to receive is a negative number\n * https://dev.balancer.fi/guides/swaps/batch-swaps\n * https://dev.balancer.fi/resources/swaps/batch-swaps#multi-hop-examples\n *\n * For batchSwap:\n * An array of of the maximum net amounts of each asset which can be taken to perform the swap.\n * Should the total trade require more than limits[i] tokens to be taken from sender for any i\n * then the transaction shall fail.\n *\n * @param maxSlippage [bps], eg: 1 === 0.01%, 100 === 1%\n */\n setLimits(maxSlippage: number): void {\n // TODO: This implementation handles only a single input. We might want to extend it for multiple token inputs\n this.limits = this.swapInfo.tokenAddresses\n .map((token) => {\n let amount = BigNumber.from(0);\n if (token === this.swapInfo.tokenInForSwaps) {\n amount = this.maxAmountIn(maxSlippage);\n }\n if (token === this.swapInfo.tokenOutFromSwaps) {\n amount = this.minAmountOut(maxSlippage).mul(-1);\n }\n return amount;\n })\n .map((limit) => limit.toString().split('.')[0]);\n }\n\n attributes(): BatchSwap {\n // TODO: Raise errors when some parameters are missing\n if (!this.funds || !this.limits || !this.deadline) {\n throw new Error('Uninitialized arguments');\n }\n\n let attrs: BatchSwap = {\n kind: this.kind,\n swaps: this.swapInfo.swaps,\n assets: this.swapInfo.tokenAddresses,\n funds: this.funds,\n limits: this.limits,\n deadline: this.deadline,\n };\n\n const fragment = this.fragment();\n\n // TODO: Call this logic from a relayer module maybe? Do we actually need to do that?\n // additional parameters on a contract:\n // https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/standalone-utils/contracts/relayer/VaultActions.sol#L67\n if (fragment[0].inputs && fragment[0].inputs?.length > 6) {\n attrs = {\n ...attrs,\n value: '0',\n outputReferences: [],\n };\n }\n\n return attrs;\n }\n\n data(): string {\n const contractInterface = new Interface(this.fragment());\n\n return contractInterface.encodeFunctionData(\n 'batchSwap',\n Object.values(this.attributes())\n );\n }\n\n value(maxSlippage: number): BigNumber {\n let amount = BigNumber.from(0);\n if (this.swapInfo.tokenIn === AddressZero)\n amount = this.maxAmountIn(maxSlippage);\n return amount;\n }\n\n to(): string {\n return this.relayer.address;\n }\n\n private fragment(): JsonFragment[] {\n return swapFragment(this.relayer).filter(\n (f) => f.name === this.functionName\n );\n }\n}\n\nexport { BatchSwapBuilder };\n","import { SOR, SubgraphPoolBase, SwapInfo, SwapTypes } from '@balancer-labs/sor';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { Vault } from '@/contracts/Vault';\nimport {\n BatchSwap,\n QuerySimpleFlashSwapParameters,\n QuerySimpleFlashSwapResponse,\n SimpleFlashSwapParameters,\n FindRouteParameters,\n BuildTransactionParameters,\n SwapAttributes,\n SwapType,\n TokenAmounts,\n SwapsOptions,\n} from './types';\nimport { queryBatchSwap, getSorSwapInfo } from './queryBatchSwap';\nimport { balancerVault } from '@/lib/constants/config';\nimport { getLimitsForSlippage } from './helpers';\nimport { BalancerSdkConfig } from '@/types';\nimport { SwapInput } from './types';\nimport { Sor } from '@/modules/sor/sor.module';\nimport {\n convertSimpleFlashSwapToBatchSwapParameters,\n querySimpleFlashSwap,\n} from './flashSwap';\nimport {\n SingleSwapBuilder,\n BatchSwapBuilder,\n} from '@/modules/swaps/swap_builder';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport { GraphQLArgs } from '@/lib/graphql';\n\nconst buildRouteDefaultOptions = {\n maxPools: 4,\n gasPrice: '1',\n deadline: '999999999999999999',\n maxSlippage: 10, // in bspt, eg: 10 = 0.1%\n};\n\nexport class Swaps {\n readonly sor: SOR;\n chainId: number;\n vaultContract: Vault;\n\n // TODO: sorOrConfig - let's make it more predictable and always pass configuration explicitly\n constructor(sorOrConfig: SOR | BalancerSdkConfig) {\n if (sorOrConfig instanceof SOR) {\n this.sor = sorOrConfig;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.chainId = (this.sor.provider)['_network']['chainId'];\n } else {\n this.sor = new Sor(sorOrConfig);\n if (typeof sorOrConfig.network === 'number')\n this.chainId = sorOrConfig.network as number;\n else this.chainId = sorOrConfig.network.chainId;\n }\n\n this.vaultContract = Vault__factory.connect(\n balancerVault,\n this.sor.provider\n );\n }\n\n static getLimitsForSlippage(\n tokensIn: string[],\n tokensOut: string[],\n swapType: SwapType,\n deltas: string[],\n assets: string[],\n slippage: string\n ): string[] {\n // TO DO - Check best way to do this?\n const limits = getLimitsForSlippage(\n tokensIn,\n tokensOut,\n swapType,\n deltas,\n assets,\n slippage\n );\n\n return limits.map((l) => l.toString());\n }\n\n /**\n * Uses SOR to find optimal route for a trading pair and amount\n *\n * @param FindRouteParameters\n * @param FindRouteParameters.tokenIn Address\n * @param FindRouteParameters.tokenOut Address\n * @param FindRouteParameters.amount BigNumber with a trade amount\n * @param FindRouteParameters.gasPrice BigNumber current gas price\n * @param FindRouteParameters.maxPools number of pool included in path, default 4\n * @returns Best trade route information\n */\n async findRouteGivenIn({\n tokenIn,\n tokenOut,\n amount,\n gasPrice,\n maxPools = 4,\n }: FindRouteParameters): Promise {\n return this.sor.getSwaps(tokenIn, tokenOut, SwapTypes.SwapExactIn, amount, {\n gasPrice,\n maxPools,\n });\n }\n\n /**\n * Uses SOR to find optimal route for a trading pair and amount\n *\n * @param FindRouteParameters\n * @param FindRouteParameters.tokenIn Address\n * @param FindRouteParameters.tokenOut Address\n * @param FindRouteParameters.amount BigNumber with a trade amount\n * @param FindRouteParameters.gasPrice BigNumber current gas price\n * @param FindRouteParameters.maxPools number of pool included in path, default 4\n * @returns Best trade route information\n */\n async findRouteGivenOut({\n tokenIn,\n tokenOut,\n amount,\n gasPrice,\n maxPools = 4,\n }: FindRouteParameters): Promise {\n return this.sor.getSwaps(\n tokenIn,\n tokenOut,\n SwapTypes.SwapExactOut,\n amount,\n {\n gasPrice,\n maxPools,\n }\n );\n }\n\n /**\n * Uses SOR to find optimal route for a trading pair and amount\n *\n * @param BuildTransactionParameters\n * @param BuildTransactionParameters.userAddress Address\n * @param BuildTransactionParameters.swapInfo result of route finding\n * @param BuildTransactionParameters.kind 0 - givenIn, 1 - givenOut\n * @param BuildTransactionParameters.deadline block linux timestamp as string\n * @param BuildTransactionParameters.maxSlippage [bps], eg: 1 === 0.01%, 100 === 1%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildSwap({\n userAddress,\n recipient,\n swapInfo,\n kind,\n deadline,\n maxSlippage,\n }: BuildTransactionParameters): SwapAttributes {\n if (!this.chainId) throw 'Missing network configuration';\n\n // one vs batch (gas cost optimisation when using single swap)\n const builder =\n swapInfo.swaps.length > 1\n ? new BatchSwapBuilder(swapInfo, kind, this.chainId)\n : new SingleSwapBuilder(swapInfo, kind, this.chainId);\n builder.setFunds(userAddress, recipient);\n builder.setDeadline(deadline);\n builder.setLimits(maxSlippage);\n\n const to = builder.to();\n const { functionName } = builder;\n const attributes = builder.attributes();\n const data = builder.data();\n const value = builder.value(maxSlippage);\n\n return { to, functionName, attributes, data, value };\n }\n\n /**\n * Uses SOR to find optimal route for a trading pair and amount\n * and builds a transaction request\n *\n * @param sender Sender of the swap\n * @param recipient Reciever of the swap\n * @param tokenIn Address of tokenIn\n * @param tokenOut Address of tokenOut\n * @param amount Amount of tokenIn to swap as a string with 18 decimals precision\n * @param options\n * @param options.maxPools number of pool included in path\n * @param options.gasPrice BigNumber current gas price\n * @param options.deadline BigNumber block timestamp\n * @param options.maxSlippage [bps], eg: 1 === 0.01%, 100 === 1%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n async buildRouteExactIn(\n sender: string,\n recipient: string,\n tokenIn: string,\n tokenOut: string,\n amount: string,\n options: SwapsOptions = buildRouteDefaultOptions\n ): Promise {\n const opts = {\n ...buildRouteDefaultOptions,\n ...options,\n };\n\n const swapInfo = await this.findRouteGivenIn({\n tokenIn,\n tokenOut,\n amount: BigNumber.from(amount),\n gasPrice: BigNumber.from(opts.gasPrice),\n maxPools: opts.maxPools,\n });\n\n const tx = this.buildSwap({\n userAddress: sender, // sender account\n recipient, // recipient account\n swapInfo, // result from the previous step\n kind: SwapType.SwapExactIn, // or SwapExactOut\n deadline: opts.deadline, // BigNumber block timestamp\n maxSlippage: opts.maxSlippage, // [bps], eg: 1 == 0.01%, 100 == 1%\n });\n\n // TODO: add query support\n // query will be a function that returns the deltas for the swap in { [address: string]: string } format\n // const query = this.queryBatchSwap(tx);\n\n return tx;\n }\n\n /**\n * Encode batchSwap in an ABI byte string\n *\n * [See method for a batchSwap](https://dev.balancer.fi/references/contracts/apis/the-vault#batch-swaps).\n *\n * _NB: This method doesn't execute a batchSwap -- it returns an [ABI byte string](https://docs.soliditylang.org/en/latest/abi-spec.html)\n * containing the data of the function call on a contract, which can then be sent to the network to be executed.\n * (ex. [sendTransaction](https://web3js.readthedocs.io/en/v1.2.11/web3-eth.html#sendtransaction)).\n *\n * @param {BatchSwap} batchSwap - BatchSwap information used for query.\n * @param {SwapType} batchSwap.kind - either exactIn or exactOut\n * @param {BatchSwapSteps[]} batchSwap.swaps - sequence of swaps\n * @param {string[]} batchSwap.assets - array contains the addresses of all assets involved in the swaps\n * @param {FundManagement} batchSwap.funds - object containing information about where funds should be taken/sent\n * @param {number[]} batchSwap.limits - limits for each token involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the minimum amount of tokens to receive (by passing a negative value) is specified\n * @param {string} batchSwap.deadline - time (in Unix timestamp) after which it will no longer attempt to make a trade\n * @returns {string} encodedBatchSwapData - Returns an ABI byte string containing the data of the function call on a contract\n */\n static encodeBatchSwap(batchSwap: BatchSwap): string {\n const vaultInterface = Vault__factory.createInterface();\n\n return vaultInterface.encodeFunctionData('batchSwap', [\n batchSwap.kind,\n batchSwap.swaps,\n batchSwap.assets,\n batchSwap.funds,\n batchSwap.limits,\n batchSwap.deadline,\n ]);\n }\n\n /**\n * Encode simple flash swap into a ABI byte string\n *\n * A \"simple\" flash swap is an arbitrage executed with only two tokens and two pools,\n * swapping in the first pool and then back in the second pool for a profit. For more\n * complex flash swaps, you will have to use the batch swap method.\n *\n * Learn more: A [Flash Swap](https://dev.balancer.fi/resources/swaps/flash-swaps).\n *\n * @param {SimpleFlashSwapParameters} params - BatchSwap information used for query.\n * @param {string} params.flashLoanAmount - initial input amount for the flash loan (first asset)\n * @param {string[]} params.poolIds - array of Balancer pool ids\n * @param {string[]} params.assets - array of token addresses\n * @param {string} params.walletAddress - array of token addresses\n * @returns {string} encodedBatchSwapData - Returns an ABI byte string containing the data of the function call on a contract\n */\n static encodeSimpleFlashSwap(params: SimpleFlashSwapParameters): string {\n return this.encodeBatchSwap(\n convertSimpleFlashSwapToBatchSwapParameters(params)\n );\n }\n\n /**\n * fetchPools saves updated pools data to SOR internal onChainBalanceCache.\n *\n * @returns Boolean indicating whether pools data was fetched correctly (true) or not (false).\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async fetchPools(queryArgs?: GraphQLArgs): Promise {\n return this.sor.fetchPools(queryArgs);\n }\n\n public getPools(): SubgraphPoolBase[] {\n return this.sor.getPools();\n }\n\n /**\n * queryBatchSwap simulates a call to `batchSwap`, returning an array of Vault asset deltas.\n * @param batchSwap - BatchSwap information used for query.\n * @param {SwapType} batchSwap.kind - either exactIn or exactOut.\n * @param {BatchSwapStep[]} batchSwap.swaps - sequence of swaps.\n * @param {string[]} batchSwap.assets - array contains the addresses of all assets involved in the swaps.\n * @returns {Promise} Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\n * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\n * the same index in the `assets` array.\n */\n async queryBatchSwap(\n batchSwap: Pick\n ): Promise {\n return await queryBatchSwap(\n this.vaultContract,\n batchSwap.kind,\n batchSwap.swaps,\n batchSwap.assets\n );\n }\n\n /**\n * Simple interface to test if a simple flash swap is valid and see potential profits.\n *\n * A \"simple\" flash swap is an arbitrage executed with only two tokens and two pools,\n * swapping in the first pool and then back in the second pool for a profit. For more\n * complex flash swaps, you will have to use the batch swap method.\n *\n * Learn more: A [Flash Swap](https://dev.balancer.fi/resources/swaps/flash-swaps).\n *\n * _NB: This method doesn't execute a flashSwap\n *\n * @param {SimpleFlashSwapParameters} params - BatchSwap information used for query.\n * @param {string} params.flashLoanAmount - initial input amount for the flash loan (first asset)\n * @param {string[]} params.poolIds - array of Balancer pool ids\n * @param {string[]} params.assets - array of token addresses\n * @returns {Promise<{profits: Record, isProfitable: boolean}>} Returns an ethersjs transaction response\n */\n async querySimpleFlashSwap(\n params: Omit\n ): Promise {\n return await querySimpleFlashSwap({\n ...params,\n vaultContract: this.vaultContract,\n });\n }\n\n /**\n * Use SOR to get swapInfo for tokenIn<>tokenOut.\n * @param {SwapInput} swapInput - Swap information used for querying using SOR.\n * @param {string} swapInput.tokenIn - Addresse of asset in.\n * @param {string} swapInput.tokenOut - Addresse of asset out.\n * @param {SwapType} swapInput.swapType - Type of Swap, ExactIn/Out.\n * @param {string} swapInput.amount - Amount used in swap.\n * @returns {Promise} SOR swap info.\n */\n async getSorSwap(swapInput: SwapInput): Promise {\n return await getSorSwapInfo(\n swapInput.tokenIn,\n swapInput.tokenOut,\n swapInput.swapType,\n swapInput.amount,\n this.sor\n );\n }\n\n async queryExactIn(swap: SwapInfo): Promise {\n const deltas = await this.query(swap, SwapType.SwapExactIn);\n return this.assetDeltas(deltas.map(String), swap.tokenAddresses);\n }\n\n async queryExactOut(swap: SwapInfo): Promise {\n const deltas = await this.query(swap, SwapType.SwapExactOut);\n return this.assetDeltas(deltas.map(String), swap.tokenAddresses);\n }\n\n private query(swap: SwapInfo, kind: SwapType): Promise {\n const { swaps, tokenAddresses: assets } = swap;\n\n const funds = {\n sender: AddressZero,\n recipient: AddressZero,\n fromInternalBalance: false,\n toInternalBalance: false,\n };\n\n return this.vaultContract.callStatic.queryBatchSwap(\n kind,\n swaps,\n assets,\n funds\n );\n }\n\n private assetDeltas(deltas: string[], assets: string[]): TokenAmounts {\n return Object.fromEntries(deltas.map((delta, idx) => [assets[idx], delta]));\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\n\nimport { ExitPoolRequest, JoinPoolRequest } from '@/types';\nimport { SwapType, BatchSwapStep, FundManagement } from '@/modules/swaps/types';\n\nexport enum PoolKind {\n WEIGHTED = 0,\n LEGACY_STABLE,\n COMPOSABLE_STABLE,\n COMPOSABLE_STABLE_V2,\n}\n\nexport type OutputReference = {\n index: number;\n key: BigNumber;\n};\n\nexport interface EncodeBatchSwapInput {\n swapType: SwapType;\n swaps: BatchSwapStep[];\n assets: string[];\n funds: FundManagement;\n limits: string[];\n deadline: BigNumberish;\n value: BigNumberish;\n outputReferences: OutputReference[];\n}\n\nexport interface EncodeExitPoolInput {\n poolId: string;\n poolKind: number;\n sender: string;\n recipient: string;\n outputReferences: OutputReference[];\n exitPoolRequest: ExitPoolRequest;\n}\n\nexport interface EncodeJoinPoolInput {\n poolId: string;\n kind: number;\n sender: string;\n recipient: string;\n joinPoolRequest: JoinPoolRequest;\n value: BigNumberish;\n outputReference: string;\n}\n\nexport interface EncodeWrapAaveDynamicTokenInput {\n staticToken: string;\n sender: string;\n recipient: string;\n amount: BigNumberish;\n fromUnderlying: boolean;\n outputReference: BigNumberish;\n}\n\nexport interface EncodeUnwrapAaveStaticTokenInput {\n staticToken: string;\n sender: string;\n recipient: string;\n amount: BigNumberish;\n toUnderlying: boolean;\n outputReference: BigNumberish;\n}\n\nexport interface EncodeUnwrapInput {\n wrappedToken: string;\n sender: string;\n recipient: string;\n amount: BigNumberish;\n outputReference: BigNumberish;\n}\n\nexport interface EncodeUnwrapWstETHInput {\n sender: string;\n recipient: string;\n amount: BigNumberish;\n outputReference: BigNumberish;\n}\n\nexport type ExitPoolData = ExitPoolRequest & EncodeExitPoolInput;\nexport type JoinPoolData = JoinPoolRequest & EncodeJoinPoolInput;\n","import { JsonRpcSigner } from '@ethersproject/providers';\nimport { BigNumberish, BigNumber } from '@ethersproject/bignumber';\nimport { MaxUint256 } from '@ethersproject/constants';\nimport { BatchRelayerLibrary__factory } from '@/contracts';\nimport { IVault, Vault } from '@/contracts/Vault';\nimport {\n EncodeBatchSwapInput,\n EncodeExitPoolInput,\n EncodeJoinPoolInput,\n EncodeUnwrapAaveStaticTokenInput,\n EncodeUnwrapInput,\n EncodeUnwrapWstETHInput,\n EncodeWrapAaveDynamicTokenInput,\n ExitPoolData,\n JoinPoolData,\n} from './types';\nimport { ExitPoolRequest, JoinPoolRequest } from '@/types';\nimport { Swap } from '../swaps/types';\nimport { RelayerAuthorization } from '@/lib/utils';\nimport FundManagementStruct = IVault.FundManagementStruct;\nimport SingleSwapStruct = IVault.SingleSwapStruct;\n\nexport * from './types';\n\nconst relayerLibrary = BatchRelayerLibrary__factory.createInterface();\n\nexport class Relayer {\n static CHAINED_REFERENCE_TEMP_PREFIX = 'ba10'; // Temporary reference: it is deleted after a read.\n static CHAINED_REFERENCE_READONLY_PREFIX = 'ba11'; // Read-only reference: it is not deleted after a read.\n\n static encodeApproveVault(tokenAddress: string, maxAmount: string): string {\n return relayerLibrary.encodeFunctionData('approveVault', [\n tokenAddress,\n maxAmount,\n ]);\n }\n\n static encodeSetRelayerApproval(\n relayerAdress: string,\n approved: boolean,\n authorisation: string\n ): string {\n return relayerLibrary.encodeFunctionData('setRelayerApproval', [\n relayerAdress,\n approved,\n authorisation,\n ]);\n }\n\n static encodeGaugeWithdraw(\n gaugeAddress: string,\n sender: string,\n recipient: string,\n amount: string\n ): string {\n return relayerLibrary.encodeFunctionData('gaugeWithdraw', [\n gaugeAddress,\n sender,\n recipient,\n amount,\n ]);\n }\n\n static encodeGaugeDeposit(\n gaugeAddress: string,\n sender: string,\n recipient: string,\n amount: string\n ): string {\n return relayerLibrary.encodeFunctionData('gaugeDeposit', [\n gaugeAddress,\n sender,\n recipient,\n amount,\n ]);\n }\n\n static encodeSwap(params: Swap): string {\n return relayerLibrary.encodeFunctionData('swap', [\n params.request as SingleSwapStruct,\n params.funds as FundManagementStruct,\n params.limit,\n params.deadline as BigNumberish,\n params.value as BigNumberish,\n params.outputReference as BigNumberish,\n ]);\n }\n\n static encodeBatchSwap(params: EncodeBatchSwapInput): string {\n return relayerLibrary.encodeFunctionData('batchSwap', [\n params.swapType,\n params.swaps,\n params.assets,\n params.funds,\n params.limits,\n params.deadline,\n params.value,\n params.outputReferences,\n ]);\n }\n\n static encodeExitPool(params: EncodeExitPoolInput): string {\n return relayerLibrary.encodeFunctionData('exitPool', [\n params.poolId,\n params.poolKind,\n params.sender,\n params.recipient,\n params.exitPoolRequest,\n params.outputReferences,\n ]);\n }\n\n static encodeJoinPool(params: EncodeJoinPoolInput): string {\n return relayerLibrary.encodeFunctionData('joinPool', [\n params.poolId,\n params.kind,\n params.sender,\n params.recipient,\n params.joinPoolRequest,\n params.value,\n params.outputReference,\n ]);\n }\n\n static encodeWrapAaveDynamicToken(\n params: EncodeWrapAaveDynamicTokenInput\n ): string {\n return relayerLibrary.encodeFunctionData('wrapAaveDynamicToken', [\n params.staticToken,\n params.sender,\n params.recipient,\n params.amount,\n params.fromUnderlying,\n params.outputReference,\n ]);\n }\n\n static encodeUnwrapAaveStaticToken(\n params: EncodeUnwrapAaveStaticTokenInput\n ): string {\n return relayerLibrary.encodeFunctionData('unwrapAaveStaticToken', [\n params.staticToken,\n params.sender,\n params.recipient,\n params.amount,\n params.toUnderlying,\n params.outputReference,\n ]);\n }\n\n static encodeUnwrapWstETH(params: EncodeUnwrapWstETHInput): string {\n return relayerLibrary.encodeFunctionData('unwrapWstETH', [\n params.sender,\n params.recipient,\n params.amount,\n params.outputReference,\n ]);\n }\n\n static encodeUnwrap(\n params: EncodeUnwrapInput,\n linearPoolType: string\n ): string {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let unwrapType: any;\n\n /**\n * Other unwrap types available on BatchRelayerLibrary that does not seem to\n * have a respective Linear pool type in the SDK:\n * - unwrapUnbuttonToken\n * - unwrapWstETH\n */\n\n switch (linearPoolType) {\n case 'AaveLinear':\n return this.encodeUnwrapAaveStaticToken({\n staticToken: params.wrappedToken,\n sender: params.sender,\n recipient: params.recipient,\n amount: params.amount,\n toUnderlying: true,\n outputReference: params.outputReference,\n });\n case 'BeefyLinear':\n case 'ERC4626Linear':\n unwrapType = 'unwrapERC4626';\n break;\n case 'EulerLinear':\n unwrapType = 'unwrapEuler';\n break;\n case 'GearboxLinear':\n unwrapType = 'unwrapGearbox';\n break;\n case 'ReaperLinear':\n unwrapType = 'unwrapReaperVaultToken';\n break;\n case 'TetuLinear':\n unwrapType = 'unwrapTetu';\n break;\n case 'YearnLinear':\n unwrapType = 'unwrapYearn';\n break;\n case 'MidasLinear':\n unwrapType = 'unwrapCompoundV2';\n break;\n case 'SiloLinear':\n unwrapType = 'unwrapShareToken';\n break;\n default:\n throw new Error(\n 'Unwrapping not supported for this pool type: ' + linearPoolType\n );\n }\n\n return relayerLibrary.encodeFunctionData(unwrapType, [\n params.wrappedToken,\n params.sender,\n params.recipient,\n params.amount,\n params.outputReference,\n ]);\n }\n\n static encodePeekChainedReferenceValue(reference: BigNumberish): string {\n return relayerLibrary.encodeFunctionData('peekChainedReferenceValue', [\n reference,\n ]);\n }\n\n static toChainedReference(key: BigNumberish, isTemporary = true): BigNumber {\n const prefix = isTemporary\n ? Relayer.CHAINED_REFERENCE_TEMP_PREFIX\n : Relayer.CHAINED_REFERENCE_READONLY_PREFIX;\n // The full padded prefix is 66 characters long, with 64 hex characters and the 0x prefix.\n const paddedPrefix = `0x${prefix}${'0'.repeat(64 - prefix.length)}`;\n return BigNumber.from(paddedPrefix).add(key);\n }\n\n static fromChainedReference(ref: string, isTemporary = true): BigNumber {\n const prefix = isTemporary\n ? Relayer.CHAINED_REFERENCE_TEMP_PREFIX\n : Relayer.CHAINED_REFERENCE_READONLY_PREFIX;\n // The full padded prefix is 66 characters long, with 64 hex characters and the 0x prefix.\n const paddedPrefix = `0x${prefix}${'0'.repeat(64 - prefix.length)}`;\n return BigNumber.from(ref).sub(BigNumber.from(paddedPrefix));\n }\n\n /**\n * Returns true if `amount` is not actually an amount, but rather a chained reference.\n */\n static isChainedReference(amount: string): boolean {\n const amountBn = BigNumber.from(amount);\n const mask = BigNumber.from(\n '0xfff0000000000000000000000000000000000000000000000000000000000000'\n );\n const readonly =\n '0xba10000000000000000000000000000000000000000000000000000000000000';\n const check = amountBn.toBigInt() & mask.toBigInt();\n return readonly === BigNumber.from(check)._hex.toString();\n }\n\n static formatExitPoolInput(params: ExitPoolData): EncodeExitPoolInput {\n const {\n assets,\n minAmountsOut,\n userData,\n toInternalBalance,\n poolId,\n poolKind,\n sender,\n recipient,\n outputReferences,\n } = params;\n\n const exitPoolRequest: ExitPoolRequest = {\n assets,\n minAmountsOut,\n userData,\n toInternalBalance,\n };\n\n const exitPoolInput: EncodeExitPoolInput = {\n poolId,\n poolKind,\n sender,\n recipient,\n outputReferences,\n exitPoolRequest,\n };\n return exitPoolInput;\n }\n\n static formatJoinPoolInput(params: JoinPoolData): EncodeJoinPoolInput {\n const {\n assets,\n maxAmountsIn,\n userData,\n fromInternalBalance,\n poolId,\n kind,\n sender,\n recipient,\n value,\n outputReference,\n } = params;\n\n const joinPoolRequest: JoinPoolRequest = {\n assets,\n maxAmountsIn,\n userData,\n fromInternalBalance,\n };\n\n const joinPoolInput: EncodeJoinPoolInput = {\n poolId,\n kind,\n sender,\n recipient,\n value,\n outputReference,\n joinPoolRequest,\n };\n\n return joinPoolInput;\n }\n\n static signRelayerApproval = async (\n relayerAddress: string,\n signerAddress: string,\n signer: JsonRpcSigner,\n vault: Vault\n ): Promise => {\n const approval = vault.interface.encodeFunctionData('setRelayerApproval', [\n signerAddress,\n relayerAddress,\n true,\n ]);\n\n const signature =\n await RelayerAuthorization.signSetRelayerApprovalAuthorization(\n vault,\n signer,\n relayerAddress,\n approval\n );\n\n const calldata = RelayerAuthorization.encodeCalldataAuthorization(\n '0x',\n MaxUint256,\n signature\n );\n\n return calldata;\n };\n}\n","import { BalancerSdkConfig } from '@/types';\nimport { GraphQLClient } from 'graphql-request';\nimport { getNetworkConfig } from '../sdk.helpers';\nimport { getSdk } from './generated/balancer-subgraph-types';\nimport { SubgraphClient } from './subgraph';\n\nexport class Subgraph {\n public readonly url: string;\n public readonly client: SubgraphClient;\n\n constructor(config: BalancerSdkConfig) {\n this.url = getNetworkConfig(config).urls.subgraph;\n this.client = this.initClient();\n }\n\n private initClient(): SubgraphClient {\n const client = new GraphQLClient(this.url);\n return getSdk(client);\n }\n}\n","import { Swaps } from '@/modules/swaps/swaps.module';\nimport { BalancerSdkConfig } from '@/types';\nimport {\n SubgraphPoolBase,\n ZERO,\n parseToPoolsDict,\n getSpotPriceAfterSwapForPath,\n} from '@balancer-labs/sor';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\n\nexport class Pricing {\n private readonly swaps: Swaps;\n\n constructor(config: BalancerSdkConfig, swaps?: Swaps) {\n if (swaps) {\n this.swaps = swaps;\n } else {\n this.swaps = new Swaps(config);\n }\n }\n\n /**\n * Retrieves pools using poolDataService.\n * @returns {boolean} Boolean indicating whether pools data was fetched correctly (true) or not (false).\n */\n async fetchPools(): Promise {\n return this.swaps.fetchPools();\n }\n\n /**\n * Get currently saved pools list (fetched using fetchPools()).\n * @returns {SubgraphPoolBase[]} pools list.\n */\n public getPools(): SubgraphPoolBase[] {\n return this.swaps.getPools();\n }\n\n /**\n * Calculates Spot Price for a token pair - finds most liquid path and uses this as reference SP.\n * @param { string } tokenIn Token in address.\n * @param { string } tokenOut Token out address.\n * @param { SubgraphPoolBase[] } pools Optional - Pool data. Will be fetched via dataProvider if not supplied.\n * @returns { string } Spot price.\n */\n async getSpotPrice(\n tokenIn: string,\n tokenOut: string,\n pools: SubgraphPoolBase[] = []\n ): Promise {\n // If pools list isn't supplied fetch it from swaps data provider\n if (pools.length === 0) {\n await this.fetchPools();\n pools = this.getPools();\n }\n\n // We find the path for the pair with the highest liquidity and use this as the ref SP\n const poolsDict = parseToPoolsDict(pools, 0);\n // This creates all paths for tokenIn>Out ordered by liquidity\n const paths = this.swaps.sor.routeProposer.getCandidatePathsFromDict(\n tokenIn,\n tokenOut,\n 0,\n poolsDict,\n 4\n );\n\n if (paths.length === 0)\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_PAIR);\n return getSpotPriceAfterSwapForPath(paths[0], 0, ZERO).toString();\n }\n}\n","import { Contract } from '@ethersproject/contracts';\nimport { Provider } from '@ethersproject/providers';\nimport { Signer } from '@ethersproject/abstract-signer';\n\nconst abi = [\n 'function getPoolId() view returns (bytes32)',\n 'function getSwapFeePercentage() view returns (uint256)',\n 'function getProtocolFeesCollector() view returns (address)',\n 'function inRecoveryMode() view returns (bool)',\n];\n\nexport const BasePool = (\n address: string,\n signerOrProvider: Signer | Provider\n): Contract => new Contract(address, abi, signerOrProvider);\n","import { set } from 'lodash';\nimport { Fragment, JsonFragment, Interface, Result } from '@ethersproject/abi';\nimport { CallOverrides } from '@ethersproject/contracts';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { Multicall } from '@/contracts';\n\nexport class Multicaller {\n private interface: Interface;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private calls: [string, string, any][] = [];\n private paths: string[] = [];\n\n constructor(\n private multicall: Multicall,\n abi: string | Array,\n private options: CallOverrides = {}\n ) {\n this.interface = new Interface(abi);\n }\n\n call(\n path: string,\n address: string,\n functionName: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n params?: any[]\n ): Multicaller {\n this.calls.push([address, functionName, params]);\n this.paths.push(path);\n return this;\n }\n\n async execute(\n from: Record = {}\n ): Promise> {\n const obj = from;\n const results = await this.executeMulticall();\n results.forEach((result, i) =>\n set(obj, this.paths[i], result.length > 1 ? result : result[0])\n );\n this.calls = [];\n this.paths = [];\n return obj;\n }\n\n private async executeMulticall(): Promise {\n const [, res] = await this.multicall.callStatic.aggregate(\n this.calls.map(([address, functionName, params]) => ({\n target: address,\n callData: this.interface.encodeFunctionData(functionName, params),\n })),\n this.options\n );\n\n return res.map((result: BytesLike, i: number) =>\n this.interface.decodeFunctionResult(this.calls[i][1], result)\n );\n }\n}\n","export const oneSecondInMs = 1000;\nexport const twentyFourHoursInSecs = 24 * 60 * 60;\n\nexport function toJsTimestamp(unixTimestamp: number): number {\n return unixTimestamp * oneSecondInMs;\n}\n\nexport function toUnixTimestamp(jsTimestamp: number): number {\n return Math.round(jsTimestamp / oneSecondInMs);\n}\n\nexport function isLessThan24Hours(incomingDateInSec: number): boolean {\n const now = Math.round(Date.now() / 1000);\n const difference = now - incomingDateInSec;\n\n return difference < twentyFourHoursInSecs;\n}\n","import { JsonFragment } from '@ethersproject/abi';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { formatUnits } from '@ethersproject/units';\nimport { Multicall, VeBal__factory } from '@/contracts';\nimport { Multicaller } from '@/lib/utils/multiCaller';\nimport { toJsTimestamp } from '@/lib/utils/time';\n\nexport type VeBalLockInfo = {\n lockedEndDate: number;\n lockedAmount: string;\n totalSupply: string;\n epoch: string;\n hasExistingLock: boolean;\n isExpired: boolean;\n};\n\ntype VeBalLockInfoResult = {\n locked: BigNumber[];\n epoch: BigNumber;\n totalSupply: BigNumber;\n};\n\nexport class VeBal {\n constructor(private veBalAddress: string, private multicall: Multicall) {}\n\n public async getLockInfo(\n account: string\n ): Promise {\n if (!this.veBalAddress) throw new Error('veBal address must be defined');\n\n const multicaller = new Multicaller(this.multicall, [\n ...(VeBal__factory.abi as readonly JsonFragment[]),\n ]);\n\n multicaller.call('locked', this.veBalAddress, 'locked', [account]);\n multicaller.call('epoch', this.veBalAddress, 'epoch');\n multicaller.call('totalSupply', this.veBalAddress, 'totalSupply()');\n\n const result = await multicaller.execute();\n\n return this.formatLockInfo(result);\n }\n\n public formatLockInfo(lockInfo: VeBalLockInfoResult): VeBalLockInfo {\n const [lockedAmount, lockedEndDate] = lockInfo.locked;\n\n const hasExistingLock = lockedAmount.gt(0);\n const lockedEndDateNormalised = toJsTimestamp(lockedEndDate.toNumber());\n const isExpired = hasExistingLock && Date.now() > lockedEndDateNormalised;\n\n return {\n lockedEndDate: lockedEndDateNormalised,\n lockedAmount: formatUnits(lockedAmount),\n totalSupply: formatUnits(lockInfo.totalSupply),\n epoch: formatUnits(lockInfo.epoch, 0),\n hasExistingLock,\n isExpired,\n };\n }\n}\n","import { Provider } from '@ethersproject/providers';\nimport { Contract } from '@ethersproject/contracts';\nimport { formatUnits } from '@ethersproject/units';\n\nimport { VeDelegationProxy__factory } from '@/contracts';\nimport { ContractAddresses } from '@/types';\n\nexport class VeBalProxy {\n instance: Contract;\n\n constructor(addresses: ContractAddresses, provider: Provider) {\n if (!addresses.veBalProxy)\n throw new Error('veBalProxy address must be defined');\n this.instance = VeDelegationProxy__factory.connect(\n addresses.veBalProxy,\n provider\n );\n }\n\n async getAdjustedBalance(account: string): Promise {\n const balance = await this.instance.adjustedBalanceOf(account);\n return formatUnits(balance);\n }\n}\n","import { Contract } from '@ethersproject/contracts';\nimport { Provider } from '@ethersproject/providers';\nimport { Signer } from '@ethersproject/abstract-signer';\n\nimport { BasePool } from './implementations/base-pool';\nimport { VeBal } from './implementations/veBAL';\nimport { VeBalProxy } from './implementations/veBAL-proxy';\nimport {\n AaveLinearPoolFactory,\n AaveLinearPoolFactory__factory,\n BalancerHelpers,\n BalancerHelpers__factory,\n BalancerRelayer__factory,\n ComposableStablePoolFactory,\n ComposableStablePoolFactory__factory,\n ERC20,\n ERC20__factory,\n ERC4626LinearPoolFactory,\n ERC4626LinearPoolFactory__factory,\n EulerLinearPoolFactory,\n EulerLinearPoolFactory__factory,\n GaugeClaimHelper,\n GaugeClaimHelper__factory,\n GearboxLinearPoolFactory,\n GearboxLinearPoolFactory__factory,\n GyroConfig,\n GyroConfig__factory,\n LidoRelayer,\n LidoRelayer__factory,\n LiquidityGaugeV5__factory,\n Multicall,\n Multicall__factory,\n Vault,\n Vault__factory,\n WeightedPoolFactory,\n WeightedPoolFactory__factory,\n YearnLinearPoolFactory,\n YearnLinearPoolFactory__factory,\n} from '@/contracts';\nimport { Network } from '@/lib/constants/network';\nimport { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { ContractAddresses } from '@/types';\n\ntype ContractFactory = (\n address: string,\n signerOrProvider: Signer | Provider\n) => Contract;\n\nexport interface ContractInstances {\n aaveLinearPoolFactory?: AaveLinearPoolFactory;\n balancerHelpers: BalancerHelpers;\n BasePool: ContractFactory;\n composableStablePoolFactory?: ComposableStablePoolFactory;\n ERC20: ContractFactory;\n erc4626LinearPoolFactory?: ERC4626LinearPoolFactory;\n eulerLinearPoolFactory?: EulerLinearPoolFactory;\n gaugeClaimHelper?: GaugeClaimHelper;\n gearboxLinearPoolFactory?: GearboxLinearPoolFactory;\n gyroConfig?: GyroConfig;\n lidoRelayer?: LidoRelayer;\n liquidityGauge: ContractFactory;\n multicall: Multicall;\n relayer: Contract;\n vault: Vault;\n veBal?: VeBal;\n veBalProxy?: VeBalProxy;\n weightedPoolFactory?: WeightedPoolFactory;\n yearnLinearPoolFactory?: YearnLinearPoolFactory;\n}\n\nexport class Contracts {\n contractAddresses: ContractAddresses;\n private instances: ContractInstances;\n\n /**\n * Create instances of Balancer contracts connected to passed provider.\n * @param { Network | ContractAddresses } networkOrAddresses\n * @param { Provider } provider\n */\n constructor(\n networkOrAddresses: Network | ContractAddresses,\n provider: Provider\n ) {\n // Access addresses using passed network if available\n if (typeof networkOrAddresses === 'number') {\n this.contractAddresses =\n BALANCER_NETWORK_CONFIG[networkOrAddresses].addresses.contracts;\n } else {\n this.contractAddresses = networkOrAddresses;\n }\n\n const vault: Vault = Vault__factory.connect(\n this.contractAddresses.vault,\n provider\n );\n const balancerHelpers: BalancerHelpers = BalancerHelpers__factory.connect(\n this.contractAddresses.balancerHelpers,\n provider\n );\n let lidoRelayer: undefined | LidoRelayer;\n if (this.contractAddresses.lidoRelayer)\n lidoRelayer = LidoRelayer__factory.connect(\n this.contractAddresses.lidoRelayer,\n provider\n );\n\n const multicall: Multicall = Multicall__factory.connect(\n this.contractAddresses.multicall,\n provider\n );\n const relayer = BalancerRelayer__factory.connect(\n this.contractAddresses.balancerRelayer,\n provider\n );\n let veBal: undefined | VeBal;\n if (this.contractAddresses.veBal) {\n veBal = new VeBal(this.contractAddresses.veBal, multicall);\n }\n let veBalProxy: undefined | VeBalProxy;\n if (this.contractAddresses.veBalProxy) {\n veBalProxy = new VeBalProxy(this.contractAddresses, provider);\n }\n let gaugeClaimHelper: undefined | GaugeClaimHelper;\n if (this.contractAddresses.gaugeClaimHelper)\n gaugeClaimHelper = GaugeClaimHelper__factory.connect(\n this.contractAddresses.gaugeClaimHelper,\n provider\n );\n let composableStablePoolFactory: undefined | ComposableStablePoolFactory;\n if (this.contractAddresses.composableStablePoolFactory) {\n composableStablePoolFactory =\n ComposableStablePoolFactory__factory.connect(\n this.contractAddresses.composableStablePoolFactory,\n provider\n );\n }\n let weightedPoolFactory: undefined | WeightedPoolFactory;\n if (this.contractAddresses.weightedPoolFactory) {\n weightedPoolFactory = WeightedPoolFactory__factory.connect(\n this.contractAddresses.weightedPoolFactory,\n provider\n );\n }\n let aaveLinearPoolFactory: undefined | AaveLinearPoolFactory;\n if (this.contractAddresses.aaveLinearPoolFactory) {\n aaveLinearPoolFactory = AaveLinearPoolFactory__factory.connect(\n this.contractAddresses.aaveLinearPoolFactory,\n provider\n );\n }\n let erc4626LinearPoolFactory: undefined | ERC4626LinearPoolFactory;\n if (this.contractAddresses.erc4626LinearPoolFactory) {\n erc4626LinearPoolFactory = ERC4626LinearPoolFactory__factory.connect(\n this.contractAddresses.erc4626LinearPoolFactory,\n provider\n );\n }\n let eulerLinearPoolFactory: undefined | EulerLinearPoolFactory;\n if (this.contractAddresses.eulerLinearPoolFactory) {\n eulerLinearPoolFactory = EulerLinearPoolFactory__factory.connect(\n this.contractAddresses.eulerLinearPoolFactory,\n provider\n );\n }\n let gearboxLinearPoolFactory: undefined | GearboxLinearPoolFactory;\n if (this.contractAddresses.gearboxLinearPoolFactory) {\n gearboxLinearPoolFactory = GearboxLinearPoolFactory__factory.connect(\n this.contractAddresses.gearboxLinearPoolFactory,\n provider\n );\n }\n let yearnLinearPoolFactory: undefined | YearnLinearPoolFactory;\n if (this.contractAddresses.yearnLinearPoolFactory) {\n yearnLinearPoolFactory = YearnLinearPoolFactory__factory.connect(\n this.contractAddresses.yearnLinearPoolFactory,\n provider\n );\n }\n let gyroConfig: undefined | GyroConfig;\n if (this.contractAddresses.gyroConfigProxy) {\n gyroConfig = GyroConfig__factory.connect(\n this.contractAddresses.gyroConfigProxy,\n provider\n );\n }\n\n this.instances = {\n aaveLinearPoolFactory,\n balancerHelpers,\n BasePool: this.getBasePool,\n composableStablePoolFactory,\n ERC20: this.getErc20,\n erc4626LinearPoolFactory,\n eulerLinearPoolFactory,\n gaugeClaimHelper,\n gearboxLinearPoolFactory,\n gyroConfig,\n liquidityGauge: this.getLiquidityGauge,\n lidoRelayer,\n multicall,\n relayer,\n veBal,\n veBalProxy,\n weightedPoolFactory,\n yearnLinearPoolFactory,\n vault,\n };\n }\n\n /**\n * Expose contract instances.\n */\n get contracts(): ContractInstances {\n return this.instances;\n }\n\n /**\n * Helper to create ERC20 contract.\n * @param { string } address ERC20 address.\n * @param { Signer | Provider } signerOrProvider Signer or Provider.\n * @returns Contract.\n */\n getErc20(address: string, signerOrProvider: Signer | Provider): ERC20 {\n return ERC20__factory.connect(address, signerOrProvider);\n }\n\n /**\n * Helper to create base pool contract.\n * @param { string } address pool address.\n * @param { Signer | Provider } signerOrProvider Signer or Provider.\n * @returns Contract.\n */\n getBasePool(address: string, signerOrProvider: Signer | Provider): Contract {\n return BasePool(address, signerOrProvider);\n }\n\n /**\n * Helper to create LiquidityGauge contract.\n * @param { string } address Gauge address.\n * @param { Signer | Provider} signerOrProvider Signer or Provider.\n * @returns Contract.\n */\n getLiquidityGauge = LiquidityGaugeV5__factory.connect;\n}\n","/**\n * Calculate the Impermanent Loss for a given pool and user.\n *\n * 1. Prepare the data:\n * a. get exit price for pools' tokens\n * b. get entry price for pools' tokens\n * 2. calculate delta values for tokens in pools\n * 3. calculate and return the impermanent loss as percentage rounded to 2 decimal places.\n *\n */\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Findable, Pool, PoolToken, Price } from '@/types';\nimport { Logger } from '@/lib/utils/logger';\n\ntype Asset = {\n priceDelta: number;\n weight: number;\n};\n\ntype TokenPrices = {\n [key: string]: number;\n};\n\nexport class ImpermanentLossService {\n constructor(\n private tokenPrices: Findable,\n private tokenHistoricalPrices: Findable\n ) {}\n\n /**\n * entry point to calculate impermanent loss.\n *\n * The function will\n * - retrieve the tokens' historical value at the desired time in the future\n * - calculate the relative variation between current and historical value\n * - return the IL in percentage rounded to 2 decimal places\n *\n * @param timestamp UNIX timestamp from which the IL is desired\n * @param pool the pool\n * @returns the impermanent loss as percentage rounded to 2 decimal places\n */\n async calcImpLoss(timestamp: number, pool: Pool): Promise {\n if (timestamp * 1000 >= Date.now()) {\n console.error(\n `[ImpermanentLossService][calcImpLoss]Error: ${BalancerError.getMessage(\n BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE\n )}`\n );\n throw new BalancerError(BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE);\n }\n const assets = await this.prepareData(timestamp, pool);\n\n const poolValueDelta = this.getPoolValueDelta(assets);\n const holdValueDelta = this.getHoldValueDelta(assets);\n\n const impLoss = this.calculateImpermanentLoss(\n poolValueDelta,\n holdValueDelta\n );\n return impLoss;\n }\n\n calculateImpermanentLoss(\n poolValueDelta: number,\n holdValueDelta: number\n ): number {\n return (\n Math.floor(Math.abs(poolValueDelta / holdValueDelta - 1) * 100 * 100) /\n 100\n );\n }\n\n getPoolValueDelta(assets: Asset[]): number {\n return assets.reduce(\n (result, asset) =>\n result * Math.pow(Math.abs(asset.priceDelta + 1), asset.weight),\n 1\n );\n }\n\n getHoldValueDelta(assets: Asset[]): number {\n return assets.reduce(\n (result, asset) => result + Math.abs(asset.priceDelta + 1) * asset.weight,\n 0\n );\n }\n\n /**\n * prepare the data for calculating the impermanent loss\n *\n * @param entryTimestamp UNIX timestamp from which the IL is desired\n * @param pool the pool\n * @returns a list of pair weight/price delta for each token in the pool\n * @throws BalancerError if\n * 1. a token's price is unknown\n * 2. a token's weight is unknown\n * 3. the user has no liquidity invested in the pool\n */\n async prepareData(entryTimestamp: number, pool: Pool): Promise {\n const poolTokens = pool.tokens.filter(\n (token) => token.address !== pool.address\n );\n\n const weights = this.getWeights(poolTokens);\n\n const tokenAddresses = poolTokens.map((t) => t.address);\n\n const entryPrices = await this.getEntryPrices(\n entryTimestamp,\n tokenAddresses\n );\n const exitPrices: TokenPrices = await this.getExitPrices(poolTokens);\n\n return this.getAssets(poolTokens, exitPrices, entryPrices, weights);\n }\n\n getAssets(\n poolTokens: PoolToken[],\n exitPrices: TokenPrices,\n entryPrices: TokenPrices,\n weights: number[]\n ): Asset[] {\n return poolTokens.map((token, i) => ({\n priceDelta: this.getDelta(\n entryPrices[token.address],\n exitPrices[token.address]\n ),\n weight: weights[i],\n }));\n }\n\n getDelta(entryPrice: number, exitPrice: number): number {\n if (entryPrice === 0) {\n console.error(\n `[ImpermanentLossService][getDelta]Error: ${BalancerError.getMessage(\n BalancerErrorCode.ILLEGAL_PARAMETER\n )}: entry price is 0`\n );\n throw new BalancerError(BalancerErrorCode.ILLEGAL_PARAMETER);\n }\n return (exitPrice - entryPrice) / entryPrice;\n }\n\n /**\n * returns the list of token's weights.\n *\n * @param poolTokens the pools' tokens\n * @returns the list of token's weights\n * @throws BalancerError if a token's weight is missing\n *\n */\n getWeights(poolTokens: PoolToken[]): number[] {\n const noWeights = poolTokens.every((token) => !token.weight);\n const uniformWeight = Math.round((1 / poolTokens.length) * 100) / 100;\n const weights: number[] = noWeights\n ? poolTokens.map(() => uniformWeight) // if no weight is returned we assume the tokens are balanced uniformly in the pool\n : poolTokens.map((token) => Number(token.weight ?? 0));\n\n if (weights.some((w) => w === 0)) {\n console.error(\n `[ImpermanentLossService][getWeights]Error: ${BalancerError.getMessage(\n BalancerErrorCode.MISSING_WEIGHT\n )}`\n );\n throw new BalancerError(BalancerErrorCode.MISSING_WEIGHT);\n }\n return weights;\n }\n\n /**\n * get the current's tokens' prices\n * @param tokens the pools' tokens\n * @returns a list of tokens with prices\n */\n async getExitPrices(tokens: PoolToken[]): Promise {\n const prices = await Promise.all(\n tokens.map((token) => this.tokenPrices.find(token.address))\n ).catch(() => []);\n\n if (!prices.length || prices.some((price) => price?.usd === undefined)) {\n console.error(\n `[ImpermanentLossService][getExitPrices]Error: ${BalancerError.getMessage(\n BalancerErrorCode.MISSING_PRICE_RATE\n )}`\n );\n throw new BalancerError(BalancerErrorCode.MISSING_PRICE_RATE);\n }\n\n const tokensWithPrice = tokens.map((token, i) => ({\n ...token,\n price: prices[i],\n }));\n\n const tokenPrices: TokenPrices = {};\n for (const token of tokensWithPrice) {\n if (token.price?.usd) tokenPrices[token.address] = +token.price.usd; // price.usd is never undefined but JS complains\n }\n return tokenPrices;\n }\n\n /**\n * get the tokens' price at a given time\n *\n * @param timestamp the Unix timestamp\n * @param tokenAddresses the tokens' addresses\n * @returns a map of tokens' price\n */\n async getEntryPrices(\n timestamp: number,\n tokenAddresses: string[]\n ): Promise {\n const prices: TokenPrices = {};\n for (const address of tokenAddresses) {\n const price = await this.tokenHistoricalPrices\n .findBy(address, timestamp)\n .catch((reason) => {\n const logger = Logger.getInstance();\n logger.warn(\n `[ImpermanentLossService][getEntryPrices]Error: ${reason.message}`\n );\n return undefined;\n });\n if (!price?.usd) {\n const logger = Logger.getInstance();\n logger.warn(\n `[ImpermanentLossService][getEntryPrices]Error: ${BalancerError.getMessage(\n BalancerErrorCode.MISSING_PRICE_RATE\n )}`\n );\n throw new BalancerError(BalancerErrorCode.MISSING_PRICE_RATE);\n }\n prices[address] = +price.usd;\n }\n return prices;\n }\n}\n","/**\n * Weekly Bal emissions are fixed / year according to:\n * https://docs.google.com/spreadsheets/d/1FY0gi596YWBOTeu_mrxhWcdF74SwKMNhmu0qJVgs0KI/edit#gid=0\n *\n * Using regular numbers for simplicity assuming frontend use only.\n *\n * Calculation source\n * https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/liquidity-mining/contracts/BalancerTokenAdmin.sol\n */\n\nexport const INITIAL_RATE = 145000;\nexport const START_EPOCH_TIME = 1648465251;\nconst RATE_REDUCTION_TIME = 365 * 86400;\nconst RATE_REDUCTION_COEFFICIENT = 2 ** (1 / 4);\n\n/**\n * Weekly BAL emissions\n *\n * @param currentTimestamp used to get the epoch\n * @returns BAL emitted in a week\n */\nexport const weekly = (\n currentTimestamp: number = Math.round(new Date().getTime() / 1000)\n): number => {\n const miningEpoch = Math.floor(\n (currentTimestamp - START_EPOCH_TIME) / RATE_REDUCTION_TIME\n );\n\n const rate = INITIAL_RATE * RATE_REDUCTION_COEFFICIENT ** -miningEpoch;\n\n return rate;\n};\n\n/**\n * Total BAL emitted in epoch (1 year)\n *\n * @param epoch starting from 0 for the first year of emissions\n * @returns BAL emitted in epoch\n */\nexport const total = (epoch: number): number => {\n const weeklyRate = INITIAL_RATE * RATE_REDUCTION_COEFFICIENT ** -epoch;\n const dailyRate = weeklyRate / 7;\n\n return dailyRate * 365;\n};\n\n/**\n * Total BAL emitted between two timestamps\n *\n * @param start starting timestamp\n * @param end ending timestamp\n * @returns BAL emitted in period\n */\nexport const between = (start: number, end: number): number => {\n if (start < START_EPOCH_TIME) {\n throw 'start timestamp before emission schedule deployment';\n }\n if (end < start) {\n throw 'cannot finish before starting';\n }\n\n let totalEmissions = 0;\n\n const startingEpoch = Math.floor(\n (start - START_EPOCH_TIME) / RATE_REDUCTION_TIME\n );\n const endingEpoch = Math.floor(\n (end - START_EPOCH_TIME) / RATE_REDUCTION_TIME\n );\n\n for (\n let currentEpoch = startingEpoch;\n currentEpoch <= endingEpoch;\n currentEpoch++\n ) {\n totalEmissions += total(currentEpoch);\n }\n\n // Subtract what isn't emmited within the time range\n const startingEpochEnd =\n START_EPOCH_TIME + RATE_REDUCTION_TIME * (startingEpoch + 1);\n const endingEpochStart = START_EPOCH_TIME + RATE_REDUCTION_TIME * endingEpoch;\n\n const secondsInStartingEpoch = startingEpochEnd - start;\n const secondsInEndingEpoch = end - endingEpochStart;\n\n totalEmissions -=\n (total(startingEpoch) * (RATE_REDUCTION_TIME - secondsInStartingEpoch)) /\n RATE_REDUCTION_TIME;\n totalEmissions -=\n (total(endingEpoch) * (RATE_REDUCTION_TIME - secondsInEndingEpoch)) /\n RATE_REDUCTION_TIME;\n\n return totalEmissions;\n};\n","import { Findable, Price } from '@/types';\nimport { BaseFeeDistributor } from '@/modules/data';\n\nexport interface ProtocolRevenueData {\n lastWeekBalRevenue: number;\n lastWeekBBAUsdRevenue: number;\n veBalSupply: number;\n}\n\nexport class ProtocolRevenue {\n constructor(\n private repository: BaseFeeDistributor,\n private tokenPrices: Findable\n ) {}\n\n async data(now = Date.now()): Promise {\n const data = await this.repository.multicallData(now);\n const balPrice = await this.tokenPrices.find(data.balAddress);\n\n if (!balPrice || !balPrice.usd) {\n throw `No BAL USD price found`;\n }\n\n return {\n lastWeekBalRevenue: data.balAmount * parseFloat(balPrice.usd),\n lastWeekBBAUsdRevenue: data.bbAUsdAmount * data.bbAUsdPrice,\n veBalSupply: data.veBalSupply,\n };\n }\n}\n","/**\n * Calculates pool fees\n *\n * 1. Pool fees in last 24hrs\n */\nimport { isLessThan24Hours } from '@/lib/utils/time';\nimport { Pool, Findable, PoolAttribute } from '@/types';\n\nexport class PoolFees {\n constructor(\n private yesterdaysPools: Findable | undefined\n ) {}\n\n // 🚨 this is adding 1 call to get yesterday's block height and 2nd call to fetch yesterday's pools data from subgraph\n // TODO: find a better data source for that eg. add blocks to graph, replace with a database, or dune\n async last24h(pool: Pool): Promise {\n let yesterdaysPool;\n if (this.yesterdaysPools) {\n yesterdaysPool = await this.yesterdaysPools.find(pool.id);\n }\n if (!pool.totalSwapFee) {\n return 0;\n }\n\n if (!yesterdaysPool?.totalSwapFee) {\n // Process edge case when pool creation time is less that 24h\n if (pool.createTime && isLessThan24Hours(pool.createTime)) {\n return parseFloat(pool.totalSwapFee);\n }\n return 0;\n }\n\n return (\n parseFloat(pool.totalSwapFee) - parseFloat(yesterdaysPool.totalSwapFee)\n );\n }\n}\n","import { formatUnits } from '@ethersproject/units';\nimport * as emissions from '@/modules/data/bal/emissions';\nimport type {\n Findable,\n Pool,\n PoolAttribute,\n Price,\n Token,\n TokenAttribute,\n LiquidityGauge,\n Network,\n PoolToken,\n} from '@/types';\nimport { BaseFeeDistributor } from '@/modules/data';\nimport { ProtocolRevenue } from './protocol-revenue';\nimport { Liquidity } from '@/modules/liquidity/liquidity.module';\nimport { identity, zipObject, pickBy } from 'lodash';\nimport { PoolFees } from '../fees/fees';\nimport { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { Logger } from '@/lib/utils/logger';\nimport { GyroConfigRepository } from '@/modules/data/gyro-config/repository';\nimport { POOLS_TO_IGNORE } from '@/lib/constants/poolsToIgnore';\n\nexport interface AprBreakdown {\n swapFees: number;\n tokenAprs: {\n total: number;\n breakdown: { [address: string]: number };\n };\n stakingApr: {\n min: number;\n max: number;\n };\n rewardAprs: {\n total: number;\n breakdown: { [address: string]: number };\n };\n protocolApr: number;\n min: number;\n max: number;\n}\n\n/**\n * Calculates pool APR via summing up sources of APR:\n *\n * 1. Swap fees (pool level) data coming from subgraph\n * 2. Yield bearing pool tokens, with data from external sources eg: http endpoints, subgraph, onchain\n * * stETH\n * * aave\n * * usd+\n * map token: calculatorFn\n * 3. Staking rewards based from veBal gauges\n */\nexport class PoolApr {\n constructor(\n private pools: Findable,\n private tokenPrices: Findable,\n private tokenMeta: Findable,\n private tokenYields: Findable,\n private feeCollector: Findable,\n private yesterdaysPools?: Findable,\n private liquidityGauges?: Findable,\n private feeDistributor?: BaseFeeDistributor,\n private gyroConfigRepository?: GyroConfigRepository\n ) {}\n\n /**\n * Pool revenue via swap fees.\n * Fees and liquidity are takes from subgraph as USD floats.\n *\n * @returns APR [bsp] from fees accumulated over last 24h\n */\n async swapFees(pool: Pool): Promise {\n // 365 * dailyFees * (1 - protocolFees) / totalLiquidity\n const last24hFees = await this.last24hFees(pool);\n const totalLiquidity = await this.totalLiquidity(pool);\n // TODO: what to do when we are missing last24hFees or totalLiquidity?\n // eg: stable phantom returns 0\n if (!last24hFees || !totalLiquidity) {\n return 0;\n }\n const dailyFees =\n last24hFees * (1 - (await this.protocolSwapFeePercentage(pool)));\n const feesDailyBsp = 10000 * (dailyFees / parseFloat(totalLiquidity));\n\n return Math.round(365 * feesDailyBsp);\n }\n\n /**\n * Pool revenue from holding yield-bearing wrapped tokens.\n *\n * @returns APR [bsp] from tokens contained in the pool\n */\n async tokenAprs(pool: Pool): Promise {\n if (!pool.tokens) {\n return {\n total: 0,\n breakdown: {},\n };\n }\n\n const totalLiquidity = await this.totalLiquidity(pool);\n\n // Filter out BPT: token with the same address as the pool\n // TODO: move this to data layer\n const bptFreeTokens = pool.tokens.filter((token) => {\n return token.address !== pool.address;\n });\n\n // Get each token APRs\n const aprs = await Promise.all(\n bptFreeTokens.map(async (token) => {\n let apr = 0;\n const tokenYield = await this.tokenYields.find(token.address);\n if (tokenYield) {\n // metastable pools incorrectly apply the swap fee to the yield earned.\n // they don't have the concept of a yield fee like the newer pools do.\n if (\n pool.poolType === 'MetaStable' ||\n pool.poolType.includes('Gyro')\n ) {\n apr =\n tokenYield * (1 - (await this.protocolSwapFeePercentage(pool)));\n } else if (\n pool.poolType === 'ComposableStable' ||\n (pool.poolType === 'Weighted' && pool.poolTypeVersion >= 2)\n ) {\n if (token.isExemptFromYieldProtocolFee) {\n apr = tokenYield;\n } else {\n apr =\n tokenYield *\n (1 - parseFloat(pool.protocolYieldFeeCache || '0.5'));\n }\n } else {\n apr = tokenYield;\n }\n } else {\n // Handle subpool APRs with recursive call to get the subPool APR\n const subPool = await this.pools.findBy('address', token.address);\n\n if (subPool) {\n // INFO: Liquidity mining APR can't cascade to other pools\n const subSwapFees = await this.swapFees(subPool);\n const subtokenAprs = await this.tokenAprs(subPool);\n let subApr = subtokenAprs.total;\n if (\n pool.poolType === 'ComposableStable' ||\n (pool.poolType === 'Weighted' && pool.poolTypeVersion === 2)\n ) {\n if (!token.isExemptFromYieldProtocolFee) {\n subApr =\n subApr *\n (1 - parseFloat(pool.protocolYieldFeeCache || '0.5'));\n }\n }\n apr = subSwapFees + subApr;\n }\n }\n\n return apr;\n })\n );\n\n // Get token weights normalised by usd price\n const getWeight = async (token: PoolToken): Promise => {\n let tokenPrice: string | undefined;\n if (token.weight) {\n return parseFloat(token.weight);\n } else if (token.token?.pool?.poolType) {\n const poolToken = await this.pools.findBy('address', token.address);\n if (poolToken) {\n tokenPrice = (await this.bptPrice(poolToken)).toString();\n }\n } else {\n tokenPrice =\n token.price?.usd ||\n (await this.tokenPrices.find(token.address))?.usd ||\n token.token?.latestUSDPrice;\n }\n if (tokenPrice) {\n // using floats assuming frontend purposes with low precision needs\n const tokenValue = parseFloat(token.balance) * parseFloat(tokenPrice);\n return tokenValue / parseFloat(totalLiquidity);\n } else {\n throw `No price for ${token.address}`;\n }\n };\n\n // Normalise tokenAPRs according to weights\n const weightedAprs = await Promise.all(\n bptFreeTokens.map(async (token, idx) => {\n if (aprs[idx] === 0) {\n return 0;\n }\n\n // Handle missing token weights, usually due to missing token prices\n try {\n const weight = await getWeight(token);\n return Math.round(aprs[idx] * weight);\n } catch (e) {\n const logger = Logger.getInstance();\n logger.error(e as string);\n return 0;\n }\n })\n );\n\n // sum them up to get pool APRs\n const apr = weightedAprs.reduce((sum, apr) => sum + apr, 0);\n const breakdown = pickBy(\n zipObject(\n bptFreeTokens.map((t) => t.address),\n weightedAprs\n ),\n identity\n );\n\n return {\n total: apr,\n breakdown,\n };\n }\n\n /**\n * Calculates staking rewards based on veBal gauges deployed with Curve Finance contracts.\n * https://curve.readthedocs.io/dao-gauges.html\n *\n * Terminology:\n * - LP token of a gauge is a BPT of a pool\n * - Depositing into a gauge is called staking on the frontend\n * - gauge totalSupply - BPT tokens deposited to a gauge\n * - gauge workingSupply - effective BPT tokens participating in reward distribution. sum of 40% deposit + 60% boost from individual user's veBal\n * - gauge relative weight - weight of this gauge in bal inflation distribution [0..1] scaled to 1e18\n *\n * APR sources:\n * - gauge BAL emissions = min: 40% of totalSupply, max: 40% of totalSupply + 60% of totalSupply * gauge LPs voting power\n * https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/liquidity-mining/contracts/gauges/ethereum/LiquidityGaugeV5.vy#L338\n * - gauge reward tokens: Admin or designated depositor has an option to deposit additional reward with a weekly accruing cadence.\n * https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/liquidity-mining/contracts/gauges/ethereum/LiquidityGaugeV5.vy#L641\n * rate: amount of token per second\n *\n * @param pool\n * @param boost range between 1 and 2.5\n * @returns APR [bsp] from protocol rewards.\n */\n async stakingApr(pool: Pool, boost = 1): Promise {\n if (!this.liquidityGauges) {\n return 0;\n }\n\n // Data resolving\n const gauge = await this.liquidityGauges.findBy('poolId', pool.id);\n if (\n !gauge ||\n (pool.chainId == 1 && gauge.workingSupply === 0) ||\n (pool.chainId > 1 && gauge.totalSupply === 0) ||\n (pool.chainId > 1 && gauge.balInflationRate === 0)\n ) {\n return 0;\n }\n\n const bal =\n BALANCER_NETWORK_CONFIG[pool.chainId as Network].addresses.tokens.bal;\n if (!bal) {\n return 0;\n }\n\n const [balPrice, bptPriceUsd] = await Promise.all([\n this.tokenPrices.find(bal), // BAL\n this.bptPrice(pool),\n ]);\n\n if (!balPrice?.usd) {\n throw 'Missing BAL price';\n }\n\n const gaugeSupply = (gauge.workingSupply + 0.4) / 0.4; // Only 40% of LP token staked accrue emissions, totalSupply = workingSupply * 2.5\n const gaugeSupplyUsd = gaugeSupply * bptPriceUsd;\n\n // Handle child chain gauges with inflation_rate\n // balInflationRate - amount of BAL tokens per second as a float\n if (gauge.balInflationRate) {\n const reward =\n gauge.balInflationRate * 86400 * 365 * parseFloat(balPrice.usd);\n return Math.round((boost * 10000 * reward) / gaugeSupplyUsd);\n } else if (pool.chainId > 1) {\n // TODO: remove after all gauges are migrated (around 01-07-2023), Subgraph is returning BAL staking rewards as reward tokens for L2 gauges.\n if (!gauge.rewardTokens) {\n return 0;\n }\n\n const balReward = bal && gauge.rewardTokens[bal];\n if (balReward) {\n let reward: { address: string; value: number };\n try {\n reward = await this.rewardTokenApr(bal, balReward);\n const totalSupplyUsd = gauge.totalSupply * bptPriceUsd;\n const rewardValue = reward.value / totalSupplyUsd;\n return Math.round(10000 * rewardValue);\n } catch (e) {\n return 0;\n }\n } else {\n return 0;\n }\n }\n\n // Handle mainnet gauges\n const balPriceUsd = parseFloat(balPrice.usd);\n const now = Math.round(new Date().getTime() / 1000);\n const totalBalEmissions = (emissions.weekly(now) / 7) * 365;\n const gaugeBalEmissions = totalBalEmissions * gauge.relativeWeight;\n const gaugeBalEmissionsUsd = gaugeBalEmissions * balPriceUsd;\n const gaugeBalAprBps = Math.round(\n (boost * 10000 * gaugeBalEmissionsUsd) / gaugeSupplyUsd\n );\n\n return gaugeBalAprBps;\n }\n\n /**\n * Some gauges are holding tokens distributed as rewards to LPs.\n *\n * @param pool\n * @returns APR [bsp] from token rewards.\n */\n async rewardAprs(pool: Pool): Promise {\n if (!this.liquidityGauges) {\n return { total: 0, breakdown: {} };\n }\n\n // Data resolving\n const gauge = await this.liquidityGauges.findBy('poolId', pool.id);\n if (\n !gauge ||\n !gauge.rewardTokens ||\n Object.keys(gauge.rewardTokens).length < 1\n ) {\n return { total: 0, breakdown: {} };\n }\n\n // BAL rewards already returned as stakingApr, so we can filter them out\n const bal =\n BALANCER_NETWORK_CONFIG[pool.chainId as Network].addresses.tokens.bal;\n const rewardTokenAddresses = Object.keys(gauge.rewardTokens).filter(\n (a) => a != bal\n );\n\n // Gets each tokens rate, extrapolate to a year and convert to USD\n const rewards = rewardTokenAddresses.map(async (tAddress) => {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n const data = gauge!.rewardTokens![tAddress];\n try {\n const reward = await this.rewardTokenApr(tAddress, data);\n return reward;\n } catch (e) {\n return { address: tAddress, value: 0 };\n }\n });\n\n // Get the gauge totalSupplyUsd\n const bptPriceUsd = await this.bptPrice(pool);\n const totalSupplyUsd = gauge.totalSupply * bptPriceUsd;\n\n if (totalSupplyUsd == 0) {\n return { total: 0, breakdown: {} };\n }\n\n const rewardTokensBreakdown: Record = {};\n\n let total = 0;\n for await (const reward of Object.values(rewards)) {\n const rewardValue = reward.value / totalSupplyUsd;\n const rewardValueScaled = Math.round(10000 * rewardValue);\n total += rewardValueScaled;\n rewardTokensBreakdown[reward.address] = rewardValueScaled;\n }\n\n return {\n total,\n breakdown: rewardTokensBreakdown,\n };\n }\n\n /**\n * 80BAL-20WETH pool is accruing protocol revenue.\n *\n * @param pool\n * @returns accrued protocol revenue as APR [bsp]\n */\n async protocolApr(pool: Pool): Promise {\n const veBalPoolId =\n '0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014';\n\n if (pool.id != veBalPoolId || !this.feeDistributor) {\n return 0;\n }\n\n const revenue = new ProtocolRevenue(this.feeDistributor, this.tokenPrices);\n\n const { lastWeekBalRevenue, lastWeekBBAUsdRevenue, veBalSupply } =\n await revenue.data();\n\n const bptPrice = await this.bptPrice(pool);\n if (!bptPrice) {\n throw 'bptPrice for veBal pool missing';\n }\n\n const dailyRevenue = (lastWeekBalRevenue + lastWeekBBAUsdRevenue) / 7;\n const apr = Math.round(\n (10000 * (365 * dailyRevenue)) / (bptPrice * veBalSupply)\n );\n\n return apr;\n }\n\n /**\n * Composes all sources for total pool APR.\n *\n * @returns pool APR split [bsp]\n */\n async apr(pool: Pool): Promise {\n if (POOLS_TO_IGNORE.includes(pool.id)) {\n return {\n swapFees: 0,\n tokenAprs: {\n total: 0,\n breakdown: {},\n },\n stakingApr: {\n min: 0,\n max: 0,\n },\n rewardAprs: {\n total: 0,\n breakdown: {},\n },\n protocolApr: 0,\n min: 0,\n max: 0,\n };\n }\n const [\n swapFees,\n tokenAprs,\n minStakingApr,\n maxStakingApr,\n rewardAprs,\n protocolApr,\n ] = await Promise.all([\n this.swapFees(pool), // pool snapshot for last 24h fees dependency\n this.tokenAprs(pool),\n this.stakingApr(pool),\n this.stakingApr(pool, 2.5),\n this.rewardAprs(pool),\n this.protocolApr(pool),\n ]);\n\n return {\n swapFees,\n tokenAprs,\n stakingApr: {\n min: minStakingApr,\n max: maxStakingApr,\n },\n rewardAprs,\n protocolApr,\n min: swapFees + tokenAprs.total + rewardAprs.total + minStakingApr,\n max:\n swapFees +\n tokenAprs.total +\n rewardAprs.total +\n protocolApr +\n maxStakingApr,\n };\n }\n\n private async last24hFees(pool: Pool): Promise {\n const poolFees = new PoolFees(this.yesterdaysPools);\n return poolFees.last24h(pool);\n }\n\n /**\n * Total Liquidity based on USD token prices taken from external price feed, eg: coingecko.\n *\n * @param pool\n * @returns Pool liquidity in USD\n */\n private async totalLiquidity(pool: Pool): Promise {\n try {\n const liquidityService = new Liquidity(this.pools, this.tokenPrices);\n const liquidity = await liquidityService.getLiquidity(pool);\n return liquidity;\n } catch (err) {\n const logger = Logger.getInstance();\n logger.warn('Liquidity calculcation failed, falling back to subgraph');\n return pool.totalLiquidity;\n }\n }\n\n /**\n * BPT price as pool totalLiquidity / pool total Shares\n * Total Liquidity is calculated based on USD token prices taken from external price feed, eg: coingecko.\n *\n * @param pool\n * @returns BPT price in USD\n */\n private async bptPrice(pool: Pool) {\n return (\n parseFloat(await this.totalLiquidity(pool)) / parseFloat(pool.totalShares)\n );\n }\n\n private async protocolSwapFeePercentage(pool: Pool) {\n let fee = 0.5;\n if (pool.poolType.includes('Gyro') && this.gyroConfigRepository) {\n fee = await this.gyroConfigRepository.getGyroProtocolFee(pool.address);\n } else if (pool.protocolSwapFeeCache) {\n fee = parseFloat(pool.protocolSwapFeeCache);\n } else {\n fee = (await this.feeCollector.find('')) || 0.5;\n }\n return fee;\n }\n\n private async rewardTokenApr(\n tokenAddress: string,\n rewardData: { rate: BigNumber; period_finish: BigNumber; decimals?: number }\n ) {\n if (rewardData.period_finish.toNumber() < Date.now() / 1000) {\n return {\n address: tokenAddress,\n value: 0,\n };\n } else {\n const yearlyReward = rewardData.rate.mul(86400).mul(365);\n const price = await this.tokenPrices.find(tokenAddress);\n if (price && price.usd) {\n let decimals = 18;\n if (rewardData.decimals) {\n decimals = rewardData.decimals;\n } else {\n const meta = await this.tokenMeta.find(tokenAddress);\n decimals = meta?.decimals || 18;\n }\n const yearlyRewardUsd =\n parseFloat(formatUnits(yearlyReward, decimals)) *\n parseFloat(price.usd);\n return {\n address: tokenAddress,\n value: yearlyRewardUsd,\n };\n } else {\n throw `No USD price for ${tokenAddress}`;\n }\n }\n }\n}\n","import { BigNumber, parseFixed } from '@ethersproject/bignumber';\nimport { Zero, WeiPerEther } from '@ethersproject/constants';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { isSameAddress, parsePoolInfo } from '@/lib/utils';\nimport { _downscaleDown } from '@/lib/utils/solidityMaths';\nimport { Pool, PoolAttribute, PoolType } from '@/types';\n\nimport { Findable } from '../data/types';\nimport { PoolTypeConcerns } from '../pools/pool-type-concerns';\n\ntype SpotPrices = { [tokenIn: string]: string };\n\nconst supportedPoolTypes: string[] = Object.values(PoolType);\nexport interface Node {\n address: string;\n id: string;\n joinAction: JoinAction;\n exitAction: ExitAction;\n isProportionalExit: boolean;\n type: string;\n children: Node[];\n marked: boolean;\n index: string;\n proportionOfParent: BigNumber;\n parent: Node | undefined;\n isLeaf: boolean;\n spotPrices: SpotPrices;\n decimals: number;\n balance: string;\n priceRate: string;\n}\n\ntype JoinAction = 'input' | 'batchSwap' | 'wrap' | 'joinPool';\nconst joinActions = new Map();\nsupportedPoolTypes.forEach((type) => {\n if (type.includes('Linear') && supportedPoolTypes.includes(type))\n joinActions.set(type as PoolType, 'batchSwap');\n});\njoinActions.set(PoolType.Element, 'batchSwap');\njoinActions.set(PoolType.Investment, 'joinPool');\njoinActions.set(PoolType.LiquidityBootstrapping, 'joinPool');\njoinActions.set(PoolType.MetaStable, 'joinPool');\njoinActions.set(PoolType.Stable, 'joinPool');\njoinActions.set(PoolType.StablePhantom, 'batchSwap');\njoinActions.set(PoolType.Weighted, 'joinPool');\njoinActions.set(PoolType.ComposableStable, 'joinPool');\n\ntype ExitAction = 'output' | 'batchSwap' | 'unwrap' | 'exitPool';\nconst exitActions = new Map();\nsupportedPoolTypes.forEach((type) => {\n if (type.includes('Linear') && supportedPoolTypes.includes(type))\n exitActions.set(type as PoolType, 'batchSwap');\n});\nexitActions.set(PoolType.Element, 'batchSwap');\nexitActions.set(PoolType.Investment, 'exitPool');\nexitActions.set(PoolType.LiquidityBootstrapping, 'exitPool');\nexitActions.set(PoolType.MetaStable, 'exitPool');\nexitActions.set(PoolType.Stable, 'exitPool');\nexitActions.set(PoolType.StablePhantom, 'batchSwap');\nexitActions.set(PoolType.Weighted, 'exitPool');\nexitActions.set(PoolType.ComposableStable, 'exitPool');\n\nexport class PoolGraph {\n constructor(private pools: Findable) {}\n\n async buildGraphFromRootPool(\n poolId: string,\n tokensToUnwrap: string[]\n ): Promise {\n const rootPool = await this.pools.find(poolId);\n if (!rootPool) throw new BalancerError(BalancerErrorCode.POOL_DOESNT_EXIST);\n const nodeIndex = 0;\n const rootNode = await this.buildGraphFromPool(\n rootPool.address,\n nodeIndex,\n undefined,\n WeiPerEther,\n tokensToUnwrap\n );\n return rootNode[0];\n }\n\n getTokenTotal(pool: Pool): BigNumber {\n const bptIndex = pool.tokensList.indexOf(pool.address);\n let total = Zero;\n const { balancesEvm } = parsePoolInfo(pool);\n balancesEvm.forEach((balance, i) => {\n // Ignore phantomBpt balance\n if (bptIndex !== i) {\n total = total.add(balance);\n }\n });\n return total;\n }\n\n async buildGraphFromPool(\n address: string,\n nodeIndex: number,\n parent: Node | undefined,\n proportionOfParent: BigNumber,\n tokensToUnwrap: string[]\n ): Promise<[Node, number]> {\n const pool = await this.pools.findBy('address', address);\n\n if (!pool) {\n if (!parent) {\n // If pool not found by address and is root pool (without parent), then throw error\n throw new BalancerError(BalancerErrorCode.POOL_DOESNT_EXIST);\n } else {\n // If pool not found by address, but it has parent, assume it's a leaf token and add a leafTokenNode\n const parentPool = (await this.pools.findBy(\n 'address',\n parent.address\n )) as Pool;\n const tokenIndex = parentPool.tokensList.indexOf(address);\n const leafTokenDecimals = parentPool.tokens[tokenIndex].decimals ?? 18;\n const { balancesEvm } = parsePoolInfo(parentPool);\n\n const nodeInfo = PoolGraph.createInputTokenNode(\n nodeIndex,\n address,\n leafTokenDecimals,\n parent,\n proportionOfParent,\n balancesEvm[tokenIndex].toString()\n );\n return nodeInfo;\n }\n }\n\n const joinAction = joinActions.get(pool.poolType);\n const exitAction = exitActions.get(pool.poolType);\n if (!joinAction || !exitAction)\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n\n const tokenTotal = this.getTokenTotal(pool);\n // Spot price service\n const { spotPriceCalculator } = PoolTypeConcerns.from(pool.poolType);\n const spotPrices: SpotPrices = {};\n let decimals = 18;\n // Spot price of a path is product of the sp of each pool in path. We calculate the sp for each pool token here to use as required later.\n pool.tokens.forEach((token) => {\n if (isSameAddress(token.address, pool.address)) {\n // Updated node with BPT token decimal\n decimals = token.decimals ? token.decimals : 18;\n return;\n }\n const sp = spotPriceCalculator.calcPoolSpotPrice(\n token.address,\n pool.address,\n pool\n );\n spotPrices[token.address] = sp;\n });\n\n let poolNode: Node = {\n address: pool.address,\n id: pool.id,\n type: pool.poolType,\n joinAction,\n exitAction,\n isProportionalExit: false,\n children: [],\n marked: false,\n index: nodeIndex.toString(),\n parent,\n proportionOfParent,\n isLeaf: false,\n spotPrices,\n decimals,\n balance: pool.totalShares,\n priceRate: WeiPerEther.toString(),\n };\n this.updateNodeIfProportionalExit(pool, poolNode);\n nodeIndex++;\n if (pool.poolType.toString().includes('Linear')) {\n [poolNode, nodeIndex] = this.createLinearNodeChildren(\n poolNode,\n nodeIndex,\n pool,\n tokensToUnwrap\n );\n } else {\n const { balancesEvm } = parsePoolInfo(pool);\n for (let i = 0; i < pool.tokens.length; i++) {\n // ignore any phantomBpt tokens\n if (isSameAddress(pool.tokens[i].address, pool.address)) continue;\n let proportion: BigNumber;\n // If the pool is a weighted pool we can use the actual tokenWeight as proportion\n if (pool.poolType === 'Weighted') {\n const tokenWeight = pool.tokens[i].weight as string;\n proportion = parseFixed(tokenWeight, 18);\n } else {\n proportion = BigNumber.from(balancesEvm[i])\n .mul((1e18).toString())\n .div(tokenTotal);\n }\n const finalProportion = proportion\n .mul(proportionOfParent)\n .div((1e18).toString());\n const childNode = await this.buildGraphFromPool(\n pool.tokens[i].address,\n nodeIndex,\n poolNode,\n finalProportion,\n tokensToUnwrap\n );\n nodeIndex = childNode[1];\n if (childNode[0]) poolNode.children.push(childNode[0]);\n }\n }\n return [poolNode, nodeIndex];\n }\n\n /**\n * Updates isProportionalExit for Node if the pool supports it\n * @param pool\n * @param node\n */\n updateNodeIfProportionalExit(pool: Pool, node: Node): void {\n if (pool.poolType === PoolType.Weighted) node.isProportionalExit = true;\n else if (\n pool.poolType === PoolType.ComposableStable &&\n pool.poolTypeVersion > 2\n )\n node.isProportionalExit = true;\n }\n\n createLinearNodeChildren(\n linearPoolNode: Node,\n nodeIndex: number,\n linearPool: Pool,\n tokensToUnwrap: string[]\n ): [Node, number] {\n // Main token\n if (linearPool.mainIndex === undefined)\n throw new Error('Issue With Linear Pool');\n\n if (\n tokensToUnwrap\n .map((t) => t.toLowerCase())\n .includes(linearPool.tokensList[linearPool.mainIndex].toLowerCase())\n ) {\n // Linear pool will be joined via wrapped token. This will be the child node.\n const wrappedNodeInfo = this.createWrappedTokenNode(\n linearPool,\n nodeIndex,\n linearPoolNode,\n linearPoolNode.proportionOfParent\n );\n linearPoolNode.children.push(wrappedNodeInfo[0]);\n return [linearPoolNode, wrappedNodeInfo[1]];\n } else {\n const { balancesEvm } = parsePoolInfo(linearPool);\n const mainTokenDecimals =\n linearPool.tokens[linearPool.mainIndex].decimals ?? 18;\n\n const nodeInfo = PoolGraph.createInputTokenNode(\n nodeIndex,\n linearPool.tokensList[linearPool.mainIndex],\n mainTokenDecimals,\n linearPoolNode,\n linearPoolNode.proportionOfParent,\n balancesEvm[linearPool.mainIndex].toString()\n );\n linearPoolNode.children.push(nodeInfo[0]);\n nodeIndex = nodeInfo[1];\n return [linearPoolNode, nodeIndex];\n }\n }\n\n createWrappedTokenNode(\n linearPool: Pool,\n nodeIndex: number,\n parent: Node | undefined,\n proportionOfParent: BigNumber\n ): [Node, number] {\n if (\n linearPool.wrappedIndex === undefined ||\n linearPool.mainIndex === undefined\n )\n throw new Error('Issue With Linear Pool');\n\n const { balancesEvm, upScaledBalances, scalingFactorsRaw, priceRates } =\n parsePoolInfo(linearPool);\n\n const wrappedTokenNode: Node = {\n type: 'WrappedToken',\n address: linearPool.tokensList[linearPool.wrappedIndex],\n id: 'N/A',\n children: [],\n marked: false,\n joinAction: 'wrap',\n exitAction: 'unwrap',\n isProportionalExit: false,\n index: nodeIndex.toString(),\n parent,\n proportionOfParent,\n isLeaf: false,\n spotPrices: {},\n decimals: 18,\n balance: balancesEvm[linearPool.wrappedIndex].toString(),\n priceRate: priceRates[linearPool.wrappedIndex].toString(),\n };\n nodeIndex++;\n\n const mainTokenDecimals =\n linearPool.tokens[linearPool.mainIndex].decimals ?? 18;\n\n /**\n * - upscaledBalances takes price rate into account, which is equivalent to unwrapping tokens\n * - downscaling with scalingFactorsRaw will downscale the unwrapped balance to the main token decimals\n */\n const unwrappedBalance = _downscaleDown(\n upScaledBalances[linearPool.wrappedIndex],\n scalingFactorsRaw[linearPool.mainIndex]\n ).toString();\n\n const inputNode = PoolGraph.createInputTokenNode(\n nodeIndex,\n linearPool.tokensList[linearPool.mainIndex],\n mainTokenDecimals,\n wrappedTokenNode,\n proportionOfParent,\n unwrappedBalance\n );\n wrappedTokenNode.children = [inputNode[0]];\n nodeIndex = inputNode[1];\n return [wrappedTokenNode, nodeIndex];\n }\n\n static createInputTokenNode(\n nodeIndex: number,\n address: string,\n decimals: number,\n parent: Node | undefined,\n proportionOfParent: BigNumber,\n balance: string\n ): [Node, number] {\n return [\n {\n address,\n id: 'N/A',\n type: 'Input',\n children: [],\n marked: false,\n joinAction: 'input',\n exitAction: 'output',\n isProportionalExit: false,\n index: nodeIndex.toString(), // This will be updated with real amounts in join construction.\n parent,\n proportionOfParent,\n isLeaf: true,\n spotPrices: {},\n decimals,\n balance,\n priceRate: WeiPerEther.toString(),\n },\n nodeIndex + 1,\n ];\n }\n\n static orderByBfs(root: Node): Node[] {\n // Breadth first traversal of graph\n const nodes: Node[] = [];\n const orderedNodes: Node[] = [];\n root.marked = true;\n nodes.push(root);\n while (nodes.length > 0) {\n const currentNode = nodes.shift(); // removes first\n if (currentNode) orderedNodes.push(currentNode);\n currentNode?.children.forEach((c) => {\n if (!c.marked) {\n c.marked = true;\n nodes.push(c);\n }\n });\n }\n return orderedNodes;\n }\n\n // Return a list of leaf token addresses\n static getLeafAddresses(nodes: Node[]): string[] {\n return nodes.filter((n) => n.isLeaf).map((n) => n.address);\n }\n\n /**\n * Checks if list of Nodes only contains pools that support proportional exits\n * @param nodes\n * @returns\n */\n static isProportionalPools(nodes: Node[]): boolean {\n return nodes.every((node) => {\n if (node.children.length > 1) return node.isProportionalExit;\n else return true;\n });\n }\n\n // Get full graph from root pool and return ordered nodes\n getGraphNodes = async (\n isJoin: boolean,\n poolId: string,\n tokensToUnwrap: string[]\n ): Promise => {\n const rootPool = await this.pools.find(poolId);\n if (!rootPool) throw new BalancerError(BalancerErrorCode.POOL_DOESNT_EXIST);\n\n const rootNode = await this.buildGraphFromRootPool(poolId, tokensToUnwrap);\n\n if (rootNode.id !== poolId) throw new Error('Error creating graph nodes');\n\n if (isJoin) return PoolGraph.orderByBfs(rootNode).reverse();\n else return PoolGraph.orderByBfs(rootNode);\n };\n}\n","import { defaultAbiCoder, Result } from '@ethersproject/abi';\n\nexport class WeightedPoolDecoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Decodes the userData parameter for providing the initial liquidity to a WeightedPool\n * @param data - encoded data\n */\n static joinInit = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256[]'], data);\n\n /**\n * Decodes the userData parameter for joining a WeightedPool with exact token inputs\n * @param data - encoded data\n */\n static joinExactTokensInForBPTOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256[]', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for joining a WeightedPool with a single token to receive an exact amount of BPT\n * @param data - encoded data\n */\n static joinTokenInForExactBPTOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for joining a WeightedPool proportionally to receive an exact amount of BPT\n * @param data - encoded data\n */\n static joinAllTokensInForExactBPTOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for exiting a WeightedPool by removing a single token in return for an exact amount of BPT\n * @param data - encoded data\n */\n static exitExactBPTInForOneTokenOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for exiting a WeightedPool by removing tokens in return for an exact amount of BPT\n * @param data - encoded data\n *\n */\n static exitExactBPTInForTokensOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for exiting a WeightedPool by removing exact amounts of tokens\n * @param data - encoded data\n */\n static exitBPTInForExactTokensOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256[]', 'uint256'], data);\n}\n","import { parseFixed, BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { defaultAbiCoder } from '@ethersproject/abi';\nimport { Zero } from '@ethersproject/constants';\nimport { bnum } from '@balancer-labs/sor';\n\nimport { PoolDictionary, Pool } from '../poolSource';\nimport { WeightedPoolDecoder } from '@/pool-weighted/decoder';\nimport { WeightedPoolJoinKind } from '@/pool-weighted/encoder';\nimport { isSameAddress } from '@/lib/utils';\nimport { Relayer } from '@/modules/relayer/relayer.module';\nimport { RelayerModel } from '../relayer';\nimport { ActionType } from '../vaultModel.module';\nimport { PoolToken } from '@/types';\n\nexport interface JoinPoolRequest {\n actionType: ActionType.Join;\n poolId: string;\n encodedUserData: string;\n outputReference: string;\n}\n\nexport class JoinModel {\n constructor(private relayerModel: RelayerModel) {}\n\n /**\n * Finds join kind given encoded user data.\n * @param encodedUserData\n * @returns\n */\n joinKind(encodedUserData: string): WeightedPoolJoinKind {\n const decodedUserData = defaultAbiCoder.decode(\n ['uint256'],\n encodedUserData\n );\n const joinKind = decodedUserData[0] as BigNumber;\n if (!joinKind) throw new Error('No exit kind.');\n return joinKind.toNumber() as WeightedPoolJoinKind;\n }\n\n /**\n * Decodes user join data and returns token input amounts\n * @param encodedUserData\n * @param joinKind\n * @returns\n */\n decodeJoinData(\n encodedUserData: string,\n joinKind: WeightedPoolJoinKind\n ): string | string[] {\n // At the moment all pools have same structure so just use WeightedPoolDecoded for all\n if (joinKind === WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT) {\n const bptAmountOut =\n WeightedPoolDecoder.joinAllTokensInForExactBPTOut(encodedUserData);\n return bptAmountOut.toString();\n } else if (joinKind === WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\n const [, amountsIn] =\n WeightedPoolDecoder.joinExactTokensInForBPTOut(encodedUserData);\n return amountsIn;\n } else if (joinKind === WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\n const [, bptAmountOut, tokenIndex] =\n WeightedPoolDecoder.joinTokenInForExactBPTOut(encodedUserData);\n return [bptAmountOut.toString(), tokenIndex];\n } else throw new Error('Non supported join data');\n }\n\n allTokensInForExactBPTOut(): string {\n throw new Error('joinAllTokensInForExactBPTOut not supported');\n /*\n We need maths for _calcAllTokensInGivenExactBptOut\n From SC:\n uint256 bptAmountOut = userData.allTokensInForExactBptOut();\n // Note that there is no maximum amountsIn parameter: this is handled by `IVault.joinPool`.\n \n uint256[] memory amountsIn = WeightedMath._calcAllTokensInGivenExactBptOut(balances, bptAmountOut, totalSupply);\n \n return (bptAmountOut, amountsIn);\n \n const bptAmountOut = this.decodeJoinData(\n encodedUserData,\n PoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT\n );\n */\n }\n\n joinExactTokensInForBPTOut(\n encodedUserData: string,\n pool: Pool\n ): [string, string[], string[]] {\n // This does not include a value for pre-minted BPT\n const amountsInWithRef = this.decodeJoinData(\n encodedUserData,\n WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT\n ) as string[];\n\n const amountsIn =\n this.relayerModel.doChainedRefReplacements(amountsInWithRef);\n // Calculate amount of BPT out given exact amounts in\n const bptAmountOut = pool._calcBptOutGivenExactTokensIn(\n amountsIn.map((a) => BigNumber.from(a))\n );\n\n // Updates BPT/totalShares value for pool\n if (\n pool.SubgraphType == 'StablePhantom' ||\n pool.SubgraphType == 'ComposableStable'\n ) {\n // Update BPT balance\n // totalShares will be updated as a side effect within SOR\n const bptAsPoolToken = pool.tokens.find((t: PoolToken) =>\n isSameAddress(t.address, pool.address)\n );\n if (!bptAsPoolToken)\n throw new Error('Pool does not contain BPT as a token');\n const bptBalanceEVM = parseFixed(\n bptAsPoolToken.balance.toString(),\n bptAsPoolToken.decimals\n );\n // subtract value because joining pool reduces pre-minted BPT being held by the pool\n pool.updateTokenBalanceForPool(\n pool.address,\n bptBalanceEVM.sub(bptAmountOut)\n );\n } else {\n // For pools that do not contain BPT as a token, update totalShares directly\n pool.updateTokenBalanceForPool(\n pool.address,\n pool.totalShares.add(bptAmountOut)\n );\n }\n\n const tokensWithoutBpt = pool.tokens.filter(\n (t: PoolToken) => !isSameAddress(t.address, pool.address)\n );\n // Update each tokens balance\n amountsIn.forEach((amount, i) => {\n const balanceEvm = parseFixed(\n tokensWithoutBpt[i].balance.toString(),\n tokensWithoutBpt[i].decimals\n );\n pool.updateTokenBalanceForPool(\n tokensWithoutBpt[i].address,\n balanceEvm.add(amount)\n );\n });\n return [\n bptAmountOut.toString(),\n tokensWithoutBpt.map((t: PoolToken) => t.address),\n amountsIn,\n ];\n }\n\n joinTokenInForExactBPTOut(\n encodedUserData: string,\n pool: Pool\n ): [string, string, string] {\n const [bptAmountOutWithRef, tokenInIndex] = this.decodeJoinData(\n encodedUserData,\n WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT\n ) as string;\n\n const bptAmountOut =\n this.relayerModel.doChainedRefReplacement(bptAmountOutWithRef);\n // Uses an existing SOR functionality so need to deal with pairData and scaling\n const pairData = pool.parsePoolPairData(\n pool.tokensList[Number(tokenInIndex)],\n pool.address\n );\n\n const bptAmountOutHuman = formatFixed(bptAmountOut, 18);\n // Needs human scale\n const amountInHuman = pool\n ._tokenInForExactTokenOut(\n pairData as never,\n bnum(bptAmountOutHuman.toString())\n )\n .dp(pairData.decimalsIn);\n const amountInEvm = parseFixed(\n amountInHuman.toString(),\n pairData.decimalsIn\n );\n\n // Update balances of tokenIn and tokenOut - use EVM scale\n pool.updateTokenBalanceForPool(\n pairData.tokenIn,\n pairData.balanceIn.add(amountInEvm)\n );\n // For a join we have to add the extra BPT to the balance as this is equivalent to bptTotalSupply\n pool.updateTokenBalanceForPool(\n pairData.tokenOut,\n pairData.balanceOut.add(bptAmountOut)\n );\n\n return [amountInEvm.toString(), pairData.tokenIn, amountInEvm.toString()];\n }\n\n /**\n * Perform the specified exit type.\n * @param joinPoolRequest\n * @returns tokens out\n */\n async doJoinPool(\n joinPoolRequest: JoinPoolRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n const pool = pools[joinPoolRequest.poolId];\n const joinKind = this.joinKind(joinPoolRequest.encodedUserData);\n let bptOut = '0';\n let tokens: string[] = [];\n let amounts: string[] = [];\n if (joinKind === WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT) {\n // Returns amount of tokens in - This isn't currently implemented\n bptOut = this.allTokensInForExactBPTOut();\n } else if (joinKind === WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\n // Returns amount of BPT out\n [bptOut, tokens, amounts] = this.joinExactTokensInForBPTOut(\n joinPoolRequest.encodedUserData,\n pool\n );\n } else if (joinKind === WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\n // Returns amount of tokenIn\n let tokenIn: string, amountIn: string;\n [bptOut, tokenIn, amountIn] = this.joinTokenInForExactBPTOut(\n joinPoolRequest.encodedUserData,\n pool\n );\n tokens.push(tokenIn);\n amounts.push(amountIn);\n } else throw new Error('Exit type not implemented');\n\n tokens.push(pool.address);\n // -ve because coming from Vault\n amounts.push(Zero.sub(bptOut).toString());\n\n if (\n joinPoolRequest.outputReference &&\n Relayer.isChainedReference(joinPoolRequest.outputReference)\n ) {\n this.relayerModel.setChainedReferenceValue(\n joinPoolRequest.outputReference,\n bptOut\n );\n }\n return [tokens, amounts];\n }\n}\n","import { parseFixed, BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { defaultAbiCoder } from '@ethersproject/abi';\nimport { Zero } from '@ethersproject/constants';\nimport { bnum } from '@balancer-labs/sor';\n\nimport { PoolDictionary, Pool } from '../poolSource';\nimport { ComposableStablePoolExitKind } from '@/pool-composable-stable';\nimport { WeightedPoolDecoder } from '@/pool-weighted/decoder';\nimport { WeightedPoolExitKind } from '@/pool-weighted/encoder';\nimport { isSameAddress } from '@/lib/utils';\nimport { RelayerModel } from '../relayer';\nimport { ActionType } from '../vaultModel.module';\nimport { OutputReference } from '@/modules/relayer/types';\nimport { PoolToken } from '@/types';\n\nexport interface ExitPoolRequest {\n actionType: ActionType.Exit;\n poolId: string;\n encodedUserData: string;\n outputReferences: OutputReference[];\n}\n\nfunction getBalancesForTokens(pool: Pool, tokens: string[]): string[] {\n const balances: string[] = [];\n tokens.forEach((t) => {\n const tokenIndex = pool.tokens.findIndex((pt: PoolToken) =>\n isSameAddress(pt.address, t)\n );\n if (tokenIndex < 0) throw 'Pool does not contain tokenIn';\n balances.push(\n parseFixed(\n pool.tokens[tokenIndex].balance,\n pool.tokens[tokenIndex].decimals\n ).toString()\n );\n });\n return balances;\n}\n\nexport class ExitModel {\n constructor(private relayerModel: RelayerModel) {}\n\n /**\n * Finds exit kind given encoded user data and pool type.\n * @param poolType\n * @param encodedUserData\n * @returns\n */\n exitKind(poolType: string, encodedUserData: string): WeightedPoolExitKind {\n const decodedUserData = defaultAbiCoder.decode(\n ['uint256'],\n encodedUserData\n );\n const exitKind = decodedUserData[0] as BigNumber;\n if (!exitKind) throw new Error('No exit kind.');\n if (poolType === 'ComposableStable') {\n if (\n exitKind.toNumber() ===\n ComposableStablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT\n )\n return WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT;\n if (\n exitKind.toNumber() ===\n ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT\n )\n return WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT;\n else {\n return WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT;\n }\n } else {\n return exitKind.toNumber() as WeightedPoolExitKind;\n }\n }\n\n /**\n * Decodes user exit data and returns token input amounts\n * @param encodedUserData\n * @param exitKind\n * @returns\n */\n decodeExitData(\n encodedUserData: string,\n exitKind: WeightedPoolExitKind\n ): string[] {\n // At the moment all pools have same structure so just use WeightedPoolDecoded for all\n if (exitKind === WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT) {\n const [, amountsOut, maxBPTAmountIn] =\n WeightedPoolDecoder.exitBPTInForExactTokensOut(encodedUserData);\n return [amountsOut.toString(), maxBPTAmountIn.toString()];\n } else if (\n exitKind === WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT\n ) {\n const [, bptIn, tokenIndex] =\n WeightedPoolDecoder.exitExactBPTInForOneTokenOut(encodedUserData);\n return [bptIn.toString(), tokenIndex.toString()];\n } else if (exitKind === WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\n const [, bptIn] =\n WeightedPoolDecoder.exitExactBPTInForTokensOut(encodedUserData);\n return [bptIn.toString()];\n } else throw new Error('Non supported exit data');\n }\n\n /**\n * Exit pool, BPT in to tokens out.\n * Updates pool balances.\n * @param encodedUserData\n * @param pool\n * @returns tokensOut\n */\n exactBptInForTokensOut(\n encodedUserData: string,\n pool: Pool\n ): [string, string[], string[]] {\n const [bptInWithRef] = this.decodeExitData(\n encodedUserData,\n WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT\n );\n\n const bptIn = this.relayerModel.doChainedRefReplacement(bptInWithRef);\n // Calculate amount of tokens out given an exact amount of BPT in\n const amountsOut = pool\n ._calcTokensOutGivenExactBptIn(BigNumber.from(bptIn))\n .map((a: BigNumber) => a.toString());\n\n // Updates BPT/totalShares value for pool\n if (\n pool.SubgraphType == 'StablePhantom' ||\n pool.SubgraphType == 'ComposableStable'\n ) {\n // Update BPT balance\n // totalShares will be updated as a side effect within SOR\n const bptAsPoolToken = pool.tokens.find((t: PoolToken) =>\n isSameAddress(t.address, pool.address)\n );\n if (!bptAsPoolToken)\n throw new Error('Pool does not contain BPT as a token');\n const bptBalanceEVM = parseFixed(\n bptAsPoolToken.balance.toString(),\n bptAsPoolToken.decimals\n );\n pool.updateTokenBalanceForPool(\n pool.address,\n bptBalanceEVM.add(bptIn) // add value because exiting pool increases pre-minted BPT being held by the pool\n );\n } else {\n // For pools that do not contain BPT as a token, update totalShares directly\n pool.updateTokenBalanceForPool(pool.address, pool.totalShares.sub(bptIn));\n }\n\n const tokensWithoutBpt = pool.tokens.filter(\n (t: PoolToken) => !isSameAddress(t.address, pool.address)\n );\n // Update each tokens balance\n amountsOut.forEach((amountOut: string, i: number) => {\n const balanceEvm = parseFixed(\n tokensWithoutBpt[i].balance.toString(),\n tokensWithoutBpt[i].decimals\n );\n pool.updateTokenBalanceForPool(\n tokensWithoutBpt[i].address,\n balanceEvm.sub(amountOut)\n );\n });\n return [\n bptIn,\n tokensWithoutBpt.map((t: PoolToken) => t.address),\n amountsOut,\n ];\n }\n\n /**\n * Exit pool, BPT in to single token out.\n * Updates pool balances.\n * @param encodedUserData\n * @param pool\n * @returns tokens out\n */\n exactBptInForOneTokenOut(\n encodedUserData: string,\n pool: Pool\n ): [string, string[], string[]] {\n const [bptInWithRef, tokenIndex] = this.decodeExitData(\n encodedUserData,\n WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT\n );\n const bptIn = this.relayerModel.doChainedRefReplacement(bptInWithRef);\n // Uses an existing SOR functionality so need to deal with pairData and scaling\n const pairData = pool.parsePoolPairData(\n pool.address,\n pool.tokensList[Number(tokenIndex)]\n );\n // Calculation requires floating point number input\n const amountInHuman: string = formatFixed(bptIn, pairData.decimalsIn);\n // Calculate amount of token out given an exact amount of BPT in\n const amountOutHuman = pool\n ._exactTokenInForTokenOut(pairData as never, bnum(amountInHuman))\n .dp(pairData.decimalsOut);\n const amountOutEvm = parseFixed(\n amountOutHuman.toString(),\n pairData.decimalsOut\n );\n\n // Update balances use EVM scaled\n const poolBalances = getBalancesForTokens(pool, [\n pool.address,\n pairData.tokenOut,\n ]);\n // Subtract token out amount from pool\n pool.updateTokenBalanceForPool(\n pairData.tokenOut,\n BigNumber.from(poolBalances[1]).sub(amountOutEvm)\n );\n\n if (\n pool.SubgraphType == 'StablePhantom' ||\n pool.SubgraphType == 'ComposableStable'\n ) {\n // Add value because exiting pool increases pre-minted BPT being held by the pool\n // totalShares is updated as a side effect on SOR\n pool.updateTokenBalanceForPool(\n pool.address,\n BigNumber.from(poolBalances[0]).add(bptIn)\n );\n } else {\n // Exiting a pool is equivalent to removing from totalSupply (totalShares) so must sub here\n pool.updateTokenBalanceForPool(pool.address, pool.totalShares.sub(bptIn));\n }\n\n const tokensWithoutBpt = pool.tokensList.filter(\n (t: string) => !isSameAddress(t, pool.address)\n );\n const amountsOut = new Array(tokensWithoutBpt.length).fill('0');\n amountsOut[Number(tokenIndex)] = amountOutEvm.toString();\n return [bptIn, tokensWithoutBpt, amountsOut];\n }\n\n /**\n * Perform the specified exit type.\n * @param exitPoolRequest\n * @returns tokens out\n */\n async doExitPool(\n exitPoolRequest: ExitPoolRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n const pool = pools[exitPoolRequest.poolId];\n const exitKind = this.exitKind(\n pool.SubgraphType,\n exitPoolRequest.encodedUserData\n );\n let amountsOut: string[] = [];\n let bptIn: string;\n let tokensOut: string[] = [];\n const tokens: string[] = [];\n const deltas: string[] = [];\n if (exitKind === WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\n [bptIn, tokensOut, amountsOut] = this.exactBptInForTokensOut(\n exitPoolRequest.encodedUserData,\n pool\n );\n } else if (\n exitKind === WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT\n ) {\n [bptIn, tokensOut, amountsOut] = this.exactBptInForOneTokenOut(\n exitPoolRequest.encodedUserData,\n pool\n );\n } else throw new Error('Exit type not implemented');\n\n // Save any chained references\n for (let i = 0; i < exitPoolRequest.outputReferences.length; i++) {\n const tokenOut =\n pool.tokensList[exitPoolRequest.outputReferences[i].index];\n const tokenOutIndex = tokensOut.indexOf(tokenOut);\n if (tokenOutIndex === -1) throw new Error('Token out not found');\n this.relayerModel.setChainedReferenceValue(\n exitPoolRequest.outputReferences[i].key.toString(),\n amountsOut[tokenOutIndex]\n );\n }\n tokens.push(pool.address, ...tokensOut);\n deltas.push(bptIn, ...amountsOut.map((a) => Zero.sub(a).toString()));\n return [tokens, deltas];\n }\n}\n","import { parseFixed, BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { Zero } from '@ethersproject/constants';\nimport { bnum } from '@balancer-labs/sor';\n\nimport { PoolDictionary, Pool } from '../poolSource';\nimport { EncodeBatchSwapInput } from '@/modules/relayer/types';\nimport { Swap, SwapType } from '@/modules/swaps/types';\nimport { Relayer } from '@/modules/relayer/relayer.module';\nimport { RelayerModel } from '../relayer';\nimport { ActionType } from '../vaultModel.module';\n\nexport interface SwapRequest\n extends Pick {\n actionType: ActionType.Swap;\n}\n\nexport interface BatchSwapRequest\n extends Pick<\n EncodeBatchSwapInput,\n 'swaps' | 'assets' | 'funds' | 'swapType' | 'outputReferences'\n > {\n actionType: ActionType.BatchSwap;\n}\n\nexport class SwapModel {\n constructor(private relayerModel: RelayerModel) {}\n\n /**\n * Performs a single swap with one pool.\n * @param swapRequest\n * @returns Returns the net Vault asset balance delta. Positive amount represent token (or ETH) sent to the Vault, and negative amount represent token (or ETH) sent by the Vault. Delta corresponds to the asset out.\n */\n async doSingleSwap(\n swapRequest: SwapRequest,\n pools: PoolDictionary\n ): Promise {\n const amountIn = this.relayerModel.doChainedRefReplacement(\n swapRequest.request.amount.toString()\n );\n\n const pool = pools[swapRequest.request.poolId];\n const [, amountOutEvm] = this.doSwap(\n swapRequest.request.assetIn,\n swapRequest.request.assetOut,\n pool,\n swapRequest.request.kind,\n amountIn\n );\n\n const delta = Zero.sub(amountOutEvm);\n if (!swapRequest.outputReference)\n throw new Error('Missing outputReference');\n\n // Swap return values are signed, as they are Vault deltas (positive values correspond to assets sent\n // to the Vault, and negative values are assets received from the Vault). To simplify the chained reference\n // value model, we simply store the absolute value.\n this.relayerModel.setChainedReferenceValue(\n swapRequest.outputReference.toString(),\n delta.abs().toString()\n );\n return [delta.toString(), amountIn];\n }\n\n /**\n * Performs a series of swaps with one or multiple Pools.\n * @param batchSwapRequest\n * @returns Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array.\n */\n async doBatchSwap(\n batchSwapRequest: BatchSwapRequest,\n pools: PoolDictionary\n ): Promise {\n const assets = batchSwapRequest.assets;\n const deltas = new Array(assets.length).fill(Zero);\n // Used for multihop swaps where previous swap return is used as input to next swap\n let previousAmount: string;\n\n for (let i = 0; i < batchSwapRequest.swaps.length; ++i) {\n const amount = batchSwapRequest.swaps[i].amount;\n if (Relayer.isChainedReference(amount)) {\n batchSwapRequest.swaps[i].amount =\n this.relayerModel.getChainedReferenceValue(amount);\n }\n }\n\n // Handle each swap in order\n batchSwapRequest.swaps.forEach((swap) => {\n const tokenIn = assets[swap.assetInIndex];\n const tokenOut = assets[swap.assetOutIndex];\n const pool = pools[swap.poolId];\n let amount = swap.amount;\n if (amount === '0') amount = previousAmount;\n const [amountInEvm, amountOutEvm] = this.doSwap(\n tokenIn,\n tokenOut,\n pool,\n batchSwapRequest.swapType,\n amount\n );\n\n previousAmount =\n batchSwapRequest.swapType === SwapType.SwapExactIn\n ? amountOutEvm.toString()\n : amountInEvm.toString();\n\n deltas[swap.assetInIndex] = deltas[swap.assetInIndex].add(amountInEvm);\n deltas[swap.assetOutIndex] = deltas[swap.assetOutIndex].sub(amountOutEvm);\n });\n\n for (let i = 0; i < batchSwapRequest.outputReferences.length; i++) {\n // Batch swap return values are signed, as they are Vault deltas (positive values correspond to assets sent\n // to the Vault, and negative values are assets received from the Vault). To simplify the chained reference\n // value model, we simply store the absolute value.\n this.relayerModel.setChainedReferenceValue(\n batchSwapRequest.outputReferences[i].key.toString(),\n deltas[batchSwapRequest.outputReferences[i].index].abs().toString()\n );\n }\n return deltas.map((d) => d.toString());\n }\n\n /**\n * Perform swap against a pool (and update balances)\n * @param tokenIn\n * @param tokenOut\n * @param pool\n * @param swapType\n * @param amount (EVM Scale)\n * @returns\n */\n doSwap(\n tokenIn: string,\n tokenOut: string,\n pool: Pool,\n swapType: SwapType,\n amount: string\n ): BigNumber[] {\n const pairData = pool.parsePoolPairData(tokenIn, tokenOut);\n const isExactIn = swapType === SwapType.SwapExactIn;\n let amountInEvm: string | BigNumber = isExactIn\n ? BigNumber.from(amount)\n : Zero;\n let amountOutEvm: string | BigNumber = isExactIn\n ? Zero\n : BigNumber.from(amount);\n const amountInHuman: string | BigNumber = formatFixed(\n amountInEvm,\n pairData.decimalsIn\n );\n const amountOutHuman: string | BigNumber = formatFixed(\n amountOutEvm,\n pairData.decimalsOut\n );\n\n if (isExactIn) {\n // Needs human scale\n const amountOutHuman = pool\n ._exactTokenInForTokenOut(\n pairData as never,\n bnum(amountInHuman.toString())\n )\n .dp(pairData.decimalsOut);\n amountOutEvm = parseFixed(\n amountOutHuman.toString(),\n pairData.decimalsOut\n );\n } else {\n // Needs human scale\n const amountInHuman = pool\n ._tokenInForExactTokenOut(\n pairData as never,\n bnum(amountOutHuman.toString())\n )\n .dp(pairData.decimalsIn);\n amountInEvm = parseFixed(amountInHuman.toString(), pairData.decimalsIn);\n }\n // Update balances of tokenIn and tokenOut - use EVM scale\n pool.updateTokenBalanceForPool(\n pairData.tokenIn,\n pairData.balanceIn.add(amountInEvm)\n );\n pool.updateTokenBalanceForPool(\n pairData.tokenOut,\n pairData.balanceOut.sub(amountOutEvm)\n );\n return [amountInEvm, amountOutEvm];\n }\n}\n","import { LinearPool } from '@balancer-labs/sor';\nimport { parseFixed } from '@ethersproject/bignumber';\n\nimport { EncodeUnwrapAaveStaticTokenInput } from '@/modules/relayer/types';\n\nimport { PoolDictionary } from '../poolSource';\nimport { RelayerModel } from '../relayer';\nimport { ActionType } from '../vaultModel.module';\nimport { WeiPerEther, Zero } from '@ethersproject/constants';\nimport { SolidityMaths } from '@/lib/utils/solidityMaths';\n\nexport interface UnwrapRequest\n extends Pick {\n poolId: string;\n actionType: ActionType.Unwrap;\n}\n\nexport class UnwrapModel {\n constructor(private relayerModel: RelayerModel) {}\n\n /**\n * Perform the specified unwrap type.\n * @param unwrapRequest\n * @param pools\n * @returns tokens out and their respective deltas\n */\n async doUnwrap(\n unwrapRequest: UnwrapRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n const pool = pools[unwrapRequest.poolId] as LinearPool;\n const wrappedToken = pool.tokens[pool.wrappedIndex];\n const underlyingToken = pool.tokens[pool.mainIndex];\n\n const amountIn = this.relayerModel.doChainedRefReplacement(\n unwrapRequest.amount.toString()\n );\n\n // must be negative because is leaving the vault\n const amountOut = SolidityMaths.divDownFixed(\n SolidityMaths.mulDownFixed(\n BigInt(amountIn),\n parseFixed(wrappedToken.priceRate, 18).toBigInt()\n ),\n WeiPerEther.toBigInt()\n ).toString();\n\n // Save chained references\n this.relayerModel.setChainedReferenceValue(\n unwrapRequest.outputReference.toString(),\n amountOut\n );\n\n const tokens = [wrappedToken.address, underlyingToken.address];\n const deltas = [amountIn, Zero.sub(amountOut).toString()];\n return [tokens, deltas];\n }\n}\n","import { PoolDictionary } from '../poolSource';\nimport { RelayerModel } from '../relayer';\nimport { JoinModel, JoinPoolRequest } from './join';\nimport { ExitModel, ExitPoolRequest } from './exit';\nimport { SwapModel, BatchSwapRequest, SwapRequest } from './swap';\nimport { UnwrapModel, UnwrapRequest } from './unwrap';\n\nexport class PoolModel {\n joinModel: JoinModel;\n exitModel: ExitModel;\n swapModel: SwapModel;\n unwrapModel: UnwrapModel;\n\n constructor(private relayerModel: RelayerModel) {\n this.joinModel = new JoinModel(relayerModel);\n this.exitModel = new ExitModel(relayerModel);\n this.swapModel = new SwapModel(relayerModel);\n this.unwrapModel = new UnwrapModel(relayerModel);\n }\n\n async doJoin(\n joinPoolRequest: JoinPoolRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n return this.joinModel.doJoinPool(joinPoolRequest, pools);\n }\n\n async doExit(\n exitPoolRequest: ExitPoolRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n return this.exitModel.doExitPool(exitPoolRequest, pools);\n }\n\n async doBatchSwap(\n batchSwapRequest: BatchSwapRequest,\n pools: PoolDictionary\n ): Promise {\n return this.swapModel.doBatchSwap(batchSwapRequest, pools);\n }\n\n async doSingleSwap(\n swapRequest: SwapRequest,\n pools: PoolDictionary\n ): Promise {\n return this.swapModel.doSingleSwap(swapRequest, pools);\n }\n\n async doUnwrap(\n unwrapRequest: UnwrapRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n return this.unwrapModel.doUnwrap(unwrapRequest, pools);\n }\n}\n","import { Relayer } from '@/modules/relayer/relayer.module';\n\nexport class RelayerModel {\n chainedRefs: Record = {};\n\n /**\n * Stores `value` as the amount referenced by chained reference `ref`.\n * @param ref\n * @param value\n */\n setChainedReferenceValue(ref: string, value: string): void {\n this.chainedRefs[ref] = value;\n }\n\n /**\n * Returns the amount referenced by chained reference `ref`.\n * @param ref\n * @returns\n */\n getChainedReferenceValue(ref: string): string {\n return this.chainedRefs[ref];\n }\n\n doChainedRefReplacement(amount: string): string {\n if (Relayer.isChainedReference(amount.toString())) {\n return this.getChainedReferenceValue(amount.toString());\n } else return amount;\n }\n\n doChainedRefReplacements(amounts: string[]): string[] {\n return amounts.map((amount) =>\n this.doChainedRefReplacement(amount).toString()\n );\n }\n}\n","import { cloneDeep } from 'lodash';\nimport {\n SubgraphPoolBase,\n SubgraphToken,\n PoolDataService,\n WeightedPool,\n StablePool,\n MetaStablePool,\n LinearPool,\n PhantomStablePool,\n ComposableStablePool,\n} from '@balancer-labs/sor';\nimport { Logger } from '@/lib/utils/logger';\n\nexport interface PoolDictionary {\n [poolId: string]: Pool;\n}\n\nexport type Pool =\n | (\n | WeightedPool\n | StablePool\n | LinearPool\n | MetaStablePool\n | PhantomStablePool\n | ComposableStablePool\n ) & { SubgraphType: string };\n\nexport class PoolsSource {\n poolsArray: SubgraphPoolBase[] = [];\n poolsDict: PoolDictionary = {};\n constructor(\n private poolDataService: PoolDataService,\n private wrappedNativeAsset: string\n ) {}\n dataSource(): PoolDataService {\n return this.poolDataService;\n }\n\n async all(refresh = false): Promise {\n if (refresh || this.poolsArray.length === 0) {\n const list = cloneDeep(await this.dataSource().getPools());\n for (const pool of list) {\n // For non pre-minted BPT pools we add the BPT to the token list. This makes the SOR functions work for joins/exits\n if (\n [\n 'Weighted',\n 'Investment',\n 'Stable',\n 'LiquidityBootstrapping',\n ].includes(pool.poolType)\n ) {\n const BptAsToken: SubgraphToken = {\n address: pool.address,\n balance: pool.totalShares,\n decimals: 18,\n priceRate: '1',\n weight: '0',\n };\n pool.tokens.push(BptAsToken);\n pool.tokensList.push(pool.address);\n }\n }\n this.poolsArray = list;\n }\n return this.poolsArray;\n }\n\n parseToPoolsDict(pools: SubgraphPoolBase[]): PoolDictionary {\n return Object.fromEntries(\n cloneDeep(pools)\n .filter(\n (pool) => pool.tokensList.length > 0 && pool.tokens[0].balance !== '0'\n )\n .map((pool) => [pool.id, this.parseNewPool(pool)])\n .filter(([, pool]) => pool !== undefined)\n );\n }\n\n parseNewPool(subgraphPool: SubgraphPoolBase): Pool | undefined {\n // We're not interested in any pools which don't allow swapping\n if (!subgraphPool.swapEnabled) return undefined;\n\n let pool: Pool = {} as Pool;\n\n try {\n if (\n ['Weighted', 'Investment', 'LiquidityBootstrapping'].includes(\n subgraphPool.poolType\n )\n ) {\n const sorPool = WeightedPool.fromPool(subgraphPool, false);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType === 'Stable') {\n const sorPool = StablePool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType === 'MetaStable') {\n const sorPool = MetaStablePool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType.toString().includes('Linear')) {\n const sorPool = LinearPool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType === 'StablePhantom') {\n const sorPool = PhantomStablePool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType === 'ComposableStable') {\n const sorPool = ComposableStablePool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else {\n const logger = Logger.getInstance();\n logger.warn(\n `Unknown pool type or type field missing: ${subgraphPool.poolType} ${subgraphPool.id}`\n );\n return undefined;\n }\n if (!pool) throw new Error('Issue with Pool');\n pool.SubgraphType = subgraphPool.poolType;\n } catch (err) {\n console.error(`Error parseNewPool`);\n return undefined;\n }\n return pool;\n }\n\n /**\n * Converts Subgraph array into PoolDictionary\n * @param refresh\n * @returns\n */\n async poolsDictionary(refresh = false): Promise {\n if (refresh || Object.keys(this.poolsDict).length === 0) {\n const poolsArray = await this.all(refresh);\n this.poolsDict = this.parseToPoolsDict(poolsArray);\n }\n return this.poolsDict;\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { Zero } from '@ethersproject/constants';\nimport { PoolDataService } from '@balancer-labs/sor';\n\nimport { PoolModel } from './poolModel/poolModel';\nimport { JoinPoolRequest } from './poolModel/join';\nimport { ExitPoolRequest } from './poolModel/exit';\nimport { BatchSwapRequest, SwapRequest } from './poolModel/swap';\nimport { UnwrapRequest } from './poolModel/unwrap';\nimport { RelayerModel } from './relayer';\nimport { PoolsSource } from './poolSource';\nimport {\n EncodeBatchSwapInput,\n EncodeJoinPoolInput,\n EncodeExitPoolInput,\n} from '../relayer/types';\nimport { Swap } from '../swaps/types';\n\nexport enum ActionType {\n BatchSwap,\n Join,\n Exit,\n Swap,\n Unwrap,\n}\n\nexport type Requests =\n | BatchSwapRequest\n | JoinPoolRequest\n | ExitPoolRequest\n | SwapRequest\n | UnwrapRequest;\n\n/**\n * Controller / use-case layer for interacting with pools data.\n */\nexport class VaultModel {\n poolsSource: PoolsSource;\n\n constructor(poolDataService: PoolDataService, wrappedNativeAsset: string) {\n this.poolsSource = new PoolsSource(poolDataService, wrappedNativeAsset);\n }\n\n updateDeltas(\n deltas: Record,\n assets: string[],\n amounts: string[]\n ): Record {\n assets.forEach((t, i) => {\n if (!deltas[t]) deltas[t] = Zero;\n deltas[t] = deltas[t].add(amounts[i]);\n });\n return deltas;\n }\n\n async multicall(\n rawCalls: Requests[],\n refresh = false\n ): Promise> {\n const relayerModel = new RelayerModel();\n const poolModel = new PoolModel(relayerModel);\n const pools = await this.poolsSource.poolsDictionary(refresh);\n const deltas: Record = {};\n for (const call of rawCalls) {\n let tokens: string[] = [];\n let amounts: string[] = [];\n switch (call.actionType) {\n case ActionType.Join: {\n [tokens, amounts] = await poolModel.doJoin(call, pools);\n break;\n }\n case ActionType.Exit: {\n [tokens, amounts] = await poolModel.doExit(call, pools);\n break;\n }\n case ActionType.BatchSwap: {\n tokens = call.assets;\n amounts = await poolModel.doBatchSwap(call, pools);\n break;\n }\n case ActionType.Swap: {\n tokens = [call.request.assetOut, call.request.assetIn];\n amounts = await poolModel.doSingleSwap(call, pools);\n break;\n }\n case ActionType.Unwrap: {\n [tokens, amounts] = await poolModel.doUnwrap(call, pools);\n break;\n }\n default:\n break;\n }\n this.updateDeltas(deltas, tokens, amounts);\n }\n return deltas;\n }\n\n static mapSwapRequest(call: Swap): SwapRequest {\n const swapRequest: SwapRequest = {\n actionType: ActionType.Swap,\n request: call.request,\n funds: call.funds,\n outputReference: call.outputReference,\n };\n return swapRequest;\n }\n\n static mapBatchSwapRequest(call: EncodeBatchSwapInput): BatchSwapRequest {\n const batchSwapRequest: BatchSwapRequest = {\n actionType: ActionType.BatchSwap,\n swaps: call.swaps,\n assets: call.assets,\n funds: call.funds,\n swapType: call.swapType,\n outputReferences: call.outputReferences,\n };\n return batchSwapRequest;\n }\n\n static mapJoinPoolRequest(call: EncodeJoinPoolInput): JoinPoolRequest {\n const joinPoolRequest: JoinPoolRequest = {\n actionType: ActionType.Join,\n poolId: call.poolId,\n encodedUserData: call.joinPoolRequest.userData,\n outputReference: call.outputReference,\n };\n return joinPoolRequest;\n }\n\n static mapExitPoolRequest(call: EncodeExitPoolInput): ExitPoolRequest {\n const exitPoolRequest: ExitPoolRequest = {\n actionType: ActionType.Exit,\n poolId: call.poolId,\n encodedUserData: call.exitPoolRequest.userData,\n outputReferences: call.outputReferences,\n };\n return exitPoolRequest;\n }\n\n static mapUnwrapRequest(\n amount: BigNumberish,\n outputReference: BigNumberish,\n poolId: string\n ): UnwrapRequest {\n const unwrapRequest: UnwrapRequest = {\n actionType: ActionType.Unwrap,\n poolId,\n amount,\n outputReference,\n };\n return unwrapRequest;\n }\n}\n","import { cloneDeep } from 'lodash';\nimport { BigNumber, BigNumberish, parseFixed } from '@ethersproject/bignumber';\nimport { AddressZero, WeiPerEther, Zero } from '@ethersproject/constants';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { EncodeJoinPoolInput, Relayer } from '@/modules/relayer/relayer.module';\nimport {\n FundManagement,\n SingleSwap,\n Swap,\n SwapType,\n} from '@/modules/swaps/types';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport { BalancerNetworkConfig, JoinPoolRequest, PoolType } from '@/types';\nimport { PoolGraph, Node } from '../graph/graph';\n\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { networkAddresses } from '@/lib/constants/config';\nimport { AssetHelpers, getEthValue, isSameAddress, replace } from '@/lib/utils';\nimport {\n SolidityMaths,\n _computeScalingFactor,\n _upscale,\n} from '@/lib/utils/solidityMaths';\nimport { calcPriceImpact } from '../pricing/priceImpact';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { getPoolAddress } from '@/pool-utils';\nimport { Simulation, SimulationType } from '../simulation/simulation.module';\nimport { Requests, VaultModel } from '../vaultModel/vaultModel.module';\nimport { SwapRequest } from '../vaultModel/poolModel/swap';\nimport { JoinPoolRequest as JoinPoolModelRequest } from '../vaultModel/poolModel/join';\nimport { JsonRpcSigner } from '@ethersproject/providers';\nimport { BalancerRelayer__factory } from '@/contracts/factories/BalancerRelayer__factory';\nimport { Logger } from '@/lib/utils/logger';\n\nconst balancerRelayerInterface = BalancerRelayer__factory.createInterface();\n\n// Quickly switch useful debug logs on/off\nconst DEBUG = false;\n\nfunction debugLog(log: string) {\n const logger = Logger.getInstance();\n if (DEBUG) logger.info(log);\n}\n\nexport class Join {\n private relayer: string;\n private wrappedNativeAsset;\n constructor(\n private poolGraph: PoolGraph,\n networkConfig: BalancerNetworkConfig,\n private simulationService: Simulation\n ) {\n const { tokens, contracts } = networkAddresses(networkConfig.chainId);\n this.relayer = contracts.balancerRelayer;\n this.wrappedNativeAsset = tokens.wrappedNativeAsset;\n }\n\n private checkInputs(tokensIn: string[], amountsIn: string[]) {\n if (tokensIn.length === 0)\n throw new BalancerError(BalancerErrorCode.MISSING_TOKENS);\n\n if (amountsIn.every((a) => a === '0'))\n throw new BalancerError(BalancerErrorCode.JOIN_WITH_ZERO_AMOUNT);\n\n if (tokensIn.length != amountsIn.length)\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n\n if (\n tokensIn.some((t) => t === AddressZero) &&\n tokensIn.some(\n (t) => t.toLowerCase() === this.wrappedNativeAsset.toLowerCase()\n )\n )\n throw new BalancerError(BalancerErrorCode.INPUT_TOKEN_INVALID);\n }\n\n async joinPool(\n poolId: string,\n tokensIn: string[],\n amountsIn: string[],\n userAddress: string,\n slippage: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType,\n authorisation?: string\n ): Promise<{\n to: string;\n encodedCall: string;\n expectedOut: string;\n minOut: string;\n priceImpact: string;\n value: BigNumberish;\n }> {\n this.checkInputs(tokensIn, amountsIn);\n\n // Create nodes for each pool/token interaction and order by breadth first\n const orderedNodes = await this.poolGraph.getGraphNodes(true, poolId, []);\n\n const nativeAssetIndex = tokensIn.findIndex((t) => t === AddressZero);\n const isNativeAssetJoin = nativeAssetIndex !== -1;\n const tokensInWithoutNativeAsset = replace(\n tokensIn,\n nativeAssetIndex,\n this.wrappedNativeAsset.toLowerCase()\n );\n\n const joinPaths = Join.getJoinPaths(\n orderedNodes,\n tokensInWithoutNativeAsset,\n amountsIn\n );\n\n const totalBptZeroPi = Join.totalBptZeroPriceImpact(joinPaths);\n /*\n - Create calls with 0 min bpt for each root join\n - static call (or V4 special call) to get actual amounts for each root join\n - Apply slippage to amounts\n - Recreate calls with minAmounts === actualAmountsWithSlippage\n - Return minAmoutOut (sum actualAmountsWithSlippage), UI would use this to display to user\n - Return updatedCalls, UI would use this to execute tx\n */\n // Create calls with 0 expected for each root join\n // Peek is enabled here so we can static call the returned amounts and use these to set limits\n debugLog(`\\n--- Simulation Calls ---`);\n const {\n multiRequests,\n encodedCall: queryData,\n outputIndexes,\n } = await this.createCalls(\n joinPaths,\n userAddress,\n isNativeAssetJoin,\n undefined,\n authorisation\n );\n\n // TODO: add this back once relayerV6 is released and we're able to peek while joining with ETH\n // const simulationValue = isNativeAssetJoin\n // ? simulationDeltas[this.wrappedNativeAsset.toLowerCase()]\n // : Zero;\n\n // static call (or V4 special call) to get actual amounts for each root join\n const { amountsOut, totalAmountOut } = await this.amountsOutByJoinPath(\n userAddress,\n multiRequests,\n queryData,\n tokensInWithoutNativeAsset,\n outputIndexes,\n signer,\n simulationType,\n '0' // TODO: change to simulationValue.tosString() once relayerV6 is released\n );\n\n const { minAmountsOut, totalMinAmountOut } = this.minAmountsOutByJoinPath(\n slippage,\n amountsOut,\n totalAmountOut\n );\n const priceImpact = calcPriceImpact(\n BigInt(totalAmountOut),\n totalBptZeroPi.toBigInt(),\n true\n ).toString();\n\n // Create calls with minAmountsOut\n debugLog(`\\n--- Final Calls ---`);\n const { encodedCall, deltas } = await this.createCalls(\n joinPaths,\n userAddress,\n isNativeAssetJoin,\n minAmountsOut,\n authorisation\n );\n\n const value = isNativeAssetJoin\n ? deltas[this.wrappedNativeAsset.toLowerCase()]\n : Zero;\n debugLog(`Total value: ${value.toString()}`);\n\n this.assertDeltas(\n poolId,\n deltas,\n tokensInWithoutNativeAsset,\n amountsIn,\n totalMinAmountOut\n );\n\n return {\n to: this.relayer,\n encodedCall,\n expectedOut: totalAmountOut,\n minOut: totalMinAmountOut,\n priceImpact,\n value,\n };\n }\n\n private assertDeltas(\n poolId: string,\n deltas: Record,\n tokensIn: string[],\n amountsIn: string[],\n minBptOut: string\n ): void {\n const poolAddress = getPoolAddress(poolId);\n const outDiff = deltas[poolAddress.toLowerCase()].add(minBptOut);\n\n if (outDiff.abs().gt(3)) {\n console.error(\n `join assertDeltas, bptOut: `,\n poolAddress,\n minBptOut,\n deltas[poolAddress.toLowerCase()]?.toString()\n );\n throw new BalancerError(BalancerErrorCode.JOIN_DELTA_AMOUNTS);\n }\n delete deltas[poolAddress.toLowerCase()];\n\n tokensIn.forEach((token, i) => {\n if (\n !BigNumber.from(amountsIn[i]).eq(0) &&\n deltas[token.toLowerCase()]?.toString() !== amountsIn[i]\n ) {\n console.error(\n `join assertDeltas, tokenIn: `,\n token,\n amountsIn[i],\n deltas[token.toLowerCase()]?.toString()\n );\n throw new BalancerError(BalancerErrorCode.JOIN_DELTA_AMOUNTS);\n }\n delete deltas[token.toLowerCase()];\n });\n\n for (const token in deltas) {\n if (deltas[token].toString() !== '0') {\n console.error(\n `join assertDeltas, non-input token should be 0: `,\n token,\n deltas[token].toString()\n );\n throw new BalancerError(BalancerErrorCode.JOIN_DELTA_AMOUNTS);\n }\n }\n }\n\n // Create join paths from tokensIn all the way to the root node.\n static getJoinPaths = (\n orderedNodes: Node[],\n tokensIn: string[],\n amountsIn: string[]\n ): Node[][] => {\n const joinPaths: Node[][] = [];\n\n // Filter all nodes that contain a token in the tokensIn array\n const inputNodes = orderedNodes.filter((node) =>\n tokensIn\n .filter((t, i) => BigNumber.from(amountsIn[i]).gt(0)) // Remove input tokens with 0 amounts\n .map((tokenIn) => tokenIn.toLowerCase())\n .includes(node.address.toLowerCase())\n );\n\n // If inputNodes contain at least one leaf token, then add path to join proportionally with all leaf tokens contained in tokensIn\n const containsLeafNode = inputNodes.some((node) => node.isLeaf);\n if (containsLeafNode) {\n joinPaths.push(orderedNodes);\n }\n\n // Add a join path for each non-leaf input node\n const nonLeafInputNodes = inputNodes.filter((node) => !node.isLeaf);\n nonLeafInputNodes.forEach((nonLeafInputNode) => {\n // Get amount in for current node\n const nonLeafAmountIn = amountsIn.find((amountIn, i) =>\n isSameAddress(tokensIn[i], nonLeafInputNode.address)\n ) as string;\n // Split amount in between nodes with same non-leaf input token based on proportionOfParent\n const totalProportions = nonLeafInputNodes\n .filter((node) => isSameAddress(node.address, nonLeafInputNode.address))\n .reduce(\n (total, node) => total.add(node.proportionOfParent),\n BigNumber.from(0)\n );\n const proportionalNonLeafAmountIn = BigNumber.from(nonLeafAmountIn)\n .mul(nonLeafInputNode.proportionOfParent)\n .div(totalProportions)\n .toString();\n // Create input node for current non-leaf input token\n const [inputTokenNode] = PoolGraph.createInputTokenNode(\n 0, // temp value that will be updated after creation\n nonLeafInputNode.address,\n nonLeafInputNode.decimals,\n nonLeafInputNode.parent,\n WeiPerEther,\n nonLeafInputNode.balance\n );\n // Update index to be actual amount in\n inputTokenNode.index = proportionalNonLeafAmountIn;\n inputTokenNode.isLeaf = false;\n // Start join path with input node\n const nonLeafJoinPath = [inputTokenNode];\n // Add each parent to the join path until we reach the root node\n let parent = inputTokenNode.parent;\n let currentChild = inputTokenNode;\n while (parent) {\n const parentCopy = cloneDeep(parent);\n parentCopy.children = parentCopy.children.map((child) => {\n if (child.address === currentChild.address) {\n // Replace original child with current child that was modified to handle the non-leaf join\n return currentChild;\n } else {\n // Update index of siblings that are not within the join path to be 0\n return { ...child, index: '0' };\n }\n });\n nonLeafJoinPath.push(parentCopy);\n currentChild = parentCopy;\n parent = parentCopy.parent;\n }\n // Add join path to list of join paths\n joinPaths.push(nonLeafJoinPath);\n });\n\n // After creating all join paths, update the index of each input node to be the amount in for that node\n // All other node indexes will be used as a reference to store the amounts out for that node\n this.updateInputAmounts(joinPaths, tokensIn, amountsIn);\n\n return joinPaths;\n };\n\n /*\n AmountsIn should be adjusted after being split between tokensIn to fix eventual rounding issues.\n This prevents the transaction to leave out dust amounts.\n */\n private static updateInputAmounts = (\n joinPaths: Node[][],\n tokensIn: string[],\n amountsIn: string[]\n ): void => {\n // Helper function to calculate and adjust amount difference for each token in\n const ajdustAmountInDiff = (\n tokenInInputNodes: Node[],\n amountIn: string\n ): void => {\n if (tokenInInputNodes.length > 1) {\n // Sum of amountsIn from each input node with same tokenIn\n const amountsInSumforTokenIn = tokenInInputNodes.reduce(\n (sum, currentNode) => sum.add(currentNode.index),\n BigNumber.from(0)\n );\n // Compare total amountIn with sum of amountIn split between each input node with same tokenIn\n const diff = BigNumber.from(amountIn).sub(amountsInSumforTokenIn);\n // Apply difference to first input node with same tokenIn\n tokenInInputNodes[0].index = diff\n .add(tokenInInputNodes[0].index)\n .toString();\n }\n };\n\n // Update amountsIn within leaf join path\n const leafJoinPath = joinPaths.find((joinPath) => joinPath[0].isLeaf);\n if (leafJoinPath) {\n // Update input proportions so inputs are shared correctly between leaf nodes with same tokenIn\n const totalProportions = this.updateTotalProportions(leafJoinPath);\n // Update input nodes to have correct input amount\n leafJoinPath.forEach((node) => {\n if (node.joinAction === 'input')\n node = this.updateNodeAmount(\n node,\n tokensIn,\n amountsIn,\n totalProportions\n );\n });\n // Adjust amountIn for each tokenIn to fix eventual rounding issues\n tokensIn.forEach((tokenIn, i) => {\n const tokenInInputNodes = leafJoinPath.filter(\n (inputNode) =>\n inputNode.isLeaf && isSameAddress(inputNode.address, tokenIn)\n );\n ajdustAmountInDiff(tokenInInputNodes, amountsIn[i]);\n });\n }\n\n // Adjust amountsIn shared between non-leaf join paths with same tokenIn\n const nonLeafJoinPaths = joinPaths.filter(\n (joinPath) => !joinPath[0].isLeaf\n );\n if (nonLeafJoinPaths.length > 1) {\n tokensIn.forEach((tokenIn, i) => {\n const tokenInInputNodes = nonLeafJoinPaths\n .map((path) => path[0])\n .filter((node) => isSameAddress(node.address, tokenIn));\n ajdustAmountInDiff(tokenInInputNodes, amountsIn[i]);\n });\n }\n };\n\n private createCalls = async (\n joinPaths: Node[][],\n userAddress: string,\n isNativeAssetJoin: boolean,\n minAmountsOut?: string[], // one for each joinPath\n authorisation?: string\n ): Promise<{\n multiRequests: Requests[][];\n encodedCall: string;\n outputIndexes: number[];\n deltas: Record;\n }> => {\n // Create calls for both leaf and non-leaf inputs\n const { multiRequests, encodedCalls, outputIndexes, deltas } =\n this.createActionCalls(\n joinPaths,\n userAddress,\n isNativeAssetJoin,\n minAmountsOut\n );\n\n if (authorisation) {\n encodedCalls.unshift(this.createSetRelayerApproval(authorisation));\n }\n const encodedCall = balancerRelayerInterface.encodeFunctionData(\n 'multicall',\n [encodedCalls]\n );\n\n return {\n multiRequests,\n encodedCall,\n outputIndexes: authorisation\n ? outputIndexes.map((i) => i + 1)\n : outputIndexes,\n deltas,\n };\n };\n\n /*\n 1. For each input token:\n 1. recursively find the spot price for each pool in the path of the join\n 2. take the product to get the spot price of the path\n 3. multiply the input amount of that token by the path spot price to get the \"zeroPriceImpact\" amount of BPT for that token\n 2. Sum each tokens zeroPriceImpact BPT amount to get total zeroPriceImpact BPT\n */\n static totalBptZeroPriceImpact = (joinPaths: Node[][]): BigNumber => {\n // Add bptZeroPriceImpact for all inputs\n let totalBptZeroPi = BigNumber.from('0');\n joinPaths.forEach((joinPath) => {\n const isLeafJoin = joinPath[0].isLeaf;\n if (isLeafJoin) {\n // Calculate bptZeroPriceImpact for leaf inputs\n const leafNodes = joinPath.filter((node) => node.isLeaf);\n leafNodes.forEach((leafNode) => {\n const bptOut = this.bptOutZeroPiForInputNode(leafNode);\n totalBptZeroPi = totalBptZeroPi.add(bptOut);\n });\n } else {\n // Calculate bptZeroPriceImpact for non-leaf inputs\n const bptOut = this.bptOutZeroPiForInputNode(joinPath[0]);\n totalBptZeroPi = totalBptZeroPi.add(bptOut);\n }\n });\n return totalBptZeroPi;\n };\n\n /*\n 1. recursively find the spot price for each pool in the path of the join\n 2. take the product to get the spot price of the path\n 3. multiply the input amount of that token by the path spot price to get the \"zeroPriceImpact\" amount of BPT for that token \n */\n static bptOutZeroPiForInputNode = (inputNode: Node): bigint => {\n if (inputNode.index === '0' || inputNode.joinAction !== 'input')\n return BigInt(0);\n let spProduct = 1;\n let parentNode: Node | undefined = inputNode.parent;\n let childAddress = inputNode.address;\n // Traverse up graph until we reach root adding each node\n while (parentNode !== undefined) {\n if (\n parentNode.joinAction === 'batchSwap' ||\n parentNode.joinAction === 'joinPool'\n ) {\n const sp = parentNode.spotPrices[childAddress.toLowerCase()];\n spProduct = spProduct * parseFloat(sp);\n childAddress = parentNode.address;\n }\n parentNode = parentNode.parent;\n }\n const spPriceScaled = parseFixed(spProduct.toFixed(18), 18);\n const scalingFactor = _computeScalingFactor(BigInt(inputNode.decimals));\n const inputAmountScaled = _upscale(BigInt(inputNode.index), scalingFactor);\n const bptOut = SolidityMaths.divDownFixed(\n inputAmountScaled,\n spPriceScaled.toBigInt()\n );\n return bptOut;\n };\n\n /*\n Simulate transaction and decodes each output of interest.\n */\n private amountsOutByJoinPath = async (\n userAddress: string,\n multiRequests: Requests[][],\n callData: string,\n tokensIn: string[],\n outputIndexes: number[],\n signer: JsonRpcSigner,\n simulationType: SimulationType,\n value: string\n ): Promise<{ amountsOut: string[]; totalAmountOut: string }> => {\n const amountsOut = await this.simulationService.simulateGeneralisedJoin(\n this.relayer,\n multiRequests,\n callData,\n outputIndexes,\n userAddress,\n tokensIn,\n signer,\n simulationType,\n value\n );\n\n const totalAmountOut = amountsOut\n .reduce((sum, amount) => sum.add(BigNumber.from(amount)), Zero)\n .toString();\n\n return {\n amountsOut,\n totalAmountOut,\n };\n };\n\n /*\n Apply slippage to amounts\n */\n private minAmountsOutByJoinPath = (\n slippage: string,\n amounts: string[],\n totalAmountOut: string\n ): { minAmountsOut: string[]; totalMinAmountOut: string } => {\n const minAmountsOut = amounts.map((amount) =>\n subSlippage(BigNumber.from(amount), BigNumber.from(slippage)).toString()\n );\n const totalMinAmountOut = subSlippage(\n BigNumber.from(totalAmountOut),\n BigNumber.from(slippage)\n ).toString();\n\n return {\n minAmountsOut,\n totalMinAmountOut,\n };\n };\n\n private updateDeltas(\n deltas: Record,\n assets: string[],\n amounts: string[]\n ): Record {\n assets.forEach((t, i) => {\n const asset = t.toLowerCase();\n if (!deltas[asset]) deltas[asset] = Zero;\n deltas[asset] = deltas[asset].add(amounts[i]);\n });\n return deltas;\n }\n\n // Create actions for each Node and return in multicall array\n // Create calls for each path, use value stored in minBptAmounts if available\n private createActionCalls = (\n joinPaths: Node[][],\n userAddress: string,\n isNativeAssetJoin: boolean,\n minAmountsOut?: string[]\n ): {\n multiRequests: Requests[][];\n encodedCalls: string[];\n outputIndexes: number[];\n deltas: Record;\n } => {\n const multiRequests: Requests[][] = [];\n const encodedCalls: string[] = [];\n const outputIndexes: number[] = [];\n const isSimulation = !minAmountsOut;\n const deltas: Record = {};\n\n joinPaths.forEach((joinPath, j) => {\n const isLeafJoin = joinPath[0].isLeaf;\n const modelRequests: Requests[] = [];\n\n joinPath.forEach((node, i) => {\n // Prevent adding action calls with input amounts equal 0\n if (\n node.children.length > 0 &&\n node.children.filter((c) => this.shouldBeConsidered(c)).length === 0\n ) {\n node.index = '0';\n return;\n }\n\n // Sender's rule\n // 1. If any child node is an input node, tokens are coming from the user\n const hasChildInput = node.children\n .filter((c) => this.shouldBeConsidered(c))\n .some((c) => c.joinAction === 'input');\n const sender = hasChildInput ? userAddress : this.relayer;\n\n // Recipient's rule\n // 1. Transactions with sibling input node must be sent to user because it will be the sender of the following transaction (per sender's rule above)\n // e.g. boostedMetaAlt - MAI/bbausd - joining with MAI from user and bbausd from earlier actions. MAI needs to come from user.\n // 2. Last transaction must be sent to the user\n // 3. Otherwise relayer\n // Note: scenario 1 usually happens with joinPool transactions that have both BPT and undelying tokens as tokensIn\n const isLastChainedCall = i === joinPath.length - 1;\n const hasSiblingInput =\n (isLeafJoin && // non-leaf joins don't have siblings that should be considered\n node.parent?.children\n .filter((s) => this.shouldBeConsidered(s))\n .some((s) => s.joinAction === 'input')) ??\n false;\n const recipient =\n isLastChainedCall || hasSiblingInput ? userAddress : this.relayer;\n\n // Last action will use minBptOut to protect user. Middle calls can safely have 0 minimum as tx will revert if last fails.\n const minOut =\n isLastChainedCall && minAmountsOut ? minAmountsOut[j] : '0';\n\n switch (node.joinAction) {\n case 'batchSwap':\n {\n const { modelRequest, encodedCall, assets, amounts } =\n this.createSwap(\n node,\n j,\n minOut,\n sender,\n recipient,\n isNativeAssetJoin,\n isSimulation\n );\n modelRequests.push(modelRequest);\n encodedCalls.push(encodedCall);\n this.updateDeltas(deltas, assets, amounts);\n }\n break;\n case 'joinPool':\n {\n const { modelRequest, encodedCall, assets, amounts, minBptOut } =\n this.createJoinPool(\n node,\n j,\n minOut,\n sender,\n recipient,\n isNativeAssetJoin,\n isSimulation\n );\n modelRequests.push(modelRequest);\n encodedCalls.push(encodedCall);\n this.updateDeltas(\n deltas,\n [node.address, ...assets],\n [minBptOut, ...amounts]\n );\n }\n break;\n default:\n return;\n }\n });\n if (isSimulation) {\n const outputRef = 100 * j;\n const encodedPeekCall = Relayer.encodePeekChainedReferenceValue(\n Relayer.toChainedReference(outputRef, false)\n );\n encodedCalls.push(encodedPeekCall);\n outputIndexes.push(encodedCalls.indexOf(encodedPeekCall));\n }\n multiRequests.push(modelRequests);\n });\n\n return { multiRequests, encodedCalls, outputIndexes, deltas };\n };\n\n /**\n * Creates a map of node address and total proportion. Used for the case where there may be multiple inputs using same token, e.g. DAI input to 2 pools.\n * @param nodes nodes to consider.\n */\n static updateTotalProportions = (\n nodes: Node[]\n ): Record => {\n const totalProportions: Record = {};\n nodes.forEach((node) => {\n if (!totalProportions[node.address])\n totalProportions[node.address] = node.proportionOfParent;\n else {\n totalProportions[node.address] = totalProportions[node.address].add(\n node.proportionOfParent\n );\n }\n });\n return totalProportions;\n };\n\n /**\n * Uses relayer to approve itself to act in behalf of the user\n *\n * @param authorisation Encoded authorisation call.\n * @returns relayer approval call\n */\n private createSetRelayerApproval = (authorisation: string): string => {\n return Relayer.encodeSetRelayerApproval(this.relayer, true, authorisation);\n };\n\n static updateNodeAmount = (\n node: Node,\n tokensIn: string[],\n amountsIn: string[],\n totalProportions: Record\n ): Node => {\n /*\n An input node requires a real amount (not an outputRef) as it is first node in chain.\n This amount will be used when chaining to parent.\n Amounts are split proportionally between all inputs with same token.\n */\n const tokenIndex = tokensIn\n .map((t) => t.toLowerCase())\n .indexOf(node.address.toLowerCase());\n if (tokenIndex === -1) {\n node.index = '0';\n return node;\n }\n\n // Calculate proportional split\n const totalProportion = totalProportions[node.address];\n const inputProportion = node.proportionOfParent\n .mul((1e18).toString())\n .div(totalProportion);\n const inputAmount = inputProportion\n .mul(amountsIn[tokenIndex])\n .div((1e18).toString());\n // Update index with actual value\n node.index = inputAmount.toString();\n // console.log(\n // `${node.type} ${node.address} prop: ${node.proportionOfParent.toString()}\n // ${node.joinAction} (\n // Inputs: ${inputAmount.toString()}\n // OutputRef: ${node.index}\n // )`\n // );\n return node;\n };\n\n private createSwap = (\n node: Node,\n joinPathIndex: number,\n expectedOut: string,\n sender: string,\n recipient: string,\n isNativeAssetJoin: boolean,\n isSimulation: boolean\n ): {\n modelRequest: SwapRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n } => {\n // We only need swaps for main > linearBpt so shouldn't be more than token > token\n if (node.children.length !== 1) throw new Error('Unsupported swap');\n const tokenIn = node.children[0].address;\n const amountIn = this.getOutputRefValue(joinPathIndex, node.children[0]);\n\n // Single swap limits are always positive\n // Swap within generalisedJoin is always exactIn, so use minAmountOut to set limit\n const limit: string = expectedOut;\n\n const assetIn =\n isNativeAssetJoin && !isSimulation\n ? this.replaceWrappedNativeAsset([tokenIn])[0]\n : tokenIn;\n\n const request: SingleSwap = {\n poolId: node.id,\n kind: SwapType.SwapExactIn,\n assetIn,\n assetOut: node.address,\n amount: amountIn.value,\n userData: '0x',\n };\n\n const fromInternalBalance = this.allImmediateChildrenSendToInternal(node);\n const toInternalBalance = this.allSiblingsSendToInternal(node);\n\n const funds: FundManagement = {\n sender,\n recipient,\n fromInternalBalance,\n toInternalBalance,\n };\n\n const outputReference = BigNumber.from(\n this.getOutputRefValue(joinPathIndex, node).value\n );\n\n const value =\n isNativeAssetJoin && !isSimulation\n ? getEthValue([assetIn], [amountIn.value])\n : Zero;\n\n const call: Swap = {\n request,\n funds,\n limit,\n deadline: BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value,\n outputReference,\n };\n\n const encodedCall = Relayer.encodeSwap(call);\n\n debugLog(`\\nSwap:`);\n debugLog(`${JSON.stringify(call)}`);\n debugLog(`Partial value: ${JSON.stringify(call.value?.toString())}`);\n\n const modelRequest = VaultModel.mapSwapRequest(call);\n\n const hasChildInput = node.children.some((c) => c.joinAction === 'input');\n // If node has no child input the swap is part of a chain and token in shouldn't be considered for user deltas\n const userTokenIn = !hasChildInput ? '0' : amountIn.value;\n // If node has parent the swap is part of a chain and BPT out shouldn't be considered for user deltas\n const userBptOut =\n node.parent != undefined\n ? '0'\n : BigNumber.from(expectedOut).mul(-1).toString(); // needs to be negative because it's handled by the vault model as an amount going out of the vault\n\n const assets = [node.address, tokenIn];\n const amounts = [userBptOut, userTokenIn];\n\n return { modelRequest, encodedCall, assets, amounts };\n };\n\n private createJoinPool = (\n node: Node,\n joinPathIndex: number,\n minAmountOut: string,\n sender: string,\n recipient: string,\n isNativeAssetJoin: boolean,\n isSimulation: boolean\n ): {\n modelRequest: JoinPoolModelRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n minBptOut: string;\n } => {\n const inputTokens: string[] = [];\n const inputAmts: string[] = [];\n\n // inputTokens needs to include each asset even if it has 0 amount\n node.children.forEach((child) => {\n inputTokens.push(child.address);\n // non-leaf joins should set input amounts only for children that are in their joinPath\n if (this.shouldBeConsidered(child)) {\n inputAmts.push(this.getOutputRefValue(joinPathIndex, child).value);\n } else {\n inputAmts.push('0');\n }\n });\n\n if (node.type === PoolType.ComposableStable) {\n // assets need to include the phantomPoolToken\n inputTokens.push(node.address);\n // need to add a placeholder so sorting works\n inputAmts.push('0');\n }\n\n // sort inputs\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [sortedTokens, sortedAmounts] = assetHelpers.sortTokens(\n inputTokens,\n inputAmts\n ) as [string[], string[]];\n\n // userData amounts should not include the BPT of the pool being joined\n let userDataAmounts = [];\n const bptIndex = sortedTokens\n .map((t) => t.toLowerCase())\n .indexOf(node.address.toLowerCase());\n if (bptIndex === -1) {\n userDataAmounts = sortedAmounts;\n } else {\n userDataAmounts = [\n ...sortedAmounts.slice(0, bptIndex),\n ...sortedAmounts.slice(bptIndex + 1),\n ];\n }\n\n let userData: string;\n if (node.type === PoolType.Weighted) {\n userData = WeightedPoolEncoder.joinExactTokensInForBPTOut(\n userDataAmounts,\n minAmountOut\n );\n } else {\n userData = StablePoolEncoder.joinExactTokensInForBPTOut(\n userDataAmounts,\n minAmountOut\n );\n }\n\n const value =\n isNativeAssetJoin && !isSimulation\n ? getEthValue(\n this.replaceWrappedNativeAsset(sortedTokens),\n sortedAmounts\n )\n : Zero;\n\n const fromInternalBalance = this.allImmediateChildrenSendToInternal(node);\n\n const call: EncodeJoinPoolInput = Relayer.formatJoinPoolInput({\n poolId: node.id,\n kind: 0,\n sender,\n recipient,\n value,\n outputReference: this.getOutputRefValue(joinPathIndex, node).value,\n joinPoolRequest: {} as JoinPoolRequest,\n assets:\n isNativeAssetJoin && !isSimulation\n ? this.replaceWrappedNativeAsset(sortedTokens)\n : sortedTokens, // Must include BPT token\n maxAmountsIn: sortedAmounts,\n userData,\n fromInternalBalance,\n });\n const encodedCall = Relayer.encodeJoinPool(call);\n\n debugLog(`\\nJoin:`);\n debugLog(JSON.stringify(call));\n debugLog(`Partial value: ${JSON.stringify(call.value?.toString())}`);\n const modelRequest = VaultModel.mapJoinPoolRequest(call);\n\n const userAmountsTokenIn = sortedAmounts.map((a) =>\n Relayer.isChainedReference(a) ? '0' : a\n );\n const userAmountOut = Relayer.isChainedReference(minAmountOut)\n ? '0'\n : minAmountOut;\n\n const hasChildInput = node.children\n .filter((c) => this.shouldBeConsidered(c))\n .some((c) => c.joinAction === 'input');\n // If node has no child input the join is part of a chain and amounts in shouldn't be considered for user deltas\n const assets = !hasChildInput ? [] : sortedTokens;\n const amounts = !hasChildInput ? [] : userAmountsTokenIn;\n // If node has parent the join is part of a chain and shouldn't be considered for user deltas\n const minBptOut =\n node.parent != undefined\n ? Zero.toString()\n : Zero.sub(userAmountOut).toString(); // -ve because coming from Vault\n\n return { modelRequest, encodedCall, assets, amounts, minBptOut };\n };\n\n private getOutputRefValue = (\n joinPathIndex: number,\n node: Node\n ): { value: string; isRef: boolean } => {\n if (node.joinAction === 'input') {\n // Input nodes have their indexes set as the actual input amount, instead of a chained reference\n return { value: node.index, isRef: false };\n } else if (node.index !== '0' || !node.parent) {\n // Root node (parent === undefined) has index zero, but should still pass chained reference as outputRef value\n return {\n value: Relayer.toChainedReference(\n BigNumber.from(node.index).add(joinPathIndex * 100)\n ).toString(),\n isRef: true,\n };\n } else {\n return {\n value: '0',\n isRef: true,\n };\n }\n };\n\n // Nodes with index 0 won't affect transactions so they shouldn't be considered\n private shouldBeConsidered = (node: Node): boolean => {\n return node.index !== '0';\n };\n\n // joinPool transaction always sends to non-internal balance\n // input always behave as sending to non-internal balance\n private sendsToInternalBalance = (node: Node): boolean => {\n return node.joinAction !== 'input' && node.joinAction !== 'joinPool';\n };\n\n private allImmediateChildrenSendToInternal = (node: Node): boolean => {\n const children = node.children.filter((c) => this.shouldBeConsidered(c));\n if (children.length === 0) return false;\n return (\n children.filter((c) => this.sendsToInternalBalance(c)).length ===\n children.length\n );\n };\n\n private allSiblingsSendToInternal = (node: Node): boolean => {\n if (!node.parent) return false;\n const siblings = node.parent.children.filter((s) =>\n this.shouldBeConsidered(s)\n );\n return (\n siblings.filter((s) => this.sendsToInternalBalance(s)).length ===\n siblings.length\n );\n };\n\n private replaceWrappedNativeAsset = (tokens: string[]): string[] => {\n const wrappedNativeAssetIndex = tokens.findIndex(\n (t) => t.toLowerCase() === this.wrappedNativeAsset.toLowerCase()\n );\n return replace(tokens, wrappedNativeAssetIndex, AddressZero);\n };\n}\n","import axios from 'axios';\nimport { AddressZero, MaxInt256 } from '@ethersproject/constants';\nimport { parseFixed } from '@ethersproject/bignumber';\n\nimport { networkAddresses } from '@/lib/constants/config';\nimport { BalancerTenderlyConfig } from '@/types';\n\ntype StateOverrides = {\n [address: string]: { value: { [key: string]: string } };\n};\n\nexport default class TenderlyHelper {\n private vaultAddress;\n private tenderlyUrl;\n private opts?;\n private blockNumber: number | undefined;\n\n constructor(private chainId: number, tenderlyConfig: BalancerTenderlyConfig) {\n const { contracts } = networkAddresses(this.chainId);\n this.vaultAddress = contracts.vault as string;\n this.tenderlyUrl = `https://api.tenderly.co/api/v1/account/${tenderlyConfig.user}/project/${tenderlyConfig.project}/`;\n this.opts = {\n headers: {\n 'X-Access-Key': tenderlyConfig.accessKey,\n },\n };\n\n this.blockNumber = tenderlyConfig.blockNumber;\n }\n\n simulateMulticall = async (\n to: string,\n data: string,\n userAddress: string,\n tokens: string[],\n value = '0'\n ): Promise => {\n const tokensOverrides = await this.encodeBalanceAndAllowanceOverrides(\n userAddress,\n tokens\n );\n const relayerApprovalOverride = await this.encodeRelayerApprovalOverride(\n userAddress,\n to\n );\n const encodedStateOverrides = {\n ...tokensOverrides,\n ...relayerApprovalOverride,\n };\n return this.simulateTransaction(\n to,\n data,\n userAddress,\n encodedStateOverrides,\n value\n );\n };\n\n simulateTransaction = async (\n to: string,\n data: string,\n userAddress: string,\n encodedStateOverrides: StateOverrides,\n value: string\n ): Promise => {\n // Map encoded-state response into simulate request body by replacing property names\n const stateOverrides = Object.fromEntries(\n Object.keys(encodedStateOverrides).map((address) => {\n // Object.fromEntries require format [key, value] instead of {key: value}\n return [address, { storage: encodedStateOverrides[address].value }];\n })\n );\n\n // Set user balance to 1000 ETH to make sure the simulation doesn't fail due to insufficient balance\n const state_objects = {\n ...stateOverrides,\n [userAddress]: {\n balance: parseFixed('100', 18).toHexString(),\n },\n };\n\n const body = {\n // -- Standard TX fields --\n network_id: this.chainId.toString(),\n block_number: this.blockNumber,\n from: userAddress,\n to,\n input: data,\n // gas: 8000000,\n // gas_price: '0',\n value,\n // -- Simulation config (tenderly specific) --\n save_if_fails: true,\n // save: true,\n simulation_type: 'quick', // remove this while developing/debugging\n state_objects,\n };\n\n const SIMULATE_URL = this.tenderlyUrl + 'simulate';\n\n const resp = await axios.post(SIMULATE_URL, body, this.opts);\n\n const simulatedTransactionOutput =\n resp.data.transaction.transaction_info.call_trace.output;\n\n return simulatedTransactionOutput;\n };\n\n // Encode relayer approval state override\n encodeRelayerApprovalOverride = async (\n userAddress: string,\n relayerAddress: string\n ): Promise => {\n const stateOverrides: StateOverrides = {\n [`${this.vaultAddress}`]: {\n value: {\n [`_approvedRelayers[${userAddress}][${relayerAddress}]`]:\n true.toString(),\n },\n },\n };\n\n const encodedStateOverrides = await this.requestStateOverrides(\n stateOverrides\n );\n\n return encodedStateOverrides;\n };\n\n // Encode token balances and allowances overrides to max value\n encodeBalanceAndAllowanceOverrides = async (\n userAddress: string,\n tokens: string[]\n ): Promise => {\n const tokensWithoutNativeAsset = tokens.filter(\n (token) => token !== AddressZero\n );\n\n if (tokensWithoutNativeAsset.length === 0) return {};\n\n // Create balances and allowances overrides for each token address provided\n let stateOverrides: StateOverrides = {};\n tokensWithoutNativeAsset.forEach(\n (token) =>\n (stateOverrides = {\n ...stateOverrides,\n [`${token}`]: {\n value: {\n [`_balances[${userAddress}]`]: MaxInt256.toString(),\n [`_allowances[${userAddress}][${this.vaultAddress}]`]:\n MaxInt256.toString(),\n [`balanceOf[${userAddress}]`]: MaxInt256.toString(),\n [`allowance[${userAddress}][${this.vaultAddress}]`]:\n MaxInt256.toString(),\n [`balances[${userAddress}]`]: MaxInt256.toString(),\n [`allowed[${userAddress}][${this.vaultAddress}]`]:\n MaxInt256.toString(),\n },\n },\n })\n );\n\n const encodedStateOverrides = await this.requestStateOverrides(\n stateOverrides\n );\n\n if (\n Object.keys(encodedStateOverrides).some((k) => {\n return Object.keys(encodedStateOverrides[k].value).length !== 2;\n })\n )\n throw new Error(\n \"Couldn't encode state overrides - states should match the ones in the contracts\"\n );\n\n return encodedStateOverrides;\n };\n\n private requestStateOverrides = async (\n stateOverrides: StateOverrides\n ): Promise => {\n const ENCODE_STATES_URL = this.tenderlyUrl + 'contracts/encode-states';\n const body = {\n networkID: this.chainId.toString(),\n stateOverrides,\n };\n\n const encodedStatesResponse = await axios.post(\n ENCODE_STATES_URL,\n body,\n this.opts\n );\n const encodedStateOverrides = encodedStatesResponse.data\n .stateOverrides as StateOverrides;\n\n if (\n !encodedStateOverrides ||\n Object.keys(encodedStateOverrides).length !==\n Object.keys(stateOverrides).length\n )\n throw new Error(\n \"Couldn't encode state overrides - contracts should be verified and whitelisted on Tenderly\"\n );\n\n return encodedStateOverrides;\n };\n}\n","import { PoolDataService } from '@balancer-labs/sor';\nimport { defaultAbiCoder } from '@ethersproject/abi';\nimport { JsonRpcSigner } from '@ethersproject/providers';\n\nimport TenderlyHelper from '@/lib/utils/tenderlyHelper';\nimport { BalancerNetworkConfig } from '@/types';\n\nimport { VaultModel, Requests } from '../vaultModel/vaultModel.module';\n\nexport enum SimulationType {\n Tenderly,\n VaultModel,\n Static,\n}\n\n/**\n * Simulation module is responsible for simulating the results of a generalised\n * join or exit using different types of simulation, such as:\n * - Tenderly: uses Tenderly Simulation API (third party service)\n * - VaultModel: uses TS math, which may be less accurate (min. 99% accuracy)\n * - Static: uses staticCall, which is 100% accurate but requires vault approval\n *\n * This module allows a user to perform a simulation and check for expected\n * amounts out in order to make an informed decision on whether to proceed with\n * the transaction. These expected amounts out can be used as limits to prevent\n * frontrunning and ensure that the transaction will return minimum amounts out.\n */\n\nexport class Simulation {\n private tenderlyHelper?: TenderlyHelper;\n private vaultModel: VaultModel | undefined;\n constructor(\n networkConfig: BalancerNetworkConfig,\n poolDataService?: PoolDataService\n ) {\n if (networkConfig.tenderly) {\n this.tenderlyHelper = new TenderlyHelper(\n networkConfig.chainId,\n networkConfig.tenderly\n );\n }\n if (!poolDataService) {\n this.vaultModel = undefined;\n } else {\n this.vaultModel = new VaultModel(\n poolDataService,\n networkConfig.addresses.tokens.wrappedNativeAsset\n );\n }\n }\n\n simulateGeneralisedJoin = async (\n to: string,\n multiRequests: Requests[][],\n encodedCall: string,\n outputIndexes: number[],\n userAddress: string,\n tokensIn: string[],\n signer: JsonRpcSigner,\n simulationType: SimulationType,\n value: string\n ): Promise => {\n const amountsOut: string[] = [];\n switch (simulationType) {\n case SimulationType.Tenderly: {\n if (!this.tenderlyHelper) {\n throw new Error('Missing Tenderly config');\n }\n const simulationResult = await this.tenderlyHelper.simulateMulticall(\n to,\n encodedCall,\n userAddress,\n tokensIn,\n value\n );\n amountsOut.push(...this.decodeResult(simulationResult, outputIndexes));\n break;\n }\n\n case SimulationType.VaultModel: {\n const requestResult = await this.simulateRequests(multiRequests);\n amountsOut.push(...requestResult);\n break;\n }\n case SimulationType.Static: {\n const staticResult = await signer.call({\n to,\n data: encodedCall,\n value,\n });\n\n try {\n amountsOut.push(...this.decodeResult(staticResult, outputIndexes));\n } catch (_) {\n // decoding output failed, so we assume the response contains an error message and try to decode it instead\n const decodedResponse = Buffer.from(\n staticResult.split('x')[1],\n 'hex'\n ).toString('utf8');\n throw new Error(\n `Transaction reverted with error: ${decodedResponse}`\n );\n }\n break;\n }\n default:\n throw new Error('Simulation type not supported');\n }\n return amountsOut;\n };\n\n simulateGeneralisedExit = async (\n to: string,\n multiRequests: Requests[][],\n encodedCall: string,\n outputIndexes: number[],\n userAddress: string,\n tokenIn: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType\n ): Promise => {\n const amountsOut: string[] = [];\n switch (simulationType) {\n case SimulationType.Tenderly: {\n if (!this.tenderlyHelper) {\n throw new Error('Missing Tenderly config');\n }\n const simulationResult = await this.tenderlyHelper.simulateMulticall(\n to,\n encodedCall,\n userAddress,\n [tokenIn]\n );\n amountsOut.push(...this.decodeResult(simulationResult, outputIndexes));\n break;\n }\n\n case SimulationType.VaultModel: {\n const requestResult = await this.simulateRequests(multiRequests);\n amountsOut.push(...requestResult);\n break;\n }\n case SimulationType.Static: {\n const staticResult = await signer.call({\n to,\n data: encodedCall,\n });\n try {\n amountsOut.push(...this.decodeResult(staticResult, outputIndexes));\n } catch (_) {\n // decoding output failed, so we assume the response contains an error message and try to decode it instead\n const decodedResponse = Buffer.from(\n staticResult.split('x')[1],\n 'hex'\n ).toString('utf8');\n throw new Error(\n `Transaction reverted with error: ${decodedResponse}`\n );\n }\n break;\n }\n default:\n throw new Error('Simulation type not supported');\n }\n return amountsOut;\n };\n\n private decodeResult = (result: string, outputIndexes: number[]) => {\n const multicallResult = defaultAbiCoder.decode(\n ['bytes[]'],\n result\n )[0] as string[];\n\n // Decode each root output\n const amountsOut = outputIndexes.map((outputIndex) => {\n const result = defaultAbiCoder.decode(\n ['uint256'],\n multicallResult[outputIndex]\n );\n return result.toString();\n });\n\n return amountsOut;\n };\n\n private simulateRequests = async (multiRequests: Requests[][]) => {\n if (this.vaultModel === undefined)\n throw new Error('Missing Vault Model Config.');\n // make one multicall for each exitPath\n // take only bptOut/tokenOut delta into account\n const amountsOut: string[] = [];\n for (const [i, requests] of multiRequests.entries()) {\n const deltas = await this.vaultModel.multicall(requests, i === 0);\n const tokenOutDeltas = Object.values(deltas).filter((d) => d.lt(0));\n if (tokenOutDeltas.length === 0)\n throw new Error('No delta found for token out.');\n amountsOut.push(...tokenOutDeltas.map((d) => d.mul(-1).toString()));\n }\n return amountsOut;\n };\n}\n","import { cloneDeep } from 'lodash';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { WeiPerEther, Zero } from '@ethersproject/constants';\nimport { JsonRpcSigner } from '@ethersproject/providers';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { BalancerRelayer__factory } from '@/contracts/factories/BalancerRelayer__factory';\nimport { networkAddresses } from '@/lib/constants/config';\nimport { AssetHelpers, subSlippage } from '@/lib/utils';\nimport { PoolGraph, Node } from '@/modules/graph/graph';\nimport { Join } from '@/modules/joins/joins.module';\nimport { calcPriceImpact } from '@/modules/pricing/priceImpact';\nimport {\n EncodeUnwrapInput,\n OutputReference,\n Relayer,\n EncodeBatchSwapInput,\n} from '@/modules/relayer/relayer.module';\nimport {\n Simulation,\n SimulationType,\n} from '@/modules/simulation/simulation.module';\nimport {\n FundManagement,\n SingleSwap,\n Swap,\n SwapType,\n BatchSwapStep,\n} from '@/modules/swaps/types';\nimport { ExitPoolRequest as ExitPoolModelRequest } from '@/modules/vaultModel/poolModel/exit';\nimport {\n BatchSwapRequest,\n SwapRequest,\n} from '@/modules/vaultModel/poolModel/swap';\nimport { UnwrapRequest } from '@/modules/vaultModel/poolModel/unwrap';\nimport { Requests, VaultModel } from '@/modules/vaultModel/vaultModel.module';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport { getPoolAddress } from '@/pool-utils';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { BalancerNetworkConfig, ExitPoolRequest, PoolType } from '@/types';\nimport { Logger } from '@/lib/utils/logger';\n\nconst balancerRelayerInterface = BalancerRelayer__factory.createInterface();\n\nexport interface GeneralisedExitOutput {\n to: string;\n encodedCall: string;\n tokensOut: string[];\n expectedAmountsOut: string[];\n minAmountsOut: string[];\n priceImpact: string;\n}\n\nexport interface ExitInfo {\n tokensOut: string[];\n estimatedAmountsOut: string[];\n priceImpact: string;\n tokensToUnwrap: string[];\n}\n\n// Quickly switch useful debug logs on/off\nconst DEBUG = false;\n\nfunction debugLog(log: string) {\n const logger = Logger.getInstance();\n if (DEBUG) logger.info(log);\n}\n\nexport class Exit {\n private wrappedNativeAsset: string;\n private relayer: string;\n\n constructor(\n private poolGraph: PoolGraph,\n networkConfig: BalancerNetworkConfig,\n private simulationService: Simulation\n ) {\n const { tokens, contracts } = networkAddresses(networkConfig.chainId);\n this.wrappedNativeAsset = tokens.wrappedNativeAsset;\n this.relayer = contracts.balancerRelayer;\n }\n\n async getExitInfo(\n poolId: string,\n amountBptIn: string,\n userAddress: string,\n signer: JsonRpcSigner\n ): Promise<{\n tokensOut: string[];\n estimatedAmountsOut: string[];\n priceImpact: string;\n tokensToUnwrap: string[];\n }> {\n debugLog(`\\n--- getExitInfo()`);\n /*\n Overall exit flow description:\n - Create calls with 0 expected min amount for each token out\n - static call (or V4 special call) to get actual amounts for each token out\n - Apply slippage to amountsOut\n - Recreate calls with minAmounts === actualAmountsWithSlippage\n - Return minAmoutsOut, UI would use this to display to user\n - Return updatedCalls, UI would use this to execute tx\n */\n const exit = await this.getExit(\n poolId,\n amountBptIn,\n userAddress,\n signer,\n [],\n SimulationType.VaultModel\n );\n\n return {\n tokensOut: exit.tokensOut,\n estimatedAmountsOut: exit.expectedAmountsOut,\n priceImpact: exit.priceImpact,\n tokensToUnwrap: exit.tokensToUnwrap,\n };\n }\n\n async buildExitCall(\n poolId: string,\n amountBptIn: string,\n userAddress: string,\n slippage: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType.Static | SimulationType.Tenderly,\n authorisation?: string,\n tokensToUnwrap?: string[]\n ): Promise<{\n to: string;\n encodedCall: string;\n tokensOut: string[];\n expectedAmountsOut: string[];\n minAmountsOut: string[];\n priceImpact: string;\n }> {\n debugLog(\n `\\n--- exitPool(): simulationType: ${simulationType} - tokensToUnwrap: ${tokensToUnwrap}`\n );\n /*\n Overall exit flow description:\n - Create calls with 0 expected min amount for each token out\n - static call (or V4 special call) to get actual amounts for each token out\n - Apply slippage to amountsOut\n - Recreate calls with minAmounts === actualAmountsWithSlippage\n - Return minAmoutsOut, UI would use this to display to user\n - Return updatedCalls, UI would use this to execute tx\n */\n\n const exit = await this.getExit(\n poolId,\n amountBptIn,\n userAddress,\n signer,\n tokensToUnwrap ?? [],\n simulationType,\n authorisation\n );\n\n const { minAmountsOutByExitPath, minAmountsOutByTokenOut } =\n this.minAmountsOut(\n exit.expectedAmountsOutByExitPath,\n exit.expectedAmountsOut,\n slippage\n );\n\n debugLog(`------------ Updating limits...`);\n // Create calls with minimum expected amount out for each exit path\n const { encodedCall, deltas } = await this.createCalls(\n exit.exitPaths,\n userAddress,\n exit.isProportional,\n minAmountsOutByExitPath,\n authorisation\n );\n\n this.assertDeltas(\n poolId,\n deltas,\n amountBptIn,\n exit.tokensOut,\n minAmountsOutByTokenOut\n );\n\n return {\n to: this.relayer,\n encodedCall,\n tokensOut: exit.tokensOut,\n expectedAmountsOut: exit.expectedAmountsOut,\n minAmountsOut: minAmountsOutByTokenOut,\n priceImpact: exit.priceImpact,\n };\n }\n\n private async getExit(\n poolId: string,\n amountBptIn: string,\n userAddress: string,\n signer: JsonRpcSigner,\n tokensToUnwrap: string[],\n simulationType: SimulationType,\n authorisation?: string\n ): Promise<{\n tokensToUnwrap: string[];\n tokensOut: string[];\n exitPaths: Node[][];\n isProportional: boolean;\n expectedAmountsOut: string[];\n expectedAmountsOutByExitPath: string[];\n priceImpact: string;\n }> {\n // Create nodes and order by breadth first - initially trys with no unwrapping\n const orderedNodes = await this.poolGraph.getGraphNodes(\n false,\n poolId,\n tokensToUnwrap\n );\n\n const isProportional = PoolGraph.isProportionalPools(orderedNodes);\n debugLog(`\\nisProportional = ${isProportional}`);\n\n let exitPaths: Node[][] = [];\n let tokensOutByExitPath: string[] = [];\n let tokensOut: string[] = [];\n\n const outputNodes = orderedNodes.filter((n) => n.exitAction === 'output');\n tokensOutByExitPath = outputNodes.map((n) => n.address.toLowerCase());\n\n tokensOut = [...new Set(tokensOutByExitPath)].sort();\n\n if (isProportional) {\n // All proportional will have single path from root node, exiting proportionally by ref all the way to leafs\n const path = orderedNodes.map((node, i) => {\n // First node should exit with full BPT amount in\n if (i === 0) node.index = amountBptIn;\n return node;\n });\n exitPaths[0] = path;\n } else {\n // Create exit paths for each output node and splits amount in proportionally between them\n exitPaths = this.getExitPaths(outputNodes, amountBptIn);\n }\n\n // Create calls with minimum expected amount out for each exit path\n const {\n multiRequests,\n encodedCall: queryData,\n outputIndexes,\n } = await this.createCalls(\n exitPaths,\n userAddress,\n isProportional,\n undefined,\n authorisation\n );\n\n const expectedAmountsOutByExitPath = await this.amountsOutByExitPath(\n userAddress,\n multiRequests,\n queryData,\n orderedNodes[0].address,\n outputIndexes,\n signer,\n simulationType\n );\n\n const tokensWithInsufficientBalance = outputNodes\n .filter((outputNode, i) =>\n BigNumber.from(expectedAmountsOutByExitPath[i]).gt(outputNode.balance)\n )\n .map((node) => node.address.toLowerCase());\n\n if (\n tokensToUnwrap.some((t) =>\n tokensWithInsufficientBalance.includes(t.toLowerCase())\n )\n ) {\n /**\n * This means there is not enough balance to exit to main or wrapped tokens only\n */\n throw new Error(\n 'Insufficient pool balance to perform generalised exit - try exitting with smaller amounts'\n );\n } else if (tokensWithInsufficientBalance.length > 0) {\n return await this.getExit(\n poolId,\n amountBptIn,\n userAddress,\n signer,\n [...new Set(tokensWithInsufficientBalance)].sort(),\n simulationType,\n authorisation\n );\n } else {\n const expectedAmountsOut = this.amountsOutByTokenOut(\n tokensOut,\n tokensOutByExitPath,\n expectedAmountsOutByExitPath\n );\n\n const priceImpact = await this.calculatePriceImpact(\n poolId,\n this.poolGraph,\n tokensOut,\n expectedAmountsOut,\n amountBptIn\n );\n\n return {\n tokensToUnwrap,\n tokensOut,\n exitPaths,\n isProportional,\n expectedAmountsOut,\n expectedAmountsOutByExitPath,\n priceImpact,\n };\n }\n }\n\n /*\n (From Fernando)\n 1. Given a bpt amount in find the expect token amounts out (proportionally)\n 2. Uses bptZeroPi = _bptForTokensZeroPriceImpact (the same is used for joins too)\n 3. PI = bptAmountIn / bptZeroPi - 1\n */\n private async calculatePriceImpact(\n poolId: string,\n poolGraph: PoolGraph,\n tokensOut: string[],\n amountsOut: string[],\n amountBptIn: string\n ): Promise {\n // Create nodes for each pool/token interaction and order by breadth first\n const orderedNodesForJoin = await poolGraph.getGraphNodes(true, poolId, []);\n const joinPaths = Join.getJoinPaths(\n orderedNodesForJoin,\n tokensOut,\n amountsOut\n );\n const totalBptZeroPi = Join.totalBptZeroPriceImpact(joinPaths);\n const priceImpact = calcPriceImpact(\n BigInt(amountBptIn),\n totalBptZeroPi.toBigInt(),\n false\n ).toString();\n return priceImpact;\n }\n\n private assertDeltas(\n poolId: string,\n deltas: Record,\n bptIn: string,\n tokensOut: string[],\n amountsOut: string[]\n ): void {\n const poolAddress = getPoolAddress(poolId);\n const outDiff = deltas[poolAddress.toLowerCase()].sub(bptIn);\n\n if (outDiff.abs().gt(3)) {\n console.error(\n `exit assertDeltas, bptIn: `,\n poolAddress,\n bptIn,\n deltas[poolAddress.toLowerCase()]?.toString()\n );\n throw new BalancerError(BalancerErrorCode.EXIT_DELTA_AMOUNTS);\n }\n delete deltas[poolAddress.toLowerCase()];\n\n tokensOut.forEach((token, i) => {\n const diff = deltas[token.toLowerCase()].add(amountsOut[i]);\n if (diff.abs().gt(1)) {\n console.error(\n `exit assertDeltas, tokenOut: `,\n token,\n amountsOut[i],\n deltas[token.toLowerCase()]?.toString()\n );\n throw new BalancerError(BalancerErrorCode.EXIT_DELTA_AMOUNTS);\n }\n delete deltas[token.toLowerCase()];\n });\n\n for (const token in deltas) {\n if (deltas[token].toString() !== '0') {\n console.error(\n `exit assertDeltas, non-input token should be 0: `,\n token,\n deltas[token].toString()\n );\n throw new BalancerError(BalancerErrorCode.EXIT_DELTA_AMOUNTS);\n }\n }\n }\n\n // Query amounts out through static call and return decoded result\n private amountsOutByExitPath = async (\n userAddress: string,\n multiRequests: Requests[][],\n callData: string,\n tokenIn: string,\n outputIndexes: number[],\n signer: JsonRpcSigner,\n simulationType: SimulationType\n ): Promise => {\n const amountsOutByExitPath =\n await this.simulationService.simulateGeneralisedExit(\n this.relayer,\n multiRequests,\n callData,\n outputIndexes,\n userAddress,\n tokenIn,\n signer,\n simulationType\n );\n\n return amountsOutByExitPath;\n };\n\n // Aggregate amounts out by exit path into amounts out by token out\n private amountsOutByTokenOut = (\n tokensOut: string[],\n tokensOutByExitPath: string[],\n expectedAmountsOutByExitPath: string[]\n ) => {\n // Aggregate amountsOutByExitPath into expectedAmountsOut\n const expectedAmountsOutMap: Record = {};\n tokensOutByExitPath.forEach(\n (tokenOut, i) =>\n (expectedAmountsOutMap[tokenOut] = (\n expectedAmountsOutMap[tokenOut] ?? Zero\n ).add(expectedAmountsOutByExitPath[i]))\n );\n const expectedAmountsOut = tokensOut.map((tokenOut) =>\n expectedAmountsOutMap[tokenOut].toString()\n );\n\n return expectedAmountsOut;\n };\n\n // Apply slippage tolerance to expected amounts out\n private minAmountsOut = (\n expectedAmountsOutByExitPath: string[],\n expectedAmountsOutByTokenOut: string[],\n slippage: string\n ) => {\n // Apply slippage tolerance on expected amount out for each exit path\n const minAmountsOutByExitPath = expectedAmountsOutByExitPath.map(\n (expectedAmountOut) =>\n subSlippage(\n BigNumber.from(expectedAmountOut),\n BigNumber.from(slippage)\n ).toString()\n );\n\n // Apply slippage tolerance on expected amount out for each token out\n const minAmountsOutByTokenOut = expectedAmountsOutByTokenOut.map(\n (expectedAmountOut) =>\n subSlippage(\n BigNumber.from(expectedAmountOut),\n BigNumber.from(slippage)\n ).toString()\n );\n\n return { minAmountsOutByExitPath, minAmountsOutByTokenOut };\n };\n\n // Create one exit path for each output node\n private getExitPaths = (outputNodes: Node[], amountIn: string): Node[][] => {\n const exitPaths = outputNodes.map((outputNode) => {\n const exitPath = [outputNode];\n while (exitPath[0].parent) {\n exitPath.unshift(cloneDeep(exitPath[0].parent));\n }\n /*\n The input/root node requires a real amount (not a reference/index) as it is first node in chain.\n This amount will be used when chaining to children.\n */\n exitPath[0].index = exitPath[exitPath.length - 1].proportionOfParent\n .mul(amountIn)\n .div(WeiPerEther)\n .toString();\n return exitPath;\n });\n\n /*\n Amounts in for exit paths should be adjusted after caculated to fix eventual rounding issues\n */\n // Sum amountIn for each exit path\n const amountsInSum = exitPaths.reduce((accumulator, currentExitPath) => {\n const amountInForCurrentExitPath = currentExitPath[0].index;\n return BigNumber.from(amountInForCurrentExitPath).add(accumulator);\n }, Zero);\n // Compare total amountIn with sum of calculated amountIn for each exit path\n const amountsInDiff = BigNumber.from(amountIn).sub(amountsInSum);\n // Add diff to last exit path amountIn\n exitPaths[exitPaths.length - 1][0].index = amountsInDiff\n .add(exitPaths[exitPaths.length - 1][0].index)\n .toString();\n\n return exitPaths;\n };\n\n private async createCalls(\n exitPaths: Node[][],\n userAddress: string,\n isProportional: boolean,\n minAmountsOut?: string[],\n authorisation?: string\n ): Promise<{\n multiRequests: Requests[][];\n encodedCall: string;\n outputIndexes: number[];\n deltas: Record;\n }> {\n const { multiRequests, calls, outputIndexes, deltas } =\n this.createActionCalls(\n cloneDeep(exitPaths),\n userAddress,\n isProportional,\n minAmountsOut\n );\n\n if (authorisation) {\n calls.unshift(\n Relayer.encodeSetRelayerApproval(this.relayer, true, authorisation)\n );\n }\n\n const encodedCall = balancerRelayerInterface.encodeFunctionData(\n 'multicall',\n [calls]\n );\n\n return {\n multiRequests,\n encodedCall,\n outputIndexes: authorisation\n ? outputIndexes.map((i) => i + 1)\n : outputIndexes,\n deltas,\n };\n }\n\n private updateDeltas(\n deltas: Record,\n assets: string[],\n amounts: string[]\n ): Record {\n assets.forEach((t, i) => {\n const asset = t.toLowerCase();\n if (!deltas[asset]) deltas[asset] = Zero;\n deltas[asset] = deltas[asset].add(amounts[i]);\n });\n return deltas;\n }\n\n private createActionCalls(\n exitPaths: Node[][],\n userAddress: string,\n isProportional: boolean,\n minAmountsOut?: string[]\n ): {\n multiRequests: Requests[][];\n calls: string[];\n outputIndexes: number[];\n deltas: Record;\n } {\n const multiRequests: Requests[][] = [];\n const calls: string[] = [];\n const outputIndexes: number[] = [];\n const isPeek = !minAmountsOut;\n const deltas: Record = {};\n\n const getSenderAddress = (exitPath: Node[], node: Node) => {\n // Calls from root node are sent by the user\n if (!node.parent) return userAddress;\n // Otherwise sent by the parent's recipient\n return getRecipientAddress(exitPath, node.parent);\n };\n\n const getRecipientAddress = (exitPath: Node[], node: Node) => {\n // Always send to user on calls that contain outputs, otherwise send to relayer\n const exitChildren = node.children.filter((child) =>\n exitPath.map((n) => n.index).includes(child.index)\n );\n const hasOutputChild = exitChildren.some(\n (c) => c.exitAction === 'output'\n );\n return hasOutputChild ? userAddress : this.relayer;\n };\n\n // Create actions for each Node and return in multicall array\n\n exitPaths.forEach((exitPath, i) => {\n const modelRequests: Requests[] = [];\n const outputNodes = exitPath.filter(\n (node) => node.exitAction === 'output'\n );\n exitPath.forEach((node) => {\n // Find the exit child node\n const exitChild = node.children.find((child) =>\n exitPath.map((n) => n.index).includes(child.index)\n );\n\n const sender = getSenderAddress(exitPath, node);\n const recipient = getRecipientAddress(exitPath, node);\n\n const exitChildren = node.children.filter((child) =>\n exitPath.map((n) => n.index).includes(child.index)\n );\n // An action that has either outputs or unwraps as child actions is the last action where we're able to set limits on expected output amounts\n const isLastActionWithLimits = exitChildren.some(\n (c) => c.exitAction === 'output' || c.exitAction === 'unwrap'\n );\n\n // Last calls will use minAmountsOut to protect user. Middle calls can safely have 0 minimum as tx will revert if last fails.\n let minAmountOut = '0';\n const minAmountsOutProportional = Array(node.children.length).fill('0');\n if (minAmountsOut && isLastActionWithLimits) {\n if (isProportional) {\n // Proportional exits have a minAmountOut for each output node within a single exit path\n\n /**\n * minAmountsOut is related to the whole multicall transaction, while\n * minAmountsOutProportional is related only to the current node/transaction\n * This section is responsible for mapping each minAmountOut to their\n * respective position on the minAmountsOutProportional array\n * TODO: extract to a function so it's easier to understand\n */\n node.children.forEach((child, i) => {\n let outputChildIndex: number;\n if (child.exitAction === 'unwrap') {\n outputChildIndex = outputNodes.indexOf(child.children[0]);\n minAmountOut = WeiPerEther.mul(minAmountsOut[outputChildIndex])\n .div(child.priceRate)\n .toString();\n } else if (child.exitAction === 'output') {\n outputChildIndex = outputNodes.indexOf(child);\n minAmountOut = minAmountsOut[outputChildIndex];\n } else {\n minAmountOut = '0'; // clears minAmountOut if it's not an output or unwrap\n }\n minAmountsOutProportional[i] = minAmountOut;\n });\n } else {\n // Non-proportional exits have a minAmountOut for each exit path\n if (exitChild?.exitAction === 'unwrap') {\n minAmountOut = WeiPerEther.mul(minAmountsOut[i])\n .div(exitChild.priceRate)\n .toString();\n } else {\n minAmountOut = minAmountsOut[i];\n }\n }\n }\n\n switch (node.exitAction) {\n case 'unwrap': {\n const { modelRequest, encodedCall, assets, amounts } =\n this.createUnwrap(\n node,\n exitChild as Node,\n i,\n minAmountOut,\n sender,\n recipient\n );\n modelRequests.push(modelRequest);\n calls.push(encodedCall);\n this.updateDeltas(deltas, assets, amounts);\n break;\n }\n case 'batchSwap': {\n const { modelRequest, encodedCall, assets, amounts } =\n this.createSwap(\n node,\n exitChild as Node,\n i,\n minAmountOut,\n sender,\n recipient\n );\n modelRequests.push(modelRequest);\n calls.push(encodedCall);\n this.updateDeltas(deltas, assets, amounts);\n break;\n }\n case 'exitPool': {\n let exit;\n if (isProportional) {\n exit = this.createExitPoolProportional(\n node,\n minAmountsOutProportional,\n sender,\n recipient\n );\n } else {\n exit = this.createExitPool(\n node,\n exitChild as Node,\n i,\n minAmountOut,\n sender,\n recipient\n );\n }\n const { modelRequest, encodedCall, bptIn, tokensOut, amountsOut } =\n exit;\n modelRequests.push(modelRequest);\n calls.push(encodedCall);\n this.updateDeltas(\n deltas,\n [node.address, ...tokensOut],\n [bptIn, ...amountsOut]\n );\n break;\n }\n case 'output':\n if (isPeek) {\n calls.push(\n Relayer.encodePeekChainedReferenceValue(\n Relayer.toChainedReference(\n this.getOutputRef(i, node.index),\n false\n )\n )\n );\n outputIndexes.push(calls.length - 1);\n }\n break;\n default:\n return;\n }\n });\n multiRequests.push(modelRequests);\n });\n\n return { multiRequests, calls, outputIndexes, deltas };\n }\n\n private createUnwrap = (\n node: Node,\n exitChild: Node,\n exitPathIndex: number,\n minAmountOut: string,\n sender: string,\n recipient: string\n ): {\n modelRequest: UnwrapRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n } => {\n const amount = Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, node.index)\n ).toString();\n const outputReference = Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, exitChild.index)\n );\n\n const linearPoolType = node.parent?.type as string;\n\n const call: EncodeUnwrapInput = {\n wrappedToken: node.address,\n sender,\n recipient,\n amount,\n outputReference,\n };\n\n const encodedCall = Relayer.encodeUnwrap(call, linearPoolType);\n\n debugLog(`linear type: , ${linearPoolType}`);\n debugLog('\\nUwrap:');\n debugLog(JSON.stringify(call));\n\n const modelRequest = VaultModel.mapUnwrapRequest(\n amount,\n outputReference,\n node.parent?.id as string // linear pool id\n );\n\n const assets = [exitChild.address];\n const amounts = [Zero.sub(minAmountOut).toString()]; // needs to be negative because it's handled by the vault model as an amount going out of the vault\n return { modelRequest, encodedCall, assets, amounts };\n };\n\n private createSwap(\n node: Node,\n exitChild: Node,\n exitPathIndex: number,\n minAmountOut: string,\n sender: string,\n recipient: string\n ): {\n modelRequest: SwapRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n } {\n const isRootNode = !node.parent;\n const amountIn = isRootNode\n ? node.index\n : Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, node.index)\n ).toString();\n\n const tokenOut = exitChild.address;\n const assets = [tokenOut, node.address];\n\n // Single swap limits are always positive\n // Swap within generalisedExit is always exactIn, so use minAmountOut to set limit\n const limit: string = minAmountOut;\n\n const request: SingleSwap = {\n poolId: node.id,\n kind: SwapType.SwapExactIn,\n assetIn: node.address,\n assetOut: tokenOut,\n amount: amountIn,\n userData: '0x',\n };\n\n const fromInternalBalance = this.receivesFromInternal(node);\n const toInternalBalance = this.receivesFromInternal(exitChild);\n\n const funds: FundManagement = {\n sender,\n recipient,\n fromInternalBalance,\n toInternalBalance,\n };\n\n const outputReference = Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, exitChild.index)\n );\n\n const call: Swap = {\n request,\n funds,\n limit,\n deadline: BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value: '0', // TODO: check if swap with ETH is possible in this case and handle it\n outputReference,\n };\n debugLog('\\nSwap:');\n debugLog(JSON.stringify(call));\n\n const encodedCall = Relayer.encodeSwap(call);\n\n const modelRequest = VaultModel.mapSwapRequest(call);\n\n // If node isn't rootNode, the swap is part of a chain and shouldn't be considered for user deltas\n const bptIn = !isRootNode ? '0' : amountIn;\n // If child exit action is not output, the swap is part of a chain and shouldn't be considered for user deltas\n const userTokenOutAmount =\n exitChild.exitAction !== 'output'\n ? '0'\n : BigNumber.from(minAmountOut).mul(-1).toString(); // needs to be negative because it's handled by the vault model as an amount going out of the vault\n const amounts = [userTokenOutAmount, bptIn];\n\n return { modelRequest, encodedCall, assets, amounts };\n }\n\n private createBatchSwap(\n node: Node,\n exitChildren: Node[],\n exitPathIndex: number,\n minAmountsOut: string[],\n sender: string,\n recipient: string\n ): {\n modelRequest: BatchSwapRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n } {\n const isRootNode = !node.parent;\n const amountIn = isRootNode\n ? node.index\n : Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, node.index)\n ).toString();\n\n const tokensOut = exitChildren.map((n) => n.address);\n const assets = [...tokensOut, node.address];\n // TODO - setting these right?\n const limits = [...minAmountsOut];\n limits.push(amountIn);\n const batchSwapSteps: BatchSwapStep[] = [];\n const outputReferences: OutputReference[] = [];\n exitChildren.forEach((child, i) => {\n // TODO - Is this correct?\n const amount = child.proportionOfParent\n .mul(amountIn)\n .div(WeiPerEther)\n .toString();\n const swapStep: BatchSwapStep = {\n poolId: node.id,\n assetInIndex: assets.length - 1,\n assetOutIndex: i,\n amount,\n userData: '0x',\n };\n batchSwapSteps.push(swapStep);\n // TODO - Is this right?\n outputReferences.push({\n index: i,\n key: Relayer.toChainedReference(this.getOutputRef(0, child.index)),\n });\n });\n\n const total = batchSwapSteps.reduce((acc, swap) => {\n return acc.add(swap.amount);\n }, BigNumber.from(0));\n const dust = BigNumber.from(amountIn).sub(total);\n batchSwapSteps[0].amount = dust.add(batchSwapSteps[0].amount).toString();\n\n const fromInternalBalance = this.receivesFromInternal(node);\n // TODO - This is assuming that all exit to same, is this right?\n const toInternalBalance = this.receivesFromInternal(exitChildren[0]);\n\n const funds: FundManagement = {\n sender,\n recipient,\n fromInternalBalance,\n toInternalBalance,\n };\n\n const call: EncodeBatchSwapInput = {\n swapType: SwapType.SwapExactIn,\n swaps: batchSwapSteps,\n assets,\n funds,\n limits,\n deadline: BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value: '0', // TODO: check if swap with ETH is possible in this case and handle it\n outputReferences,\n };\n debugLog('\\nBatchSwap:');\n debugLog(JSON.stringify(call));\n\n const encodedCall = Relayer.encodeBatchSwap(call);\n\n const modelRequest = VaultModel.mapBatchSwapRequest(call);\n\n // If node isn't rootNode, the swap is part of a chain and shouldn't be considered for user deltas\n const bptIn = !isRootNode ? '0' : amountIn;\n // If child exit action is not output, the swap is part of a chain and shouldn't be considered for user deltas\n const userTokensOut = exitChildren.map((child, i) => {\n const userTokenOutAmount =\n child.exitAction !== 'output'\n ? '0'\n : BigNumber.from(minAmountsOut[i]).mul(-1).toString(); // needs to be negative because it's handled by the vault model as an amount going out of the vault\n return userTokenOutAmount;\n });\n\n const amounts = [...userTokensOut, bptIn];\n\n return { modelRequest, encodedCall, assets, amounts };\n }\n\n private createExitPool(\n node: Node,\n exitChild: Node,\n exitPathIndex: number,\n minAmountOut: string,\n sender: string,\n recipient: string\n ): {\n modelRequest: ExitPoolModelRequest;\n encodedCall: string;\n bptIn: string;\n tokensOut: string[];\n amountsOut: string[];\n } {\n const tokenOut = exitChild.address;\n const isRootNode = !node.parent;\n const amountIn = isRootNode\n ? node.index\n : Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, node.index)\n ).toString();\n\n const tokensOut: string[] = [];\n const amountsOut: string[] = [];\n\n // tokensOut needs to include each asset even if it has 0 amount\n node.children.forEach((child) => {\n tokensOut.push(child.address);\n amountsOut.push(child.address === tokenOut ? minAmountOut : '0');\n });\n\n if (node.type === PoolType.ComposableStable) {\n // assets need to include the phantomPoolToken\n tokensOut.push(node.address);\n // need to add a placeholder so sorting works\n amountsOut.push('0');\n }\n\n // sort inputs\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [sortedTokens, sortedAmounts] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n // userData amounts should not include the BPT of the pool being joined\n let userDataTokens = [];\n const bptIndex = sortedTokens\n .map((t) => t.toLowerCase())\n .indexOf(node.address.toLowerCase());\n if (bptIndex === -1) {\n userDataTokens = sortedTokens;\n } else {\n userDataTokens = [\n ...sortedTokens.slice(0, bptIndex),\n ...sortedTokens.slice(bptIndex + 1),\n ];\n }\n\n let userData: string;\n if (node.type === PoolType.Weighted) {\n userData = WeightedPoolEncoder.exitExactBPTInForOneTokenOut(\n amountIn,\n userDataTokens.indexOf(tokenOut)\n );\n } else {\n userData = StablePoolEncoder.exitExactBPTInForOneTokenOut(\n amountIn,\n userDataTokens.indexOf(tokenOut)\n );\n }\n\n const outputReferences = [\n {\n index: sortedTokens\n .map((t) => t.toLowerCase())\n .indexOf(tokenOut.toLowerCase()),\n key: Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, exitChild.index)\n ),\n },\n ];\n\n const toInternalBalance = this.receivesFromInternal(exitChild);\n\n const call = Relayer.formatExitPoolInput({\n poolId: node.id,\n poolKind: 0,\n sender,\n recipient,\n outputReferences,\n exitPoolRequest: {} as ExitPoolRequest,\n assets: sortedTokens,\n minAmountsOut: sortedAmounts,\n userData,\n toInternalBalance,\n });\n debugLog('\\nExit:');\n debugLog(JSON.stringify(call));\n\n const encodedCall = Relayer.encodeExitPool(call);\n const modelRequest = VaultModel.mapExitPoolRequest(call);\n\n const userAmountTokensOut = sortedAmounts.map((a) =>\n Relayer.isChainedReference(a) ? '0' : Zero.sub(a).toString()\n );\n const userBptIn = Relayer.isChainedReference(amountIn) ? '0' : amountIn;\n // If node isn't rootNode, the exit is part of a chain and shouldn't be considered for user deltas\n const deltaBptIn = !isRootNode ? Zero.toString() : userBptIn;\n // // If child exit action is not output, the exit is part of a chain and shouldn't be considered for user deltas\n const deltaTokensOut =\n exitChild.exitAction !== 'output' ? [] : sortedTokens;\n const deltaAmountsOut =\n exitChild.exitAction !== 'output' ? [] : userAmountTokensOut;\n\n return {\n modelRequest,\n encodedCall,\n bptIn: deltaBptIn,\n tokensOut: deltaTokensOut,\n amountsOut: deltaAmountsOut,\n };\n }\n\n private createExitPoolProportional(\n node: Node,\n minAmountsOut: string[],\n sender: string,\n recipient: string\n ): {\n modelRequest: ExitPoolModelRequest;\n encodedCall: string;\n bptIn: string;\n tokensOut: string[];\n amountsOut: string[];\n } {\n const isRootNode = !node.parent;\n const amountIn = isRootNode\n ? node.index\n : Relayer.toChainedReference(this.getOutputRef(0, node.index)).toString();\n\n const tokensOut = node.children.map((child) => child.address);\n const amountsOut = [...minAmountsOut];\n\n if (node.type === PoolType.ComposableStable) {\n // assets need to include the phantomPoolToken\n tokensOut.push(node.address);\n // need to add a placeholder so sorting works\n amountsOut.push('0');\n }\n\n // TODO: we shoule consider let the graph handle sorting instead of manipulating\n // token order within actions - specially now that we have different sorting\n // cases and that the subgraph is already handling them properly\n\n // sort inputs\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [sortedTokens, sortedAmounts] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n let userData: string;\n if (node.type === PoolType.Weighted) {\n userData = WeightedPoolEncoder.exitExactBPTInForTokensOut(amountIn);\n } else if (node.type === PoolType.ComposableStable) {\n userData =\n ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut(amountIn);\n } else {\n // TODO: double check if it's ok to set the Stable Pool Encoder as the default/else case\n userData = StablePoolEncoder.exitExactBPTInForTokensOut(amountIn);\n }\n\n const outputReferences = node.children.map((child) => {\n return {\n index: sortedTokens\n .map((t) => t.toLowerCase())\n .indexOf(child.address.toLowerCase()),\n key: Relayer.toChainedReference(this.getOutputRef(0, child.index)),\n };\n });\n // We have to use correct pool type based off following from Relayer:\n // enum PoolKind { WEIGHTED, LEGACY_STABLE, COMPOSABLE_STABLE, COMPOSABLE_STABLE_V2 }\n // (note only Weighted and COMPOSABLE_STABLE_V2 will support proportional exits)\n let kind = 0;\n if (node.type === PoolType.ComposableStable) {\n kind = 3;\n }\n\n const allChildrenReceiveFromInternal = node.children.every((child) =>\n this.receivesFromInternal(child)\n );\n\n const call = Relayer.formatExitPoolInput({\n poolId: node.id,\n poolKind: kind,\n sender,\n recipient,\n outputReferences,\n exitPoolRequest: {} as ExitPoolRequest,\n assets: sortedTokens,\n minAmountsOut: sortedAmounts,\n userData,\n toInternalBalance: allChildrenReceiveFromInternal,\n });\n debugLog('\\nExitProportional:');\n debugLog(JSON.stringify(call));\n const encodedCall = Relayer.encodeExitPool(call);\n const modelRequest = VaultModel.mapExitPoolRequest(call);\n\n const userAmountTokensOut = sortedAmounts.map((a) =>\n Relayer.isChainedReference(a) ? '0' : Zero.sub(a).toString()\n );\n const userBptIn = Relayer.isChainedReference(amountIn) ? '0' : amountIn;\n // If current node is the root node the exit the delta BPT in should be considered for user deltas\n const deltaBptIn = isRootNode ? userBptIn : Zero.toString();\n // If the respective child node is an output, it should be considered for user deltas\n const deltaTokensOut = sortedTokens.filter((t) =>\n node.children\n .filter((c) => c.exitAction === 'output')\n .map((c) => c.address)\n .includes(t)\n );\n const deltaAmountsOut = userAmountTokensOut.filter((_, i) =>\n deltaTokensOut.includes(sortedTokens[i])\n );\n\n return {\n modelRequest,\n encodedCall,\n bptIn: deltaBptIn,\n tokensOut: deltaTokensOut,\n amountsOut: deltaAmountsOut,\n };\n }\n\n private getOutputRef = (exitPathIndex: number, nodeIndex: string): number => {\n return exitPathIndex * 100 + parseInt(nodeIndex);\n };\n\n // node without parent is the root node and it receives from non-internal balance\n // exitPool always expects amounts from non-internal balance\n // output always behave as receiving from non-internal balance\n // others should always receive from internal balance\n private receivesFromInternal = (node: Node): boolean => {\n if (!node.parent) return false;\n return (\n node.exitAction !== 'output' &&\n node.exitAction !== 'unwrap' &&\n node.exitAction !== 'exitPool'\n );\n };\n}\n","/**\n * Calculates pool fees\n *\n * 1. Pool fees in last 24hrs\n */\nimport { isLessThan24Hours } from '@/lib/utils/time';\nimport { Pool, Findable, PoolAttribute } from '@/types';\n\nexport class PoolVolume {\n constructor(\n private yesterdaysPools: Findable | undefined\n ) {}\n\n // 🚨 this is adding 1 call to get yesterday's block height and 2nd call to fetch yesterday's pools data from subgraph\n // TODO: find a better data source for that eg. add blocks to graph, replace with a database, or dune\n async last24h(pool: Pool): Promise {\n let yesterdaysPool;\n if (this.yesterdaysPools) {\n yesterdaysPool = await this.yesterdaysPools.find(pool.id);\n }\n\n if (!pool.totalSwapVolume) {\n return 0;\n }\n\n if (!yesterdaysPool?.totalSwapVolume) {\n // Process edge case when pool creation time is less that 24h\n if (pool.createTime && isLessThan24Hours(pool.createTime)) {\n return parseFloat(pool.totalSwapVolume);\n }\n return 0;\n }\n\n return (\n parseFloat(pool.totalSwapVolume) -\n parseFloat(yesterdaysPool.totalSwapVolume)\n );\n }\n}\n","import { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport {\n ComposableStableCreatePoolParameters,\n InitJoinPoolAttributes,\n InitJoinPoolParameters,\n JoinPoolDecodedAttributes,\n JoinPoolRequestDecodedAttributes,\n} from '@/modules/pools/factory/types';\nimport { balancerVault, networkAddresses } from '@/lib/constants/config';\nimport { AssetHelpers, getRandomBytes32 } from '@/lib/utils';\nimport { PoolFactory } from '@/modules/pools/factory/pool-factory';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { BalancerNetworkConfig } from '@/types';\nimport {\n ComposableStablePool__factory,\n ComposableStablePoolFactory__factory,\n} from '@/contracts';\nimport { JsonRpcProvider, TransactionReceipt } from '@ethersproject/providers';\nimport { LogDescription } from '@ethersproject/abi';\nimport { findEventInReceiptLogs } from '@/lib/utils';\nimport { Contract } from '@ethersproject/contracts';\nimport { ContractInstances } from '@/modules/contracts/contracts.module';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { ComposableStablePoolInterface } from '@/contracts/ComposableStablePool';\n\nexport class ComposableStableFactory implements PoolFactory {\n private wrappedNativeAsset: string;\n private contracts: ContractInstances;\n\n constructor(\n networkConfig: BalancerNetworkConfig,\n contracts: ContractInstances\n ) {\n const { tokens } = networkAddresses(networkConfig.chainId);\n this.wrappedNativeAsset = tokens.wrappedNativeAsset;\n this.contracts = contracts;\n }\n\n /**\n * Builds a transaction for a composable pool create operation.\n * @param name The name of the pool\n * @param symbol The symbol of the pool\n * @param tokenAddresses The token's addresses\n * @param amplificationParameter The amplification parameter(must be greater than 1)\n * @param rateProviders The addresses of the rate providers for each token, ordered\n * @param tokenRateCacheDurations the Token Rate Cache Duration of each token\n * @param exemptFromYieldProtocolFeeFlags Array containing boolean for each token exemption from yield protocol fee flags\n * @param swapFeeEvm The swapFee for the owner of the pool in string format parsed to evm(100% is 1e18, 10% is 1e17, 1% is 1e16)\n * @param owner The address of the owner of the pool\n * @returns A TransactionRequest object, which can be directly inserted in the transaction to create a composable stable pool\n */\n create({\n name,\n symbol,\n tokenAddresses,\n amplificationParameter,\n rateProviders,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n swapFeeEvm,\n owner,\n salt,\n }: ComposableStableCreatePoolParameters): { to?: string; data: BytesLike } {\n this.checkCreateInputs({\n rateProviders,\n tokenAddresses,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n swapFeeEvm,\n });\n const params = this.parseCreateParamsForEncoding({\n name,\n symbol,\n tokenAddresses,\n amplificationParameter,\n rateProviders,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n swapFeeEvm,\n owner,\n salt,\n });\n const encodedFunctionData = this.encodeCreateFunctionData(params);\n return {\n to: this.contracts.composableStablePoolFactory?.address,\n data: encodedFunctionData,\n };\n }\n\n checkCreateInputs = ({\n tokenAddresses,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n rateProviders,\n swapFeeEvm,\n }: Pick<\n ComposableStableCreatePoolParameters,\n | 'rateProviders'\n | 'tokenRateCacheDurations'\n | 'tokenAddresses'\n | 'exemptFromYieldProtocolFeeFlags'\n | 'swapFeeEvm'\n >): void => {\n if (\n tokenAddresses.length !== tokenRateCacheDurations.length ||\n tokenRateCacheDurations.length !==\n exemptFromYieldProtocolFeeFlags.length ||\n exemptFromYieldProtocolFeeFlags.length !== rateProviders.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n if (BigInt(swapFeeEvm) <= BigInt(0) || BigInt(swapFeeEvm) > BigInt(1e17)) {\n throw new BalancerError(BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE);\n }\n };\n parseCreateParamsForEncoding = ({\n name,\n symbol,\n tokenAddresses,\n amplificationParameter,\n rateProviders,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n swapFeeEvm,\n owner,\n salt,\n }: ComposableStableCreatePoolParameters): [\n string,\n string,\n string[],\n string,\n string[],\n string[],\n boolean[],\n string,\n string,\n BytesLike\n ] => {\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [\n sortedTokens,\n sortedRateProviders,\n sortedTokenRateCacheDurations,\n sortedExemptFromYieldProtocols,\n ] = assetHelpers.sortTokens(\n tokenAddresses,\n rateProviders,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags\n ) as [string[], string[], string[], boolean[]];\n const params = [\n name,\n symbol,\n sortedTokens,\n amplificationParameter,\n sortedRateProviders,\n sortedTokenRateCacheDurations,\n sortedExemptFromYieldProtocols,\n swapFeeEvm.toString(),\n owner,\n salt || getRandomBytes32(),\n ] as [\n string,\n string,\n string[],\n string,\n string[],\n string[],\n boolean[],\n string,\n string,\n BytesLike\n ];\n return params;\n };\n\n encodeCreateFunctionData = (\n params: [\n string,\n string,\n string[],\n string,\n string[],\n string[],\n boolean[],\n string,\n string,\n BytesLike\n ]\n ): string => {\n const composablePoolFactoryInterface =\n ComposableStablePoolFactory__factory.createInterface();\n return composablePoolFactoryInterface.encodeFunctionData('create', params);\n };\n\n /**\n * Builds a transaction for a composable pool init join operation.\n * @param joiner The address of the joiner of the pool\n * @param poolId The id of the pool\n * @param poolAddress The address of the pool\n * @param tokensIn Array with the address of the tokens\n * @param amountsIn Array with the amount of each token\n * @returns A InitJoinPoolAttributes object, which can be directly inserted in the transaction to init join a composable stable pool\n */\n buildInitJoin({\n joiner,\n poolId,\n poolAddress,\n tokensIn,\n amountsIn,\n }: InitJoinPoolParameters): InitJoinPoolAttributes {\n this.checkInitJoinInputs({\n tokensIn,\n amountsIn,\n poolId,\n poolAddress,\n });\n const { attributes, params } = this.parseParamsForInitJoin({\n joiner,\n poolId,\n poolAddress,\n tokensIn,\n amountsIn,\n });\n const { functionName, data } = this.encodeInitJoinFunctionData(params);\n\n return {\n to: balancerVault,\n functionName,\n data,\n attributes,\n };\n }\n\n checkInitJoinInputs = ({\n poolId,\n poolAddress,\n tokensIn,\n amountsIn,\n }: Pick<\n InitJoinPoolParameters,\n 'tokensIn' | 'amountsIn' | 'poolId' | 'poolAddress'\n >): void => {\n if (!poolId || !poolAddress) {\n throw new BalancerError(BalancerErrorCode.NO_POOL_DATA);\n }\n if (tokensIn.length !== amountsIn.length) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n };\n\n parseParamsForInitJoin = ({\n joiner,\n poolId,\n poolAddress,\n tokensIn,\n amountsIn,\n }: InitJoinPoolParameters): {\n attributes: JoinPoolDecodedAttributes;\n params: [string, string, string, JoinPoolRequestDecodedAttributes];\n } => {\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n // sort inputs\n const tokensWithBpt = [...tokensIn, poolAddress];\n const amountsWithBpt = [...amountsIn, '0'];\n const maxAmountsWithBpt = [\n ...amountsIn,\n // this max amount needs to be >= PREMINT - bptAmountOut,\n // The vault returns BAL#506 if it's not,\n // PREMINT is around 2^111, but here we set the max amount of BPT as MAX_UINT_256-1 for safety\n BigInt.asUintN(256, BigInt(-1)).toString(),\n ];\n const [sortedTokens, sortedAmounts, sortedMaxAmounts] =\n assetHelpers.sortTokens(\n tokensWithBpt,\n amountsWithBpt,\n maxAmountsWithBpt\n ) as [string[], string[], string[]];\n\n const userData = ComposableStablePoolEncoder.joinInit(sortedAmounts);\n\n const attributes: JoinPoolDecodedAttributes = {\n poolId: poolId,\n sender: joiner,\n recipient: joiner,\n joinPoolRequest: {\n assets: sortedTokens,\n maxAmountsIn: sortedMaxAmounts,\n userData,\n fromInternalBalance: false,\n },\n };\n return {\n attributes,\n params: [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ],\n };\n };\n encodeInitJoinFunctionData = (\n params: [string, string, string, JoinPoolRequestDecodedAttributes]\n ): {\n functionName: string;\n data: string;\n } => {\n const functionName = 'joinPool';\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, params);\n\n return { functionName, data };\n };\n\n getPoolAddressAndIdWithReceipt = async (\n provider: JsonRpcProvider,\n receipt: TransactionReceipt\n ): Promise<{\n poolId: string;\n poolAddress: string;\n }> => {\n const poolCreationEvent: LogDescription = findEventInReceiptLogs({\n receipt,\n to: this.contracts.composableStablePoolFactory?.address || '',\n contractInterface: ComposableStablePoolFactory__factory.createInterface(),\n logName: 'PoolCreated',\n });\n\n const poolAddress = poolCreationEvent.args.pool;\n const composableStablePoolInterface = this.getPoolInterface();\n const pool = new Contract(\n poolAddress,\n composableStablePoolInterface,\n provider\n );\n const poolId = await pool.getPoolId();\n return {\n poolAddress,\n poolId,\n };\n };\n\n getPoolInterface(): ComposableStablePoolInterface {\n return ComposableStablePool__factory.createInterface();\n }\n}\n","import { LogDescription } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\nimport { Contract } from '@ethersproject/contracts';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { JsonRpcProvider, TransactionReceipt } from '@ethersproject/providers';\n\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { WeightedPoolFactory__factory } from '@/contracts/factories/WeightedPoolFactory__factory';\nimport { balancerVault, networkAddresses } from '@/lib/constants/config';\nimport {\n AssetHelpers,\n findEventInReceiptLogs,\n getRandomBytes32,\n} from '@/lib/utils';\nimport { ContractInstances } from '@/modules/contracts/contracts.module';\nimport { PoolFactory } from '@/modules/pools/factory/pool-factory';\nimport {\n InitJoinPoolAttributes,\n InitJoinPoolParameters,\n JoinPoolDecodedAttributes,\n JoinPoolRequestDecodedAttributes,\n WeightedCreatePoolParameters,\n} from '@/modules/pools/factory/types';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { BalancerNetworkConfig } from '@/types';\nimport { WeightedPool__factory } from '@/contracts';\nimport { SolidityMaths } from '@/lib/utils/solidityMaths';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { WeightedPoolInterface } from '@/contracts/WeightedPool';\n\nexport class WeightedFactory implements PoolFactory {\n private wrappedNativeAsset: string;\n private contracts: ContractInstances;\n\n constructor(\n networkConfig: BalancerNetworkConfig,\n contracts: ContractInstances\n ) {\n const { tokens } = networkAddresses(networkConfig.chainId);\n this.wrappedNativeAsset = tokens.wrappedNativeAsset;\n this.contracts = contracts;\n }\n\n /**\n * Builds a transaction for a weighted pool create operation.\n * @param factoryAddress The address of the factory for weighted pool (contract address)\n * @param name The name of the pool\n * @param symbol The symbol of the pool\n * @param tokenAddresses The token's addresses\n * @param normalizedWeights The weights for each token, ordered\n * @param rateProviders The rate providers for each token, ordered\n * @param swapFeeEvm The swapFee for the owner of the pool in string or bigint formatted to evm(100% is 1e18, 10% is 1e17, 1% is 1e16)\n * @param owner The address of the owner of the pool\n * @param salt The salt of the pool (bytes32)\n * @returns TransactionRequest object, which can be directly inserted in the transaction to create a weighted pool\n */\n create({\n name,\n symbol,\n tokenAddresses,\n normalizedWeights,\n rateProviders,\n swapFeeEvm,\n owner,\n salt,\n }: WeightedCreatePoolParameters): {\n to?: string;\n data: BytesLike;\n } {\n this.checkCreateInputs({\n tokenAddresses,\n normalizedWeights,\n swapFeeEvm,\n rateProviders,\n });\n const params = this.parseCreateParamsForEncoding({\n name,\n symbol,\n tokenAddresses,\n normalizedWeights,\n rateProviders,\n swapFeeEvm,\n owner,\n salt,\n });\n const encodedFunctionData = this.encodeCreateFunctionData(params);\n return {\n to: this.contracts.weightedPoolFactory?.address,\n data: encodedFunctionData,\n };\n }\n\n checkCreateInputs({\n tokenAddresses,\n normalizedWeights,\n swapFeeEvm,\n rateProviders,\n }: Pick<\n WeightedCreatePoolParameters,\n 'tokenAddresses' | 'normalizedWeights' | 'swapFeeEvm' | 'rateProviders'\n >): void {\n if (\n tokenAddresses.length !== normalizedWeights.length ||\n normalizedWeights.length !== rateProviders.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n if (tokenAddresses.length < 2) {\n throw new BalancerError(BalancerErrorCode.BELOW_MIN_TOKENS);\n }\n if (tokenAddresses.length > 8) {\n throw new BalancerError(BalancerErrorCode.ABOVE_MAX_TOKENS);\n }\n if (BigInt(swapFeeEvm) <= BigInt(0) || BigInt(swapFeeEvm) > BigInt(1e17)) {\n throw new BalancerError(BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE);\n }\n const normalizedWeightsSum = (normalizedWeights as string[]).reduce(\n (acc, cur) => SolidityMaths.add(acc, BigInt(cur)),\n BigInt(0)\n );\n if (normalizedWeightsSum !== BigInt(1e18)) {\n throw new BalancerError(BalancerErrorCode.INVALID_WEIGHTS);\n }\n }\n\n parseCreateParamsForEncoding = ({\n name,\n symbol,\n tokenAddresses,\n normalizedWeights,\n rateProviders,\n swapFeeEvm,\n owner,\n salt,\n }: WeightedCreatePoolParameters): [\n string,\n string,\n string[],\n BigNumberish[],\n string[],\n string,\n string,\n BytesLike\n ] => {\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [sortedTokens, sortedNormalizedWeights, sortedRateProviders] =\n assetHelpers.sortTokens(\n tokenAddresses,\n normalizedWeights,\n rateProviders\n ) as [string[], BigNumberish[], string[]];\n return [\n name,\n symbol,\n sortedTokens,\n sortedNormalizedWeights,\n sortedRateProviders,\n swapFeeEvm.toString(),\n owner,\n salt || getRandomBytes32(),\n ];\n };\n\n encodeCreateFunctionData = (\n params: [\n string,\n string,\n string[],\n BigNumberish[],\n string[],\n string,\n string,\n BytesLike\n ]\n ): string => {\n const weightedPoolInterface =\n WeightedPoolFactory__factory.createInterface();\n\n return weightedPoolInterface.encodeFunctionData('create', params);\n };\n\n /**\n * Returns a InitJoinPoolAttributes to make a init join transaction\n * @param joiner The address of the joiner of the pool\n * @param poolId The id of the pool\n * @param tokensIn Array with the address of the tokens\n * @param amountsIn Array with the amount of each token\n * @returns InitJoinPoolAttributes object, which can be directly inserted in the transaction to init join a weighted pool\n */\n buildInitJoin({\n joiner,\n poolId,\n tokensIn,\n amountsIn,\n }: InitJoinPoolParameters): InitJoinPoolAttributes {\n this.checkInitJoinInputs({\n poolId,\n tokensIn,\n amountsIn,\n });\n const { attributes, params } = this.parseParamsForInitJoin({\n joiner,\n poolId,\n tokensIn,\n amountsIn,\n });\n const { functionName, data } = this.encodeInitJoinFunctionData(params);\n\n return {\n to: balancerVault,\n functionName,\n data,\n attributes,\n };\n }\n\n parseParamsForInitJoin = ({\n joiner,\n poolId,\n tokensIn,\n amountsIn,\n }: Omit): {\n attributes: JoinPoolDecodedAttributes;\n params: [string, string, string, JoinPoolRequestDecodedAttributes];\n } => {\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n\n const [sortedTokens, sortedAmounts] = assetHelpers.sortTokens(\n tokensIn,\n amountsIn\n ) as [string[], string[]];\n\n const userData = WeightedPoolEncoder.joinInit(sortedAmounts);\n\n const attributes = {\n poolId: poolId,\n sender: joiner,\n recipient: joiner,\n joinPoolRequest: {\n assets: sortedTokens,\n maxAmountsIn: sortedAmounts,\n userData,\n fromInternalBalance: false,\n },\n };\n\n return {\n attributes,\n params: [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ],\n };\n };\n\n encodeInitJoinFunctionData = (\n params: [string, string, string, JoinPoolRequestDecodedAttributes]\n ): {\n functionName: string;\n data: string;\n } => {\n const functionName = 'joinPool';\n\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, params);\n return { functionName, data };\n };\n checkInitJoinInputs = ({\n poolId,\n tokensIn,\n amountsIn,\n }: Pick<\n InitJoinPoolParameters,\n 'tokensIn' | 'amountsIn' | 'poolId'\n >): void => {\n if (!poolId) {\n throw new BalancerError(BalancerErrorCode.NO_POOL_DATA);\n }\n if (tokensIn.length !== amountsIn.length) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n };\n\n async getPoolAddressAndIdWithReceipt(\n provider: JsonRpcProvider,\n receipt: TransactionReceipt\n ): Promise<{ poolId: string; poolAddress: string }> {\n const poolCreationEvent: LogDescription = findEventInReceiptLogs({\n receipt,\n to: this.contracts.weightedPoolFactory?.address || '',\n contractInterface: WeightedPoolFactory__factory.createInterface(),\n logName: 'PoolCreated',\n });\n\n const poolAddress = poolCreationEvent.args.pool;\n const weightedPoolInterface = this.getPoolInterface();\n const pool = new Contract(poolAddress, weightedPoolInterface, provider);\n const poolId = await pool.getPoolId();\n return {\n poolAddress,\n poolId,\n };\n }\n\n getPoolInterface(): WeightedPoolInterface {\n return WeightedPool__factory.createInterface();\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { JoinPool } from '@/modules/pools/pool-types/concerns/types';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { ERC4626LinearPoolInterface } from '@/contracts/ERC4626LinearPool';\nimport { GearboxLinearPoolInterface } from '@/contracts/GearboxLinearPool';\nimport { EulerLinearPoolInterface } from '@/contracts/EulerLinearPool';\nimport { AaveLinearPoolInterface } from '@/contracts/AaveLinearPool';\nimport { YearnLinearPoolInterface } from '@/contracts/YearnLinearPool';\nimport { AaveLinearPoolFactoryInterface } from '@/contracts/AaveLinearPoolFactory';\nimport { ERC4626LinearPoolFactoryInterface } from '@/contracts/ERC4626LinearPoolFactory';\nimport { EulerLinearPoolFactoryInterface } from '@/contracts/EulerLinearPoolFactory';\nimport { GearboxLinearPoolFactoryInterface } from '@/contracts/GearboxLinearPoolFactory';\nimport { YearnLinearPoolFactoryInterface } from '@/contracts/YearnLinearPoolFactory';\n\nexport type CreatePoolParameters = {\n name: string;\n symbol: string;\n tokenAddresses: string[];\n swapFeeEvm: string;\n owner: string;\n salt?: BytesLike;\n};\n\nexport interface ComposableStableCreatePoolParameters\n extends CreatePoolParameters {\n amplificationParameter: string;\n rateProviders: string[];\n tokenRateCacheDurations: string[];\n exemptFromYieldProtocolFeeFlags: boolean[];\n\n salt?: BytesLike;\n}\n\nexport interface WeightedCreatePoolParameters extends CreatePoolParameters {\n rateProviders: string[];\n normalizedWeights: BigNumberish[];\n}\n\nexport type LinearCreatePoolParameters = Pick<\n CreatePoolParameters,\n 'name' | 'symbol' | 'swapFeeEvm' | 'owner' | 'salt'\n> & {\n mainToken: string;\n wrappedToken: string;\n upperTargetEvm: string;\n protocolId: ProtocolId;\n};\n\nexport interface InitJoinPoolParameters {\n joiner: string;\n poolId: string;\n poolAddress: string;\n tokensIn: string[];\n amountsIn: string[];\n}\n\nexport interface InitJoinPoolAttributes {\n to: string;\n functionName: string;\n attributes: JoinPool;\n data: string;\n value?: BigNumber;\n}\n\n// Source of the protocolId's: https://github.com/balancer/balancer-v2-monorepo/blob/647320a4a375c724276af8e1ae26948de8fa411b/pkg/interfaces/contracts/standalone-utils/IProtocolIdRegistry.sol#L54-L72\nexport enum ProtocolId {\n AAVE_V1 = 0,\n AAVE_V2 = 1,\n AAVE_V3 = 2,\n AMPLEFORTH = 3,\n BEEFY = 4,\n EULER = 5,\n GEARBOX = 6,\n IDLE = 7,\n MORPHO = 8,\n RADIANT = 9,\n REAPER = 10,\n SILO = 11,\n STARGATE = 12,\n STURDY = 13,\n TESSERA = 14,\n TETU = 15,\n YEARN = 16,\n MIDAS = 17,\n AGAVE = 18,\n}\n\nexport type JoinPoolDecodedAttributes = {\n poolId: string;\n sender: string;\n recipient: string;\n joinPoolRequest: JoinPoolRequestDecodedAttributes;\n};\n\nexport type JoinPoolRequestDecodedAttributes = {\n assets: string[];\n maxAmountsIn: string[];\n userData: string;\n fromInternalBalance: boolean;\n};\n\nexport type LinearPoolInterface =\n | ERC4626LinearPoolInterface\n | EulerLinearPoolInterface\n | AaveLinearPoolInterface\n | YearnLinearPoolInterface\n | GearboxLinearPoolInterface;\n\nexport type LinearPoolFactoryInterface =\n | AaveLinearPoolFactoryInterface\n | ERC4626LinearPoolFactoryInterface\n | EulerLinearPoolFactoryInterface\n | GearboxLinearPoolFactoryInterface\n | YearnLinearPoolFactoryInterface;\n","import { LogDescription } from '@ethersproject/abi';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { Contract } from '@ethersproject/contracts';\nimport { JsonRpcProvider, TransactionReceipt } from '@ethersproject/providers';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport {\n AaveLinearPool__factory,\n AaveLinearPoolFactory__factory,\n ERC4626LinearPool__factory,\n ERC4626LinearPoolFactory__factory,\n EulerLinearPool__factory,\n EulerLinearPoolFactory__factory,\n GearboxLinearPool__factory,\n GearboxLinearPoolFactory__factory,\n YearnLinearPool__factory,\n YearnLinearPoolFactory__factory,\n} from '@/contracts';\nimport { AaveLinearPoolInterface } from '@/contracts/AaveLinearPool';\nimport { ERC4626LinearPoolInterface } from '@/contracts/ERC4626LinearPool';\nimport { EulerLinearPoolInterface } from '@/contracts/EulerLinearPool';\nimport { EulerLinearPoolFactoryInterface } from '@/contracts/EulerLinearPoolFactory';\nimport { GearboxLinearPoolInterface } from '@/contracts/GearboxLinearPool';\nimport { YearnLinearPoolInterface } from '@/contracts/YearnLinearPool';\nimport { ContractInstances } from '@/modules/contracts/contracts.module';\nimport { PoolFactory } from '@/modules/pools/factory/pool-factory';\nimport {\n InitJoinPoolAttributes,\n LinearCreatePoolParameters,\n LinearPoolFactoryInterface,\n ProtocolId,\n} from '@/modules/pools/factory/types';\nimport { PoolType } from '@/types';\nimport { findEventInReceiptLogs, getRandomBytes32 } from '@/lib/utils';\n\ntype LinearPoolParamsToEncode = [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n BytesLike\n];\n\ntype EulerLinearPoolParamsToEncode = [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string\n];\n\nexport class LinearFactory implements PoolFactory {\n private contracts: ContractInstances;\n private readonly poolType: PoolType;\n\n constructor(contracts: ContractInstances, poolType: PoolType) {\n this.contracts = contracts;\n this.poolType = poolType;\n }\n\n getPoolFactoryInterface = (): LinearPoolFactoryInterface => {\n switch (this.poolType) {\n case PoolType.AaveLinear:\n return AaveLinearPoolFactory__factory.createInterface();\n case PoolType.Linear:\n case PoolType.ERC4626Linear:\n return ERC4626LinearPoolFactory__factory.createInterface();\n case PoolType.EulerLinear:\n return EulerLinearPoolFactory__factory.createInterface();\n case PoolType.GearboxLinear:\n return GearboxLinearPoolFactory__factory.createInterface();\n case PoolType.YearnLinear:\n return YearnLinearPoolFactory__factory.createInterface();\n default:\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n };\n\n getPoolInterface = ():\n | AaveLinearPoolInterface\n | ERC4626LinearPoolInterface\n | EulerLinearPoolInterface\n | GearboxLinearPoolInterface\n | YearnLinearPoolInterface => {\n switch (this.poolType) {\n case PoolType.AaveLinear:\n return AaveLinearPool__factory.createInterface();\n case PoolType.Linear:\n case PoolType.ERC4626Linear:\n return ERC4626LinearPool__factory.createInterface();\n case PoolType.EulerLinear:\n return EulerLinearPool__factory.createInterface();\n case PoolType.GearboxLinear:\n return GearboxLinearPool__factory.createInterface();\n case PoolType.YearnLinear:\n return YearnLinearPool__factory.createInterface();\n default:\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n };\n\n buildInitJoin(): InitJoinPoolAttributes {\n // Linear Pools doesn't need to be initialized, they are initialized on deploy\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n\n /**\n *\n * @param name The name of the pool\n * @param symbol The symbol of the pool (BPT name)\n * @param mainToken The main token\n * @param wrappedToken The wrapped token\n * @param upperTargetEvm The maximum balance of the main token\n * @param swapFeeEvm The swap fee of the pool\n * @param owner The address of the owner of the pool\n * @param protocolId The protocolId, to check the available value\n */\n create({\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId,\n salt,\n }: LinearCreatePoolParameters): {\n to?: string;\n data: BytesLike;\n } {\n this.checkCreateInputs({ swapFeeEvm, protocolId });\n const params = this.parseCreateParamsForEncoding({\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId,\n salt,\n });\n const data = this.encodeCreateFunctionData(params);\n return {\n to: this.getFactoryAddress(),\n data,\n };\n }\n\n checkCreateInputs = ({\n swapFeeEvm,\n protocolId,\n }: {\n swapFeeEvm: string;\n protocolId: ProtocolId;\n }): void => {\n if (!ProtocolId[protocolId]) {\n throw new BalancerError(BalancerErrorCode.INVALID_PROTOCOL_ID);\n }\n if (BigInt(swapFeeEvm) <= BigInt(0) || BigInt(swapFeeEvm) > BigInt(1e17)) {\n throw new BalancerError(BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE);\n }\n this.getFactoryAddress();\n };\n\n parseCreateParamsForEncoding = ({\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId,\n salt,\n }: Omit):\n | LinearPoolParamsToEncode\n | EulerLinearPoolParamsToEncode => {\n if (this.poolType === PoolType.EulerLinear) {\n return [\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId.toString(),\n ] as [string, string, string, string, string, string, string, string];\n }\n return [\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId.toString(),\n salt || getRandomBytes32(),\n ] as [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n BytesLike\n ];\n };\n\n encodeCreateFunctionData = (\n params: LinearPoolParamsToEncode | EulerLinearPoolParamsToEncode\n ): string => {\n const linearPoolInterface: LinearPoolFactoryInterface =\n this.getPoolFactoryInterface();\n const encodedData =\n // YearnLinearPools doesn't have protocolId, the encoding of the params is different\n this.poolType === PoolType.EulerLinear\n ? (\n linearPoolInterface as EulerLinearPoolFactoryInterface\n ).encodeFunctionData(\n 'create',\n params as EulerLinearPoolParamsToEncode\n )\n : (\n linearPoolInterface as Exclude<\n LinearPoolFactoryInterface,\n EulerLinearPoolFactoryInterface\n >\n ).encodeFunctionData('create', params as LinearPoolParamsToEncode);\n return encodedData;\n };\n\n getFactoryAddress = (): string => {\n switch (this.poolType) {\n case PoolType.AaveLinear:\n if (this.contracts.aaveLinearPoolFactory) {\n return this.contracts.aaveLinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n case PoolType.Linear:\n case PoolType.ERC4626Linear:\n if (this.contracts.erc4626LinearPoolFactory) {\n return this.contracts.erc4626LinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n case PoolType.EulerLinear:\n if (this.contracts.eulerLinearPoolFactory) {\n return this.contracts.eulerLinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n case PoolType.GearboxLinear:\n if (this.contracts.gearboxLinearPoolFactory) {\n return this.contracts.gearboxLinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n case PoolType.YearnLinear:\n if (this.contracts.yearnLinearPoolFactory) {\n return this.contracts.yearnLinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n default:\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n };\n\n getPoolAddressAndIdWithReceipt = async (\n provider: JsonRpcProvider,\n receipt: TransactionReceipt\n ): Promise<{ poolId: string; poolAddress: string }> => {\n const poolCreationEvent: LogDescription = findEventInReceiptLogs({\n receipt,\n to: this.getFactoryAddress() || '',\n contractInterface: this.getPoolFactoryInterface(),\n logName: 'PoolCreated',\n });\n\n const poolAddress = poolCreationEvent.args.pool;\n const linearPoolInterface = this.getPoolInterface();\n const pool = new Contract(poolAddress, linearPoolInterface, provider);\n const poolId = await pool.getPoolId();\n return {\n poolAddress,\n poolId,\n };\n };\n}\n","import { BalancerNetworkConfig, PoolType } from '@/types';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { PoolFactory } from '@/modules/pools/factory/pool-factory';\nimport { ComposableStableFactory } from '@/modules/pools/factory/composable-stable/composable-stable.factory';\nimport { WeightedFactory } from '@/modules/pools/factory/weighted/weighted.factory';\nimport {\n ContractInstances,\n Contracts,\n} from '@/modules/contracts/contracts.module';\nimport { LinearFactory } from '@/modules/pools/factory/linear/linear.factory';\n\n/**\n * Wrapper around pool type specific methods.\n *\n * Returns a class instance of a type specific factory.\n */\nexport class PoolFactory__factory {\n networkConfig: BalancerNetworkConfig;\n contracts: ContractInstances;\n\n constructor(\n networkConfig: BalancerNetworkConfig,\n balancerContracts: Contracts\n ) {\n this.networkConfig = networkConfig;\n this.contracts = balancerContracts.contracts;\n }\n\n of(poolType: PoolType): PoolFactory {\n switch (poolType) {\n case 'Weighted':\n return new WeightedFactory(this.networkConfig, this.contracts);\n case 'Investment':\n case 'LiquidityBootstrapping': {\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n case 'Stable': {\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n case 'ComposableStable': {\n return new ComposableStableFactory(this.networkConfig, this.contracts);\n }\n case 'MetaStable': {\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n case 'StablePhantom': {\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n case 'Linear':\n case 'AaveLinear':\n case 'ERC4626Linear':\n case 'EulerLinear':\n case 'GearboxLinear':\n case 'YearnLinear': {\n return new LinearFactory(this.contracts, poolType);\n }\n default:\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n }\n}\n","import * as PoolQueries from './types';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero, Zero, MaxUint256 } from '@ethersproject/constants';\nimport { getEncoder } from './get_encoder';\nimport { removeItem } from '@/lib/utils';\n\n/**\n * Builds parameters quering join / exit liquidity functions in the Balancer Helpers contract.\n */\nexport class ParamsBuilder implements PoolQueries.ParamsBuilder {\n private encoder: PoolQueries.Encoder;\n\n constructor(private pool: PoolQueries.Pool) {\n const encoder = getEncoder(pool.poolType);\n if (encoder) {\n this.encoder = encoder;\n } else {\n throw 'Pool type not supported';\n }\n }\n\n /**\n * Encodes the query to get expected amount of BPT when joining a Pool with exact token inputs\n * @param maxAmountsInByToken - The amounts each of token, mapped by token address, to deposit in the pool as liquidity,\n * doesn't need to have all tokens, only the ones that will be deposited\n * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens (optional)\n */\n buildQueryJoinExactIn({\n maxAmountsInByToken,\n minimumBPT = Zero,\n }: PoolQueries.JoinExactInParams): PoolQueries.queryJoinParams {\n const bptIndex = this.pool.tokensList.findIndex((token) =>\n this.pool.id.includes(token)\n );\n\n const assets = [...this.pool.tokensList];\n\n const maxAmountsIn = this.pool.tokensList.map(\n (tokenAddress) =>\n maxAmountsInByToken.get(tokenAddress) ?? BigNumber.from('0')\n );\n\n let maxInWithoutBpt;\n\n // Remove BPT token from amounts for user data\n if (bptIndex > -1) {\n maxInWithoutBpt = removeItem(maxAmountsIn, bptIndex);\n } else {\n maxInWithoutBpt = maxAmountsIn;\n }\n\n const userData = this.encoder.joinExactTokensInForBPTOut(\n maxInWithoutBpt,\n minimumBPT\n );\n\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets,\n maxAmountsIn,\n userData,\n fromInternalBalance: false, // from internal balance is ignored on query join, can be just false\n },\n ] as PoolQueries.queryJoinParams;\n\n return params;\n }\n\n /**\n * Encodes the query to get expected token amount when joining a Pool specifying fixed BPT out.\n *\n * @param maxAmountIn - The max expected amount for tokenIn (optional)\n * @param bptOut - the expected BPT for providing liquidity\n * @param tokenIn - address of a token joining the pool\n */\n buildQueryJoinExactOut({\n maxAmountIn,\n bptOut,\n tokenIn,\n }: PoolQueries.JoinExactOutParams): PoolQueries.queryJoinParams {\n const bptIndex = this.pool.tokensList.findIndex((token) =>\n this.pool.id.includes(token)\n );\n let tokensWithoutBpt = [...this.pool.tokensList];\n if (bptIndex > -1) {\n tokensWithoutBpt = removeItem(this.pool.tokensList, bptIndex);\n }\n const tokenIndex = tokensWithoutBpt.indexOf(tokenIn);\n\n const userData = this.encoder.joinTokenInForExactBPTOut(bptOut, tokenIndex);\n const maxAmountsIn = maxAmountIn\n ? this.pool.tokensList.map((tokenAddress) =>\n tokenAddress === tokenIn ? maxAmountIn : '0'\n )\n : [];\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets: this.pool.tokensList,\n maxAmountsIn,\n userData,\n fromInternalBalance: false, // from internal balance is ignored on query join, can be just false\n },\n ] as PoolQueries.queryJoinParams;\n\n return params;\n }\n\n /**\n * Encodes the query for exiting the pool to a single token\n *\n * @param minAmountOut - minimum expected amount for token out\n * @param bptIn - BPT, shares of the pool liquidity\n * @param tokenOut - address of an exit liquidity token\n */\n buildQueryExitToSingleToken({\n minAmountOut,\n bptIn,\n tokenOut,\n }: PoolQueries.ExitToSingleTokenParams): PoolQueries.queryExitParams {\n const bptIndex = this.pool.tokensList.findIndex((token) =>\n this.pool.id.includes(token)\n );\n let tokensWithoutBpt = [...this.pool.tokensList];\n if (bptIndex > -1) {\n tokensWithoutBpt = removeItem(this.pool.tokensList, bptIndex);\n }\n const tokenIndex = tokensWithoutBpt.indexOf(tokenOut);\n\n const userData = this.encoder.exitExactBPTInForOneTokenOut(\n bptIn,\n tokenIndex\n );\n const minAmountsOut = minAmountOut\n ? this.pool.tokensList.map((tokenAddress) =>\n tokenAddress === tokenOut ? minAmountOut : '0'\n )\n : [];\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets: this.pool.tokensList,\n minAmountsOut,\n userData,\n toInternalBalance: false, // to internal balance is ignored on query join, can be just false\n },\n ] as PoolQueries.queryExitParams;\n\n return params;\n }\n\n /**\n * Encodes the query for exiting the pool with all underlying tokens proportionally.\n * Not supported by ComposableStable\n *\n * @param minAmountsOut - minimum expected amounts, can be set to zero for a query, ordered same as pool.tokensList\n * @param bptIn - BPT, shares of the pool liquidity\n */\n buildQueryExitProportionally({\n minAmountsOut = [],\n bptIn,\n }: PoolQueries.ExitProportionallyParams): PoolQueries.queryExitParams {\n if (!this.encoder.exitExactBPTInForTokensOut) {\n throw 'Proportional exit not implemented';\n }\n\n const userData = this.encoder.exitExactBPTInForTokensOut(bptIn);\n\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets: this.pool.tokensList,\n minAmountsOut,\n userData,\n toInternalBalance: false,\n },\n ] as PoolQueries.queryExitParams;\n\n return params;\n }\n\n /**\n * Encodes calldata to query expected BPT for known amounts out.\n *\n * @param minAmountsOut - minimum expected amounts, ordered same as pool.tokensList\n * @param maxBptIn - BPT, shares of the pool liquidity, can be set to zero for a query\n */\n buildQueryExitExactOut({\n minAmountsOut,\n maxBptIn = MaxUint256,\n }: PoolQueries.ExitExactOutParams): PoolQueries.queryExitParams {\n const bptIndex = this.pool.tokensList.findIndex((token) =>\n this.pool.id.includes(token)\n );\n\n let minAmountsOutWithoutBpt = [...minAmountsOut];\n // Remove BPT token from amounts\n if (bptIndex > -1) {\n minAmountsOutWithoutBpt = removeItem(minAmountsOut, bptIndex);\n }\n\n const userData = this.encoder.exitBPTInForExactTokensOut(\n minAmountsOutWithoutBpt,\n maxBptIn\n );\n\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets: this.pool.tokensList,\n minAmountsOut,\n userData,\n toInternalBalance: false, // to internal balance is ignored on query join, can be just false\n },\n ] as PoolQueries.queryExitParams;\n\n return params;\n }\n}\n","import { WeightedPoolEncoder } from '@/pool-weighted/encoder';\nimport { StablePoolEncoder } from '@/pool-stable/encoder';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { PoolType } from '@/types';\nimport { isLinearish } from '@/lib/utils';\n\nexport const getEncoder = (\n poolType: PoolType\n):\n | typeof WeightedPoolEncoder\n | typeof StablePoolEncoder\n | typeof ComposableStablePoolEncoder\n | undefined => {\n switch (poolType) {\n case PoolType.Weighted:\n return WeightedPoolEncoder;\n\n case PoolType.Stable:\n case PoolType.MetaStable:\n case PoolType.StablePhantom:\n case PoolType.Element:\n case PoolType.Gyro2:\n case PoolType.Gyro3:\n return StablePoolEncoder;\n\n case PoolType.ComposableStable:\n return ComposableStablePoolEncoder;\n\n default: {\n if (isLinearish(poolType)) return StablePoolEncoder;\n break;\n }\n }\n};\n","import * as emissions from '@/modules/data/bal/emissions';\nimport { Findable, LiquidityGauge } from '@/types';\n\n/**\n * Returns BAL emissions per pool\n */\nexport class EmissionsService {\n constructor(private liquidityGaugesRepository: Findable) {}\n\n async relativeWeight(poolId: string): Promise {\n const gauge = await this.liquidityGaugesRepository.findBy('poolId', poolId);\n\n if (gauge) {\n return gauge.relativeWeight;\n }\n\n return 0;\n }\n\n async weekly(poolId: string): Promise {\n const perWeek = emissions.weekly();\n const relativeWeight = await this.relativeWeight(poolId);\n\n return perWeek * relativeWeight;\n }\n}\n","import { parseUnits } from '@ethersproject/units';\nimport { BigNumber } from '@ethersproject/bignumber';\n\n/**\n * Calculates the proportional amounts of tokens in relation to a given token and amount.\n * Useful for calculating the amounts of tokens to be sent to a pool when joining or swapping.\n * When using proportional amounts to join a pool the price impact will be minimal.\n *\n * @param pool - Pool object\n * @param token - Token address in relation to which the amounts are calculated\n * @param amount - Amount of token\n * @returns Object with tokens and amounts\n * @example\n * const pool = {\n * id: '0x0000',\n * tokens: [\n * { address: '0x1234', balance: '10' },\n * { address: '0x5678', balance: '20' }\n * ]\n * }\n *\n * const { tokens, amounts } = proportionalAmounts(pool, '0x1234', '1000000000000000000')\n */\nexport const proportionalAmounts = (\n pool: {\n id: string;\n tokens: { address: string; balance: string; decimals?: number }[];\n },\n token: string,\n amount: string\n): {\n tokens: string[];\n amounts: string[];\n} => {\n const tokensWithoutBpt = pool.tokens.filter(\n (t) => !pool.id.toLowerCase().includes(t.address.toLowerCase())\n );\n const referenceTokenIndex = tokensWithoutBpt.findIndex(\n (t) => t.address.toLowerCase() === token.toLowerCase()\n );\n\n if (referenceTokenIndex == -1) {\n throw new Error('Token not found in pool');\n }\n\n const balances = tokensWithoutBpt.map((t) =>\n parseUnits(t.balance, t.decimals)\n );\n const amountBn = BigNumber.from(amount);\n const proportionalAmounts = balances.map((b) =>\n b.mul(amountBn).div(balances[referenceTokenIndex])\n );\n\n return {\n tokens: tokensWithoutBpt.map((t) => t.address),\n amounts: proportionalAmounts.map((a) => a.toString()),\n };\n};\n","import { BigNumberish } from '@ethersproject/bignumber';\nimport { JsonRpcSigner } from '@ethersproject/providers';\n\nimport { BalancerError } from '@/balancerErrors';\nimport { Contracts } from '@/modules/contracts/contracts.module';\nimport { ImpermanentLossService } from '@/modules/pools/impermanentLoss/impermanentLossService';\nimport type {\n BalancerNetworkConfig,\n BalancerDataRepositories,\n Findable,\n Searchable,\n Pool,\n PoolWithMethods,\n AprBreakdown,\n PoolAttribute,\n} from '@/types';\nimport { Logger } from '@/lib/utils/logger';\n\nimport {\n ExitExactBPTInAttributes,\n JoinPoolAttributes,\n} from './pool-types/concerns/types';\nimport { PoolTypeConcerns } from './pool-type-concerns';\nimport { PoolApr } from './apr/apr';\nimport { Liquidity } from '../liquidity/liquidity.module';\nimport { Join } from '../joins/joins.module';\nimport { Exit, GeneralisedExitOutput, ExitInfo } from '../exits/exits.module';\nimport { PoolVolume } from './volume/volume';\nimport { PoolFees } from './fees/fees';\nimport { Simulation, SimulationType } from '../simulation/simulation.module';\nimport { PoolGraph } from '../graph/graph';\nimport { PoolFactory__factory } from './pool-factory__factory';\nimport * as Queries from './queries';\nimport { EmissionsService } from './emissions';\nimport { proportionalAmounts } from './proportional-amounts';\n\nconst notImplemented = (poolType: string, name: string) => () => {\n throw `${name} for poolType ${poolType} not implemented`;\n};\n\n/**\n * Controller / use-case layer for interacting with pools data.\n */\nexport class Pools implements Findable {\n aprService;\n liquidityService;\n joinService;\n exitService;\n feesService;\n volumeService;\n simulationService;\n poolFactory;\n impermanentLossService;\n graphService;\n emissionsService;\n proportionalAmounts;\n\n constructor(\n private networkConfig: BalancerNetworkConfig,\n private repositories: BalancerDataRepositories,\n private balancerContracts: Contracts\n ) {\n this.aprService = new PoolApr(\n this.repositories.pools,\n this.repositories.tokenPrices,\n this.repositories.tokenMeta,\n this.repositories.tokenYields,\n this.repositories.feeCollector,\n this.repositories.yesterdaysPools,\n this.repositories.liquidityGauges,\n this.repositories.feeDistributor,\n this.repositories.gyroConfigRepository\n );\n this.liquidityService = new Liquidity(\n repositories.pools,\n repositories.tokenPrices\n );\n this.simulationService = new Simulation(\n networkConfig,\n this.repositories.poolsForSimulations\n );\n this.graphService = new PoolGraph(this.repositories.poolsOnChain);\n this.joinService = new Join(\n this.graphService,\n networkConfig,\n this.simulationService\n );\n this.exitService = new Exit(\n this.graphService,\n networkConfig,\n this.simulationService\n );\n this.feesService = new PoolFees(repositories.yesterdaysPools);\n this.volumeService = new PoolVolume(repositories.yesterdaysPools);\n this.poolFactory = new PoolFactory__factory(\n networkConfig,\n balancerContracts\n );\n this.impermanentLossService = new ImpermanentLossService(\n repositories.tokenPrices,\n repositories.tokenHistoricalPrices\n );\n if (repositories.liquidityGauges) {\n this.emissionsService = new EmissionsService(\n repositories.liquidityGauges\n );\n }\n this.proportionalAmounts = proportionalAmounts;\n }\n\n static wrap(\n pool: Pool,\n networkConfig: BalancerNetworkConfig\n ): PoolWithMethods {\n let concerns: ReturnType;\n let queries: Queries.ParamsBuilder;\n let methods;\n try {\n concerns = PoolTypeConcerns.from(pool.poolType);\n methods = {\n buildJoin: (\n joiner: string,\n tokensIn: string[],\n amountsIn: string[],\n slippage: string\n ): JoinPoolAttributes => {\n return concerns.join.buildJoin({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n });\n },\n calcPriceImpact: async (\n tokenAmounts: string[],\n bptAmount: string,\n isJoin: boolean\n ) =>\n concerns.priceImpactCalculator.calcPriceImpact(\n pool,\n tokenAmounts.map(BigInt),\n BigInt(bptAmount),\n isJoin\n ),\n buildExitExactBPTIn: (\n exiter: string,\n bptIn: string,\n slippage: string,\n shouldUnwrapNativeAsset = false,\n singleTokenOut?: string,\n toInternalBalance = false\n ) => {\n if (concerns.exit.buildExitExactBPTIn) {\n return concerns.exit.buildExitExactBPTIn({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n });\n } else {\n throw 'ExitExactBPTIn not supported';\n }\n },\n buildExitExactTokensOut: (\n exiter: string,\n tokensOut: string[],\n amountsOut: string[],\n slippage: string,\n toInternalBalance = false\n ) =>\n concerns.exit.buildExitExactTokensOut({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }),\n buildRecoveryExit: (\n exiter: string,\n bptIn: string,\n slippage: string,\n toInternalBalance = false\n ) =>\n concerns.exit.buildRecoveryExit({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }),\n\n // TODO: spotPrice fails, because it needs a subgraphType,\n // either we refetch or it needs a type transformation from SDK internal to SOR (subgraph)\n // spotPrice: async (tokenIn: string, tokenOut: string) =>\n // methods.spotPriceCalculator.calcPoolSpotPrice(tokenIn, tokenOut, data),\n calcSpotPrice: (tokenIn: string, tokenOut: string) =>\n concerns.spotPriceCalculator.calcPoolSpotPrice(\n tokenIn,\n tokenOut,\n pool\n ),\n calcProportionalAmounts: (token: string, amount: string) => {\n return proportionalAmounts(pool, token, amount);\n },\n };\n } catch (error) {\n if ((error as BalancerError).code != 'UNSUPPORTED_POOL_TYPE') {\n const logger = Logger.getInstance();\n logger.warn(error as string);\n }\n\n methods = {\n buildJoin: notImplemented(pool.poolType, 'buildJoin'),\n calcPriceImpact: notImplemented(pool.poolType, 'calcPriceImpact'),\n buildExitExactBPTIn: notImplemented(\n pool.poolType,\n 'buildExitExactBPTIn'\n ),\n buildExitExactTokensOut: notImplemented(\n pool.poolType,\n 'buildExitExactTokensOut'\n ),\n calcSpotPrice: notImplemented(pool.poolType, 'calcSpotPrice'),\n buildRecoveryExit: notImplemented(pool.poolType, 'buildRecoveryExit'),\n };\n }\n\n try {\n queries = new Queries.ParamsBuilder(pool);\n methods = {\n ...methods,\n buildQueryJoinExactIn: queries.buildQueryJoinExactIn.bind(queries),\n buildQueryJoinExactOut: queries.buildQueryJoinExactOut.bind(queries),\n buildQueryExitExactOut: queries.buildQueryExitExactOut.bind(queries),\n buildQueryExitToSingleToken:\n queries.buildQueryExitToSingleToken.bind(queries),\n buildQueryExitProportionally:\n queries.buildQueryExitProportionally.bind(queries),\n };\n } catch (error) {\n methods = {\n ...methods,\n buildQueryJoinExactIn: notImplemented(\n pool.poolType,\n 'buildQueryJoinExactIn'\n ),\n buildQueryJoinExactOut: notImplemented(\n pool.poolType,\n 'buildQueryJoinExactOut'\n ),\n buildQueryExitExactOut: notImplemented(\n pool.poolType,\n 'buildQueryExitExactOut'\n ),\n buildQueryExitToSingleToken: notImplemented(\n pool.poolType,\n 'buildQueryExitToSingleToken'\n ),\n buildQueryExitProportionally: notImplemented(\n pool.poolType,\n 'buildQueryExitProportionally'\n ),\n };\n }\n const wrappedNativeAsset =\n networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase();\n const bptIndex = pool.tokensList.indexOf(pool.address);\n return {\n ...pool,\n ...methods,\n bptIndex,\n };\n }\n\n dataSource(): Findable & Searchable {\n // TODO: Add API data repository to data and use liveModelProvider as fallback\n return this.repositories.pools;\n }\n\n /**\n * Calculates APR on any pool data\n *\n * @param pool\n * @returns\n */\n async apr(pool: Pool): Promise {\n return this.aprService.apr(pool);\n }\n\n /**\n * Calculates Impermanent Loss on any pool data\n *\n * @param timestamp\n * @param pool\n * @returns\n */\n async impermanentLoss(timestamp: number, pool: Pool): Promise {\n return this.impermanentLossService.calcImpLoss(timestamp, pool);\n }\n\n /**\n * Calculates total pool liquidity in USD\n *\n * @param pool\n * @returns total pool liquidity in USD\n */\n async liquidity(pool: Pool): Promise {\n return this.liquidityService.getLiquidity(pool);\n }\n\n /**\n * Calculates pool's BPT price in USD\n *\n * @param pool\n * @returns pool's BPT price in USD\n */\n async bptPrice(pool: Pool): Promise {\n return this.liquidityService.getBptPrice(pool);\n }\n\n /**\n * Builds join transaction\n *\n * @param pool Pool\n * @param tokensIn Token addresses\n * @param amountsIn Token amounts in EVM scale\n * @param userAddress User address\n * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%.\n * @returns Transaction object\n * @throws Error if pool type is not implemented\n */\n buildJoin({\n pool,\n tokensIn,\n amountsIn,\n userAddress,\n slippage,\n }: {\n pool: Pool;\n tokensIn: string[];\n amountsIn: string[];\n userAddress: string;\n slippage: string;\n }): JoinPoolAttributes {\n const concerns = PoolTypeConcerns.from(pool.poolType);\n\n if (!concerns)\n throw `buildJoin for poolType ${pool.poolType} not implemented`;\n\n return concerns.join.buildJoin({\n joiner: userAddress,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset:\n this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase(),\n });\n }\n\n buildExitExactBPTIn({\n pool,\n bptAmount,\n userAddress,\n slippage,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n }: {\n pool: Pool;\n bptAmount: string;\n userAddress: string;\n slippage: string;\n shouldUnwrapNativeAsset?: boolean;\n singleTokenOut?: string;\n }): ExitExactBPTInAttributes {\n const concerns = PoolTypeConcerns.from(pool.poolType);\n if (!concerns || !concerns.exit.buildExitExactBPTIn)\n throw `buildExit for poolType ${pool.poolType} not implemented`;\n\n return concerns.exit.buildExitExactBPTIn({\n pool,\n exiter: userAddress,\n bptIn: bptAmount,\n slippage,\n wrappedNativeAsset:\n this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase(),\n shouldUnwrapNativeAsset: shouldUnwrapNativeAsset ?? false,\n singleTokenOut: singleTokenOut ?? undefined,\n toInternalBalance: false,\n });\n }\n\n buildRecoveryExit({\n pool,\n bptAmount,\n userAddress,\n slippage,\n toInternalBalance,\n }: {\n pool: Pool;\n bptAmount: string;\n userAddress: string;\n slippage: string;\n toInternalBalance?: boolean;\n }): ExitExactBPTInAttributes {\n const concerns = PoolTypeConcerns.from(pool.poolType);\n if (!concerns || !concerns.exit.buildRecoveryExit)\n throw `buildRecoveryExit for poolType ${pool.poolType} not implemented`;\n\n return concerns.exit.buildRecoveryExit({\n exiter: userAddress,\n pool,\n bptIn: bptAmount,\n slippage,\n toInternalBalance: !!toInternalBalance,\n });\n }\n\n /**\n * Builds generalised join transaction\n *\n * @param poolId Pool id\n * @param tokens Token addresses\n * @param amounts Token amounts in EVM scale\n * @param userAddress User address\n * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%.\n * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen\n * @param simulationType Simulation type (VaultModel, Tenderly or Static)\n * @param authorisation Optional auhtorisation call to be added to the chained transaction\n * @returns transaction data ready to be sent to the network along with min and expected BPT amounts out.\n */\n async generalisedJoin(\n poolId: string,\n tokens: string[],\n amounts: string[],\n userAddress: string,\n slippage: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType,\n authorisation?: string\n ): Promise<{\n to: string;\n encodedCall: string;\n minOut: string;\n expectedOut: string;\n priceImpact: string;\n value: BigNumberish;\n }> {\n return this.joinService.joinPool(\n poolId,\n tokens,\n amounts,\n userAddress,\n slippage,\n signer,\n simulationType,\n authorisation\n );\n }\n\n /**\n * Builds generalised exit transaction\n *\n * @param poolId Pool id\n * @param amount Token amount in EVM scale\n * @param userAddress User address\n * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%.\n * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen\n * @param simulationType Simulation type (Tenderly or Static) - VaultModel should not be used to build exit transaction\n * @param authorisation Optional auhtorisation call to be added to the chained transaction\n * @param tokensToUnwrap List all tokens that requires exit by unwrapping - info provided by getExitInfo\n * @returns transaction data ready to be sent to the network along with tokens, min and expected amounts out.\n */\n async generalisedExit(\n poolId: string,\n amount: string,\n userAddress: string,\n slippage: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType.Static | SimulationType.Tenderly,\n authorisation?: string,\n tokensToUnwrap?: string[]\n ): Promise {\n return this.exitService.buildExitCall(\n poolId,\n amount,\n userAddress,\n slippage,\n signer,\n simulationType,\n authorisation,\n tokensToUnwrap\n );\n }\n\n /**\n * Calculates price impact for an action on a pool\n *\n * @param pool\n * @returns percentage as a string in EVM scale\n */\n calcPriceImpact({\n pool,\n tokenAmounts,\n bptAmount,\n isJoin,\n }: {\n pool: Pool;\n tokenAmounts: string[];\n bptAmount: string;\n isJoin: boolean;\n }): string {\n const concerns = PoolTypeConcerns.from(pool.poolType);\n return concerns.priceImpactCalculator.calcPriceImpact(\n pool,\n tokenAmounts.map(BigInt),\n BigInt(bptAmount),\n isJoin\n );\n }\n\n /**\n * Gets info required to build generalised exit transaction\n *\n * @param poolId Pool id\n * @param amountBptIn BPT amount in EVM scale\n * @param userAddress User address\n * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen\n * @returns info required to build a generalised exit transaction including whether tokens need to be unwrapped\n */\n async getExitInfo(\n poolId: string,\n amountBptIn: string,\n userAddress: string,\n signer: JsonRpcSigner\n ): Promise {\n return this.exitService.getExitInfo(\n poolId,\n amountBptIn,\n userAddress,\n signer\n );\n }\n\n /**\n * Calculates total fees for the pool in the last 24 hours\n *\n * @param pool\n * @returns\n */\n async fees(pool: Pool): Promise {\n return this.feesService.last24h(pool);\n }\n\n /**\n * Calculates total volume of the pool in the last 24 hours\n *\n * @param pool\n * @returns\n */\n async volume(pool: Pool): Promise {\n return this.volumeService.last24h(pool);\n }\n\n async find(id: string): Promise {\n const data = await this.dataSource().find(id);\n if (!data) return;\n\n return Pools.wrap(data, this.networkConfig);\n }\n\n async findBy(\n param: string,\n value: string\n ): Promise {\n if (param == 'id') {\n return this.find(value);\n } else if (param == 'address') {\n const data = await this.dataSource().findBy('address', value);\n if (!data) return;\n\n return Pools.wrap(data, this.networkConfig);\n } else {\n throw `search by ${param} not implemented`;\n }\n }\n\n async all(): Promise {\n const list = await this.dataSource().all();\n if (!list) return [];\n\n return list\n .map((data: Pool) => Pools.wrap(data, this.networkConfig))\n .filter((p) => p) as PoolWithMethods[];\n }\n\n async where(filter: (pool: Pool) => boolean): Promise {\n const list = await this.dataSource().where(filter);\n if (!list) return [];\n\n const wrapped = list.map((data: Pool) =>\n Pools.wrap(data, this.networkConfig)\n );\n\n return wrapped.filter((p) => p) as PoolWithMethods[];\n }\n}\n","export const version = \"strings/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { arrayify } from \"@ethersproject/bytes\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n///////////////////////////////\nexport var UnicodeNormalizationForm;\n(function (UnicodeNormalizationForm) {\n UnicodeNormalizationForm[\"current\"] = \"\";\n UnicodeNormalizationForm[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm[\"NFKD\"] = \"NFKD\";\n})(UnicodeNormalizationForm || (UnicodeNormalizationForm = {}));\n;\nexport var Utf8ErrorReason;\n(function (Utf8ErrorReason) {\n // A continuation byte was present where there was nothing to continue\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n // An invalid (non-continuation) byte to start a UTF-8 codepoint was found\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n // The string is too short to process the expected codepoint\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"OVERRUN\"] = \"string overrun\";\n // A missing continuation byte was expected but not found\n // - offset = the index the continuation byte was expected at\n Utf8ErrorReason[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\n // The computed code point is outside the range for UTF-8\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; outside the UTF-8 range\n Utf8ErrorReason[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\n // UTF-8 strings may not contain UTF-16 surrogate pairs\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range\n Utf8ErrorReason[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n // The string is an overlong representation\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; already bounds checked\n Utf8ErrorReason[\"OVERLONG\"] = \"overlong representation\";\n})(Utf8ErrorReason || (Utf8ErrorReason = {}));\n;\nfunction errorFunc(reason, offset, bytes, output, badCodepoint) {\n return logger.throwArgumentError(`invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n}\nfunction ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes\n if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {\n let i = 0;\n for (let o = offset + 1; o < bytes.length; o++) {\n if (bytes[o] >> 6 !== 0x02) {\n break;\n }\n i++;\n }\n return i;\n }\n // This byte runs us past the end of the string, so just jump to the end\n // (but the first byte was read already read and therefore skipped)\n if (reason === Utf8ErrorReason.OVERRUN) {\n return bytes.length - offset - 1;\n }\n // Nothing to skip\n return 0;\n}\nfunction replaceFunc(reason, offset, bytes, output, badCodepoint) {\n // Overlong representations are otherwise \"valid\" code points; just non-deistingtished\n if (reason === Utf8ErrorReason.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n // Put the replacement character into the output\n output.push(0xfffd);\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n// Common error handing strategies\nexport const Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(bytes, onError) {\n if (onError == null) {\n onError = Utf8ErrorFuncs.error;\n }\n bytes = arrayify(bytes);\n const result = [];\n let i = 0;\n // Invalid bytes are ignored\n while (i < bytes.length) {\n const c = bytes[i++];\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n // 1110 xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf8) === 0xf0) {\n extraLength = 3;\n overlongMask = 0xffff;\n }\n else {\n if ((c & 0xc0) === 0x80) {\n i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result);\n }\n else {\n i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result);\n }\n continue;\n }\n // Do we have enough bytes in our data?\n if (i - 1 + extraLength >= bytes.length) {\n i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result);\n continue;\n }\n // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\n // Invalid continuation byte\n if ((nextChar & 0xc0) != 0x80) {\n i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result);\n res = null;\n break;\n }\n ;\n res = (res << 6) | (nextChar & 0x3f);\n i++;\n }\n // See above loop for invalid continuation byte\n if (res === null) {\n continue;\n }\n // Maximum code point\n if (res > 0x10ffff) {\n i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Reserved for UTF-16 surrogate halves\n if (res >= 0xd800 && res <= 0xdfff) {\n i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Check for overlong sequences (more bytes than needed)\n if (res <= overlongMask) {\n i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n}\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\nexport function toUtf8Bytes(str, form = UnicodeNormalizationForm.current) {\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\n if (c < 0x80) {\n result.push(c);\n }\n else if (c < 0x800) {\n result.push((c >> 6) | 0xc0);\n result.push((c & 0x3f) | 0x80);\n }\n else if ((c & 0xfc00) == 0xd800) {\n i++;\n const c2 = str.charCodeAt(i);\n if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) {\n throw new Error(\"invalid utf-8 string\");\n }\n // Surrogate Pair\n const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n result.push((pair >> 18) | 0xf0);\n result.push(((pair >> 12) & 0x3f) | 0x80);\n result.push(((pair >> 6) & 0x3f) | 0x80);\n result.push((pair & 0x3f) | 0x80);\n }\n else {\n result.push((c >> 12) | 0xe0);\n result.push(((c >> 6) & 0x3f) | 0x80);\n result.push((c & 0x3f) | 0x80);\n }\n }\n return arrayify(result);\n}\n;\nfunction escapeChar(value) {\n const hex = (\"0000\" + value.toString(16));\n return \"\\\\u\" + hex.substring(hex.length - 4);\n}\nexport function _toEscapedUtf8String(bytes, onError) {\n return '\"' + getUtf8CodePoints(bytes, onError).map((codePoint) => {\n if (codePoint < 256) {\n switch (codePoint) {\n case 8: return \"\\\\b\";\n case 9: return \"\\\\t\";\n case 10: return \"\\\\n\";\n case 13: return \"\\\\r\";\n case 34: return \"\\\\\\\"\";\n case 92: return \"\\\\\\\\\";\n }\n if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n if (codePoint <= 0xffff) {\n return escapeChar(codePoint);\n }\n codePoint -= 0x10000;\n return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00);\n }).join(\"\") + '\"';\n}\nexport function _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00));\n }).join(\"\");\n}\nexport function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\nexport function toUtf8CodePoints(str, form = UnicodeNormalizationForm.current) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n//# sourceMappingURL=utf8.js.map","\"use strict\";\nimport { HashZero } from \"@ethersproject/constants\";\nimport { arrayify, concat, hexlify } from \"@ethersproject/bytes\";\nimport { toUtf8Bytes, toUtf8String } from \"./utf8\";\nexport function formatBytes32String(text) {\n // Get the bytes\n const bytes = toUtf8Bytes(text);\n // Check we have room for null-termination\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n // Zero-pad (implicitly null-terminates)\n return hexlify(concat([bytes, HashZero]).slice(0, 32));\n}\nexport function parseBytes32String(bytes) {\n const data = arrayify(bytes);\n // Must be 32 bytes with a null-termination\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n // Find the null termination\n let length = 31;\n while (data[length - 1] === 0) {\n length--;\n }\n // Determine the string value\n return toUtf8String(data.slice(0, length));\n}\n//# sourceMappingURL=bytes32.js.map","/**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var INPUT_ERROR = 'input is invalid type';\n var FINALIZE_ERROR = 'finalize already called';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,\n 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,\n 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,\n 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,\n 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest'];\n var CSHAKE_BYTEPAD = {\n '128': 168,\n '256': 136\n };\n\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (bits, padding, outputType) {\n return function (message) {\n return new Keccak(bits, padding, bits).update(message)[outputType]();\n };\n };\n\n var createShakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits) {\n return new Keccak(bits, padding, outputBits).update(message)[outputType]();\n };\n };\n\n var createCshakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits, n, s) {\n return methods['cshake' + bits].update(message, outputBits, n, s)[outputType]();\n };\n };\n\n var createKmacOutputMethod = function (bits, padding, outputType) {\n return function (key, message, outputBits, s) {\n return methods['kmac' + bits].update(key, message, outputBits, s)[outputType]();\n };\n };\n\n var createOutputMethods = function (method, createMethod, bits, padding) {\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createMethod(bits, padding, type);\n }\n return method;\n };\n\n var createMethod = function (bits, padding) {\n var method = createOutputMethod(bits, padding, 'hex');\n method.create = function () {\n return new Keccak(bits, padding, bits);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits, padding);\n };\n\n var createShakeMethod = function (bits, padding) {\n var method = createShakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits) {\n return new Keccak(bits, padding, outputBits);\n };\n method.update = function (message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits, padding);\n };\n\n var createCshakeMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createCshakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits, n, s) {\n if (!n && !s) {\n return methods['shake' + bits].create(outputBits);\n } else {\n return new Keccak(bits, padding, outputBits).bytepad([n, s], w);\n }\n };\n method.update = function (message, outputBits, n, s) {\n return method.create(outputBits, n, s).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits, padding);\n };\n\n var createKmacMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createKmacOutputMethod(bits, padding, 'hex');\n method.create = function (key, outputBits, s) {\n return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w);\n };\n method.update = function (key, message, outputBits, s) {\n return method.create(key, outputBits, s).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits, padding);\n };\n\n var algorithms = [\n { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod },\n { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod },\n { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n\n var methods = {}, methodNames = [];\n\n for (var i = 0; i < algorithms.length; ++i) {\n var algorithm = algorithms[i];\n var bits = algorithm.bits;\n for (var j = 0; j < bits.length; ++j) {\n var methodName = algorithm.name + '_' + bits[j];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding);\n if (algorithm.name !== 'sha3') {\n var newMethodName = algorithm.name + bits[j];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n\n function Keccak(bits, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = (1600 - (bits << 1)) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n\n for (var i = 0; i < 50; ++i) {\n this.s[i] = 0;\n }\n }\n\n Keccak.prototype.update = function (message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var blocks = this.blocks, byteCount = this.byteCount, length = message.length,\n blockCount = this.blockCount, index = 0, s = this.s, i, code;\n\n while (index < length) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n if (notString) {\n for (i = this.start; index < length && i < byteCount; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < byteCount; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n this.lastByteIndex = i;\n if (i >= byteCount) {\n this.start = i - byteCount;\n this.block = blocks[blockCount];\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n this.reset = true;\n } else {\n this.start = i;\n }\n }\n return this;\n };\n\n Keccak.prototype.encode = function (x, right) {\n var o = x & 255, n = 1;\n var bytes = [o];\n x = x >> 8;\n o = x & 255;\n while (o > 0) {\n bytes.unshift(o);\n x = x >> 8;\n o = x & 255;\n ++n;\n }\n if (right) {\n bytes.push(n);\n } else {\n bytes.unshift(n);\n }\n this.update(bytes);\n return bytes.length;\n };\n\n Keccak.prototype.encodeString = function (str) {\n var notString, type = typeof str;\n if (type !== 'string') {\n if (type === 'object') {\n if (str === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {\n str = new Uint8Array(str);\n } else if (!Array.isArray(str)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var bytes = 0, length = str.length;\n if (notString) {\n bytes = length;\n } else {\n for (var i = 0; i < str.length; ++i) {\n var code = str.charCodeAt(i);\n if (code < 0x80) {\n bytes += 1;\n } else if (code < 0x800) {\n bytes += 2;\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes += 3;\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));\n bytes += 4;\n }\n }\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n\n Keccak.prototype.bytepad = function (strs, w) {\n var bytes = this.encode(w);\n for (var i = 0; i < strs.length; ++i) {\n bytes += this.encodeString(strs[i]);\n }\n var paddingBytes = w - bytes % w;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n\n Keccak.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;\n blocks[i >> 2] |= this.padding[i & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n blocks[blockCount - 1] |= 0x80000000;\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n };\n\n Keccak.prototype.toString = Keccak.prototype.hex = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var hex = '', block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] +\n HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] +\n HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] +\n HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F];\n }\n if (j % blockCount === 0) {\n f(s);\n i = 0;\n }\n }\n if (extraBytes) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F];\n if (extraBytes > 1) {\n hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F];\n }\n }\n return hex;\n };\n\n Keccak.prototype.arrayBuffer = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var bytes = this.outputBits >> 3;\n var buffer;\n if (extraBytes) {\n buffer = new ArrayBuffer((outputBlocks + 1) << 2);\n } else {\n buffer = new ArrayBuffer(bytes);\n }\n var array = new Uint32Array(buffer);\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n array[j] = s[i];\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n array[i] = s[i];\n buffer = buffer.slice(0, bytes);\n }\n return buffer;\n };\n\n Keccak.prototype.buffer = Keccak.prototype.arrayBuffer;\n\n Keccak.prototype.digest = Keccak.prototype.array = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var array = [], offset, block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n array[offset + 1] = (block >> 8) & 0xFF;\n array[offset + 2] = (block >> 16) & 0xFF;\n array[offset + 3] = (block >> 24) & 0xFF;\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n if (extraBytes > 1) {\n array[offset + 1] = (block >> 8) & 0xFF;\n }\n if (extraBytes > 2) {\n array[offset + 2] = (block >> 16) & 0xFF;\n }\n }\n return array;\n };\n\n function Kmac(bits, padding, outputBits) {\n Keccak.call(this, bits, padding, outputBits);\n }\n\n Kmac.prototype = new Keccak();\n\n Kmac.prototype.finalize = function () {\n this.encode(this.outputBits, true);\n return Keccak.prototype.finalize.call(this);\n };\n\n var f = function (s) {\n var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9,\n b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17,\n b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33,\n b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n = 0; n < 48; n += 2) {\n c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40];\n c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41];\n c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42];\n c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43];\n c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44];\n c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45];\n c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46];\n c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47];\n c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48];\n c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49];\n\n h = c8 ^ ((c2 << 1) | (c3 >>> 31));\n l = c9 ^ ((c3 << 1) | (c2 >>> 31));\n s[0] ^= h;\n s[1] ^= l;\n s[10] ^= h;\n s[11] ^= l;\n s[20] ^= h;\n s[21] ^= l;\n s[30] ^= h;\n s[31] ^= l;\n s[40] ^= h;\n s[41] ^= l;\n h = c0 ^ ((c4 << 1) | (c5 >>> 31));\n l = c1 ^ ((c5 << 1) | (c4 >>> 31));\n s[2] ^= h;\n s[3] ^= l;\n s[12] ^= h;\n s[13] ^= l;\n s[22] ^= h;\n s[23] ^= l;\n s[32] ^= h;\n s[33] ^= l;\n s[42] ^= h;\n s[43] ^= l;\n h = c2 ^ ((c6 << 1) | (c7 >>> 31));\n l = c3 ^ ((c7 << 1) | (c6 >>> 31));\n s[4] ^= h;\n s[5] ^= l;\n s[14] ^= h;\n s[15] ^= l;\n s[24] ^= h;\n s[25] ^= l;\n s[34] ^= h;\n s[35] ^= l;\n s[44] ^= h;\n s[45] ^= l;\n h = c4 ^ ((c8 << 1) | (c9 >>> 31));\n l = c5 ^ ((c9 << 1) | (c8 >>> 31));\n s[6] ^= h;\n s[7] ^= l;\n s[16] ^= h;\n s[17] ^= l;\n s[26] ^= h;\n s[27] ^= l;\n s[36] ^= h;\n s[37] ^= l;\n s[46] ^= h;\n s[47] ^= l;\n h = c6 ^ ((c0 << 1) | (c1 >>> 31));\n l = c7 ^ ((c1 << 1) | (c0 >>> 31));\n s[8] ^= h;\n s[9] ^= l;\n s[18] ^= h;\n s[19] ^= l;\n s[28] ^= h;\n s[29] ^= l;\n s[38] ^= h;\n s[39] ^= l;\n s[48] ^= h;\n s[49] ^= l;\n\n b0 = s[0];\n b1 = s[1];\n b32 = (s[11] << 4) | (s[10] >>> 28);\n b33 = (s[10] << 4) | (s[11] >>> 28);\n b14 = (s[20] << 3) | (s[21] >>> 29);\n b15 = (s[21] << 3) | (s[20] >>> 29);\n b46 = (s[31] << 9) | (s[30] >>> 23);\n b47 = (s[30] << 9) | (s[31] >>> 23);\n b28 = (s[40] << 18) | (s[41] >>> 14);\n b29 = (s[41] << 18) | (s[40] >>> 14);\n b20 = (s[2] << 1) | (s[3] >>> 31);\n b21 = (s[3] << 1) | (s[2] >>> 31);\n b2 = (s[13] << 12) | (s[12] >>> 20);\n b3 = (s[12] << 12) | (s[13] >>> 20);\n b34 = (s[22] << 10) | (s[23] >>> 22);\n b35 = (s[23] << 10) | (s[22] >>> 22);\n b16 = (s[33] << 13) | (s[32] >>> 19);\n b17 = (s[32] << 13) | (s[33] >>> 19);\n b48 = (s[42] << 2) | (s[43] >>> 30);\n b49 = (s[43] << 2) | (s[42] >>> 30);\n b40 = (s[5] << 30) | (s[4] >>> 2);\n b41 = (s[4] << 30) | (s[5] >>> 2);\n b22 = (s[14] << 6) | (s[15] >>> 26);\n b23 = (s[15] << 6) | (s[14] >>> 26);\n b4 = (s[25] << 11) | (s[24] >>> 21);\n b5 = (s[24] << 11) | (s[25] >>> 21);\n b36 = (s[34] << 15) | (s[35] >>> 17);\n b37 = (s[35] << 15) | (s[34] >>> 17);\n b18 = (s[45] << 29) | (s[44] >>> 3);\n b19 = (s[44] << 29) | (s[45] >>> 3);\n b10 = (s[6] << 28) | (s[7] >>> 4);\n b11 = (s[7] << 28) | (s[6] >>> 4);\n b42 = (s[17] << 23) | (s[16] >>> 9);\n b43 = (s[16] << 23) | (s[17] >>> 9);\n b24 = (s[26] << 25) | (s[27] >>> 7);\n b25 = (s[27] << 25) | (s[26] >>> 7);\n b6 = (s[36] << 21) | (s[37] >>> 11);\n b7 = (s[37] << 21) | (s[36] >>> 11);\n b38 = (s[47] << 24) | (s[46] >>> 8);\n b39 = (s[46] << 24) | (s[47] >>> 8);\n b30 = (s[8] << 27) | (s[9] >>> 5);\n b31 = (s[9] << 27) | (s[8] >>> 5);\n b12 = (s[18] << 20) | (s[19] >>> 12);\n b13 = (s[19] << 20) | (s[18] >>> 12);\n b44 = (s[29] << 7) | (s[28] >>> 25);\n b45 = (s[28] << 7) | (s[29] >>> 25);\n b26 = (s[38] << 8) | (s[39] >>> 24);\n b27 = (s[39] << 8) | (s[38] >>> 24);\n b8 = (s[48] << 14) | (s[49] >>> 18);\n b9 = (s[49] << 14) | (s[48] >>> 18);\n\n s[0] = b0 ^ (~b2 & b4);\n s[1] = b1 ^ (~b3 & b5);\n s[10] = b10 ^ (~b12 & b14);\n s[11] = b11 ^ (~b13 & b15);\n s[20] = b20 ^ (~b22 & b24);\n s[21] = b21 ^ (~b23 & b25);\n s[30] = b30 ^ (~b32 & b34);\n s[31] = b31 ^ (~b33 & b35);\n s[40] = b40 ^ (~b42 & b44);\n s[41] = b41 ^ (~b43 & b45);\n s[2] = b2 ^ (~b4 & b6);\n s[3] = b3 ^ (~b5 & b7);\n s[12] = b12 ^ (~b14 & b16);\n s[13] = b13 ^ (~b15 & b17);\n s[22] = b22 ^ (~b24 & b26);\n s[23] = b23 ^ (~b25 & b27);\n s[32] = b32 ^ (~b34 & b36);\n s[33] = b33 ^ (~b35 & b37);\n s[42] = b42 ^ (~b44 & b46);\n s[43] = b43 ^ (~b45 & b47);\n s[4] = b4 ^ (~b6 & b8);\n s[5] = b5 ^ (~b7 & b9);\n s[14] = b14 ^ (~b16 & b18);\n s[15] = b15 ^ (~b17 & b19);\n s[24] = b24 ^ (~b26 & b28);\n s[25] = b25 ^ (~b27 & b29);\n s[34] = b34 ^ (~b36 & b38);\n s[35] = b35 ^ (~b37 & b39);\n s[44] = b44 ^ (~b46 & b48);\n s[45] = b45 ^ (~b47 & b49);\n s[6] = b6 ^ (~b8 & b0);\n s[7] = b7 ^ (~b9 & b1);\n s[16] = b16 ^ (~b18 & b10);\n s[17] = b17 ^ (~b19 & b11);\n s[26] = b26 ^ (~b28 & b20);\n s[27] = b27 ^ (~b29 & b21);\n s[36] = b36 ^ (~b38 & b30);\n s[37] = b37 ^ (~b39 & b31);\n s[46] = b46 ^ (~b48 & b40);\n s[47] = b47 ^ (~b49 & b41);\n s[8] = b8 ^ (~b0 & b2);\n s[9] = b9 ^ (~b1 & b3);\n s[18] = b18 ^ (~b10 & b12);\n s[19] = b19 ^ (~b11 & b13);\n s[28] = b28 ^ (~b20 & b22);\n s[29] = b29 ^ (~b21 & b23);\n s[38] = b38 ^ (~b30 & b32);\n s[39] = b39 ^ (~b31 & b33);\n s[48] = b48 ^ (~b40 & b42);\n s[49] = b49 ^ (~b41 & b43);\n\n s[0] ^= RC[n];\n s[1] ^= RC[n + 1];\n }\n };\n\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i = 0; i < methodNames.length; ++i) {\n root[methodNames[i]] = methods[methodNames[i]];\n }\n if (AMD) {\n define(function () {\n return methods;\n });\n }\n }\n})();\n","export const version = \"solidity/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexlify, zeroPad } from \"@ethersproject/bytes\";\nimport { keccak256 as hashKeccak256 } from \"@ethersproject/keccak256\";\nimport { sha256 as hashSha256 } from \"@ethersproject/sha2\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nconst regexBytes = new RegExp(\"^bytes([0-9]+)$\");\nconst regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\nconst regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\nconst Zeros = \"0000000000000000000000000000000000000000000000000000000000000000\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nfunction _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return zeroPad(value, 32);\n }\n return arrayify(value);\n case \"string\":\n return toUtf8Bytes(value);\n case \"bytes\":\n return arrayify(value);\n case \"bool\":\n value = (value ? \"0x01\" : \"0x00\");\n if (isArray) {\n return zeroPad(value, 32);\n }\n return arrayify(value);\n }\n let match = type.match(regexNumber);\n if (match) {\n //let signed = (match[1] === \"int\")\n let size = parseInt(match[2] || \"256\");\n if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) {\n logger.throwArgumentError(\"invalid number type\", \"type\", type);\n }\n if (isArray) {\n size = 256;\n }\n value = BigNumber.from(value).toTwos(size);\n return zeroPad(value, size / 8);\n }\n match = type.match(regexBytes);\n if (match) {\n const size = parseInt(match[1]);\n if (String(size) !== match[1] || size === 0 || size > 32) {\n logger.throwArgumentError(\"invalid bytes type\", \"type\", type);\n }\n if (arrayify(value).byteLength !== size) {\n logger.throwArgumentError(`invalid value for ${type}`, \"value\", value);\n }\n if (isArray) {\n return arrayify((value + Zeros).substring(0, 66));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n if (count != value.length) {\n logger.throwArgumentError(`invalid array length for ${type}`, \"value\", value);\n }\n const result = [];\n value.forEach(function (value) {\n result.push(_pack(baseType, value, true));\n });\n return concat(result);\n }\n return logger.throwArgumentError(\"invalid type\", \"type\", type);\n}\n// @TODO: Array Enum\nexport function pack(types, values) {\n if (types.length != values.length) {\n logger.throwArgumentError(\"wrong number of values; expected ${ types.length }\", \"values\", values);\n }\n const tight = [];\n types.forEach(function (type, index) {\n tight.push(_pack(type, values[index]));\n });\n return hexlify(concat(tight));\n}\nexport function keccak256(types, values) {\n return hashKeccak256(pack(types, values));\n}\nexport function sha256(types, values) {\n return hashSha256(pack(types, values));\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nimport sha3 from \"js-sha3\";\nimport { arrayify } from \"@ethersproject/bytes\";\nexport function keccak256(data) {\n return '0x' + sha3.keccak_256(arrayify(data));\n}\n//# sourceMappingURL=index.js.map","import { formatBytes32String } from '@ethersproject/strings';\nimport { keccak256 } from '@ethersproject/solidity';\nimport { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { Provider } from '@ethersproject/providers';\nimport { GyroConfig, GyroConfig__factory, Multicall } from '@/contracts';\nimport { GyroConfigInterface } from '@/contracts/GyroConfig';\n\nexport interface GyroConfigRepository {\n getGyroProtocolFee(poolAddress: string): Promise;\n}\n\nconst protocolFeePercKey = formatBytes32String('PROTOCOL_SWAP_FEE_PERC');\nconst gyroPoolTypeKey = formatBytes32String('E-CLP');\nconst encodedPoolTypeKey = keccak256(\n ['bytes'],\n [\n defaultAbiCoder.encode(\n ['bytes32', 'bytes32'],\n [protocolFeePercKey, gyroPoolTypeKey]\n ),\n ]\n);\n\nexport class GyroConfigRepositoryImpl implements GyroConfigRepository {\n gyroConfigInterface: GyroConfigInterface;\n gyroConfig: GyroConfig;\n\n constructor(\n private gyroConfigAddress: string,\n private multicall: Multicall,\n provider: Provider\n ) {\n this.gyroConfigInterface = GyroConfig__factory.createInterface();\n this.gyroConfig = GyroConfig__factory.connect(gyroConfigAddress, provider);\n }\n\n async getGyroProtocolFee(poolAddress: string): Promise {\n let fee;\n const encodedPoolSpecificKey = keccak256(\n ['bytes'],\n [\n defaultAbiCoder.encode(\n ['bytes32', 'uint256'],\n [protocolFeePercKey, poolAddress]\n ),\n ]\n );\n const payload = [\n {\n target: this.gyroConfigAddress,\n callData: this.gyroConfigInterface.encodeFunctionData('hasKey', [\n encodedPoolSpecificKey,\n ]),\n },\n {\n target: this.gyroConfigAddress,\n callData: this.gyroConfigInterface.encodeFunctionData('hasKey', [\n encodedPoolTypeKey,\n ]),\n },\n {\n target: this.gyroConfigAddress,\n callData: this.gyroConfigInterface.encodeFunctionData('hasKey', [\n protocolFeePercKey,\n ]),\n },\n ];\n const [, [hasSpecificKeyHex, hasPoolTypeKeyHex, hasDefaultKeyHex]] =\n await this.multicall.callStatic.aggregate(payload);\n const hasSpecificKey = BigNumber.from(hasSpecificKeyHex).eq(1);\n const hasPoolTypeKey = BigNumber.from(hasPoolTypeKeyHex).eq(1);\n const hasDefaultKey = BigNumber.from(hasDefaultKeyHex).eq(1);\n if (hasSpecificKey) {\n fee = parseFloat(\n formatFixed(await this.gyroConfig.getUint(encodedPoolSpecificKey), 18)\n );\n } else if (hasPoolTypeKey) {\n fee = parseFloat(\n formatFixed(await this.gyroConfig.getUint(encodedPoolTypeKey), 18)\n );\n } else if (hasDefaultKey) {\n fee = parseFloat(\n formatFixed(await this.gyroConfig.getUint(protocolFeePercKey), 18)\n );\n } else {\n fee = 0;\n }\n return fee;\n }\n}\n","import { Interface } from '@ethersproject/abi';\nimport { getAddress } from '@ethersproject/address';\nimport { formatUnits } from '@ethersproject/units';\nimport { Multicall } from '@/contracts';\n\nconst gaugeControllerInterface = new Interface([\n 'function gauge_relative_weight(address gauge, uint timestamp) view returns (uint)',\n]);\n\nconst gaugeControllerCheckpointerInterface = new Interface([\n 'function gauge_relative_weight(address gauge) view returns (uint)',\n]);\n\nexport class GaugeControllerMulticallRepository {\n constructor(\n private multicall: Multicall,\n private gaugeControllerAddress: string,\n private gaugeControllerCheckpointerAddress?: string\n ) {}\n\n async getRelativeWeights(\n gaugeAddresses: string[],\n timestamp?: number\n ): Promise<{ [gaugeAddress: string]: number }> {\n const payload = gaugeAddresses.map((gaugeAddress) => {\n // The checkpointer only exists for mainnet, if the network is a testnet, it'll use the regular gauge controller\n if (this.gaugeControllerCheckpointerAddress && !timestamp) {\n return {\n target: this.gaugeControllerCheckpointerAddress,\n callData: gaugeControllerCheckpointerInterface.encodeFunctionData(\n 'gauge_relative_weight',\n [getAddress(gaugeAddress)]\n ),\n };\n }\n return {\n target: this.gaugeControllerAddress,\n callData: gaugeControllerInterface.encodeFunctionData(\n 'gauge_relative_weight',\n [getAddress(gaugeAddress), timestamp || Math.floor(Date.now() / 1000)]\n ),\n };\n });\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const weights = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseFloat(formatUnits(res[i], 18));\n return p;\n },\n {}\n );\n\n return weights;\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { Findable } from '@/types';\n\nexport abstract class AbstractSubgraphRepository\n implements Findable\n{\n protected abstract mapType(subgraphFragment: any): T;\n\n abstract query(args: any): Promise;\n\n async get(args: any): Promise {\n const result = await this.query(args);\n return result?.length > 0 ? result[0] : undefined;\n }\n\n async find(id: string): Promise {\n return this.get({ where: { id: id } });\n }\n\n async findBy(attribute: A, value: string): Promise {\n return this.get({ where: { [String(attribute)]: value } });\n }\n\n async findAllBy(\n attribute: A,\n value: string,\n first = 1000,\n skip = 0\n ): Promise {\n const args = {\n where: { [String(attribute)]: value },\n first: first,\n skip: skip,\n };\n return this.query(args);\n }\n}\n","import { Network } from '@/lib/constants/network';\nimport { AbstractSubgraphRepository } from './abstract-subgraph-repository';\nimport { createSubgraphClient, SubgraphClient } from '../subgraph';\n\nexport abstract class BalancerSubgraphRepository<\n T,\n A\n> extends AbstractSubgraphRepository {\n protected client: SubgraphClient;\n\n constructor(\n url: string,\n protected chainId: Network,\n protected blockHeight?: () => Promise\n ) {\n super();\n this.client = createSubgraphClient(url);\n }\n}\n","import { Network } from '@/lib/constants/network';\nimport { AbstractSubgraphRepository } from './abstract-subgraph-repository';\nimport { createGaugesClient, GaugesClient } from '../subgraph';\n\nexport abstract class GaugesSubgraphRepository<\n T,\n A\n> extends AbstractSubgraphRepository {\n protected client: GaugesClient;\n\n constructor(\n url: string,\n protected chainId: Network,\n protected blockHeight?: () => Promise\n ) {\n super();\n this.client = createGaugesClient(url);\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { GaugeShare, GaugeShareAttributes } from './types';\nimport { GaugesSubgraphRepository } from '@/modules/subgraph/repository';\nimport {\n SubgraphGaugeShareFragment,\n GaugeShare_OrderBy,\n OrderDirection,\n} from '@/modules/subgraph/generated/balancer-gauges';\n\nexport class GaugeSharesRepository extends GaugesSubgraphRepository<\n GaugeShare,\n GaugeShareAttributes\n> {\n async query(args: any): Promise {\n if (!args.orderBy) args.orderBy = GaugeShare_OrderBy.balance;\n if (!args.orderDirection) args.orderDirection = OrderDirection.desc;\n if (!args.block && this.blockHeight)\n args.block = { number: await this.blockHeight() };\n\n const { gaugeShares } = await this.client.GaugeShares(args);\n return gaugeShares.map(this.mapType);\n }\n\n mapType(subgraphGaugeShare: SubgraphGaugeShareFragment): GaugeShare {\n return {\n id: subgraphGaugeShare.id,\n balance: subgraphGaugeShare.balance,\n userAddress: subgraphGaugeShare.user?.id,\n gauge: {\n id: subgraphGaugeShare.gauge.id,\n poolId: subgraphGaugeShare.gauge.poolId || undefined,\n isKilled: subgraphGaugeShare.gauge.isKilled,\n totalSupply: subgraphGaugeShare.gauge.totalSupply,\n },\n };\n }\n\n async findByUser(\n userAddress: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(\n GaugeShareAttributes.UserAddress,\n userAddress,\n first,\n skip\n );\n }\n\n async findByGauge(\n gaugeId: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(GaugeShareAttributes.GaugeId, gaugeId, first, skip);\n }\n}\n","import { Multicall } from '@/contracts';\nimport { Interface } from '@ethersproject/abi';\nimport { formatUnits } from '@ethersproject/units';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport type { Network } from '@/types';\n\nconst liquidityGaugeV5Interface = new Interface([\n 'function totalSupply() view returns (uint)',\n 'function working_supply() view returns (uint)',\n 'function reward_count() view returns (uint)',\n 'function reward_tokens(uint rewardIndex) view returns (address)',\n 'function reward_data(address rewardToken) view returns (tuple(address token, address distributor, uint period_finish, uint rate, uint last_update, uint integral) data)',\n]);\n\nconst childLiquidityGaugeInterface = new Interface([\n 'function inflation_rate(uint currentWeekTimestamp) view returns (uint)',\n]);\n\nexport interface RewardData {\n token: string; // Always 0x0\n distributor: string;\n period_finish: BigNumber;\n rate: BigNumber; // per second\n last_update: BigNumber;\n integral: BigNumber; // sum accrued to date\n decimals?: number; // Provided by subgraph\n}\n\n/**\n * A lot of code to get liquidity gauge state via RPC multicall.\n * TODO: reseach helper contracts or extend subgraph\n */\nexport class LiquidityGaugesMulticallRepository {\n constructor(private multicall: Multicall, private chainId: Network) {}\n\n async getTotalSupplies(\n gaugeAddresses: string[]\n ): Promise<{ [gaugeAddress: string]: number }> {\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData('totalSupply', []),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n // Handle 0x\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n\n const totalSupplies = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseFloat(formatUnits(res0x[i], 18));\n return p;\n },\n {}\n );\n\n return totalSupplies;\n }\n\n async getWorkingSupplies(\n gaugeAddresses: string[]\n ): Promise<{ [gaugeAddress: string]: number }> {\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'working_supply',\n []\n ),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n // Handle 0x\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n\n const workingSupplies = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseFloat(formatUnits(res0x[i], 18));\n return p;\n },\n {}\n );\n\n return workingSupplies;\n }\n\n async getInflationRates(\n gaugeAddresses: string[]\n ): Promise<{ [gaugeAddress: string]: number }> {\n const currentWeek = Math.floor(Date.now() / 1000 / 604800);\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: childLiquidityGaugeInterface.encodeFunctionData(\n 'inflation_rate',\n [currentWeek]\n ),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n // Handle 0x\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n\n const inflationRates = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseFloat(formatUnits(res0x[i], 18));\n return p;\n },\n {}\n );\n\n return inflationRates;\n }\n\n async getRewardCounts(\n gaugeAddresses: string[]\n ): Promise<{ [gaugeAddress: string]: number }> {\n let rewardCounts;\n if (this.chainId == 1) {\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'reward_count',\n []\n ),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n // Handle 0x return values\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n\n rewardCounts = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseInt(res0x[i]);\n return p;\n },\n {}\n );\n } else {\n rewardCounts = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a) => {\n p[a] ||= 1;\n return p;\n },\n {}\n );\n }\n\n return rewardCounts;\n }\n\n async getRewardTokens(\n gaugeAddresses: string[],\n passingRewardCounts?: { [gaugeAddress: string]: number }\n ): Promise<{ [gaugeAddress: string]: string[] }> {\n const rewardCounts =\n passingRewardCounts || (await this.getRewardCounts(gaugeAddresses));\n const gaugesWithRewards = gaugeAddresses.filter(\n (gaugeAddress) => rewardCounts[gaugeAddress] > 0\n );\n const startIndexes = [0];\n const payload = gaugesWithRewards\n .map((gaugeAddress, gaugeIndex) => {\n const calls = [];\n for (let i = 0; i < rewardCounts[gaugeAddress]; i++) {\n calls.push({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'reward_tokens',\n [i]\n ),\n });\n }\n startIndexes[gaugeIndex + 1] =\n startIndexes[gaugeIndex] + rewardCounts[gaugeAddress];\n return calls;\n })\n .flat();\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const rewardTokens = gaugesWithRewards.reduce(\n (p: { [key: string]: string[] }, a, i) => {\n const start = startIndexes[i];\n const end = startIndexes[i + 1];\n const tokens: string[] = [];\n for (let i = start; i < end; i++) {\n tokens.push(\n liquidityGaugeV5Interface.decodeFunctionResult(\n 'reward_tokens',\n res[i]\n )[0]\n );\n }\n p[a] ||= tokens;\n return p;\n },\n {}\n );\n\n return rewardTokens;\n }\n\n async getRewardData(\n gaugeAddresses: string[],\n passingRewardTokens?: { [gaugeAddress: string]: string[] }\n ): Promise<{\n [gaugeAddress: string]: { [rewardTokenAddress: string]: RewardData };\n }> {\n const rewardTokens =\n passingRewardTokens || (await this.getRewardTokens(gaugeAddresses));\n\n const startIndexes = [0];\n const payload = Object.keys(rewardTokens)\n .map((gaugeAddress, gaugeIndex) => {\n const calls = [];\n for (let i = 0; i < rewardTokens[gaugeAddress].length; i++) {\n calls.push({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'reward_data',\n [rewardTokens[gaugeAddress][i]]\n ),\n });\n }\n startIndexes[gaugeIndex + 1] =\n startIndexes[gaugeIndex] + rewardTokens[gaugeAddress].length;\n return calls;\n })\n .flat();\n const [, res] = (await this.multicall.callStatic.aggregate(payload)) as [\n unknown,\n string[]\n ];\n const decoded = res.map(\n (r) => liquidityGaugeV5Interface.decodeFunctionResult('reward_data', r)[0]\n );\n\n const rewardData = Object.keys(rewardTokens).reduce(\n (p: { [key: string]: { [key: string]: RewardData } }, a, i) => {\n const start = startIndexes[i];\n const data = rewardTokens[a].reduce(\n (d: { [key: string]: RewardData }, t, x) => {\n d[t] ||= decoded[start + x] as RewardData;\n return d;\n },\n {}\n );\n p[a] ||= data;\n return p;\n },\n {}\n );\n\n return rewardData;\n }\n}\n","import { Findable } from '../types';\nimport {\n createGaugesClient,\n GaugesClient,\n SubgraphLiquidityGauge,\n} from '@/modules/subgraph/subgraph';\n\n/**\n * Access liquidity gauges indexed by subgraph.\n * Because we have ~100 gauges to save on repeated http calls we cache all results as `gauges` on an instance.\n * Balancer's subgraph URL: https://thegraph.com/hosted-service/subgraph/balancer-labs/balancer-gauges\n */\nexport class LiquidityGaugesSubgraphRepository\n implements Findable\n{\n private client: GaugesClient;\n public gauges: SubgraphLiquidityGauge[] = [];\n\n constructor(url: string) {\n this.client = createGaugesClient(url);\n }\n\n async fetch(): Promise {\n console.time('fetching liquidity gauges');\n const queryResult = await this.client.Pools({\n first: 1000,\n where: {\n preferentialGauge_not: null,\n },\n });\n const qauges = queryResult.pools.map((pool) => pool.preferentialGauge);\n // TODO: optionally convert subgraph type to sdk internal type\n this.gauges = qauges as SubgraphLiquidityGauge[];\n\n console.timeEnd('fetching liquidity gauges');\n return this.gauges;\n }\n\n async find(id: string): Promise {\n if (this.gauges.length == 0) {\n await this.fetch();\n }\n\n return this.gauges.find((gauge) => gauge.id == id);\n }\n\n async findBy(\n param: string,\n value: string\n ): Promise {\n if (this.gauges.length == 0) {\n await this.fetch();\n }\n\n if (param == 'id') {\n return this.find(value);\n } else if (param == 'poolId') {\n return this.gauges.find((gauge) => gauge.poolId == value);\n } else if (param == 'poolAddress') {\n return this.gauges.find((gauge) => gauge.poolAddress == value);\n } else {\n throw `search by ${param} not implemented`;\n }\n }\n}\n","import { GaugeControllerMulticallRepository } from '../gauge-controller/multicall';\nimport { LiquidityGaugesMulticallRepository, RewardData } from './multicall';\nimport { LiquidityGaugesSubgraphRepository } from './subgraph';\nimport { parseUnits } from '@ethersproject/units';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport type {\n Maybe,\n SubgraphLiquidityGauge,\n} from '@/modules/subgraph/subgraph';\nimport type { Findable } from '../types';\nimport type { Network } from '@/types';\nimport { Multicall } from '@/contracts';\n\nexport interface LiquidityGauge {\n id: string;\n address: string;\n name: string;\n poolId?: Maybe;\n poolAddress: string;\n totalSupply: number;\n workingSupply: number;\n relativeWeight: number;\n rewardTokens?: { [tokenAddress: string]: RewardData };\n claimableTokens?: { [tokenAddress: string]: BigNumber };\n balInflationRate?: number;\n}\n\nexport class LiquidityGaugeSubgraphRPCProvider\n implements Findable\n{\n gaugeController?: GaugeControllerMulticallRepository;\n multicall: LiquidityGaugesMulticallRepository;\n subgraph: LiquidityGaugesSubgraphRepository;\n workingSupplies: { [gaugeAddress: string]: number } = {};\n relativeWeights: { [gaugeAddress: string]: number } = {};\n inflationRates: { [gaugeAddress: string]: number } = {};\n rewardData: {\n [gaugeAddress: string]: { [tokenAddress: string]: RewardData };\n } = {};\n gauges?: Promise;\n\n constructor(\n subgraphUrl: string,\n multicall: Multicall,\n gaugeControllerAddress: string,\n private chainId: Network,\n gaugeControllerCheckpointerAddress?: string\n ) {\n if (gaugeControllerAddress) {\n this.gaugeController = new GaugeControllerMulticallRepository(\n multicall,\n gaugeControllerAddress,\n gaugeControllerCheckpointerAddress\n );\n }\n this.multicall = new LiquidityGaugesMulticallRepository(multicall, chainId);\n this.subgraph = new LiquidityGaugesSubgraphRepository(subgraphUrl);\n }\n\n async fetch(): Promise {\n const gauges: SubgraphLiquidityGauge[] = await this.subgraph.fetch();\n const gaugeAddresses = gauges.map((g) => g.id);\n if (this.chainId == 1) {\n console.time('Fetching multicall.getWorkingSupplies');\n this.workingSupplies = await this.multicall.getWorkingSupplies(\n gaugeAddresses\n );\n console.timeEnd('Fetching multicall.getWorkingSupplies');\n } else {\n // Filter out gauges that are not from the factory supporting inflation rate\n // Safe to remove this once all gauges are migrated to the new factory\n const oldFactories = [\n '0x3b8ca519122cdd8efb272b0d3085453404b25bd0', // Polygon\n '0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2', // Arbitrum\n '0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647', // Optimism\n '0x809b79b53f18e9bc08a961ed4678b901ac93213a', // Gnosis\n ];\n\n const childGaugeAddresses = gauges\n .filter((g) => !oldFactories.includes(g.factory.id.toLowerCase()))\n .map((g) => g.id);\n\n if (childGaugeAddresses.length > 0) {\n console.time('Fetching multicall.inflationRates');\n this.inflationRates = await this.multicall.getInflationRates(\n childGaugeAddresses\n );\n console.timeEnd('Fetching multicall.inflationRates');\n console.time('Fetching multicall.getWorkingSupplies');\n this.workingSupplies = await this.multicall.getWorkingSupplies(\n childGaugeAddresses\n );\n console.timeEnd('Fetching multicall.getWorkingSupplies');\n }\n }\n if (this.gaugeController) {\n console.time('Fetching gaugeController.getRelativeWeights');\n this.relativeWeights = await this.gaugeController.getRelativeWeights(\n gaugeAddresses\n );\n console.timeEnd('Fetching gaugeController.getRelativeWeights');\n }\n\n // Kept as a potential fallback for getting rewardData from RPC\n // this.rewardData = await this.multicall.getRewardData(\n // gaugeAddresses //,\n // // rewardTokens\n // );\n\n // Reward data was made available from subgraph, keeping it separate for potential RPC fallback\n this.rewardData = gauges.reduce(\n (r: { [key: string]: { [key: string]: RewardData } }, g) => {\n r[g.id] ||= g.tokens\n ? Object.fromEntries(\n g.tokens.map((t) => [\n t.id.split('-')[0],\n {\n distributor: '',\n last_update: BigNumber.from(0),\n integral: BigNumber.from(0),\n token: t.id.split('-')[0],\n decimals: t.decimals,\n rate: parseUnits(t.rate || '0', t.decimals),\n period_finish: BigNumber.from(\n (t.periodFinish as unknown as string) || '0'\n ),\n },\n ])\n )\n : {};\n\n return r;\n },\n {}\n );\n\n return gauges.map(this.compose.bind(this));\n }\n\n async find(id: string): Promise {\n if (!this.gauges) {\n this.gauges = this.fetch();\n }\n\n return (await this.gauges).find((g) => g.id == id);\n }\n\n async findBy(\n attribute: string,\n value: string\n ): Promise {\n if (!this.gauges) {\n this.gauges = this.fetch();\n }\n\n let gauge: LiquidityGauge | undefined;\n if (attribute == 'id') {\n return this.find(value);\n } else if (attribute == 'address') {\n return this.find(value);\n } else if (attribute == 'poolId') {\n gauge = (await this.gauges).find((g) => g.poolId == value);\n } else if (attribute == 'poolAddress') {\n gauge = (await this.gauges).find((g) => g.poolAddress == value);\n } else {\n throw `search by ${attribute} not implemented`;\n }\n\n return gauge;\n }\n\n private compose(subgraphGauge: SubgraphLiquidityGauge) {\n return {\n id: subgraphGauge.id,\n address: subgraphGauge.id,\n name: subgraphGauge.symbol,\n poolId: subgraphGauge.poolId,\n poolAddress: subgraphGauge.poolAddress,\n totalSupply: parseFloat(subgraphGauge.totalSupply),\n workingSupply: this.workingSupplies[subgraphGauge.id],\n relativeWeight: this.relativeWeights[subgraphGauge.id],\n rewardTokens: this.rewardData[subgraphGauge.id],\n balInflationRate: this.inflationRates[subgraphGauge.id],\n };\n }\n}\n","import axios from 'axios';\nimport { jsonToGraphQLQuery } from 'json-to-graphql-query';\n\nexport default class BalancerAPIClient {\n constructor(private readonly url: string, private readonly apiKey: string) {}\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public async get(query: unknown): Promise {\n try {\n const payload = this.toPayload(query);\n const { data } = await axios.post(this.url, payload, {\n headers: {\n 'x-api-key': this.apiKey,\n },\n });\n if (data.errors) {\n throw new Error(\n data.errors.map((error: Error) => error.message).join(',')\n );\n }\n return data.data;\n } catch (error) {\n console.error(error);\n throw error;\n }\n\n return [];\n }\n\n public toPayload(query: unknown): unknown {\n return JSON.stringify({ query: jsonToGraphQLQuery({ query }) });\n }\n}\n","import { Findable } from '../types';\nimport { PoolAttribute, PoolsRepositoryFetchOptions } from './types';\nimport { GraphQLQuery, Pool } from '@/types';\nimport BalancerAPIClient from '@/modules/api/balancer-api.client';\nimport {\n GraphQLArgsBuilder,\n BalancerAPIArgsFormatter,\n} from '@/lib/graphql/args-builder';\nimport { GraphQLArgs } from '@/lib/graphql/types';\n\ninterface PoolsBalancerAPIOptions {\n url: string;\n apiKey: string;\n query?: GraphQLQuery;\n}\n\nconst MAX_POOLS_PER_REQUEST = 1000;\nconst DEFAULT_SKIP = 0;\nconst DEFAULT_FIRST = 10;\nconst CHECK_TIMEOUT_SECONDS = 10;\nconst CHECK_INTERVAL_MS = 10;\nconst MAX_CHECKS = (CHECK_TIMEOUT_SECONDS * 1000) / CHECK_INTERVAL_MS;\n\nfunction timeout(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Access pools using the Balancer GraphQL Api.\n *\n * Balancer's API URL: https://api.balancer.fi/query/\n */\nexport class PoolsBalancerAPIRepository\n implements Findable\n{\n private client: BalancerAPIClient;\n public pools: Pool[] = [];\n public skip = 0; // Keep track of how many pools to skip on next fetch, so this functions similar to subgraph repository.\n public nextToken: string | undefined | null; // A token to pass to the next query to retrieve the next page of results. Undefined initially, null when there are no more results.\n private query: GraphQLQuery;\n private hasFetched = false;\n private isFetching = false;\n\n constructor(options: PoolsBalancerAPIOptions) {\n this.client = new BalancerAPIClient(options.url, options.apiKey);\n\n const defaultArgs: GraphQLArgs = {\n chainId: 1,\n orderBy: 'totalLiquidity',\n orderDirection: 'desc',\n where: {\n swapEnabled: {\n eq: true,\n },\n totalShares: {\n gt: 0.05,\n },\n },\n };\n\n const defaultAttributes = {\n id: true,\n address: true,\n };\n\n this.query = {\n args: Object.assign({}, options.query?.args || defaultArgs),\n attrs: Object.assign({}, options.query?.attrs || defaultAttributes),\n };\n\n // skip is not a valid argument for the Balancer API, it uses nextToken\n delete this.query.args.skip;\n }\n\n private fetchFromCache(first: number, skip: number): Pool[] {\n const pools = this.pools.slice(skip, first + skip);\n return pools;\n }\n\n async fetch(options?: PoolsRepositoryFetchOptions): Promise {\n const first = options?.first || DEFAULT_FIRST;\n const skip = options?.skip || DEFAULT_SKIP;\n\n if (!this.hasFetched) {\n this.fetchAll(options);\n }\n await this.awaitEnoughPoolsFetched(first, skip);\n return this.fetchFromCache(first, skip);\n }\n\n // Fetches all pools from the API in a loop and saves them to the cache.\n async fetchAll(options?: PoolsRepositoryFetchOptions): Promise {\n this.isFetching = true;\n this.hasFetched = true;\n\n if (this.nextToken) {\n this.query.args.nextToken = this.nextToken;\n }\n\n this.query.args.first = MAX_POOLS_PER_REQUEST;\n const formattedArgs = new GraphQLArgsBuilder(this.query.args).format(\n new BalancerAPIArgsFormatter()\n );\n\n const attrs = this.query.attrs;\n attrs.nextToken = true;\n\n const formattedQuery = {\n pools: {\n __args: formattedArgs,\n ...attrs,\n },\n };\n\n const apiResponse = await this.client.get(formattedQuery);\n const apiResponseData = apiResponse.pools;\n\n this.nextToken = apiResponseData.nextToken;\n this.pools = this.pools.concat(apiResponseData.pools.map(this.format));\n\n if (this.nextToken) return await this.fetchAll(options);\n\n this.isFetching = false;\n }\n\n // A function that waits until enough pools have been loaded into the cache\n // or fetching has finished. Used so that all pools can be fetched in the\n // background, while fetch returns the first results to the user quickly.\n async awaitEnoughPoolsFetched(first: number, skip: number): Promise {\n for (let totalChecks = 0; totalChecks < MAX_CHECKS; totalChecks++) {\n if (this.pools.length > first + skip) {\n return;\n }\n if (!this.isFetching) {\n return;\n }\n await timeout(CHECK_INTERVAL_MS);\n }\n\n return;\n }\n\n async find(id: string): Promise {\n if (this.pools.length == 0) {\n await this.fetch();\n }\n\n return this.findBy('id', id);\n }\n\n async findBy(param: PoolAttribute, value: string): Promise {\n if (this.pools.length == 0) {\n await this.fetch();\n }\n\n const pool = this.pools.find((pool) => pool[param] == value);\n if (pool) {\n return this.format(pool);\n }\n }\n\n /** Fixes any formatting issues from the subgraph\n * - GraphQL can't store a map so pool.apr.[rewardAprs/tokenAprs].breakdown\n * is JSON data that needs to be parsed so they match the Pool type correctly.\n */\n private format(pool: Pool): Pool {\n if (pool.apr?.rewardAprs.breakdown) {\n // GraphQL can't store this as a map so it's JSON that we must parse\n const rewardsBreakdown = JSON.parse(\n pool.apr?.rewardAprs.breakdown as unknown as string\n );\n pool.apr.rewardAprs.breakdown = rewardsBreakdown;\n }\n if (pool.apr?.tokenAprs.breakdown) {\n // GraphQL can't store this as a map so it's JSON that we must parse\n const tokenAprsBreakdown = JSON.parse(\n pool.apr?.tokenAprs.breakdown as unknown as string\n );\n pool.apr.tokenAprs.breakdown = tokenAprsBreakdown;\n }\n\n return pool;\n }\n}\n","import { Findable } from '../types';\nimport { Pool } from '@/types';\nimport {\n PoolAttribute,\n PoolRepository,\n PoolsFallbackRepositoryOptions,\n PoolsRepositoryFetchOptions,\n} from './types';\nimport { Logger } from '@/lib/utils/logger';\n\n/**\n * The fallback provider takes multiple PoolRepository's in an array and uses them in order\n * falling back to the next one if a request times out.\n *\n * This is useful for using the Balancer API while being able to fall back to the graph if it is down\n * to ensure Balancer is maximally decentralized.\n **/\nexport class PoolsFallbackRepository implements Findable {\n currentProviderIdx: number;\n timeout: number;\n\n constructor(\n private readonly providers: PoolRepository[],\n options: PoolsFallbackRepositoryOptions = {}\n ) {\n this.currentProviderIdx = 0;\n this.timeout = options.timeout || 10000;\n }\n\n async fetch(options?: PoolsRepositoryFetchOptions): Promise {\n return this.fallbackQuery('fetch', [options]);\n }\n\n get currentProvider(): PoolRepository | undefined {\n if (\n !this.providers.length ||\n this.currentProviderIdx >= this.providers.length\n ) {\n return;\n }\n\n return this.providers[this.currentProviderIdx];\n }\n\n async find(id: string): Promise {\n return this.fallbackQuery('find', [id]);\n }\n\n async findBy(\n attribute: PoolAttribute,\n value: string\n ): Promise {\n return this.fallbackQuery('findBy', [attribute, value]);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n async fallbackQuery(func: string, args: unknown[]): Promise {\n if (this.currentProviderIdx >= this.providers.length) {\n throw new Error('No working providers found');\n }\n\n let result;\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const currentProvider = this.providers[this.currentProviderIdx] as any;\n result = await Promise.race([\n // eslint-disable-next-line prefer-spread\n currentProvider[func].apply(currentProvider, args),\n new Promise((_, reject) =>\n setTimeout(() => reject(new Error('timeout')), this.timeout)\n ),\n ]);\n } catch (e: unknown) {\n const message = (e as Error).message;\n if (message === 'timeout') {\n const logger = Logger.getInstance();\n logger.warn(\n 'Provider ' +\n this.currentProviderIdx +\n ' timed out, falling back to next provider'\n );\n } else {\n const logger = Logger.getInstance();\n logger.warn(\n `Provider ${this.currentProviderIdx} failed with error, falling back to next provider.`\n );\n logger.warn(message);\n }\n this.currentProviderIdx++;\n result = await this.fallbackQuery.call(this, func, args);\n }\n\n return result;\n }\n}\n","import { Findable, Pool, Searchable } from '@/types';\nimport { PoolAttribute } from './types';\n\nexport class PoolsStaticRepository\n implements Findable, Searchable\n{\n constructor(private pools: Pool[]) {}\n\n async find(id: string): Promise {\n return this.pools.find((pool) => {\n return pool.id.toLowerCase() === id.toLowerCase();\n });\n }\n\n async findBy(\n attribute: PoolAttribute,\n value: string\n ): Promise {\n return this.pools.find((pool) => {\n return pool[attribute] === value;\n });\n }\n\n async all(): Promise {\n return this.pools;\n }\n\n async where(filter: (pool: Pool) => boolean): Promise {\n return (await this.all()).filter(filter);\n }\n}\n","import { Pool, PoolType, PoolToken, SubPool } from '@/.';\nimport {\n SubgraphPool,\n SubgraphPoolTokenFragment,\n SubgraphSubPoolFragment,\n SubgraphSubPoolTokenFragment,\n} from '@/modules/subgraph/subgraph';\n\ninterface SubgraphSubPoolToken extends SubgraphSubPoolTokenFragment {\n token?: SubgraphSubPoolMeta | null;\n}\n\ninterface SubgraphSubPoolMeta {\n latestUSDPrice?: string | null;\n pool?: SubgraphSubPool | null;\n}\n\ninterface SubgraphSubPool extends SubgraphSubPoolFragment {\n tokens: SubgraphSubPoolToken[];\n}\n\nexport const mapType = (subgraphPool: SubgraphPool, chainId: number): Pool => {\n return {\n id: subgraphPool.id,\n name: subgraphPool.name || '',\n address: subgraphPool.address,\n chainId: chainId,\n poolType: subgraphPool.poolType as PoolType,\n poolTypeVersion: subgraphPool.poolTypeVersion || 1,\n swapFee: subgraphPool.swapFee,\n swapEnabled: subgraphPool.swapEnabled,\n protocolYieldFeeCache: subgraphPool.protocolYieldFeeCache || '0.5', // Default protocol yield fee\n protocolSwapFeeCache: subgraphPool.protocolSwapFeeCache || '0.5', // Default protocol swap fee\n amp: subgraphPool.amp ?? undefined,\n owner: subgraphPool.owner ?? undefined,\n factory: subgraphPool.factory ?? undefined,\n symbol: subgraphPool.symbol ?? undefined,\n tokens: (subgraphPool.tokens || []).map(mapToken),\n tokensList: subgraphPool.tokensList,\n tokenAddresses: (subgraphPool.tokens || []).map((t) => t.address),\n totalLiquidity: subgraphPool.totalLiquidity,\n totalShares: subgraphPool.totalShares,\n totalSwapFee: subgraphPool.totalSwapFee,\n totalSwapVolume: subgraphPool.totalSwapVolume,\n priceRateProviders: subgraphPool.priceRateProviders ?? undefined,\n // onchain: subgraphPool.onchain,\n createTime: subgraphPool.createTime,\n mainIndex: subgraphPool.mainIndex ?? undefined,\n wrappedIndex: subgraphPool.wrappedIndex ?? undefined,\n // mainTokens: subgraphPool.mainTokens,\n // wrappedTokens: subgraphPool.wrappedTokens,\n // unwrappedTokens: subgraphPool.unwrappedTokens,\n // isNew: subgraphPool.isNew,\n // volumeSnapshot: subgraphPool.volumeSnapshot,\n // feesSnapshot: subgraphPool.???, // Approximated last 24h fees\n // boost: subgraphPool.boost,\n totalWeight: subgraphPool.totalWeight || '1',\n lowerTarget: subgraphPool.lowerTarget ?? '0',\n upperTarget: subgraphPool.upperTarget ?? '0',\n isInRecoveryMode: subgraphPool.isInRecoveryMode ?? false,\n isPaused: subgraphPool.isPaused ?? false,\n };\n};\n\nconst mapToken = (subgraphToken: SubgraphPoolTokenFragment): PoolToken => {\n const subPoolInfo = mapSubPools(\n // need to typecast as the fragment is 3 layers deep while the type is infinite levels deep\n subgraphToken.token as SubgraphSubPoolMeta\n );\n return {\n ...subgraphToken,\n isExemptFromYieldProtocolFee:\n subgraphToken.isExemptFromYieldProtocolFee || false,\n token: subPoolInfo,\n };\n};\n\nconst mapSubPools = (metadata: SubgraphSubPoolMeta) => {\n let subPool: SubPool | null = null;\n\n if (metadata.pool) {\n subPool = {\n id: metadata.pool.id,\n address: metadata.pool.address,\n totalShares: metadata.pool.totalShares,\n poolType: metadata.pool.poolType as PoolType,\n mainIndex: metadata.pool.mainIndex || 0,\n };\n\n if (metadata?.pool.tokens) {\n subPool.tokens = metadata.pool.tokens.map(mapSubPoolToken);\n }\n }\n\n return {\n pool: subPool,\n latestUSDPrice: metadata.latestUSDPrice || undefined,\n };\n};\n\nconst mapSubPoolToken = (token: SubgraphSubPoolToken) => {\n return {\n address: token.address,\n decimals: token.decimals,\n symbol: token.symbol,\n balance: token.balance,\n priceRate: token.priceRate,\n weight: token.weight,\n isExemptFromYieldProtocolFee:\n token.isExemptFromYieldProtocolFee || undefined,\n token: token.token ? mapSubPools(token.token) : undefined,\n };\n};\n","import { Findable, Searchable } from '../types';\nimport {\n createSubgraphClient,\n SubgraphClient,\n Pool_OrderBy,\n OrderDirection,\n} from '@/modules/subgraph/subgraph';\nimport {\n GraphQLArgsBuilder,\n SubgraphArgsFormatter,\n} from '@/lib/graphql/args-builder';\nimport { GraphQLArgs } from '@/lib/graphql/types';\nimport { PoolAttribute, PoolsRepositoryFetchOptions } from './types';\nimport { GraphQLQuery, Pool } from '@/types';\nimport { Network } from '@/lib/constants/network';\nimport { PoolsQueryVariables } from '../../subgraph/subgraph';\nimport { mapType } from './subgraph-helpers';\nimport { Logger } from '@/lib/utils/logger';\n\ninterface PoolsSubgraphRepositoryOptions {\n url: string;\n chainId: Network;\n blockHeight?: () => Promise;\n query?: GraphQLQuery;\n}\n\n/**\n * Access pools using generated subgraph client.\n *\n * Balancer's subgraph URL: https://thegraph.com/hosted-service/subgraph/balancer-labs/balancer-v2\n */\nexport class PoolsSubgraphRepository\n implements Findable, Searchable\n{\n private client: SubgraphClient;\n private chainId: Network;\n private pools?: Promise;\n public skip = 0;\n private blockHeight: undefined | (() => Promise);\n private query: GraphQLQuery;\n\n /**\n * Repository with optional lazy loaded blockHeight\n *\n * @param url subgraph URL\n * @param chainId current network, needed for L2s logic\n * @param blockHeight lazy loading blockHeigh resolver\n */\n constructor(options: PoolsSubgraphRepositoryOptions) {\n this.client = createSubgraphClient(options.url);\n this.blockHeight = options.blockHeight;\n this.chainId = options.chainId;\n\n const defaultArgs: GraphQLArgs = {\n orderBy: Pool_OrderBy.TotalLiquidity,\n orderDirection: OrderDirection.Desc,\n where: {\n totalShares: {\n gt: 0.000000000001,\n },\n },\n };\n\n const args = Object.assign({}, options.query?.args || defaultArgs);\n const attrs = Object.assign({}, options.query?.attrs || {});\n\n this.query = {\n args,\n attrs,\n };\n }\n\n /**\n * We need a list of all the pools, for calculating APRs (nested pools), and for SOR (path finding).\n * All the pools are fetched on page load and cachced for speedy lookups.\n *\n * @returns Promise resolving to pools list\n */\n private async fetchAllPools(): Promise {\n const logger = Logger.getInstance();\n logger.time('fetching pools');\n\n if (this.blockHeight) {\n this.query.args.block = { number: await this.blockHeight() };\n }\n const formattedQuery = new GraphQLArgsBuilder(this.query.args).format(\n new SubgraphArgsFormatter()\n ) as PoolsQueryVariables;\n\n const { pool0, pool1000, pool2000 } = await this.client.AllPools(\n formattedQuery\n );\n logger.timeEnd('fetching pools');\n\n return [...pool0, ...pool1000, ...pool2000].map((pool) =>\n mapType(pool, this.chainId)\n );\n }\n\n async fetch(options?: PoolsRepositoryFetchOptions): Promise {\n const logger = Logger.getInstance();\n logger.time('fetching pools');\n if (options?.skip) {\n this.query.args.skip = options.skip;\n }\n if (this.blockHeight) {\n this.query.args.block = { number: await this.blockHeight() };\n }\n\n this.query.args.first = options?.first || this.query.args.first || 1000;\n\n const formattedQuery = new GraphQLArgsBuilder(this.query.args).format(\n new SubgraphArgsFormatter()\n ) as PoolsQueryVariables;\n\n const { pools } = await this.client.Pools(formattedQuery);\n\n this.skip = (options?.skip || 0) + pools.length;\n logger.timeEnd('fetching pools');\n\n return pools.map((pool) => mapType(pool, this.chainId));\n }\n\n async find(id: string): Promise {\n return await this.findBy('id', id);\n }\n\n async findBy(param: PoolAttribute, value: string): Promise {\n if (!this.pools) {\n this.pools = this.fetchAllPools();\n }\n\n return (await this.pools).find((pool) => pool[param] == value);\n\n // TODO: @Nma - Fetching pools outside of default query is causing a lot of requests\n // on a frontend, because results aren't cached anywhere.\n // For fetching pools directly from subgraph with custom queries please use the client not this repository.\n // Code below kept for reference, to be removed later.\n //\n // if (this.pools) {\n // return (await this.pools).find((p) => p[param] === value);\n // }\n // const { pools } = await this.client.Pools({\n // where: {\n // [param]: value,\n // swapEnabled: true,\n // totalShares_gt: '0.000000000001',\n // },\n // block: await this.block(),\n // });\n // const poolsTab: Pool[] = pools.map(this.mapType.bind(this));\n // return poolsTab.length > 0 ? poolsTab[0] : undefined;\n }\n\n async all(): Promise {\n if (!this.pools) {\n this.pools = this.fetchAllPools();\n }\n return this.pools;\n }\n\n async block(): Promise<{ number: number | undefined } | undefined> {\n return this.blockHeight ? { number: await this.blockHeight() } : undefined;\n }\n\n async where(filter: (pool: Pool) => boolean): Promise {\n if (!this.pools) {\n this.pools = this.fetchAllPools();\n }\n\n return (await this.pools).filter(filter);\n }\n}\n","import { Cacheable, Findable, Searchable } from '../types';\nimport { Provider } from '@ethersproject/providers';\nimport { PoolAttribute, PoolsRepositoryFetchOptions } from './types';\nimport { Pool } from '@/types';\nimport { getOnChainBalances } from '../../../modules/sor/pool-data/onChainData3';\nimport { PoolsSubgraphRepository } from './subgraph';\nimport { Logger } from '@/lib/utils/logger';\n\ninterface PoolsSubgraphOnChainRepositoryOptions {\n provider: Provider;\n multicall: string;\n vault: string;\n}\n\n/**\n * Access pools using generated subgraph client and multicall.\n */\nexport class PoolsSubgraphOnChainRepository\n implements Findable, Searchable, Cacheable\n{\n private provider: Provider;\n private pools?: Promise;\n private multicall: string;\n private vault: string;\n public skip = 0;\n\n /**\n * Repository using multicall to get onchain data.\n *\n * @param poolsSubgraph subgraph repository\n * @param options options containing provider, multicall and vault addresses\n */\n constructor(\n private poolsSubgraph: PoolsSubgraphRepository,\n options: PoolsSubgraphOnChainRepositoryOptions,\n private readonly poolsToIgnore: string[] | undefined,\n private batchSize?: number\n ) {\n this.provider = options.provider;\n this.multicall = options.multicall;\n this.vault = options.vault;\n }\n\n private filterPools(pools: Pool[]): Pool[] {\n const filteredPools = pools.filter((p) => {\n if (p.swapEnabled === false) return false;\n if (!this.poolsToIgnore) return true;\n const index = this.poolsToIgnore.findIndex(\n (id) => id.toLowerCase() === p.id.toLowerCase()\n );\n return index === -1;\n });\n return filteredPools;\n }\n\n /**\n * We need a list of all the pools, for calculating APRs (nested pools), and for SOR (path finding).\n * All the pools are fetched on page load and cachced for speedy lookups.\n *\n * @returns Promise resolving to pools list\n */\n private async fetchDefault(): Promise {\n const pools = await this.poolsSubgraph.all();\n const filteredPools = this.filterPools(pools);\n\n const logger = Logger.getInstance();\n logger.time(`fetching onchain ${filteredPools.length} pools`);\n\n const onchainPools = await getOnChainBalances(\n filteredPools,\n this.multicall,\n this.vault,\n this.provider,\n this.batchSize\n );\n\n logger.timeEnd(`fetching onchain ${filteredPools.length} pools`);\n\n return onchainPools;\n }\n\n async fetch(options?: PoolsRepositoryFetchOptions): Promise {\n const pools = await this.poolsSubgraph.fetch(options);\n const filteredPools = this.filterPools(pools);\n\n const logger = Logger.getInstance();\n logger.time(`fetching onchain ${filteredPools.length} pools`);\n\n const onchainPools = await getOnChainBalances(\n filteredPools,\n this.multicall,\n this.vault,\n this.provider,\n this.batchSize\n );\n\n logger.timeEnd(`fetching onchain ${filteredPools.length} pools`);\n\n return onchainPools;\n }\n\n async find(id: string, forceRefresh = false): Promise {\n return await this.findBy('id', id, forceRefresh);\n }\n\n async findBy(\n param: PoolAttribute,\n value: string,\n forceRefresh = false\n ): Promise {\n if (!this.pools || forceRefresh) {\n this.pools = this.fetchDefault();\n }\n\n return (await this.pools).find((pool) => pool[param] == value);\n }\n\n async all(): Promise {\n if (!this.pools) {\n this.pools = this.fetchDefault();\n }\n return this.pools;\n }\n\n async where(filter: (pool: Pool) => boolean): Promise {\n if (!this.pools) {\n this.pools = this.fetchDefault();\n }\n\n return (await this.pools).filter(filter);\n }\n\n async refresh(pool: Pool): Promise {\n const onchainPool = await getOnChainBalances(\n [pool],\n this.multicall,\n this.vault,\n this.provider\n );\n\n // If the pool is already cached, replace it with the new one\n if (this.pools) {\n const index = (await this.pools).findIndex(\n (p) => p.address === pool.address\n );\n if (index !== -1) {\n this.pools = Promise.resolve([\n ...(await this.pools).splice(index, 1),\n onchainPool[0],\n ]);\n }\n }\n\n return onchainPool[0];\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { GaugesSubgraphRepository } from '@/modules/subgraph/repository';\nimport { PoolGauges, PoolGaugesAttributes } from './types';\n\nexport class PoolGaugesRepository extends GaugesSubgraphRepository<\n PoolGauges,\n PoolGaugesAttributes\n> {\n async query(args: any): Promise {\n if (!args.block && this.blockHeight)\n args.block = { number: await this.blockHeight() };\n\n const { pools } = await this.client.PoolGauges(args);\n return pools.map(this.mapType);\n }\n\n mapType(fragment: any): PoolGauges {\n return fragment as PoolGauges;\n }\n}\n","export enum PoolJoinExitAttributes {\n Pool = 'pool',\n Sender = 'sender',\n}\n\nexport interface PoolJoinExit {\n id: string;\n userAddress: string;\n poolId: string;\n timestamp: number;\n type: string;\n amounts: string[];\n tokens: string[];\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { PoolJoinExit, PoolJoinExitAttributes } from './types';\nimport { BalancerSubgraphRepository } from '@/modules/subgraph/repository';\nimport {\n JoinExit_OrderBy,\n OrderDirection,\n SubgraphJoinExitFragment,\n} from '@/modules/subgraph/generated/balancer-subgraph-types';\n\nexport class PoolJoinExitRepository extends BalancerSubgraphRepository<\n PoolJoinExit,\n PoolJoinExitAttributes\n> {\n async query(args: any): Promise {\n if (!args.orderBy) args.orderBy = JoinExit_OrderBy.Timestamp;\n if (!args.orderDirection) args.orderDirection = OrderDirection.Asc;\n if (!args.block && this.blockHeight)\n args.block = { number: await this.blockHeight() };\n\n const { joinExits } = await this.client.JoinExits(args);\n return joinExits.map(this.mapType);\n }\n\n mapType(item: SubgraphJoinExitFragment): PoolJoinExit {\n return {\n id: item.id,\n userAddress: item.user.id,\n poolId: item.pool.id,\n timestamp: item.timestamp,\n type: item.type,\n amounts: item.amounts,\n tokens: item.pool.tokensList,\n };\n }\n\n async findByUser(\n sender: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(PoolJoinExitAttributes.Sender, sender, first, skip);\n }\n\n async findJoins(sender: string, pool: string): Promise {\n return this.query({ where: { sender, pool, type: 'Join' } });\n }\n\n async findExits(sender: string, pool: string): Promise {\n return this.query({ where: { sender, pool, type: 'Exit' } });\n }\n\n async findByPool(\n poolId: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(PoolJoinExitAttributes.Pool, poolId, first, skip);\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { PoolShare, PoolShareAttributes } from './types';\nimport { BalancerSubgraphRepository } from '@/modules/subgraph/repository';\nimport {\n SubgraphPoolShareFragment,\n PoolShare_OrderBy,\n OrderDirection,\n} from '@/modules/subgraph/generated/balancer-subgraph-types';\n\nexport class PoolSharesRepository extends BalancerSubgraphRepository<\n PoolShare,\n PoolShareAttributes\n> {\n async query(args: any): Promise {\n if (!args.orderBy) args.orderBy = PoolShare_OrderBy.Balance;\n if (!args.orderDirection) args.orderDirection = OrderDirection.Desc;\n if (!args.block && this.blockHeight)\n args.block = { number: await this.blockHeight() };\n\n const { poolShares } = await this.client.PoolShares(args);\n return poolShares.map(this.mapType);\n }\n\n mapType(subgraphPoolShare: SubgraphPoolShareFragment): PoolShare {\n return {\n id: subgraphPoolShare.id,\n userAddress: subgraphPoolShare.userAddress.id,\n poolId: subgraphPoolShare.poolId.id,\n balance: subgraphPoolShare.balance,\n };\n }\n\n async findByUser(\n userAddress: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(\n PoolShareAttributes.UserAddress,\n userAddress,\n first,\n skip\n );\n }\n\n async findByPool(\n poolId: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(PoolShareAttributes.PoolId, poolId, first, skip);\n }\n}\n","import type { Findable, Token } from '@/types';\nimport type { TokenAttribute } from './types';\n\nexport class StaticTokenProvider implements Findable {\n constructor(private tokens: Token[]) {}\n\n async find(address: string): Promise {\n return this.tokens.find((token) => {\n return token.address.toLowerCase() === address.toLowerCase();\n });\n }\n\n async findBy(\n attribute: TokenAttribute,\n value: string\n ): Promise {\n return this.tokens.find((token) => {\n return token[attribute] === value;\n });\n }\n}\n","import { Findable, Price, TokenPrices } from '@/types';\n\nexport class StaticTokenPriceProvider implements Findable {\n tokenPrices: TokenPrices;\n constructor(tokenPrices: TokenPrices) {\n this.tokenPrices = Object.fromEntries(\n Object.entries(tokenPrices).map(([address, price]) => {\n return [address.toLowerCase(), price];\n })\n );\n }\n\n async find(address: string): Promise {\n const lowercaseAddress = address.toLowerCase();\n const price = this.tokenPrices[lowercaseAddress];\n if (!price) return;\n return price;\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute != 'address') {\n return undefined;\n }\n\n return this.find(value);\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport {\n CoingeckoConfig,\n Findable,\n Network,\n Price,\n TokenPrices,\n} from '@/types';\nimport axios, { AxiosError } from 'axios';\nimport { TOKENS } from '@/lib/constants/tokens';\nimport { Debouncer, tokenAddressForPricing } from '@/lib/utils';\nimport {\n getCoingeckoApiBaseUrl,\n getCoingeckoApiKeyHeaderName,\n} from '@/lib/utils/coingecko-api';\n\n/**\n * Simple coingecko price source implementation. Configurable by network and token addresses.\n */\nexport class CoingeckoPriceRepository implements Findable {\n prices: { [key: string]: Promise } = {};\n nativePrice?: Promise;\n private readonly url: string;\n private readonly urlNative: string;\n private readonly coingeckoApiKeyHeaderName: string;\n baseTokenAddresses: string[];\n debouncer: Debouncer;\n apiKey?: string;\n\n constructor(\n tokenAddresses: string[],\n private chainId: Network = 1,\n coingecko?: CoingeckoConfig\n ) {\n this.baseTokenAddresses = tokenAddresses.map(tokenAddressForPricing);\n this.url = `${getCoingeckoApiBaseUrl(\n coingecko?.isDemoApiKey\n )}simple/token_price/${this.platform(chainId)}?vs_currencies=usd,eth`;\n this.urlNative = `${getCoingeckoApiBaseUrl(\n coingecko?.isDemoApiKey\n )}simple/price/?vs_currencies=eth,usd&ids=`;\n this.coingeckoApiKeyHeaderName = getCoingeckoApiKeyHeaderName(\n coingecko?.isDemoApiKey\n );\n this.apiKey = coingecko?.coingeckoApiKey;\n this.debouncer = new Debouncer(\n this.fetch.bind(this),\n 200,\n coingecko?.tokensPerPriceRequest ?? 10\n );\n }\n\n private async fetch(\n addresses: string[],\n { signal }: { signal?: AbortSignal } = {}\n ): Promise {\n try {\n const { data } = await axios.get(\n `${this.url}&contract_addresses=${addresses.join(',')}`,\n {\n signal,\n headers: {\n [this.coingeckoApiKeyHeaderName]: this.apiKey ?? '',\n },\n }\n );\n return data;\n } catch (error) {\n const message = ['Error fetching token prices from coingecko'];\n if ((error as AxiosError).isAxiosError) {\n if ((error as AxiosError).response?.status !== undefined) {\n message.push(`with status ${(error as AxiosError).response?.status}`);\n }\n } else {\n message.push(error as string);\n }\n return Promise.reject(message.join(' '));\n }\n }\n\n private fetchNative({\n signal,\n }: { signal?: AbortSignal } = {}): Promise {\n console.time(`fetching coingecko for native token`);\n enum Assets {\n ETH = 'ethereum',\n MATIC = 'matic-network',\n XDAI = 'xdai',\n }\n let assetId: Assets = Assets.ETH;\n if (this.chainId === 137) assetId = Assets.MATIC;\n if (this.chainId === 100) assetId = Assets.XDAI;\n return axios\n .get<{ [key in Assets]: Price }>(`${this.urlNative}${assetId}`, {\n signal,\n headers: {\n [this.coingeckoApiKeyHeaderName]: this.apiKey ?? '',\n },\n })\n .then(({ data }) => {\n return data[assetId];\n })\n .catch((error) => {\n const message = ['Error fetching native token from coingecko'];\n if (error.isAxiosError) {\n if (error.response?.status) {\n message.push(`with status ${error.response.status}`);\n }\n } else {\n message.push(error);\n }\n return Promise.reject(message.join(' '));\n })\n .finally(() => {\n console.timeEnd(`fetching coingecko for native token`);\n });\n }\n\n find(inputAddress: string): Promise {\n const address = tokenAddressForPricing(inputAddress, this.chainId);\n if (!this.prices[address]) {\n // Make initial call with all the tokens we want to preload\n if (Object.keys(this.prices).length === 0) {\n for (const baseAddress of this.baseTokenAddresses) {\n this.prices[baseAddress] = this.debouncer\n .fetch(baseAddress)\n .then((prices) => prices[baseAddress]);\n }\n }\n\n // Handle native asset special case\n if (\n address === TOKENS(this.chainId).Addresses.nativeAsset.toLowerCase()\n ) {\n if (!this.nativePrice) {\n this.prices[address] = this.fetchNative();\n }\n\n return this.prices[address];\n }\n\n this.prices[address] = this.debouncer\n .fetch(address)\n .then((prices) => prices[address]);\n }\n\n return this.prices[address];\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute != 'address') {\n return undefined;\n }\n\n return this.find(value);\n }\n\n private platform(chainId: number): string {\n switch (chainId) {\n case 1:\n case 5:\n case 42:\n case 31337:\n return 'ethereum';\n case 100:\n return 'xdai';\n case 137:\n return 'polygon-pos';\n case 250:\n return 'fantom';\n case 1101:\n return 'polygon-zkevm';\n case 8453:\n return 'base';\n case 42161:\n return 'arbitrum-one';\n case 43114:\n return 'avalanche';\n }\n\n return '2';\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport {\n Price,\n Findable,\n TokenPrices,\n Network,\n HistoricalPrices,\n CoingeckoConfig,\n} from '@/types';\nimport axios, { AxiosError } from 'axios';\nimport { tokenAddressForPricing } from '@/lib/utils';\nimport {\n getCoingeckoApiBaseUrl,\n getCoingeckoApiKeyHeaderName,\n} from '@/lib/utils/coingecko-api';\n\nconst HOUR = 60 * 60;\n\n/**\n * Simple coingecko price source implementation. Configurable by network and token addresses.\n */\nexport class CoingeckoHistoricalPriceRepository implements Findable {\n prices: TokenPrices = {};\n nativePrice?: Promise;\n private readonly urlBase: string;\n private readonly apiKey?: string;\n private readonly coingeckoApiKeyHeaderName: string;\n constructor(private chainId: Network = 1, coingecko?: CoingeckoConfig) {\n this.urlBase = `${getCoingeckoApiBaseUrl(\n coingecko?.isDemoApiKey\n )}coins/${this.platform(\n chainId\n )}/contract/%TOKEN_ADDRESS%/market_chart/range?vs_currency=usd`;\n this.apiKey = coingecko?.coingeckoApiKey;\n this.coingeckoApiKeyHeaderName = getCoingeckoApiKeyHeaderName(\n coingecko?.isDemoApiKey\n );\n }\n\n private async fetch(\n address: string,\n timestamp: number,\n { signal }: { signal?: AbortSignal } = {}\n ): Promise {\n const url = this.urlRange(address, timestamp);\n console.time(`fetching coingecko historical for ${address}`);\n try {\n const { data } = await axios.get(url, {\n signal,\n headers: { [this.coingeckoApiKeyHeaderName]: this.apiKey ?? '' },\n });\n console.timeEnd(`fetching coingecko historical for ${address}`);\n console.log(data);\n return data;\n } catch (error) {\n console.timeEnd(`fetching coingecko historical for ${address}`);\n if ((error as AxiosError).isAxiosError) {\n throw new Error(\n 'Error fetching historical token prices from coingecko - ' +\n (error as AxiosError).message +\n ' - ' +\n (error as AxiosError).response?.statusText\n );\n }\n throw new Error('Unknown Error: ' + error);\n }\n }\n\n /* eslint-disable @typescript-eslint/no-unused-vars */\n async find(address: string): Promise {\n throw `Historic price requires point-in-time timestamp, please use findBy(address, timestamp)`;\n }\n\n async findBy(\n inputAddress: string,\n timestamp: number\n ): Promise {\n const address = tokenAddressForPricing(inputAddress, this.chainId);\n const response = await this.fetch(address, timestamp);\n\n return {\n usd: `${response.prices[0][1]}`,\n };\n }\n\n private platform(chainId: number): string {\n switch (chainId) {\n case 1:\n case 5:\n case 42:\n case 31337:\n return 'ethereum';\n case 137:\n return 'polygon-pos';\n case 42161:\n return 'arbitrum-one';\n case 100:\n return 'xdai';\n }\n\n return '2';\n }\n\n private urlRange(address: string, timestamp: number): string {\n const range: { from: number; to: number } = {\n from: timestamp - HOUR,\n to: timestamp + HOUR,\n };\n return `${this.urlBase.replace('%TOKEN_ADDRESS%', address)}&from=${\n range.from\n }&to=${range.to}`;\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { Price, Findable, TokenPrices, Network } from '@/types';\nimport axios from 'axios';\nimport { Debouncer, tokenAddressForPricing } from '@/lib/utils';\n\ninterface SubgraphPricesResponse {\n data: {\n tokens: [\n {\n address: string;\n latestUSDPrice?: string;\n }\n ];\n };\n}\n\nexport class SubgraphPriceRepository implements Findable {\n prices: { [key: string]: Promise } = {};\n debouncer: Debouncer;\n\n constructor(private subgraphUrl: string, private chainId: Network = 1) {\n this.debouncer = new Debouncer(\n this.fetch.bind(this),\n 200\n );\n }\n\n private async fetch(\n addresses: string[],\n { signal }: { signal?: AbortSignal } = {}\n ): Promise {\n console.time(`fetching subgraph prices for ${addresses.length} tokens`);\n return axios\n .post(\n this.subgraphUrl,\n {\n variables: { addresses },\n query: `query($addresses: [String!]) {\n tokens(\n where: {\n id_in: $addresses\n }\n ) {\n address\n latestUSDPrice\n }\n }`,\n },\n { signal }\n )\n .then((response) => response.data.data)\n .then(({ tokens }) =>\n Object.fromEntries(\n tokens.map((token) => [\n token.address,\n { usd: token.latestUSDPrice || undefined },\n ])\n )\n )\n .finally(() => {\n console.timeEnd(\n `fetching subgraph prices for ${addresses.length} tokens`\n );\n });\n }\n\n async find(inputAddress: string): Promise {\n const address = tokenAddressForPricing(inputAddress, this.chainId);\n if (!this.prices[address]) {\n this.prices[address] = this.debouncer\n .fetch(address)\n .then((prices) => prices[address]);\n }\n\n return this.prices[address];\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute != 'address') {\n return undefined;\n }\n\n return this.find(value);\n }\n}\n","import type { Findable, Price } from '@/types';\nimport { IAaveRates } from './aave-rates';\nimport { Logger } from '@/lib/utils/logger';\n\nexport class TokenPriceProvider implements Findable {\n constructor(\n private coingeckoRepository: Findable,\n private subgraphRepository: Findable,\n private aaveRates: IAaveRates\n ) {}\n\n async find(address: string): Promise {\n let price;\n try {\n price = await this.coingeckoRepository.find(address);\n if (!price?.usd) {\n throw new Error('Price not found');\n }\n } catch (err) {\n const logger = Logger.getInstance();\n logger.warn(err as string);\n price = await this.subgraphRepository.find(address);\n }\n const rate = (await this.aaveRates.getRate(address)) || 1;\n if (price && price.usd) {\n return {\n ...price,\n usd: (parseFloat(price.usd) * rate).toString(),\n };\n } else {\n return price;\n }\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute === 'address') {\n return this.find(value);\n }\n throw `Token price search by ${attribute} not implemented`;\n }\n}\n","import type { Findable, Price } from '@/types';\nimport { IAaveRates } from './aave-rates';\n\nexport class HistoricalPriceProvider implements Findable {\n constructor(\n private coingeckoRepository: Findable,\n private aaveRates: IAaveRates\n ) {}\n\n /**\n * get the historical price at time of call\n *\n * @param address the token address\n */\n async find(address: string): Promise {\n return this.findBy(address, Math.floor(Date.now() / 1000));\n }\n\n /**\n * get the historical price at the given timestamp.\n *\n * @param address the token address\n * @param timestamp the UNIX timestamp\n * @private\n */\n async findBy(address: string, timestamp: number): Promise {\n const price = await this.coingeckoRepository.findBy(address, timestamp);\n const rate = (await this.aaveRates.getRate(address)) || 1;\n if (price && price.usd) {\n return {\n ...price,\n usd: (parseFloat(price.usd) * rate).toString(),\n };\n } else {\n return price;\n }\n }\n}\n","import { Contract } from '@ethersproject/contracts';\nimport { Provider } from '@ethersproject/providers';\n\nconst FeeDistributorAbi = [\n 'function claimTokens(address user, address[] tokens) returns (uint256[])',\n 'function claimToken(address user, address token) returns (uint256)',\n];\n\nexport const FeeDistributor = (address: string, provider: Provider): Contract =>\n new Contract(address, FeeDistributorAbi, provider);\n","import { TokenBalance } from '@/modules/claims/ClaimService';\nimport { FeeDistributor } from '@/modules/contracts/implementations/feeDistributor';\nimport { Multicall } from '@/contracts';\nimport { Interface } from '@ethersproject/abi';\nimport { getAddress } from '@ethersproject/address';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { Contract } from '@ethersproject/contracts';\nimport { Provider } from '@ethersproject/providers';\nimport { formatUnits } from '@ethersproject/units';\n\nexport interface FeeDistributorData {\n balAmount: number;\n bbAUsdAmount: number;\n veBalSupply: number;\n bbAUsdPrice: number;\n balAddress: string;\n}\n\nexport interface BaseFeeDistributor {\n multicallData: (ts: number) => Promise;\n getClaimableBalances(\n userAddress: string,\n claimableTokens: string[]\n ): Promise;\n claimBalances(userAddress: string, claimableTokens: string[]): string;\n}\n\nconst feeDistributorInterface = new Interface([\n 'function getTokensDistributedInWeek(address token, uint timestamp) view returns (uint)',\n 'function claimTokens(address user, address[] tokens) returns (uint256[])',\n 'function claimToken(address user, address token) returns (uint256)',\n]);\n\nconst veBalInterface = new Interface([\n 'function totalSupply() view returns (uint)',\n]);\n\n// const bbAUsdInterface = new Interface([\n// 'function getRate() view returns (uint)',\n// ]);\n\nexport class FeeDistributorRepository implements BaseFeeDistributor {\n feeDistributor: Contract;\n data?: FeeDistributorData;\n\n constructor(\n private multicall: Multicall,\n private feeDistributorAddress: string,\n private balAddress: string,\n private veBalAddress: string,\n private bbAUsdAddress: string,\n provider: Provider\n ) {\n this.feeDistributor = FeeDistributor(feeDistributorAddress, provider);\n }\n\n async fetch(timestamp: number): Promise {\n const previousWeek = this.getPreviousWeek(timestamp);\n const payload = [\n {\n target: this.feeDistributorAddress,\n callData: feeDistributorInterface.encodeFunctionData(\n 'getTokensDistributedInWeek',\n [getAddress(this.balAddress), previousWeek]\n ),\n },\n {\n target: this.feeDistributorAddress,\n callData: feeDistributorInterface.encodeFunctionData(\n 'getTokensDistributedInWeek',\n [getAddress(this.bbAUsdAddress), previousWeek]\n ),\n },\n {\n target: this.veBalAddress,\n callData: veBalInterface.encodeFunctionData('totalSupply', []),\n },\n // Removed while wrappers are broken\n // {\n // target: this.bbAUsdAddress,\n // callData: bbAUsdInterface.encodeFunctionData('getRate', []),\n // },\n ];\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const data = {\n balAmount: parseFloat(formatUnits(res[0], 18)),\n bbAUsdAmount: parseFloat(formatUnits(res[1], 18)),\n veBalSupply: parseFloat(formatUnits(res[2], 18)),\n // bbAUsdPrice: parseFloat(formatUnits(res[3], 18)),\n bbAUsdPrice: parseFloat('1.0'),\n balAddress: this.balAddress,\n };\n\n return data;\n }\n\n async multicallData(timestamp: number): Promise {\n if (!this.data) {\n this.data = await this.fetch(timestamp);\n }\n\n return this.data;\n }\n\n getPreviousWeek(fromTimestamp: number): number {\n const weeksToGoBack = 1;\n const midnight = new Date(fromTimestamp);\n midnight.setUTCHours(0);\n midnight.setUTCMinutes(0);\n midnight.setUTCSeconds(0);\n midnight.setUTCMilliseconds(0);\n\n let daysSinceThursday = midnight.getUTCDay() - 4;\n if (daysSinceThursday < 0) daysSinceThursday += 7;\n\n daysSinceThursday = daysSinceThursday + weeksToGoBack * 7;\n\n return Math.floor(midnight.getTime() / 1000) - daysSinceThursday * 86400;\n }\n\n async getClaimableBalances(\n userAddress: string,\n claimableTokens: string[]\n ): Promise {\n try {\n const amounts: BigNumber[] =\n await this.feeDistributor.callStatic.claimTokens(\n userAddress,\n claimableTokens\n );\n return this.extractTokenBalance(claimableTokens, amounts);\n } catch (e) {\n return {};\n }\n }\n\n claimBalances(userAddress: string, claimableTokens: string[]): string {\n return feeDistributorInterface.encodeFunctionData('claimTokens', [\n userAddress,\n claimableTokens,\n ]);\n }\n\n extractTokenBalance(\n claimableTokens: string[],\n amounts: (BigNumber | undefined | null)[]\n ): TokenBalance {\n return claimableTokens.reduce((tokens: TokenBalance, token, index) => {\n tokens[token] = (amounts[index] as BigNumber) ?? BigNumber.from(0);\n return tokens;\n }, {});\n }\n}\n","import { Interface } from '@ethersproject/abi';\nimport { Provider } from '@ethersproject/providers';\nimport { Contract } from '@ethersproject/contracts';\nimport { formatUnits } from '@ethersproject/units';\nimport { Findable } from '../types';\n\nconst vaultInterface = new Interface([\n 'function getProtocolFeesCollector() view returns (address)',\n]);\n\nconst protocolFeesCollectorInterface = new Interface([\n 'function getSwapFeePercentage() view returns (uint)',\n]);\n\n// Using singleton here, so subsequent calls will return the same promise\nlet swapFeePercentagePromise: Promise;\n\nexport class FeeCollectorRepository implements Findable {\n vault: Contract;\n swapFeePercentage?: number;\n\n constructor(vaultAddress: string, private provider: Provider) {\n this.vault = new Contract(vaultAddress, vaultInterface, this.provider);\n }\n\n async fetch(): Promise {\n const address = (await this.vault.getProtocolFeesCollector()) as string;\n\n const collector = new Contract(\n address,\n protocolFeesCollectorInterface,\n this.provider\n );\n const fees = (await collector.getSwapFeePercentage()) as string;\n\n return parseFloat(formatUnits(fees, 18));\n }\n\n async find(): Promise {\n if (!swapFeePercentagePromise) {\n swapFeePercentagePromise = this.fetch();\n }\n this.swapFeePercentage = await swapFeePercentagePromise;\n\n return this.swapFeePercentage;\n }\n\n async findBy(): Promise {\n return this.find();\n }\n}\n","// 0x97207B095e4D5C9a6e4cfbfcd2C3358E03B90c4A\n\nimport { Interface } from '@ethersproject/abi';\nimport { formatUnits } from '@ethersproject/units';\nimport { Multicall } from '@/contracts';\n\nconst iProtocolFeePercentagesProvider = new Interface([\n 'function getSwapFeePercentage() view returns (uint)',\n]);\n\nexport interface ProtocolFees {\n swapFee: number;\n yieldFee: number;\n}\n\n// Using singleton here, so subsequent calls will return the same promise\nlet feesPromise: Promise;\n\nexport class ProtocolFeesProvider {\n protocolFees?: ProtocolFees;\n\n constructor(\n private multicall: Multicall,\n private protocolFeePercentagesProviderAddress: string\n ) {}\n\n private async fetch(): Promise {\n const payload = [\n {\n target: this.protocolFeePercentagesProviderAddress,\n callData: iProtocolFeePercentagesProvider.encodeFunctionData(\n 'getFeeTypePercentage',\n [0]\n ),\n },\n {\n target: this.protocolFeePercentagesProviderAddress,\n callData: iProtocolFeePercentagesProvider.encodeFunctionData(\n 'getFeeTypePercentage',\n [2]\n ),\n },\n ];\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const fees = {\n swapFee: parseFloat(formatUnits(res[0], 18)),\n yieldFee: parseFloat(formatUnits(res[2], 18)),\n };\n\n return fees;\n }\n\n async getFees(): Promise {\n if (!feesPromise) {\n feesPromise = this.fetch();\n }\n this.protocolFees = await feesPromise;\n\n return this.protocolFees;\n }\n}\n","import axios from 'axios';\nimport { Findable } from '@/types';\nimport { Logger } from '@/lib/utils/logger';\n\nexport class TokenYieldsRepository implements Findable {\n private yields?: Promise<{ [address: string]: number }>;\n\n constructor(private url = 'https://yield-tokens.balancer.workers.dev/') {}\n\n async fetch(): Promise<{ [address: string]: number }> {\n let aprs = {};\n\n try {\n console.time(`fetching token yields`);\n const response = await axios.get(this.url);\n console.timeEnd(`fetching token yields`);\n\n aprs = response.data as {\n [key: string]: number;\n };\n } catch (error) {\n const logger = Logger.getInstance();\n logger.warn(`Failed to fetch yield tokens: ${error}`);\n }\n\n return aprs;\n }\n\n async find(address: string): Promise {\n const lc = address.toLocaleLowerCase();\n if (!this.yields) {\n this.yields = this.fetch();\n }\n\n return this.yields.then((r) => (r[lc] && r[lc] > 0 ? r[lc] : 0));\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute != 'address') {\n return 0;\n }\n\n return this.find(value);\n }\n}\n","import { Findable } from '../types';\nimport axios from 'axios';\n\nconst query = (timestamp: string) => `{\n blocks(first: 1, orderBy: timestamp, orderDirection: asc, where: { timestamp_gt: ${timestamp} }) {\n number\n }\n}`;\n\ninterface BlockNumberResponse {\n data: {\n blocks: [\n {\n number: string;\n }\n ];\n };\n}\n\nconst fetchBlockByTime = async (\n endpoint: string,\n timestamp: string\n): Promise => {\n const payload = {\n query: query(timestamp),\n };\n\n const response = await axios.post(endpoint, payload);\n\n const {\n data: { blocks },\n } = response.data as BlockNumberResponse;\n\n return parseInt(blocks[0].number);\n};\n\nexport class BlockNumberRepository implements Findable {\n blocks: { [ts: string]: Promise } = {};\n\n constructor(private endpoint: string) {}\n\n async find(from: string): Promise {\n if (from == 'dayAgo') {\n const dayAgo = `${Math.floor(Date.now() / 1000) - 86400}`;\n if (!this.blocks[dayAgo]) {\n this.blocks = {\n ...this.blocks,\n [dayAgo]: fetchBlockByTime(this.endpoint, dayAgo),\n };\n }\n return this.blocks[dayAgo];\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async findBy(attribute = '', value = ''): Promise {\n return;\n }\n}\n","import { GyroConfigRepositoryImpl } from '@/modules/data/gyro-config/repository';\n\nexport * as balEmissions from './bal/emissions';\nexport * from './gauge-controller/multicall';\nexport * from './gauge-shares';\nexport * from './liquidity-gauges';\nexport * from './pool';\nexport * from './pool-gauges';\nexport * from './pool-joinExit';\nexport * from './pool-shares';\nexport * from './token';\nexport * from './token-prices';\nexport * from './fee-distributor/repository';\nexport * from './fee-collector/repository';\nexport * from './protocol-fees/provider';\nexport * from './token-yields/repository';\nexport * from './block-number';\n\nimport {\n BalancerNetworkConfig,\n BalancerDataRepositories,\n GraphQLQuery,\n CoingeckoConfig,\n} from '@/types';\nimport { PoolsSubgraphRepository } from './pool/subgraph';\nimport { SubgraphPoolDataService } from '../sor/pool-data/subgraphPoolDataService';\nimport { PoolsSubgraphOnChainRepository } from './pool/subgraphOnChain';\nimport { PoolSharesRepository } from './pool-shares/repository';\nimport { PoolJoinExitRepository } from './pool-joinExit/repository';\nimport { PoolGaugesRepository } from './pool-gauges/repository';\nimport { GaugeSharesRepository } from './gauge-shares/repository';\nimport { BlockNumberRepository } from './block-number';\nimport {\n CoingeckoPriceRepository,\n AaveRates,\n TokenPriceProvider,\n HistoricalPriceProvider,\n CoingeckoHistoricalPriceRepository,\n} from './token-prices';\nimport { StaticTokenProvider } from './token/static';\nimport { LiquidityGaugeSubgraphRPCProvider } from './liquidity-gauges/provider';\nimport { FeeDistributorRepository } from './fee-distributor/repository';\nimport { FeeCollectorRepository } from './fee-collector/repository';\nimport { TokenYieldsRepository } from './token-yields/repository';\nimport { ProtocolFeesProvider } from './protocol-fees/provider';\nimport { Provider } from '@ethersproject/providers';\n\n// initialCoingeckoList are used to get the initial token list for coingecko\n// TODO: we might want to replace that with what frontend is using\nimport initialCoingeckoList from '@/modules/data/token-prices/initial-list.json';\nimport { SubgraphPriceRepository } from './token-prices/subgraph';\nimport { createSubgraphClient } from '../subgraph/subgraph';\nimport { Contracts } from '../contracts/contracts.module';\n\nexport class Data implements BalancerDataRepositories {\n pools;\n poolsForSimulations;\n poolsOnChain;\n yesterdaysPools;\n poolShares;\n poolGauges;\n gaugeShares;\n tokenPrices;\n tokenHistoricalPrices;\n tokenMeta;\n liquidityGauges;\n feeDistributor;\n feeCollector;\n protocolFees;\n tokenYields;\n blockNumbers;\n poolJoinExits;\n gyroConfigRepository;\n\n constructor(\n networkConfig: BalancerNetworkConfig,\n provider: Provider,\n contracts: Contracts,\n subgraphQuery?: GraphQLQuery,\n coingecko?: CoingeckoConfig\n ) {\n this.pools = new PoolsSubgraphRepository({\n url: networkConfig.urls.subgraph,\n chainId: networkConfig.chainId,\n query: subgraphQuery,\n });\n\n // Used for VaultModel and Simulations\n this.poolsForSimulations = new SubgraphPoolDataService(\n createSubgraphClient(networkConfig.urls.subgraph),\n provider,\n networkConfig,\n undefined,\n subgraphQuery\n );\n\n this.poolsOnChain = new PoolsSubgraphOnChainRepository(\n this.pools,\n {\n provider: provider,\n multicall: networkConfig.addresses.contracts.multicall,\n vault: networkConfig.addresses.contracts.vault,\n },\n networkConfig.poolsToIgnore,\n networkConfig.multicallBatchSize\n );\n\n this.poolShares = new PoolSharesRepository(\n networkConfig.urls.subgraph,\n networkConfig.chainId\n );\n\n this.poolJoinExits = new PoolJoinExitRepository(\n networkConfig.urls.subgraph,\n networkConfig.chainId\n );\n\n if (networkConfig.urls.gaugesSubgraph) {\n this.poolGauges = new PoolGaugesRepository(\n networkConfig.urls.gaugesSubgraph,\n networkConfig.chainId\n );\n\n this.gaugeShares = new GaugeSharesRepository(\n networkConfig.urls.gaugesSubgraph,\n networkConfig.chainId\n );\n }\n\n // 🚨 yesterdaysPools is used to calculate swapFees accumulated over last 24 hours\n // TODO: find a better data source for that, eg: maybe DUNE once API is available\n if (networkConfig.urls.blockNumberSubgraph) {\n this.blockNumbers = new BlockNumberRepository(\n networkConfig.urls.blockNumberSubgraph\n );\n\n const blockDayAgo = async () => {\n if (this.blockNumbers) {\n return await this.blockNumbers.find('dayAgo');\n }\n };\n\n this.yesterdaysPools = new PoolsSubgraphRepository({\n url: networkConfig.urls.subgraph,\n chainId: networkConfig.chainId,\n blockHeight: blockDayAgo,\n query: subgraphQuery,\n });\n } else if (networkConfig.averageBlockTime) {\n const blockDayAgo = async () => {\n const blockNumber = await provider.getBlockNumber();\n const blocksPerDay = Math.round(\n 86400 / (networkConfig.averageBlockTime || 2)\n );\n return blockNumber - blocksPerDay;\n };\n\n this.yesterdaysPools = new PoolsSubgraphRepository({\n url: networkConfig.urls.subgraph,\n chainId: networkConfig.chainId,\n blockHeight: blockDayAgo,\n query: subgraphQuery,\n });\n }\n\n const tokenAddresses = initialCoingeckoList\n .filter((t) => t.chainId == networkConfig.chainId)\n .map((t) => t.address);\n\n const coingeckoRepository = new CoingeckoPriceRepository(\n tokenAddresses,\n networkConfig.chainId,\n coingecko\n );\n\n const subgraphPriceRepository = new SubgraphPriceRepository(\n networkConfig.urls.subgraph,\n networkConfig.chainId\n );\n\n const aaveRates = new AaveRates(\n contracts.contracts.multicall,\n networkConfig.chainId\n );\n\n this.tokenPrices = new TokenPriceProvider(\n coingeckoRepository,\n subgraphPriceRepository,\n aaveRates\n );\n\n const coingeckoHistoricalRepository =\n new CoingeckoHistoricalPriceRepository(networkConfig.chainId, coingecko);\n\n this.tokenHistoricalPrices = new HistoricalPriceProvider(\n coingeckoHistoricalRepository,\n aaveRates\n );\n\n this.tokenMeta = new StaticTokenProvider([]);\n\n if (networkConfig.urls.gaugesSubgraph) {\n this.liquidityGauges = new LiquidityGaugeSubgraphRPCProvider(\n networkConfig.urls.gaugesSubgraph,\n contracts.contracts.multicall,\n networkConfig.addresses.contracts.gaugeController || '',\n networkConfig.chainId,\n networkConfig.addresses.contracts.gaugeControllerCheckpointer\n );\n }\n\n if (\n networkConfig.addresses.contracts.feeDistributor &&\n networkConfig.addresses.tokens.bal &&\n networkConfig.addresses.tokens.veBal &&\n networkConfig.addresses.tokens.bbaUsd\n ) {\n this.feeDistributor = new FeeDistributorRepository(\n contracts.contracts.multicall,\n networkConfig.addresses.contracts.feeDistributor,\n networkConfig.addresses.tokens.bal,\n networkConfig.addresses.tokens.veBal,\n networkConfig.addresses.tokens.bbaUsd,\n provider\n );\n }\n\n this.feeCollector = new FeeCollectorRepository(\n networkConfig.addresses.contracts.vault,\n provider\n );\n\n if (networkConfig.addresses.contracts.protocolFeePercentagesProvider) {\n this.protocolFees = new ProtocolFeesProvider(\n contracts.contracts.multicall,\n networkConfig.addresses.contracts.protocolFeePercentagesProvider\n );\n }\n\n this.tokenYields = new TokenYieldsRepository();\n\n if (networkConfig.addresses.contracts.gyroConfigProxy) {\n this.gyroConfigRepository = new GyroConfigRepositoryImpl(\n networkConfig.addresses.contracts.gyroConfigProxy,\n contracts.contracts.multicall,\n provider\n );\n }\n }\n}\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { MaxInt256 } from '@ethersproject/constants';\nimport { BatchSwapStep, SwapType } from '../swaps/types';\nimport { Relayer } from './relayer.module';\nimport { OutputReference, PoolKind } from './types';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\n\n/**\n * Converts poolType and poolTypeVersion to PoolKind used by Relayer V5 defined in:\n * https://github.com/balancer/balancer-v2-monorepo/blob/9b78879ee3a0dcae57094bdfdae973873e4262cf/pkg/standalone-utils/contracts/relayer/VaultActions.sol#L105\n *\n * @internal\n * @param poolType\n * @param poolTypeVersion\n * @returns PoolKind\n */\nconst poolType2PoolKind = (\n poolType: string,\n poolTypeVersion: number\n): PoolKind => {\n if (poolType === 'Stable') {\n return PoolKind.LEGACY_STABLE;\n } else if (poolType === 'ComposableStable' && poolTypeVersion === 1) {\n return PoolKind.COMPOSABLE_STABLE;\n } else if (poolType === 'ComposableStable') {\n return PoolKind.COMPOSABLE_STABLE_V2;\n } else {\n return PoolKind.WEIGHTED;\n }\n};\n\nexport const setRelayerApproval = Relayer.encodeSetRelayerApproval;\nexport const gaugeWithdrawal = Relayer.encodeGaugeWithdraw;\nexport const gaugeDeposit = Relayer.encodeGaugeDeposit;\nexport const peekChainedReferenceValue =\n Relayer.encodePeekChainedReferenceValue;\n\n/**\n * Encodes exitPool callData.\n * Exit pool to underlying tokens and assigns output references to the exit amounts.\n *\n * @param poolId Pool ID.\n * @param poolType Pool type.\n * @param poolTypeVersion Pool type version.\n * @param assets Ordered pool tokens.\n * @param singleTokenExit When\n * @param outputReferences reference to exit amounts for the next transaction\n * @param amount Amount of BPT to exit with as a number with 18 digits of precision passed as a string.\n * @param sender Sender address.\n * @param recipient Recipient address.\n * @param isComposable Whether the poolType is ComposableStable or not.\n * @param toInternalBalance Use internal balance or not.\n * @returns Encoded exitPool call.\n */\nexport const exit = (\n poolId: string,\n poolType: string,\n poolTypeVersion: number,\n assets: string[],\n exitTokenIndex = -1,\n outputReferences: OutputReference[],\n amount: string,\n sender: string,\n recipient: string,\n toInternalBalance = true\n): string => {\n let userData: string;\n const isComposable = poolType === 'ComposableStable' && poolTypeVersion === 1;\n\n // Exit pool proportionally or to a singleToken\n if (exitTokenIndex > -1) {\n userData = StablePoolEncoder.exitExactBPTInForOneTokenOut(\n amount,\n exitTokenIndex\n );\n } else {\n const encoder = isComposable\n ? ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut\n : StablePoolEncoder.exitExactBPTInForTokensOut;\n userData = encoder(amount);\n }\n\n // Relayer V5 introduces PoolKind\n const poolKind = poolType2PoolKind(poolType, poolTypeVersion);\n\n // Encode exit pool data\n const callData = Relayer.encodeExitPool({\n poolId,\n poolKind,\n sender,\n recipient,\n outputReferences,\n exitPoolRequest: {\n assets,\n minAmountsOut: new Array(assets.length).fill('0'),\n userData,\n toInternalBalance,\n },\n });\n\n return callData;\n};\n\n/**\n * Encodes joinPool callData.\n * Joins pool with underlying tokens and assigns output reference to the BPT amount.\n *\n * @param poolId Pool ID.\n * @param poolType Pool type.\n * @param poolTypeVersion Pool type version.\n * @param assets Ordered pool tokens.\n * @param amountsIn Amounts of tokens to join with as a number with 18 digits of precision passed as a string.\n * @param minimumBPT Minimum BPT amount to receive as a number with 18 digits of precision passed as a string.\n * @param outputReference reference to BPT amount for the next transaction\n * @param sender Sender address.\n * @param recipient Recipient address.\n * @param fromInternalBalance Use internal balance or not.\n * @returns Encoded joinPool call.\n */\nexport const join = (\n poolId: string,\n poolType: string,\n poolTypeVersion: number,\n assets: string[],\n amountsIn: string[],\n minimumBPT: string,\n outputReference: string,\n sender: string,\n recipient: string,\n fromInternalBalance = true\n): string => {\n const maxAmountsIn = assets.map(() => MaxInt256);\n\n // Encoding join pool data with the type exactTokensIn (1)\n // StablePoolEncoder.joinExactTokensInForBPTOut is the same for all pool types\n const userData = StablePoolEncoder.joinExactTokensInForBPTOut(\n amountsIn,\n minimumBPT\n );\n\n const kind = poolType2PoolKind(poolType, poolTypeVersion);\n\n const callData = Relayer.encodeJoinPool({\n poolId,\n kind,\n sender,\n recipient,\n joinPoolRequest: {\n assets,\n maxAmountsIn,\n userData,\n fromInternalBalance,\n },\n value: '0',\n outputReference,\n });\n\n return callData;\n};\n\n/**\n * Creates encoded batchSwap callData\n * outputReferences contain the output amount for swap's last token\n *\n * @param sender Sender address.\n * @param recipient Recipient address.\n * @param swaps List of swaps to execute.\n * @param deadline Deadline for the transaction.\n * @param toInternalBalance Use internal balance or not.\n * @returns Encoded batchSwap call\n */\nexport const swaps = (\n sender: string,\n recipient: string,\n swaps: {\n path: {\n poolId: string;\n assetIn: string;\n assetOut: string;\n }[];\n inputAmount: string;\n outputReference: BigNumber;\n }[],\n deadline?: string,\n toInternalBalance = true\n): string => {\n const assets: string[] = [];\n const limits: string[] = [];\n const outputReferences: { index: number; key: BigNumber }[] = [];\n const batchSwaps: BatchSwapStep[] = [];\n\n // Convert paths into batchSwap steps\n swaps.forEach((swap) => {\n const { path, inputAmount, outputReference } = swap;\n\n for (let i = 0; i < path.length; i++) {\n const { poolId, assetIn, assetOut } = path[i];\n\n assets.push(assetIn);\n assets.push(assetOut);\n\n limits.push(MaxInt256.toString());\n limits.push('0');\n\n const assetInIndex = i * 2;\n const assetOutIndex = i * 2 + 1;\n\n const swap: BatchSwapStep = {\n poolId,\n assetInIndex,\n assetOutIndex,\n amount: i === 0 ? inputAmount : '0',\n userData: '0x',\n };\n\n batchSwaps.push(swap);\n }\n\n // Add output reference for the last swap\n outputReferences.push({ index: path.length * 2 - 1, key: outputReference });\n });\n\n const funds = {\n sender,\n recipient,\n fromInternalBalance: true,\n toInternalBalance,\n };\n\n const encodedBatchSwap = Relayer.encodeBatchSwap({\n swapType: SwapType.SwapExactIn,\n swaps: batchSwaps,\n assets,\n funds,\n limits,\n deadline: deadline || BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value: '0',\n outputReferences,\n });\n\n return encodedBatchSwap;\n};\n","import { Findable, Pool, PoolAttribute } from '@/types';\nimport { BalancerRelayer__factory } from '@/contracts';\n\nexport const balancerRelayerInterface =\n BalancerRelayer__factory.createInterface();\n\n/**\n * Using array of objects to preserve the tokens order\n */\nexport interface MigrationPool {\n address: string;\n id?: string;\n poolType?: string;\n poolTypeVersion?: number;\n tokens?: MigrationPool[];\n mainIndex?: number;\n}\n\n/**\n * Foreach AaveLinear: AaveLinear > mainTokens > newAaveLinear\n *\n * @param fromTokens\n * @param toTokens\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const buildPaths = (\n fromTokens: MigrationPool[],\n toTokens: MigrationPool[],\n exitTokenIndex: number\n) => {\n // Get the main token address for each pool\n const getMainToken = ({ tokens, mainIndex }: MigrationPool) =>\n (tokens && mainIndex && tokens[mainIndex].address) || '';\n const mainFromTokens = fromTokens.flatMap(getMainToken);\n const mainToTokens = toTokens.flatMap(getMainToken);\n\n // Find the index of the main token in both from and to pools\n const pathIndexes = mainFromTokens.map(\n (token, idx) => (token && [idx, mainToTokens.indexOf(token)]) || [-1, -1]\n );\n\n // Build the paths from the indexes\n const exitSwaps = pathIndexes.map(([fromIdx, toIdx]) => {\n if (fromIdx === -1 || toIdx === -1) {\n return [];\n }\n const fromPool = fromTokens[fromIdx];\n const toPool = toTokens[toIdx];\n return buildPath(fromPool, toPool);\n });\n\n // If we want to exit a specific token, return only that path\n if (exitTokenIndex > -1) {\n return [exitSwaps[exitTokenIndex]];\n }\n\n return exitSwaps;\n};\n\nconst buildPath = (from: MigrationPool, to: MigrationPool) => {\n if (from.poolType?.match(/.*Linear.*/)) {\n return buildLinearPath(from, to);\n }\n\n return [];\n};\n\nconst buildLinearPath = (from: MigrationPool, to: MigrationPool) => {\n if (\n !from.id ||\n !to.id ||\n !from.tokens ||\n !to.tokens ||\n !from.mainIndex ||\n !to.mainIndex\n ) {\n throw 'Missing tokens';\n }\n const mainToken = from.tokens[from.mainIndex];\n\n const path = [\n {\n poolId: from.id,\n assetIn: from.address,\n assetOut: mainToken.address,\n },\n {\n poolId: to.id,\n assetIn: mainToken.address,\n assetOut: to.address,\n },\n ];\n\n return path;\n};\n\n/**\n * Converts Subgraph Pool to MigrationPool\n * Recursively builds tokens\n *\n * @param id\n * @param repository\n * @returns\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const buildMigrationPool = async (\n id: string,\n repository: Findable\n) => {\n const pool = await repository.find(id);\n if (!pool) throw `Pool ${id} not found`;\n\n const findTokens = async (token: string, parentPool: string) => {\n let tokens: Array = [{ address: token }];\n const pool = await repository.findBy('address', token);\n if (pool && token != parentPool) {\n const sortedTokens = pool.tokens.sort(cmpTokens);\n const nestedTokens = await Promise.all(\n sortedTokens.map(({ address }) => findTokens(address, pool.address))\n );\n tokens = [\n {\n address: token,\n id: pool.id,\n poolType: pool.poolType,\n poolTypeVersion: pool.poolTypeVersion,\n mainIndex: pool.mainIndex,\n tokens: nestedTokens.flat(),\n },\n ];\n }\n return tokens;\n };\n\n // Sorts amounts out into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const sortedTokens = pool.tokens.sort(cmpTokens);\n\n return {\n id,\n address: pool.address,\n tokens: (\n await Promise.all(\n sortedTokens.map(({ address }) => findTokens(address, pool.address))\n )\n ).flat(),\n poolType: pool.poolType,\n poolTypeVersion: pool.poolTypeVersion,\n mainIndex: pool.mainIndex,\n };\n};\n\nconst cmpTokens = (tokenA: MigrationPool, tokenB: MigrationPool): number =>\n tokenA.address.toLowerCase() > tokenB.address.toLowerCase() ? 1 : -1;\n","import { OutputReference, Relayer } from '@/modules/relayer/relayer.module';\nimport * as actions from '@/modules/relayer/actions';\nimport { buildPaths, MigrationPool, balancerRelayerInterface } from './helpers';\nimport { BigNumber } from '@ethersproject/bignumber';\n\n/**\n * Builds migration call data.\n *\n * @param account Address of the migrating account\n * @param relayer Address of the relayer\n * @param bptAmount Amount of BPT to migrate\n * @param minBptOut Minimal amount of BPT to receive\n * @param from Pool to migrate from\n * @param to Pool to migrate to\n * @param peek Add a peek call for the expected BPT amount, decodable by the `decodePeak` function\n * @param fromGauge Unstake from gauge before migrating\n * @param toGauge Restake to gauge after migrating\n * @param authorisation User's authorisation to approve relayer in the vault\n * @returns call data\n */\nexport const migrationBuilder = (\n account: string,\n relayer: string,\n bptAmount: string,\n minBptOut: string,\n from: MigrationPool,\n to: MigrationPool,\n peek = false,\n fromGauge?: string,\n toGauge?: string,\n authorisation?: string\n): string => {\n if (\n !from.id ||\n !to.id ||\n !from.tokens ||\n !to.tokens ||\n !from.poolType ||\n !to.poolType\n ) {\n throw 'Pool data is missing';\n }\n\n // Define tokens\n const fromTokens = from.tokens.flatMap(({ address }) => address);\n const toTokens = to.tokens.flatMap(({ address }) => address);\n\n // Prefer proportional exit, except for ComposableStableV1\n // Choose 0 as the exit token index\n // TODO: make default exit token dynamic\n const exitTokenIndex =\n from.poolType == 'ComposableStable' && from.poolTypeVersion == 1 ? 0 : -1;\n\n // Define output references\n let exitOutputReferences: OutputReference[];\n let swapOutputReferences: BigNumber[] = [];\n if (exitTokenIndex > -1) {\n exitOutputReferences = [\n {\n index: exitTokenIndex,\n key: Relayer.toChainedReference(`10${exitTokenIndex}`),\n },\n ];\n swapOutputReferences = [Relayer.toChainedReference(`20${exitTokenIndex}`)];\n } else {\n exitOutputReferences = fromTokens.map((_, idx) => ({\n index: idx,\n key: Relayer.toChainedReference(`10${idx}`),\n }));\n swapOutputReferences = fromTokens.map((_, idx) =>\n Relayer.toChainedReference(`20${idx}`)\n );\n }\n\n const joinAmount = Relayer.toChainedReference('999');\n\n // Configure migration steps\n const migrationSteps = [];\n let needsSwap = false; // only if from is ComposableStable\n\n if (from.poolType === 'ComposableStable') {\n needsSwap = true;\n }\n\n // 0. Set relayer approval\n if (authorisation) {\n migrationSteps.push(\n actions.setRelayerApproval(relayer, true, authorisation)\n );\n }\n\n // 1. Withdraw from old gauge\n if (fromGauge) {\n migrationSteps.push(\n actions.gaugeWithdrawal(fromGauge, account, relayer, bptAmount)\n );\n }\n\n // 2. Exit old pool\n migrationSteps.push(\n actions.exit(\n from.id,\n from.poolType,\n from.poolTypeVersion || 1,\n fromTokens,\n exitTokenIndex,\n exitOutputReferences,\n bptAmount,\n fromGauge ? relayer : account,\n relayer\n )\n );\n\n // 3. Swap\n const swapPaths = buildPaths(from.tokens, to.tokens, exitTokenIndex);\n if (swapPaths.flat().length > 0) {\n // Match exit to swap amounts\n const swaps = swapPaths\n .map((path, idx) => ({\n path,\n inputAmount: String(exitOutputReferences[idx].key),\n outputReference: swapOutputReferences[idx],\n }))\n .filter(({ path }) => path.length > 0);\n\n migrationSteps.push(actions.swaps(relayer, relayer, swaps));\n }\n\n // 3. Join\n // Match swap or exit references to the positions of join tokens\n // In case no reference is defined, the default is 0\n const references = toTokens\n .filter((address) => to.address != address)\n .map((to) => {\n const fromIdx = fromTokens.indexOf(to);\n return String(\n (needsSwap && swapOutputReferences[fromIdx]) ||\n exitOutputReferences[fromIdx]?.key ||\n 0\n );\n });\n\n migrationSteps.push(\n actions.join(\n to.id,\n to.poolType,\n to.poolTypeVersion || 1,\n toTokens,\n references,\n minBptOut,\n String(joinAmount),\n relayer,\n toGauge ? relayer : account,\n true\n )\n );\n\n // Peek the last join amount\n if (peek === true) {\n migrationSteps.push(actions.peekChainedReferenceValue(String(joinAmount)));\n }\n\n // 4. Deposit to the new gauge\n if (toGauge) {\n migrationSteps.push(\n actions.gaugeDeposit(toGauge, relayer, account, String(joinAmount))\n );\n }\n\n const callData = balancerRelayerInterface.encodeFunctionData('multicall', [\n migrationSteps,\n ]);\n\n return callData;\n};\n","import { Findable, Pool, PoolAttribute } from '@/types';\nimport { JsonRpcProvider } from '@ethersproject/providers';\nimport { SubgraphLiquidityGauge } from '../subgraph/subgraph';\nimport { migrationBuilder } from './migrations/builder';\nimport {\n balancerRelayerInterface,\n buildMigrationPool,\n} from './migrations/helpers';\nimport * as actions from '@/modules/relayer/actions';\n\n/**\n * @param user - user address\n * @param from - pool ID\n * @param to - pool ID\n * @param balance - amount of liquidity to migrate in WAL (wei-ether)\n * @param minBptOut - minimum amount of BPT to receive, when 0 it will include a peek for the amount\n * @param authorisation - signed user's authorisation to approve relayer in the vault\n */\ninterface MigrationParams {\n user: string;\n from: string;\n to: string;\n balance: string;\n minBptOut?: string;\n authorisation?: string;\n}\n\n/**\n * Class responsible for building liquidity migration transactions.\n */\nexport class Migrations {\n public relayerAddress: string;\n public poolsRepository: Findable;\n public gaugesRepository: Findable;\n public provider: JsonRpcProvider;\n\n /**\n * Instance of a class responsible for building liquidity migration transactions.\n *\n * @param relayerAddress Address of the relayer contract.\n * @param poolsRepository Repository of pools.\n * @param liquidityGaugesRepository Repository of liquidity gauges.\n * @param provider Provider to use for RPC data fetching.\n *\n * Available methods:\n * - `pool2pool` - Migrates liquidity from one pool to another.\n * - `pool2poolWithGauges` - Migrates liquidity from a pool's gauge to another gauge.\n * - `gauge2gauge` - Migrates liquidity from one gauge to another of the same pool.\n *\n * @example\n * ```typescript\n * const sdk = new BalancerSDK({\n * network: 1,\n * rpcUrl: 'https://rpc.ankr.com/eth',\n * })\n *\n * const migrations = new Migrations({\n * relayerAddress: sdk.networkConfig.addresses.contracts.relayerV4 as string,\n * poolsRepository: sdk.data.pools,\n * gaugesRepository: sdk.data.liquidityGauges.subgraph,\n * provider: sdk.provider\n * })\n *\n * const user = '0xfacec29Ae158B26e234B1a81Db2431F6Bd8F8cE8'\n * const from = '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080'\n * const to = '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080'\n * const balance = '1000000000000000000'\n * const { to, data } = await migrations.pool2pool({ user, from, to, balance })\n *\n * const tx = await sdk.provider.sendTransaction({ to, data })\n * ```\n */\n constructor({\n relayerAddress,\n poolsRepository,\n gaugesRepository,\n provider,\n }: {\n relayerAddress: string;\n poolsRepository: Findable;\n gaugesRepository: Findable;\n provider: JsonRpcProvider;\n }) {\n this.relayerAddress = relayerAddress;\n this.poolsRepository = poolsRepository;\n this.gaugesRepository = gaugesRepository;\n this.provider = provider;\n }\n\n /**\n * Takes user, from and to pool IDs as strings and returns the transaction data\n *\n * @returns transaction data\n */\n async pool2pool({\n user,\n from,\n to,\n balance,\n minBptOut = '0',\n authorisation,\n }: MigrationParams): Promise<{ to: string; data: string }> {\n const fromPool = await buildMigrationPool(from, this.poolsRepository);\n const toPool = await buildMigrationPool(to, this.poolsRepository);\n\n const data = migrationBuilder(\n user,\n this.relayerAddress,\n String(balance),\n minBptOut,\n fromPool,\n toPool,\n minBptOut == '0', // if minBptOut is 0, we peek for the join amount\n undefined,\n undefined,\n authorisation\n );\n\n return {\n to: this.relayerAddress,\n data,\n };\n }\n\n /**\n * Takes user, from and to pool IDs as strings and returns the transaction data\n * for a migration including unstaking and restaking\n *\n * @returns transaction data\n */\n async pool2poolWithGauges({\n user,\n from,\n to,\n balance,\n minBptOut = '0',\n authorisation,\n }: MigrationParams): Promise<{ to: string; data: string }> {\n const fromGauge = await this.gaugesRepository.findBy('poolId', from);\n const toGauge = await this.gaugesRepository.findBy('poolId', to);\n if (!fromGauge || !fromGauge.poolId || !toGauge || !toGauge.poolId) {\n throw new Error('Gauge not found');\n }\n const fromPool = await buildMigrationPool(\n fromGauge.poolId,\n this.poolsRepository\n );\n const toPool = await buildMigrationPool(\n toGauge.poolId,\n this.poolsRepository\n );\n\n const data = migrationBuilder(\n user,\n this.relayerAddress,\n String(balance),\n minBptOut,\n fromPool,\n toPool,\n minBptOut == '0', // if minBptOut is 0, we peek for the join amount\n fromGauge.id,\n toGauge.id,\n authorisation\n );\n\n return {\n to: this.relayerAddress,\n data,\n };\n }\n\n /**\n * Migrates staked liquidity for the same pool from one gauge to another.\n *\n * @returns transaction data\n */\n async gauge2gauge({\n user,\n from,\n to,\n balance,\n authorisation,\n }: MigrationParams): Promise<{ to: string; data: string }> {\n const steps = [\n actions.gaugeWithdrawal(from, user, this.relayerAddress, balance),\n actions.gaugeDeposit(to, this.relayerAddress, user, balance),\n ];\n\n if (authorisation) {\n steps.unshift(\n actions.setRelayerApproval(this.relayerAddress, true, authorisation)\n );\n }\n\n const data = balancerRelayerInterface.encodeFunctionData('multicall', [\n steps,\n ]);\n\n return {\n to: this.relayerAddress,\n data,\n };\n }\n\n /**\n * Decodes the relayer return value to get the expected BPT out.\n *\n * @param relayerReturnValue\n * @returns\n */\n static getExpectedBptOut = (relayerReturnValue: string): string => {\n // Get last two positions of the return value, bptOut is the last one or the second to last one in case there is a gauge deposit\n // join and gauge deposit are always 0x, so any other value means that's the bptOut\n const multicallResult = balancerRelayerInterface.decodeFunctionResult(\n 'multicall',\n relayerReturnValue\n );\n\n const expectedBptOut = multicallResult[0]\n .slice(-2)\n .filter((v: string) => v !== '0x');\n\n return String(BigInt(expectedBptOut));\n };\n\n getExpectedBptOut = Migrations.getExpectedBptOut;\n}\n","import { ClaimService, IClaimService } from '@/modules/claims/ClaimService';\nimport { BalancerSdkConfig, BalancerNetworkConfig } from '@/types';\nimport { Swaps } from './swaps/swaps.module';\nimport { Relayer } from './relayer/relayer.module';\nimport { Subgraph } from './subgraph/subgraph.module';\nimport { Sor } from './sor/sor.module';\nimport { getNetworkConfig } from './sdk.helpers';\nimport { Pricing } from './pricing/pricing.module';\nimport { ContractInstances, Contracts } from './contracts/contracts.module';\nimport { Pools } from './pools';\nimport { Data } from './data';\nimport { VaultModel } from './vaultModel/vaultModel.module';\nimport { JsonRpcProvider } from '@ethersproject/providers';\nimport { Migrations } from './liquidity-managment/migrations';\nimport { Logger } from '@/lib/utils/logger';\n\nexport interface BalancerSDKRoot {\n config: BalancerSdkConfig;\n sor: Sor;\n subgraph: Subgraph;\n pools: Pools;\n data: Data;\n swaps: Swaps;\n relayer: Relayer;\n networkConfig: BalancerNetworkConfig;\n provider: JsonRpcProvider;\n claimService?: IClaimService;\n}\n\nexport class BalancerSDK implements BalancerSDKRoot {\n readonly swaps: Swaps;\n readonly relayer: Relayer;\n readonly pricing: Pricing;\n readonly pools: Pools;\n readonly data: Data;\n balancerContracts: Contracts;\n vaultModel: VaultModel;\n readonly networkConfig: BalancerNetworkConfig;\n readonly provider: JsonRpcProvider;\n readonly claimService?: IClaimService;\n readonly migrationService?: Migrations;\n\n constructor(\n public config: BalancerSdkConfig,\n public sor = new Sor(config),\n public subgraph = new Subgraph(config)\n ) {\n const logger = Logger.getInstance();\n logger.setLoggingEnabled(!!config.enableLogging);\n this.networkConfig = getNetworkConfig(config);\n this.provider = sor.provider as JsonRpcProvider;\n\n this.balancerContracts = new Contracts(\n this.networkConfig.addresses.contracts,\n sor.provider\n );\n\n this.data = new Data(\n this.networkConfig,\n sor.provider,\n this.balancerContracts,\n config.subgraphQuery,\n config.coingecko\n );\n\n this.swaps = new Swaps(this.config);\n this.relayer = new Relayer();\n this.pricing = new Pricing(config, this.swaps);\n\n this.pools = new Pools(\n this.networkConfig,\n this.data,\n this.balancerContracts\n );\n\n if (this.data.liquidityGauges) {\n this.claimService = new ClaimService(\n this.data.liquidityGauges,\n this.data.feeDistributor,\n this.networkConfig.chainId,\n this.contracts.multicall,\n this.networkConfig.addresses.contracts.gaugeClaimHelper,\n this.networkConfig.addresses.contracts.balancerMinter\n );\n this.migrationService = new Migrations({\n relayerAddress: this.networkConfig.addresses.contracts.balancerRelayer,\n poolsRepository: this.data.pools,\n gaugesRepository: this.data.liquidityGauges.subgraph,\n provider: this.provider,\n });\n }\n this.vaultModel = new VaultModel(\n this.data.poolsForSimulations,\n this.networkConfig.addresses.tokens.wrappedNativeAsset\n );\n }\n\n /**\n * Expose balancer contracts, e.g. Vault, LidoRelayer.\n */\n get contracts(): ContractInstances {\n return this.balancerContracts.contracts;\n }\n}\n","import { SubgraphPoolBase } from '@balancer-labs/sor';\nimport {\n EncodeJoinPoolInput,\n ExitPoolData,\n EncodeBatchSwapInput,\n} from '@/modules/relayer/relayer.module';\nimport { Join } from './join';\nimport { Exit } from './exit';\nimport { Swap } from './swap';\n\nexport enum ActionStep {\n Direct,\n TokenIn,\n TokenOut,\n Middle,\n}\n\nexport enum ActionType {\n BatchSwap,\n Join,\n Exit,\n}\n\nexport type Actions = Exit | Swap | Join;\n\nexport interface Action {\n type: ActionType.Join | ActionType.Exit | ActionType.BatchSwap;\n callData(pool: SubgraphPoolBase, wrappedNativeAsset: string): CallData;\n getAmountIn(): string;\n getAmountOut(): string;\n}\n\nexport interface CallData {\n params: EncodeJoinPoolInput | ExitPoolData | EncodeBatchSwapInput;\n encoded: string | string[];\n}\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { ActionStep, ActionType } from './types';\nimport { Relayer, OutputReference } from '@/modules/relayer/relayer.module';\n\nexport class BaseAction {\n nextOpRefKey;\n hasTokenOut;\n hasTokenIn;\n sender;\n receiver;\n opRefStart;\n minOut;\n amountIn;\n\n constructor(\n mainTokenInIndex: number,\n mainTokenOutIndex: number,\n swapAssetInIndex: number,\n swapAssetOutIndex: number,\n swapAmount: string,\n swapReturn: string,\n opRefKey: number,\n slippage: string,\n user: string,\n relayer: string\n ) {\n const actionStep = this.getActionStep(\n mainTokenInIndex,\n mainTokenOutIndex,\n swapAssetInIndex,\n swapAssetOutIndex\n );\n // Will get actual amount if input or chain amount if part of chain\n this.amountIn = this.getActionAmount(\n swapAmount,\n ActionType.BatchSwap,\n actionStep,\n opRefKey\n );\n this.hasTokenIn = this.actionHasTokenIn(actionStep);\n this.hasTokenOut = this.actionHasTokenOut(actionStep);\n // This will be 0 if not a mainTokenOut action otherwise amount using slippage\n const amountOut = this.hasTokenOut ? swapReturn : '0';\n this.minOut = this.getActionMinOut(amountOut, slippage);\n // This will set opRef for next chained action if required\n const [opRef, nextOpRefKey] = this.getActionOutputRef(\n actionStep,\n swapAssetOutIndex,\n opRefKey\n );\n this.nextOpRefKey = nextOpRefKey;\n this.opRefStart = opRef;\n this.sender = this.getSender(this.hasTokenIn, user, relayer);\n this.receiver = this.getReceiver(this.hasTokenOut, user, relayer);\n }\n\n /**\n * If its not the first action then the amount will come from the previous output ref\n * @param amount\n * @param actionType\n * @param actionStep\n * @param opRefKey\n * @returns\n */\n getActionAmount(\n amount: string,\n actionType: ActionType,\n actionStep: ActionStep,\n opRefKey: number\n ): string {\n let amountIn = amount;\n if (\n actionStep === ActionStep.TokenOut ||\n (actionStep === ActionStep.Middle && actionType === ActionType.Join) ||\n (actionStep === ActionStep.Middle && actionType === ActionType.Exit)\n ) {\n amountIn = Relayer.toChainedReference(opRefKey - 1).toString();\n }\n return amountIn;\n }\n\n /**\n * If its not the final action then we need an outputReferece to chain to next action as input\n * @param actionStep\n * @param tokenOutIndex\n * @param opRefKey\n * @returns\n */\n getActionOutputRef(\n actionStep: ActionStep,\n tokenOutIndex: number,\n opRefKey: number\n ): [OutputReference, number] {\n let opRef: OutputReference = {} as OutputReference;\n if (actionStep === ActionStep.TokenIn || actionStep === ActionStep.Middle) {\n opRef = this.getOutputRef(opRefKey, tokenOutIndex);\n opRefKey++;\n }\n return [opRef, opRefKey];\n }\n\n /**\n * Use slippage to set min amount out\n * @param amountOut\n * @param slippage\n * @returns\n */\n getActionMinOut(amountOut: string, slippage: string): string {\n // Currently only handle ExactIn swap. ExactOut would add slippage\n // We should apply slippage to each swaps amountOut\n return subSlippage(\n BigNumber.from(amountOut),\n BigNumber.from(slippage)\n ).toString();\n }\n\n /**\n * Find if the Action is:\n * Direct: tokenIn > tokenOut\n * TokenIn: tokenIn > chain...\n * TokenOut: ...chain > tokenOut\n * Middle: ...chain > action > chain...\n * @param tokenInIndex\n * @param tokenOutIndex\n * @param tokenInIndexAction\n * @param tokenOutIndexAction\n * @returns\n */\n getActionStep(\n tokenInIndex: number,\n tokenOutIndex: number,\n tokenInIndexAction: number,\n tokenOutIndexAction: number\n ): ActionStep {\n let actionStep: ActionStep;\n if (\n tokenInIndexAction === tokenInIndex &&\n tokenOutIndexAction === tokenOutIndex\n ) {\n actionStep = ActionStep.Direct;\n } else if (tokenInIndexAction === tokenInIndex) {\n actionStep = ActionStep.TokenIn;\n } else if (tokenOutIndexAction === tokenOutIndex) {\n actionStep = ActionStep.TokenOut;\n } else {\n actionStep = ActionStep.Middle;\n }\n return actionStep;\n }\n\n getOutputRef(key: number, index: number): OutputReference {\n const keyRef = Relayer.toChainedReference(key);\n return { index: index, key: keyRef };\n }\n\n getFromInternal(hasTokenIn: boolean, isBptIn?: boolean): boolean {\n if (hasTokenIn || isBptIn) return false;\n else return true;\n }\n\n getToInternal(hasTokenOut: boolean, isBptOut?: boolean): boolean {\n // exits - can't exit using BPT from internal balances\n // Because of ^ we can assume that any tokenOut BPT is going to external (either to user or exit)\n if (hasTokenOut || isBptOut) return false;\n else return true;\n }\n\n actionHasTokenIn(actionStep: ActionStep): boolean {\n return actionStep === ActionStep.Direct || actionStep === ActionStep.TokenIn\n ? true\n : false;\n }\n\n actionHasTokenOut(actionStep: ActionStep): boolean {\n return actionStep === ActionStep.Direct ||\n actionStep === ActionStep.TokenOut\n ? true\n : false;\n }\n\n getSender(hasTokenIn: boolean, user: string, relayer: string): string {\n // tokenIn/Out will come from/go to the user. Any other tokens are intermediate and will be from/to Relayer\n if (hasTokenIn) return user;\n else return relayer;\n }\n\n getReceiver(hasTokenOut: boolean, user: string, relayer: string): string {\n // tokenIn/Out will come from/go to the user. Any other tokens are intermediate and will be from/to Relayer\n if (hasTokenOut) return user;\n else return relayer;\n }\n\n getPoolKind(poolType: string): number {\n // We have to use correct pool type based off following from Relayer:\n // enum PoolKind { WEIGHTED, LEGACY_STABLE, COMPOSABLE_STABLE, COMPOSABLE_STABLE_V2 }\n // (note only Weighted and COMPOSABLE_STABLE_V2 will support proportional exits)\n let kind = 0;\n if ([`MetaStable`, `Stable`, `StablePhantom`].includes(poolType)) {\n kind = 1;\n } else if (poolType === `ComposableStable`) {\n // In this case we are only doing BPT <> singleToken, not BPT <> tokens, so encoding matches and avoids need to check version so default to 3\n kind = 3;\n }\n return kind;\n }\n}\n","import { SubgraphPoolBase, SwapV2 } from '@balancer-labs/sor';\nimport {\n Relayer,\n ExitPoolData,\n OutputReference,\n} from '@/modules/relayer/relayer.module';\nimport { ExitPoolRequest } from '@/types';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { AssetHelpers } from '@/lib/utils';\nimport { ActionType, Action, CallData } from './types';\nimport { BaseAction } from './baseAction';\n\nexport class Exit extends BaseAction implements Action {\n type: ActionType.Exit;\n poolId: string;\n tokenOut: string;\n toInternalBalance: boolean;\n opRef: OutputReference;\n\n constructor(\n swap: SwapV2,\n mainTokenInIndex: number,\n mainTokenOutIndex: number,\n public opRefKey: number,\n assets: string[],\n slippage: string,\n user: string,\n relayerAddress: string\n ) {\n super(\n mainTokenInIndex,\n mainTokenOutIndex,\n swap.assetInIndex,\n swap.assetOutIndex,\n swap.amount,\n swap.returnAmount ?? '0',\n opRefKey,\n slippage,\n user,\n relayerAddress\n );\n this.type = ActionType.Exit;\n this.poolId = swap.poolId;\n this.tokenOut = assets[swap.assetOutIndex];\n this.toInternalBalance = this.getToInternal(this.hasTokenOut);\n this.opRef = this.opRefStart;\n }\n\n public callData(\n pool: SubgraphPoolBase,\n wrappedNativeAsset: string\n ): CallData {\n const assets = pool.tokensList;\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // tokens must have same order as pool getTokens\n const [sortedTokens] = assetHelpers.sortTokens(assets) as [string[]];\n const exitToken = this.tokenOut;\n const exitTokenIndex = sortedTokens.findIndex(\n (t) => t.toLowerCase() === exitToken.toLowerCase()\n );\n const minAmountsOut = Array(assets.length).fill('0');\n // Variable amount of token out (this has slippage applied)\n minAmountsOut[exitTokenIndex] = this.minOut;\n // Uses exact amount in\n const bptAmtIn = this.amountIn;\n const userData = WeightedPoolEncoder.exitExactBPTInForOneTokenOut(\n bptAmtIn,\n exitTokenIndex\n );\n const params: ExitPoolData = {\n assets: sortedTokens,\n minAmountsOut,\n userData,\n toInternalBalance: this.toInternalBalance,\n poolId: this.poolId,\n poolKind: this.getPoolKind(pool.poolType),\n sender: this.sender,\n recipient: this.receiver,\n outputReferences: this.opRef.key ? [this.opRef] : [],\n exitPoolRequest: {} as ExitPoolRequest,\n };\n const exitPoolInput = Relayer.formatExitPoolInput(params);\n const callData = Relayer.encodeExitPool(exitPoolInput);\n return {\n params,\n encoded: callData,\n };\n }\n\n public getAmountIn(): string {\n return this.hasTokenIn ? this.amountIn : '0';\n }\n\n public getAmountOut(): string {\n return this.hasTokenOut ? this.minOut : '0';\n }\n}\n","import { SubgraphPoolBase, SwapV2 } from '@balancer-labs/sor';\nimport {\n Relayer,\n EncodeJoinPoolInput,\n OutputReference,\n} from '@/modules/relayer/relayer.module';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { AssetHelpers } from '@/lib/utils';\nimport { ActionType, Action, CallData } from './types';\nimport { BaseAction } from './baseAction';\n\nexport class Join extends BaseAction implements Action {\n type: ActionType.Join;\n poolId: string;\n tokenIn: string;\n opRef: OutputReference;\n fromInternal;\n\n constructor(\n swap: SwapV2,\n mainTokenInIndex: number,\n mainTokenOutIndex: number,\n public opRefKey: number,\n assets: string[],\n slippage: string,\n user: string,\n relayerAddress: string\n ) {\n super(\n mainTokenInIndex,\n mainTokenOutIndex,\n swap.assetInIndex,\n swap.assetOutIndex,\n swap.amount,\n swap.returnAmount ?? '0',\n opRefKey,\n slippage,\n user,\n relayerAddress\n );\n this.type = ActionType.Join;\n this.poolId = swap.poolId;\n this.tokenIn = assets[swap.assetInIndex];\n this.fromInternal = this.getFromInternal(this.hasTokenIn);\n this.opRef = this.opRefStart;\n }\n\n public callData(\n pool: SubgraphPoolBase,\n wrappedNativeAsset: string\n ): CallData {\n const assets = pool.tokensList;\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // tokens must have same order as pool getTokens\n const [sortedTokens] = assetHelpers.sortTokens(assets) as [string[]];\n const joinToken = this.tokenIn;\n const joinTokenIndex = sortedTokens.findIndex(\n (t) => t.toLowerCase() === joinToken.toLowerCase()\n );\n const maxAmountsIn = Array(assets.length).fill('0');\n // Uses exact amounts of tokens in\n maxAmountsIn[joinTokenIndex] = this.amountIn;\n // Variable amount of BPT out (this has slippage applied)\n const bptAmountOut = this.minOut;\n const userData = WeightedPoolEncoder.joinExactTokensInForBPTOut(\n maxAmountsIn,\n bptAmountOut\n );\n const params: EncodeJoinPoolInput = {\n poolId: this.poolId,\n sender: this.sender,\n recipient: this.receiver,\n kind: this.getPoolKind(pool.poolType),\n joinPoolRequest: {\n assets: sortedTokens,\n maxAmountsIn,\n userData,\n fromInternalBalance: this.fromInternal,\n },\n value: '0',\n outputReference: this.opRef.key ? this.opRef.key.toString() : '0',\n };\n const callData = Relayer.encodeJoinPool(params);\n\n return {\n params,\n encoded: callData,\n };\n }\n\n public getAmountIn(): string {\n return this.hasTokenIn ? this.amountIn : '0';\n }\n\n public getAmountOut(): string {\n return this.hasTokenOut ? this.minOut : '0';\n }\n}\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { MaxUint256, MaxInt256 } from '@ethersproject/constants';\nimport { SubgraphPoolBase, SwapV2 } from '@balancer-labs/sor';\nimport {\n Relayer,\n EncodeBatchSwapInput,\n OutputReference,\n} from '@/modules/relayer/relayer.module';\nimport { FundManagement, SwapType } from '../../types';\nimport { ActionType, Action, CallData } from './types';\nimport { BaseAction } from './baseAction';\n\nexport class Swap extends BaseAction implements Action {\n type: ActionType.BatchSwap;\n swaps: SwapV2[];\n limits: BigNumber[];\n private approveTokens: string[] = [];\n opRef: OutputReference[] = [];\n fromInternal;\n toInternal;\n\n constructor(\n swap: SwapV2,\n private mainTokenInIndex: number,\n private mainTokenOutIndex: number,\n public opRefKey: number,\n private assets: string[],\n private slippage: string,\n private pools: SubgraphPoolBase[],\n private user: string,\n private relayer: string\n ) {\n super(\n mainTokenInIndex,\n mainTokenOutIndex,\n swap.assetInIndex,\n swap.assetOutIndex,\n swap.amount,\n swap.returnAmount ?? '0',\n opRefKey,\n slippage,\n user,\n relayer\n );\n this.type = ActionType.BatchSwap;\n // Updates swap data to use chainedRef if required\n this.swaps = [{ ...swap, amount: this.amountIn }];\n const isBptIn = this.isBpt(pools, assets[swap.assetInIndex]);\n if (isBptIn) {\n // Older pools don't have pre-approval so need to add this as a step\n this.approveTokens.push(assets[swap.assetInIndex]);\n }\n this.fromInternal = this.getFromInternal(this.hasTokenIn, isBptIn);\n const isBptOut = this.isBpt(pools, assets[swap.assetOutIndex]);\n this.toInternal = this.getToInternal(this.hasTokenOut, isBptOut);\n this.limits = this.getLimits(\n assets,\n swap.assetInIndex,\n swap.assetOutIndex,\n swap.amount,\n this.hasTokenIn,\n this.hasTokenOut,\n this.minOut\n );\n if (this.opRefStart.index) {\n this.opRef.push(this.opRefStart);\n }\n }\n\n private getLimits(\n assets: string[],\n assetInIndex: number,\n assetOutIndex: number,\n swapAmount: string,\n hasTokenIn: boolean,\n hasTokenOut: boolean,\n minOut: string\n ): BigNumber[] {\n const limits = assets.map(() => BigNumber.from(0));\n // tokenIn/Out will come from/go to the user. Any other tokens are intermediate and will be from/to Relayer\n if (hasTokenIn) {\n limits[assetInIndex] = BigNumber.from(swapAmount);\n } else {\n // This will be a chained swap/input amount\n limits[assetInIndex] = MaxInt256;\n }\n if (hasTokenOut) {\n limits[assetOutIndex] = BigNumber.from(minOut).mul(-1);\n }\n return limits;\n }\n\n private updateLimits(limits: BigNumber[], newSwap: Swap): void {\n if (newSwap.hasTokenIn) {\n // We need to add amount for each swap that uses tokenIn to get correct total\n limits[newSwap.swaps[0].assetInIndex] = limits[\n newSwap.swaps[0].assetInIndex\n ].add(newSwap.amountIn);\n }\n if (newSwap.hasTokenOut) {\n // We need to add amount for each swap that uses tokenOut to get correct total (should be negative)\n limits[newSwap.swaps[0].assetOutIndex] = limits[\n newSwap.swaps[0].assetOutIndex\n ].sub(newSwap.minOut);\n }\n }\n\n isChainedSwap(swap: Swap): boolean {\n return (\n this.opRef[this.swaps.length - 1] &&\n this.toInternal === swap.fromInternal &&\n this.receiver === swap.sender &&\n this.opRef[this.swaps.length - 1].key.toString() === swap.amountIn\n );\n }\n\n // If swap has different send/receive params than previous then it will need to be done separately\n canAddSwap(newSwap: Swap): boolean {\n if (this.isChainedSwap(newSwap)) return true;\n return (\n newSwap.fromInternal === this.fromInternal &&\n newSwap.toInternal === this.toInternal &&\n newSwap.receiver === this.receiver &&\n newSwap.sender === this.sender\n );\n }\n\n callData(): CallData {\n const calls: string[] = [];\n\n for (const token of this.approveTokens) {\n // If swap tokenIn is a BPT then:\n // new pools have automatic infinite vault allowance, but not old ones\n // const key = Relayer.fromChainedReference(action.swaps[0].amount);\n // const readOnlyRef = Relayer.toChainedReference(key, false);\n // const approval = Relayer.encodeApproveVault(token, readOnlyRef.toString());\n // TODO fix approval amount\n // TODO only approve once\n const approval = Relayer.encodeApproveVault(token, MaxUint256.toString());\n calls.push(approval);\n }\n\n const funds: FundManagement = {\n sender: this.sender,\n recipient: this.receiver,\n fromInternalBalance: this.fromInternal,\n toInternalBalance: this.toInternal,\n };\n const batchSwapInput: EncodeBatchSwapInput = {\n swapType: SwapType.SwapExactIn,\n swaps: this.swaps,\n assets: this.assets,\n funds,\n limits: this.limits.map((l) => l.toString()),\n deadline: BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value: '0',\n outputReferences: this.opRef,\n };\n\n const encodedBatchSwap = Relayer.encodeBatchSwap(batchSwapInput);\n calls.push(encodedBatchSwap);\n return {\n params: batchSwapInput,\n encoded: calls,\n };\n }\n getAmountIn(): string {\n return this.limits[this.mainTokenInIndex].toString();\n }\n getAmountOut(): string {\n return this.limits[this.mainTokenOutIndex].abs().toString();\n }\n\n copy(): Swap {\n return new Swap(\n this.swaps[0],\n this.mainTokenInIndex,\n this.mainTokenOutIndex,\n this.opRefKey,\n this.assets,\n this.slippage,\n this.pools,\n this.user,\n this.relayer\n );\n }\n\n addSwap(swap: Swap): void {\n const isChainedSwap = this.isChainedSwap(swap);\n this.swaps.push(swap.swaps[0]);\n // Merge approveTokens without any duplicates\n this.approveTokens = [\n ...new Set([...this.approveTokens, ...swap.approveTokens]),\n ];\n this.toInternal = swap.toInternal;\n this.receiver = swap.receiver;\n this.hasTokenOut = swap.hasTokenOut;\n this.minOut = swap.minOut;\n this.opRef = [...this.opRef, ...swap.opRef];\n if (!isChainedSwap) {\n this.amountIn = BigNumber.from(this.amountIn)\n .add(swap.amountIn)\n .toString();\n }\n this.updateLimits(this.limits, swap);\n }\n\n isBpt(pools: SubgraphPoolBase[], token: string): boolean {\n return pools.some((p) => p.address.toLowerCase() === token.toLowerCase());\n }\n}\n","import { ActionType, Actions } from './types';\nimport { Swap } from './swap';\n\n/**\n * Categorize each action into a Join, Middle or Exit.\n * @param actions\n * @returns\n */\nexport function categorizeActions(actions: Actions[]): Actions[] {\n const enterActions: Actions[] = [];\n const exitActions: Actions[] = [];\n const middleActions: Actions[] = [];\n for (const a of actions) {\n if (a.type === ActionType.Exit || a.type === ActionType.Join) {\n // joins/exits with tokenIn can always be done first\n if (a.hasTokenIn) enterActions.push(a);\n // joins/exits with tokenOut (and not tokenIn) can always be done last\n else if (a.hasTokenOut) exitActions.push(a);\n else middleActions.push(a);\n }\n // All other actions will be chained inbetween\n else middleActions.push(a);\n }\n const allActions: Actions[] = [\n ...enterActions,\n ...middleActions,\n ...exitActions,\n ];\n return allActions;\n}\n\n/**\n * This aims to minimise the number of Actions the Relayer multicall needs to call by batching sequential swaps together.\n * @param actions\n * @param assets\n * @returns\n */\nexport function batchSwapActions(allActions: Actions[]): Actions[] {\n /*\n batchSwaps are a collection of swaps that can all be called in a single batchSwap\n Can batch all swaps with same source\n Any swap without tokenIn && not BPT should be coming from internal balances\n Any swap with tokenIn or BPT should be coming from external balances\n */\n const orderedActions: Actions[] = [];\n let batchedSwaps: Swap | undefined = undefined;\n\n for (const a of allActions) {\n if (a.type === ActionType.BatchSwap) {\n if (!batchedSwaps) {\n batchedSwaps = a.copy();\n } else {\n if (batchedSwaps.canAddSwap(a)) {\n batchedSwaps.addSwap(a);\n } else {\n orderedActions.push(batchedSwaps);\n batchedSwaps = a.copy();\n }\n }\n } else {\n // Non swap action\n if (batchedSwaps) {\n orderedActions.push(batchedSwaps);\n // new batchSwap collection as there is a chained join/exit inbetween\n batchedSwaps = undefined;\n }\n orderedActions.push(a);\n }\n }\n if (batchedSwaps) orderedActions.push(batchedSwaps);\n\n return orderedActions;\n}\n\n/**\n * Organise Actions into order with least amount of calls.\n * @param actions\n * @param assets\n * @returns\n */\nexport function orderActions(actions: Actions[]): Actions[] {\n const categorizedActions = categorizeActions(actions);\n const orderedActions = batchSwapActions(categorizedActions);\n return orderedActions;\n}\n","import { Interface } from '@ethersproject/abi';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport {\n SubgraphPoolBase,\n SwapInfo,\n SwapTypes,\n SwapV2,\n} from '@balancer-labs/sor';\nimport {\n Relayer,\n EncodeJoinPoolInput,\n EncodeBatchSwapInput,\n ExitPoolData,\n} from '@/modules/relayer/relayer.module';\nimport { getPoolAddress } from '@/pool-utils';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { orderActions, ActionType, Actions } from './actions';\n\nimport balancerRelayerAbi from '@/lib/abi/BalancerRelayer.json';\nimport { Join } from './actions/join';\nimport { Exit } from './actions/exit';\nimport { Swap } from './actions/swap';\nimport { Logger } from '@/lib/utils/logger';\n\nconst balancerRelayerInterface = new Interface(balancerRelayerAbi);\n\n// Quickly switch useful debug logs on/off\nconst DEBUG = false;\n\nfunction debugLog(log: string) {\n const logger = Logger.getInstance();\n if (DEBUG) logger.info(log);\n}\n\nexport function canUseJoinExit(\n swapType: SwapTypes,\n tokenIn: string,\n tokenOut: string\n): boolean {\n if (\n swapType === SwapTypes.SwapExactOut ||\n tokenIn.toLowerCase() === AddressZero.toLowerCase() ||\n tokenOut.toLowerCase() === AddressZero.toLowerCase()\n )\n return false;\n else return true;\n}\n\n/**\n * Currently SOR only supports join/exit paths through Weighted pools.\n * Weighted pools should not have preminted BPT so can assume if a swap token is pool address it is a join or exit.\n * @param pools\n * @param swap\n * @param assets\n * @returns\n */\nexport function hasJoinExit(\n pools: SubgraphPoolBase[],\n swap: SwapV2,\n assets: string[]\n): boolean {\n const pool = pools.find((p) => p.id === swap.poolId);\n if (pool?.poolType !== 'Weighted') return false;\n const tokenIn = assets[swap.assetInIndex];\n const tokenOut = assets[swap.assetOutIndex];\n return [tokenIn, tokenOut].includes(pool.address);\n}\n\n/**\n * Finds if a swap returned by SOR is a join by checking if tokenOut === poolAddress\n * @param swap\n * @param assets\n * @returns\n */\nexport function isJoin(\n swap: SwapV2,\n assets: string[],\n poolType: string | undefined\n): boolean {\n if (poolType !== 'Weighted') return false;\n // token[join]bpt\n const tokenOut = assets[swap.assetOutIndex];\n const poolAddress = getPoolAddress(swap.poolId);\n return tokenOut.toLowerCase() === poolAddress.toLowerCase();\n}\n\n/**\n * Finds if a swap returned by SOR is an exit by checking if tokenIn === poolAddress\n * @param swap\n * @param assets\n * @returns\n */\nexport function isExit(\n swap: SwapV2,\n assets: string[],\n poolType: string | undefined\n): boolean {\n if (poolType !== 'Weighted') return false;\n // bpt[exit]token\n const tokenIn = assets[swap.assetInIndex];\n const poolAddress = getPoolAddress(swap.poolId);\n return tokenIn.toLowerCase() === poolAddress.toLowerCase();\n}\n\n/**\n * Find if any of the swaps are join/exits. If yes these swaps should be routed via Relayer.\n * @param pools\n * @param swaps\n * @param assets\n * @returns\n */\nexport function someJoinExit(\n pools: SubgraphPoolBase[],\n swaps: SwapV2[],\n assets: string[]\n): boolean {\n return swaps.some((swap) => {\n return hasJoinExit(pools, swap, assets);\n });\n}\n\n/**\n * Translate each swap into an Action. An Action is a join/exit/swap with the chained output refs.\n * @param swapType\n * @param tokenIn\n * @param tokenOut\n * @param swaps\n * @param assets\n * @param slippage\n * @param pools\n * @param user\n * @param relayer\n * @returns\n */\nexport function getActions(\n tokenIn: string,\n tokenOut: string,\n swaps: SwapV2[],\n assets: string[],\n slippage: string,\n pools: SubgraphPoolBase[],\n user: string,\n relayer: string\n): Actions[] {\n const tokenInIndex = assets.findIndex(\n (t) => t.toLowerCase() === tokenIn.toLowerCase()\n );\n const tokenOutIndex = assets.findIndex(\n (t) => t.toLowerCase() === tokenOut.toLowerCase()\n );\n const actions: Actions[] = [];\n let opRefKey = 0;\n for (const swap of swaps) {\n const poolType = pools.find((p) => p.id === swap.poolId)?.poolType;\n if (isJoin(swap, assets, poolType)) {\n const newJoin = new Join(\n swap,\n tokenInIndex,\n tokenOutIndex,\n opRefKey,\n assets,\n slippage,\n user,\n relayer\n );\n opRefKey = newJoin.nextOpRefKey;\n actions.push(newJoin);\n continue;\n } else if (isExit(swap, assets, poolType)) {\n const newExit = new Exit(\n swap,\n tokenInIndex,\n tokenOutIndex,\n opRefKey,\n assets,\n slippage,\n user,\n relayer\n );\n opRefKey = newExit.nextOpRefKey;\n actions.push(newExit);\n continue;\n } else {\n const newSwap = new Swap(\n swap,\n tokenInIndex,\n tokenOutIndex,\n opRefKey,\n assets,\n slippage,\n pools,\n user,\n relayer\n );\n opRefKey = newSwap.nextOpRefKey;\n actions.push(newSwap);\n continue;\n }\n }\n return actions;\n}\n\n/**\n * Given swapInfo from the SOR construct the Relayer multicall to execture swaps/joins/exits.\n * @param swapInfo Returned from SOR\n * @param swapType Only supports ExactIn\n * @param pools Pool info from SOR\n * @param user Address of user\n * @param relayerAddress Address of Relayer (>=V4)\n * @param wrappedNativeAsset Address of Native asset\n * @param slippage [bps], eg: 1 === 0.01%, 100 === 1%\n * @param authorisation Encoded authorisation call.\n * @returns\n */\nexport function buildRelayerCalls(\n swapInfo: SwapInfo,\n pools: SubgraphPoolBase[],\n user: string,\n relayerAddress: string,\n wrappedNativeAsset: string,\n slippage: string,\n authorisation: string | undefined\n): {\n to: string;\n data: string;\n rawCalls: string[];\n inputs: (EncodeBatchSwapInput | ExitPoolData | EncodeJoinPoolInput)[];\n} {\n // For each 'swap' create a swap/join/exit action\n const actions = getActions(\n swapInfo.tokenIn,\n swapInfo.tokenOut,\n swapInfo.swaps,\n swapInfo.tokenAddresses,\n slippage,\n pools,\n user,\n relayerAddress\n );\n // Arrange action into order that will create minimal amount of calls\n const orderedActions = orderActions(actions);\n\n const calls: string[] = [];\n const inputs: (EncodeBatchSwapInput | ExitPoolData | EncodeJoinPoolInput)[] =\n [];\n if (authorisation)\n // Uses relayer to approve itself to act in behalf of the user\n calls.push(\n Relayer.encodeSetRelayerApproval(relayerAddress, true, authorisation)\n );\n\n // Create encoded call for each action\n for (const action of orderedActions) {\n if (action.type === ActionType.Exit || action.type === ActionType.Join) {\n const pool = pools.find((p) => p.id === action.poolId);\n if (pool === undefined)\n throw new BalancerError(BalancerErrorCode.NO_POOL_DATA);\n const { params, encoded } = action.callData(pool, wrappedNativeAsset);\n calls.push(encoded as string);\n inputs.push(params);\n }\n if (action.type === ActionType.BatchSwap) {\n const { params, encoded } = action.callData();\n calls.push(...encoded);\n inputs.push(params);\n }\n }\n\n // Safety check to make sure amounts/limits from calls match expected\n checkAmounts(\n orderedActions.map((a) => BigNumber.from(a.getAmountIn())),\n orderedActions.map((a) => BigNumber.from(a.getAmountOut())),\n swapInfo,\n slippage\n );\n // encode relayer multicall\n const callData = balancerRelayerInterface.encodeFunctionData('multicall', [\n calls,\n ]);\n\n return {\n to: relayerAddress,\n data: callData,\n rawCalls: calls,\n inputs,\n };\n}\n\nfunction checkAmounts(\n amountsIn: BigNumber[],\n amountsOut: BigNumber[],\n swapInfo: SwapInfo,\n slippage: string\n): void {\n const totalIn = amountsIn.reduce(\n (total = BigNumber.from(0), amount) => (total = total.add(amount))\n );\n const totalOut = amountsOut.reduce(\n (total = BigNumber.from(0), amount) => (total = total.add(amount))\n );\n // totalIn should equal the original input swap amount\n // totalOut should equal the return amount from SOR minus any slippage allowance\n debugLog(`${totalIn.toString()} totalIn`);\n debugLog(`${swapInfo.swapAmount.toString()} swapInfo.swapAmount`);\n debugLog(`${totalOut.toString()} totalOut`);\n debugLog(\n `${subSlippage(\n swapInfo.returnAmount,\n BigNumber.from(slippage)\n ).toString()} slippage`\n );\n debugLog(`${swapInfo.returnAmount.toString()} swapInfo.returnAmount`);\n const diffOut = totalOut.sub(\n subSlippage(swapInfo.returnAmount, BigNumber.from(slippage))\n );\n if (!totalIn.eq(swapInfo.swapAmount) || !diffOut.lt(`3`))\n throw new BalancerError(BalancerErrorCode.RELAY_SWAP_AMOUNTS);\n /* ExactOut case\n // totalIn should equal the return amount from SOR (this is the amount in) plus any slippage allowance\n // totalOut should equal the original input swap amount (the exact amount out)\n if (\n !totalIn.eq(\n addSlippage(swapInfo.returnAmount, BigNumber.from(slippage))\n ) ||\n !totalOut.eq(swapInfo.swapAmount)\n )\n throw new BalancerError(BalancerErrorCode.RELAY_SWAP_AMOUNTS);\n */\n}\n"],"names":["BasePoolExitKind","StablePoolJoinKind","StablePhantomPoolJoinKind","StablePoolExitKind","WeightedPoolJoinKind","WeightedPoolExitKind","BasePoolEncoder","recoveryModeExit","bptAmountIn","defaultAbiCoder","encode","RECOVERY_MODE","StablePoolEncoder","constructor","joinInit","amountsIn","INIT","joinCollectProtocolFees","COLLECT_PROTOCOL_FEES","joinExactTokensInForBPTOut","minimumBPT","EXACT_TOKENS_IN_FOR_BPT_OUT","joinTokenInForExactBPTOut","bptAmountOut","enterTokenIndex","TOKEN_IN_FOR_EXACT_BPT_OUT","exitExactBPTInForOneTokenOut","exitTokenIndex","EXACT_BPT_IN_FOR_ONE_TOKEN_OUT","exitExactBPTInForTokensOut","EXACT_BPT_IN_FOR_TOKENS_OUT","exitBPTInForExactTokensOut","amountsOut","maxBPTAmountIn","BPT_IN_FOR_EXACT_TOKENS_OUT","WeightedPoolEncoder","joinAllTokensInForExactBPTOut","ALL_TOKENS_IN_FOR_EXACT_BPT_OUT","ManagedPoolEncoder","exitForManagementFees","MANAGEMENT_FEE_TOKENS_OUT","toNormalizedWeights","weights","length","Array","fill","ONE","div","sum","reduce","total","weight","add","Zero","eq","normalizedWeights","normalizedSum","index","mul","sub","isNormalizedWeights","totalWeight","ComposableStablePoolJoinKind","ComposableStablePoolExitKind","ComposableStablePoolEncoder","exitExactBPTInForAllTokensOut","EXACT_BPT_IN_FOR_ALL_TOKENS_OUT","isProduction","process","env","NODE_ENV","prefix","invariant","condition","message","Error","provided","value","concat","splitPoolId","poolId","address","getPoolAddress","specialization","getPoolSpecialization","nonce","getPoolNonce","slice","specializationCode","parseInt","BigNumber","from","Network","APR_THRESHOLD","SHALLOW_COMPOSABLE_STABLE_BUFFER","POOLS_GENERIC","IdsMap","Pagination","PerPage","PerPool","PerPoolInitial","DelegateOwner","ZeroAddress","DynamicFees","Gauntlet","BlockList","ExcludedPoolTypes","Stable","AllowList","Investment","Factories","Stakable","Metadata","name","hasIcon","POOLS_MAP","GOERLI","staBAL","bbAaveUSD","v1","v2","veBAL","MAINNET","POLYGON","xMatic","stMatic","mai4","maiBbaUsd","ARBITRUM","GNOSIS","POOLS","networkId","PoolGaugesAttributes","PoolShareAttributes","GaugeShareAttributes","PoolSpecialization","UserBalanceOpKind","PoolBalanceOpKind","PoolType","Logger","this","enableLogging","static","instance","setLoggingEnabled","enabled","info","warn","console","error","time","timeEnd","transposeMatrix","matrix","map","_","columnIndex","row","AssetHelpers","wethAddress","ETH","AddressZero","isETH","token","isEqual","isWETH","WETH","translateToERC20","getAddress","sortTokens","tokens","others","forEach","array","erc20Tokens","sortedTranspose","sort","tokenA","tokenB","toLowerCase","cmpTokens","sortedErc20s","sortedOthers","includes","addressA","addressB","balancerErrorCodes","BalancerErrors","async","accountToAddress","account","Signer","isSigner","RelayerAction","isErrorCode","errorCode","replace","Object","keys","parseErrorCode","actualError","tryParseErrorCode","isBalancerError","values","encodeError","encodedError","entries","find","RelayerAuthorization","encodeCalldataAuthorization","calldata","deadline","signature","encodedDeadline","hexZeroPad","hexValue","v","r","s","splitSignature","signJoinAuthorization","validator","user","allowedSender","allowedCalldata","signAuthorizationFor","JoinPool","signExitAuthorization","ExitPool","signSwapAuthorization","Swap","signBatchSwapAuthorization","BatchSwap","signSetRelayerApprovalAuthorization","SetRelayerApproval","type","MAX_DEADLINE","chainId","provider","getNetwork","userAddress","getNextNonce","domain","version","verifyingContract","types","sender","toString","_signTypedData","BalancerMinterAuthorization","signSetMinterApproval","minterContract","minter","approval","SetMinterApproval","signPermit","owner","spender","amount","ownerAddress","nonces","Permit","BZERO","BigInt","BONE","_require","b","_computeScalingFactor","tokenDecimals","decimalsDifference","_upscale","scalingFactor","SolidityMaths","mulDownFixed","_upscaleArray","amounts","scalingFactors","upscaledAmounts","i","_downscaleDown","divDownFixed","_downscaleDownArray","downscaledAmounts","a","c","args","previous","current","roundUp","divUp","divDown","product","aInflated","x","y","raw","LogExpMath","pow","maxError","mulUpFixed","MAX_POW_RELATIVE_ERROR","ONE_18","x_int256","MILD_EXPONENT_BOUND","y_int256","logx_times_y","LN_36_LOWER_BOUND","LN_36_UPPER_BOUND","ln_36_x","_ln_36","_ln","MIN_NATURAL_EXPONENT","MAX_NATURAL_EXPONENT","exp","firstAN","x0","a0","x1","a1","ONE_20","x2","a2","x3","a3","x4","a4","x5","a5","x6","a6","x7","a7","x8","a8","x9","a9","term","seriesSum","z","ONE_36","z_squared","num","a10","x10","a11","x11","AMP_PRECISION","parsePoolInfo","pool","wrappedNativeAsset","unwrapNativeAsset","poolTokens","decimals","_a","balancesEvm","parseFixed","balance","toBigInt","priceRates","priceRate","scalingFactorsRaw","d","sf","upScaledBalances","assetHelpers","ampWithPrecision","amp","higherBalanceTokenIndex","indexOf","max","scalingFactorsWithoutBpt","scalingFactorsRawWithoutBpt","poolTokensWithoutBpt","balancesEvmWithoutBpt","priceRatesWithoutBpt","upScaledBalancesWithoutBpt","bptIndex","splice","swapFeeEvm","swapFee","totalSharesEvm","totalShares","TOKENS_GENERIC","Popular","Symbols","Addresses","nativeAsset","wNativeAsset","BAL","TOKENS_MAP","bbaUSD","PriceChainMap","bbaUSDv2","TOKENS","_permanentCensorErrors","_censorErrors","LogLevels","debug","default","warning","off","_logLevel","_globalLogger","_normalizeError","missing","form","normalize","push","join","String","fromCharCode","_checkNormalize","LogLevel","ErrorCode","HEX","defineProperty","enumerable","writable","_log","logLevel","level","throwArgumentError","log","apply","levels","DEBUG","INFO","WARNING","makeError","code","params","errors","UNKNOWN_ERROR","messageDetails","key","Uint8Array","hex","JSON","stringify","reason","url","NUMERIC_FAULT","fault","CALL_EXCEPTION","INSUFFICIENT_FUNDS","MISSING_NEW","NONCE_EXPIRED","REPLACEMENT_UNDERPRICED","TRANSACTION_REPLACED","UNPREDICTABLE_GAS_LIMIT","throwError","INVALID_ARGUMENT","argument","assert","assertArgument","checkNormalize","UNSUPPORTED_OPERATION","operation","checkSafeUint53","checkArgumentCount","count","expectedCount","MISSING_ARGUMENT","UNEXPECTED_ARGUMENT","checkNew","target","kind","checkAbstract","censorship","permanent","globalLogger","logger","names","formatUnits","unitName","formatFixed","parseUnits","yieldTokens","waUSDT","waUSDC","waDAI","wamDAI","wamUSDC","wamUSDT","wrappedTokensMap","aToken","underlying","wrappedATokenInterface","Interface","AaveRates","multicall","network","addresses","payload","wrappedATokenAddress","callData","encodeFunctionData","res","callStatic","aggregate","p","parseFloat","wrappedAToken","tokensToTokenPrices","tokenPrices","price","tokenAddressForPricing","addressMapIn","unwrapToken","addressMap","wrappedAddress","lowercase","toLocaleLowerCase","aaveChain","undefined","aaveWrappedMap","getEthValue","filter","Debouncer","fn","wait","limit","requestSets","promisedCalls","promisedCount","debounceCancel","fetch","attr","_b","Set","size","execute","promise","timeout","resolve","reject","Promise","rej","makePromise","clearTimeout","call","requestAttrs","then","results","catch","response","data","setTimeout","bind","valueWithTrimmedDecimals","RegExp","result","match","parsedValue","_parseFixed","_formatFixed","parseToBigInt18","formatFromBigInt18","bn","bpsPerOne","mulSlippage","slippage","subSlippage","delta","addSlippage","isSameAddress","address1","address2","insert","arr","newItem","removeItem","newArray","reorderArrays","reference","original","some","indexesOfOriginal","othersResorted","indexOfOriginal","arrIndex","isLinearish","poolType","supportedPoolTypes","truncateAddresses","t","findEventInReceiptLogs","receipt","to","contractInterface","logName","event","logs","parseLog","getInstance","parsedLog","getRandomBytes32","Math","random","BalancerAPIArgsFormatter","format","SubgraphArgsFormatter","operatorMap","gt","lt","in","not_in","contains","whereQuery","where","operator","GraphQLArgsBuilder","merge","other","mergedArgs","mergeWith","objValue","srcValue","isArray","formatter","_abi","inputs","components","internalType","stateMutability","anonymous","indexed","outputs","AaveLinearPool__factory","utils","signerOrProvider","Contract","abi","AaveLinearPoolFactory__factory","AaveWrapping__factory","Authoriser__factory","BalancerHelpers__factory","BalancerMinter__factory","BalancerPoolDataQueries__factory","BalancerRelayer__factory","BatchRelayerLibrary__factory","ComposableStablePool__factory","ComposableStablePoolFactory__factory","ConvergentCurvePool__factory","constant","payable","ERC20__factory","ERC4626LinearPool__factory","ERC4626LinearPoolFactory__factory","EulerLinearPool__factory","EulerLinearPoolFactory__factory","FXPool__factory","GaugeClaimHelper__factory","GearboxLinearPool__factory","GearboxLinearPoolFactory__factory","GyroConfig__factory","LidoRelayer__factory","LinearPool__factory","LiquidityGaugeV5__factory","Multicall__factory","Multicall3__factory","StablePool__factory","StaticATokenRateProvider__factory","Vault__factory","WeightedPool__factory","WeightedPoolFactory__factory","YearnLinearPool__factory","YearnLinearPoolFactory__factory","GyroEV2__factory","VeBal__factory","VeDelegationProxy__factory","SwapType","getLimitsForSlippage","tokensIn","tokensOut","swapType","deltas","assets","limits","tokenIn","slippageAmount","WeiPerEther","SwapExactOut","tokenOut","SwapExactIn","balancerVault","BALANCER_NETWORK_CONFIG","contracts","poolDataQueries","lidoRelayer","veBal","gaugeControllerCheckpointer","veBalProxy","gyroConfigProxy","addressesByNetwork","bal","weth","bbaUsd","bb_a_usd","lbpRaisingTokens","stETH","wstETH","urls","subgraph","gaugesSubgraph","blockNumberSubgraph","thirdParty","coingecko","nativeAssetId","platformId","pools","wETHwstETH","id","poolsToIgnore","sorConnectingTokens","symbol","sorTriPathMidPoolIds","gaugeClaimHelper","erc4626LinearPoolFactory","aaveLinearPoolFactory","OPTIMISM","averageBlockTime","FANTOM","vault","balancerRelayer","balancerHelpers","weightedPoolFactory","composableStablePoolFactory","yearnLinearPoolFactory","SEPOLIA","ZKEVM","balancerMinter","multicallBatchSize","AVALANCHE","BASE","networkAddresses","BalancerErrorCode","BalancerError","super","getMessage","ABOVE_MAX_TOKENS","BELOW_MIN_TOKENS","EXIT_DELTA_AMOUNTS","FEE_PROVIDER_NOT_PROVIDED","GAUGES_HELPER_ADDRESS_NOT_PROVIDED","GAUGES_NOT_FOUND","GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED","GAUGES_REWARD_TOKEN_EMPTY","INPUT_LENGTH_MISMATCH","INPUT_OUT_OF_BOUNDS","INPUT_TOKEN_INVALID","INVALID_PROTOCOL_ID","INVALID_SWAP_FEE_PERCENTAGE","INVALID_WEIGHTS","JOIN_DELTA_AMOUNTS","JOIN_WITH_ZERO_AMOUNT","MISSING_AMP","MISSING_DECIMALS","MISSING_PRICE_RATE","MISSING_TOKENS","MISSING_WEIGHT","NO_POOL_DATA","NO_VALUE_PARAMETER","POOL_DOESNT_EXIST","RELAY_SWAP_AMOUNTS","REWARD_TOKEN_ZERO","TIMESTAMP_IN_THE_FUTURE","TOKEN_MISMATCH","UNSUPPORTED_PAIR","UNSUPPORTED_POOL_TYPE","calcPriceImpact","bptAmount","bptZeroPriceImpact","isJoin","pi","calcPriceImpactJoin","calcPriceImpactExit","bptSpotPrice","balances","bptSupply","tokenIndexIn","totalCoins","D","numTokens","prevInvariant","ampTimesTotal","P_D","j","_calculateInvariant","S","D_P","alpha","beta","gamma","partial_x","minus_partial_D","divUpFixed","StablePoolPriceImpact","tokenAmounts","StablePoolExit","buildExitExactBPTIn","exiter","bptIn","shouldUnwrapNativeAsset","singleTokenOut","toInternalBalance","checkInputsExactBPTIn","sortedValues","sortValuesExitExactBptIn","minAmountsOut","expectedAmountsOut","singleTokenOutIndex","calcTokenOutGivenExactBptIn","calcTokensOutGivenExactBptIn","userData","encodedData","encodeExitPool","priceImpact","buildExitExactTokensOut","checkInputsExactTokensOut","sortValuesExitExactTokensOut","expectedBPTIn","maxBPTIn","calcBptInGivenExactTokensOut","downScaledAmountsOut","buildRecoveryExit","isNegative","tokensList","parsedPoolInfo","upScaledAmountsOut","amountOut","SOR","StableMathBigInt","_calcTokenOutGivenExactBptIn","downscaledAmountOut","amountsOutScaledDown","_calcTokensOutGivenExactBptIn","_calcBptInGivenExactTokensOut","functionName","attributes","recipient","exitPoolRequest","createInterface","StablePoolJoin","buildJoin","joiner","checkInputs","sortValues","expectedBPTOut","minBPTOut","calcBptOutGivenExactTokensIn","encodeJoinPool","sortedAmountsIn","upScaledAmountsIn","_calcBptOutGivenExactTokensIn","joinPoolRequest","maxAmountsIn","fromInternalBalance","StablePoolLiquidity","calcTotal","sumBalance","sumValue","usd","avgPrice","SCALING_FACTOR","StablePoolSpotPrice","calcPoolSpotPrice","stablePool","StablePool","fromPool","poolPairData","parsePoolPairData","_spotPriceAfterSwapExactTokenInForTokenOut","ZERO","exit","liquidity","spotPriceCalculator","priceImpactCalculator","PhantomStablePoolSpotPrice","metaStablePool","PhantomStablePool","ComposableStablePoolJoin","sortValuesBasedOnPoolVersion","buildExactTokensInForBPTOut","sortV1","encodeUserDataExactTokensInForBPTOut","assetsWithBpt","encodedUserData","maxAmountsInWithBpt","sortV4","ComposableStablePoolExit","singleTokenOutIndexWithoutBpt","minAmountsOutWithBpt","downscaledAmountsOutWithoutBpt","downscaledAmountsOutWithBpt","checkInputsRecoveryExit","lte","poolTypeVersion","isInRecoveryMode","parsedValues","downscaledAmountsOutWithBptWithRounding","isZero","upScaledAmountsOutWithoutBpt","ComposableStable","WeightedPoolPriceImpact","WeightedPoolExit","WeightedMaths","WeightedPoolJoin","WeightedPoolLiquidity","sumWeight","toFixed","WeightedPoolSpotPrice","isBPTAsToken","bptAsToken","weightedPool","WeightedPool","spotPrice","pop","Weighted","MetaStablePoolLiquidity","MetaStablePoolSpotPrice","MetaStablePool","MetaStable","StablePhantomPoolExit","StablePhantomPoolJoin","StablePhantom","LinearPriceImpact","LinearPoolExit","LinearMaths","LinearPoolJoin","LinearPoolLiquidity","LinearPoolSpotPrice","linearPool","LinearPool","Linear","FXExitConcern","FXLiquidityConcern","FXSpotPriceConcern","FXPriceImpactConcern","FXJoinConcern","FX","GyroExitConcern","GyroLiquidityConcern","GyroSpotPriceConcern","GyroPriceImpactConcern","GyroJoinConcern","Gyro","PoolTypeConcerns","config","weighted","stable","composableStable","metaStable","stablePhantom","linear","Liquidity","parsedTokens","subPoolLiquidity","all","findBy","getLiquidity","totalBPT","bptInParentPool","liquidityInParentPool","totalSubPoolLiquidity","totalLiquidity","subPool","nonPoolTokens","nonPoolTokensWithUpdatedPrice","tokenPrice","latestUSDPrice","parsedTokenLiquidity","filterTokens","obj","populateGauges","gauges","claimableRewards","claimableTokens","gauge","rewards","populateGauge","it","reduceRewardTokens","rewardTokens","liquidityGaugeV5Interface","balancerMinterInterface","gaugeClaimHelperInterface","ClaimService","liquidityGauges","feeDistributor","gaugeClaimHelperAddress","balancerMinterAddress","getGauges","gaugeAddresses","getRewardTokens","retrieveClaimableTokens","retrieveClaimableRewards","getClaimableRewardTokens","flatMap","expectedValues","tokenAddress","every","expectedTokensValue","getClaimableBalances","tokenBalance","claimBalances","paths","getPayload","res0x","path","reduceClaimableRewards","gaugeAddress","getArguments","balAddress","reduceClaimableTokens","queryBatchSwap","vaultContract","swaps","funds","err","__assign","assign","n","arguments","prototype","hasOwnProperty","docCache","Map","fragmentSourceMap","printFragmentWarnings","experimentalFragmentVariables","string","trim","processFragments","ast","seenKeys","definitions","fragmentDefinition","fragmentName","sourceKey","loc","source","body","substring","start","end","sourceKeySet","get","has","set","parseDocument","cacheKey","parsed","parse","allowLegacyFragmentVariables","doc","workSet","node","startToken","endToken","stripLoc","gql","literals","_i","arg","gql_1","extras","clear","resetCaches","disableFragmentWarnings","enableExperimentalFragmentVariables","disableExperimentalFragmentVariables","AmpUpdate_OrderBy","BalancerSnapshot_OrderBy","Balancer_OrderBy","CircuitBreaker_OrderBy","GradualWeightUpdate_OrderBy","InvestType","JoinExit_OrderBy","LatestPrice_OrderBy","ManagementOperation_OrderBy","OperationType","OrderDirection","PoolContract_OrderBy","PoolHistoricalLiquidity_OrderBy","PoolShare_OrderBy","PoolSnapshot_OrderBy","PoolToken_OrderBy","Pool_OrderBy","PriceRateProvider_OrderBy","ProtocolIdData_OrderBy","SwapFeeUpdate_OrderBy","Swap_OrderBy","TokenPrice_OrderBy","TokenSnapshot_OrderBy","Token_OrderBy","TradePairSnapshot_OrderBy","TradePair_OrderBy","UserInternalBalance_OrderBy","User_OrderBy","_SubgraphErrorPolicy_","gql$1","SubgraphPoolShareFragmentDoc","SubgraphPoolFragmentDoc","SubgraphPoolSnapshotFragmentDoc","SubgraphJoinExitFragmentDoc","SubgraphBalancerFragmentDoc","SubgraphTokenPriceFragmentDoc","SubgraphTokenLatestPriceFragmentDoc","SubgraphUserFragmentDoc","PoolShareDocument","PoolSharesDocument","PoolsDocument","AllPoolsDocument","PoolDocument","PoolHistoricalLiquiditiesDocument","PoolSnapshotsDocument","JoinExitsDocument","BalancersDocument","TokenPricesDocument","TokenLatestPricesDocument","TokenLatestPriceDocument","UserDocument","UsersDocument","defaultWrapper","action","_operationName","_operationType","getSdk","client","withWrapper","PoolShare","variables","requestHeaders","wrappedRequestHeaders","request","PoolShares","Pools","AllPools","Pool","PoolHistoricalLiquidities","PoolSnapshots","JoinExits","Balancers","TokenPrices","TokenLatestPrices","TokenLatestPrice","User","Users","Chain","GaugeFactory_OrderBy","GaugeShare_OrderBy","GaugeType_OrderBy","GaugeVote_OrderBy","Gauge_OrderBy","LiquidityGauge_OrderBy","LockSnapshot_OrderBy","OmniVotingEscrowLock_OrderBy","RewardToken_OrderBy","RootGauge_OrderBy","SingleRecipientGauge_OrderBy","VotingEscrowLock_OrderBy","VotingEscrow_OrderBy","SubgraphGaugeShareFragmentDoc","SubgraphLiquidityGaugeFragmentDoc","SubgraphPoolWithPreferentialGaugeFragmentDoc","GaugeShareDocument","GaugeSharesDocument","LiquidityGaugesDocument","PoolGaugesDocument","createSubgraphClient","subgraphUrl","GraphQLClient","createGaugesClient","GaugeShare","GaugeShares","LiquidityGauges","PoolGauges","Gauges.getSdk","Multicaller3","options","calls","interface","connect","batchSize","executeMulticall","numBatches","ceil","batchPromises","batchIndex","batchRequests","allowFailure","aggregate3","offset","callIndex","success","returnData","decodeFunctionResult","e","weightedCalls","multicaller","linearCalls","stableCalls","gyroECalls","fetchOnChainPoolData","vaultAddress","getTotalSupplyFn","getSwapFeeFn","defaultCalls","do_nothing","poolTypeCalls","getOnChainBalances","subgraphPoolsOriginal","_multiAddress","poolsWithOnchainData","onchainData","idx","wrappedToken","wrappedIndex","wrappedTokenRate","lowerTarget","targets","upperTarget","tokenRates","rate","SubgraphPoolDataService","sorConfig","query","defaultArgs","orderBy","TotalLiquidity","orderDirection","Desc","swapEnabled","queryArgs","mapped","expiryTime","unitSeconds","principalToken","baseToken","mapPools","getSubgraphPools","findIndex","fetchOnChainBalances","onChainBalances","formattedQuery","first","pool0","pool1000","pool2000","SubgraphTokenPriceService","ethPerToken","getLatestPriceInEthFromSubgraph","latestPrices","asset_in","pricesKeyedOnId","keyBy","matchingLatestPrices","asset","pricingAssetPricedInEth","pricingAsset","getNetworkConfig","networkConfig","customSubgraphUrl","tenderly","POOLS_TO_IGNORE","ApiTokenPriceService","balancerApiUrl","tokenPriceQuery","chainKey","tokenGetCurrentPrices","tokenPriceUsd","nativeAssetPriceUsd","NativeAssetAddress","tokenPriceInNativeAsset","getCoingeckoApiBaseUrl","isDemoApi","getCoingeckoApiKeyHeaderName","CoingeckoTokenPriceService","urlBase","isDemoApiKey","coingeckoApiKeyHeaderName","apiKey","coingeckoApiKey","getTokenPriceInNativeAsset","endpoint","axios","headers","Accept","Sor","sdkConfig","getSorConfig","sorNetworkConfig","getSorNetworkConfig","JsonRpcProvider","rpcUrl","subgraphClient","getPoolDataService","getTokenPriceService","tokenPriceService","poolDataService","sor","connectingTokens","triPathMidPoolIds","allPoolsToIgnore","coingeckoConfig","checkSimpleFlashSwapParams","poolIds","createSwaps","assetInIndex","assetOutIndex","deltaToExpectedProfit","Number","calcProfit","profits","underlyingToWrappedMap","tokenForSwaps","wrapped","Relayers","relayerResolver","assetIn","assetOut","lido","swapFragment","relayer","f","amountForLimit","maxSlippage","min","decorateSorSwapInfo","swapInfo","amountIn","swapAmount","returnAmount","amountInForLimits","swapAmountForSwaps","returnAmountFromSwaps","amountOutForLimits","tokenInForSwaps","tokenOutFromSwaps","SingleSwapBuilder","setFunds","setDeadline","setLimits","singleSwap","attrs","fragment","outputReference","BatchSwapBuilder","minAmountOut","maxAmountIn","tokenAddresses","split","outputReferences","buildRouteDefaultOptions","maxPools","gasPrice","Swaps","sorOrConfig","l","getSwaps","SwapTypes","buildSwap","builder","opts","findRouteGivenIn","batchSwap","encodeBatchSwap","flashLoanAmount","walletAddress","convertSimpleFlashSwapToBatchSwapParameters","fetchPools","getPools","tokenAddress0","tokenAddress1","isProfitable","querySimpleFlashSwap","swapInput","swapTypeSOR","getSorSwapInfo","swap","assetDeltas","fromEntries","PoolKind","relayerLibrary","Relayer","maxAmount","relayerAdress","approved","authorisation","poolKind","staticToken","fromUnderlying","toUnderlying","linearPoolType","unwrapType","encodeUnwrapAaveStaticToken","isTemporary","CHAINED_REFERENCE_TEMP_PREFIX","CHAINED_REFERENCE_READONLY_PREFIX","paddedPrefix","repeat","ref","amountBn","mask","check","_hex","signRelayerApproval","relayerAddress","signerAddress","signer","MaxUint256","Subgraph","initClient","Pricing","poolsDict","parseToPoolsDict","routeProposer","getCandidatePathsFromDict","getSpotPriceAfterSwapForPath","Multicaller","isLessThan24Hours","incomingDateInSec","round","Date","now","VeBal","veBalAddress","formatLockInfo","lockInfo","lockedAmount","lockedEndDate","locked","hasExistingLock","lockedEndDateNormalised","toNumber","isExpired","totalSupply","epoch","VeBalProxy","adjustedBalanceOf","Contracts","networkOrAddresses","getLiquidityGauge","contractAddresses","eulerLinearPoolFactory","gearboxLinearPoolFactory","gyroConfig","instances","BasePool","getBasePool","ERC20","getErc20","liquidityGauge","ImpermanentLossService","tokenHistoricalPrices","timestamp","prepareData","poolValueDelta","getPoolValueDelta","holdValueDelta","getHoldValueDelta","calculateImpermanentLoss","floor","abs","priceDelta","entryTimestamp","getWeights","entryPrices","getEntryPrices","exitPrices","getExitPrices","getAssets","getDelta","entryPrice","exitPrice","ILLEGAL_PARAMETER","noWeights","uniformWeight","w","prices","tokensWithPrice","INITIAL_RATE","START_EPOCH_TIME","RATE_REDUCTION_TIME","RATE_REDUCTION_COEFFICIENT","weekly","currentTimestamp","getTime","miningEpoch","totalEmissions","startingEpoch","endingEpoch","currentEpoch","secondsInStartingEpoch","secondsInEndingEpoch","ProtocolRevenue","repository","multicallData","balPrice","lastWeekBalRevenue","balAmount","lastWeekBBAUsdRevenue","bbAUsdAmount","bbAUsdPrice","veBalSupply","PoolFees","yesterdaysPools","yesterdaysPool","totalSwapFee","createTime","PoolApr","tokenMeta","tokenYields","feeCollector","gyroConfigRepository","last24hFees","feesDailyBsp","protocolSwapFeePercentage","breakdown","bptFreeTokens","aprs","apr","tokenYield","isExemptFromYieldProtocolFee","protocolYieldFeeCache","subSwapFees","swapFees","subApr","tokenAprs","getWeight","poolToken","bptPrice","_c","_d","_e","weightedAprs","pickBy","zipObject","identity","boost","workingSupply","balInflationRate","bptPriceUsd","gaugeSupplyUsd","reward","balReward","rewardTokenApr","totalSupplyUsd","rewardValue","balPriceUsd","gaugeBalEmissionsUsd","emissions.weekly","relativeWeight","tAddress","rewardTokensBreakdown","rewardValueScaled","revenue","dailyRevenue","stakingApr","rewardAprs","protocolApr","minStakingApr","maxStakingApr","last24h","liquidityService","fee","getGyroProtocolFee","protocolSwapFeeCache","rewardData","period_finish","yearlyReward","meta","joinActions","Element","LiquidityBootstrapping","exitActions","PoolGraph","getGraphNodes","tokensToUnwrap","rootNode","buildGraphFromRootPool","orderByBfs","reverse","rootPool","buildGraphFromPool","getTokenTotal","nodeIndex","parent","proportionOfParent","parentPool","tokenIndex","leafTokenDecimals","createInputTokenNode","joinAction","exitAction","tokenTotal","spotPrices","sp","poolNode","isProportionalExit","children","marked","isLeaf","updateNodeIfProportionalExit","createLinearNodeChildren","proportion","tokenWeight","finalProportion","childNode","linearPoolNode","mainIndex","wrappedNodeInfo","createWrappedTokenNode","mainTokenDecimals","nodeInfo","wrappedTokenNode","unwrappedBalance","inputNode","root","nodes","orderedNodes","currentNode","shift","WeightedPoolDecoder","decode","JoinModel","relayerModel","joinKind","decodeJoinData","allTokensInForExactBPTOut","amountsInWithRef","doChainedRefReplacements","SubgraphType","bptAsPoolToken","bptBalanceEVM","updateTokenBalanceForPool","tokensWithoutBpt","balanceEvm","bptAmountOutWithRef","tokenInIndex","doChainedRefReplacement","pairData","bptAmountOutHuman","amountInHuman","_tokenInForExactTokenOut","bnum","dp","decimalsIn","amountInEvm","balanceIn","balanceOut","bptOut","isChainedReference","setChainedReferenceValue","ExitModel","exitKind","decodeExitData","exactBptInForTokensOut","bptInWithRef","exactBptInForOneTokenOut","amountOutHuman","_exactTokenInForTokenOut","decimalsOut","amountOutEvm","poolBalances","pt","getBalancesForTokens","tokenOutIndex","SwapModel","swapRequest","doSwap","batchSwapRequest","previousAmount","getChainedReferenceValue","isExactIn","UnwrapModel","unwrapRequest","underlyingToken","PoolModel","joinModel","exitModel","swapModel","unwrapModel","doJoinPool","doExitPool","doBatchSwap","doSingleSwap","doUnwrap","RelayerModel","chainedRefs","PoolsSource","poolsArray","dataSource","refresh","list","cloneDeep","BptAsToken","parseNewPool","subgraphPool","ComposableStablePool","ActionType","VaultModel","poolsSource","updateDeltas","rawCalls","poolModel","poolsDictionary","actionType","Join","doJoin","Exit","doExit","Unwrap","balancerRelayerInterface","debugLog","poolGraph","simulationService","createCalls","joinPaths","isNativeAssetJoin","multiRequests","encodedCalls","outputIndexes","createActionCalls","unshift","createSetRelayerApproval","encodedCall","amountsOutByJoinPath","simulationType","simulateGeneralisedJoin","totalAmountOut","minAmountsOutByJoinPath","totalMinAmountOut","isSimulation","joinPath","isLeafJoin","modelRequests","shouldBeConsidered","isLastChainedCall","hasSiblingInput","minOut","modelRequest","createSwap","minBptOut","createJoinPool","outputRef","encodedPeekCall","encodePeekChainedReferenceValue","toChainedReference","encodeSetRelayerApproval","joinPathIndex","expectedOut","getOutputRefValue","replaceWrappedNativeAsset","allImmediateChildrenSendToInternal","allSiblingsSendToInternal","encodeSwap","mapSwapRequest","userTokenIn","userBptOut","inputTokens","inputAmts","child","sortedTokens","sortedAmounts","userDataAmounts","formatJoinPoolInput","mapJoinPoolRequest","userAmountsTokenIn","userAmountOut","hasChildInput","isRef","sendsToInternalBalance","siblings","wrappedNativeAssetIndex","nativeAssetIndex","tokensInWithoutNativeAsset","getJoinPaths","totalBptZeroPi","totalBptZeroPriceImpact","queryData","assertDeltas","poolAddress","inputNodes","nonLeafInputNodes","nonLeafInputNode","nonLeafAmountIn","totalProportions","proportionalNonLeafAmountIn","inputTokenNode","nonLeafJoinPath","currentChild","parentCopy","updateInputAmounts","ajdustAmountInDiff","tokenInInputNodes","amountsInSumforTokenIn","diff","leafJoinPath","updateTotalProportions","updateNodeAmount","nonLeafJoinPaths","leafNode","bptOutZeroPiForInputNode","spProduct","parentNode","childAddress","spPriceScaled","inputAmountScaled","totalProportion","inputAmount","TenderlyHelper","tenderlyConfig","simulateMulticall","encodedStateOverrides","encodeBalanceAndAllowanceOverrides","encodeRelayerApprovalOverride","simulateTransaction","state_objects","storage","toHexString","network_id","block_number","blockNumber","input","save_if_fails","simulation_type","SIMULATE_URL","tenderlyUrl","post","transaction","transaction_info","call_trace","output","stateOverrides","requestStateOverrides","tokensWithoutNativeAsset","MaxInt256","k","ENCODE_STATES_URL","networkID","project","accessKey","SimulationType","Simulation","Tenderly","tenderlyHelper","simulationResult","decodeResult","requestResult","simulateRequests","Static","staticResult","decodedResponse","Buffer","simulateGeneralisedExit","multicallResult","outputIndex","vaultModel","requests","tokenOutDeltas","amountsOutByExitPath","amountsOutByTokenOut","tokensOutByExitPath","expectedAmountsOutByExitPath","expectedAmountsOutMap","expectedAmountsOutByTokenOut","minAmountsOutByExitPath","expectedAmountOut","minAmountsOutByTokenOut","getExitPaths","outputNodes","exitPaths","outputNode","exitPath","amountsInSum","accumulator","currentExitPath","amountInForCurrentExitPath","amountsInDiff","createUnwrap","exitChild","exitPathIndex","getOutputRef","encodeUnwrap","mapUnwrapRequest","receivesFromInternal","amountBptIn","getExit","estimatedAmountsOut","isProportional","isProportionalPools","tokensWithInsufficientBalance","calculatePriceImpact","orderedNodesForJoin","isPeek","getRecipientAddress","getSenderAddress","isLastActionWithLimits","minAmountsOutProportional","outputChildIndex","createExitPoolProportional","createExitPool","isRootNode","createBatchSwap","exitChildren","batchSwapSteps","swapStep","acc","dust","mapBatchSwapRequest","userDataTokens","formatExitPoolInput","mapExitPoolRequest","userAmountTokensOut","userBptIn","allChildrenReceiveFromInternal","deltaBptIn","deltaTokensOut","deltaAmountsOut","PoolVolume","totalSwapVolume","ComposableStableFactory","checkCreateInputs","tokenRateCacheDurations","exemptFromYieldProtocolFeeFlags","rateProviders","parseCreateParamsForEncoding","amplificationParameter","salt","sortedRateProviders","sortedTokenRateCacheDurations","sortedExemptFromYieldProtocols","encodeCreateFunctionData","checkInitJoinInputs","parseParamsForInitJoin","tokensWithBpt","amountsWithBpt","maxAmountsWithBpt","asUintN","sortedMaxAmounts","encodeInitJoinFunctionData","getPoolAddressAndIdWithReceipt","composableStablePoolInterface","getPoolInterface","getPoolId","create","encodedFunctionData","buildInitJoin","WeightedFactory","sortedNormalizedWeights","cur","weightedPoolInterface","ProtocolId","LinearFactory","getPoolFactoryInterface","AaveLinear","ERC4626Linear","EulerLinear","GearboxLinear","YearnLinear","protocolId","getFactoryAddress","mainToken","upperTargetEvm","linearPoolInterface","PoolFactory__factory","balancerContracts","of","ParamsBuilder","encoder","Gyro2","Gyro3","getEncoder","buildQueryJoinExactIn","maxAmountsInByToken","maxInWithoutBpt","buildQueryJoinExactOut","buildQueryExitToSingleToken","buildQueryExitProportionally","buildQueryExitExactOut","maxBptIn","minAmountsOutWithoutBpt","EmissionsService","liquidityGaugesRepository","proportionalAmounts","referenceTokenIndex","notImplemented","repositories","aprService","poolsForSimulations","graphService","poolsOnChain","joinService","exitService","feesService","volumeService","poolFactory","impermanentLossService","emissionsService","concerns","queries","methods","calcSpotPrice","calcProportionalAmounts","Queries.ParamsBuilder","calcImpLoss","getBptPrice","joinPool","buildExitCall","getExitInfo","wrap","param","UnicodeNormalizationForm","Utf8ErrorReason","ignoreFunc","bytes","badCodepoint","BAD_PREFIX","UNEXPECTED_CONTINUE","o","OVERRUN","toUtf8Bytes","str","charCodeAt","c2","pair","arrayify","formatBytes32String","text","hexlify","HashZero","freeze","ignore","OVERLONG","INPUT_ERROR","WINDOW","window","JS_SHA3_NO_WINDOW","WEB_WORKER","self","JS_SHA3_NO_NODE_JS","versions","global","COMMON_JS","JS_SHA3_NO_COMMON_JS","module","exports","ARRAY_BUFFER","JS_SHA3_NO_ARRAY_BUFFER","ArrayBuffer","HEX_CHARS","CSHAKE_PADDING","SHIFT","RC","BITS","SHAKE_BITS","OUTPUT_TYPES","CSHAKE_BYTEPAD","JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW","isView","buffer","createOutputMethod","bits","padding","outputType","Keccak","update","createShakeOutputMethod","outputBits","createCshakeOutputMethod","createKmacOutputMethod","createOutputMethods","method","createMethod","algorithms","bytepad","Kmac","methodNames","algorithm","methodName","newMethodName","blocks","reset","finalized","block","blockCount","byteCount","outputBlocks","extraBytes","notString","lastByteIndex","right","encodeString","strs","paddingBytes","zeros","finalize","arrayBuffer","Uint32Array","digest","h","c0","c1","c3","c4","c5","c6","c7","c8","c9","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","b10","b11","b12","b13","b14","b15","b16","b17","b18","b19","b20","b21","b22","b23","b24","b25","b26","b27","b28","b29","b30","b31","b32","b33","b34","b35","b36","b37","b38","b39","b40","b41","b42","b43","b44","b45","b46","b47","b48","b49","regexBytes","regexNumber","regexArray","_pack","zeroPad","toTwos","byteLength","baseType","pack","tight","keccak256","sha3","keccak_256","protocolFeePercKey","gyroPoolTypeKey","encodedPoolTypeKey","GyroConfigRepositoryImpl","gyroConfigAddress","gyroConfigInterface","encodedPoolSpecificKey","hasSpecificKeyHex","hasPoolTypeKeyHex","hasDefaultKeyHex","hasSpecificKey","hasPoolTypeKey","hasDefaultKey","getUint","gaugeControllerInterface","gaugeControllerCheckpointerInterface","GaugeControllerMulticallRepository","gaugeControllerAddress","gaugeControllerCheckpointerAddress","AbstractSubgraphRepository","attribute","skip","BalancerSubgraphRepository","blockHeight","GaugesSubgraphRepository","GaugeSharesRepository","desc","number","gaugeShares","mapType","subgraphGaugeShare","isKilled","findAllBy","UserAddress","gaugeId","GaugeId","childLiquidityGaugeInterface","LiquidityGaugesMulticallRepository","currentWeek","rewardCounts","passingRewardCounts","getRewardCounts","gaugesWithRewards","startIndexes","gaugeIndex","flat","passingRewardTokens","decoded","LiquidityGaugesSubgraphRepository","qauges","preferentialGauge_not","preferentialGauge","LiquidityGaugeSubgraphRPCProvider","workingSupplies","relativeWeights","inflationRates","gaugeController","g","getWorkingSupplies","oldFactories","childGaugeAddresses","factory","getInflationRates","getRelativeWeights","distributor","last_update","integral","periodFinish","compose","subgraphGauge","BalancerAPIClient","toPayload","jsonToGraphQLQuery","ms","PoolsBalancerAPIRepository","hasFetched","isFetching","fetchFromCache","fetchAll","awaitEnoughPoolsFetched","nextToken","formattedArgs","__args","apiResponseData","totalChecks","rewardsBreakdown","tokenAprsBreakdown","PoolsFallbackRepository","providers","currentProviderIdx","fallbackQuery","currentProvider","func","race","PoolsStaticRepository","mapToken","priceRateProviders","_f","_g","_h","_j","_k","isPaused","_l","subgraphToken","subPoolInfo","mapSubPools","metadata","mapSubPoolToken","PoolsSubgraphRepository","fetchAllPools","PoolsSubgraphOnChainRepository","poolsSubgraph","filterPools","filteredPools","onchainPools","forceRefresh","fetchDefault","onchainPool","PoolGaugesRepository","PoolJoinExitAttributes","PoolJoinExitRepository","Timestamp","Asc","joinExits","item","Sender","PoolSharesRepository","Balance","poolShares","subgraphPoolShare","PoolId","StaticTokenProvider","StaticTokenPriceProvider","lowercaseAddress","CoingeckoPriceRepository","baseTokenAddresses","platform","urlNative","debouncer","tokensPerPriceRequest","signal","isAxiosError","status","fetchNative","Assets","assetId","MATIC","XDAI","finally","inputAddress","baseAddress","nativePrice","CoingeckoHistoricalPriceRepository","urlRange","statusText","range","SubgraphPriceRepository","TokenPriceProvider","coingeckoRepository","subgraphRepository","aaveRates","getRate","HistoricalPriceProvider","FeeDistributorAbi","feeDistributorInterface","veBalInterface","FeeDistributorRepository","feeDistributorAddress","bbAUsdAddress","FeeDistributor","previousWeek","getPreviousWeek","fromTimestamp","midnight","setUTCHours","setUTCMinutes","setUTCSeconds","setUTCMilliseconds","daysSinceThursday","getUTCDay","weeksToGoBack","claimTokens","extractTokenBalance","vaultInterface","protocolFeesCollectorInterface","swapFeePercentagePromise","FeeCollectorRepository","getProtocolFeesCollector","collector","fees","getSwapFeePercentage","swapFeePercentage","iProtocolFeePercentagesProvider","feesPromise","ProtocolFeesProvider","protocolFeePercentagesProviderAddress","yieldFee","protocolFees","TokenYieldsRepository","lc","yields","fetchBlockByTime","BlockNumberRepository","dayAgo","Data","subgraphQuery","poolJoinExits","poolGauges","blockNumbers","blockDayAgo","getBlockNumber","initialCoingeckoList","subgraphPriceRepository","coingeckoHistoricalRepository","protocolFeePercentagesProvider","poolType2PoolKind","LEGACY_STABLE","COMPOSABLE_STABLE","COMPOSABLE_STABLE_V2","WEIGHTED","setRelayerApproval","gaugeWithdrawal","encodeGaugeWithdraw","gaugeDeposit","encodeGaugeDeposit","peekChainedReferenceValue","buildPath","buildLinearPath","buildMigrationPool","findTokens","nestedTokens","migrationBuilder","peek","fromGauge","toGauge","fromTokens","toTokens","exitOutputReferences","swapOutputReferences","joinAmount","migrationSteps","needsSwap","actions.setRelayerApproval","actions.gaugeWithdrawal","isComposable","actions.exit","swapPaths","getMainToken","mainFromTokens","mainToTokens","exitSwaps","fromIdx","toIdx","toPool","buildPaths","batchSwaps","actions.swaps","references","actions.join","actions.peekChainedReferenceValue","actions.gaugeDeposit","Migrations","poolsRepository","gaugesRepository","getExpectedBptOut","steps","relayerReturnValue","expectedBptOut","BalancerSDK","pricing","claimService","migrationService","ActionStep","BaseAction","mainTokenInIndex","mainTokenOutIndex","swapAssetInIndex","swapAssetOutIndex","swapReturn","opRefKey","actionStep","getActionStep","getActionAmount","hasTokenIn","actionHasTokenIn","hasTokenOut","actionHasTokenOut","getActionMinOut","opRef","nextOpRefKey","getActionOutputRef","opRefStart","getSender","receiver","getReceiver","TokenOut","Middle","TokenIn","tokenInIndexAction","tokenOutIndexAction","Direct","getFromInternal","isBptIn","getToInternal","isBptOut","getPoolKind","exitToken","bptAmtIn","exitPoolInput","encoded","getAmountIn","getAmountOut","fromInternal","joinToken","joinTokenIndex","approveTokens","isBpt","toInternal","getLimits","updateLimits","newSwap","isChainedSwap","canAddSwap","encodeApproveVault","batchSwapInput","encodedBatchSwap","copy","addSwap","orderActions","actions","categorizedActions","enterActions","middleActions","categorizeActions","allActions","orderedActions","batchedSwaps","batchSwapActions","canUseJoinExit","isExit","someJoinExit","hasJoinExit","buildRelayerCalls","newJoin","newExit","getActions","totalIn","totalOut","diffOut","checkAmounts"],"mappings":"66CAIA,IAAKA,GCDOC,GAMAC,GAKAC,GCXAC,GAOAC,IFNZ,SAAKL,GACHA,EAAAA,EAAA,cAAA,KAAA,eACD,CAFD,CAAKA,KAAAA,GAEJ,CAAA,UAEYM,IAMJA,GAAgBC,iBAAIC,GACzBC,EAAgBC,OACd,CAAC,UAAW,WACZ,CAACV,GAAiBW,cAAeH,ICdvC,SAAYP,GACVA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,4BAAA,GAAA,8BACAA,EAAAA,EAAA,2BAAA,GAAA,4BACD,CAJD,CAAYA,KAAAA,GAIX,CAAA,IAED,SAAYC,GACVA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,sBAAA,GAAA,uBACD,CAHD,CAAYA,KAAAA,GAGX,CAAA,IAED,SAAYC,GACVA,EAAAA,EAAA,+BAAA,GAAA,iCACAA,EAAAA,EAAA,4BAAA,GAAA,8BACAA,EAAAA,EAAA,4BAAA,GAAA,6BACD,CAJD,CAAYA,KAAAA,GAIX,CAAA,UAEYS,GAIXC,cAEC,EAMMD,GAAQE,SAAIC,GACjBN,EAAgBC,OACd,CAAC,UAAW,aACZ,CAACT,GAAmBe,KAAMD,IAMvBH,GAAAK,wBAA0B,IAC/BR,EAAgBC,OACd,CAAC,WACD,CAACR,GAA0BgB,wBAQxBN,GAAAO,2BAA6B,CAClCJ,EACAK,IAEAX,EAAgBC,OACd,CAAC,UAAW,YA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EAETxB,WAAY,CACVC,QAAS,GACTC,QAAS,GACTC,eAAgB,GAElBC,cAAe,6CACfC,YAAa,6CACbC,YAAa,CACXC,SAAU,IAEZC,UAAW,CAAC,IACZC,kBAAmB,CACjB,UACA,aACA,SACA,gBACA,QACA,QACA,QACA,MAEFC,OAAQ,CACNC,UAAW,CACT,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,uEAGJC,WAAY,CACVD,UAAW,CACT,qEACA,qEACA,uEAGJE,UAAW,CACT,6CAA8C,qBAC9C,6CAA8C,eAC9C,6CAA8C,aAC9C,6CAA8C,aAC9C,6CAA8C,6BAC9C,6CAA8C,6BAC9C,6CAA8C,cAC9C,6CAA8C,cAC9C,6CAA8C,aAC9C,6CAA8C,uBAC9C,6CAA8C,gBAEhDC,SAAU,CACRH,UAAW,CACT,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,uEAGJI,SAAU,CACR,qEAAsE,CACpEC,KAAM,4BACNC,SAAS,GAEX,qEAAsE,CACpED,KAAM,4BACNC,SAAS,GAEX,qEAAsE,CACpED,KAAM,sBACNC,SAAS,GAEX,qEAAsE,CACpED,KAAM,sBACNC,SAAS,KAkTb,CAACtB,GAAQ+B,SA7SkB,CAC3B3B,OAAQ,CACN4B,OAAQ,CACNL,GAAI,qEACJC,GAAI,sEAENK,QAAS,CACPN,GAAI,qEACJC,GAAI,sEAENM,KAAM,CACJA,KAAM,qEACNC,UACE,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IAAO,UACP,IAAO,UACP,IAAO,aACP,IAAO,oBACP,IAAO,eACP,IAAO,gBACP,IAAO,2BACP,IAAO,2BACP,IAAO,8BACP,IAAO,gBACP,IAAO,sBACP,IAAO,iBACP,IAAO,+BACP,IAAO,yBACP,IAAO,uBACP,IAAO,uBACP,IAAO,kBACP,IAAO,yBACP,IAAO,qBACP,IAAO,oBACP,IAAO,wBACP,IAAO,kCACP,IAAO,oCACP,IAAO,uBACP,IAAO,+BACP,IAAO,gCACP,IAAO,6BACP,IAAO,iBACP,IAAO,0BACP,IAAO,sBACP,IAAO,8CACP,IAAO,yBACP,IAAO,kCACP,IAAO,wBACP,IAAO,2BACP,IAAO,sBACP,IAAO,uBACP,IAAO,oBACP,IAAO,qCACP,IAAO,4BACP,IAAO,4BACP,IAAO,oCACP,IAAO,yBACP,IAAO,0BACP,IAAO,yBACP,IAAO,gCACP,IAAO,aACP,IAAO,qBACP,IAAO,SACP,IAAO,uBACP,IAAO,4BACP,IAAO,6BACP,IAAO,uBACP,IAAO,yBACP,IAAO,mCACP,IAAO,iCACP,IAAO,6BACP,IAAO,+BACP,IAAO,kCACP,IAAO,gCACP,IAAO,mCACP,IAAO,uCACP,IAAO,iCACP,IAAO,+BACP,IAAO,yBACP,IAAO,+BACP,IAAO,4BACP,IAAO,kCACP,IAAO,yBACP,IAAO,0BACP,IAAO,8BACP,IAAO,wBACP,IAAO,sBACP,IAAO,oBACP,IAAO,yBACP,IAAO,uBACP,IAAO,wBACP,IAAO,aACP,IAAO,8BACP,IAAO,0BACP,IAAO,6BACP,IAAO,kBACP,IAAO,kBACP,IAAO,2BACP,IAAO,4BACP,IAAO,oBACP,IAAO,iBACP,IAAO,iBACP,IAAO,aACP,IAAO,gBACP,IAAO,yBACP,IAAO,+BACP,IAAO,+BACP,IAAO,4BACP,IAAO,gCACP,IAAO,+BACP,IAAO,4BACP,IAAO,mBACP,IAAO,kBACP,IAAO,eACP,IAAO,0BACP,IAAO,kBACP,IAAO,uBACP,IAA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WAAY,CACV,CACEC,aAAc,UACd9f,KAAM,SACN0H,KAAM,WAER,CACEoY,aAAc,UACd9f,KAAM,eACN0H,KAAM,WAER,CACEoY,aAAc,UACd9f,KAAM,gBACN0H,KAAM,WAER,CACEoY,aAAc,UACd9f,KAAM,SACN0H,KAAM,WAER,CACEoY,aAAc,QACd9f,KAAM,WACN0H,KAAM,UAGVoY,aAAc,gCACd9f,KAAM,QACN0H,KAAM,WAER,CACEoY,aAAc,oBACd9f,KAAM,SACN0H,KAAM,aAER,CACEmY,WAAY,CACV,CACEC,aAAc,UACd9f,KAAM,SACN0H,KAAM,WAER,CACEoY,aAAc,OACd9f,KAAM,sBACN0H,KAAM,QAER,CACEoY,aAAc,kBACd9f,KAAM,YACN0H,KAAM,WAER,CACEoY,aAAc,OACd9f,KAAM,oBACN0H,KAAM,SAGVoY,aAAc,+BACd9f,KAAM,QACN0H,KAAM,SAER,CACEoY,aAAc,WACd9f,KAAM,SACN0H,KAAM,YAER,CACEoY,aAAc,UACd9f,KAAM,WACN0H,KAAM,WAER,CACEoY,aAAc,UACd9f,KAAM,QACN0H,KAAM,WAER,CACEmY,WAAY,CACV,CACEC,aAAc,UACd9f,KAAM,QACN0H,KAAM,WAER,CACEoY,aAAc,UACd9f,KAAM,MACN0H,KAAM,YAGVoY,aAAc,wCACd9f,KAAM,mBACN0H,KAAM,YAGV1H,KAAM,YACNkgB,QAAS,GACTH,gBAAiB,UACjBrY,KAAM,YAER,CACEkY,OAAQ,CACN,CACEE,aAAc,UACd9f,KAAM,SACN0H,KAAM,WAER,CACEoY,aAAc,6BACd9f,KAAM,OACN0H,KAAM,SAER,CACEoY,aAAc,UACd9f,KAAM,SACN0H,KAAM,WAER,CACEoY,aAAc,kBACd9f,KAAM,YACN0H,KAAM,WAER,CACEmY,WAAY,CACV,CACEC,aAAc,oBACd9f,KAAM,SACN0H,KAAM,aAER,CACEoY,aAAc,YACd9f,KAAM,gBACN0H,KAAM,aAER,CACEoY,aAAc,QACd9f,KA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qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,4ECzUWC,GAcXruC,YAA6BgO,GAAAjG,KAAOiG,QAAPA,EAXrBjG,KAAcumC,eAAG,8BAEjBvmC,KAAewmC,gBAAG/M,CAAG;;;;;;;IAU3Bz5B,KAAKymC,SAAWzpC,GAAQiJ,EACzB,CACDjD,iCAAiC4yB,GAC/B,MAAQ8Q,sBAAuB9vB,SAAsBunB,EACnDn+B,KAAKumC,eACLvmC,KAAKwmC,gBACL,CACEC,SAAUzmC,KAAKymC,WAGbE,EACJ/vB,EACAzS,MACA,EAAG9H,aAAcA,EAAQkG,gBAAkBqzB,EAAarzB,gBAE1D,IAAKokC,EACH,MAAM,IAAI5qC,MAAM,oCAElB,MAAM6qC,EACJhwB,EACAzS,MACA,EAAG9H,aACDA,EAAQkG,gBACRskC,GAAmB7mC,KAAKymC,YAE5B,IAAKG,EACH,MAAM,IAAI7qC,MAAM,2CAElB,MAAM+qC,EACJH,EAAc9vB,MAAQ+vB,EAAoB/vB,MAC5C,OAAOhG,OAAOi2B,EACf,EAGH,IAAKD,GCrDW,SAAAE,GAAuB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GAAcD,GAAkB4B,mBAY9C,CA3DEiuD,CACEd,EAAerzE,KAAKiI,GAAMjM,EAAUC,KAAKgM,EAAE2pE,iBAC3CyB,EAAerzE,KAAKiI,GAAMjM,EAAUC,KAAKgM,EAAE4pE,kBAC3CroC,EACAjwB,GAOF,MAAO,CACL2B,GAAIozB,EACJ91B,KANegpC,GAAyBlsC,mBAAmB,YAAa,CACxE6qB,IAMA4gB,SAAU5gB,EACVhjB,SAEJ"} \ No newline at end of file diff --git a/package/dist/index.js b/package/dist/index.js new file mode 100644 index 000000000..eaddee670 --- /dev/null +++ b/package/dist/index.js @@ -0,0 +1,515 @@ +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@ethersproject/abi"),t=require("@ethersproject/constants"),a=require("@ethersproject/bignumber"),n=require("@ethersproject/address"),o=require("@ethersproject/bytes"),i=require("@ethersproject/abstract-signer"),s=require("lodash"),r=require("ethers"),p=require("@balancer-labs/sor"),l=require("@ethersproject/providers"),d=require("graphql-request"),u=require("graphql"),c=require("axios"),y=require("@ethersproject/contracts"),b=require("json-to-graphql-query");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function f(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var T,h,I,g,_,x,P=f(p),w=m(c);!function(e){e[e.RECOVERY_MODE=255]="RECOVERY_MODE"}(T||(T={}));class E{}E.recoveryModeExit=t=>e.defaultAbiCoder.encode(["uint256","uint256"],[T.RECOVERY_MODE,t]),exports.StablePoolJoinKind=void 0,(h=exports.StablePoolJoinKind||(exports.StablePoolJoinKind={}))[h.INIT=0]="INIT",h[h.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",h[h.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT",exports.StablePhantomPoolJoinKind=void 0,(I=exports.StablePhantomPoolJoinKind||(exports.StablePhantomPoolJoinKind={}))[I.INIT=0]="INIT",I[I.COLLECT_PROTOCOL_FEES=1]="COLLECT_PROTOCOL_FEES",exports.StablePoolExitKind=void 0,(g=exports.StablePoolExitKind||(exports.StablePoolExitKind={}))[g.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",g[g.EXACT_BPT_IN_FOR_TOKENS_OUT=1]="EXACT_BPT_IN_FOR_TOKENS_OUT",g[g.BPT_IN_FOR_EXACT_TOKENS_OUT=2]="BPT_IN_FOR_EXACT_TOKENS_OUT";class A{constructor(){}}A.joinInit=t=>e.defaultAbiCoder.encode(["uint256","uint256[]"],[exports.StablePoolJoinKind.INIT,t]),A.joinCollectProtocolFees=()=>e.defaultAbiCoder.encode(["uint256"],[exports.StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]),A.joinExactTokensInForBPTOut=(t,a)=>e.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[exports.StablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,t,a]),A.joinTokenInForExactBPTOut=(t,a)=>e.defaultAbiCoder.encode(["uint256","uint256","uint256"],[exports.StablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,t,a]),A.exitExactBPTInForOneTokenOut=(t,a)=>e.defaultAbiCoder.encode(["uint256","uint256","uint256"],[exports.StablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,t,a]),A.exitExactBPTInForTokensOut=t=>e.defaultAbiCoder.encode(["uint256","uint256"],[exports.StablePoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT,t]),A.exitBPTInForExactTokensOut=(t,a)=>e.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[exports.StablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,t,a]),exports.WeightedPoolJoinKind=void 0,(_=exports.WeightedPoolJoinKind||(exports.WeightedPoolJoinKind={}))[_.INIT=0]="INIT",_[_.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",_[_.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT",_[_.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT=3]="ALL_TOKENS_IN_FOR_EXACT_BPT_OUT",exports.WeightedPoolExitKind=void 0,(x=exports.WeightedPoolExitKind||(exports.WeightedPoolExitKind={}))[x.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",x[x.EXACT_BPT_IN_FOR_TOKENS_OUT=1]="EXACT_BPT_IN_FOR_TOKENS_OUT",x[x.BPT_IN_FOR_EXACT_TOKENS_OUT=2]="BPT_IN_FOR_EXACT_TOKENS_OUT",x[x.MANAGEMENT_FEE_TOKENS_OUT=3]="MANAGEMENT_FEE_TOKENS_OUT";class S{constructor(){}}S.joinInit=t=>e.defaultAbiCoder.encode(["uint256","uint256[]"],[exports.WeightedPoolJoinKind.INIT,t]),S.joinExactTokensInForBPTOut=(t,a)=>e.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[exports.WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,t,a]),S.joinTokenInForExactBPTOut=(t,a)=>e.defaultAbiCoder.encode(["uint256","uint256","uint256"],[exports.WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,t,a]),S.joinAllTokensInForExactBPTOut=t=>e.defaultAbiCoder.encode(["uint256","uint256"],[exports.WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT,t]),S.exitExactBPTInForOneTokenOut=(t,a)=>e.defaultAbiCoder.encode(["uint256","uint256","uint256"],[exports.WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,t,a]),S.exitExactBPTInForTokensOut=t=>e.defaultAbiCoder.encode(["uint256","uint256"],[exports.WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT,t]),S.exitBPTInForExactTokensOut=(t,a)=>e.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[exports.WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,t,a]);class v{constructor(){}}v.exitForManagementFees=()=>e.defaultAbiCoder.encode(["uint256"],[exports.WeightedPoolExitKind.MANAGEMENT_FEE_TOKENS_OUT]);var k,B;exports.ComposableStablePoolJoinKind=void 0,(k=exports.ComposableStablePoolJoinKind||(exports.ComposableStablePoolJoinKind={}))[k.INIT=0]="INIT",k[k.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",k[k.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT",exports.ComposableStablePoolExitKind=void 0,(B=exports.ComposableStablePoolExitKind||(exports.ComposableStablePoolExitKind={}))[B.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",B[B.BPT_IN_FOR_EXACT_TOKENS_OUT=1]="BPT_IN_FOR_EXACT_TOKENS_OUT",B[B.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT=2]="EXACT_BPT_IN_FOR_ALL_TOKENS_OUT";class C{constructor(){}}C.joinInit=t=>e.defaultAbiCoder.encode(["uint256","uint256[]"],[exports.ComposableStablePoolJoinKind.INIT,t]),C.joinCollectProtocolFees=()=>e.defaultAbiCoder.encode(["uint256"],[exports.StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]),C.joinExactTokensInForBPTOut=(t,a)=>e.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[exports.ComposableStablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,t,a]),C.joinTokenInForExactBPTOut=(t,a)=>e.defaultAbiCoder.encode(["uint256","uint256","uint256"],[exports.ComposableStablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,t,a]),C.exitExactBPTInForOneTokenOut=(t,a)=>e.defaultAbiCoder.encode(["uint256","uint256","uint256"],[exports.ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,t,a]),C.exitExactBPTInForAllTokensOut=t=>e.defaultAbiCoder.encode(["uint256","uint256"],[exports.ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT,t]),C.exitBPTInForExactTokensOut=(t,a)=>e.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[exports.ComposableStablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,t,a]);var O="production"===process.env.NODE_ENV,M="Invariant failed";function F(e,t){if(!e){if(O)throw new Error(M);var a="function"==typeof t?t():t,n=a?"".concat(M,": ").concat(a):M;throw new Error(n)}}const R=e=>(F(66===e.length,"Invalid poolId length"),e.slice(0,42)),N=e=>{F(66===e.length,"Invalid poolId length");const t=parseInt(e[45]);return F(t<3,"Invalid pool specialization"),t},L=e=>(F(66===e.length,"Invalid poolId length"),a.BigNumber.from(`0x${e.slice(46)}`));var D;exports.Network=void 0,(D=exports.Network||(exports.Network={}))[D.MAINNET=1]="MAINNET",D[D.GOERLI=5]="GOERLI",D[D["GÖRLI"]=5]="GÖRLI",D[D.OPTIMISM=10]="OPTIMISM",D[D.GNOSIS=100]="GNOSIS",D[D.POLYGON=137]="POLYGON",D[D.FANTOM=250]="FANTOM",D[D.BASE=8453]="BASE",D[D.ZKEVM=1101]="ZKEVM",D[D.ARBITRUM=42161]="ARBITRUM",D[D.AVALANCHE=43114]="AVALANCHE",D[D.SEPOLIA=11155111]="SEPOLIA";const U={IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012","0x9f19a375709baf0e8e35c2c5c65aca676c4c7191000200000000000000000022","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020","0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366"]},Investment:{AllowList:["0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af","0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a","0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2"]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0x67d27634e44793fe63c467035e31ea8635117cd4":"stablePool","0x7dfdef5f355096603419239ce743bfaf1120312b":"weightedPool","0xcf0a32bbef8f064969f21f7e02328fb577382018":"weightedPool","0x2433477a10fc5d31b9513c638f19ee85caed53fd":"stablePool","0xebfd5681977e38af65a7487dc70b8221d089ccad":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e":"liquidityBootstrappingPool","0x142b9666a0a3a30477b052962dda81547e7029ab":"liquidityBootstrappingPool","0x1802953277fd955f9a254b80aa0582f193cf1d77":"liquidityBootstrappingPool","0x48767f9f868a4a7b86a90736632f6e44c2df7fa9":"managedPool","0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193":"managedPool","0xacd615b3705b9c880e4e7293f1030b34e57b4c1c":"managedPool","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2":"boostedPool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"boostedPool","0xc128a9954e6c874ea3d62ce62b468ba073093f25":"boostedPool"},Stakable:{AllowList:[]},Metadata:{"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e":{name:"Balancer Stable USD",hasIcon:!0}}},V={[exports.Network.GOERLI]:{IdsMap:{staBAL:"0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062",bbAaveUSD:{v1:"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f",v2:"0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7"},veBAL:"0xf8a0623ab66f985effc1c69d05f1af4badb01b00000200000000000000000060"},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:["0x22d398c68030ef6b1c55321cca6e0cecc5c93b2f000200000000000000000678"],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX"],Stable:{AllowList:["0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f","0xb60e46d90f2de35f7062a27d3a98749414036d5d000200000000000000000061","0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062","0xc957b1acceb21707b782eb8eee2ed8e20088463d000200000000000000000076","0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7","0x14f93df8a4e37bfdb49d2cec4789df7a010603d700000000000000000000011d","0x00a62d31b6c776b6813543bc99ff265f7222dbe100000000000000000000011e","0x0c925fce89a22e36ebd9b3c6e0262234e853d2f600000000000000000000019c"]},Investment:{AllowList:[]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0x44afeb87c871d8fea9398a026dea2bd3a13f5769":"stablePool","0xa55f73e2281c60206ba43a3590db07b8955832be":"stablePool","0xb48cc42c45d262534e46d5965a9ac496f1b7a830":"liquidityBootstrappingPool","0xb0c726778c3ae4b3454d85557a48e8fa502bdd6a":"liquidityBootstrappingPool","0x41e9036ae350baedcc7107760a020dca3c0731ec":"boostedPool","0xb848f50141f3d4255b37ac288c25c109104f2158":"composableStablePool","0x94f68b54191f62f781fe8298a8a5fa3ed772d227":"weightedPool"},Stakable:{AllowList:["0x16faf9f73748013155b7bc116a3008b57332d1e600020000000000000000005b","0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f","0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062","0x67f8fcb9d3c463da05de1392efdbb2a87f8599ea000200000000000000000059"]},Metadata:{"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f":{name:"Balancer Boosted Aave USD",hasIcon:!1}}},[exports.Network.MAINNET]:{IdsMap:{staBAL:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063",bbAaveUSD:{v1:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe",v2:"0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d"},veBAL:"0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014"},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","Gyro2","Gyro3","GyroE","FX"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed","0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249","0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d","0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d","0xf93579002dbe8046c43fefe86ec78b1112247bb80000000000000000000002bc","0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351","0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d","0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b"]},Investment:{AllowList:["0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af","0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a","0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2"]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0x67d27634e44793fe63c467035e31ea8635117cd4":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e":"liquidityBootstrappingPool","0x48767f9f868a4a7b86a90736632f6e44c2df7fa9":"managedPool","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2":"boostedPool","0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c":"stablePool","0xf9ac7b9df2b3454e841110cce5550bd5ac6f875f":"composableStablePool","0xcc508a455f5b0073973107db6a878ddbdab957bc":"weightedPool"},Stakable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0x072f14b85add63488ddad88f855fda4a99d6ac9b000200000000000000000027","0x0b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a","0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000013","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x27c9f71cc31464b906e0006d4fcbc8900f48f15f00020000000000000000010f","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x350196326aeaa9b98f1903fb5e8fc2686f85318c000200000000000000000084","0x3e5fa9518ea95c3e533eb377c001702a9aacaa32000200000000000000000052","0x51735bdfbfe3fc13dea8dc6502e2e958989429610002000000000000000000a0","0x5d66fff62c17d841935b60df5f07f6cf79bd0f4700020000000000000000014c","0x5f7fa48d765053f8dd85e052843e12d23e3d7bc50002000000000000000000c0","0x702605f43471183158938c1a3e5f5a359d7b31ba00020000000000000000009f","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x7edde0cb05ed19e03a9a47cd5e53fc57fde1c80c0002000000000000000000c8","0x8f4205e1604133d1875a3e771ae7e4f2b086563900020000000000000000010e","0x90291319f1d4ea3ad4db0dd8fe9e12baf749e84500020000000000000000013c","0x96646936b91d6b9d7d0c47c496afbf3d6ec7b6f8000200000000000000000019","0x96ba9025311e2f47b840a1f68ed57a3df1ea8747000200000000000000000160","0xa02e4b3d18d4e6b8d18ac421fbc3dfff8933c40a00020000000000000000004b","0xa6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e","0xbaeec99c90e3420ec6c1e7a769d2a856d2898e4d00020000000000000000008a","0xbf96189eee9357a95c7719f4f5047f76bde804e5000200000000000000000087","0xe2469f47ab58cf9cf59f9822e3c5de4950a41c49000200000000000000000089","0xe99481dc77691d8e2456e5f3f61c1810adfc1503000200000000000000000018","0xec60a5fef79a92c741cb74fdd6bfc340c0279b01000200000000000000000015","0xedf085f65b4f6c155e13155502ef925c9a756003000200000000000000000123","0xefaa1604e82e1b3af8430b90192c1b9e8197e377000200000000000000000021","0xf4c0dd9b82da36c07605df83c8a416f11724d88b000200000000000000000026","0xf5aaf7ee8c39b651cebf5f1f50c10631e78e0ef9000200000000000000000069","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x92762b42a06dcdddc5b7362cfb01e631c4d44b40000200000000000000000182","0xde8c195aa41c11a0c4787372defbbddaa31306d2000200000000000000000181","0x17ddd9646a69c9445cd8a9f921d4cd93bf50d108000200000000000000000159","0xc45d42f801105e861e86658648e3678ad7aa70f900010000000000000000011e","0x2d344a84bac123660b021eebe4eb6f12ba25fe8600020000000000000000018a","0xb460daa847c45f1c4a41cb05bfb3b51c92e41b36000200000000000000000194","0x5122e01d819e58bb2e22528c0d68d310f0aa6fd7000200000000000000000163","0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed","0xe8cc7e765647625b95f59c15848379d10b9ab4af0002000000000000000001de","0x85370d9e3bb111391cc89f6de344e801760461830002000000000000000001ef","0xa7ff759dbef9f3efdd1d59beee44b966acafe214000200000000000000000180","0x3f7c10701b14197e2695dec6428a2ca4cf7fc3b800020000000000000000023c","0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d","0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d","0xcfca23ca9ca720b6e98e3eb9b6aa0ffc4a5c08b9000200000000000000000274","0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249","0x0578292cb20a443ba1cde459c985ce14ca2bdee5000100000000000000000269","0x8eb6c82c3081bbbd45dcac5afa631aac53478b7c000100000000000000000270","0x1b65fe4881800b91d4277ba738b567cbb200a60d0002000000000000000002cc","0x99a14324cfd525a34bbc93ac7e348929909d57fd00020000000000000000030e","0x9b532ab955417afd0d012eb9f7389457cd0ea712000000000000000000000338","0x48607651416a943bf5ac71c41be1420538e78f87000200000000000000000327","0x6a5ead5433a50472642cd268e584dafa5a394490000200000000000000000366","0x0fd5663d4893ae0d579d580584806aadd2dd0b8b000200000000000000000367","0x441b8a1980f2f2e43a9397099d15cc2fe6d3625000020000000000000000035f","0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351","0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d"]},Metadata:{"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063":{name:"Balancer Stable USD",hasIcon:!0},"0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249":{name:"AuraBAL Stable Pool",hasIcon:!1}}},[exports.Network.POLYGON]:{IdsMap:{xMatic:{v1:"0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4",v2:"0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c"},stMatic:{v1:"0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366",v2:"0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d"},mai4:{mai4:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012",maiBbaUsd:"0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e"}},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","Gyro2","Gyro3","GyroE","FX"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0xb4670d1389c758e4380c4211bcbc85342688b9c50002000000000000000003d8","0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455","0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4","0xb4b22bd6cdad0ab828be6f8a4086dfa54e9b373600020000000000000000058f","0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba","0x0b8319061732b34cab22445fa83b81f950e4b7ed000000000000000000000709","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d","0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c","0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e","0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b","0xa48d164f6eb0edc68bd03b56fa59e12f24499ad10000000000000000000007c4"]},Investment:{AllowList:[""]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x41b953164995c11c81da73d212ed8af25741b7ac":"liquidityBootstrappingPool","0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193":"managedPool","0xc128a9954e6c874ea3d62ce62b468ba073093f25":"boostedPool","0xca96c4f198d343e251b1a01f3eba061ef3da73c1":"stablePool","0x136fd06fa01ecf624c7f2b3cb15742c1339dc2c4":"composableStablePool","0x0e39c3d9b2ec765efd9c5c70bb290b1fcd8536e3":"weightedPool"},Stakable:{AllowList:["0x0297e37f1873d2dab4487aa67cd56b58e2f27875000100000000000000000002","0x03cd191f589d12b0582a99808cf19851e468e6b500010000000000000000000a","0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x10f21c9bd8128a29aa785ab2de0d044dcdd79436000200000000000000000059","0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000032","0x36128d5436d2d70cab39c9af9cce146c38554ff0000100000000000000000008","0x5a6ae1fd70d04ba4a279fc219dfabc53825cb01d00020000000000000000020e","0x614b5038611729ed49e0ded154d8a5d3af9d1d9e00010000000000000000001d","0x7c9cf12d783821d5c63d8e9427af5c44bad92445000100000000000000000051","0x805ca3ccc61cc231851dee2da6aabff0a7714aa7000200000000000000000361","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0xb204bf10bc3a5435017d3db247f56da601dfe08a0002000000000000000000fe","0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455","0xce66904b68f1f070332cbc631de7ee98b650b499000100000000000000000009","0xcf354603a9aebd2ff9f33e1b04246d8ea204ae9500020000000000000000005a","0xdb1db6e248d7bb4175f6e5a382d0a03fe3dcc813000100000000000000000035","0xea4e073c8ac859f2994c07e627178719c8002dc00002000000000000000003dc","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4","0x2dbc9ab0160087ae59474fb7bed95b9e808fa6bc0001000000000000000003db","0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba","0x8f9dd2064eb38e8e40f2ab67bde27c0e16ea9b080002000000000000000004ca","0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b","0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e","0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d","0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c"]},Metadata:{}},[exports.Network.ARBITRUM]:{IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX"],Stable:{AllowList:["0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020","0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d","0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f","0xd89746affa5483627a87e55713ec1905114394950002000000000000000000bf","0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102","0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159"]},Investment:{AllowList:[""]},Factories:{"0x7dfdef5f355096603419239ce743bfaf1120312b":"weightedPool","0xcf0a32bbef8f064969f21f7e02328fb577382018":"weightedPool","0x2433477a10fc5d31b9513c638f19ee85caed53fd":"stablePool","0xebfd5681977e38af65a7487dc70b8221d089ccad":"stablePool","0x142b9666a0a3a30477b052962dda81547e7029ab":"liquidityBootstrappingPool","0x1802953277fd955f9a254b80aa0582f193cf1d77":"liquidityBootstrappingPool","0xacd615b3705b9c880e4e7293f1030b34e57b4c1c":"managedPool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"boostedPool","0xef44d6786b2b4d544b7850fe67ce6381626bf2d6":"stablePool","0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33":"composableStablePool","0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c":"weightedPool"},Stakable:{AllowList:["0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d","0x0adeb25cb5920d4f7447af4a0428072edc2cee2200020000000000000000004a","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0x1779900c7707885720d39aa741f4086886307e9e00020000000000000000004b","0x4a3a22a3e7fee0ffbb66f1c28bfac50f75546fc7000200000000000000000008","0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f","0x64541216bafffeec8ea535bb71fbc927831d0595000100000000000000000002","0x651e00ffd5ecfa7f3d4f33d62ede0a97cf62ede2000200000000000000000006","0xb28670b3e7ad27bd41fb5938136bf9e9cba90d6500020000000000000000001e","0xb340b6b1a34019853cb05b2de6ee8ffd0b89a008000100000000000000000036","0xb5b77f1ad2b520df01612399258e7787af63025d000200000000000000000010","0xc2f082d33b5b8ef3a7e3de30da54efd3114512ac000200000000000000000017","0xc61ff48f94d801c1ceface0289085197b5ec44f000020000000000000000004d","0xcc65a812ce382ab909a11e434dbf75b34f1cc59d000200000000000000000001","0xe1b40094f1446722c424c598ac412d590e0b3ffb000200000000000000000076","0xb3028ca124b80cfe6e9ca57b70ef2f0ccc41ebd40002000000000000000000ba","0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102","0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159","0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158"]},Metadata:{}},[exports.Network.GNOSIS]:{IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX","Gyro2","Gyro3","GyroE","HighAmpComposableStable","FX"],Stable:{AllowList:["0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000004","0x707b7d4a1bae449d546dcab869256591bbb3d70b000000000000000000000000"]},Investment:{AllowList:[]},Factories:{},Stakable:{AllowList:[]},Metadata:{}}};var q,G,W,H,K,$,J;exports.PoolGaugesAttributes=void 0,(q=exports.PoolGaugesAttributes||(exports.PoolGaugesAttributes={})).Id="id",q.Address="address",q.PoolId="poolId",exports.PoolShareAttributes=void 0,(G=exports.PoolShareAttributes||(exports.PoolShareAttributes={})).Balance="balance",G.Id="id",G.PoolId="poolId",G.UserAddress="userAddress",exports.GaugeShareAttributes=void 0,(W=exports.GaugeShareAttributes||(exports.GaugeShareAttributes={})).Id="id",W.UserAddress="user",W.GaugeId="gauge",W.Balance="balance",exports.PoolSpecialization=void 0,(H=exports.PoolSpecialization||(exports.PoolSpecialization={}))[H.GeneralPool=0]="GeneralPool",H[H.MinimalSwapInfoPool=1]="MinimalSwapInfoPool",H[H.TwoTokenPool=2]="TwoTokenPool",exports.UserBalanceOpKind=void 0,(K=exports.UserBalanceOpKind||(exports.UserBalanceOpKind={}))[K.DepositInternal=0]="DepositInternal",K[K.WithdrawInternal=1]="WithdrawInternal",K[K.TransferInternal=2]="TransferInternal",K[K.TransferExternal=3]="TransferExternal",exports.PoolBalanceOpKind=void 0,($=exports.PoolBalanceOpKind||(exports.PoolBalanceOpKind={}))[$.Withdraw=0]="Withdraw",$[$.Deposit=1]="Deposit",$[$.Update=2]="Update",exports.PoolType=void 0,(J=exports.PoolType||(exports.PoolType={})).Weighted="Weighted",J.Investment="Investment",J.Stable="Stable",J.ComposableStable="ComposableStable",J.MetaStable="MetaStable",J.StablePhantom="StablePhantom",J.LiquidityBootstrapping="LiquidityBootstrapping",J.Element="Element",J.Gyro2="Gyro2",J.Gyro3="Gyro3",J.GyroE="GyroE",J.Managed="Managed",J.AaveLinear="AaveLinear",J.Linear="Linear",J.EulerLinear="EulerLinear",J.ERC4626Linear="ERC4626Linear",J.BeefyLinear="BeefyLinear",J.GearboxLinear="GearboxLinear",J.MidasLinear="MidasLinear",J.ReaperLinear="ReaperLinear",J.SiloLinear="SiloLinear",J.TetuLinear="TetuLinear",J.YearnLinear="YearnLinear",J.FX="FX";class j{constructor(){this.enableLogging=!0}static getInstance(){return j.instance||(j.instance=new j),j.instance}setLoggingEnabled(e){this.enableLogging=e}info(e){this.enableLogging}warn(e){this.enableLogging&&console.warn(`[WARN] ${e}`)}error(e){this.enableLogging&&console.error(`[ERROR] ${e}`)}time(e){this.enableLogging}timeEnd(e){this.enableLogging}}const X=e=>e[0].map(((t,a)=>e.map((e=>e[a]))));class Y{constructor(e){this.ETH=t.AddressZero,this.isETH=e=>Y.isEqual(e,this.ETH),this.isWETH=e=>Y.isEqual(e,this.WETH),this.translateToERC20=e=>this.isETH(e)?this.WETH:e,this.WETH=n.getAddress(e)}sortTokens(e,...t){t.forEach((t=>F(e.length===t.length,"array length mismatch")));const a=e.map(this.translateToERC20),n=X([a,...t]).sort((([e],[t])=>((e,t)=>e.toLowerCase()>t.toLowerCase()?1:-1)(e,t))),[o,...i]=X(n);return[e.includes(this.ETH)?o.map((e=>this.isWETH(e)?this.ETH:e)):o,...i]}}Y.isEqual=(e,t)=>n.getAddress(e)===n.getAddress(t);const z={"000":"ADD_OVERFLOW","001":"SUB_OVERFLOW","002":"SUB_UNDERFLOW","003":"MUL_OVERFLOW","004":"ZERO_DIVISION","005":"DIV_INTERNAL","006":"X_OUT_OF_BOUNDS","007":"Y_OUT_OF_BOUNDS","008":"PRODUCT_OUT_OF_BOUNDS","009":"INVALID_EXPONENT",100:"OUT_OF_BOUNDS",101:"UNSORTED_ARRAY",102:"UNSORTED_TOKENS",103:"INPUT_LENGTH_MISMATCH",104:"ZERO_TOKEN",200:"MIN_TOKENS",201:"MAX_TOKENS",202:"MAX_SWAP_FEE_PERCENTAGE",203:"MIN_SWAP_FEE_PERCENTAGE",204:"MINIMUM_BPT",205:"CALLER_NOT_VAULT",206:"UNINITIALIZED",207:"BPT_IN_MAX_AMOUNT",208:"BPT_OUT_MIN_AMOUNT",209:"EXPIRED_PERMIT",210:"NOT_TWO_TOKENS",211:"DISABLED",300:"MIN_AMP",301:"MAX_AMP",302:"MIN_WEIGHT",303:"MAX_STABLE_TOKENS",304:"MAX_IN_RATIO",305:"MAX_OUT_RATIO",306:"MIN_BPT_IN_FOR_TOKEN_OUT",307:"MAX_OUT_BPT_FOR_TOKEN_IN",308:"NORMALIZED_WEIGHT_INVARIANT",309:"INVALID_TOKEN",310:"UNHANDLED_JOIN_KIND",311:"ZERO_INVARIANT",312:"ORACLE_INVALID_SECONDS_QUERY",313:"ORACLE_NOT_INITIALIZED",314:"ORACLE_QUERY_TOO_OLD",315:"ORACLE_INVALID_INDEX",316:"ORACLE_BAD_SECS",317:"AMP_END_TIME_TOO_CLOSE",318:"AMP_ONGOING_UPDATE",319:"AMP_RATE_TOO_HIGH",320:"AMP_NO_ONGOING_UPDATE",321:"STABLE_INVARIANT_DIDNT_CONVERGE",322:"STABLE_GET_BALANCE_DIDNT_CONVERGE",323:"RELAYER_NOT_CONTRACT",324:"BASE_POOL_RELAYER_NOT_CALLED",325:"REBALANCING_RELAYER_REENTERED",326:"GRADUAL_UPDATE_TIME_TRAVEL",327:"SWAPS_DISABLED",328:"CALLER_IS_NOT_LBP_OWNER",329:"PRICE_RATE_OVERFLOW",330:"INVALID_JOIN_EXIT_KIND_WHILE_SWAPS_DISABLED",331:"WEIGHT_CHANGE_TOO_FAST",332:"LOWER_GREATER_THAN_UPPER_TARGET",333:"UPPER_TARGET_TOO_HIGH",334:"UNHANDLED_BY_LINEAR_POOL",335:"OUT_OF_TARGET_RANGE",336:"UNHANDLED_EXIT_KIND ",337:"UNAUTHORIZED_EXIT",338:"MAX_MANAGEMENT_SWAP_FEE_PERCENTAGE",339:"UNHANDLED_BY_MANAGED_POOL",340:"UNHANDLED_BY_PHANTOM_POOL",341:"TOKEN_DOES_NOT_HAVE_RATE_PROVIDER",342:"INVALID_INITIALIZATION",343:"OUT_OF_NEW_TARGET_RANGE",344:"UNAUTHORIZED_OPERATION",345:"UNINITIALIZED_POOL_CONTROLLER",400:"REENTRANCY",401:"SENDER_NOT_ALLOWED",402:"PAUSED",403:"PAUSE_WINDOW_EXPIRED",404:"MAX_PAUSE_WINDOW_DURATION",405:"MAX_BUFFER_PERIOD_DURATION",406:"INSUFFICIENT_BALANCE",407:"INSUFFICIENT_ALLOWANCE",408:"ERC20_TRANSFER_FROM_ZERO_ADDRESS",409:"ERC20_TRANSFER_TO_ZERO_ADDRESS",410:"ERC20_MINT_TO_ZERO_ADDRESS",411:"ERC20_BURN_FROM_ZERO_ADDRESS",412:"ERC20_APPROVE_FROM_ZERO_ADDRESS",413:"ERC20_APPROVE_TO_ZERO_ADDRESS",414:"ERC20_TRANSFER_EXCEEDS_ALLOWANCE",415:"ERC20_DECREASED_ALLOWANCE_BELOW_ZERO",416:"ERC20_TRANSFER_EXCEEDS_BALANCE",417:"ERC20_BURN_EXCEEDS_ALLOWANCE",418:"SAFE_ERC20_CALL_FAILED",419:"ADDRESS_INSUFFICIENT_BALANCE",420:"ADDRESS_CANNOT_SEND_VALUE",421:"SAFE_CAST_VALUE_CANT_FIT_INT256",422:"GRANT_SENDER_NOT_ADMIN",423:"REVOKE_SENDER_NOT_ADMIN",424:"RENOUNCE_SENDER_NOT_ALLOWED",425:"BUFFER_PERIOD_EXPIRED",426:"CALLER_IS_NOT_OWNER",427:"NEW_OWNER_IS_ZERO",428:"CODE_DEPLOYMENT_FAILED",429:"CALL_TO_NON_CONTRACT",430:"LOW_LEVEL_CALL_FAILED",431:"NOT_PAUSED",432:"ADDRESS_ALREADY_ALLOWLISTED",433:"ADDRESS_NOT_ALLOWLISTED",434:"ERC20_BURN_EXCEEDS_BALANCE",500:"INVALID_POOL_ID",501:"CALLER_NOT_POOL",502:"SENDER_NOT_ASSET_MANAGER",503:"USER_DOESNT_ALLOW_RELAYER",504:"INVALID_SIGNATURE",505:"EXIT_BELOW_MIN",506:"JOIN_ABOVE_MAX",507:"SWAP_LIMIT",508:"SWAP_DEADLINE",509:"CANNOT_SWAP_SAME_TOKEN",510:"UNKNOWN_AMOUNT_IN_FIRST_SWAP",511:"MALCONSTRUCTED_MULTIHOP_SWAP",512:"INTERNAL_BALANCE_OVERFLOW",513:"INSUFFICIENT_INTERNAL_BALANCE",514:"INVALID_ETH_INTERNAL_BALANCE",515:"INVALID_POST_LOAN_BALANCE",516:"INSUFFICIENT_ETH",517:"UNALLOCATED_ETH",518:"ETH_TRANSFER",519:"CANNOT_USE_ETH_SENTINEL",520:"TOKENS_MISMATCH",521:"TOKEN_NOT_REGISTERED",522:"TOKEN_ALREADY_REGISTERED",523:"TOKENS_ALREADY_SET",524:"TOKENS_LENGTH_MUST_BE_2",525:"NONZERO_TOKEN_BALANCE",526:"BALANCE_TOTAL_OVERFLOW",527:"POOL_NO_TOKENS",528:"INSUFFICIENT_FLASH_LOAN_BALANCE",600:"SWAP_FEE_PERCENTAGE_TOO_HIGH",601:"FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH",602:"INSUFFICIENT_FLASH_LOAN_FEE_AMOUNT"};class Z{constructor(){}}async function Q(e){if("string"==typeof e)return e;if(i.Signer.isSigner(e))return e.getAddress();if(e.address)return e.address;throw new Error("Could not read account address")}var ee;Z.isErrorCode=e=>{if(!e.includes("BAL#"))return!1;const t=e.replace("BAL#","");return Object.keys(z).includes(t)},Z.parseErrorCode=e=>{if(!e.includes("BAL#"))throw new Error("Error code not found");const t=e.replace("BAL#",""),a=z[t];if(!a)throw new Error("Error code not found");return a},Z.tryParseErrorCode=e=>{try{return Z.parseErrorCode(e)}catch{return e}},Z.isBalancerError=e=>Object.values(z).includes(e),Z.encodeError=e=>{const t=Object.entries(z).find((([,t])=>t===e));if(!t)throw Error("Error message not found");return`BAL#${t[0]}`},exports.RelayerAction=void 0,(ee=exports.RelayerAction||(exports.RelayerAction={})).JoinPool="JoinPool",ee.ExitPool="ExitPool",ee.Swap="Swap",ee.BatchSwap="BatchSwap",ee.SetRelayerApproval="SetRelayerApproval";class te{constructor(){}}te.encodeCalldataAuthorization=(e,t,a)=>{const n=o.hexZeroPad(o.hexValue(t),32).slice(2),{v:i,r:s,s:r}=o.splitSignature(a);return`${e}${n}${o.hexZeroPad(o.hexValue(i),32).slice(2)}${s.slice(2)}${r.slice(2)}`},te.signJoinAuthorization=(e,t,a,n,o,i)=>te.signAuthorizationFor(exports.RelayerAction.JoinPool,e,t,a,n,o,i),te.signExitAuthorization=(e,t,a,n,o,i)=>te.signAuthorizationFor(exports.RelayerAction.ExitPool,e,t,a,n,o,i),te.signSwapAuthorization=(e,t,a,n,o,i)=>te.signAuthorizationFor(exports.RelayerAction.Swap,e,t,a,n,o,i),te.signBatchSwapAuthorization=(e,t,a,n,o,i)=>te.signAuthorizationFor(exports.RelayerAction.BatchSwap,e,t,a,n,o,i),te.signSetRelayerApprovalAuthorization=(e,t,a,n,o,i)=>te.signAuthorizationFor(exports.RelayerAction.SetRelayerApproval,e,t,a,n,o,i),te.signAuthorizationFor=async(e,a,n,o,i,s=t.MaxUint256,r)=>{const{chainId:p}=await a.provider.getNetwork();if(!r){const e=await n.getAddress();r=await a.getNextNonce(e)}const l={name:"Balancer V2 Vault",version:"1",chainId:p,verifyingContract:a.address},d={[e]:[{name:"calldata",type:"bytes"},{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},u={calldata:i,sender:await Q(o),nonce:r.toString(),deadline:s.toString()};return n._signTypedData(l,d,u)};class ae{constructor(){}}ae.signSetMinterApproval=async(e,n,i,s,r=t.MaxUint256,p)=>{const{chainId:l}=await e.provider.getNetwork();if(!p){const t=await s.getAddress();p=await e.getNextNonce(t)}const d={name:"Balancer Minter",version:"1",chainId:l,verifyingContract:e.address},u={minter:await Q(n),approval:i,nonce:p.toString(),deadline:r.toString()},c=await s._signTypedData(d,{SetMinterApproval:[{name:"minter",type:"address"},{name:"approval",type:"bool"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},u);return{...o.splitSignature(c),deadline:a.BigNumber.from(r)}};const ne=BigInt(0),oe=BigInt(1),ie=BigInt("1000000000000000000"),se=(e,t)=>{if(!e)throw new Error(t)};function re(e){const t=BigInt(18)-e;return ie*BigInt(10)**t}function pe(e,t){return ce.mulDownFixed(e,t)}function le(e,t){const a=new Array(e.length);for(let n=0;n=0&&a>=e||t<0&&at>e?t:e))}static min(e,t){return e=this.MIN_NATURAL_EXPONENT&&e<=this.MAX_NATURAL_EXPONENT,"Errors.INVALID_EXPONENT"),e<0)return this.ONE_18*this.ONE_18/this.exp(BigInt(-1)*e);let t;e>=this.x0?(e-=this.x0,t=this.a0):e>=this.x1?(e-=this.x1,t=this.a1):t=BigInt(1),e*=BigInt(100);let a=this.ONE_20;e>=this.x2&&(e-=this.x2,a=a*this.a2/this.ONE_20),e>=this.x3&&(e-=this.x3,a=a*this.a3/this.ONE_20),e>=this.x4&&(e-=this.x4,a=a*this.a4/this.ONE_20),e>=this.x5&&(e-=this.x5,a=a*this.a5/this.ONE_20),e>=this.x6&&(e-=this.x6,a=a*this.a6/this.ONE_20),e>=this.x7&&(e-=this.x7,a=a*this.a7/this.ONE_20),e>=this.x8&&(e-=this.x8,a=a*this.a8/this.ONE_20),e>=this.x9&&(e-=this.x9,a=a*this.a9/this.ONE_20);let n,o=this.ONE_20;return n=e,o+=n,n=n*e/this.ONE_20/BigInt(2),o+=n,n=n*e/this.ONE_20/BigInt(3),o+=n,n=n*e/this.ONE_20/BigInt(4),o+=n,n=n*e/this.ONE_20/BigInt(5),o+=n,n=n*e/this.ONE_20/BigInt(6),o+=n,n=n*e/this.ONE_20/BigInt(7),o+=n,n=n*e/this.ONE_20/BigInt(8),o+=n,n=n*e/this.ONE_20/BigInt(9),o+=n,n=n*e/this.ONE_20/BigInt(10),o+=n,n=n*e/this.ONE_20/BigInt(11),o+=n,n=n*e/this.ONE_20/BigInt(12),o+=n,a*o/this.ONE_20*t/BigInt(100)}static _ln_36(e){const t=((e*=this.ONE_18)-this.ONE_36)*this.ONE_36/(e+this.ONE_36),a=t*t/this.ONE_36;let n=t,o=n;return n=n*a/this.ONE_36,o+=n/BigInt(3),n=n*a/this.ONE_36,o+=n/BigInt(5),n=n*a/this.ONE_36,o+=n/BigInt(7),n=n*a/this.ONE_36,o+=n/BigInt(9),n=n*a/this.ONE_36,o+=n/BigInt(11),n=n*a/this.ONE_36,o+=n/BigInt(13),n=n*a/this.ONE_36,o+=n/BigInt(15),o*BigInt(2)}static _ln(e){if(e=this.a0*this.ONE_18&&(e/=this.a0,t+=this.x0),e>=this.a1*this.ONE_18&&(e/=this.a1,t+=this.x1),t*=BigInt(100),(e*=BigInt(100))>=this.a2&&(e=e*this.ONE_20/this.a2,t+=this.x2),e>=this.a3&&(e=e*this.ONE_20/this.a3,t+=this.x3),e>=this.a4&&(e=e*this.ONE_20/this.a4,t+=this.x4),e>=this.a5&&(e=e*this.ONE_20/this.a5,t+=this.x5),e>=this.a6&&(e=e*this.ONE_20/this.a6,t+=this.x6),e>=this.a7&&(e=e*this.ONE_20/this.a7,t+=this.x7),e>=this.a8&&(e=e*this.ONE_20/this.a8,t+=this.x8),e>=this.a9&&(e=e*this.ONE_20/this.a9,t+=this.x9),e>=this.a10&&(e=e*this.ONE_20/this.a10,t+=this.x10),e>=this.a11&&(e=e*this.ONE_20/this.a11,t+=this.x11);const a=(e-this.ONE_20)*this.ONE_20/(e+this.ONE_20),n=a*a/this.ONE_20;let o=a,i=o;return o=o*n/this.ONE_20,i+=o/BigInt(3),o=o*n/this.ONE_20,i+=o/BigInt(5),o=o*n/this.ONE_20,i+=o/BigInt(7),o=o*n/this.ONE_20,i+=o/BigInt(9),o=o*n/this.ONE_20,i+=o/BigInt(11),i*=BigInt(2),(t+i)/BigInt(100)}}ye.ONE_18=BigInt("1000000000000000000"),ye.ONE_20=BigInt("100000000000000000000"),ye.ONE_36=BigInt("1000000000000000000000000000000000000"),ye.MAX_NATURAL_EXPONENT=BigInt("130000000000000000000"),ye.MIN_NATURAL_EXPONENT=BigInt("-41000000000000000000"),ye.LN_36_LOWER_BOUND=BigInt(ye.ONE_18)-BigInt("100000000000000000"),ye.LN_36_UPPER_BOUND=BigInt(ye.ONE_18)+BigInt("100000000000000000"),ye.MILD_EXPONENT_BOUND=BigInt(2)**BigInt(254)/ye.ONE_20,ye.x0=BigInt("128000000000000000000"),ye.a0=BigInt("38877084059945950922200000000000000000000000000000000000"),ye.x1=BigInt("64000000000000000000"),ye.a1=BigInt("6235149080811616882910000000"),ye.x2=BigInt("3200000000000000000000"),ye.a2=BigInt("7896296018268069516100000000000000"),ye.x3=BigInt("1600000000000000000000"),ye.a3=BigInt("888611052050787263676000000"),ye.x4=BigInt("800000000000000000000"),ye.a4=BigInt("298095798704172827474000"),ye.x5=BigInt("400000000000000000000"),ye.a5=BigInt("5459815003314423907810"),ye.x6=BigInt("200000000000000000000"),ye.a6=BigInt("738905609893065022723"),ye.x7=BigInt("100000000000000000000"),ye.a7=BigInt("271828182845904523536"),ye.x8=BigInt("50000000000000000000"),ye.a8=BigInt("164872127070012814685"),ye.x9=BigInt("25000000000000000000"),ye.a9=BigInt("128402541668774148407"),ye.x10=BigInt("12500000000000000000"),ye.a10=BigInt("113314845306682631683"),ye.x11=BigInt("6250000000000000000"),ye.a11=BigInt("106449445891785942956");const be=(e,n,o)=>{var i;let s=o?e.tokens.map((e=>e.address===n?t.AddressZero:e.address)):e.tokens.map((e=>e.address)),r=e.tokens.map((e=>{var t;return null!==(t=e.decimals)&&void 0!==t?t:18})),p=e.tokens.map((e=>a.parseFixed(e.balance,e.decimals).toBigInt())),l=e.tokens.map((e=>{var t;return a.parseFixed(null!==(t=e.weight)&&void 0!==t?t:"1",18).toBigInt()})),d=e.tokens.map((e=>{var t;return a.parseFixed(null!==(t=e.priceRate)&&void 0!==t?t:"1",18).toBigInt()})),u=r.map((e=>re(BigInt(e)))),c=u.map(((e,t)=>ce.mulDownFixed(e,d[t]))),y=le(p,c);if(n){const e=new Y(n);[s,r,c,u,p,y,l,d]=e.sortTokens(s,r,c,u,p,y,l,d)}const b=a.parseFixed(null!==(i=e.amp)&&void 0!==i?i:"1",3).toBigInt(),m=y.indexOf(ce.max(y)),f=[...c],T=[...u],h=[...s],I=[...p],g=[...d],_=[...y],x=s.indexOf(e.address);return-1!==x&&(f.splice(x,1),T.splice(x,1),h.splice(x,1),I.splice(x,1),g.splice(x,1),_.splice(x,1)),{bptIndex:x,higherBalanceTokenIndex:m,ampWithPrecision:b,balancesEvm:p,balancesEvmWithoutBpt:I,priceRates:d,priceRatesWithoutBpt:g,swapFeeEvm:a.parseFixed(e.swapFee,18).toBigInt(),poolTokens:s,poolTokensWithoutBpt:h,weights:l,scalingFactors:c,scalingFactorsWithoutBpt:f,scalingFactorsRaw:u,scalingFactorsRawWithoutBpt:T,upScaledBalances:y,upScaledBalancesWithoutBpt:_,totalSharesEvm:a.parseFixed(e.totalShares||"0",18).toBigInt()}},me={Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",WETH:"0x0000000000000000000000000000000000000000",BAL:"0x0000000000000000000000000000000000000000"}},fe={[exports.Network.GOERLI]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","USDT","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",WETH:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",BAL:"0xfA8449189744799aD2AcE7e0EBAC8BB7575eff47",bbaUSD:"0x13ACD41C585d7EbB4a9460f7C8f50BE60DC080Cd"},PriceChainMap:{"0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0x37f03a12241e9fd3658ad6777d289c3fb8512bc9":"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599","0xfa8449189744799ad2ace7e0ebac8bb7575eff47":"0xba100000625a3754423978a60c9317c58a424e3d","0xe0c9275e44ea80ef17579d33c55136b7da269aeb":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","0x8c9e6c40d3402480ace624730524facc5482798c":"0x6b175474e89094c44da98b954eedeac495271d0f","0x1f1f156e0317167c11aa412e3d1435ea29dc3cce":"0xdac17f958d2ee523a2206206994597c13d831ec7","0x4cb1892fddf14f772b2e39e299f44b2e5da90d04":"0x3ed3b47dd13ec9a98b44e6204a523e766b225811","0x811151066392fd641fe74a9b55a712670572d161":"0xbcca60bb61934080951369a648fb03df4f96263c","0x89534a24450081aa267c79b07411e9617d984052":"0x028171bca77440897b824ca71d1c56cac55b68a3","0x829f35cebbcd47d3c120793c12f7a232c903138b":"0x956f47f50a910163d8bf957cf5846d573e7f87ca","0xff386a3d08f80ac38c77930d173fa56c6286dc8b":"0x6810e776880c02933d47db1b9fc05908e5386b96"}},[exports.Network.MAINNET]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",WETH:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",BAL:"0xba100000625a3754423978a60c9317c58a424e3d",bbaUSD:"0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2",bbaUSDv2:"0xA13a9247ea42D743238089903570127DdA72fE44"}},[exports.Network.POLYGON]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",WETH:"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",BAL:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3"}},[exports.Network.ARBITRUM]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",WETH:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",BAL:"0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8"}},[exports.Network.GNOSIS]:{Popular:{Symbols:["xDAI","WXDAI","WETH","BAL"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xe91d153e0b41518a2ce8dd3d7944fa863463a97d",WETH:"0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1",BAL:"0x7eF541E2a22058048904fE5744f9c7E4C57AF717"}}};function Te(e){return fe[e]?fe[e]:me}let he=!1,Ie=!1;const ge={debug:1,default:2,info:2,warning:3,error:4,off:5};let _e=ge.default,xe=null;const Pe=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(a){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var we,Ee;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(we||(we={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(Ee||(Ee={}));const Ae="0123456789abcdef";class Se{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const a=e.toLowerCase();null==ge[a]&&this.throwArgumentError("invalid log level name","logLevel",e),_e>ge[a]||console.log.apply(console,t)}debug(...e){this._log(Se.levels.DEBUG,e)}info(...e){this._log(Se.levels.INFO,e)}warn(...e){this._log(Se.levels.WARNING,e)}makeError(e,t,a){if(Ie)return this.makeError("censored error",t,{});t||(t=Se.errors.UNKNOWN_ERROR),a||(a={});const n=[];Object.keys(a).forEach((e=>{const t=a[e];try{if(t instanceof Uint8Array){let a="";for(let e=0;e>4],a+=Ae[15&t[e]];n.push(e+"=Uint8Array(0x"+a+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(a[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const o=e;let i="";switch(t){case Ee.NUMERIC_FAULT:{i="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":i+="-"+t;break;case"negative-power":case"negative-width":i+="-unsupported";break;case"unbound-bitwise-result":i+="-unbound-result"}break}case Ee.CALL_EXCEPTION:case Ee.INSUFFICIENT_FUNDS:case Ee.MISSING_NEW:case Ee.NONCE_EXPIRED:case Ee.REPLACEMENT_UNDERPRICED:case Ee.TRANSACTION_REPLACED:case Ee.UNPREDICTABLE_GAS_LIMIT:i=t}i&&(e+=" [ See: https://links.ethers.org/v5-errors-"+i+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(a).forEach((function(e){s[e]=a[e]})),s}throwError(e,t,a){throw this.makeError(e,t,a)}throwArgumentError(e,t,a){return this.throwError(e,Se.errors.INVALID_ARGUMENT,{argument:t,value:a})}assert(e,t,a,n){e||this.throwError(t,a,n)}assertArgument(e,t,a,n){e||this.throwArgumentError(t,a,n)}checkNormalize(e){Pe&&this.throwError("platform missing String.prototype.normalize",Se.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Pe})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,Se.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,Se.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,a){a=a?": "+a:"",et&&this.throwError("too many arguments"+a,Se.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",Se.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",Se.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",Se.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return xe||(xe=new Se("logger/5.7.0")),xe}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",Se.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),he){if(!e)return;this.globalLogger().throwError("error censorship permanent",Se.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Ie=!!e,he=!!t}static setLogLevel(e){const t=ge[e.toLowerCase()];null!=t?_e=t:Se.globalLogger().warn("invalid log level - "+e)}static from(e){return new Se(e)}}Se.errors=Ee,Se.levels=we;const ve=new Se("units/5.7.0"),ke=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Be(e,t){if("string"==typeof t){const e=ke.indexOf(t);-1!==e&&(t=3*e)}return a.formatFixed(e,null!=t?t:18)}function Ce(e,t){if("string"!=typeof e&&ve.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=ke.indexOf(t);-1!==e&&(t=3*e)}return a.parseFixed(e,null!=t?t:18)}const Oe={[exports.Network.MAINNET]:{waUSDT:"0xf8fd466f12e236f4c96f7cce6c79eadb819abf58",waUSDC:"0xd093fa4fb80d09bb30817fdcd442d4d02ed3e5de",waDAI:"0x02d60b84491589974263d922d9cc7a3152618ef6"},[exports.Network.POLYGON]:{wamDAI:"0xee029120c72b0607344f35b17cdd90025e647b00",wamUSDC:"0x221836a597948dce8f3568e044ff123108acc42a",wamUSDT:"0x19c60a251e525fa88cd6f3768416a8024e98fc19"}},Me={[exports.Network.MAINNET]:{[Oe[exports.Network.MAINNET].waUSDT]:{aToken:"0x3ed3b47dd13ec9a98b44e6204a523e766b225811",underlying:"0xdac17f958d2ee523a2206206994597c13d831ec7"},[Oe[exports.Network.MAINNET].waUSDC]:{aToken:"0xbcca60bb61934080951369a648fb03df4f96263c",underlying:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"},[Oe[exports.Network.MAINNET].waDAI]:{aToken:"0x028171bca77440897b824ca71d1c56cac55b68a3",underlying:"0x6b175474e89094c44da98b954eedeac495271d0f"}},[exports.Network.POLYGON]:{[Oe[exports.Network.POLYGON].wamUSDT]:{aToken:"0x60d55f02a771d515e077c9c2403a1ef324885cec",underlying:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f"},[Oe[exports.Network.POLYGON].wamUSDC]:{aToken:"0x1a13f4ca1d028320a707d99520abfefca3998b7f",underlying:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174"},[Oe[exports.Network.POLYGON].wamDAI]:{aToken:"0x27f8d03b3a2196956ed754badc28d73be8830a6e",underlying:"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063"}}},Fe=new e.Interface(["function rate() view returns (uint256)"]);class Re{constructor(e,t){this.multicall=e,this.network=t}async fetch(e){const t=Object.values(Oe[e]),a=t.map((e=>({target:e,callData:Fe.encodeFunctionData("rate",[])}))),[,n]=await this.multicall.callStatic.aggregate(a);return t.reduce(((e,t,a)=>(e[t]||(e[t]="0x"==n[a]?0:parseFloat(Be(n[a],27))),e)),{})}async getRate(e){return 1}}function Ne(e,t){let a=e.toLowerCase();return a=Le(a,t),a=De(a,t),a}const Le=(e,t)=>{const a=Te(t).PriceChainMap;return a&&a[e.toLowerCase()]||e},De=(e,t)=>{const a=e.toLocaleLowerCase(),n=t;return null!=Me[n]&&null!=Me[n]&&Object.keys(Me[n]).includes(a)?Me[n][a].aToken:a},Ue=(e,n)=>{const o=n.filter(((a,n)=>e[n]===t.AddressZero));return o[0]?a.BigNumber.from(o[0]):a.BigNumber.from(0)};class Ve{constructor(e,t=200,a=100){this.fn=e,this.wait=t,this.limit=a,this.requestSets=[],this.promisedCalls=[],this.promisedCount=0,this.debounceCancel=()=>{}}fetch(e){var t,a;return(t=this.requestSets)[a=this.promisedCount]||(t[a]=new Set),e&&this.requestSets[this.promisedCount].add(e),this.requestSets[this.promisedCount].size>=this.limit?this.execute(0):this.promisedCalls[this.promisedCount]?this.promisedCalls[this.promisedCount].promise:this.execute(this.wait)}execute(e=0){this.promisedCalls[this.promisedCount]||(this.promisedCalls[this.promisedCount]=(()=>{let e=()=>{},t=()=>{};return{promise:new Promise(((a,n)=>{[e,t]=[a,n]})),reject:t,resolve:e}})());const{promise:t,resolve:a,reject:n}=this.promisedCalls[this.promisedCount];this.timeout&&clearTimeout(this.timeout);const o=()=>{const e=[...this.requestSets[this.promisedCount]];this.promisedCount++,this.fn(e).then((e=>{a(e),this.debounceCancel=()=>{}})).catch((e=>{e.response&&e.response.data&&e.response.data.error&&(e=e.response.data.error),n(e)}))};return e>0?this.timeout=setTimeout(o.bind(this),e):o(),this.debounceCancel=()=>{this.timeout&&clearTimeout(this.timeout),n("Cancelled"),delete this.promisedCalls[this.promisedCount]},t}}function qe(e,t){const n=new RegExp(`[0-9]+\\.?[0-9]{0,${t}}`),o=e.match(n);let i=e;return o&&(i=o[0]),a.parseFixed(i,t)}function Ge(e,t){return a.formatFixed(e,t).replace(/(.0$)/,"")}const We=a.BigNumber.from("10000"),He=(e,t)=>e.mul(t).div(We),Ke=(e,t)=>{const a=He(e,t);return e.sub(a)},$e=(e,t)=>{const a=He(e,t);return e.add(a)},Je=(e,t)=>n.getAddress(e)===n.getAddress(t);function je(e,t,a){return t<0||t>e.length?e:[...e.slice(0,t),a,...e.slice(t)]}function Xe(e,t,a){return t<0||t>=e.length?e:[...e.slice(0,t),a,...e.slice(t+1)]}function Ye(e,t){const a=[...e];return t<0||t>=e.length||a.splice(t,1),a}function ze(e,t,...a){if(e.length!==t.length||a.some((e=>e.length!==t.length)))throw new Error("Array length mismatch");const n=e.map((e=>t.indexOf(e)));if(n.indexOf(-1)>=0)throw new Error("Invalid reference or original array");const o=[];return n.forEach(((e,t)=>{a.forEach(((a,n)=>{o[n]||(o[n]=[]),o[n][t]=a[e]}))})),o}function Ze(e){const t=Object.values(exports.PoolType);return!(!e.includes("Linear")||!t.includes(e))}const Qe=({receipt:e,to:t,contractInterface:a,logName:n})=>{const o=e.logs.filter((e=>Je(e.address,t))).map((e=>{try{return a.parseLog(e)}catch(e){return j.getInstance().warn(e),null}})).find((e=>(null==e?void 0:e.name)===n));if(!o)throw new Error("Event not found in logs");return o},et=()=>`0x${Array(8).fill(null).map((()=>Math.random().toString(16).slice(2,10))).join("")}`;class tt{format(e){return e}}class at{constructor(){this.operatorMap={gt:"_gt",lt:"_lt",eq:"",in:"_in",not_in:"_not_in",contains:"_contains"}}format(e){const t={};return e.where&&Object.entries(e.where).forEach((([e,a])=>{Object.entries(a).forEach((([a,n])=>{t[`${e}${this.operatorMap[a]}`]=n}))})),{...e,where:t}}}class nt{constructor(e){this.args=e}merge(e){const t=s.mergeWith(this.args,e.args,((e,t)=>{if(Array.isArray(e))return e.concat(t)}));return new nt(t)}format(e){return e.format(this.args)}}const ot=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct AaveLinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class it{static createInterface(){return new r.utils.Interface(ot)}static connect(e,t){return new r.Contract(e,ot,t)}}it.abi=ot;const st=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"AaveLinearPoolCreated",type:"event"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract AaveLinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class rt{static createInterface(){return new r.utils.Interface(st)}static connect(e,t){return new r.Contract(e,st,t)}}rt.abi=st;const pt=[{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approveVault",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"toUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapAaveStaticToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"fromUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapAaveDynamicToken",outputs:[],stateMutability:"payable",type:"function"}];class lt{static createInterface(){return new r.utils.Interface(pt)}static connect(e,t){return new r.Contract(e,pt,t)}}lt.abi=pt;const dt=[{inputs:[{internalType:"address",name:"admin",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"previousAdminRole",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"newAdminRole",type:"bytes32"}],name:"RoleAdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleRevoked",type:"event"},{inputs:[],name:"DEFAULT_ADMIN_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"actionId",type:"bytes32"},{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"",type:"address"}],name:"canPerform",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleAdmin",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"uint256",name:"index",type:"uint256"}],name:"getRoleMember",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleMemberCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"grantRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address",name:"account",type:"address"}],name:"grantRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address[]",name:"accounts",type:"address[]"}],name:"grantRolesToMany",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"hasRole",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"renounceRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"revokeRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address",name:"account",type:"address"}],name:"revokeRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address[]",name:"accounts",type:"address[]"}],name:"revokeRolesFromMany",outputs:[],stateMutability:"nonpayable",type:"function"}];class ut{static createInterface(){return new r.utils.Interface(dt)}static connect(e,t){return new r.Contract(e,dt,t)}}ut.abi=dt;const ct=[{inputs:[{internalType:"contract IVault",name:"_vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"vault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"}];class yt{static createInterface(){return new r.utils.Interface(ct)}static connect(e,t){return new r.Contract(e,ct,t)}}yt.abi=ct;const bt=[{inputs:[{internalType:"contract IBalancerTokenAdmin",name:"tokenAdmin",type:"address"},{internalType:"contract IGaugeController",name:"gaugeController",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"address",name:"gauge",type:"address"},{indexed:!1,internalType:"uint256",name:"minted",type:"uint256"}],name:"Minted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"minter",type:"address"},{indexed:!1,internalType:"bool",name:"approval",type:"bool"}],name:"MinterApprovalSet",type:"event"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"allowed_to_mint_for",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBalancerToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBalancerTokenAdmin",outputs:[{internalType:"contract IBalancerTokenAdmin",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getGaugeController",outputs:[{internalType:"contract IGaugeController",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"getMinterApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"gauge",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"gauge",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"mintFor",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"gauges",type:"address[]"}],name:"mintMany",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"gauges",type:"address[]"},{internalType:"address",name:"user",type:"address"}],name:"mintManyFor",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"gauge",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"mint_for",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[8]",name:"gauges",type:"address[8]"}],name:"mint_many",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"gauge",type:"address"}],name:"minted",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"bool",name:"approval",type:"bool"}],name:"setMinterApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"bool",name:"approval",type:"bool"},{internalType:"address",name:"user",type:"address"},{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:"setMinterApprovalWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"}],name:"toggle_approve_mint",outputs:[],stateMutability:"nonpayable",type:"function"}];class mt{static createInterface(){return new r.utils.Interface(bt)}static connect(e,t){return new r.Contract(e,bt,t)}}mt.abi=bt;const ft=[{inputs:[{internalType:"contract IVault",name:"_vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getAmpForPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getInRecoveryModeForPools",outputs:[{internalType:"bool[]",name:"",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getIsPausedForPools",outputs:[{internalType:"bool[]",name:"",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getLinearTargetsForPools",outputs:[{internalType:"uint256[][]",name:"",type:"uint256[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getNormalizedWeightsForPools",outputs:[{internalType:"uint256[][]",name:"",type:"uint256[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"poolIds",type:"bytes32[]"},{components:[{internalType:"bool",name:"loadTokenBalanceUpdatesAfterBlock",type:"bool"},{internalType:"bool",name:"loadTotalSupply",type:"bool"},{internalType:"bool",name:"loadSwapFees",type:"bool"},{internalType:"bool",name:"loadLinearWrappedTokenRates",type:"bool"},{internalType:"bool",name:"loadLinearTargets",type:"bool"},{internalType:"bool",name:"loadNormalizedWeights",type:"bool"},{internalType:"bool",name:"loadScalingFactors",type:"bool"},{internalType:"bool",name:"loadAmps",type:"bool"},{internalType:"bool",name:"loadRates",type:"bool"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"enum TotalSupplyType[]",name:"totalSupplyTypes",type:"uint8[]"},{internalType:"enum SwapFeeType[]",name:"swapFeeTypes",type:"uint8[]"},{internalType:"uint256[]",name:"linearPoolIdxs",type:"uint256[]"},{internalType:"uint256[]",name:"weightedPoolIdxs",type:"uint256[]"},{internalType:"uint256[]",name:"scalingFactorPoolIdxs",type:"uint256[]"},{internalType:"uint256[]",name:"ampPoolIdxs",type:"uint256[]"},{internalType:"uint256[]",name:"ratePoolIdxs",type:"uint256[]"}],internalType:"struct PoolDataQueryConfig",name:"config",type:"tuple"}],name:"getPoolData",outputs:[{internalType:"uint256[][]",name:"balances",type:"uint256[][]"},{internalType:"uint256[]",name:"totalSupplies",type:"uint256[]"},{internalType:"uint256[]",name:"swapFees",type:"uint256[]"},{internalType:"uint256[]",name:"linearWrappedTokenRates",type:"uint256[]"},{internalType:"uint256[][]",name:"linearTargets",type:"uint256[][]"},{internalType:"uint256[][]",name:"weights",type:"uint256[][]"},{internalType:"uint256[][]",name:"scalingFactors",type:"uint256[][]"},{internalType:"uint256[]",name:"amps",type:"uint256[]"},{internalType:"uint256[]",name:"rates",type:"uint256[]"},{internalType:"uint256[]",name:"ignoreIdxs",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"poolIds",type:"bytes32[]"},{components:[{internalType:"bool",name:"loadInRecoveryMode",type:"bool"},{internalType:"bool",name:"loadIsPaused",type:"bool"}],internalType:"struct PoolStatusQueryConfig",name:"config",type:"tuple"}],name:"getPoolStatus",outputs:[{internalType:"bool[]",name:"isPaused",type:"bool[]"},{internalType:"bool[]",name:"inRecoveryMode",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"poolIds",type:"bytes32[]"},{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getPoolTokenBalancesWithUpdatesAfterBlock",outputs:[{internalType:"uint256[][]",name:"",type:"uint256[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getRateForPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getScalingFactorsForPools",outputs:[{internalType:"uint256[][]",name:"",type:"uint256[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"},{internalType:"enum SwapFeeType[]",name:"swapFeeTypes",type:"uint8[]"}],name:"getSwapFeePercentageForPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"},{internalType:"enum TotalSupplyType[]",name:"totalSupplyTypes",type:"uint8[]"}],name:"getTotalSupplyForPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getWrappedTokenRateForLinearPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"vault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"}];class Tt{static createInterface(){return new r.utils.Interface(ft)}static connect(e,t){return new r.Contract(e,ft,t)}}Tt.abi=ft;const ht=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"address",name:"libraryAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getLibrary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];class It{static createInterface(){return new r.utils.Interface(ht)}static connect(e,t){return new r.Contract(e,ht,t)}}It.abi=ht;const gt=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IERC20",name:"wstETH",type:"address"},{internalType:"contract IBalancerMinter",name:"minter",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approveVault",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{components:[{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"key",type:"uint256"}],internalType:"struct VaultActions.OutputReference[]",name:"outputReferences",type:"tuple[]"}],name:"batchSwap",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum VaultActions.PoolKind",name:"kind",type:"uint8"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"},{components:[{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"key",type:"uint256"}],internalType:"struct VaultActions.OutputReference[]",name:"outputReferences",type:"tuple[]"}],name:"exitPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge[]",name:"gauges",type:"address[]"}],name:"gaugeClaimRewards",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge",name:"gauge",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"gaugeDeposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"gauges",type:"address[]"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"gaugeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"approval",type:"bool"},{internalType:"address",name:"user",type:"address"},{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:"gaugeSetMinterApproval",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge",name:"gauge",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"gaugeWithdraw",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"getEntrypoint",outputs:[{internalType:"contract IBalancerRelayer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum VaultActions.PoolKind",name:"kind",type:"uint8"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.UserBalanceOpKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct IVault.UserBalanceOp[]",name:"ops",type:"tuple[]"},{internalType:"uint256",name:"value",type:"uint256"}],name:"manageUserBalance",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"ref",type:"uint256"}],name:"peekChainedReferenceValue",outputs:[{internalType:"uint256",name:"value",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"bool",name:"approved",type:"bool"},{internalType:"bytes",name:"authorisation",type:"bytes"}],name:"setRelayerApproval",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"stakeETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"stakeETHAndWrap",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"swap",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"toUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapAaveStaticToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ICToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapCompoundV2",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC4626",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapERC4626",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IEulerToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapEuler",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IGearboxDieselToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"dieselAmount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapGearbox",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IReaperTokenVault",name:"vaultToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapReaperVaultToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IShareToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapShareToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ITetuSmartVault",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapTetu",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IUnbuttonToken",name:"wrapperToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapUnbuttonToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapWstETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IYearnTokenVault",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapYearn",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20Permit",name:"token",type:"address"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"vaultPermit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20PermitDAI",name:"token",type:"address"},{internalType:"address",name:"holder",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"bool",name:"allowed",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"vaultPermitDAI",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"fromUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapAaveDynamicToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ICToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapCompoundV2",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC4626",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapERC4626",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IEulerToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"eulerProtocol",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapEuler",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IGearboxDieselToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"mainAmount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapGearbox",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IReaperTokenVault",name:"vaultToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapReaperVaultToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IShareToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapShareToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapStETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ITetuSmartVault",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapTetu",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IUnbuttonToken",name:"wrapperToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"uAmount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapUnbuttonToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IYearnTokenVault",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapYearn",outputs:[],stateMutability:"payable",type:"function"}];class _t{static createInterface(){return new r.utils.Interface(gt)}static connect(e,t){return new r.Contract(e,gt,t)}}_t.abi=gt;const xt=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"tokenRateCacheDurations",type:"uint256[]"},{internalType:"bool[]",name:"exemptFromYieldProtocolFeeFlags",type:"bool[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],internalType:"struct ComposableStablePool.NewPoolParams",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"feeType",type:"uint256"},{indexed:!1,internalType:"uint256",name:"protocolFeePercentage",type:"uint256"}],name:"ProtocolFeePercentageCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenIndex",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rate",type:"uint256"}],name:"TokenRateCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenIndex",type:"uint256"},{indexed:!0,internalType:"contract IRateProvider",name:"provider",type:"address"},{indexed:!1,internalType:"uint256",name:"cacheDuration",type:"uint256"}],name:"TokenRateProviderSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getActualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastJoinExitData",outputs:[{internalType:"uint256",name:"lastJoinExitAmplification",type:"uint256"},{internalType:"uint256",name:"lastPostJoinExitInvariant",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMinimumBpt",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"feeType",type:"uint256"}],name:"getProtocolFeePercentageCache",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolSwapFeeDelegation",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRateProviders",outputs:[{internalType:"contract IRateProvider[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"getTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"getTokenRateCache",outputs:[{internalType:"uint256",name:"rate",type:"uint256"},{internalType:"uint256",name:"oldRate",type:"uint256"},{internalType:"uint256",name:"duration",type:"uint256"},{internalType:"uint256",name:"expires",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"isTokenExemptFromYieldProtocolFee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"duration",type:"uint256"}],name:"setTokenRateCacheDuration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"updateProtocolFeePercentageCache",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"updateTokenRateCache",outputs:[],stateMutability:"nonpayable",type:"function"}];class Pt{static createInterface(){return new r.utils.Interface(xt)}static connect(e,t){return new r.Contract(e,xt,t)}}Pt.abi=xt;const wt=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"tokenRateCacheDurations",type:"uint256[]"},{internalType:"bool[]",name:"exemptFromYieldProtocolFeeFlags",type:"bool[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract ComposableStablePool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Et{static createInterface(){return new r.utils.Interface(wt)}static connect(e,t){return new r.Contract(e,wt,t)}}Et.abi=wt;const At=[{inputs:[{internalType:"contract IERC20",name:"_underlying",type:"address"},{internalType:"contract IERC20",name:"_bond",type:"address"},{internalType:"uint256",name:"_expiration",type:"uint256"},{internalType:"uint256",name:"_unitSeconds",type:"uint256"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"uint256",name:"_percentFee",type:"uint256"},{internalType:"uint256",name:"_percentFeeGov",type:"uint256"},{internalType:"address",name:"_governance",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"collectedBase",type:"uint256"},{indexed:!1,internalType:"uint256",name:"collectedBond",type:"uint256"},{indexed:!1,internalType:"uint256",name:"remainingBase",type:"uint256"},{indexed:!1,internalType:"uint256",name:"remainingBond",type:"uint256"}],name:"FeeCollection",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,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:"FEE_BOUND",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"bond",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"bondDecimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"expiration",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feesBond",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"feesUnderlying",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"increaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"currentBalances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"protocolSwapFee",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"currentBalances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"protocolSwapFee",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256",name:"currentBalanceTokenIn",type:"uint256"},{internalType:"uint256",name:"currentBalanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"percentFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"percentFeeGov",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"reserveX",type:"uint256"},{internalType:"uint256",name:"reserveY",type:"uint256"},{internalType:"bool",name:"out",type:"bool"}],name:"solveTradeInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"underlying",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"underlyingDecimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"unitSeconds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}];class St{static createInterface(){return new r.utils.Interface(At)}static connect(e,t){return new r.Contract(e,At,t)}}St.abi=At;const vt=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}];class kt{static createInterface(){return new r.utils.Interface(vt)}static connect(e,t){return new r.Contract(e,vt,t)}}kt.abi=vt;const Bt=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct ERC4626LinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Ct{static createInterface(){return new r.utils.Interface(Bt)}static connect(e,t){return new r.Contract(e,Bt,t)}}Ct.abi=Bt;const Ot=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"Erc4626LinearPoolCreated",type:"event"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract LinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Mt{static createInterface(){return new r.utils.Interface(Ot)}static connect(e,t){return new r.Contract(e,Ot,t)}}Mt.abi=Ot;const Ft=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct EulerLinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Rt{static createInterface(){return new r.utils.Interface(Ft)}static connect(e,t){return new r.Contract(e,Ft,t)}}Rt.abi=Ft;const Nt=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"_eulerProtocol",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"EulerLinearPoolCreated",type:"event"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"}],name:"create",outputs:[{internalType:"contract LinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eulerProtocol",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Lt{static createInterface(){return new r.utils.Interface(Nt)}static connect(e,t){return new r.Contract(e,Nt,t)}}Lt.abi=Nt;const Dt=[{inputs:[{internalType:"address[]",name:"_assetsToRegister",type:"address[]"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"uint256",name:"_protocolPercentFee",type:"uint256"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"numeraire",type:"address"},{indexed:!0,internalType:"address",name:"reserve",type:"address"},{indexed:!1,internalType:"uint256",name:"weight",type:"uint256"}],name:"AssetIncluded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"derivative",type:"address"},{indexed:!0,internalType:"address",name:"numeraire",type:"address"},{indexed:!0,internalType:"address",name:"reserve",type:"address"},{indexed:!1,internalType:"address",name:"assimilator",type:"address"}],name:"AssimilatorIncluded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"newCollector",type:"address"}],name:"ChangeCollectorAddress",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"isEmergency",type:"bool"}],name:"EmergencyAlarm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"lptAmountBurned",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"amountsWithdrawn",type:"uint256[]"}],name:"EmergencyWithdraw",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feesCollected",type:"uint256"}],name:"FeesAccrued",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"feesCollected",type:"uint256"}],name:"FeesCollected",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"lptAmountBurned",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"amountsWithdrawn",type:"uint256[]"}],name:"OnExitPool",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"lptAmountMinted",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"amountsDeposited",type:"uint256[]"}],name:"OnJoinPool",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"alpha",type:"uint256"},{indexed:!1,internalType:"uint256",name:"beta",type:"uint256"},{indexed:!1,internalType:"uint256",name:"delta",type:"uint256"},{indexed:!1,internalType:"uint256",name:"epsilon",type:"uint256"},{indexed:!1,internalType:"uint256",name:"lambda",type:"uint256"}],name:"ParametersSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"updater",type:"address"},{indexed:!1,internalType:"uint256",name:"newProtocolPercentage",type:"uint256"}],name:"ProtocolFeeShareUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"trader",type:"address"},{indexed:!0,internalType:"address",name:"origin",type:"address"},{indexed:!0,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"originAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"targetAmount",type:"uint256"}],name:"Trade",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_derivative",type:"address"}],name:"assimilator",outputs:[{internalType:"address",name:"assimilator_",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"collectorAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"curve",outputs:[{internalType:"int128",name:"alpha",type:"int128"},{internalType:"int128",name:"beta",type:"int128"},{internalType:"int128",name:"delta",type:"int128"},{internalType:"int128",name:"epsilon",type:"int128"},{internalType:"int128",name:"lambda",type:"int128"},{internalType:"uint256",name:"cap",type:"uint256"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"address",name:"fxPoolAddress",type:"address"},{internalType:"bytes32",name:"poolId",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"derivatives",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"emergency",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_assets",type:"address[]"},{internalType:"uint256[]",name:"_assetWeights",type:"uint256[]"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint256",name:"total_",type:"uint256"},{internalType:"uint256[]",name:"individual_",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"numeraires",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"protocolPercentFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"reserves",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_cap",type:"uint256"}],name:"setCap",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_collectorAddress",type:"address"}],name:"setCollectorAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_emergency",type:"bool"}],name:"setEmergency",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_alpha",type:"uint256"},{internalType:"uint256",name:"_beta",type:"uint256"},{internalType:"uint256",name:"_feeAtHalt",type:"uint256"},{internalType:"uint256",name:"_epsilon",type:"uint256"},{internalType:"uint256",name:"_lambda",type:"uint256"}],name:"setParams",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_protocolPercentFee",type:"uint256"}],name:"setProtocolPercentFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalUnclaimedFeesInNumeraire",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"totalDepositNumeraire",type:"uint256"}],name:"viewDeposit",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"viewParameters",outputs:[{internalType:"uint256",name:"alpha_",type:"uint256"},{internalType:"uint256",name:"beta_",type:"uint256"},{internalType:"uint256",name:"delta_",type:"uint256"},{internalType:"uint256",name:"epsilon_",type:"uint256"},{internalType:"uint256",name:"lambda_",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_curvesToBurn",type:"uint256"}],name:"viewWithdraw",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"}];class Ut{static createInterface(){return new r.utils.Interface(Dt)}static connect(e,t){return new r.Contract(e,Dt,t)}}Ut.abi=Dt;const Vt=[{inputs:[],name:"CLAIM_FREQUENCY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IRewardsOnlyGauge",name:"gauge",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"claimRewardsFromGauge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IRewardsOnlyGauge[]",name:"gauges",type:"address[]"},{internalType:"address",name:"user",type:"address"}],name:"claimRewardsFromGauges",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IRewardsOnlyGauge",name:"gauge",type:"address"},{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"token",type:"address"}],name:"getPendingRewards",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"}];class qt{static createInterface(){return new r.utils.Interface(Vt)}static connect(e,t){return new r.Contract(e,Vt,t)}}qt.abi=Vt;const Gt=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct GearboxLinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Wt{static createInterface(){return new r.utils.Interface(Gt)}static connect(e,t){return new r.Contract(e,Gt,t)}}Wt.abi=Gt;const Ht=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"GearboxLinearPoolCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract GearboxLinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Kt{static createInterface(){return new r.utils.Interface(Ht)}static connect(e,t){return new r.Contract(e,Ht,t)}}Kt.abi=Ht;const $t=[{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"key",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"previousValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newValue",type:"uint256"}],name:"ConfigChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"key",type:"bytes32"}],name:"ConfigFrozen",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"key",type:"bytes32"}],name:"ConfigUnset",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"newGovernor",type:"address"}],name:"GovernorChangeRequested",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldGovernor",type:"address"},{indexed:!1,internalType:"address",name:"newGovernor",type:"address"}],name:"GovernorChanged",type:"event"},{inputs:[],name:"acceptGovernance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newGovernor",type:"address"}],name:"changeGovernor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"freeze",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"},{internalType:"address",name:"defaultValue",type:"address"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"getConfigMeta",outputs:[{internalType:"uint8",name:"",type:"uint8"},{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"getUint",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"governor",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"hasKey",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_governor",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"listKeys",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"pendingGovernor",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"},{internalType:"address",name:"newValue",type:"address"}],name:"setAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"},{internalType:"uint256",name:"newValue",type:"uint256"}],name:"setUint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"unset",outputs:[],stateMutability:"nonpayable",type:"function"}];class Jt{static createInterface(){return new r.utils.Interface($t)}static connect(e,t){return new r.Contract(e,$t,t)}}Jt.abi=$t;const jt=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IwstETH",name:"wstETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"swapAmounts",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getStETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWstETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"swapAmount",type:"uint256"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];class Xt{static createInterface(){return new r.utils.Interface(jt)}static connect(e,t){return new r.Contract(e,jt,t)}}Xt.abi=jt;const Yt=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],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:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class zt{static createInterface(){return new r.utils.Interface(Yt)}static connect(e,t){return new r.Contract(e,Yt,t)}}zt.abi=Yt;const Zt=[{name:"Deposit",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Withdraw",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"UpdateLiquidityLimit",inputs:[{name:"user",type:"address",indexed:!0},{name:"original_balance",type:"uint256",indexed:!1},{name:"original_supply",type:"uint256",indexed:!1},{name:"working_balance",type:"uint256",indexed:!1},{name:"working_supply",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Transfer",inputs:[{name:"_from",type:"address",indexed:!0},{name:"_to",type:"address",indexed:!0},{name:"_value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Approval",inputs:[{name:"_owner",type:"address",indexed:!0},{name:"_spender",type:"address",indexed:!0},{name:"_value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{stateMutability:"nonpayable",type:"constructor",inputs:[{name:"minter",type:"address"},{name:"veBoostProxy",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"},{name:"_addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"},{name:"_addr",type:"address"},{name:"_claim_rewards",type:"bool"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[{name:"_value",type:"uint256"},{name:"_claim_rewards",type:"bool"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[{name:"_addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[{name:"_addr",type:"address"},{name:"_receiver",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"transferFrom",inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"transfer",inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"approve",inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"permit",inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"},{name:"_value",type:"uint256"},{name:"_deadline",type:"uint256"},{name:"_v",type:"uint8"},{name:"_r",type:"bytes32"},{name:"_s",type:"bytes32"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"increaseAllowance",inputs:[{name:"_spender",type:"address"},{name:"_added_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"decreaseAllowance",inputs:[{name:"_spender",type:"address"},{name:"_subtracted_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"user_checkpoint",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"set_rewards_receiver",inputs:[{name:"_receiver",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"kick",inputs:[{name:"addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit_reward_token",inputs:[{name:"_reward_token",type:"address"},{name:"_amount",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"add_reward",inputs:[{name:"_reward_token",type:"address"},{name:"_distributor",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"set_reward_distributor",inputs:[{name:"_reward_token",type:"address"},{name:"_distributor",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"set_killed",inputs:[{name:"_is_killed",type:"bool"}],outputs:[]},{stateMutability:"view",type:"function",name:"claimed_reward",inputs:[{name:"_addr",type:"address"},{name:"_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_reward",inputs:[{name:"_user",type:"address"},{name:"_reward_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_reward_write",inputs:[{name:"_addr",type:"address"},{name:"_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_tokens",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_checkpoint",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"future_epoch_time",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"inflation_rate",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"decimals",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"version",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"allowance",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"nonpayable",type:"function",name:"initialize",inputs:[{name:"_lp_token",type:"address"}],outputs:[]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"symbol",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"DOMAIN_SEPARATOR",inputs:[],outputs:[{name:"",type:"bytes32"}]},{stateMutability:"view",type:"function",name:"nonces",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"factory",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"lp_token",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"is_killed",inputs:[],outputs:[{name:"",type:"bool"}]},{stateMutability:"view",type:"function",name:"reward_count",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"reward_data",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"tuple",components:[{name:"token",type:"address"},{name:"distributor",type:"address"},{name:"period_finish",type:"uint256"},{name:"rate",type:"uint256"},{name:"last_update",type:"uint256"},{name:"integral",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"rewards_receiver",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"reward_integral_for",inputs:[{name:"arg0",type:"address"},{name:"arg1",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"working_balances",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"working_supply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_inv_supply_of",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_checkpoint_of",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_fraction",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"period",inputs:[],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"reward_tokens",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"period_timestamp",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_inv_supply",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"uint256"}]}];class Qt{static createInterface(){return new r.utils.Interface(Zt)}static connect(e,t){return new r.Contract(e,Zt,t)}}Qt.abi=Zt;const ea=[{constant:!1,inputs:[{components:[{name:"target",type:"address"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{name:"blockNumber",type:"uint256"},{name:"returnData",type:"bytes[]"}],payable:!1,stateMutability:"nonpayable",type:"function"}];class ta{static createInterface(){return new r.utils.Interface(ea)}static connect(e,t){return new r.Contract(e,ea,t)}}ta.abi=ea;const aa=[{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes[]",name:"returnData",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3[]",name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3Value[]",name:"calls",type:"tuple[]"}],name:"aggregate3Value",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"blockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getBasefee",outputs:[{internalType:"uint256",name:"basefee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBlockNumber",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"chainid",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockCoinbase",outputs:[{internalType:"address",name:"coinbase",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockDifficulty",outputs:[{internalType:"uint256",name:"difficulty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockGasLimit",outputs:[{internalType:"uint256",name:"gaslimit",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"addr",type:"address"}],name:"getEthBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryAggregate",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryBlockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"}];class na{static createInterface(){return new r.utils.Interface(aa)}static connect(e,t){return new r.Contract(e,aa,t)}}na.abi=aa;const oa=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],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:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class ia{static createInterface(){return new r.utils.Interface(oa)}static connect(e,t){return new r.Contract(e,oa,t)}}ia.abi=oa;const sa=[{inputs:[{internalType:"contract IStaticAToken",name:"_waToken",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"waToken",outputs:[{internalType:"contract IStaticAToken",name:"",type:"address"}],stateMutability:"view",type:"function"}];class ra{static createInterface(){return new r.utils.Interface(sa)}static connect(e,t){return new r.Contract(e,sa,t)}}ra.abi=sa;const pa=[{inputs:[{internalType:"contract IAuthorizer",name:"authorizer",type:"address"},{internalType:"contract IWETH",name:"weth",type:"address"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"AuthorizerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExternalBalanceTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"feeAmount",type:"uint256"}],name:"FlashLoan",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"delta",type:"int256"}],name:"InternalBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"liquidityProvider",type:"address"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"deltas",type:"int256[]"},{indexed:!1,internalType:"uint256[]",name:"protocolFeeAmounts",type:"uint256[]"}],name:"PoolBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"assetManager",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"cashDelta",type:"int256"},{indexed:!1,internalType:"int256",name:"managedDelta",type:"int256"}],name:"PoolBalanceManaged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"poolAddress",type:"address"},{indexed:!1,internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"PoolRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"RelayerApprovalChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"contract IERC20",name:"tokenIn",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"tokenOut",type:"address"},{indexed:!1,internalType:"uint256",name:"amountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amountOut",type:"uint256"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"TokensDeregistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"TokensRegistered",type:"event"},{inputs:[],name:"WETH",outputs:[{internalType:"contract IWETH",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"assetDeltas",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"deregisterTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"flashLoan",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"getInternalBalance",outputs:[{internalType:"uint256[]",name:"balances",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"enum IVault.PoolSpecialization",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"}],name:"getPoolTokenInfo",outputs:[{internalType:"uint256",name:"cash",type:"uint256"},{internalType:"uint256",name:"managed",type:"uint256"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"assetManager",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPoolTokens",outputs:[{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract ProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"relayer",type:"address"}],name:"hasApprovedRelayer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.PoolBalanceOpKind",name:"kind",type:"uint8"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct IVault.PoolBalanceOp[]",name:"ops",type:"tuple[]"}],name:"managePoolBalance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.UserBalanceOpKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct IVault.UserBalanceOp[]",name:"ops",type:"tuple[]"}],name:"manageUserBalance",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"}],name:"queryBatchSwap",outputs:[{internalType:"int256[]",name:"",type:"int256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"registerPool",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"registerTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"setAuthorizer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"relayer",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setRelayerApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"amountCalculated",type:"uint256"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];class la{static createInterface(){return new r.utils.Interface(pa)}static connect(e,t){return new r.Contract(e,pa,t)}}la.abi=pa;const da=[{inputs:[{components:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"address[]",name:"assetManagers",type:"address[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],internalType:"struct WeightedPool.NewPoolParams",name:"params",type:"tuple"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"feeType",type:"uint256"},{indexed:!1,internalType:"uint256",name:"protocolFeePercentage",type:"uint256"}],name:"ProtocolFeePercentageCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getATHRateProduct",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getActualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastPostJoinExitInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"feeType",type:"uint256"}],name:"getProtocolFeePercentageCache",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolSwapFeeDelegation",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRateProviders",outputs:[{internalType:"contract IRateProvider[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"updateProtocolFeePercentageCache",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class ua{static createInterface(){return new r.utils.Interface(da)}static connect(e,t){return new r.Contract(e,da,t)}}ua.abi=da;const ca=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class ya{static createInterface(){return new r.utils.Interface(ca)}static connect(e,t){return new r.Contract(e,ca,t)}}ya.abi=ca;const ba=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct YearnLinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class ma{static createInterface(){return new r.utils.Interface(ba)}static connect(e,t){return new r.Contract(e,ba,t)}}ma.abi=ba;const fa=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"YearnLinearPoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract LinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Ta{static createInterface(){return new r.utils.Interface(fa)}static connect(e,t){return new r.Contract(e,fa,t)}}Ta.abi=fa;const ha=[{inputs:[{components:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"token0",type:"address"},{internalType:"contract IERC20",name:"token1",type:"address"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"address",name:"owner",type:"address"}],internalType:"struct ExtensibleWeightedPool2Tokens.NewPoolParams",name:"baseParams",type:"tuple"},{components:[{internalType:"int256",name:"alpha",type:"int256"},{internalType:"int256",name:"beta",type:"int256"},{internalType:"int256",name:"c",type:"int256"},{internalType:"int256",name:"s",type:"int256"},{internalType:"int256",name:"lambda",type:"int256"}],internalType:"struct GyroECLPMath.Params",name:"eclpParams",type:"tuple"},{components:[{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],internalType:"struct GyroECLPMath.Vector2",name:"tauAlpha",type:"tuple"},{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],internalType:"struct GyroECLPMath.Vector2",name:"tauBeta",type:"tuple"},{internalType:"int256",name:"u",type:"int256"},{internalType:"int256",name:"v",type:"int256"},{internalType:"int256",name:"w",type:"int256"},{internalType:"int256",name:"z",type:"int256"},{internalType:"int256",name:"dSq",type:"int256"}],internalType:"struct GyroECLPMath.DerivedParams",name:"derivedEclpParams",type:"tuple"},{internalType:"address",name:"rateProvider0",type:"address"},{internalType:"address",name:"rateProvider1",type:"address"},{internalType:"address",name:"capManager",type:"address"},{components:[{internalType:"bool",name:"capEnabled",type:"bool"},{internalType:"uint120",name:"perAddressCap",type:"uint120"},{internalType:"uint128",name:"globalCap",type:"uint128"}],internalType:"struct ICappedLiquidity.CapParams",name:"capParams",type:"tuple"},{internalType:"address",name:"pauseManager",type:"address"}],internalType:"struct GyroECLPPool.GyroParams",name:"params",type:"tuple"},{internalType:"address",name:"configAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"capManager",type:"address"}],name:"CapManagerUpdated",type:"event"},{anonymous:!1,inputs:[{components:[{internalType:"bool",name:"capEnabled",type:"bool"},{internalType:"uint120",name:"perAddressCap",type:"uint120"},{internalType:"uint128",name:"globalCap",type:"uint128"}],indexed:!1,internalType:"struct ICappedLiquidity.CapParams",name:"params",type:"tuple"}],name:"CapParamsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"derivedParamsValidated",type:"bool"}],name:"ECLPDerivedParamsValidated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paramsValidated",type:"bool"}],name:"ECLPParamsValidated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"invariantAfterJoin",type:"uint256"}],name:"InvariantAterInitializeJoin",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"oldInvariant",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newInvariant",type:"uint256"}],name:"InvariantOldAndNew",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"OracleEnabledChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"oracleUpdatedIndex",type:"uint256"}],name:"OracleIndexUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldPauseManager",type:"address"},{indexed:!1,internalType:"address",name:"newPauseManager",type:"address"}],name:"PauseManagerChanged",type:"event"},{anonymous:!1,inputs:[],name:"PausedLocally",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256[]",name:"balances",type:"uint256[]"},{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],indexed:!1,internalType:"struct GyroECLPMath.Vector2",name:"invariant",type:"tuple"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"SwapParams",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[],name:"UnpausedLocally",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"_dSq",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsAlpha",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsBeta",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsC",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsLambda",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsS",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_tauAlphaX",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_tauAlphaY",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_tauBetaX",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_tauBetaY",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_u",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_v",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_w",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_z",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"capManager",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"capParams",outputs:[{components:[{internalType:"bool",name:"capEnabled",type:"bool"},{internalType:"uint120",name:"perAddressCap",type:"uint120"},{internalType:"uint128",name:"globalCap",type:"uint128"}],internalType:"struct ICappedLiquidity.CapParams",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_pauseManager",type:"address"}],name:"changePauseManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"startIndex",type:"uint256"},{internalType:"uint256",name:"endIndex",type:"uint256"}],name:"dirtyUninitializedOracleSamples",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getECLPParams",outputs:[{components:[{internalType:"int256",name:"alpha",type:"int256"},{internalType:"int256",name:"beta",type:"int256"},{internalType:"int256",name:"c",type:"int256"},{internalType:"int256",name:"s",type:"int256"},{internalType:"int256",name:"lambda",type:"int256"}],internalType:"struct GyroECLPMath.Params",name:"params",type:"tuple"},{components:[{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],internalType:"struct GyroECLPMath.Vector2",name:"tauAlpha",type:"tuple"},{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],internalType:"struct GyroECLPMath.Vector2",name:"tauBeta",type:"tuple"},{internalType:"int256",name:"u",type:"int256"},{internalType:"int256",name:"v",type:"int256"},{internalType:"int256",name:"w",type:"int256"},{internalType:"int256",name:"z",type:"int256"},{internalType:"int256",name:"dSq",type:"int256"}],internalType:"struct GyroECLPMath.DerivedParams",name:"d",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLargestSafeQueryWindow",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"}],name:"getLatest",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiscData",outputs:[{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"logTotalSupply",type:"int256"},{internalType:"uint256",name:"oracleSampleCreationTimestamp",type:"uint256"},{internalType:"uint256",name:"oracleIndex",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAccumulatorQuery[]",name:"queries",type:"tuple[]"}],name:"getPastAccumulators",outputs:[{internalType:"int256[]",name:"results",type:"int256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPrice",outputs:[{internalType:"uint256",name:"spotPrice",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getSample",outputs:[{internalType:"int256",name:"logPairPrice",type:"int256"},{internalType:"int256",name:"accLogPairPrice",type:"int256"},{internalType:"int256",name:"logBptPrice",type:"int256"},{internalType:"int256",name:"accLogBptPrice",type:"int256"},{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"accLogInvariant",type:"int256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"secs",type:"uint256"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAverageQuery[]",name:"queries",type:"tuple[]"}],name:"getTimeWeightedAverage",outputs:[{internalType:"uint256[]",name:"results",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenRates",outputs:[{internalType:"uint256",name:"rate0",type:"uint256"},{internalType:"uint256",name:"rate1",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalSamples",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"gyroConfig",outputs:[{internalType:"contract IGyroConfig",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pauseManager",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"rateProvider0",outputs:[{internalType:"contract IRateProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"rateProvider1",outputs:[{internalType:"contract IRateProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_capManager",type:"address"}],name:"setCapManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bool",name:"capEnabled",type:"bool"},{internalType:"uint120",name:"perAddressCap",type:"uint120"},{internalType:"uint128",name:"globalCap",type:"uint128"}],internalType:"struct ICappedLiquidity.CapParams",name:"params",type:"tuple"}],name:"setCapParams",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"}];class Ia{static createInterface(){return new r.utils.Interface(ha)}static connect(e,t){return new r.Contract(e,ha,t)}}Ia.abi=ha;const ga=[{name:"Deposit",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1},{name:"locktime",type:"uint256",indexed:!0},{name:"type",type:"int128",indexed:!1},{name:"ts",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Withdraw",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1},{name:"ts",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Supply",inputs:[{name:"prevSupply",type:"uint256",indexed:!1},{name:"supply",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{stateMutability:"nonpayable",type:"constructor",inputs:[{name:"token_addr",type:"address"},{name:"_name",type:"string"},{name:"_symbol",type:"string"},{name:"_authorizer_adaptor",type:"address"}],outputs:[]},{stateMutability:"view",type:"function",name:"token",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"symbol",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"decimals",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"admin",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"nonpayable",type:"function",name:"commit_smart_wallet_checker",inputs:[{name:"addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"apply_smart_wallet_checker",inputs:[],outputs:[]},{stateMutability:"view",type:"function",name:"get_last_user_slope",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"user_point_history__ts",inputs:[{name:"_addr",type:"address"},{name:"_idx",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"locked__end",inputs:[{name:"_addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"nonpayable",type:"function",name:"checkpoint",inputs:[],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit_for",inputs:[{name:"_addr",type:"address"},{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"create_lock",inputs:[{name:"_value",type:"uint256"},{name:"_unlock_time",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"increase_amount",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"increase_unlock_time",inputs:[{name:"_unlock_time",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[],outputs:[]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"addr",type:"address"},{name:"_t",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"balanceOfAt",inputs:[{name:"addr",type:"address"},{name:"_block",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[{name:"t",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupplyAt",inputs:[{name:"_block",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"supply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"locked",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"tuple",components:[{name:"amount",type:"int128"},{name:"end",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"epoch",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"point_history",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"tuple",components:[{name:"bias",type:"int128"},{name:"slope",type:"int128"},{name:"ts",type:"uint256"},{name:"blk",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"user_point_history",inputs:[{name:"arg0",type:"address"},{name:"arg1",type:"uint256"}],outputs:[{name:"",type:"tuple",components:[{name:"bias",type:"int128"},{name:"slope",type:"int128"},{name:"ts",type:"uint256"},{name:"blk",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"user_point_epoch",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"slope_changes",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"future_smart_wallet_checker",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"smart_wallet_checker",inputs:[],outputs:[{name:"",type:"address"}]}];class _a{static createInterface(){return new r.utils.Interface(ga)}static connect(e,t){return new r.Contract(e,ga,t)}}_a.abi=ga;const xa=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IERC20",name:"votingEscrow",type:"address"},{internalType:"contract IVeDelegation",name:"delegation",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newImplementation",type:"address"}],name:"DelegationImplementationUpdated",type:"event"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"adjustedBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"adjusted_balance_of",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDelegationImplementation",outputs:[{internalType:"contract IVeDelegation",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVotingEscrow",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"killDelegation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IVeDelegation",name:"delegation",type:"address"}],name:"setDelegation",outputs:[],stateMutability:"nonpayable",type:"function"}];class Pa{static createInterface(){return new r.utils.Interface(xa)}static connect(e,t){return new r.Contract(e,xa,t)}}Pa.abi=xa;var wa,Ea=Object.freeze({__proto__:null,AaveLinearPool__factory:it,AaveLinearPoolFactory__factory:rt,AaveWrapping__factory:lt,Authoriser__factory:ut,BalancerHelpers__factory:yt,BalancerMinter__factory:mt,BalancerPoolDataQueries__factory:Tt,BalancerRelayer__factory:It,BatchRelayerLibrary__factory:_t,ComposableStablePool__factory:Pt,ComposableStablePoolFactory__factory:Et,ConvergentCurvePool__factory:St,ERC20__factory:kt,ERC4626LinearPool__factory:Ct,ERC4626LinearPoolFactory__factory:Mt,EulerLinearPool__factory:Rt,EulerLinearPoolFactory__factory:Lt,FXPool__factory:Ut,GaugeClaimHelper__factory:qt,GearboxLinearPool__factory:Wt,GearboxLinearPoolFactory__factory:Kt,GyroConfig__factory:Jt,LidoRelayer__factory:Xt,LinearPool__factory:zt,LiquidityGaugeV5__factory:Qt,Multicall__factory:ta,Multicall3__factory:na,StablePool__factory:ia,StaticATokenRateProvider__factory:ra,Vault__factory:la,WeightedPool__factory:ua,WeightedPoolFactory__factory:ya,YearnLinearPool__factory:ma,YearnLinearPoolFactory__factory:Ta,GyroEV2__factory:Ia,VeBal__factory:_a,VeDelegationProxy__factory:Pa});function Aa(e,n,o,i,s,r){const p=new Array(s.length).fill(t.Zero);return s.forEach(((s,l)=>{if(e.some((e=>Je(s,e)))){const e=a.BigNumber.from(r).add(t.WeiPerEther);p[l]=o===exports.SwapType.SwapExactOut?p[l].add(a.BigNumber.from(i[l]).mul(e).div(t.WeiPerEther)):p[l].add(i[l])}if(n.some((e=>Je(s,e)))){const e=t.WeiPerEther.sub(a.BigNumber.from(r));p[l]=o===exports.SwapType.SwapExactIn?p[l].add(a.BigNumber.from(i[l]).mul(e).div(t.WeiPerEther)):p[l].add(i[l])}})),p}exports.SwapType=void 0,(wa=exports.SwapType||(exports.SwapType={}))[wa.SwapExactIn=0]="SwapExactIn",wa[wa.SwapExactOut=1]="SwapExactOut";var Sa={1:{contracts:{aaveLinearPoolFactory:"0x0b576c1245f479506e7c8bbc4db4db07c1cd31f9",arbitrumRootGauge:"0x6337949cbc4825bbd09242c811770f6f6fee9ffc",arbitrumRootGaugeFactory:"0x1c99324edc771c82a0dccb780cc7dda0045e50e7",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x8f42adbba1b16eaae3bb5754915e0d06059add75",authorizerAdaptorEntrypoint:"0xf5decdb1f3d1ee384908fbe16d2f0348ae43a9ea",authorizerWithAdaptorValidation:"0x6048a8c631fb7e77eca533cf9c29784e482391e7",avalancheRootGauge:"0xc57b4be50bf6bbe5f6a4fe379da342b32b37bf2f",avalancheRootGaugeFactory:"0x10f3e79911a490aa5b5d5cda6f111029c4eab5ac",bal:"0xba100000625a3754423978a60c9317c58a424e3d",balancerHelpers:"0x5addcca35b7a0d07c74063c48700c8590e87864e",balancerMinter:"0x239e55f427d44c3cc793f49bfb507ebe76638a2b",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0xfea793aa415061c483d2390414275ad314b3f621",balancerTokenAdmin:"0xf302f9f50958c5593770fdf4d4812309ff77414f",balTokenHolderFactory:"0xb848f50141f3d4255b37ac288c25c109104f2158",batchRelayerLibrary:"0xf77018c0d817da22cadbdf504c00c0d32ce1e5c2",circuitBreakerLib:"0x4967b3353cdf9e5c67421a3890d35f2f3bb50527",composableStablePoolFactory:"0xfada0f4547ab2de89d1304a668c39b3e09aa7c76",distributionScheduler:"0xbd35248f8325dd1cb2bbf9d01e80a6bb99a792dd",doubleEntrypointFixRelayer:"0xca96c4f198d343e251b1a01f3eba061ef3da73c1",erc4626LinearPoolFactory:"0x813ee7a840ce909e7fea2117a44a90b8063bd4fd",eulerLinearPoolFactory:"0x5f43fba61f63fa6bff101a0a0458cea917f6b347",externalWeightedMath:"0x3db89f0ca3b388f2bcdbccd2ff8e13c22459cf75",feeDistributor:"0xd3cf852898b21fc233251427c2dc93d3d604f3bb",gaugeAdder:"0x5dbad78818d4c8958eff2d5b95b28385a22113cd",gaugeController:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",gaugeWorkingBalanceHelper:"0xdab2583911e872a00a851fb80dcc78a4b46ba57c",gearboxLinearPoolFactory:"0x39a79eb449fc05c92c39aa6f0e9bfac03be8de5b",gnosisRootGauge:"0x05277ce7d1e365d660624612d8b8b9b55bfd4518",gnosisRootGaugeFactory:"0x2a18b396829bc29f66a1e59fadd7a0269a6605e8",l2GaugeCheckpointer:"0x343688c5cb92115a52ca485af7f62b4b7a2e9ccc",liquidityGaugeFactory:"0xf1665e19bc105be4edd3739f88315cc699cc5b65",liquidityGaugeV5:"0xe5f96070ca00cd54795416b1a4b4c2403231c548",managedPoolAddRemoveTokenLib:"0x4148bf5b0688ed0a87f317c6534cb841f503349e",managedPoolAmmLib:"0xb37646acbb1a91287721b2cdbe01ba0dba5e57a2",managedPoolFactory:"0xbf904f9f340745b4f0c4702c7b6ab1e808ea6b93",merkleOrchard:"0xe3881627b8deebccf9c23b291430a549fc0be5f7",mockAaveLendingPool:"0x28fa1e40011adf98898e8243b2a48bb21ebf0c29",mockAaveLinearPool:"0x4ce277df0feb5b4d07a0ca2adcf5326e4005239d",mockComposableStablePool:"0x5537f945d8c3fcfdc1b8deceebd220fad26afda8",mockErc4626LinearPool:"0x9516a2d25958edb8da246a320f2c7d94a0dbe25d",mockErc4626Token:"0xb99edc4b289b0f2284fcf3f66884191bdce29624",mockEulerLinearPool:"0xdec02e6642e2c999af429f5ce944653cad15e093",mockEulerToken:"0xc101dca301a4011c1f925e9622e749e550a1b667",mockGearboxDieselToken:"0xb7a32b67aadb3866cc5c2fabc6c6ab8a9027c3c1",mockGearboxLinearPool:"0x0d05aac44ac7dd3c7ba5d50be93eb884a057d234",mockGearboxVault:"0xc7b779ab638b7a59f490ac95199502343a81e006",mockManagedPool:"0xd0cbf6765997b7ca7be6440f5e305b2ec7b96065",mockShareToken:"0x192e67544694a7baa2dea94f9b1df58bb3395a12",mockSilo:"0x66c94ae8d795e98f69ca65ffac87b38b17be3ca2",mockSiloLinearPool:"0x74cbfaf94a3577c539a9dcee9870a6349a33b34f",mockSiloRepository:"0x8e2dfc5e111dbe14e9d725210b9342688dd51c6c",mockStaticAToken:"0x1f3c910c416ed2340150281c5eb93325c38817a1",mockWeightedPool:"0x8055b8c947de30130bc1ec750c8f345a50006b23",mockYearnLinearPool:"0xac5b4ef7ede2f2843a704e96dcaa637f4ba3dc3f",mockYearnTokenVault:"0x806e02dea8d4a0882cad9fa3fa75b212328692de",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",omniVotingEscrowAdaptor:"0x96484f2abf5e58b15176dbf1a799627b53f13b6d",optimismRootGauge:"0xbc230b1a66a138cd9cfc7b352390025978dfadde",optimismRootGaugeFactory:"0x866d4b65694c66fbfd15dd6fa933d0a6b3940a36",polygonRootGauge:"0xfeb1a24c2752e53576133cdb718f25bc64ebdd52",polygonRootGaugeFactory:"0xa98bce70c92ad2ef3288dbcd659bc0d6b62f8f13",polygonZkEvmRootGauge:"0x45bf48d996d22afc9bc150df7fb4d13a49088602",polygonZkEvmRootGaugeFactory:"0x9bf951848288ccd87d06fac426150262cd3447de",poolRecoveryHelper:"0x1b300c86980a5195bcf49bd419a068d98dc133db",preseededVotingEscrowDelegation:"0xb496ff44746a8693a060fafd984da41b253f6790",protocolFeePercentagesProvider:"0x97207b095e4d5c9a6e4cfbfcd2c3358e03b90c4a",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x5ef4c5352882b10893b70dbcaa0c000965bd23c5",protocolIdRegistry:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",recoveryModeHelper:"0x7827108af2fd9910ea7cf361d9b827941fa7d809",siloLinearPoolFactory:"0x4e11aeec21baf1660b1a46472963cb3da7811c89",singleRecipientGauge:"0xb2007b8b7e0260042517f635cfd8e6dd2dd7f007",singleRecipientGaugeFactory:"0x4fb47126fa83a8734991e41b942ac29a3266c968",smartWalletChecker:"0x7869296efd0a76872fee62a058c8fbca5c1c826c",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x67f8df125b796b05895a6dc8ecf944b9556ecb0b",votingEscrow:"0xc128a9954e6c874ea3d62ce62b468ba073093f25",votingEscrowDelegation:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",votingEscrowDelegationProxy:"0x6f5a2ee11e7a772aeb5114a20d0d7c0ff61eb8a0",votingEscrowRemapper:"0x83e443ef4f9963c77bd860f94500075556668cb8",weightedPoolFactory:"0x897888115ada5773e02aa29f775430bfb5f34c51",weth:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",wstEthRateProvider:"0x72d07d7dca67b8a406ad1ec34ce969c90bfee768",yearnLinearPoolFactory:"0x5f5222ffa40f2aed6380d022184d6ea67c776ee0"},tokens:{AAVE:"0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",aFEI:"0x683923db55fead99a79fa01a27eec3cb19679cc3",aFRAX:"0xd4937682df3c8aef4fe912a96a74121c0829e664",ALCX:"0xdbdb4d16eda451d0503b854cf79d55697f90c8df",alUSD:"0xbc6da0fe9ad5f3b0d58160288917aa56653660e9",ANGLE:"0x31429d1856ad1377a8a0079410b297e1a9e214c2",AURA:"0xc0c293ce456ff0ed870add98a0828dd4d2903dbf",AURABAL:"0x616e8bfa43f920657b3497dbf40d6b1a02d4608d",aUSDC:"0xbcca60bb61934080951369a648fb03df4f96263c",aUSDT:"0x3ed3b47dd13ec9a98b44e6204a523e766b225811",aWBTC:"0x9ff58f4ffb29fa2266ab25e75e2a8b3503311656",BADGER:"0x3472a5a71965499acd81997a54bba8d852c6e53d",BAL:"0xba100000625a3754423978a60c9317c58a424e3d",BalWeth8020:"0x5c6ee304399dbdb9c8ef030ab642b10820db8f56",bb_a_usd:"0xa13a9247ea42d743238089903570127dda72fe44",cDAI:"0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",cETH:"0x4ddc2d193948926d02f9b1fe9e1daa0718270ed5",COMP:"0xc00e94cb662c3520282e6f5717214004a7f26888",CRV:"0xd533a949740bb3306d119cc777fa900ba034cd52",cUSDC:"0x39aa39c021dfbae8fac545936693ac917d5e7563",CVX:"0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b",cvxCRV:"0x62b9c7356a2dc64a1969e19c23e4f579f9810aa7",DAI:"0x6b175474e89094c44da98b954eedeac495271d0f",DIGG:"0x798d1be841a82a273720ce31c822c61a67a601c3",DUSD:"0x5bc25f649fc4e26069ddf4cf4010f9f706c23831",ENS:"0xc18360217d8f7ab5e7c516566761ea12ce7f9d72",EURS:"0xdb25f211ab05b1c97d595516f45794528a807ad8",FARM:"0xa0246c9032bc3a600820415ae600c6388619a14d",FEI:"0x956f47f50a910163d8bf957cf5846d573e7f87ca",FRAX:"0x853d955acef822db058eb8505911ed77f175b99e",FTM:"0x4e15361fd6b4bb609fa63c81a2be19d873717870",FXS:"0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0",GEAR:"0xba3335588d9403515223f109edc4eb7269a9ab5d",GTC:"0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",LINK:"0x514910771af9ca656af840dff83e8264ecf986ca",MIM:"0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3",renBTC:"0xeb4c2781e4eba804ce9a9803c67d0893436bb27d",RETH:"0xae78736cd615f374d3085123a210448e74fc6393",sBTC:"0xfe18be6b3bd88a2d2a7f928d00292e7a9963cfc6",SPELL:"0x090185f2135308bad17527004364ebcc2d37e5f6",stkAAVE:"0x4da27a545c0c5b758a6ba100e3a049001de870f5",SUSHI:"0x6b3595068778dd592e39a122f4f5a5cf09c90fe2",USDC:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",USDT:"0xdac17f958d2ee523a2206206994597c13d831ec7",WBTC:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",WETH:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",xSUSHI:"0x8798249c2e607446efb7ad49ec89dd1865ff4272"}},4:{contracts:{authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",balancerHelpers:"0x5addcca35b7a0d07c74063c48700c8590e87864e",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x41b953164995c11c81da73d212ed8af25741b7ac",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8"},tokens:{}},5:{contracts:{authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x5d90225de345ee24d1d2b6f45de90b056f5265a1",authorizerAdaptorEntrypoint:"0xacaac3e6d6df918bf3c809dfc7d42de0e4a72d4c",authorizerWithAdaptorValidation:"0x8ea89804145c007e7d226001a96955ad53836087",bal:"0xfa8449189744799ad2ace7e0ebac8bb7575eff47",balancerHelpers:"0x5addcca35b7a0d07c74063c48700c8590e87864e",balancerMinter:"0xdf0399539a72e2689b8b2dd53c3c2a0883879fdd",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0x03f1ab8b19bce21eb06c364aec9e40322572a1e9",balancerTokenAdmin:"0x0f32d7d830e20809bcb9071581a696135dd472b7",balTokenHolderFactory:"0x45e617b07021b97407367624648d1a0a358a751a",batchRelayerLibrary:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",childChainGauge:"0x6b5da774890db7b7b96c6f44e6a4b0f657399e2e",childChainGaugeFactory:"0x7ba29fe8e83dd6097a7298075c4affdbda3121cc",childChainGaugeRewardHelper:"0xc128a9954e6c874ea3d62ce62b468ba073093f25",childChainGaugeTokenAdder:"0x55b18f514d7f0c6c886d0c23ac72df5d3b5f8850",childChainLiquidityGaugeFactory:"0x393b918cc2ffa238732e83dd4ee52343f57d767b",childChainStreamer:"0x5b5b72d76b68f4bb1d2a10ef0fc77711f8ec7ed0",circuitBreakerLib:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",composableStablePoolFactory:"0x1802953277fd955f9a254b80aa0582f193cf1d77",distributionScheduler:"0x05a0bf0540f346b6dac25550738343beb51c0f65",doubleEntrypointFixRelayer:"0xbe9458ab5b6f289e524410141c8d5e20a6b035fe",eulerLinearPoolFactory:"0x813ee7a840ce909e7fea2117a44a90b8063bd4fd",externalWeightedMath:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",feeDistributor:"0x42b67611b208e2e9b4cc975f6d74c87b865ae066",gaugeAdder:"0x3f170631ed9821ca51a59d996ab095162438dc10",gaugeController:"0xbb1ce49b16d55a1f2c6e88102f32144c7334b116",gaugeWorkingBalanceHelper:"0xa7d524046ef89de9f8e4f2d7b029f66ccb738d48",l2BalancerPseudoMinter:"0x81cfae226343b24ba12ec6521db2c79e7aeeb310",l2LayerZeroBridgeForwarder:"0xef44d6786b2b4d544b7850fe67ce6381626bf2d6",liquidityGaugeFactory:"0x3b8ca519122cdd8efb272b0d3085453404b25bd0",liquidityGaugeV5:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",managedPoolAddRemoveTokenLib:"0xacf05be5134d64d150d153818f8c67ee36996650",managedPoolAmmLib:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",managedPoolFactory:"0x03f3fb107e74f2eac9358862e91ad3c692712054",merkleOrchard:"0x5cf4928a3205728bd12830e1840f7db85c62a4b9",mockComposableStablePool:"0x5d343d374a769d1ab102e0418a516dadb08a86e4",mockEulerLinearPool:"0x43fa2c00419f60e18966aa043debd4701cb91b6d",mockEulerToken:"0xb99edc4b289b0f2284fcf3f66884191bdce29624",mockManagedPool:"0xff79b51ec2934dd1810a8e0325e3b08708720b26",mockShareToken:"0xb8bdcbf8ccf443d055d5ffe1d8154fac8187fc94",mockSilo:"0xa7a7e22398622bf71ff31dae5355ec7843b13806",mockSiloLinearPool:"0xbbb66a4fff47701ec6c528db615f5e7bf1abdaaf",mockSiloRepository:"0x7153de1a6d71360f07017838c28deca0d6c03e2a",mockWeightedPool:"0x072ed560cc042d7ab1c080a9e4fa8c6f4858deb3",noProtocolFeeLiquidityBootstrappingPoolFactory:"0xb0c726778c3ae4b3454d85557a48e8fa502bdd6a",nullVotingEscrow:"0xa523f47a933d5020b23629ddf689695aa94612dc",omniVotingEscrowAdaptor:"0x83e443ef4f9963c77bd860f94500075556668cb8",poolRecoveryHelper:"0x1cbbe6cea5e4fe7d69c586b4e362a646deef105d",preseededVotingEscrowDelegation:"0x7af980bdbc36d21ce228efabcca35707566a2be5",protocolFeePercentagesProvider:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x85153b639a35d6e6cf8b291aca237fbe67377154",protocolIdRegistry:"0x4fb47126fa83a8734991e41b942ac29a3266c968",recoveryModeHelper:"0x300ab2038eac391f26d9f895dc61f8f66a548833",rewardsOnlyGauge:"0x40bd3faef4268ea40f4c372d7f0a44c3efaaa6b1",siloLinearPoolFactory:"0x30fd8a0f7009f50616afdab4af91a0a2ef4eae49",singleRecipientGauge:"0x0e9addc34f93bccb45d1f744b9f9301285c5b48f",singleRecipientGaugeFactory:"0xe3881627b8deebccf9c23b291430a549fc0be5f7",smartWalletChecker:"0x1b6df1ff5db99f8a8a04d38f7478bab056fa35a7",testBalancerToken:"0xfa8449189744799ad2ace7e0ebac8bb7575eff47",timelockAuthorizer:"0x70e26f740bad6a2cdd762e2478496268882c21d4",timelockAuthorizerMigrator:"0x7159c4b96bfcfca232355b55778e85cf9e245192",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0xd13afc362f619b840c8f4aac1d957ce219ef37ca",votingEscrow:"0x33a99dcc4c85c014cf12626959111d5898bbcabf",votingEscrowDelegation:"0xcff73979321788d59a6170ff012730db2087f31c",votingEscrowDelegationProxy:"0x6817149cb753bf529565b4d023d7507ed2ff4bc0",votingEscrowRemapper:"0x5dbad78818d4c8958eff2d5b95b28385a22113cd",weightedPoolFactory:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",weth:"0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1",wstEthRateProvider:"0x80a94f458491ca88f09767e58a92fd23cbf1196f"},tokens:{}},10:{contracts:{aaveLinearPoolFactory:"0x7396f99b48e7436b152427bfa3dd6aa8c7c6d05b",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x8f42adbba1b16eaae3bb5754915e0d06059add75",authorizerAdaptorEntrypoint:"0xed86ff0c507d3af5f35d3523b77c17415fcffacb",authorizerWithAdaptorValidation:"0xacf05be5134d64d150d153818f8c67ee36996650",bal:"0xfe8b128ba8c78aabc59d4c64cee7ff28e9379921",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0x03f1ab8b19bce21eb06c364aec9e40322572a1e9",batchRelayerLibrary:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",childChainGauge:"0x81cfae226343b24ba12ec6521db2c79e7aeeb310",childChainGaugeFactory:"0xa523f47a933d5020b23629ddf689695aa94612dc",childChainGaugeRewardHelper:"0x8ab784368a1883da90d8513b48801e2db1cb2d5d",childChainGaugeTokenAdder:"0x6f5a2ee11e7a772aeb5114a20d0d7c0ff61eb8a0",childChainLiquidityGaugeFactory:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",childChainStreamer:"0x239e55f427d44c3cc793f49bfb507ebe76638a2b",circuitBreakerLib:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",composableStablePoolFactory:"0x1802953277fd955f9a254b80aa0582f193cf1d77",doubleEntrypointFixRelayer:"0x3b8ca519122cdd8efb272b0d3085453404b25bd0",erc4626LinearPoolFactory:"0x7adbdabaa80f654568421887c12f09e0c7bd9629",externalWeightedMath:"0x8df317a729fcaa260306d7de28888932cb579b88",gaugeWorkingBalanceHelper:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",l2BalancerPseudoMinter:"0x4fb47126fa83a8734991e41b942ac29a3266c968",l2LayerZeroBridgeForwarder:"0xbef13d1e54d0c79da8b0ad704883e1cea7eb2100",managedPoolAddRemoveTokenLib:"0x59562f93c447656f6e4799fc1fc7c3d977c3324f",managedPoolAmmLib:"0xded7fef7d8ecdcb74f22f0169e1a9ec696e6695d",managedPoolFactory:"0x4c32a8a8fda4e24139b51b456b42290f51d6a1c4",mockAaveLendingPool:"0x533a16f90e7d3ca31dbc608e5ec54967710f0d2a",mockAaveLinearPool:"0x45d37982784f022a9864748b4e8750e1e7019604",mockComposableStablePool:"0x11a4cf51bb0bb4d925cadfda61fcda952d64889c",mockErc4626LinearPool:"0x2da61ef3cdcb97efb0f7099c02527fabfe94dee5",mockErc4626Token:"0x4be0e4d6184348c5ba845a4010528cfc779610b8",mockManagedPool:"0xb4af4fdd49da2a2ba9522eadcf86d407a69f19c8",mockStaticAToken:"0x8b7854708c0c54f9d7d1ff351d4f84e6de0e134c",mockWeightedPool:"0x62f5f9a446d198e8e4c84ee56e5217416720edaf",mockYearnLinearPool:"0x34557ef500bfc060b8e3f2da58ef725bb7d32202",mockYearnTokenVault:"0xb15608d28eb43378a7e7780add3fe9bc132baf40",noProtocolFeeLiquidityBootstrappingPoolFactory:"0xf302f9f50958c5593770fdf4d4812309ff77414f",nullVotingEscrow:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",poolRecoveryHelper:"0x26743984e3357efc59f2fd6c1afdc310335a61c9",protocolFeePercentagesProvider:"0xacaac3e6d6df918bf3c809dfc7d42de0e4a72d4c",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0xc128a9954e6c874ea3d62ce62b468ba073093f25",protocolIdRegistry:"0x9805dcfd25e6de36bad8fe9d3fe2c9b44b764102",recoveryModeHelper:"0x3b1eb8eb7b43882b385ab30533d9a2bef9052a98",rewardsOnlyGauge:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x6817149cb753bf529565b4d023d7507ed2ff4bc0",votingEscrowDelegationProxy:"0x9da18982a33fd0c7051b19f0d7c76f2d5e7e017c",weightedPoolFactory:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",weth:"0x4200000000000000000000000000000000000006",yearnLinearPoolFactory:"0x19dfef0a828eec0c85fbb335aa65437417390b85"},tokens:{}},42:{contracts:{authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x97207b095e4d5c9a6e4cfbfcd2c3358e03b90c4a",balancerHelpers:"0x94905e703fead7f0fd0eee355d267ee909784e6d",balancerMinter:"0x1bbfa323155526f54eec458571bb5a75e0c41507",balancerTokenAdmin:"0xab093cd16e765b5b23d34030aafaf026558e0a19",balTokenHolderFactory:"0xa98bce70c92ad2ef3288dbcd659bc0d6b62f8f13",childChainLiquidityGaugeFactory:"0xf9ac7b9df2b3454e841110cce5550bd5ac6f875f",childChainStreamer:"0x4de578134995bea8480d7696946217f356339ab8",gaugeController:"0x35c425234dc42e7402f54cc54573f77842963a56",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x1b57f637ce3408f1f834b0b70f9a595b062daea7",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",rewardsOnlyGauge:"0x868543bb787317632f94fcfe8eb85406b123590c",testBalancerToken:"0xa2d801064652a269d92ee2a59f3261155ec66830",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",votingEscrow:"0x16ba924752ef283c7946db8a122a6742aa35c1dc",votingEscrowDelegation:"0xdc6d62ae091ea77331542042a72e5e38b188837c",votingEscrowDelegationProxy:"0x98d0d0a65cbeccaa647a5a95cf27cf2f00e1231c",wstEthRateProvider:"0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f8"},tokens:{}},100:{contracts:{aaveLinearPoolFactory:"0x62aab12865d7281048c337d53a4dde9d770321e6",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x5addcca35b7a0d07c74063c48700c8590e87864e",authorizerAdaptorEntrypoint:"0x8f42adbba1b16eaae3bb5754915e0d06059add75",authorizerWithAdaptorValidation:"0x03f3fb107e74f2eac9358862e91ad3c692712054",bal:"0x7ef541e2a22058048904fe5744f9c7e4c57af717",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",balancerRelayer:"0x3536fd480ca495ac91e698a703248a8915c137a3",batchRelayerLibrary:"0xb9ad3466cdd42015cc05d4804dc68d562b6a2065",childChainGauge:"0x96484f2abf5e58b15176dbf1a799627b53f13b6d",childChainGaugeFactory:"0x83e443ef4f9963c77bd860f94500075556668cb8",childChainGaugeRewardHelper:"0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd",childChainGaugeTokenAdder:"0x1802953277fd955f9a254b80aa0582f193cf1d77",childChainLiquidityGaugeFactory:"0x809b79b53f18e9bc08a961ed4678b901ac93213a",childChainStreamer:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",circuitBreakerLib:"0x54f8f9d28e26fa5864cfa80f50a5df95fd85f46a",composableStablePoolFactory:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",externalWeightedMath:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",gaugeWorkingBalanceHelper:"0x682f0ddbfd41d1272982f64a499fb62d80e27589",l2BalancerPseudoMinter:"0xa8920455934da4d853faac1f94fe7bef72943ef1",l2LayerZeroBridgeForwarder:"0xeb151668006cd04dadd098afd0a82e78f77076c3",managedPoolAddRemoveTokenLib:"0x4c32a8a8fda4e24139b51b456b42290f51d6a1c4",managedPoolAmmLib:"0xacf05be5134d64d150d153818f8c67ee36996650",managedPoolFactory:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",mockAaveLendingPool:"0x040dba12bb3d5c0a73ddfe84c220be3ddba06966",mockAaveLinearPool:"0x1ac55c31dac78ca943cb8ebfca5945ce09e036e2",mockComposableStablePool:"0xf3678a0b54c61ccd88ce321c2e07f87ac75f08b9",mockManagedPool:"0xc061361fda32ff5b65f7d98acc9a87349d3f0768",mockStaticAToken:"0x35d8f4a4c0e95f3d925cb4cbbbf513a0172ed8a4",mockWeightedPool:"0xd8752f9b0a2c2813796abd2be212a32ffd656ef1",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x85a80afee867adf27b50bdb7b76da70f1e853062",nullVotingEscrow:"0x013d4382f291be5688afbcc741ee8a24c66b2c92",poolRecoveryHelper:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",protocolFeePercentagesProvider:"0x41b953164995c11c81da73d212ed8af25741b7ac",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0xdae7e32adc5d490a43ccba1f0c736033f2b4efca",protocolIdRegistry:"0x6b5da774890db7b7b96c6f44e6a4b0f657399e2e",recoveryModeHelper:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",rewardsOnlyGauge:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x5dbad78818d4c8958eff2d5b95b28385a22113cd",votingEscrowDelegationProxy:"0x7a2535f5fb47b8e44c02ef5d9990588313fe8f05",weightedPoolFactory:"0x6cad2ea22bfa7f4c14aae92e47f510cd5c509bc7",weth:"0xe91d153e0b41518a2ce8dd3d7944fa863463a97d"},tokens:{}},137:{contracts:{aaveLinearPoolFactory:"0xab2372275809e15198a7968c7f324053867cdb0c",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",authorizerAdaptorEntrypoint:"0xab093cd16e765b5b23d34030aafaf026558e0a19",authorizerWithAdaptorValidation:"0x020301b0a99efb6816b41007765fb577259ec418",bal:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",balancerHelpers:"0x239e55f427d44c3cc793f49bfb507ebe76638a2b",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0xd18d5d377eb23362e54fa496597d7e962d56c554",batchRelayerLibrary:"0x4271de2595c3d85d2d455c5778adf2d7ad54322c",childChainGauge:"0xc9b36096f5201ea332db35d6d195774ea0d5988f",childChainGaugeFactory:"0x22625eedd92c81a219a83e1dc48f88d54786b017",childChainGaugeRewardHelper:"0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33",childChainGaugeTokenAdder:"0x1554ee754707d5c93b7934af404747aba521aaf2",childChainLiquidityGaugeFactory:"0x3b8ca519122cdd8efb272b0d3085453404b25bd0",childChainStreamer:"0x6f5a2ee11e7a772aeb5114a20d0d7c0ff61eb8a0",circuitBreakerLib:"0xedfd0a7005a7c72c44ff13bea370c86a9d11bee1",composableStablePoolFactory:"0x6ab5549bbd766a43afb687776ad8466f8b42f777",doubleEntrypointFixRelayer:"0x79d0011892fe558fc5a4ec7d4ca5db59069f460f",erc4626LinearPoolFactory:"0x5c5fcf8fbd4cd563ced27e7d066b88ee20e1867a",externalWeightedMath:"0x72ebafddc4c7d3eb702c81295d90a8b29f008a03",gaugeWorkingBalanceHelper:"0x08fd003d8f1892d4ec684e6c3ee0128081be461b",l2BalancerPseudoMinter:"0x47b489bf5836f83abd928c316f8e39bc0587b020",l2LayerZeroBridgeForwarder:"0xb98f54a74590a6e681ff664b2fa22ebffe1a929e",managedPoolAddRemoveTokenLib:"0xf553bf40db86c35f3058434039d51aad29c6180b",managedPoolAmmLib:"0xcefd59eedafa9ee8ccda1aaf944088e68b5bd890",managedPoolFactory:"0xb8dfa4fd0f083de2b7edc0d5eed5e684e54ba45d",merkleOrchard:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",mockAaveLendingPool:"0x0df6bb26533eb86f371b1f70eecdd955420523c6",mockAaveLinearPool:"0x0889b240a5876aae745ac19f1771853671dc5d36",mockComposableStablePool:"0x0f25823cf786b78696b16536e2f2b9835289ab51",mockErc4626LinearPool:"0xc55ec796a4debe625d95436a3531f4950b11bdcf",mockErc4626Token:"0x19dfef0a828eec0c85fbb335aa65437417390b85",mockManagedPool:"0x074efd7806e6c28e8b6611075b1aa62c6c408090",mockStaticAToken:"0xe72b2780d3c57f781bd4e8572e200cd7e9a447c2",mockWeightedPool:"0xb77e03655ee894aade216a83d05511a9f9895126",mockYearnLinearPool:"0xdae301690004946424e41051ace1791083be42a1",mockYearnTokenVault:"0x28fa1e40011adf98898e8243b2a48bb21ebf0c29",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x41b953164995c11c81da73d212ed8af25741b7ac",nullVotingEscrow:"0x1311fbc9f60359639174c1e7cc2032dbdb5cc4d1",poolRecoveryHelper:"0x495f696430f4a51f7fcb98fbe68a9cb7a07fb1ba",protocolFeePercentagesProvider:"0x42ac0e6fa47385d55aff070d79ef0079868c48a6",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0xef44d6786b2b4d544b7850fe67ce6381626bf2d6",protocolIdRegistry:"0xa523f47a933d5020b23629ddf689695aa94612dc",recoveryModeHelper:"0x1eb79551ca0e83ec145608bc39a0c7f10ca21aa5",rewardsOnlyGauge:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0xd961e30156c2e0d0d925a0de45f931cb7815e970",votingEscrowDelegationProxy:"0x0f08eef2c785aa5e7539684af04755dec1347b7c",weightedPoolFactory:"0xfc8a407bba312ac761d8bfe04ce1201904842b76",weth:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",yearnLinearPoolFactory:"0x0b576c1245f479506e7c8bbc4db4db07c1cd31f9"},tokens:{BAL:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",USDC:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",WBTC:"0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",WETH:"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",WMATIC:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"}},1101:{contracts:{aaveLinearPoolFactory:"0x4b7b369989e613ff2c65768b7cf930cc927f901e",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0xdcdbf71a870cc60c6f9b621e28a7d3ffd6dd4965",authorizerAdaptorEntrypoint:"0xb9ad3466cdd42015cc05d4804dc68d562b6a2065",authorizerWithAdaptorValidation:"0x8df317a729fcaa260306d7de28888932cb579b88",bal:"0x120ef59b80774f02211563834d8e3b72cb1649d6",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0x809b79b53f18e9bc08a961ed4678b901ac93213a",balancerRelayer:"0x4678731dc41142a902a114ac5b2f77b63f4a259d",batchRelayerLibrary:"0x54f8f9d28e26fa5864cfa80f50a5df95fd85f46a",childChainGauge:"0x59562f93c447656f6e4799fc1fc7c3d977c3324f",childChainGaugeFactory:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",circuitBreakerLib:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",composableStablePoolFactory:"0x8ea89804145c007e7d226001a96955ad53836087",erc4626LinearPoolFactory:"0x6b1da720be2d11d95177ccfc40a917c2688f396c",externalWeightedMath:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",gaugeWorkingBalanceHelper:"0xef454a7b3f965d3f6723e462405246f8cd865425",gearboxLinearPoolFactory:"0x687b8c9b41e01be8b591725fac5d5f52d0564d79",l2BalancerPseudoMinter:"0x475d18169be8a89357a9ee3ab00ca386d20fa229",l2LayerZeroBridgeForwarder:"0xded7fef7d8ecdcb74f22f0169e1a9ec696e6695d",managedPoolAddRemoveTokenLib:"0xacf05be5134d64d150d153818f8c67ee36996650",managedPoolAmmLib:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",managedPoolFactory:"0xaf779e58dafb4307b998c7b3c9d3f788dfc80632",mockAaveLendingPool:"0x161f4014c27773840ccb4ec1957113e6dd028846",mockAaveLinearPool:"0xbfd65c6160cfd638a85c645e6e6d8acac5dac935",mockComposableStablePool:"0x6f5f794a3cef904b8517c4c311de2fa837ff24a0",mockErc4626LinearPool:"0xac4b72c01072a52b73ca71105504f1372efcce0d",mockErc4626Token:"0x0c6052254551eae3ecac77b01dfcf1025418828f",mockGearboxDieselToken:"0x698caed853be9cea96c268f565e2b61d3b2bcda4",mockGearboxLinearPool:"0x32f03464fdf909fdf3798f87ff3712b10c59bd86",mockGearboxVault:"0x88ed12a90142fdbfe2a28f7d5b48927254c7e760",mockLiquidityBootstrappingPool:"0x3c87ff3e9307dbebfae720e04c6439e49f79bf9b",mockManagedPool:"0x522ee506a2f63d0ae1d79d6f5dbd9d0bca32c866",mockStaticAToken:"0x4638ab64022927c9bd5947607459d13f57f1551c",mockWeightedPool:"0x78385153d2f356c87001f09bb5424137c618d38b",mockYearnLinearPool:"0x02c9dcb975262719a61f9b40bdf0987ead9add3a",mockYearnTokenVault:"0xdbf7b9f1d2bfba14e42709f84dda3187ee410e38",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x3b1eb8eb7b43882b385ab30533d9a2bef9052a98",nullVotingEscrow:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",poolRecoveryHelper:"0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd",protocolFeePercentagesProvider:"0x1802953277fd955f9a254b80aa0582f193cf1d77",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",protocolIdRegistry:"0x6cad2ea22bfa7f4c14aae92e47f510cd5c509bc7",recoveryModeHelper:"0x300ab2038eac391f26d9f895dc61f8f66a548833",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",votingEscrowDelegationProxy:"0xc7e5ed1054a24ef31d827e6f86caa58b3bc168d7",weightedPoolFactory:"0x03f3fb107e74f2eac9358862e91ad3c692712054",weth:"0x4f9a0e7fd2bf6067db6994cf12e4495df938e6e9",yearnLinearPoolFactory:"0x44d33798dddcdabc93fe6a40c80588033dc502d3"},tokens:{}},8453:{contracts:{aaveLinearPoolFactory:"0x687b8c9b41e01be8b591725fac5d5f52d0564d79",authorizer:"0x809b79b53f18e9bc08a961ed4678b901ac93213a",authorizerAdaptor:"0x6cad2ea22bfa7f4c14aae92e47f510cd5c509bc7",authorizerAdaptorEntrypoint:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",authorizerWithAdaptorValidation:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",bal:"0x4158734d47fc9692176b5085e0f52ee0da5d47f1",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0x300ab2038eac391f26d9f895dc61f8f66a548833",balancerRelayer:"0x76f7204b62f554b79d444588edac9dfa7032c71a",batchRelayerLibrary:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",childChainGauge:"0x59562f93c447656f6e4799fc1fc7c3d977c3324f",childChainGaugeFactory:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",circuitBreakerLib:"0xef454a7b3f965d3f6723e462405246f8cd865425",composableStablePoolFactory:"0x8df317a729fcaa260306d7de28888932cb579b88",erc4626LinearPoolFactory:"0x161f4014c27773840ccb4ec1957113e6dd028846",externalWeightedMath:"0x7920bfa1b2041911b354747ca7a6cdd2dfc50cfd",gaugeWorkingBalanceHelper:"0xa7d524046ef89de9f8e4f2d7b029f66ccb738d48",gearboxLinearPoolFactory:"0x9dd32684176638d977883448a4c914311c07bd62",l2BalancerPseudoMinter:"0xc7e5ed1054a24ef31d827e6f86caa58b3bc168d7",l2LayerZeroBridgeForwarder:"0x8ea89804145c007e7d226001a96955ad53836087",managedPoolAddRemoveTokenLib:"0xb19382073c7a0addbb56ac6af1808fa49e377b75",managedPoolAmmLib:"0x7d2248f194755dca9a1887099394f39476d28c9a",managedPoolFactory:"0x9a62c91626d39d0216b3959112f9d4678e20134d",mockAaveLendingPool:"0x88ed12a90142fdbfe2a28f7d5b48927254c7e760",mockAaveLinearPool:"0x712e23a9b91aa30ee7997d1c7a1a285d4c7912d1",mockComposableStablePool:"0x7f6e9d6a4093af9d09bae92d24bfe42fc5369ae6",mockErc4626LinearPool:"0x1cc2e10c486ffb7228810b9c7c183d0cd92cdf44",mockErc4626Token:"0x4638ab64022927c9bd5947607459d13f57f1551c",mockGearboxDieselToken:"0xb521dd5c8e13fe202626cac98873fea2b7760ce4",mockGearboxLinearPool:"0x3c28a59356b473847aaa5e0b6f561636079213a6",mockGearboxVault:"0x79e435875ccee3cd9e8da23fe34f9a011d05ea6c",mockLiquidityBootstrappingPool:"",mockManagedPool:"0xe50ad96af9370d05d3c1ce85f17c31557b29c4ee",mockStaticAToken:"0x698caed853be9cea96c268f565e2b61d3b2bcda4",mockWeightedPool:"0xd9dbbfaa703f3c33838365ae00fe4eb22cdf8d46",mockYearnLinearPool:"0x369877467fc3b6774de4e11e0c0abbde70eb40fd",mockYearnTokenVault:"0xdbf7b9f1d2bfba14e42709f84dda3187ee410e38",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x0c6052254551eae3ecac77b01dfcf1025418828f",nullVotingEscrow:"0x475d18169be8a89357a9ee3ab00ca386d20fa229",poolRecoveryHelper:"0x03f3fb107e74f2eac9358862e91ad3c692712054",protocolFeePercentagesProvider:"0xded7fef7d8ecdcb74f22f0169e1a9ec696e6695d",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0xacf05be5134d64d150d153818f8c67ee36996650",protocolIdRegistry:"0x682f0ddbfd41d1272982f64a499fb62d80e27589",recoveryModeHelper:"0x313a8d36b1d90a4cba3a505fdc3480c3870be053",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",votingEscrowDelegationProxy:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",weightedPoolFactory:"0x4c32a8a8fda4e24139b51b456b42290f51d6a1c4",weth:"0x4200000000000000000000000000000000000006",yearnLinearPoolFactory:"0x44d33798dddcdabc93fe6a40c80588033dc502d3"},tokens:{}},42161:{contracts:{aaveLinearPoolFactory:"0x7396f99b48e7436b152427bfa3dd6aa8c7c6d05b",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",authorizerAdaptorEntrypoint:"0x97207b095e4d5c9a6e4cfbfcd2c3358e03b90c4a",authorizerWithAdaptorValidation:"0x6b1da720be2d11d95177ccfc40a917c2688f396c",bal:"0x040d1edc9569d4bab2d15287dc5a4f10f56a56b8",balancerHelpers:"0x77d46184d22ca6a3726a2f500c776767b6a3d6ab",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0x598ce0f1ab64b27256759ef99d883ee51138b9bd",batchRelayerLibrary:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",childChainGauge:"0xa523f47a933d5020b23629ddf689695aa94612dc",childChainGaugeFactory:"0x6817149cb753bf529565b4d023d7507ed2ff4bc0",childChainGaugeRewardHelper:"0xa0dabebaad1b243bbb243f933013d560819eb66f",childChainGaugeTokenAdder:"0xbfd9769b061e57e478690299011a028194d66e3c",childChainLiquidityGaugeFactory:"0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2",childChainStreamer:"0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f8",circuitBreakerLib:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",composableStablePoolFactory:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",doubleEntrypointFixRelayer:"0x8e5698dc4897dc12243c8642e77b4f21349db97c",erc4626LinearPoolFactory:"0x7adbdabaa80f654568421887c12f09e0c7bd9629",externalWeightedMath:"0x03f3fb107e74f2eac9358862e91ad3c692712054",gaugeWorkingBalanceHelper:"0xea924b45a3fcdaadf4e5cfb1665823b8f8f2039b",l2BalancerPseudoMinter:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",l2LayerZeroBridgeForwarder:"0x12ca9de662a7bf5dc89e034a5083ef751b08ede7",managedPoolAddRemoveTokenLib:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",managedPoolAmmLib:"0x300ab2038eac391f26d9f895dc61f8f66a548833",managedPoolFactory:"0x8ea89804145c007e7d226001a96955ad53836087",merkleOrchard:"0x9805dcfd25e6de36bad8fe9d3fe2c9b44b764102",mockAaveLendingPool:"0x533a16f90e7d3ca31dbc608e5ec54967710f0d2a",mockAaveLinearPool:"0x19b1c92631405a0a9495ccba0becf4f2e8e908bd",mockComposableStablePool:"0xff7e6b102516e071dcda763ee9d02c1515481db5",mockErc4626LinearPool:"0x3f53a862919ccfa023cb6ace91378a79fb0f6bf5",mockErc4626Token:"0x4be0e4d6184348c5ba845a4010528cfc779610b8",mockManagedPool:"0xf5a71257b331c02da1eae52151c3d600f16b76f0",mockStaticAToken:"0x8b7854708c0c54f9d7d1ff351d4f84e6de0e134c",mockWeightedPool:"0x129c6402ff88611aa59bf2e14b39e091822e2c9c",mockYearnLinearPool:"0x1fa7f727934226aedab636d62a084931b97d366b",mockYearnTokenVault:"0xb15608d28eb43378a7e7780add3fe9bc132baf40",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x1802953277fd955f9a254b80aa0582f193cf1d77",nullVotingEscrow:"0x9da18982a33fd0c7051b19f0d7c76f2d5e7e017c",poolRecoveryHelper:"0xb5e56cc3d2e38e53b1166175c59e921a37cdc1e2",protocolFeePercentagesProvider:"0x5ef4c5352882b10893b70dbcaa0c000965bd23c5",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x70bbd023481788e443472e123ab963e5ebf58d06",protocolIdRegistry:"0x5cf4928a3205728bd12830e1840f7db85c62a4b9",recoveryModeHelper:"0x682f0ddbfd41d1272982f64a499fb62d80e27589",rewardsOnlyGauge:"0x41b953164995c11c81da73d212ed8af25741b7ac",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x6b5da774890db7b7b96c6f44e6a4b0f657399e2e",votingEscrowDelegationProxy:"0x81cfae226343b24ba12ec6521db2c79e7aeeb310",weightedPoolFactory:"0xc7e5ed1054a24ef31d827e6f86caa58b3bc168d7",weth:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",yearnLinearPoolFactory:"0x19dfef0a828eec0c85fbb335aa65437417390b85"},tokens:{BADGER:"0xbfa641051ba0a0ad1b0acf549a89536a0d76472e",CRV:"0x11cdb42b0eb46d95f990bedd4695a6e3fa034978",LDO:"0x13ad51ed4f1b7e9dc168d8a00cb3f4ddd85efa60",renBTC:"0xdbf31df14b66535af65aac99c32e9ea844e14501",SUSHI:"0xd4d42f0b6def4ce0383636770ef773390d85c61a",USDC:"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",USDT:"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",WBTC:"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f",WETH:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1"}},43114:{contracts:{aaveLinearPoolFactory:"0x6caf662b573f577de01165d2d38d1910bba41f8a",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0xdae7e32adc5d490a43ccba1f0c736033f2b4efca",authorizerAdaptorEntrypoint:"0x4e7bbd911cf1efa442bc1b2e9ea01ffe785412ec",authorizerWithAdaptorValidation:"0x8df317a729fcaa260306d7de28888932cb579b88",bal:"0xe15bcb9e0ea69e6ab9fa080c4c4a5632896298c3",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",balancerRelayer:"0x03f1ab8b19bce21eb06c364aec9e40322572a1e9",batchRelayerLibrary:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",childChainGauge:"0x4b7b369989e613ff2c65768b7cf930cc927f901e",childChainGaugeFactory:"0x161f4014c27773840ccb4ec1957113e6dd028846",childChainGaugeRewardHelper:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",childChainGaugeTokenAdder:"0xf302f9f50958c5593770fdf4d4812309ff77414f",childChainLiquidityGaugeFactory:"0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2",childChainStreamer:"0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f8",circuitBreakerLib:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",composableStablePoolFactory:"0x3b1eb8eb7b43882b385ab30533d9a2bef9052a98",distributionScheduler:"0xc128a9954e6c874ea3d62ce62b468ba073093f25",erc4626LinearPoolFactory:"0x4507d91cd2c0d51d9b4f30bf0b93afc938a70ba5",externalWeightedMath:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",gaugeWorkingBalanceHelper:"0x687b8c9b41e01be8b591725fac5d5f52d0564d79",l2BalancerPseudoMinter:"0xea924b45a3fcdaadf4e5cfb1665823b8f8f2039b",l2LayerZeroBridgeForwarder:"0x4638ab64022927c9bd5947607459d13f57f1551c",managedPoolAddRemoveTokenLib:"0xacf05be5134d64d150d153818f8c67ee36996650",managedPoolAmmLib:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",managedPoolFactory:"0x03f3fb107e74f2eac9358862e91ad3c692712054",mockAaveLendingPool:"0x57ea28a99394978d060e483477c0fd9fb9afa96c",mockAaveLinearPool:"0xa826a114b0c7db4d1ff4a4be845a78998c64564c",mockComposableStablePool:"0xea4643102dfc03d5e382e7827bf767f6587e9965",mockErc4626LinearPool:"0xed3e2f496cbcd8e212192fb8d1499842f04a0d19",mockErc4626Token:"0x2ebe41e1aa44d61c206a94474932dadc7d3fd9e3",mockManagedPool:"0x3fb81f6fb0dd94c6fc7e138887f1ca4cdb5e2999",mockStaticAToken:"0xd8b6b96c88ad626eb6209c4876e3b14f45f8803a",mockWeightedPool:"0xb2b5b452d53401391155ea48c4451f6e9b0dd058",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",nullVotingEscrow:"0x6b1da720be2d11d95177ccfc40a917c2688f396c",poolRecoveryHelper:"0x3b8ca519122cdd8efb272b0d3085453404b25bd0",protocolFeePercentagesProvider:"0x239e55f427d44c3cc793f49bfb507ebe76638a2b",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x8f42adbba1b16eaae3bb5754915e0d06059add75",recoveryModeHelper:"0x300ab2038eac391f26d9f895dc61f8f66a548833",rewardsOnlyGauge:"0x41b953164995c11c81da73d212ed8af25741b7ac",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",votingEscrowDelegationProxy:"0x0c6052254551eae3ecac77b01dfcf1025418828f",weightedPoolFactory:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",weth:"0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7"},tokens:{}},11155111:{contracts:{aaveLinearPoolFactory:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0xdcdbf71a870cc60c6f9b621e28a7d3ffd6dd4965",authorizerAdaptorEntrypoint:"0xb9ad3466cdd42015cc05d4804dc68d562b6a2065",authorizerWithAdaptorValidation:"0xb521dd5c8e13fe202626cac98873fea2b7760ce4",bal:"0xb19382073c7a0addbb56ac6af1808fa49e377b75",balancerHelpers:"0xdae7e32adc5d490a43ccba1f0c736033f2b4efca",balancerMinter:"0x1783cd84b3d01854a96b4ed5843753c2ccbd574a",balancerQueries:"0x1802953277fd955f9a254b80aa0582f193cf1d77",balancerRelayer:"0x6d5342d716c13d9a3f072a2b11498624ade27f90",balancerTokenAdmin:"0x7d2248f194755dca9a1887099394f39476d28c9a",balTokenHolderFactory:"0xef454a7b3f965d3f6723e462405246f8cd865425",batchRelayerLibrary:"0x5f6848976c2914403b425f18b589a65772f082e3",childChainGauge:"0xc49ca921c4cd1117162eaeec0ee969649997950c",childChainGaugeFactory:"0xc370cd86d5488c1788b62f11b09adb0c47f47440",circuitBreakerLib:"0x4c0c450bedb9282a7a54fcb316c285e85a8c0265",composableStablePoolFactory:"0xa3fd20e29358c056b727657e83dfd139abbc9924",erc4626LinearPoolFactory:"0x59562f93c447656f6e4799fc1fc7c3d977c3324f",externalWeightedMath:"0x8246e571d88acd1346179cc3641de87fe3544d7a",feeDistributor:"0xa6971317fb06c76ef731601c64433a4846fca707",gaugeAdder:"0xe42ffa682a26ef8f25891db4882932711d42e467",gaugeController:"0x577e5993b9cc480f07f98b5ebd055604bd9071c4",gaugeWorkingBalanceHelper:"0x2e4abed3362a622c5f712bb183005a476b146bd3",gearboxLinearPoolFactory:"0x8df317a729fcaa260306d7de28888932cb579b88",l2BalancerPseudoMinter:"0xb51f7ffc97cedfb6922e8b9bbf3ef7575fafd630",l2LayerZeroBridgeForwarder:"0xc7e5ed1054a24ef31d827e6f86caa58b3bc168d7",liquidityGaugeFactory:"0x2ff226cd12c80511a641a6101f071d853a4e5363",liquidityGaugeV5:"0x82416ce6ea7dd4923d4a3ed70a79b4a432a382c4",managedPoolAddRemoveTokenLib:"0xc7416e4f3715467ddcf28dc409a9483b2e4d4f43",managedPoolAmmLib:"0xa30ade89e6af5b0ca515cd78e44f9ad0c63989b2",managedPoolFactory:"0x63e179c5b6d54b2c2e36b9ce4085ef5a8c86d50c",mockAaveLendingPool:"0x300ab2038eac391f26d9f895dc61f8f66a548833",mockAaveLinearPool:"0xe4efd99f3c03778ba913eb578c599329634e2bd7",mockComposableStablePool:"0xa8d865fe1d68a405b29f884358468c9b52d4841d",mockErc4626LinearPool:"0x0c2ead6f2dc2a9385187023f4cec5925337b330f",mockErc4626Token:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",mockGearboxDieselToken:"0x4c32a8a8fda4e24139b51b456b42290f51d6a1c4",mockGearboxLinearPool:"0x112a7b7ca66e6963c49bc523a415f7d8cdb806b9",mockGearboxVault:"0x3b1eb8eb7b43882b385ab30533d9a2bef9052a98",mockLiquidityBootstrappingPool:"0xe90472ffc41d7ddf8e3b456bba748e3f22c59c6f",mockManagedPool:"0xe458224ca8d6605c87b73e92aa5cb7a4e77770f3",mockShareToken:"0x0c6052254551eae3ecac77b01dfcf1025418828f",mockSilo:"0x6b1da720be2d11d95177ccfc40a917c2688f396c",mockSiloLinearPool:"0xa149cf2d795aab83a15673f5beade9361e4e3f65",mockSiloRepository:"0xa7d524046ef89de9f8e4f2d7b029f66ccb738d48",mockStaticAToken:"0x03f3fb107e74f2eac9358862e91ad3c692712054",mockWeightedPool:"0xf7a7e1f48fa43cb7919ff4eb362c5be78092df4a",mockYearnLinearPool:"0x016b7366f76aa2794097798b90cf239796aeff8d",mockYearnTokenVault:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",nullVotingEscrow:"0x475d18169be8a89357a9ee3ab00ca386d20fa229",omniVotingEscrowAdaptor:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",poolRecoveryHelper:"0x1b6f057520b4e826271d47b8bdab98e35af17e59",preseededVotingEscrowDelegation:"0xb1a4fe1c6d25a0ddab47431a92a723dd71d9021f",protocolFeePercentagesProvider:"0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x809b79b53f18e9bc08a961ed4678b901ac93213a",protocolIdRegistry:"0x6cad2ea22bfa7f4c14aae92e47f510cd5c509bc7",recoveryModeHelper:"0x5419e785b83ad3539d3a8741c0abb77d90d8784e",siloLinearPoolFactory:"0x8ea89804145c007e7d226001a96955ad53836087",singleRecipientGauge:"0x9a5ddde7056ceffb03d9962c4549ac1c4ad1f985",singleRecipientGaugeFactory:"0x7ee4d172ae50c627a1bfa9a99e1260c54da26fdf",smartWalletChecker:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",testBalancerToken:"0xb19382073c7a0addbb56ac6af1808fa49e377b75",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x927906bbac747c13c75f6447fe8abb490eab456c",votingEscrow:"0x150a72e4d4d81bbf045565e232c50ed0931ad795",votingEscrowDelegation:"0x0c5538098ebe88175078972f514c9e101d325d4f",votingEscrowDelegationProxy:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",votingEscrowRemapper:"0xf24917fb88261a37cc57f686ebc831a5c0b9fd39",weightedPoolFactory:"0x7920bfa1b2041911b354747ca7a6cdd2dfc50cfd",weth:"0x7b79995e5f793a07bc00c21412e50ecae098e7f9",yearnLinearPoolFactory:"0xacf05be5134d64d150d153818f8c67ee36996650"},tokens:{}}};const va="0xBA12222222228d8Ba445958a75a0704d566BF2C8",ka={[exports.Network.MAINNET]:{chainId:exports.Network.MAINNET,addresses:{contracts:{multicall:"0xeefba1e63905ef1d7acba5a8513c70307c1ce441",poolDataQueries:"0xf5CDdF6feD9C589f1Be04899F48f9738531daD59",lidoRelayer:"0xdcdbf71A870cc60C6F9B621E28a7D3Ffd6Dd4965",veBal:"0xC128a9954e6c874eA3d62ce62B468bA073093F25",gaugeControllerCheckpointer:"0x8e5698dc4897dc12243c8642e77b4f21349db97c",veBalProxy:"0x6f5a2eE11E7a772AeB5114A20d0D7c0ff61EB8A0",gyroConfigProxy:"0xac89cc9d78bbad7eb3a02601b4d65daa1f908aa6",...Sa[exports.Network.MAINNET].contracts},tokens:{bal:Sa[exports.Network.MAINNET].contracts.bal,wrappedNativeAsset:Sa[exports.Network.MAINNET].contracts.weth,bbaUsd:Sa[exports.Network.MAINNET].tokens.bb_a_usd,lbpRaisingTokens:["0x6b175474e89094c44da98b954eedeac495271d0f","0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"],stETH:"0xae7ab96520de3a18e5e111b5eaab095312d7fe84",wstETH:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",veBal:"0xC128a9954e6c874eA3d62ce62B468bA073093F25",...Sa[exports.Network.MAINNET].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"ethereum"}},pools:{wETHwstETH:{id:"0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080",address:"0x32296969ef14eb0c6d29669c550d4a0449130230"}},poolsToIgnore:["0xbd482ffb3e6e50dc1c437557c3bea2b68f3683ee0000000000000000000003c6","0x0afbd58beca09545e4fb67772faf3858e610bcd00000000000000000000004b9","0xf22ff21e17157340575158ad7394e068048dd98b0000000000000000000004b8","0xf71d0774b214c4cf51e33eb3d30ef98132e4dbaa00000000000000000000046e"],sorConnectingTokens:[{symbol:"wEth",address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},{symbol:"wstEth",address:"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"},{symbol:"DOLA",address:"0x865377367054516e17014CcdED1e7d814EDC9ce4"},{symbol:"rEth",address:"0xae78736cd615f374d3085123a210448e74fc6393"},{symbol:"ETHx",address:"0xa35b1b31ce002fbf2058d22f30f95d405200a15b"}],sorTriPathMidPoolIds:["0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112"]},[exports.Network.POLYGON]:{chainId:exports.Network.POLYGON,addresses:{contracts:{multicall:"0xa1B2b503959aedD81512C37e9dce48164ec6a94d",poolDataQueries:"0x84813aA3e079A665C0B80F944427eE83cBA63617",gaugeClaimHelper:"0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33",gyroConfigProxy:"0xfdc2e9e03f515804744a40d0f8d25c16e93fbe67",...Sa[exports.Network.POLYGON].contracts},tokens:{bal:Sa[exports.Network.POLYGON].contracts.bal,wrappedNativeAsset:Sa[exports.Network.POLYGON].contracts.weth,lbpRaisingTokens:["0x8f3cf7ad23cd3cadbd9735aff958023239c6a063","0x2791bca1f2de4661ed88a30c99a7a9449aa84174","0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"],...Sa[exports.Network.POLYGON].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-prune-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-polygon",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/ianlapham/polygon-blocks"},thirdParty:{coingecko:{nativeAssetId:"",platformId:"polygon-pos"}},pools:{},poolsToIgnore:["0x600bd01b6526611079e12e1ff93aba7a3e34226f0000000000000000000009e4","0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455"],sorConnectingTokens:[{symbol:"weth",address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"},{symbol:"bbrz2",address:"0xe22483774bd8611be2ad2f4194078dac9159f4ba"}]},[exports.Network.ARBITRUM]:{chainId:exports.Network.ARBITRUM,addresses:{contracts:{multicall:"0x269ff446d9892c9e19082564df3f5e8741e190a1",poolDataQueries:"0x7Ba29fE8E83dd6097A7298075C4AFfdBda3121cC",gaugeClaimHelper:"0xa0dabebaad1b243bbb243f933013d560819eb66f",gyroConfigProxy:"0x9b683ca24b0e013512e2566b68704dbe9677413c",...Sa[exports.Network.ARBITRUM].contracts},tokens:{bal:Sa[exports.Network.ARBITRUM].contracts.bal,wrappedNativeAsset:Sa[exports.Network.ARBITRUM].contracts.weth,lbpRaisingTokens:["0xda10009cbd5d07dd0cecc66161fc93d7c9000da1","0xff970a61a04b1ca14834a43f5de4533ebddb5cc8","0x82af49447d8a07e3bd95bd0d56f35241523fbab1"],...Sa[exports.Network.ARBITRUM].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-arbitrum-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-arbitrum",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/ianlapham/arbitrum-one-blocks"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"arbitrum-one"}},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"}],sorTriPathMidPoolIds:["0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158","0x0052688295413b32626d226a205b95cdb337de860002000000000000000003d1","0xa1a8bf131571a2139feb79401aa4a2e9482df6270002000000000000000004b4"]},[exports.Network.GOERLI]:{chainId:exports.Network.GOERLI,addresses:{contracts:{multicall:"0x77dCa2C955b15e9dE4dbBCf1246B4B85b651e50e",poolDataQueries:"0x6d3197d069F8F9f1Fe7e23665Bc64CB77ED8b089",veBal:"0x33A99Dcc4C85C014cf12626959111D5898bbCAbF",veBalProxy:"0xA1F107D1cD709514AE8A914eCB757E95f9cedB31",erc4626LinearPoolFactory:"0xba240c856498e2d7a70af4911aafae0d6b565a5b",aaveLinearPoolFactory:"0x76578ecf9a141296ec657847fb45b0585bcda3a6",...Sa[exports.Network.GOERLI].contracts},tokens:{bal:Sa[exports.Network.GOERLI].contracts.bal,wrappedNativeAsset:Sa[exports.Network.GOERLI].contracts.weth}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-goerli-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-goerli",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/blocklytics/goerli-blocks"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"ethereum"}},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"}]},[exports.Network.OPTIMISM]:{chainId:exports.Network.OPTIMISM,addresses:{contracts:{multicall:"0x2dc0e2aa608532da689e89e237df582b783e552c",poolDataQueries:"0x6B5dA774890Db7B7b96C6f44e6a4b0F657399E2e",gyroConfigProxy:"0x32acb44fc929339b9f16f0449525cc590d2a23f3",...Sa[exports.Network.OPTIMISM].contracts},tokens:{bal:"0xfe8b128ba8c78aabc59d4c64cee7ff28e9379921",wrappedNativeAsset:Sa[exports.Network.OPTIMISM].contracts.weth,lbpRaisingTokens:["0xda10009cbd5d07dd0cecc66161fc93d7c9000da1","0x7f5c764cbc14f9669b88837ca1490cca17c31607","0x4200000000000000000000000000000000000006"],...Sa[exports.Network.OPTIMISM].tokens}},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"optimistic-ethereum"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-optimism",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-optimism",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/lyra-finance/optimism-mainnet-blocks"},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0x4200000000000000000000000000000000000006"}]},[exports.Network.GNOSIS]:{chainId:exports.Network.GNOSIS,addresses:{contracts:{multicall:"0xbb6fab6b627947dae0a75808250d8b2652952cb5",poolDataQueries:"0x3f170631ed9821Ca51A59D996aB095162438DC10",...Sa[exports.Network.GNOSIS].contracts},tokens:{wrappedNativeAsset:Sa[exports.Network.GNOSIS].contracts.weth,bal:Sa[exports.Network.GNOSIS].contracts.bal,...Sa[exports.Network.GNOSIS].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gnosis-chain-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-gnosis-chain"},thirdParty:{coingecko:{nativeAssetId:"xdai",platformId:"xdai"}},averageBlockTime:5,pools:{},sorConnectingTokens:[{symbol:"weth",address:"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"},{symbol:"wsEth",address:"0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6"}],sorTriPathMidPoolIds:["0xeb30c85cc528537f5350cf5684ce6a4538e13394000200000000000000000059","0x7644fa5d0ea14fcf3e813fdf93ca9544f8567655000000000000000000000066"]},[exports.Network.FANTOM]:{chainId:exports.Network.FANTOM,addresses:{contracts:{vault:"0x20dd72Ed959b6147912C2e529F0a0C651c33c9ce",multicall:"0x66335d7ad8011f6aa3f48aadcb523b62b38ed961",poolDataQueries:"0xb132F1E145DcC085980C531e2dA81f2b84efc14F",gaugeClaimHelper:"0x0000000000000000000000000000000000000000",balancerRelayer:"0x419f7925b8c9e409b6ee8792242556fa210a7a09",balancerHelpers:"0xfE18C7C70b0a2c6541bEde0367124278BC345Dc8",weightedPoolFactory:"0x60467cb225092cE0c989361934311175f437Cf53",composableStablePoolFactory:"0x44814E3A603bb7F1198617995c5696C232F6e8Ed",yearnLinearPoolFactory:"0x1f73ae6ed391a2b1e84ff988a1bb5394b78a4a71"},tokens:{bal:"0xF24Bcf4d1e507740041C9cFd2DddB29585aDCe1e",wrappedNativeAsset:"0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",lbpRaisingTokens:["0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83","0x04068DA6C83AFCFA0e13ba15A6696662335D5B75","0x8D11eC38a3EB5E956B052f67Da8Bdc9bef8Abf3E"]}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-v2-fantom",gaugesSubgraph:"",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/beethovenxfi/fantom-blocks"},thirdParty:{coingecko:{nativeAssetId:"ftm",platformId:"fantom"}},pools:{},poolsToIgnore:[],sorConnectingTokens:[{symbol:"wftm",address:"0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83"}]},[exports.Network.SEPOLIA]:{chainId:exports.Network.SEPOLIA,addresses:{contracts:{multicall:"0xcA11bde05977b3631167028862bE2a173976CA11",poolDataQueries:"0x9805dcfD25e6De36bad8fe9D3Fe2c9b44B764102",...Sa[exports.Network.SEPOLIA].contracts},tokens:{bal:Sa[exports.Network.SEPOLIA].contracts.bal,wrappedNativeAsset:Sa[exports.Network.SEPOLIA].contracts.weth,...Sa[exports.Network.SEPOLIA].tokens}},urls:{subgraph:"https://api.studio.thegraph.com/query/24660/balancer-sepolia-v2/version/latest"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"ethereum"}},pools:{},poolsToIgnore:[],sorConnectingTokens:[]},[exports.Network.ZKEVM]:{chainId:exports.Network.ZKEVM,addresses:{contracts:{balancerMinter:"0x475D18169BE8a89357A9ee3Ab00ca386d20fA229",multicall:"0xcA11bde05977b3631167028862bE2a173976CA11",poolDataQueries:"0xF24917fB88261a37Cc57F686eBC831a5c0B9fD39",...Sa[exports.Network.ZKEVM].contracts},tokens:{bal:Sa[exports.Network.ZKEVM].contracts.bal,wrappedNativeAsset:Sa[exports.Network.ZKEVM].contracts.weth,...Sa[exports.Network.ZKEVM].tokens}},urls:{subgraph:"https://api.studio.thegraph.com/query/24660/balancer-polygon-zk-v2/version/latest",gaugesSubgraph:"https://api.studio.thegraph.com/query/24660/balancer-gauges-polygon-zk/version/latest"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"polygon-zkevm"}},averageBlockTime:4,multicallBatchSize:128,pools:{},poolsToIgnore:[],sorConnectingTokens:[{symbol:"weth",address:"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9"},{symbol:"wsEth",address:"0x5D8cfF95D7A57c0BF50B30b43c7CC0D52825D4a9"}]},[exports.Network.AVALANCHE]:{chainId:exports.Network.AVALANCHE,addresses:{contracts:{balancerMinter:"0xEa924b45a3fcDAAdf4E5cFB1665823B8F8F2039B",multicall:"0xcA11bde05977b3631167028862bE2a173976CA11",poolDataQueries:"0x67af5D428d38C5176a286a2371Df691cDD914Fb8",...Sa[exports.Network.AVALANCHE].contracts},tokens:{bal:Sa[exports.Network.AVALANCHE].contracts.bal,wrappedNativeAsset:Sa[exports.Network.AVALANCHE].contracts.weth,...Sa[exports.Network.AVALANCHE].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-avalanche-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-avalanche",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/iliaazhel/avalanche-blocks"},thirdParty:{coingecko:{nativeAssetId:"avalanche-2",platformId:"avalanche"}},pools:{},poolsToIgnore:[],sorConnectingTokens:[{symbol:"WAVAX",address:"0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7"},{symbol:"sAVAX",address:"0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be"}]},[exports.Network.BASE]:{chainId:exports.Network.BASE,addresses:{contracts:{balancerMinter:"0xc7E5ED1054A24Ef31D827E6F86caA58B3Bc168d7",multicall:"0xcA11bde05977b3631167028862bE2a173976CA11",poolDataQueries:"",...Sa[exports.Network.BASE].contracts},tokens:{bal:Sa[exports.Network.BASE].contracts.bal,wrappedNativeAsset:Sa[exports.Network.BASE].contracts.weth,...Sa[exports.Network.BASE].tokens}},urls:{subgraph:"https://api.studio.thegraph.com/query/24660/balancer-base-v2/version/latest",gaugesSubgraph:"https://api.studio.thegraph.com/query/24660/balancer-gauges-base/version/latest",blockNumberSubgraph:"https://api.studio.thegraph.com/query/48427/bleu-base-blocks/version/latest"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"base"}},averageBlockTime:2,pools:{},poolsToIgnore:[],sorConnectingTokens:[{symbol:"weth",address:"0x4200000000000000000000000000000000000006"}],sorTriPathMidPoolIds:["0x2db50a0e0310723ef0c2a165cb9a9f80d772ba2f00020000000000000000000d"]}},Ba=e=>ka[e].addresses;var Ca;exports.BalancerErrorCode=void 0,(Ca=exports.BalancerErrorCode||(exports.BalancerErrorCode={})).ABOVE_MAX_TOKENS="ABOVE_MAX_TOKENS",Ca.BELOW_MIN_TOKENS="BELOW_MIN_TOKENS",Ca.EXIT_DELTA_AMOUNTS="EXIT_DELTA_AMOUNTS",Ca.FEE_PROVIDER_NOT_PROVIDED="FEE_PROVIDER_NOT_PROVIDED",Ca.GAUGES_HELPER_ADDRESS_NOT_PROVIDED="GAUGES_HELPER_ADDRESS_NOT_PROVIDED",Ca.GAUGES_NOT_FOUND="GAUGES_NOT_FOUND",Ca.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED="GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED",Ca.GAUGES_REWARD_TOKEN_EMPTY="GAUGES_REWARD_TOKEN_EMPTY",Ca.ILLEGAL_PARAMETER="ILLEGAL_PARAMETER",Ca.INTERNAL_ERROR_INVALID_ABI="INTERNAL_ERROR_INVALID_ABI",Ca.INPUT_LENGTH_MISMATCH="INPUT_LENGTH_MISMATCH",Ca.INPUT_OUT_OF_BOUNDS="INPUT_OUT_OF_BOUNDS",Ca.INPUT_TOKEN_INVALID="INPUT_TOKEN_INVALID",Ca.INVALID_PROTOCOL_ID="INVALID_PROTOCOL_ID",Ca.INVALID_SWAP_FEE_PERCENTAGE="INVALID_SWAP_FEE_PERCENTAGE",Ca.INVALID_WEIGHTS="INVALID_WEIGHTS",Ca.JOIN_DELTA_AMOUNTS="JOIN_DELTA_AMOUNTS",Ca.JOIN_WITH_ZERO_AMOUNT="JOIN_WITH_ZERO_AMOUNT",Ca.MISSING_AMP="MISSING_AMP",Ca.MISSING_DECIMALS="MISSING_DECIMALS",Ca.MISSING_PRICE_RATE="MISSING_PRICE_RATE",Ca.MISSING_TOKENS="MISSING_TOKENS",Ca.MISSING_WEIGHT="MISSING_WEIGHT",Ca.NO_POOL_DATA="NO_POOL_DATA",Ca.NO_VALUE_PARAMETER="NO_VALUE_PARAMETER",Ca.POOL_DOESNT_EXIST="POOL_DOESNT_EXIST",Ca.QUERY_BATCH_SWAP="QUERY_BATCH_SWAP",Ca.RELAY_SWAP_AMOUNTS="RELAY_SWAP_AMOUNTS",Ca.REWARD_TOKEN_ZERO="REWARD_TOKEN_ZERO",Ca.TIMESTAMP_IN_THE_FUTURE="TIMESTAMP_IN_THE_FUTURE",Ca.TOKEN_MISMATCH="TOKEN_MISMATCH",Ca.UNSUPPORTED_PAIR="UNSUPPORTED_PAIR",Ca.UNSUPPORTED_POOL_TYPE="UNSUPPORTED_POOL_TYPE",Ca.UNSUPPORTED_POOL_TYPE_VERSION="UNSUPPORTED_POOL_TYPE_VERSION";class Oa extends Error{constructor(e){super(Oa.getMessage(e)),this.code=e,this.name="BalancerError"}static getMessage(e){switch(e){case exports.BalancerErrorCode.ABOVE_MAX_TOKENS:return"the array contains more tokens than the maximum allowed";case exports.BalancerErrorCode.BELOW_MIN_TOKENS:return"the array does not contain the minimum quantity of tokens";case exports.BalancerErrorCode.EXIT_DELTA_AMOUNTS:return"Error when checking exit call deltas";case exports.BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED:return"Fee Provider Repository has not been provided";case exports.BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED:return"Liquidity Gauges Helper Contract address has not been provided";case exports.BalancerErrorCode.GAUGES_NOT_FOUND:return"Liquidity Gauges not found with given addresses";case exports.BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED:return"Liquidity Gauges Reward Minter Contract address has not been provided";case exports.BalancerErrorCode.GAUGES_REWARD_TOKEN_EMPTY:return"No Reward Tokens for Liquidity Gauges provided";case exports.BalancerErrorCode.INPUT_LENGTH_MISMATCH:return"input length mismatch";case exports.BalancerErrorCode.INPUT_OUT_OF_BOUNDS:return"input out of bounds";case exports.BalancerErrorCode.INPUT_TOKEN_INVALID:return"input token invalid";case exports.BalancerErrorCode.INVALID_PROTOCOL_ID:return"The provided protocol id does not correspond to a protocol";case exports.BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE:return"The swap fee needs to be greater than zero and less than 1e17(10%)";case exports.BalancerErrorCode.INVALID_WEIGHTS:return"The sum of the weights needs to be equal to 1e18(100%)";case exports.BalancerErrorCode.JOIN_DELTA_AMOUNTS:return"Error when checking join call deltas";case exports.BalancerErrorCode.JOIN_WITH_ZERO_AMOUNT:return"Cant join pool with 0 amount of token in";case exports.BalancerErrorCode.MISSING_AMP:return"missing amp";case exports.BalancerErrorCode.MISSING_DECIMALS:return"missing decimals";case exports.BalancerErrorCode.MISSING_PRICE_RATE:return"missing price rate";case exports.BalancerErrorCode.MISSING_TOKENS:return"missing tokens";case exports.BalancerErrorCode.MISSING_WEIGHT:return"missing weight";case exports.BalancerErrorCode.NO_POOL_DATA:return"no pool data";case exports.BalancerErrorCode.NO_VALUE_PARAMETER:return"Illegal value passed as parameter";case exports.BalancerErrorCode.POOL_DOESNT_EXIST:return"balancer pool does not exist";case exports.BalancerErrorCode.RELAY_SWAP_AMOUNTS:return"Error when checking swap amounts";case exports.BalancerErrorCode.REWARD_TOKEN_ZERO:return"All Zero Values for Reward Tokens";case exports.BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE:return"Timestamp cannot be in the future";case exports.BalancerErrorCode.TOKEN_MISMATCH:return"token mismatch";case exports.BalancerErrorCode.UNSUPPORTED_PAIR:return"unsupported token pair";case exports.BalancerErrorCode.UNSUPPORTED_POOL_TYPE:return"unsupported pool type";default:return"Unknown error"}}}function Ma(e,t,a){return a?function(e,t){const a=ie-ce.divDownFixed(e,t);return a<0?BigInt(0):a}(e,t):function(e,t){const a=ce.divDownFixed(e,t)-ie;return a<0?BigInt(0):a}(e,t)}const Fa=BigInt(1e3);function Ra(e,t,a,n){const o=t.length,i=function(e,t,a){let n=ne;const o=t.length;for(let e=0;ei){if(s-i<=1)return s}else if(i-s<=1)return s}throw new Error("Errors.STABLE_INVARIANT_DIDNT_CONVERGE")}(e,t,!0);let s=ne,r=i/BigInt(o);for(let e=0;e{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:s,pool:t,shouldUnwrapNativeAsset:o});const p=this.sortValuesExitExactBptIn({pool:t,wrappedNativeAsset:i,shouldUnwrapNativeAsset:o,singleTokenOut:s}),{minAmountsOut:l,expectedAmountsOut:d}=p.singleTokenOutIndex>=0?this.calcTokenOutGivenExactBptIn({...p,bptIn:a,slippage:n}):this.calcTokensOutGivenExactBptIn({...p,bptIn:a,slippage:n}),u=p.singleTokenOutIndex>=0?A.exitExactBPTInForOneTokenOut(a,p.singleTokenOutIndex):A.exitExactBPTInForTokensOut(a),c=this.encodeExitPool({poolTokens:p.poolTokens,poolId:t.id,exiter:e,minAmountsOut:l,userData:u,toInternalBalance:r}),y=(new Na).calcPriceImpact(t,d.map(BigInt),BigInt(a),!1);return{...c,expectedAmountsOut:d,minAmountsOut:l,priceImpact:y}},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{this.checkInputsExactTokensOut(n,a,t);const r=this.sortValuesExitExactTokensOut({pool:t,wrappedNativeAsset:i,amountsOut:n,tokensOut:a}),{expectedBPTIn:p,maxBPTIn:l}=this.calcBptInGivenExactTokensOut({...r,slippage:o}),{downScaledAmountsOut:d,poolTokens:u}=r,c=A.exitBPTInForExactTokensOut(d,l);return{...this.encodeExitPool({poolId:t.id,userData:c,poolTokens:u,minAmountsOut:d,exiter:e,toInternalBalance:s}),expectedBPTIn:p,maxBPTIn:l,priceImpact:(new Na).calcPriceImpact(t,d.map(BigInt),BigInt(p),!1)}},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:void 0,pool:t,shouldUnwrapNativeAsset:!1});const i=be(t),{minAmountsOut:s,expectedAmountsOut:r}=this.calcTokensOutGivenExactBptIn({...i,singleTokenOutIndex:-1,bptIn:a,slippage:n}),p=E.recoveryModeExit(a),l=this.encodeExitPool({poolTokens:i.poolTokens,poolId:t.id,exiter:e,minAmountsOut:s,userData:p,toInternalBalance:o}),d=(new Na).calcPriceImpact(t,r.map(BigInt),BigInt(a),!1);return{...l,expectedAmountsOut:r,minAmountsOut:s,priceImpact:d}},this.checkInputsExactBPTIn=({bptIn:e,singleTokenOut:n,pool:o,shouldUnwrapNativeAsset:i})=>{if(!e.length||a.parseFixed(e,18).isNegative())throw new Oa(exports.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(n&&n!==t.AddressZero&&!o.tokens.map((e=>e.address)).some((e=>Je(e,n))))throw new Oa(exports.BalancerErrorCode.TOKEN_MISMATCH);if(!i&&n===t.AddressZero)throw new Error("shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values");if(o.tokens.some((e=>void 0===e.decimals)))throw new Oa(exports.BalancerErrorCode.MISSING_DECIMALS);if(!o.amp)throw new Oa(exports.BalancerErrorCode.MISSING_AMP)},this.checkInputsExactTokensOut=(e,t,a)=>{if(t.length!=e.length||t.length!=a.tokensList.length)throw new Oa(exports.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(a.tokens.some((e=>void 0===e.decimals)))throw new Oa(exports.BalancerErrorCode.MISSING_DECIMALS);if(!a.amp)throw new Oa(exports.BalancerErrorCode.MISSING_AMP)},this.sortValuesExitExactBptIn=({pool:e,wrappedNativeAsset:t,shouldUnwrapNativeAsset:a,singleTokenOut:n})=>{const o=be(e,t,a),{poolTokens:i}=o;let s=-1;return n&&(s=i.indexOf(n)),{...o,singleTokenOutIndex:s}},this.sortValuesExitExactTokensOut=({pool:e,wrappedNativeAsset:a,amountsOut:n,tokensOut:o})=>{const i=o.some((e=>e===t.AddressZero)),s=be(e,a,i),{scalingFactors:r}=s,p=new Y(a),[,l]=p.sortTokens(o,n),d=le(l.map((e=>BigInt(e))),r.map((e=>BigInt(e))));return{...s,upScaledAmountsOut:d,downScaledAmountsOut:l}},this.calcTokenOutGivenExactBptIn=({poolTokens:e,ampWithPrecision:t,upScaledBalances:n,totalSharesEvm:o,swapFeeEvm:i,singleTokenOutIndex:s,bptIn:r,slippage:p,scalingFactors:l})=>{const d=P.StableMathBigInt._calcTokenOutGivenExactBptIn(t,n,s,BigInt(r),o,i).toString(),u=de(BigInt(d)-BigInt(1),l[s]).toString(),c=Array(e.length).fill("0"),y=Array(e.length).fill("0");return c[s]=u,y[s]=Ke(a.BigNumber.from(u),a.BigNumber.from(p)).toString(),{minAmountsOut:y,expectedAmountsOut:c}},this.calcTokensOutGivenExactBptIn=({upScaledBalances:e,totalSharesEvm:t,scalingFactors:n,bptIn:o,slippage:i})=>{const s=ue(P.StableMathBigInt._calcTokensOutGivenExactBptIn(e,BigInt(o),t),n),r=s.map((e=>e.toString()));return{minAmountsOut:s.map((e=>Ke(a.BigNumber.from(e),a.BigNumber.from(i)).toString())),expectedAmountsOut:r}},this.calcBptInGivenExactTokensOut=({ampWithPrecision:e,upScaledBalances:t,upScaledAmountsOut:n,totalSharesEvm:o,swapFeeEvm:i,slippage:s})=>{const r=P.StableMathBigInt._calcBptInGivenExactTokensOut(e,t,n,o,i).toString();return{maxBPTIn:$e(a.BigNumber.from(r),a.BigNumber.from(s)).toString(),expectedBPTIn:r}},this.encodeExitPool=({poolId:e,exiter:t,poolTokens:a,minAmountsOut:n,userData:o,toInternalBalance:i})=>{const s=va,r="exitPool",p={poolId:e,sender:t,recipient:t,exitPoolRequest:{assets:a,minAmountsOut:n,userData:o,toInternalBalance:i}};return{data:la.createInterface().encodeFunctionData(r,[p.poolId,p.sender,p.recipient,p.exitPoolRequest]),to:s,functionName:r,attributes:p}}}}class Da{constructor(){this.buildJoin=({joiner:e,pool:t,tokensIn:a,amountsIn:n,slippage:o,wrappedNativeAsset:i})=>{this.checkInputs(a,n,t);const s=this.sortValues({pool:t,wrappedNativeAsset:i,tokensIn:a,amountsIn:n}),{expectedBPTOut:r,minBPTOut:p}=this.calcBptOutGivenExactTokensIn({...s,slippage:o});return{...this.encodeJoinPool({joiner:e,amountsIn:n,tokensIn:a,poolId:t.id,minBPTOut:p,...s}),minBPTOut:p,expectedBPTOut:r,priceImpact:(new Na).calcPriceImpact(t,s.sortedAmountsIn.map(BigInt),BigInt(r),!0)}},this.checkInputs=(e,t,a)=>{if(t.length!=e.length||t.length!=a.tokensList.length)throw new Oa(exports.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(a.tokens.some((e=>void 0===e.decimals)))throw new Oa(exports.BalancerErrorCode.MISSING_DECIMALS);if(!a.amp)throw new Oa(exports.BalancerErrorCode.MISSING_AMP)},this.sortValues=({pool:e,wrappedNativeAsset:a,amountsIn:n,tokensIn:o})=>{const{poolTokens:i,ampWithPrecision:s,totalSharesEvm:r,swapFeeEvm:p,scalingFactors:l,upScaledBalances:d}=be(e,a,o.includes(t.AddressZero)),u=new Y(a),[,c]=u.sortTokens(o,n);return{poolTokens:i,ampWithPrecision:s,totalSharesEvm:r,swapFeeEvm:p,upScaledBalances:d,upScaledAmountsIn:le(c.map((e=>BigInt(e))),l.map((e=>BigInt(e)))),sortedAmountsIn:c}},this.calcBptOutGivenExactTokensIn=({ampWithPrecision:e,upScaledBalances:t,upScaledAmountsIn:n,totalSharesEvm:o,swapFeeEvm:i,slippage:s})=>{const r=P.StableMathBigInt._calcBptOutGivenExactTokensIn(e,t,n,o,i).toString();return{expectedBPTOut:r,minBPTOut:Ke(a.BigNumber.from(r),a.BigNumber.from(s)).toString()}},this.encodeJoinPool=({poolId:e,joiner:t,poolTokens:a,sortedAmountsIn:n,amountsIn:o,tokensIn:i,minBPTOut:s})=>{const r=A.joinExactTokensInForBPTOut(n,s),p=va,l="joinPool",d={poolId:e,sender:t,recipient:t,joinPoolRequest:{assets:a,maxAmountsIn:n,userData:r,fromInternalBalance:!1}};return{attributes:d,data:la.createInterface().encodeFunctionData(l,[d.poolId,d.sender,d.recipient,d.joinPoolRequest]),functionName:l,to:p,value:Ue(i,o)}}}}class Ua{calcTotal(e){var t,n;let o=a.BigNumber.from(0),i=a.BigNumber.from(0);for(let a=0;a{this.checkInputs(a,n,t.tokensList);const s=this.sortValuesBasedOnPoolVersion({pool:t,wrappedNativeAsset:i,amountsIn:n,tokensIn:a}),r=this.buildExactTokensInForBPTOut({...s,slippage:o,joiner:e,poolId:t.id}),p=Ue(a,n),l=(new Na).calcPriceImpact(t,s.sortedAmountsIn.map(BigInt),BigInt(r.expectedBPTOut),!0);return{...r,to:va,value:p,priceImpact:l}}}sortValuesBasedOnPoolVersion({pool:e,wrappedNativeAsset:t,amountsIn:a,tokensIn:n}){return this.sortV1(t,n,a,e)}checkInputs(e,t,a){if(e.length!=t.length||e.length!=a.length-1)throw new Oa(exports.BalancerErrorCode.INPUT_LENGTH_MISMATCH)}encodeUserDataExactTokensInForBPTOut(e,t,n){const o=Ke(a.BigNumber.from(e),a.BigNumber.from(t)).toString();return{userData:C.joinExactTokensInForBPTOut(n,o),minBPTOut:o}}encodeJoinPool(e,t,a,n,o,i){const s="joinPool",r={poolId:e,sender:t,recipient:a,joinPoolRequest:{assets:n,maxAmountsIn:i,userData:o,fromInternalBalance:!1}};return{functionName:s,attributes:r,data:la.createInterface().encodeFunctionData(s,[r.poolId,r.sender,r.recipient,r.joinPoolRequest])}}sortV1(e,a,n,o){const i=new Y(e),[,s]=i.sortTokens(a,n),{poolTokens:r,ampWithPrecision:p,swapFeeEvm:l,totalSharesEvm:d,bptIndex:u,scalingFactorsWithoutBpt:c,upScaledBalancesWithoutBpt:y}=be(o,e,a.includes(t.AddressZero));return{sortedAmountsIn:s,scalingFactorsWithoutBpt:c,upScaledBalancesWithoutBpt:y,ampWithPrecision:p,totalSharesEvm:d,swapFeeEvm:l,bptIndex:u,poolTokens:r}}buildExactTokensInForBPTOut(e){const{sortedAmountsIn:t,scalingFactorsWithoutBpt:a,upScaledBalancesWithoutBpt:n,ampWithPrecision:o,totalSharesEvm:i,swapFeeEvm:s,bptIndex:r,poolTokens:p,slippage:l,poolId:d,joiner:u}=e,c=this.calcBptOutGivenExactTokensIn(t,a,n,o,i,s),y=this.encodeUserDataExactTokensInForBPTOut(c,l,t),{functionName:b,data:m,attributes:f}=this.encodeJoinPool(d,u,u,p,y.userData,je(t,r,"0"));return{functionName:b,data:m,attributes:f,minBPTOut:y.minBPTOut,expectedBPTOut:c.toString()}}calcBptOutGivenExactTokensIn(e,t,a,n,o,i){const s=le(e.map(BigInt),t.map(BigInt));return p.StableMathBigInt._calcBptOutGivenExactTokensIn(n,a,s,o,i)}sortV4(e,t,a){const{poolTokens:n,poolTokensWithoutBpt:o,ampWithPrecision:i,swapFeeEvm:s,totalSharesEvm:r,scalingFactorsWithoutBpt:p,upScaledBalancesWithoutBpt:l}=be(a),[d]=ze(o,e,t);return{sortedAmountsIn:d,scalingFactorsWithoutBpt:p,upScaledBalancesWithoutBpt:l,ampWithPrecision:i,totalSharesEvm:r,swapFeeEvm:s,bptIndex:0,poolTokens:n}}}class Ha{constructor(){this.buildExitExactBPTIn=({exiter:e,pool:t,bptIn:a,slippage:n,shouldUnwrapNativeAsset:o,wrappedNativeAsset:i,singleTokenOut:s,toInternalBalance:r})=>{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:s,pool:t,shouldUnwrapNativeAsset:o});const p=this.sortValuesExitExactBptIn({pool:t,wrappedNativeAsset:i,shouldUnwrapNativeAsset:o,singleTokenOut:s}),{minAmountsOut:l,expectedAmountsOut:d}=p.singleTokenOutIndexWithoutBpt>=0?this.calcTokenOutGivenExactBptIn({...p,bptIn:a,slippage:n}):this.calcTokensOutGivenExactBptIn({...p,bptIn:a,slippage:n}),u=p.singleTokenOutIndexWithoutBpt>=0?C.exitExactBPTInForOneTokenOut(a,p.singleTokenOutIndexWithoutBpt):C.exitExactBPTInForAllTokensOut(a),c=je(l,p.bptIndex,"0"),y=this.encodeExitPool({poolTokens:p.poolTokens,poolId:t.id,exiter:e,userData:u,minAmountsOut:c,toInternalBalance:r}),b=(new Na).calcPriceImpact(t,d.map(BigInt),BigInt(a),!1);return{...y,expectedAmountsOut:d,minAmountsOut:l,priceImpact:b}},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{this.checkInputsExactTokensOut(a,n,t);const r=this.sortValuesExitExactTokensOut({pool:t,wrappedNativeAsset:i,amountsOut:n,tokensOut:a}),{bptIn:p,maxBPTIn:l}=this.calcBptInGivenExactTokensOut({...r,slippage:o}),d=C.exitBPTInForExactTokensOut(r.downscaledAmountsOutWithoutBpt,l);return{...this.encodeExitPool({poolTokens:r.poolTokens,minAmountsOut:r.downscaledAmountsOutWithBpt,userData:d,exiter:e,poolId:t.id,toInternalBalance:s}),maxBPTIn:l,expectedBPTIn:p,priceImpact:(new Na).calcPriceImpact(t,r.downscaledAmountsOutWithoutBpt.map(BigInt),BigInt(p),!1)}},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{this.checkInputsRecoveryExit({bptIn:a,pool:t}),t.tokens.forEach((e=>e.priceRate="1"));const i=be(t),{minAmountsOut:s,expectedAmountsOut:r}=this.calcTokensOutGivenExactBptIn({...i,bptIn:a,slippage:n}),p=E.recoveryModeExit(a),l=je(s,i.bptIndex,"0"),d=this.encodeExitPool({poolTokens:i.poolTokens,poolId:t.id,exiter:e,userData:p,minAmountsOut:l,toInternalBalance:o}),u=(new Na).calcPriceImpact(t,r.map(BigInt),BigInt(a),!1);return{...d,expectedAmountsOut:r,minAmountsOut:s,priceImpact:u}},this.checkInputsExactBPTIn=({bptIn:e,singleTokenOut:n,pool:o,shouldUnwrapNativeAsset:i})=>{if(a.BigNumber.from(e).lte(0))throw new Oa(exports.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(!n&&o.poolTypeVersion<2)throw new Error("Unsupported Exit Type For Pool");if(n&&n!==t.AddressZero&&!o.tokens.map((e=>e.address)).some((e=>Je(e,n))))throw new Oa(exports.BalancerErrorCode.TOKEN_MISMATCH);if(!i&&n===t.AddressZero)throw new Error("shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values");if(o.tokens.some((e=>void 0===e.decimals)))throw new Oa(exports.BalancerErrorCode.MISSING_DECIMALS);if(!o.amp)throw new Oa(exports.BalancerErrorCode.MISSING_AMP)},this.checkInputsExactTokensOut=(e,t,a)=>{if(e.length!=t.length||e.length!=a.tokensList.length-1)throw new Oa(exports.BalancerErrorCode.INPUT_LENGTH_MISMATCH)},this.checkInputsRecoveryExit=({bptIn:e,pool:t})=>{if(a.BigNumber.from(e).lte(0))throw new Oa(exports.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(!t.isInRecoveryMode)throw new Error("Exit type not supported because pool is not in Recovery Mode");if(t.tokens.some((e=>void 0===e.decimals)))throw new Oa(exports.BalancerErrorCode.MISSING_DECIMALS);if(!t.amp)throw new Oa(exports.BalancerErrorCode.MISSING_AMP)},this.sortValuesExitExactBptIn=({pool:e,singleTokenOut:t,wrappedNativeAsset:a,shouldUnwrapNativeAsset:n})=>{const o=be(e,a,n);let i=-1;return t&&(i=o.poolTokensWithoutBpt.indexOf(t)),{...o,singleTokenOutIndexWithoutBpt:i}},this.sortValuesExitExactTokensOut=({pool:e,wrappedNativeAsset:n,amountsOut:o,tokensOut:i})=>{const s=i.some((e=>e===t.AddressZero)),r=be(e,n,s),p=new Y(n),[,l]=p.sortTokens(i,o),d=je(l,r.bptIndex,"0").map((e=>{const t=a.BigNumber.from(e);return t.isZero()?e:t.sub(1).toString()})),u=le(l.map((e=>BigInt(e))),r.scalingFactorsWithoutBpt);return{...r,upScaledAmountsOutWithoutBpt:u,downscaledAmountsOutWithBpt:d,downscaledAmountsOutWithoutBpt:l}},this.calcTokenOutGivenExactBptIn=({ampWithPrecision:e,upScaledBalancesWithoutBpt:t,singleTokenOutIndexWithoutBpt:n,scalingFactorsWithoutBpt:o,totalSharesEvm:i,swapFeeEvm:s,bptIn:r,slippage:p})=>{const l=P.StableMathBigInt._calcTokenOutGivenExactBptIn(e,t,n,BigInt(r),i,s),d=Array(t.length).fill("0"),u=Array(t.length).fill("0"),c=de(l,o[n]);return d[n]=c.toString(),u[n]=Ke(a.BigNumber.from(c),a.BigNumber.from(p)).toString(),{minAmountsOut:u,expectedAmountsOut:d}},this.calcTokensOutGivenExactBptIn=({upScaledBalancesWithoutBpt:e,totalSharesEvm:t,scalingFactorsWithoutBpt:n,bptIn:o,slippage:i})=>{const s=ue(P.StableMathBigInt._calcTokensOutGivenExactBptIn(e,BigInt(o),t),n),r=s.map((e=>e.toString()));return{minAmountsOut:s.map((e=>Ke(a.BigNumber.from(e),a.BigNumber.from(i)).toString())),expectedAmountsOut:r}},this.calcBptInGivenExactTokensOut=({ampWithPrecision:e,upScaledBalancesWithoutBpt:t,upScaledAmountsOutWithoutBpt:n,totalSharesEvm:o,swapFeeEvm:i,slippage:s})=>{const r=P.StableMathBigInt._calcBptInGivenExactTokensOut(e,t,n,o,i).toString();return{bptIn:r,maxBPTIn:$e(a.BigNumber.from(r),a.BigNumber.from(s)).toString()}},this.encodeExitPool=e=>{const{exiter:t,poolId:a,minAmountsOut:n,userData:o,poolTokens:i,toInternalBalance:s}=e,r="exitPool",p={poolId:a,sender:t,recipient:t,exitPoolRequest:{assets:i,minAmountsOut:n,userData:o,toInternalBalance:s}};return{to:va,functionName:r,attributes:p,data:la.createInterface().encodeFunctionData(r,[p.poolId,p.sender,p.recipient,p.exitPoolRequest])}}}}class Ka{constructor(e=new Ha,t=new Ua,a=new Ga,n=new Na,o=new Wa){this.exit=e,this.liquidity=t,this.spotPriceCalculator=a,this.priceImpactCalculator=n,this.join=o}}class $a{bptZeroPriceImpact(e,t){if(t.length!==e.tokensList.length)throw new Oa(exports.BalancerErrorCode.INPUT_LENGTH_MISMATCH);const{scalingFactorsRaw:a,totalSharesEvm:n,upScaledBalances:o,weights:i}=be(e);let s=ne;for(let e=0;e{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:s,pool:t,shouldUnwrapNativeAsset:o});const p=this.sortValuesExitExactBptIn({pool:t,wrappedNativeAsset:i,shouldUnwrapNativeAsset:o,singleTokenOut:s}),{minAmountsOut:l,expectedAmountsOut:d}=p.singleTokenOutIndex>=0?this.calcTokenOutGivenExactBptIn({...p,bptIn:a,slippage:n}):this.calcTokensOutGivenExactBptIn({...p,bptIn:a,slippage:n}),u=p.singleTokenOutIndex>=0?S.exitExactBPTInForOneTokenOut(a,p.singleTokenOutIndex):S.exitExactBPTInForTokensOut(a),c=this.encodeExitPool({poolTokens:p.poolTokens,poolId:t.id,exiter:e,minAmountsOut:l,userData:u,toInternalBalance:r}),y=(new $a).calcPriceImpact(t,d.map(BigInt),BigInt(a),!1);return{...c,expectedAmountsOut:d,minAmountsOut:l,priceImpact:y}},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{this.checkInputsExactTokensOut(n,a,t);const r=this.sortValuesExitExactTokensOut({pool:t,wrappedNativeAsset:i,amountsOut:n,tokensOut:a}),{expectedBPTIn:p,maxBPTIn:l}=this.calcBptInGivenExactTokensOut({...r,slippage:o}),{downScaledAmountsOut:d,poolTokens:u}=r,c=S.exitBPTInForExactTokensOut(d,l);return{...this.encodeExitPool({poolId:t.id,userData:c,poolTokens:u,minAmountsOut:d,exiter:e,toInternalBalance:s}),expectedBPTIn:p,maxBPTIn:l,priceImpact:(new $a).calcPriceImpact(t,d.map(BigInt),BigInt(p),!1)}},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:void 0,pool:t,shouldUnwrapNativeAsset:!1}),t.tokens.forEach((e=>e.priceRate="1"));const i=be(t),{minAmountsOut:s,expectedAmountsOut:r}=this.calcTokensOutGivenExactBptIn({...i,bptIn:a,slippage:n,singleTokenOutIndex:-1}),p=E.recoveryModeExit(a),l=this.encodeExitPool({poolTokens:i.poolTokens,poolId:t.id,exiter:e,minAmountsOut:s,userData:p,toInternalBalance:o}),d=(new $a).calcPriceImpact(t,r.map(BigInt),BigInt(a),!1);return{...l,expectedAmountsOut:r,minAmountsOut:s,priceImpact:d}},this.checkInputsExactBPTIn=({bptIn:e,singleTokenOut:n,pool:o,shouldUnwrapNativeAsset:i})=>{if(!e.length||a.parseFixed(e,18).isNegative())throw new Oa(exports.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(n&&n!==t.AddressZero&&!o.tokens.map((e=>e.address)).some((e=>Je(e,n))))throw new Oa(exports.BalancerErrorCode.TOKEN_MISMATCH);if(!i&&n===t.AddressZero)throw new Error("shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values");if(o.tokens.some((e=>void 0===e.decimals)))throw new Oa(exports.BalancerErrorCode.MISSING_DECIMALS)},this.checkInputsExactTokensOut=(e,t,a)=>{if(t.length!=e.length||t.length!=a.tokensList.length)throw new Oa(exports.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(a.tokens.some((e=>void 0===e.decimals)))throw new Oa(exports.BalancerErrorCode.MISSING_DECIMALS)},this.sortValuesExitExactBptIn=({pool:e,wrappedNativeAsset:t,shouldUnwrapNativeAsset:a,singleTokenOut:n})=>{const o=be(e,t,a),{poolTokens:i}=o;let s=-1;return n&&(s=i.indexOf(n.toLowerCase())),{...o,singleTokenOutIndex:s}},this.sortValuesExitExactTokensOut=({pool:e,wrappedNativeAsset:a,amountsOut:n,tokensOut:o})=>{const i=o.some((e=>e===t.AddressZero)),s=be(e,a,i),{scalingFactors:r}=s,p=new Y(a),[,l]=p.sortTokens(o,n),d=le(l.map((e=>BigInt(e))),r.map((e=>BigInt(e))));return{...s,upScaledAmountsOut:d,downScaledAmountsOut:l}},this.calcTokenOutGivenExactBptIn=({poolTokens:e,weights:t,upScaledBalances:n,totalSharesEvm:o,swapFeeEvm:i,singleTokenOutIndex:s,bptIn:r,slippage:p,scalingFactors:l})=>{const d=P.WeightedMaths._calcTokenOutGivenExactBptIn(n[s],t[s],BigInt(r),o,i).toString(),u=de(BigInt(d)-BigInt(1),l[s]).toString(),c=Array(e.length).fill("0"),y=Array(e.length).fill("0");return c[s]=u,y[s]=Ke(a.BigNumber.from(u),a.BigNumber.from(p)).toString(),{minAmountsOut:y,expectedAmountsOut:c}},this.calcTokensOutGivenExactBptIn=({upScaledBalances:e,totalSharesEvm:t,scalingFactors:n,bptIn:o,slippage:i})=>{const s=ue(P.WeightedMaths._calcTokensOutGivenExactBptIn(e,BigInt(o),t).map((e=>e.toString())).map((e=>BigInt(e))),n),r=s.map((e=>e.toString()));return{minAmountsOut:s.map((e=>Ke(a.BigNumber.from(e),a.BigNumber.from(i)).toString())),expectedAmountsOut:r}},this.calcBptInGivenExactTokensOut=({weights:e,upScaledBalances:t,upScaledAmountsOut:n,totalSharesEvm:o,swapFeeEvm:i,slippage:s})=>{const r=P.WeightedMaths._calcBptInGivenExactTokensOut(t,e,n,o,i).toString();return{maxBPTIn:$e(a.BigNumber.from(r),a.BigNumber.from(s)).toString(),expectedBPTIn:r}},this.encodeExitPool=({poolId:e,exiter:t,poolTokens:a,minAmountsOut:n,userData:o,toInternalBalance:i})=>{const s=va,r="exitPool",p={poolId:e,sender:t,recipient:t,exitPoolRequest:{assets:a,minAmountsOut:n,userData:o,toInternalBalance:i}};return{data:la.createInterface().encodeFunctionData(r,[p.poolId,p.sender,p.recipient,p.exitPoolRequest]),to:s,functionName:r,attributes:p}}}}class ja{constructor(){this.buildJoin=({joiner:e,pool:t,tokensIn:a,amountsIn:n,slippage:o,wrappedNativeAsset:i})=>{this.checkInputs(n,a,t);const s=this.sortValues({pool:t,wrappedNativeAsset:i,tokensIn:a,amountsIn:n}),{expectedBPTOut:r,minBPTOut:p}=this.calcBptOutGivenExactTokensIn({...s,slippage:o});return{...this.encodeJoinPool({...s,poolId:t.id,joiner:e,minBPTOut:p,tokensIn:a,amountsIn:n}),minBPTOut:p,expectedBPTOut:r,priceImpact:(new $a).calcPriceImpact(t,s.sortedAmountsIn.map(BigInt),BigInt(r),!0)}},this.checkInputs=(e,t,a)=>{if(e.length!=t.length||e.length!=a.tokensList.length)throw new Oa(exports.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(a.tokens.some((e=>void 0===e.decimals)))throw new Oa(exports.BalancerErrorCode.MISSING_DECIMALS);if(a.tokens.some((e=>!e.weight)))throw new Oa(exports.BalancerErrorCode.MISSING_WEIGHT)},this.sortValues=({pool:e,tokensIn:a,amountsIn:n,wrappedNativeAsset:o})=>{const i=a.some((e=>e===t.AddressZero)),s=be(e,o,i),r=new Y(o),[,p]=r.sortTokens(a,n),l=le(p.map(BigInt),s.scalingFactors);return{...s,sortedAmountsIn:p,upScaledAmountsIn:l}},this.calcBptOutGivenExactTokensIn=({upScaledBalances:e,weights:t,upScaledAmountsIn:n,totalSharesEvm:o,swapFeeEvm:i,slippage:s})=>{const r=p.WeightedMaths._calcBptOutGivenExactTokensIn(e,t,n,o,i).toString();return{expectedBPTOut:r,minBPTOut:Ke(a.BigNumber.from(r),a.BigNumber.from(s)).toString()}},this.encodeJoinPool=({sortedAmountsIn:e,poolTokens:t,poolId:a,joiner:n,minBPTOut:o,amountsIn:i,tokensIn:s})=>{const r="joinPool",p={poolId:a,sender:n,recipient:n,joinPoolRequest:{assets:t,maxAmountsIn:e,userData:S.joinExactTokensInForBPTOut(e,o),fromInternalBalance:!1}};return{to:va,functionName:r,data:la.createInterface().encodeFunctionData(r,[p.poolId,p.sender,p.recipient,p.joinPoolRequest]),attributes:p,value:Ue(s,i)}}}}class Xa{calcTotal(e){var t;let n=a.BigNumber.from(0),o=a.BigNumber.from(0);for(let a=0;ae.add(qe(t.weight||"0",18))),a.BigNumber.from(0));if(n.gt(0)){return Ge(o.mul(i).div(n),36)}return"0"}}class Ya{calcPoolSpotPrice(e,t,a){const n=e===a.address||t===a.address;if(n){const e={address:a.address,balance:a.totalShares,decimals:18,priceRate:"1",weight:"0"};a.tokens.push(e),a.tokensList.push(a.address)}const o=p.WeightedPool.fromPool(a),i=o.parsePoolPairData(e,t),s=o._spotPriceAfterSwapExactTokenInForTokenOut(i,p.ZERO).toString();return n&&(a.tokens.pop(),a.tokensList.pop()),s}}class za{constructor(e=new Ja,t=new ja,a=new Xa,n=new Ya,o=new $a){this.exit=e,this.join=t,this.liquidity=a,this.spotPriceCalculator=n,this.priceImpactCalculator=o}}class Za{calcTotal(e){var n,o;let i=t.Zero,s=t.Zero;for(let t=0;t{throw new Error("Exit type not supported")},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{throw new Error("Exit type not supported")},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{throw new Error("Exit type not supported")}}}class an{constructor(){this.buildJoin=({joiner:e,pool:t,tokensIn:a,amountsIn:n,slippage:o,wrappedNativeAsset:i})=>{throw new Error("Join type not supported")}}}class nn{constructor(e=new tn,t=new an,a=new Ua,n=new Ga,o=new Na){this.exit=e,this.join=t,this.liquidity=a,this.spotPriceCalculator=n,this.priceImpactCalculator=o}}class on{bptZeroPriceImpact(e,t){throw new Error("Linear Pool bptZeroPriceImpact Not Implented")}calcPriceImpact(e,t,a,n){return"0"}}class sn{constructor(){this.buildExitExactBPTIn=({exiter:e,pool:t,bptIn:a,slippage:n,shouldUnwrapNativeAsset:o,wrappedNativeAsset:i,singleTokenOut:s,toInternalBalance:r})=>{throw new Error("Exit type not supported")},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{throw new Error("Exit type not supported")},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:void 0,pool:t,shouldUnwrapNativeAsset:!1}),t.tokens.forEach((e=>e.priceRate="1"));const i=be(t),{minAmountsOut:s,expectedAmountsOut:r}=this.calcTokensOutGivenExactBptIn({...i,bptIn:a,slippage:n}),p=E.recoveryModeExit(a),l=je(s,i.bptIndex,"0"),d=this.encodeExitPool({poolTokens:i.poolTokens,poolId:t.id,exiter:e,minAmountsOut:l,userData:p,toInternalBalance:o}),u=(new on).calcPriceImpact(t,r.map(BigInt),BigInt(a),!1);return{...d,expectedAmountsOut:r,minAmountsOut:s,priceImpact:u}},this.checkInputsExactBPTIn=({bptIn:e,pool:t})=>{if(a.BigNumber.from(e).lte(0))throw new Oa(exports.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(t.tokens.some((e=>void 0===e.decimals)))throw new Oa(exports.BalancerErrorCode.MISSING_DECIMALS)},this.calcTokensOutGivenExactBptIn=({bptIndex:e,upScaledBalances:t,totalSharesEvm:n,scalingFactors:o,bptIn:i,slippage:s})=>{const r=Ye(ue(P.LinearMaths._calcTokensOutGivenExactBptIn(t,BigInt(i),n,e),o),e).map((e=>e.toString()));return{minAmountsOut:r.map((e=>Ke(a.BigNumber.from(e),a.BigNumber.from(s)).toString())),expectedAmountsOut:r}},this.encodeExitPool=e=>{const{exiter:t,poolId:a,minAmountsOut:n,userData:o,poolTokens:i,toInternalBalance:s}=e,r="exitPool",p={poolId:a,sender:t,recipient:t,exitPoolRequest:{assets:i,minAmountsOut:n,userData:o,toInternalBalance:s}};return{to:va,functionName:r,attributes:p,data:la.createInterface().encodeFunctionData(r,[p.poolId,p.sender,p.recipient,p.exitPoolRequest])}}}}class rn{constructor(){this.buildJoin=({joiner:e,pool:t,tokensIn:a,amountsIn:n,slippage:o,wrappedNativeAsset:i})=>{throw new Error("Join type not supported")}}}const pn=18,ln=qe("1",pn);class dn{calcTotal(e){var a,n;let o=t.Zero,i=t.Zero;for(let t=0;tBigInt(0)){const t=ce.divDownFixed(i,o);for(let a=0;aBigInt(0)){const t=ce.divDownFixed(i,o);for(let a=0;at.address!==e.address)),n=await Promise.all(t.map((async e=>{const t=await this.pools.findBy("address",e.address);if(!t)return;const a=qe(await this.getLiquidity(t),18),n=qe(t.totalShares,18),o=qe(e.balance,18),i=n.eq(0)?0:a.mul(o).div(n);return{address:t.address,liquidity:i.toString()}}))),o=n.reduce(((e,t)=>e.add(t?t.liquidity:a.BigNumber.from(0))),a.BigNumber.from(0)),i=t.filter((e=>!n.find((t=>(null==t?void 0:t.address)===e.address)))),s=await Promise.all(i.map((async e=>{var t;const a=await this.tokenPrices.find(e.address);return{address:e.address,decimals:e.decimals,priceRate:e.priceRate,price:(null==a?void 0:a.usd)&&a||{usd:null===(t=e.token)||void 0===t?void 0:t.latestUSDPrice},balance:e.balance,weight:e.weight}}))),r=qe(En.from(e.poolType).liquidity.calcTotal(s),18);return Ge(o.add(r),18)}async getBptPrice(e){const t=await this.getLiquidity(e);return(parseFloat(t)/parseFloat(e.totalShares)).toString()}}const Sn=a.BigNumber.from("0"),vn=e=>e?Object.keys(e).filter((t=>e[t].gt(Sn))).reduce(((t,a)=>(t[a]=e[a],t)),{}):{},kn=(e,t,a)=>e.map((e=>((e,t,a)=>{if(!t[e.address]&&!a[e.address])return e;const n=vn(t[e.address]),o=vn(a[e.address]);return e.claimableTokens||(e.claimableTokens={...n,...o}),e})(e,t,a))).filter((e=>e.claimableTokens&&Object.keys(e.claimableTokens).length)),Bn=(e,t)=>{var a;if(t.rewardTokens)for(const n of Object.keys(t.rewardTokens))e[a=t.id]||(e[a]=[]),e[t.id].push(n);return e},Cn=new e.Interface(["function claim_rewards(address sender, address receiver) returns (uint256)","function claimable_tokens(address addr) view returns (uint256)","function claimable_reward(address addr, address token) view returns (uint256)"]),On=new e.Interface(["function mintMany(address[] gauges) returns (uint256)"]),Mn=new e.Interface(["function getPendingRewards(address gauge, address user, address token) view returns (uint256)","function claimRewardsFromGauges(address[] gauges, address user)"]);class Fn{constructor(e,t,a,n,o,i){this.multicall=n,this.liquidityGauges=e,this.feeDistributor=t,this.chainId=a,this.gaugeClaimHelperAddress=o,this.balancerMinterAddress=i}async getClaimableRewardTokens(e){const t=await this.getGauges();if(!t.length)throw new Oa(exports.BalancerErrorCode.GAUGES_NOT_FOUND);const a=t.map((e=>e.address)),n=this.getRewardTokens(t),o=await this.retrieveClaimableTokens(a,e),i=await this.retrieveClaimableRewards(n,e);return kn(t,i,o)}async buildClaimRewardTokensRequest(e,t){if(1===this.chainId||5===this.chainId){if(!this.balancerMinterAddress)throw new Oa(exports.BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED)}else if(!this.gaugeClaimHelperAddress)throw new Oa(exports.BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED);const n=(await this.getClaimableRewardTokens(t)).filter((t=>e.map((e=>e.toLowerCase())).includes(t.address.toLowerCase()))).filter((e=>e.claimableTokens&&Object.keys(e.claimableTokens).length)),o=Array.from(new Set(n.map((e=>e.claimableTokens)).map((e=>Object.keys(e||{}))).flatMap((e=>e))));if(!o.length)throw new Oa(exports.BalancerErrorCode.GAUGES_REWARD_TOKEN_EMPTY);const i=o.map((e=>n.reduce(((t,a)=>(a.claimableTokens&&a.claimableTokens[e]&&a.claimableTokens[e]!==Sn&&(t=a.claimableTokens[e].add(t)),t)),a.BigNumber.from(0))));if(!i.length||i.every((e=>e.eq(Sn))))throw new Oa(exports.BalancerErrorCode.REWARD_TOKEN_ZERO);if(1===this.chainId||5===this.chainId){if(!this.balancerMinterAddress)throw new Oa(exports.BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED);const a=On.encodeFunctionData("mintMany",[e]);return{to:this.balancerMinterAddress,from:t,callData:a,tokensOut:o,expectedTokensValue:i,functionName:"mintMany"}}{if(!this.gaugeClaimHelperAddress)throw new Oa(exports.BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED);const a=Mn.encodeFunctionData("claimRewardsFromGauges",[e,t]);return{to:this.gaugeClaimHelperAddress,from:t,callData:a,tokensOut:o,expectedTokensValue:i,functionName:"claimRewardsFromGauges"}}}async getClaimableVeBalTokens(e,t){var a;if(!this.feeDistributor)throw new Oa(exports.BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED);return null===(a=this.feeDistributor)||void 0===a?void 0:a.getClaimableBalances(e,t)}async buildClaimVeBalTokensRequest(e,t){if(!this.feeDistributor)throw new Oa(exports.BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED);const a=await this.feeDistributor.getClaimableBalances(e,t),n=t.map((e=>{var t;return null!==(t=a[e])&&void 0!==t?t:Sn}));if(n.every((e=>e.eq(Sn))))throw new Oa(exports.BalancerErrorCode.REWARD_TOKEN_ZERO);const o=this.feeDistributor.claimBalances(e,t);return{to:this.feeDistributor.feeDistributor.address,from:e,callData:o,tokensOut:t,expectedTokensValue:n,functionName:"claimTokens"}}async getGauges(){return await this.liquidityGauges.fetch()}getRewardTokens(e){return e.reduce(Bn,{})}async retrieveClaimableRewards(e,t){const n=Object.keys(e),{payload:o,paths:i}=this.getPayload(n,e,t),[,s]=await this.multicall.callStatic.aggregate(o),r=s.map((e=>"0x"==e?"0x0":e));return i.reduce((e=>(t,n,o)=>{var i;const s=a.BigNumber.from(`${e[o]}`);return s.gt(Sn)&&(t[i=n.gauge]||(t[i]={}),t[n.gauge][n.token]=s),t})(r),{})}getPayload(e,t,a){const n=[],o=[];for(const i of e)for(const e of t[i])o.push({gauge:i,token:e}),n.push(this.getArguments(a,i,e));return{payload:n,paths:o}}getArguments(e,t,a){if(1===this.chainId||5===this.chainId)return{target:t,callData:Cn.encodeFunctionData("claimable_reward",[e,a])};if(!this.gaugeClaimHelperAddress)throw new Oa(exports.BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED);return{target:this.gaugeClaimHelperAddress,callData:Mn.encodeFunctionData("getPendingRewards",[t,e,a])}}async retrieveClaimableTokens(e,t){if(this.chainId===exports.Network.MAINNET||this.chainId===exports.Network.GOERLI){const n=ka[this.chainId].addresses.tokens.bal,o=e.map((e=>({target:e,callData:Cn.encodeFunctionData("claimable_tokens",[t])}))),[,i]=await this.multicall.callStatic.aggregate(o),s=i.map((e=>"0x"==e?"0x0":e));return e.reduce(((e,t)=>(n,o,i)=>{const s=a.BigNumber.from(`${e[i]}`);return s.gt(Sn)&&(n[o]||(n[o]={}),n[o][t]=s),n})(s,n),{})}return{}}}async function Rn(e,a,n,o){const i={sender:t.AddressZero,recipient:t.AddressZero,fromInternalBalance:!1,toInternalBalance:!1};try{return(await e.callStatic.queryBatchSwap(a,n,o,i)).map((e=>e.toString()))}catch(e){throw`queryBatchSwap call error: ${e}`}}var Nn=function(){return Nn=Object.assign||function(e){for(var t,a=1,n=arguments.length;ae();function zo(e,t=Yo){return{PoolShare:(a,n)=>t((t=>e.request(No,a,{...n,...t})),"PoolShare","query"),PoolShares:(a,n)=>t((t=>e.request(Lo,a,{...n,...t})),"PoolShares","query"),Pools:(a,n)=>t((t=>e.request(Do,a,{...n,...t})),"Pools","query"),AllPools:(a,n)=>t((t=>e.request(Uo,a,{...n,...t})),"AllPools","query"),Pool:(a,n)=>t((t=>e.request(Vo,a,{...n,...t})),"Pool","query"),PoolHistoricalLiquidities:(a,n)=>t((t=>e.request(qo,a,{...n,...t})),"PoolHistoricalLiquidities","query"),PoolSnapshots:(a,n)=>t((t=>e.request(Go,a,{...n,...t})),"PoolSnapshots","query"),JoinExits:(a,n)=>t((t=>e.request(Wo,a,{...n,...t})),"JoinExits","query"),Balancers:(a,n)=>t((t=>e.request(Ho,a,{...n,...t})),"Balancers","query"),TokenPrices:(a,n)=>t((t=>e.request(Ko,a,{...n,...t})),"TokenPrices","query"),TokenLatestPrices:(a,n)=>t((t=>e.request($o,a,{...n,...t})),"TokenLatestPrices","query"),TokenLatestPrice:(a,n)=>t((t=>e.request(Jo,a,{...n,...t})),"TokenLatestPrice","query"),User:(a,n)=>t((t=>e.request(jo,a,{...n,...t})),"User","query"),Users:(a,n)=>t((t=>e.request(Xo,a,{...n,...t})),"Users","query")}}var Zo,Qo,ei,ti,ai,ni,oi,ii,si,ri,pi,li,di,ui,ci,yi,bi,mi;!function(e){e.Arbitrum="Arbitrum",e.Avalanche="Avalanche",e.Base="Base",e.Gnosis="Gnosis",e.Optimism="Optimism",e.Polygon="Polygon",e.PolygonZkEvm="PolygonZkEvm"}(Zo||(Zo={})),function(e){e.gauges="gauges",e.id="id",e.numGauges="numGauges"}(Qo||(Qo={})),function(e){e.balance="balance",e.gauge="gauge",e.gauge__id="gauge__id",e.gauge__isKilled="gauge__isKilled",e.gauge__isPreferentialGauge="gauge__isPreferentialGauge",e.gauge__poolAddress="gauge__poolAddress",e.gauge__poolId="gauge__poolId",e.gauge__relativeWeightCap="gauge__relativeWeightCap",e.gauge__streamer="gauge__streamer",e.gauge__symbol="gauge__symbol",e.gauge__totalSupply="gauge__totalSupply",e.id="id",e.user="user",e.user__id="user__id"}(ei||(ei={})),function(e){e.id="id",e.name="name"}(ti||(ti={})),function(e){e.gauge="gauge",e.gauge__addedTimestamp="gauge__addedTimestamp",e.gauge__address="gauge__address",e.gauge__id="gauge__id",e.id="id",e.timestamp="timestamp",e.user="user",e.user__id="user__id",e.weight="weight"}(ai||(ai={})),function(e){e.addedTimestamp="addedTimestamp",e.address="address",e.id="id",e.liquidityGauge="liquidityGauge",e.liquidityGauge__id="liquidityGauge__id",e.liquidityGauge__isKilled="liquidityGauge__isKilled",e.liquidityGauge__isPreferentialGauge="liquidityGauge__isPreferentialGauge",e.liquidityGauge__poolAddress="liquidityGauge__poolAddress",e.liquidityGauge__poolId="liquidityGauge__poolId",e.liquidityGauge__relativeWeightCap="liquidityGauge__relativeWeightCap",e.liquidityGauge__streamer="liquidityGauge__streamer",e.liquidityGauge__symbol="liquidityGauge__symbol",e.liquidityGauge__totalSupply="liquidityGauge__totalSupply",e.rootGauge="rootGauge",e.rootGauge__chain="rootGauge__chain",e.rootGauge__id="rootGauge__id",e.rootGauge__isKilled="rootGauge__isKilled",e.rootGauge__recipient="rootGauge__recipient",e.rootGauge__relativeWeightCap="rootGauge__relativeWeightCap",e.type="type",e.type__id="type__id",e.type__name="type__name"}(ni||(ni={})),function(e){e.factory="factory",e.factory__id="factory__id",e.factory__numGauges="factory__numGauges",e.gauge="gauge",e.gauge__addedTimestamp="gauge__addedTimestamp",e.gauge__address="gauge__address",e.gauge__id="gauge__id",e.id="id",e.isKilled="isKilled",e.isPreferentialGauge="isPreferentialGauge",e.pool="pool",e.poolAddress="poolAddress",e.poolId="poolId",e.pool__address="pool__address",e.pool__id="pool__id",e.pool__poolId="pool__poolId",e.relativeWeightCap="relativeWeightCap",e.rewardTokensList="rewardTokensList",e.shares="shares",e.streamer="streamer",e.symbol="symbol",e.tokens="tokens",e.totalSupply="totalSupply"}(oi||(oi={})),function(e){e.bias="bias",e.id="id",e.slope="slope",e.timestamp="timestamp",e.user="user",e.user__id="user__id"}(ii||(ii={})),function(e){e.bias="bias",e.dstChainId="dstChainId",e.id="id",e.localUser="localUser",e.localUser__id="localUser__id",e.remoteUser="remoteUser",e.slope="slope",e.timestamp="timestamp",e.votingEscrowID="votingEscrowID",e.votingEscrowID__id="votingEscrowID__id",e.votingEscrowID__stakedSupply="votingEscrowID__stakedSupply"}(si||(si={})),function(e){e.asc="asc",e.desc="desc"}(ri||(ri={})),function(e){e.address="address",e.gauges="gauges",e.gaugesList="gaugesList",e.id="id",e.poolId="poolId",e.preferentialGauge="preferentialGauge",e.preferentialGauge__id="preferentialGauge__id",e.preferentialGauge__isKilled="preferentialGauge__isKilled",e.preferentialGauge__isPreferentialGauge="preferentialGauge__isPreferentialGauge",e.preferentialGauge__poolAddress="preferentialGauge__poolAddress",e.preferentialGauge__poolId="preferentialGauge__poolId",e.preferentialGauge__relativeWeightCap="preferentialGauge__relativeWeightCap",e.preferentialGauge__streamer="preferentialGauge__streamer",e.preferentialGauge__symbol="preferentialGauge__symbol",e.preferentialGauge__totalSupply="preferentialGauge__totalSupply"}(pi||(pi={})),function(e){e.decimals="decimals",e.gauge="gauge",e.gauge__id="gauge__id",e.gauge__isKilled="gauge__isKilled",e.gauge__isPreferentialGauge="gauge__isPreferentialGauge",e.gauge__poolAddress="gauge__poolAddress",e.gauge__poolId="gauge__poolId",e.gauge__relativeWeightCap="gauge__relativeWeightCap",e.gauge__streamer="gauge__streamer",e.gauge__symbol="gauge__symbol",e.gauge__totalSupply="gauge__totalSupply",e.id="id",e.periodFinish="periodFinish",e.rate="rate",e.symbol="symbol",e.totalDeposited="totalDeposited"}(li||(li={})),function(e){e.chain="chain",e.factory="factory",e.factory__id="factory__id",e.factory__numGauges="factory__numGauges",e.gauge="gauge",e.gauge__addedTimestamp="gauge__addedTimestamp",e.gauge__address="gauge__address",e.gauge__id="gauge__id",e.id="id",e.isKilled="isKilled",e.recipient="recipient",e.relativeWeightCap="relativeWeightCap"}(di||(di={})),function(e){e.factory="factory",e.factory__id="factory__id",e.factory__numGauges="factory__numGauges",e.gauge="gauge",e.gauge__addedTimestamp="gauge__addedTimestamp",e.gauge__address="gauge__address",e.gauge__id="gauge__id",e.id="id",e.isKilled="isKilled",e.recipient="recipient",e.relativeWeightCap="relativeWeightCap"}(ui||(ui={})),function(e){e.gaugeShares="gaugeShares",e.gaugeVotes="gaugeVotes",e.id="id",e.omniVotingLocks="omniVotingLocks",e.votingLocks="votingLocks"}(ci||(ci={})),function(e){e.bias="bias",e.id="id",e.lockedBalance="lockedBalance",e.slope="slope",e.timestamp="timestamp",e.unlockTime="unlockTime",e.updatedAt="updatedAt",e.user="user",e.user__id="user__id",e.votingEscrowID="votingEscrowID",e.votingEscrowID__id="votingEscrowID__id",e.votingEscrowID__stakedSupply="votingEscrowID__stakedSupply"}(yi||(yi={})),function(e){e.id="id",e.locks="locks",e.omniLocks="omniLocks",e.stakedSupply="stakedSupply"}(bi||(bi={})),function(e){e.allow="allow",e.deny="deny"}(mi||(mi={}));const fi=So` + fragment SubgraphGaugeShare on GaugeShare { + id + balance + user { + id + } + gauge { + id + isKilled + poolId + poolAddress + totalSupply + } +} + `,Ti=So` + fragment SubgraphLiquidityGauge on LiquidityGauge { + id + symbol + poolAddress + poolId + streamer + factory { + id + numGauges + } + totalSupply + tokens { + id + symbol + decimals + totalDeposited + rate + periodFinish + } +} + `,hi=So` + fragment SubgraphPoolWithPreferentialGauge on Pool { + id + poolId + preferentialGauge { + ...SubgraphLiquidityGauge + } +} + ${Ti}`,Ii=So` + query GaugeShare($id: ID!, $block: Block_height) { + gaugeShare(id: $id, block: $block) { + ...SubgraphGaugeShare + } +} + ${fi}`,gi=So` + query GaugeShares($first: Int, $orderBy: GaugeShare_orderBy, $orderDirection: OrderDirection, $skip: Int, $where: GaugeShare_filter, $block: Block_height) { + gaugeShares( + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + skip: $skip + where: $where + block: $block + ) { + ...SubgraphGaugeShare + } +} + ${fi}`,_i=So` + query LiquidityGauges($skip: Int, $first: Int, $orderBy: LiquidityGauge_orderBy, $orderDirection: OrderDirection, $where: LiquidityGauge_filter, $block: Block_height) { + liquidityGauges( + skip: $skip + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + where: $where + block: $block + ) { + ...SubgraphLiquidityGauge + } +} + ${Ti}`,xi=So` + query Pools($skip: Int, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter, $block: Block_height) { + pools( + skip: $skip + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + where: $where + block: $block + ) { + ...SubgraphPoolWithPreferentialGauge + } +} + ${hi}`,Pi=So` + query PoolGauges($where: Pool_filter, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $skip: Int, $block: Block_height) { + pools( + where: $where + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + skip: $skip + block: $block + ) { + gauges { + id + relativeWeightCap + } + preferentialGauge { + id + } + } +} + `,wi=(e,t,a)=>e();function Ei(e){return zo(new d.GraphQLClient(e))}function Ai(e){return function(e,t=wi){return{GaugeShare:(a,n)=>t((t=>e.request(Ii,a,{...n,...t})),"GaugeShare","query"),GaugeShares:(a,n)=>t((t=>e.request(gi,a,{...n,...t})),"GaugeShares","query"),LiquidityGauges:(a,n)=>t((t=>e.request(_i,a,{...n,...t})),"LiquidityGauges","query"),Pools:(a,n)=>t((t=>e.request(xi,a,{...n,...t})),"Pools","query"),PoolGauges:(a,n)=>t((t=>e.request(Pi,a,{...n,...t})),"PoolGauges","query")}}(new d.GraphQLClient(e))}class Si{constructor(t,a,n={}){this.options=n,this.calls=[],this.paths=[],this.address="0xcA11bde05977b3631167028862bE2a173976CA11",this.interface=new e.Interface(t),this.multicall=na.connect(this.address,a)}call(e,t,a,n){return this.calls.push([t,a,n]),this.paths.push(e),this}async execute(e={},t=1024){const a=e;return(await this.executeMulticall(t)).forEach(((e,t)=>s.set(a,this.paths[t],e.length>1?e:e[0]))),this.calls=[],this.paths=[],a}async executeMulticall(e){const t=Math.ceil(this.calls.length/e),a=[],n=[];for(let a=0;a({target:e,allowFailure:!0,callData:this.interface.encodeFunctionData(t,a)})));n.push(this.multicall.callStatic.aggregate3(t,this.options))}return(await Promise.all(n)).forEach(((t,n)=>{const o=n*e;for(let e=0;e{a.call(`${e}.weights`,t,"getNormalizedWeights")},Bi=(e,t,a)=>{a.call(`${e}.targets`,t,"getTargets"),a.call(`${e}.wrappedTokenRate`,t,"getWrappedTokenRate")},Ci=(e,t,a)=>{a.call(`${e}.amp`,t,"getAmplificationParameter")},Oi=(e,t,a)=>{a.call(`${e}.tokenRates`,t,"getTokenRates")},Mi=async(e,t,a,n=1024)=>{if(0===e.length)return{};const o=new Si(vi,a);e.forEach((({id:e,address:a,poolType:n,poolTypeVersion:i})=>{((e,t,a,n,o)=>{o.call(`${e}.poolTokens`,a,"getPoolTokens",[e]),o.call(`${e}.totalShares`,t,(e=>e.includes("Linear")||["StablePhantom"].includes(e)?"getVirtualSupply":"ComposableStable"===e?"getActualSupply":"totalSupply")(n)),o.call(`${e}.swapFee`,t,(e=>"Element"===e?"percentFee":"FX"===e?"protocolPercentFee":"getSwapFeePercentage")(n))})(e,a,t,n,o),((e,t=1)=>{const a=()=>({});switch(e){case"Weighted":case"LiquidityBootstrapping":case"Investment":return ki;case"Stable":case"StablePhantom":case"MetaStable":case"ComposableStable":return Ci;case"GyroE":case"Gyro2":return 2===t?Oi:a;case"AaveLinear":return 1===t?Bi:a;default:return a}})(n,i)(e,a,o)}));return await o.execute({},n)};async function Fi(e,t,n,o,i=1024){if(0===e.length)return e;const s=[],r=await Mi(e,n,o,i);return e.forEach((e=>{const t=r[e.id];s.push(((e,t)=>({...e,tokens:t.poolTokens?e.tokens.map((n=>{const o=t.poolTokens[0].map((e=>e.toLowerCase())).indexOf(n.address),i=e.wrappedIndex&&e.tokensList[e.wrappedIndex],s=void 0===n.decimals?18:n.decimals;return{...n,balance:a.formatFixed(t.poolTokens[1][o],s),weight:t.weights&&a.formatFixed(t.weights[o],18)||n.weight,priceRate:t.wrappedTokenRate&&i&&i.toLowerCase()===n.address.toLowerCase()&&a.formatFixed(t.wrappedTokenRate,18)||n.priceRate}})):e.tokens,totalShares:t.totalShares?a.formatFixed(t.totalShares,18):e.totalShares,swapFee:t.swapFee?a.formatFixed(t.swapFee,18):e.swapFee,amp:t.amp&&t.amp[0]&&a.formatFixed(t.amp[0],String(t.amp[2]).length-1)||e.amp,lowerTarget:t.targets&&a.formatFixed(t.targets[0],18)||e.lowerTarget,upperTarget:t.targets&&a.formatFixed(t.targets[1],18)||e.upperTarget,tokenRates:t.tokenRates&&t.tokenRates.map((e=>a.formatFixed(e,18)))||e.tokenRates}))(e,t))})),s}class Ri{constructor(e,t,a,n,o){this.client=e,this.provider=t,this.network=a,this.sorConfig=n,this.defaultArgs=(null==o?void 0:o.args)||{orderBy:bo.TotalLiquidity,orderDirection:ro.Desc,where:{swapEnabled:{eq:!0},totalShares:{gt:1e-12}}}}async getPools(e){const t=function(e){return e.map((e=>({...e,poolType:e.poolType||"",tokens:(e.tokens||[]).map((e=>({...e,weight:e.weight||null}))),totalWeight:e.totalWeight||void 0,amp:e.amp||void 0,expiryTime:e.expiryTime?s.parseInt(e.expiryTime):void 0,unitSeconds:e.unitSeconds?s.parseInt(e.unitSeconds):void 0,principalToken:e.principalToken||void 0,baseToken:e.baseToken||void 0})))}((await this.getSubgraphPools(e)).filter((e=>{if(!this.network.poolsToIgnore)return!0;return-1===this.network.poolsToIgnore.findIndex((t=>t.toLowerCase()===e.id.toLowerCase()))})));if(this.sorConfig&&!1===this.sorConfig.fetchOnChainBalances)return t;const a=j.getInstance();a.time(`fetching on-chain balances for ${t.length} pools`);const n=await Fi(t,this.network.addresses.contracts.multicall,this.network.addresses.contracts.vault,this.provider,this.network.multicallBatchSize);return a.timeEnd(`fetching on-chain balances for ${t.length} pools`),n}async getSubgraphPools(e){const t=new nt(e||this.defaultArgs).format(new at);if(t.first){const{pools:e}=await this.client.Pools(t);return e}const{pool0:a,pool1000:n,pool2000:o}=await this.client.AllPools(t);return[...a,...n,...o]}}class Ni{constructor(e,t){this.client=e,this.weth=t.toLowerCase()}async getNativeAssetPriceInToken(e){const t=await this.getLatestPriceInEthFromSubgraph(e);if(!t)throw Error("No price found in the subgraph");return""+1/t}async getLatestPriceInEthFromSubgraph(e){e=e.toLowerCase();const{latestPrices:t}=await this.client.TokenLatestPrices({where:{asset_in:[e,this.weth]}}),a=s.keyBy(t,"id");if(a[`${e}-${this.weth}`])return parseFloat(a[`${e}-${this.weth}`].price);const n=t.filter((t=>t.asset===e));for(const e of n){const t=a[`${e.pricingAsset}-${this.weth}`];if(t)return parseFloat(e.price)*parseFloat(t.price)}return null}}function Li(e){var t,a;if("number"==typeof e.network){const a=ka[e.network];return{...a,urls:{...a.urls,subgraph:null!==(t=e.customSubgraphUrl)&&void 0!==t?t:a.urls.subgraph},tenderly:e.tenderly}}return{...e.network,urls:{...e.network.urls,subgraph:null!==(a=e.customSubgraphUrl)&&void 0!==a?a:e.network.urls.subgraph},tenderly:e.network.tenderly}}const Di=["0x00c2a4be503869fa751c2dbcb7156cc970b5a8da000000000000000000000477","0x02d928e68d8f10c0358566152677db51e1e2dc8c00000000000000000000051e","0x04248aabca09e9a1a3d5129a7ba05b7f17de768400000000000000000000050e","0x05513ca725b6ce035ca2641075474eb469f05f4c00020000000000000000041f","0x0a0fb4ff697de5ac5b6770cd8ee1b72af80b57cf000000000000000000000496","0x0afbd58beca09545e4fb67772faf3858e610bcd00000000000000000000004b9","0x0d05aac44ac7dd3c7ba5d50be93eb884a057d23400000000000000000000051c","0x11839d635e2f0270da37e8ef4324d4d5d54329570002000000000000000004d8","0x126e7643235ec0ab9c103c507642dc3f4ca23c66000000000000000000000468","0x133d241f225750d2c92948e464a5a80111920331000000000000000000000476","0x159cb00338fb63f263fd6f621df619cef71da9540000000000000000000004d5","0x173063a30e095313eee39411f07e95a8a806014e0002000000000000000003ab","0x1bd2f176a812e312077bca87e37c08432bb09f3e0000000000000000000005a1","0x20b156776114e8a801e9767d90c6ccccc8adf398000000000000000000000499","0x246ffb4d928e394a02e45761fecdba6c2e79b8eb000000000000000000000541","0x25accb7943fd73dda5e23ba6329085a3c24bfb6a000200000000000000000387","0x26c2b83fc8535deead276f5cc3ad9c1a2192e02700020000000000000000056b","0x2b218683178d029bab6c9789b1073aa6c96e517600000000000000000000058c","0x2ba7aa2213fa2c909cd9e46fed5a0059542b36b00000000000000000000003a3","0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c0000000000000000000000fd","0x2e52c64fd319e380cdbcfc4577ea1fda558a32e40002000000000000000005ba","0x2f4eb100552ef93840d5adc30560e5513dfffacb000000000000000000000334","0x2ff1a9dbdacd55297452cfd8a4d94724bc22a5f7000000000000000000000484","0x3035917be42af437cbdd774be26b9ec90a2bd677000200000000000000000543","0x331d50e0b00fc1c32742f151e56b9b616227e23e00000000000000000000047c","0x334c96d792e4b26b841d28f53235281cec1be1f200020000000000000000038a","0x335d1709d4da9aca59d16328db5cd4ea66bfe06b0000000000000000000004d6","0x395d8a1d9ad82b5abe558f8abbfe183b27138af40000000000000000000004e5","0x3bb22fc9033b802f2ac47c18885f63476f158afc000000000000000000000483","0x3c640f0d3036ad85afa2d5a9e32be651657b874f00000000000000000000046b","0x3cdae4f12a67ba563499e102f309c73213cb241c000000000000000000000335","0x3dbb8d974b82e82ce79c20c0f5995f4f1f533ede000000000000000000000470","0x3f7a7fd7f214be45ec26820fd01ac3be4fc75aa70002000000000000000004c5","0x3fcb7085b8f2f473f80bf6d879cae99ea4de934400000000000000000000056d","0x41503c9d499ddbd1dcdf818a1b05e9774203bf46000000000000000000000594","0x4228290ee9cab692938ff0b4ba303fbcdb68e9f200020000000000000000057d","0x454ed96955d04d2f5cdd05e0fd1c77975bfe5307000000000000000000000410","0x481c5fc05d63a58aa2f0f2aa417c021b5d419cb200000000000000000000056a","0x483006684f422a9448023b2382615c57c5ecf18f000000000000000000000488","0x4a82b580365cff9b146281ab72500957a849abdc000000000000000000000494","0x4c81255cc9ed7062180ea99962fe05ac0d57350b0000000000000000000005a3","0x4c8d2e60863e8d7e1033eda2b3d84e92a641802000000000000000000000040f","0x4cbde5c4b4b53ebe4af4adb85404725985406163000000000000000000000595","0x4ce0bd7debf13434d3ae127430e9bd4291bfb61f00020000000000000000038b","0x4ce277df0feb5b4d07a0ca2adcf5326e4005239d000000000000000000000518","0x4fd4687ec38220f805b6363c3c1e52d0df3b5023000200000000000000000473","0x4fd63966879300cafafbb35d157dc5229278ed230000000000000000000000e9","0x50cf90b954958480b8df7958a9e965752f62712400000000000000000000046f","0x53bc3cba3832ebecbfa002c12023f8ab1aa3a3a0000000000000000000000411","0x5a6a8cffb4347ff7fc484bf5f0f8a2e234d34255000200000000000000000275","0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b","0x60683b05e9a39e3509d8fdb9c959f23170f8a0fa000000000000000000000489","0x60d604890feaa0b5460b28a424407c24fe89374a0000000000000000000004fc","0x639883476960a23b38579acfd7d71561a0f408cf000200000000000000000505","0x652d486b80c461c397b0d95612a404da936f3db30000000000000000000000e7","0x6667c6fa9f2b3fc1cc8d85320b62703d938e43850000000000000000000004fb","0x6a1eb2e9b45e772f55bd9a34659a04b6f75da68700000000000000000000040d","0x6c56e72c551b5ac4bf54a620a76077ca768c8fe40002000000000000000004da","0x70b7d3b3209a59fb0400e17f67f3ee8c37363f4900020000000000000000018f","0x7337224d59cb16c2dc6938cd45a7b2c60c865d6a0000000000000000000004d4","0x74cbfaf94a3577c539a9dcee9870a6349a33b34f000000000000000000000534","0x779d01f939d78a918a3de18cc236ee89221dfd4e0000000000000000000004c7","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x804cdb9116a10bb78768d3252355a1b18067bf8f0000000000000000000000fb","0x813e3fe1761f714c502d1d2d3a7cceb33f37f59d00000000000000000000040c","0x82698aecc9e28e9bb27608bd52cf57f704bd1b83000000000000000000000336","0x8a6b25e33b12d1bb6929a8793961076bd1f9d3eb0002000000000000000003e8","0x8e6ec57a822c2f527f2df7c7d7d361df3e7530a1000000000000000000000498","0x8f4063446f5011bc1c9f79a819efe87776f23704000000000000000000000197","0x9001cbbd96f54a658ff4e6e65ab564ded76a543100000000000000000000050a","0x9210f1204b5a24742eba12f710636d76240df3d00000000000000000000000fc","0x9516a2d25958edb8da246a320f2c7d94a0dbe25d000000000000000000000519","0x959216bb492b2efa72b15b7aacea5b5c984c3cca000200000000000000000472","0x968024662b9566b42d78af23a0f441bc8723fa83000200000000000000000418","0x99c88ad7dc566616548adde8ed3effa730eb6c3400000000000000000000049a","0x9b1c8407a360443a9e5eca004713e4088fab8ac0000000000000000000000497","0x9b692f571b256140a39a34676bffa30634c586e100000000000000000000059d","0x9d7f992c900fbea0ec314bdd71b7cc1becf76a33000200000000000000000573","0x9fb771d530b0ceba5160f7bfe2dd1e8b8aa1340300000000000000000000040e","0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d","0xa1697f9af0875b63ddc472d6eebada8c1fab85680000000000000000000004f9","0xa3823e50f20982656557a4a6a9c06ba5467ae9080000000000000000000000e6","0xa718042e5622099e5f0ace4e7122058ab39e1bbe000200000000000000000475","0xa8b103a10a94f4f2d7ed2fdcd5545e807557330700000000000000000000048e","0xac5b4ef7ede2f2843a704e96dcaa637f4ba3dc3f00000000000000000000051d","0xac976bb42cb0c85635644e8c7c74d0e0286aa61c0000000000000000000003cb","0xae37d54ae477268b9997d4161b96b8200755935c000000000000000000000337","0xae8535c23afedda9304b03c68a3563b75fc8f92b0000000000000000000005a0","0xb0f75e97a114a4eb4a425edc48990e6760726709000000000000000000000198","0xb5e3de837f869b0248825e0175da73d4e8c3db6b000200000000000000000474","0xb841b062ea8ccf5c4cb78032e91de4ae875560420002000000000000000005b7","0xb9bd68a77ccf8314c0dfe51bc291c77590c4e9e6000200000000000000000385","0xbb6881874825e60e1160416d6c426eae65f2459e000000000000000000000592","0xbc0f2372008005471874e426e86ccfae7b4de79d000000000000000000000485","0xbf2ef8bdc2fc0f3203b3a01778e3ec5009aeef3300000000000000000000058d","0xbfa413a2ff0f20456d57b643746133f54bfe0cd20000000000000000000004c3","0xc2b021133d1b0cf07dba696fd5dd89338428225b000000000000000000000598","0xc443c15033fcb6cf72cc24f1bda0db070ddd9786000000000000000000000593","0xc50d4347209f285247bda8a09fc1c12ce42031c3000000000000000000000590","0xc5dc1316ab670a2eed5716d7f19ced321191f38200000000000000000000056e","0xc8c79fcd0e859e7ec81118e91ce8e4379a481ee6000000000000000000000196","0xcaa052584b462198a5a9356c28bce0634d65f65c0000000000000000000004db","0xcbfa4532d8b2ade2c261d3dd5ef2a2284f7926920000000000000000000004fa","0xcfae6e251369467f465f13836ac8135bd42f8a56000000000000000000000591","0xd4e7c1f3da1144c9e2cfd1b015eda7652b4a439900000000000000000000046a","0xd6e355036f41dc261b3f1ed3bbc6003e87aadb4f000000000000000000000495","0xd7edb56f63b2a0191742aea32df1f98ca81ed9c600000000000000000000058e","0xd997f35c9b1281b82c8928039d14cddab5e13c2000000000000000000000019c","0xdba274b4d04097b90a72b62467d828cefd708037000000000000000000000486","0xdc063deafce952160ec112fa382ac206305657e60000000000000000000004c4","0xdec02e6642e2c999af429f5ce944653cad15e093000000000000000000000469","0xe03af00fabe8401560c1ff7d242d622a5b601573000000000000000000000493","0xe0fcbf4d98f0ad982db260f86cf28b49845403c5000000000000000000000504","0xe2d16b0a39f3fbb4389a0e8f1efcbecfb3d1e6e10000000000000000000005a7","0xe4dc3c1998ac693d68f4c77476d7c815694c3e94000200000000000000000416","0xe6bcc79f328eec93d4ec8f7ed35534d9ab549faa0000000000000000000000e8","0xe8c56405bc405840154d9b572927f4197d110de10000000000000000000005a4","0xeb486af868aeb3b6e53066abc9623b1041b42bc000000000000000000000046c","0xeb567dde03f3da7fe185bdacd5ab495ab220769d000000000000000000000548","0xec3626fee40ef95e7c0cbb1d495c8b67b34d398300000000000000000000053d","0xf22ff21e17157340575158ad7394e068048dd98b0000000000000000000004b8","0xf57c794f42da72b38c8f610ff3b5e8502e48cbde00000000000000000000055c","0xf71d0774b214c4cf51e33eb3d30ef98132e4dbaa00000000000000000000046e","0xfa24a90a3f2bbe5feea92b95cd0d14ce709649f900000000000000000000058f","0xfd11ccdbdb7ab91cb9427a6d6bf570c95876d1950000000000000000000004c2","0xfebb0bbf162e64fb9d0dfe186e517d84c395f016000000000000000000000502","0xfef969638c52899f91781f1be594af6f40b99bad00000000000000000000047b","0x02e139d53ebf4033bf78ab66c6a1e7f1f204487f0002000000000000000009f9","0x03090a9811181a2afe830a3a0b467698ccf3a8b1000000000000000000000bf5","0x0320c1c5b6df19a194d48882aaec1c72940081d9000000000000000000000a7d","0x04b54ea92d73de2d62d651db7d9778f0c49157d8000200000000000000000ba2","0x0503dd6b2d3dd463c9bef67fb5156870af63393e00000000000000000000042e","0x0889b240a5876aae745ac19f1771853671dc5d36000000000000000000000b3f","0x0bc54e914f53f98d16035f4f0d948f3e09c2fac0000200000000000000000bac","0x0c06e87c7b88d998f645b91c1f53b51294b12bca000100000000000000000bb9","0x10b040038f87219d9b42e025e3bd9b8095c87dd9000000000000000000000b11","0x117a3d474976274b37b7b94af5dcade5c90c6e85000000000000000000000aca","0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000a5f","0x1379b816b9be611431d693290289c204720ca56d000100000000000000000b6f","0x150e7b885bdfce974f2abe88a72fdbd692175c6f0002000000000000000009fd","0x178e029173417b1f9c8bc16dcec6f697bc323746000000000000000000000758","0x1aafc31091d93c3ff003cff5d2d8f7ba2e7284250000000000000000000003b3","0x216690738aac4aa0c4770253ca26a28f0115c595000000000000000000000b2c","0x216d6db0c28204014618482c369d7fbf0a8f3232000100000000000000000b60","0x230ecdb2a7cee56d6889965a023aa0473d6da507000000000000000000000bf3","0x252ff6a3a6fd7b5e8e999de8e3f5c3b306ed1401000200000000000000000bec","0x25e57f4612912614e6c99616bd2abb9b5ae71e99000000000000000000000bf0","0x2645b13fd2c5295296e94a76280b968bdcbbdfed000000000000000000000c11","0x284eb68520c8fa83361c1a3a5910aec7f873c18b000000000000000000000ac9","0x2c8dbe8eb86135d9f2f26d196748c088d47f73e7000200000000000000000a29","0x31bccf9e28b94e5dacebaa67fe8bc1603cecd904000000000000000000000a01","0x341068a547c3cde3c09e338714010dd01b32f93f000200000000000000000a34","0x3db543faf7a92052de7860c5c9debabee59ed5bd000000000000000000000a62","0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd00000000000000000000070d","0x3efb91c4f9b103ee45885695c67794591916f34e000200000000000000000b43","0x402cfdb7781fa85d52f425352661128250b79e12000000000000000000000be3","0x43894de14462b421372bcfe445fa51b1b4a0ff3d000000000000000000000b36","0x4739e50b59b552d490d3fdc60d200977a38510c0000000000000000000000b10","0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b","0x4a0b73f0d13ff6d43e304a174697e3d5cfd310a400020000000000000000091c","0x4a77ef015ddcd972fd9ba2c7d5d658689d090f1a000000000000000000000b38","0x4ae3661afa119892f0cc8c43edaf6a94989ac171000000000000000000000c06","0x4ccb966d8246240afb7a1a24628efb930870b1c40002000000000000000009fc","0x52cc8389c6b93d740325729cc7c958066cee4262000000000000000000000b0f","0x5b77107fcdf2b41903bab2bc555d4fc14cf7667d000000000000000000000b32","0x5bae72b75caab1f260d21bc028c630140607d6e8000000000000000000000ac6","0x600bd01b6526611079e12e1ff93aba7a3e34226f0000000000000000000009e4","0x63ce19ccd39930725b8a3d2733627804718ab83d000000000000000000000bf2","0x64efad69f099813021b41f4cac6e749fd55e188f000000000000000000000b39","0x6933ec1ca55c06a894107860c92acdfd2dd8512f000000000000000000000428","0x6abe4e7a497b8293c258389c1b00d177e4f257ed00010000000000000000080d","0x6c8c7fc50247a47038015eb1fd5dc105d05dafba000200000000000000000ba0","0x7079a25dec33be61bbd81b2fb69b468e80d3e72c0000000000000000000009ff","0x71bd10c2a590b5858f5576550c163976a48af906000000000000000000000b27","0x7c82a23b4c48d796dee36a9ca215b641c6a8709d000000000000000000000acd","0x7f4f4942f2a14b6ab7b08b10ada1aacede4ee8d4000200000000000000000b44","0x86aef31951e0a3a54333bd9e72f9a95587d058c5000200000000000000000912","0x882c7a84231484b3e9f3fd45ac04b1eb5d35b076000200000000000000000a91","0x894c82800526e0391e709c0983a5aea3718b7f6d000000000000000000000ac5","0x89b28a9494589b09dbccb69911c189f74fdadc5a000000000000000000000b33","0x89bb15076c9f2d86aa98ec6cffc1a71e31c38953000000000000000000000bf1","0x89f1146fee52b5d9166e9c83cc388b6d8f69f1380001000000000000000009e7","0x8a819a4cabd6efcb4e5504fe8679a1abd831dd8f00000000000000000000042d","0x8b58a1e7fff52001c22386c2918d45938a6a9be30001000000000000000008d9","0x8b8225bfedebaf1708c55743acb4ad43fd4d0f21000200000000000000000918","0x8fbd0f8e490735cfc3abf4f29cbddd5c3289b9a7000000000000000000000b5b","0x8fd39252d683fdb60bddd4df4b53c9380b496d59000200000000000000000b45","0x9321e2250767d79bab5aa06daa8606a2b3b7b4c5000000000000000000000bf4","0x949a12b95ec5b80c375b98963a5d6b33b0d0efff0002000000000000000009fe","0x9a020bdc2faff5bd24c6acc2020d01ff9f2c627a000000000000000000000ae2","0x9cf9358300e34bf9373d30129a1e718d8d058b54000200000000000000000913","0x9e34631547adcf2f8cefa0f5f223955c7b137571000000000000000000000ad5","0xa5a935833f6a5312715f182733eab088452335d7000100000000000000000bee","0xa5fe91dde37d8bf2dacacc0168b115d28ed03f84000000000000000000000b35","0xa8bf1c584519be0184311c48adbdc4c15cb2e8c1000000000000000000000bf6","0xab269164a10fab22bc87c39946da06c870b172d6000000000000000000000bfc","0xac2cae8d2f78a4a8f92f20dbe74042cd0a8d5af3000000000000000000000be2","0xae646817e458c0be890b81e8d880206710e3c44e000000000000000000000acb","0xaef2c171dbe64b0c18977e16e70bfd29d4ee0256000000000000000000000ac8","0xb0c830dceb4ef55a60192472c20c8bf19df03488000000000000000000000be1","0xb266ac3b7c98d7bcb28731dac0ef42dba1b276be000000000000000000000be4","0xb371aa09f5a110ab69b39a84b5469d29f9b22b76000000000000000000000b37","0xb3d658d5b95bf04e2932370dd1ff976fe18dd66a000000000000000000000ace","0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e","0xb59be8f3c85a9dd6e2899103b6fbf6ea405b99a4000000000000000000000b34","0xb878ecce26838fbba4f78cb5b791a0e09152c067000000000000000000000427","0xb973ca96a3f0d61045f53255e319aedb6ed4924000000000000000000000042f","0xbd4e35784c832d0f9049b54cb3609e5907c5b495000100000000000000000b14","0xc55ec796a4debe625d95436a3531f4950b11bdcf000000000000000000000b3e","0xc7e6389e364f4275eb442ef215ed21877028e2af000000000000000000000ac7","0xc83b55bbd005f1f84906545fcdb145dee53523e0000200000000000000000b30","0xcb21a9e647c95127ed784626485b3104cb28d0e7000000000000000000000425","0xd00f9ca46ce0e4a63067c4657986f0167b0de1e5000000000000000000000b42","0xd2f3b9e67c69762dd1c88f1d3dadd1649a190761000200000000000000000bf7","0xd4accb350f9cf59fe3cf7a5ee6ed9ace6a568ea9000200000000000000000b75","0xda1cd1711743e57dd57102e9e61b75f3587703da000000000000000000000acc","0xdae301690004946424e41051ace1791083be42a1000000000000000000000b40","0xde0a77ab6689b980c30306b10f9131a007e1af81000200000000000000000ba1","0xe051605a83deae38d26a7346b100ef1ac2ef8a0b0000000000000000000003ce","0xe1fb90d0d3b47e551d494d7ebe8f209753526b01000000000000000000000ac4","0xe2272cddb2cc408e79e02a73d1db9acc24a843d5000200000000000000000ba7","0xe2dc0e0f2c358d6e31836dee69a558ab8d1390e70000000000000000000009fa","0xe4885ed2818cc9e840a25f94f9b2a28169d1aea7000000000000000000000b29","0xe6909c2f18a29d97217a6146f045e1780606991f000100000000000000000bfe","0xe78b25c06db117fdf8f98583cdaaa6c92b79e917000000000000000000000b2b","0xea11645ac7d8f2def94c9d8d86bd766296c9b6b6000000000000000000000b3a","0xeb480dbbdd921cd6c359e4cc4c65ddea6395e2a1000200000000000000000946","0xed35f28f837e96f81240ebb82e0e3f518c7e8a2f000100000000000000000bb5","0xf0211cceebe6fcc45052b4e57ee95d233f5669d2000100000000000000000c01","0xf22a66046b5307842f21b311ecb4c462c24c0635000000000000000000000b15","0xf28f17be00f8ca3c9b7f66a4aad5513757fb3341000200000000000000000b5a","0xf42ed61450458ee4620f5ef4f29adb25a6ef0fb6000000000000000000000bf8","0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56000000000000000000000445","0xf93579002dbe8046c43fefe86ec78b1112247bb8000000000000000000000759","0xf984eb2b8a7ef780245a797a2fccd82f346409ca000000000000000000000a59","0xfa2c0bd8327c99db5bde4c9e9e5cbf30946351bb000000000000000000000948","0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea600000000000000000000075a","0x1ac55c31dac78ca943cb8ebfca5945ce09e036e2000000000000000000000024","0x225e0047671939a8d78e08ebd692788abe63f15c000000000000000000000009","0x41211bba6d37f5a74b22e667533f080c7c7f3f1300000000000000000000000b","0x4de21b365d6543661d0e105e579a34b963862497000200000000000000000045","0x581ec1f5e7ced12b186deae32256adb53bdd5b08000000000000000000000001","0x66f33ae36dd80327744207a48122f874634b3ada000100000000000000000013","0xa3ed6f78edc29f69df8a0d16b1d1ccf9871f918c000000000000000000000032","0xa611a551b95b205ccd9490657acf7899daee5db700000000000000000000002e","0xb95829adbacd8af89e291dee78bc09e24de51d6b000000000000000000000043","0xb973ca96a3f0d61045f53255e319aedb6ed49240000200000000000000000011","0xba1a5b19d09a79dada039b1f974015c5a989d5fd000100000000000000000046","0xbb9cd48d33033f5effbedec9dd700c7d7e1dcf5000000000000000000000000e","0xd16f72b02da5f51231fde542a8b9e2777a478c8800000000000000000000000f","0xd4015683b8153666190e0b2bec352580ebc4caca00000000000000000000000d","0xe15cac1df3621e001f76210ab12a7f1a1691481f000000000000000000000044","0xe7f88d7d4ef2eb18fcf9dd7216ba7da1c46f3dd600000000000000000000000a","0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56000200000000000000000012","0xfedb19ec000d38d92af4b21436870f115db22725000000000000000000000010","0xffff76a3280e95dc855696111c2562da09db2ac000000000000000000000000c","0x00fcd3d55085e998e291a0005cedecf58ac14c4000020000000000000000047f","0x077794c30afeccdf5ad2abc0588e8cee7197b71a000000000000000000000352","0x117a3d474976274b37b7b94af5dcade5c90c6e85000000000000000000000381","0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000353","0x19b1c92631405a0a9495ccba0becf4f2e8e908bd000000000000000000000410","0x1e550b7764da9638fdd32c8a701364de31f45ee800000000000000000000047c","0x1fa7f727934226aedab636d62a084931b97d366b000000000000000000000411","0x23ca0306b21ea71552b148cf3c4db4fc85ae19290000000000000000000000c9","0x284eb68520c8fa83361c1a3a5910aec7f873c18b000000000000000000000380","0x2a96254ca32020b20ed3506f8f75318da24709f9000200000000000000000456","0x36942963e3b6f37ecc45a4e72349558514233f0000000000000000000000048a","0x3f53a862919ccfa023cb6ace91378a79fb0f6bf500000000000000000000040f","0x40af308e3d07ec769d85eb80afb116525ff4ac99000000000000000000000485","0x418de00ae109e6f874d872658767866d680eaa1900000000000000000000047d","0x45c4d1376943ab28802b995acffc04903eb5223f000000000000000000000470","0x4689122d360c4725d244c5cfea22861333d862e6000100000000000000000468","0x4739e50b59b552d490d3fdc60d200977a38510c0000000000000000000000409","0x49a0e3334496442a9706e481617724e7e37eaa080000000000000000000003ff","0x519cce718fcd11ac09194cff4517f12d263be067000000000000000000000382","0x52cc8389c6b93d740325729cc7c958066cee4262000000000000000000000408","0x567ecfcb22205d279bb8eed3e066989902bf03d5000000000000000000000452","0x585d95df0231fa08aeee35ff0c16b92fd0ecdc3300020000000000000000045f","0x5a7f39435fd9c381e4932fa2047c9a5136a5e3e7000000000000000000000400","0x5bae72b75caab1f260d21bc028c630140607d6e8000000000000000000000350","0x6cb787a419c3e6ee2e9ff365856c29cd10659113000000000000000000000474","0x7c82a23b4c48d796dee36a9ca215b641c6a8709d000000000000000000000406","0x81fc12c60ee5b753cf5fd0adc342dfb5f3817e3200000000000000000000035d","0x894c82800526e0391e709c0983a5aea3718b7f6d00000000000000000000034f","0x970712708a08e8fb152be4d81b2dc586923f5369000200000000000000000479","0x9bf7c3b63c77b4b4f2717776f15a4bec1b532a280000000000000000000000c8","0x9cebf13bb702f253abf1579294694a1edad00eaa000000000000000000000486","0x9e34631547adcf2f8cefa0f5f223955c7b137571000000000000000000000407","0x9fb7d6dcac7b6aa20108bad226c35b85a9e31b63000200000000000000000412","0xa1ea76c42b2938cfa9abea12357881006c52851300000000000000000000048f","0xa50f89e9f439fde2a6fe05883721a00475da3c4500000000000000000000048b","0xa612b6aed2e7ca1a3a4f23fbca9128461bbb7718000000000000000000000274","0xa8af146d79ac0bb981e4e0d8b788ec5711b1d5d000000000000000000000047b","0xad28940024117b442a9efb6d0f25c8b59e1c950b00000000000000000000046f","0xae646817e458c0be890b81e8d880206710e3c44e00000000000000000000039d","0xaef2c171dbe64b0c18977e16e70bfd29d4ee0256000000000000000000000351","0xbbf9d705b75f408cfcaee91da32966124d2c6f7d00000000000000000000047e","0xbd724eb087d4cc0f61a5fed1fffaf937937e14de000000000000000000000473","0xbe0f30217be1e981add883848d0773a86d2d2cd4000000000000000000000471","0xc46be4b8bb6b5a3d3120660efae9c5416318ed40000000000000000000000472","0xc69771058481551261709d8db44977e9afde645000010000000000000000042a","0xc6eee8cb7643ec2f05f46d569e9ec8ef8b41b389000000000000000000000475","0xcba9ff45cfb9ce238afde32b0148eb82cbe635620000000000000000000003fd","0xcf8b555b7754556cf2ac2165e77ee23ed8517d7900020000000000000000045e","0xd0dc20e6342db2de82692b8dc842301ff9121805000200000000000000000454","0xd3d5d45f4edf82ba0dfaf061d230766032a10e07000200000000000000000413","0xd6d20527c7b0669989ee082b9d3a1c63af742290000000000000000000000483","0xda1cd1711743e57dd57102e9e61b75f3587703da0000000000000000000003fc","0xe1fb90d0d3b47e551d494d7ebe8f209753526b0100000000000000000000034e","0xee02583596aee94cccb7e8ccd3921d955f17982a00000000000000000000040a","0xf984eb2b8a7ef780245a797a2fccd82f346409ca00000000000000000000034d","0xff8f84e8c87532af96aef5582ee451572233678b000200000000000000000478","0x054e7b0c73e1ee5aed6864fa511658fc2b54bcaa000000000000000000000015","0x3f1a2c4a3a751f6626bd90ef16e104f0772d4d6b00020000000000000000001b","0x7275c131b1f67e8b53b4691f92b0e35a4c1c6e22000000000000000000000010","0xa154009870e9b6431305f19b09f9cfd7284d4e7a000000000000000000000013","0xa1d14d922a575232066520eda11e27760946c991000000000000000000000012","0xa826a114b0c7db4d1ff4a4be845a78998c64564c000000000000000000000008","0xea67626e1f0b59e0d172a04f5702ef90bcdf440c00000000000000000000000f","0xeb496161099d45b3ea4892408ef745c6182eb56e00000000000000000000000e","0xece571847897fd61e764d455dc15cf1cd9de8d6f000000000000000000000014","0xed3e2f496cbcd8e212192fb8d1499842f04a0d19000000000000000000000009","0x02c9dcb975262719a61f9b40bdf0987ead9add3a000000000000000000000006","0x16c9a4d841e88e52b51936106010f27085a529ec00000000000000000000000c","0x32be2d0ddeaf3333501b24a28668ce373ba8e763000200000000000000000014","0x32f03464fdf909fdf3798f87ff3712b10c59bd86000000000000000000000005","0x4b718e0e2fea1da68b763cd50c446fba03ceb2ea00000000000000000000000b","0x68a69c596b3839023c0e08d09682314f582314e5000200000000000000000011","0x6f34a44fce1506352a171232163e7716dd073ade000200000000000000000015","0x9e2d87f904862671eb49cb358e74284762cc9f42000200000000000000000013","0xac4b72c01072a52b73ca71105504f1372efcce0d000000000000000000000003","0xbfd65c6160cfd638a85c645e6e6d8acac5dac935000000000000000000000004","0xe274c9deb6ed34cfe4130f8d0a8a948dea5bb28600000000000000000000000d"];class Ui{constructor(e){this.chainId=e,this.balancerApiUrl="https://api-v3.balancer.fi/",this.tokenPriceQuery=d.gql` + query queryTokenPrices($chainKey: GqlChain!) { + tokenGetCurrentPrices(chains: [$chainKey]) { + address + price + } + } + `,this.chainKey=exports.Network[e]}async getNativeAssetPriceInToken(e){const{tokenGetCurrentPrices:t}=await d.request(this.balancerApiUrl,this.tokenPriceQuery,{chainKey:this.chainKey}),a=t.find((({address:t})=>t.toLowerCase()===e.toLowerCase()));if(!a)throw new Error("Token Price not found in the API");const n=t.find((({address:e})=>e.toLowerCase()===Vi[this.chainKey]));if(!n)throw new Error("Native Token Price not found in the API");const o=a.price/n.price;return String(o)}}var Vi;function qi(e=!0){return e?"https://api.coingecko.com/api/v3/":"https://pro-api.coingecko.com/api/v3/"}function Gi(e=!0){return e?"x-cg-demo-api-key":"x-cg-pro-api-key"}!function(e){e.MAINNET="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.POLYGON="0x0000000000000000000000000000000000001010",e.ARBITRUM="0x912ce59144191c1204e64559fe8253a0e49e6548",e.AVALANCHE="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.BASE="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.FANTOM="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.GNOSIS="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.OPTIMISM="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.ZKEVM="0xa2036f0538221a77a3937f1379699f44945018d0"}(Vi||(Vi={}));class Wi{constructor(e,t){this.chainId=e,this.urlBase=`${qi(null==t?void 0:t.isDemoApiKey)}simple/token_price/${this.platformId}?vs_currencies=${this.nativeAssetId}`,this.coingeckoApiKeyHeaderName=Gi(null==t?void 0:t.isDemoApiKey),this.apiKey=t.coingeckoApiKey}async getNativeAssetPriceInToken(e){const t=await this.getTokenPriceInNativeAsset(e);return""+1/parseFloat(t)}async getTokenPriceInNativeAsset(e){var t;const a=`${this.urlBase}&contract_addresses=${e}`,{data:n}=await w.default.get(a,{headers:{Accept:"application/json","Content-Type":"application/json",[this.coingeckoApiKeyHeaderName]:null!==(t=this.apiKey)&&void 0!==t?t:""}});if(void 0===n[e.toLowerCase()]||void 0===n[e.toLowerCase()][this.nativeAssetId])throw Error("No price returned from Coingecko");return n[e.toLowerCase()][this.nativeAssetId]}get platformId(){return ka[this.chainId].thirdParty.coingecko.platformId||"2"}get nativeAssetId(){return ka[this.chainId].thirdParty.coingecko.nativeAssetId||""}}class Hi extends p.SOR{constructor(e){const t=Li(e),a=Hi.getSorConfig(e),n=Hi.getSorNetworkConfig(t),o=new l.JsonRpcProvider(e.rpcUrl,e.network),i=Ei(t.urls.subgraph);super(o,n,Hi.getPoolDataService(t,a,o,i),Hi.getTokenPriceService(t,a,i,e.coingecko))}static getSorConfig(e){return{tokenPriceService:"api",poolDataService:"subgraph",fetchOnChainBalances:!0,...e.sor}}static getSorNetworkConfig(e){var t;return{...e,vault:e.addresses.contracts.vault,weth:e.addresses.tokens.wrappedNativeAsset,lbpRaisingTokens:null===(t=e.addresses.tokens)||void 0===t?void 0:t.lbpRaisingTokens,wETHwstETH:e.pools.wETHwstETH,connectingTokens:e.sorConnectingTokens,triPathMidPoolIds:e.sorTriPathMidPoolIds}}static getPoolDataService(e,t,a,n){var o;const i=[...null!==(o=e.poolsToIgnore)&&void 0!==o?o:[],...Di];return"object"==typeof t.poolDataService?t.poolDataService:new Ri(n,a,{...e,poolsToIgnore:i},t)}static getTokenPriceService(e,t,a,n){return"coingecko"===t.tokenPriceService&&n?new Wi(e.chainId,n):"object"==typeof t.tokenPriceService?t.tokenPriceService:"subgraph"===t.tokenPriceService?new Ni(a,e.addresses.tokens.wrappedNativeAsset):new Ui(e.chainId)}}function Ki(e){if(e.poolIds.length>2)throw new Error("Simple flash swap only supports a maximum of two pools");if(e.assets.length>2)throw new Error("Simple flash swap only supports a maximum of to two assets (tokens)")}function $i(e,t){return[{poolId:e[0],assetInIndex:0,assetOutIndex:1,amount:t,userData:"0x"},{poolId:e[1],assetInIndex:1,assetOutIndex:0,amount:"0",userData:"0x"}]}function Ji(e){return-1*Number(e)}function ji(e){return s.sum(e)}const Xi={"0xae7ab96520de3a18e5e111b5eaab095312d7fe84":"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0","0xd46ba6d942050d489dbd938a2c909a5d5039a161":"0xedb171c18ce90b633db442f2a6f72874093b49ef","0x1e6bb68acec8fefbd87d192be09bb274170a0548":"0xF03387d8d0FF326ab586A58E0ab4121d106147DF"};function Yi(e){let t=e;return Xi.hasOwnProperty(e)&&(t=Xi[e]),t}var zi;function Zi(e,t,a){const{tokens:n,contracts:o}=Ba(a);let i={id:zi.vault,address:o.vault};return n.stETH&&o.lidoRelayer&&[e,t].includes(n.stETH)&&(i={id:zi.lido,address:o.lidoRelayer}),i}function Qi(e){return e.id===zi.lido?_t.abi.filter((e=>"function"===e.type&&e.name&&["swap","batchSwap"].includes(e.name))):la.abi.filter((e=>"function"===e.type&&e.name&&["swap","batchSwap"].includes(e.name)))}function es(e){return{amount:e,max:t=>e.mul(1e4+t).div(1e4),min:t=>e.mul(1e4-t).div(1e4)}}function ts(e,t){const a=t===exports.SwapType.SwapExactIn?e.swapAmount:e.returnAmount,n=t===exports.SwapType.SwapExactIn?e.returnAmount:e.swapAmount,o=t===exports.SwapType.SwapExactIn?e.swapAmountForSwaps||e.swapAmount:e.returnAmountFromSwaps||e.returnAmount,i=t===exports.SwapType.SwapExactIn?e.returnAmountFromSwaps||e.returnAmount:e.swapAmountForSwaps||e.swapAmount,s=Yi(e.tokenIn),r=Yi(e.tokenOut);return{...e,amountIn:a,amountOut:n,amountInForLimits:es(o),amountOutForLimits:es(i),tokenInForSwaps:s,tokenOutFromSwaps:r}}!function(e){e[e.vault=1]="vault",e[e.lido=2]="lido"}(zi||(zi={}));class as{constructor(e,t,a){this.kind=t,this.chainId=a,this.functionName="swap",this.swapInfo=ts(e,t),this.relayer=Zi(this.swapInfo.tokenIn,this.swapInfo.tokenOut,this.chainId)}setFunds(e,t){this.funds={sender:e,recipient:t||e,fromInternalBalance:!1,toInternalBalance:!1}}setDeadline(e){this.deadline=e}get amount(){return this.kind===exports.SwapType.SwapExactOut?this.swapInfo.amountOutForLimits.amount:this.swapInfo.amountInForLimits.amount}setLimits(e){this.limit=this.kind===exports.SwapType.SwapExactIn?this.swapInfo.amountOutForLimits.min(e).toString():this.swapInfo.amountInForLimits.max(e).toString()}get singleSwap(){return{poolId:this.swapInfo.swaps[0].poolId,kind:this.kind,assetIn:this.swapInfo.tokenInForSwaps,assetOut:this.swapInfo.tokenOutFromSwaps,amount:this.amount.toString(),userData:"0x"}}attributes(){var e;if(!this.funds||!this.limit||!this.deadline)throw new Error("Uninitialized arguments");let t={request:this.singleSwap,funds:this.funds,limit:this.limit,deadline:this.deadline};const a=this.fragment();return a[0].inputs&&(null===(e=a[0].inputs)||void 0===e?void 0:e.length)>4&&(t={...t,value:"0",outputReference:"0"}),t}data(){return new e.Interface(this.fragment()).encodeFunctionData("swap",Object.values(this.attributes()))}value(e){let n=a.BigNumber.from(0);return this.swapInfo.tokenIn===t.AddressZero&&(n=this.kind===exports.SwapType.SwapExactIn?this.swapInfo.amountIn:this.swapInfo.amountInForLimits.max(e)),n}to(){return this.relayer.address}fragment(){return Qi(this.relayer).filter((e=>e.name===this.functionName))}}class ns{constructor(e,t,a){this.kind=t,this.chainId=a,this.functionName="batchSwap",this.swapInfo=ts(e,t),this.relayer=Zi(this.swapInfo.tokenIn,this.swapInfo.tokenOut,this.chainId)}setFunds(e,t){this.funds={sender:e,recipient:t||e,fromInternalBalance:!1,toInternalBalance:!1}}setDeadline(e){this.deadline=e}minAmountOut(e){return this.kind===exports.SwapType.SwapExactIn?this.swapInfo.amountOutForLimits.min(e):this.swapInfo.amountOutForLimits.amount}maxAmountIn(e){return this.kind===exports.SwapType.SwapExactOut?this.swapInfo.amountInForLimits.max(e):this.swapInfo.amountInForLimits.amount}setLimits(e){this.limits=this.swapInfo.tokenAddresses.map((t=>{let n=a.BigNumber.from(0);return t===this.swapInfo.tokenInForSwaps&&(n=this.maxAmountIn(e)),t===this.swapInfo.tokenOutFromSwaps&&(n=this.minAmountOut(e).mul(-1)),n})).map((e=>e.toString().split(".")[0]))}attributes(){var e;if(!this.funds||!this.limits||!this.deadline)throw new Error("Uninitialized arguments");let t={kind:this.kind,swaps:this.swapInfo.swaps,assets:this.swapInfo.tokenAddresses,funds:this.funds,limits:this.limits,deadline:this.deadline};const a=this.fragment();return a[0].inputs&&(null===(e=a[0].inputs)||void 0===e?void 0:e.length)>6&&(t={...t,value:"0",outputReferences:[]}),t}data(){return new e.Interface(this.fragment()).encodeFunctionData("batchSwap",Object.values(this.attributes()))}value(e){let n=a.BigNumber.from(0);return this.swapInfo.tokenIn===t.AddressZero&&(n=this.maxAmountIn(e)),n}to(){return this.relayer.address}fragment(){return Qi(this.relayer).filter((e=>e.name===this.functionName))}}const os={maxPools:4,gasPrice:"1",deadline:"999999999999999999",maxSlippage:10};class is{constructor(e){e instanceof p.SOR?(this.sor=e,this.chainId=this.sor.provider._network.chainId):(this.sor=new Hi(e),"number"==typeof e.network?this.chainId=e.network:this.chainId=e.network.chainId),this.vaultContract=la.connect(va,this.sor.provider)}static getLimitsForSlippage(e,t,a,n,o,i){return Aa(e,t,a,n,o,i).map((e=>e.toString()))}async findRouteGivenIn({tokenIn:e,tokenOut:t,amount:a,gasPrice:n,maxPools:o=4}){return this.sor.getSwaps(e,t,p.SwapTypes.SwapExactIn,a,{gasPrice:n,maxPools:o})}async findRouteGivenOut({tokenIn:e,tokenOut:t,amount:a,gasPrice:n,maxPools:o=4}){return this.sor.getSwaps(e,t,p.SwapTypes.SwapExactOut,a,{gasPrice:n,maxPools:o})}buildSwap({userAddress:e,recipient:t,swapInfo:a,kind:n,deadline:o,maxSlippage:i}){if(!this.chainId)throw"Missing network configuration";const s=a.swaps.length>1?new ns(a,n,this.chainId):new as(a,n,this.chainId);s.setFunds(e,t),s.setDeadline(o),s.setLimits(i);const r=s.to(),{functionName:p}=s;return{to:r,functionName:p,attributes:s.attributes(),data:s.data(),value:s.value(i)}}async buildRouteExactIn(e,t,n,o,i,s=os){const r={...os,...s},p=await this.findRouteGivenIn({tokenIn:n,tokenOut:o,amount:a.BigNumber.from(i),gasPrice:a.BigNumber.from(r.gasPrice),maxPools:r.maxPools});return this.buildSwap({userAddress:e,recipient:t,swapInfo:p,kind:exports.SwapType.SwapExactIn,deadline:r.deadline,maxSlippage:r.maxSlippage})}static encodeBatchSwap(e){return la.createInterface().encodeFunctionData("batchSwap",[e.kind,e.swaps,e.assets,e.funds,e.limits,e.deadline])}static encodeSimpleFlashSwap(e){return this.encodeBatchSwap(function({poolIds:e,assets:t,flashLoanAmount:a,walletAddress:n}){Ki({poolIds:e,assets:t});const o=$i(e,a),i={sender:n,fromInternalBalance:!1,recipient:n,toInternalBalance:!1};return{kind:exports.SwapType.SwapExactIn,swaps:o,assets:t,funds:i,limits:["0","0"],deadline:"999999999999999999"}}(e))}async fetchPools(e){return this.sor.fetchPools(e)}getPools(){return this.sor.getPools()}async queryBatchSwap(e){return await Rn(this.vaultContract,e.kind,e.swaps,e.assets)}async querySimpleFlashSwap(e){return await async function(e){Ki(e);const[t,a]=e.assets;try{const n=await Rn(e.vaultContract,exports.SwapType.SwapExactIn,$i(e.poolIds,e.flashLoanAmount),e.assets),o={[t]:Ji(n[0]).toString(),[a]:Ji(n[1]).toString()};return{profits:o,isProfitable:ji([o[t],o[a]])>0}}catch(e){throw`Failed to querySimpleFlashSwap: ${e}`}}({...e,vaultContract:this.vaultContract})}async getSorSwap(e){return await async function(e,t,a,n,o){const i=a===exports.SwapType.SwapExactIn?p.SwapTypes.SwapExactIn:p.SwapTypes.SwapExactOut;return await o.getSwaps(e.toLowerCase(),t.toLowerCase(),i,n)}(e.tokenIn,e.tokenOut,e.swapType,e.amount,this.sor)}async queryExactIn(e){const t=await this.query(e,exports.SwapType.SwapExactIn);return this.assetDeltas(t.map(String),e.tokenAddresses)}async queryExactOut(e){const t=await this.query(e,exports.SwapType.SwapExactOut);return this.assetDeltas(t.map(String),e.tokenAddresses)}query(e,a){const{swaps:n,tokenAddresses:o}=e,i={sender:t.AddressZero,recipient:t.AddressZero,fromInternalBalance:!1,toInternalBalance:!1};return this.vaultContract.callStatic.queryBatchSwap(a,n,o,i)}assetDeltas(e,t){return Object.fromEntries(e.map(((e,a)=>[t[a],e])))}}var ss;exports.PoolKind=void 0,(ss=exports.PoolKind||(exports.PoolKind={}))[ss.WEIGHTED=0]="WEIGHTED",ss[ss.LEGACY_STABLE=1]="LEGACY_STABLE",ss[ss.COMPOSABLE_STABLE=2]="COMPOSABLE_STABLE",ss[ss.COMPOSABLE_STABLE_V2=3]="COMPOSABLE_STABLE_V2";const rs=_t.createInterface();class ps{static encodeApproveVault(e,t){return rs.encodeFunctionData("approveVault",[e,t])}static encodeSetRelayerApproval(e,t,a){return rs.encodeFunctionData("setRelayerApproval",[e,t,a])}static encodeGaugeWithdraw(e,t,a,n){return rs.encodeFunctionData("gaugeWithdraw",[e,t,a,n])}static encodeGaugeDeposit(e,t,a,n){return rs.encodeFunctionData("gaugeDeposit",[e,t,a,n])}static encodeSwap(e){return rs.encodeFunctionData("swap",[e.request,e.funds,e.limit,e.deadline,e.value,e.outputReference])}static encodeBatchSwap(e){return rs.encodeFunctionData("batchSwap",[e.swapType,e.swaps,e.assets,e.funds,e.limits,e.deadline,e.value,e.outputReferences])}static encodeExitPool(e){return rs.encodeFunctionData("exitPool",[e.poolId,e.poolKind,e.sender,e.recipient,e.exitPoolRequest,e.outputReferences])}static encodeJoinPool(e){return rs.encodeFunctionData("joinPool",[e.poolId,e.kind,e.sender,e.recipient,e.joinPoolRequest,e.value,e.outputReference])}static encodeWrapAaveDynamicToken(e){return rs.encodeFunctionData("wrapAaveDynamicToken",[e.staticToken,e.sender,e.recipient,e.amount,e.fromUnderlying,e.outputReference])}static encodeUnwrapAaveStaticToken(e){return rs.encodeFunctionData("unwrapAaveStaticToken",[e.staticToken,e.sender,e.recipient,e.amount,e.toUnderlying,e.outputReference])}static encodeUnwrapWstETH(e){return rs.encodeFunctionData("unwrapWstETH",[e.sender,e.recipient,e.amount,e.outputReference])}static encodeUnwrap(e,t){let a;switch(t){case"AaveLinear":return this.encodeUnwrapAaveStaticToken({staticToken:e.wrappedToken,sender:e.sender,recipient:e.recipient,amount:e.amount,toUnderlying:!0,outputReference:e.outputReference});case"BeefyLinear":case"ERC4626Linear":a="unwrapERC4626";break;case"EulerLinear":a="unwrapEuler";break;case"GearboxLinear":a="unwrapGearbox";break;case"ReaperLinear":a="unwrapReaperVaultToken";break;case"TetuLinear":a="unwrapTetu";break;case"YearnLinear":a="unwrapYearn";break;case"MidasLinear":a="unwrapCompoundV2";break;case"SiloLinear":a="unwrapShareToken";break;default:throw new Error("Unwrapping not supported for this pool type: "+t)}return rs.encodeFunctionData(a,[e.wrappedToken,e.sender,e.recipient,e.amount,e.outputReference])}static encodePeekChainedReferenceValue(e){return rs.encodeFunctionData("peekChainedReferenceValue",[e])}static toChainedReference(e,t=!0){const n=t?ps.CHAINED_REFERENCE_TEMP_PREFIX:ps.CHAINED_REFERENCE_READONLY_PREFIX,o=`0x${n}${"0".repeat(64-n.length)}`;return a.BigNumber.from(o).add(e)}static fromChainedReference(e,t=!0){const n=t?ps.CHAINED_REFERENCE_TEMP_PREFIX:ps.CHAINED_REFERENCE_READONLY_PREFIX,o=`0x${n}${"0".repeat(64-n.length)}`;return a.BigNumber.from(e).sub(a.BigNumber.from(o))}static isChainedReference(e){const t=a.BigNumber.from(e),n=a.BigNumber.from("0xfff0000000000000000000000000000000000000000000000000000000000000"),o=t.toBigInt()&n.toBigInt();return"0xba10000000000000000000000000000000000000000000000000000000000000"===a.BigNumber.from(o)._hex.toString()}static formatExitPoolInput(e){const{assets:t,minAmountsOut:a,userData:n,toInternalBalance:o,poolId:i,poolKind:s,sender:r,recipient:p,outputReferences:l}=e;return{poolId:i,poolKind:s,sender:r,recipient:p,outputReferences:l,exitPoolRequest:{assets:t,minAmountsOut:a,userData:n,toInternalBalance:o}}}static formatJoinPoolInput(e){const{assets:t,maxAmountsIn:a,userData:n,fromInternalBalance:o,poolId:i,kind:s,sender:r,recipient:p,value:l,outputReference:d}=e;return{poolId:i,kind:s,sender:r,recipient:p,value:l,outputReference:d,joinPoolRequest:{assets:t,maxAmountsIn:a,userData:n,fromInternalBalance:o}}}}ps.CHAINED_REFERENCE_TEMP_PREFIX="ba10",ps.CHAINED_REFERENCE_READONLY_PREFIX="ba11",ps.signRelayerApproval=async(e,a,n,o)=>{const i=o.interface.encodeFunctionData("setRelayerApproval",[a,e,!0]),s=await te.signSetRelayerApprovalAuthorization(o,n,e,i);return te.encodeCalldataAuthorization("0x",t.MaxUint256,s)};class ls{constructor(e){this.url=Li(e).urls.subgraph,this.client=this.initClient()}initClient(){return zo(new d.GraphQLClient(this.url))}}class ds{constructor(e,t){this.swaps=t||new is(e)}async fetchPools(){return this.swaps.fetchPools()}getPools(){return this.swaps.getPools()}async getSpotPrice(e,t,a=[]){0===a.length&&(await this.fetchPools(),a=this.getPools());const n=p.parseToPoolsDict(a,0),o=this.swaps.sor.routeProposer.getCandidatePathsFromDict(e,t,0,n,4);if(0===o.length)throw new Oa(exports.BalancerErrorCode.UNSUPPORTED_PAIR);return p.getSpotPriceAfterSwapForPath(o[0],0,p.ZERO).toString()}}const us=["function getPoolId() view returns (bytes32)","function getSwapFeePercentage() view returns (uint256)","function getProtocolFeesCollector() view returns (address)","function inRecoveryMode() view returns (bool)"];class cs{constructor(t,a,n={}){this.multicall=t,this.options=n,this.calls=[],this.paths=[],this.interface=new e.Interface(a)}call(e,t,a,n){return this.calls.push([t,a,n]),this.paths.push(e),this}async execute(e={}){const t=e;return(await this.executeMulticall()).forEach(((e,a)=>s.set(t,this.paths[a],e.length>1?e:e[0]))),this.calls=[],this.paths=[],t}async executeMulticall(){const[,e]=await this.multicall.callStatic.aggregate(this.calls.map((([e,t,a])=>({target:e,callData:this.interface.encodeFunctionData(t,a)}))),this.options);return e.map(((e,t)=>this.interface.decodeFunctionResult(this.calls[t][1],e)))}}function ys(e){return Math.round(Date.now()/1e3)-e<86400}class bs{constructor(e,t){this.veBalAddress=e,this.multicall=t}async getLockInfo(e){if(!this.veBalAddress)throw new Error("veBal address must be defined");const t=new cs(this.multicall,[..._a.abi]);t.call("locked",this.veBalAddress,"locked",[e]),t.call("epoch",this.veBalAddress,"epoch"),t.call("totalSupply",this.veBalAddress,"totalSupply()");const a=await t.execute();return this.formatLockInfo(a)}formatLockInfo(e){const[t,a]=e.locked,n=t.gt(0),o=1e3*a.toNumber();const i=n&&Date.now()>o;return{lockedEndDate:o,lockedAmount:Be(t),totalSupply:Be(e.totalSupply),epoch:Be(e.epoch,0),hasExistingLock:n,isExpired:i}}}class ms{constructor(e,t){if(!e.veBalProxy)throw new Error("veBalProxy address must be defined");this.instance=Pa.connect(e.veBalProxy,t)}async getAdjustedBalance(e){return Be(await this.instance.adjustedBalanceOf(e))}}class fs{constructor(e,t){this.getLiquidityGauge=Qt.connect,this.contractAddresses="number"==typeof e?ka[e].addresses.contracts:e;const a=la.connect(this.contractAddresses.vault,t),n=yt.connect(this.contractAddresses.balancerHelpers,t);let o;this.contractAddresses.lidoRelayer&&(o=Xt.connect(this.contractAddresses.lidoRelayer,t));const i=ta.connect(this.contractAddresses.multicall,t),s=It.connect(this.contractAddresses.balancerRelayer,t);let r,p,l,d,u,c,y,b,m,f,T;this.contractAddresses.veBal&&(r=new bs(this.contractAddresses.veBal,i)),this.contractAddresses.veBalProxy&&(p=new ms(this.contractAddresses,t)),this.contractAddresses.gaugeClaimHelper&&(l=qt.connect(this.contractAddresses.gaugeClaimHelper,t)),this.contractAddresses.composableStablePoolFactory&&(d=Et.connect(this.contractAddresses.composableStablePoolFactory,t)),this.contractAddresses.weightedPoolFactory&&(u=ya.connect(this.contractAddresses.weightedPoolFactory,t)),this.contractAddresses.aaveLinearPoolFactory&&(c=rt.connect(this.contractAddresses.aaveLinearPoolFactory,t)),this.contractAddresses.erc4626LinearPoolFactory&&(y=Mt.connect(this.contractAddresses.erc4626LinearPoolFactory,t)),this.contractAddresses.eulerLinearPoolFactory&&(b=Lt.connect(this.contractAddresses.eulerLinearPoolFactory,t)),this.contractAddresses.gearboxLinearPoolFactory&&(m=Kt.connect(this.contractAddresses.gearboxLinearPoolFactory,t)),this.contractAddresses.yearnLinearPoolFactory&&(f=Ta.connect(this.contractAddresses.yearnLinearPoolFactory,t)),this.contractAddresses.gyroConfigProxy&&(T=Jt.connect(this.contractAddresses.gyroConfigProxy,t)),this.instances={aaveLinearPoolFactory:c,balancerHelpers:n,BasePool:this.getBasePool,composableStablePoolFactory:d,ERC20:this.getErc20,erc4626LinearPoolFactory:y,eulerLinearPoolFactory:b,gaugeClaimHelper:l,gearboxLinearPoolFactory:m,gyroConfig:T,liquidityGauge:this.getLiquidityGauge,lidoRelayer:o,multicall:i,relayer:s,veBal:r,veBalProxy:p,weightedPoolFactory:u,yearnLinearPoolFactory:f,vault:a}}get contracts(){return this.instances}getErc20(e,t){return kt.connect(e,t)}getBasePool(e,t){return((e,t)=>new y.Contract(e,us,t))(e,t)}}class Ts{constructor(e,t){this.tokenPrices=e,this.tokenHistoricalPrices=t}async calcImpLoss(e,t){if(1e3*e>=Date.now())throw console.error(`[ImpermanentLossService][calcImpLoss]Error: ${Oa.getMessage(exports.BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE)}`),new Oa(exports.BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE);const a=await this.prepareData(e,t),n=this.getPoolValueDelta(a),o=this.getHoldValueDelta(a);return this.calculateImpermanentLoss(n,o)}calculateImpermanentLoss(e,t){return Math.floor(100*Math.abs(e/t-1)*100)/100}getPoolValueDelta(e){return e.reduce(((e,t)=>e*Math.pow(Math.abs(t.priceDelta+1),t.weight)),1)}getHoldValueDelta(e){return e.reduce(((e,t)=>e+Math.abs(t.priceDelta+1)*t.weight),0)}async prepareData(e,t){const a=t.tokens.filter((e=>e.address!==t.address)),n=this.getWeights(a),o=a.map((e=>e.address)),i=await this.getEntryPrices(e,o),s=await this.getExitPrices(a);return this.getAssets(a,s,i,n)}getAssets(e,t,a,n){return e.map(((e,o)=>({priceDelta:this.getDelta(a[e.address],t[e.address]),weight:n[o]})))}getDelta(e,t){if(0===e)throw console.error(`[ImpermanentLossService][getDelta]Error: ${Oa.getMessage(exports.BalancerErrorCode.ILLEGAL_PARAMETER)}: entry price is 0`),new Oa(exports.BalancerErrorCode.ILLEGAL_PARAMETER);return(t-e)/e}getWeights(e){const t=e.every((e=>!e.weight)),a=Math.round(1/e.length*100)/100,n=t?e.map((()=>a)):e.map((e=>{var t;return Number(null!==(t=e.weight)&&void 0!==t?t:0)}));if(n.some((e=>0===e)))throw console.error(`[ImpermanentLossService][getWeights]Error: ${Oa.getMessage(exports.BalancerErrorCode.MISSING_WEIGHT)}`),new Oa(exports.BalancerErrorCode.MISSING_WEIGHT);return n}async getExitPrices(e){var t;const a=await Promise.all(e.map((e=>this.tokenPrices.find(e.address)))).catch((()=>[]));if(!a.length||a.some((e=>void 0===(null==e?void 0:e.usd))))throw console.error(`[ImpermanentLossService][getExitPrices]Error: ${Oa.getMessage(exports.BalancerErrorCode.MISSING_PRICE_RATE)}`),new Oa(exports.BalancerErrorCode.MISSING_PRICE_RATE);const n=e.map(((e,t)=>({...e,price:a[t]}))),o={};for(const e of n)(null===(t=e.price)||void 0===t?void 0:t.usd)&&(o[e.address]=+e.price.usd);return o}async getEntryPrices(e,t){const a={};for(const n of t){const t=await this.tokenHistoricalPrices.findBy(n,e).catch((e=>{j.getInstance().warn(`[ImpermanentLossService][getEntryPrices]Error: ${e.message}`)}));if(!(null==t?void 0:t.usd)){throw j.getInstance().warn(`[ImpermanentLossService][getEntryPrices]Error: ${Oa.getMessage(exports.BalancerErrorCode.MISSING_PRICE_RATE)}`),new Oa(exports.BalancerErrorCode.MISSING_PRICE_RATE)}a[n]=+t.usd}return a}}const hs=145e3,Is=1648465251,gs=31536e3,_s=2**(1/4),xs=(e=Math.round((new Date).getTime()/1e3))=>{const t=Math.floor((e-Is)/gs);return hs*_s**-t},Ps=e=>365*(hs*_s**-e/7);var ws=Object.freeze({__proto__:null,INITIAL_RATE:hs,START_EPOCH_TIME:Is,weekly:xs,total:Ps,between:(e,t)=>{if(et.address!==e.address)),n=await Promise.all(a.map((async t=>{let a=0;const n=await this.tokenYields.find(t.address);if(n)a="MetaStable"===e.poolType||e.poolType.includes("Gyro")?n*(1-await this.protocolSwapFeePercentage(e)):"ComposableStable"===e.poolType||"Weighted"===e.poolType&&e.poolTypeVersion>=2?t.isExemptFromYieldProtocolFee?n:n*(1-parseFloat(e.protocolYieldFeeCache||"0.5")):n;else{const n=await this.pools.findBy("address",t.address);if(n){const o=await this.swapFees(n);let i=(await this.tokenAprs(n)).total;("ComposableStable"===e.poolType||"Weighted"===e.poolType&&2===e.poolTypeVersion)&&(t.isExemptFromYieldProtocolFee||(i*=1-parseFloat(e.protocolYieldFeeCache||"0.5"))),a=o+i}}return a}))),o=async e=>{var a,n,o,i,s;let r;if(e.weight)return parseFloat(e.weight);if(null===(n=null===(a=e.token)||void 0===a?void 0:a.pool)||void 0===n?void 0:n.poolType){const t=await this.pools.findBy("address",e.address);t&&(r=(await this.bptPrice(t)).toString())}else r=(null===(o=e.price)||void 0===o?void 0:o.usd)||(null===(i=await this.tokenPrices.find(e.address))||void 0===i?void 0:i.usd)||(null===(s=e.token)||void 0===s?void 0:s.latestUSDPrice);if(r){return parseFloat(e.balance)*parseFloat(r)/parseFloat(t)}throw`No price for ${e.address}`},i=await Promise.all(a.map((async(e,t)=>{if(0===n[t])return 0;try{const a=await o(e);return Math.round(n[t]*a)}catch(e){return j.getInstance().error(e),0}})));return{total:i.reduce(((e,t)=>e+t),0),breakdown:s.pickBy(s.zipObject(a.map((e=>e.address)),i),s.identity)}}async stakingApr(e,t=1){if(!this.liquidityGauges)return 0;const a=await this.liquidityGauges.findBy("poolId",e.id);if(!a||1==e.chainId&&0===a.workingSupply||e.chainId>1&&0===a.totalSupply||e.chainId>1&&0===a.balInflationRate)return 0;const n=ka[e.chainId].addresses.tokens.bal;if(!n)return 0;const[o,i]=await Promise.all([this.tokenPrices.find(n),this.bptPrice(e)]);if(!(null==o?void 0:o.usd))throw"Missing BAL price";const s=(a.workingSupply+.4)/.4*i;if(a.balInflationRate){const e=86400*a.balInflationRate*365*parseFloat(o.usd);return Math.round(1e4*t*e/s)}if(e.chainId>1){if(!a.rewardTokens)return 0;const e=n&&a.rewardTokens[n];if(!e)return 0;{let t;try{t=await this.rewardTokenApr(n,e);const o=a.totalSupply*i,s=t.value/o;return Math.round(1e4*s)}catch(e){return 0}}}const r=parseFloat(o.usd),p=Math.round((new Date).getTime()/1e3),l=xs(p)/7*365*a.relativeWeight*r;return Math.round(1e4*t*l/s)}async rewardAprs(e){if(!this.liquidityGauges)return{total:0,breakdown:{}};const t=await this.liquidityGauges.findBy("poolId",e.id);if(!t||!t.rewardTokens||Object.keys(t.rewardTokens).length<1)return{total:0,breakdown:{}};const a=ka[e.chainId].addresses.tokens.bal,n=Object.keys(t.rewardTokens).filter((e=>e!=a)).map((async e=>{const a=t.rewardTokens[e];try{return await this.rewardTokenApr(e,a)}catch(t){return{address:e,value:0}}})),o=await this.bptPrice(e),i=t.totalSupply*o;if(0==i)return{total:0,breakdown:{}};const s={};let r=0;for await(const e of Object.values(n)){const t=e.value/i,a=Math.round(1e4*t);r+=a,s[e.address]=a}return{total:r,breakdown:s}}async protocolApr(e){if("0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014"!=e.id||!this.feeDistributor)return 0;const t=new Es(this.feeDistributor,this.tokenPrices),{lastWeekBalRevenue:a,lastWeekBBAUsdRevenue:n,veBalSupply:o}=await t.data(),i=await this.bptPrice(e);if(!i)throw"bptPrice for veBal pool missing";const s=(a+n)/7;return Math.round(365*s*1e4/(i*o))}async apr(e){if(Di.includes(e.id))return{swapFees:0,tokenAprs:{total:0,breakdown:{}},stakingApr:{min:0,max:0},rewardAprs:{total:0,breakdown:{}},protocolApr:0,min:0,max:0};const[t,a,n,o,i,s]=await Promise.all([this.swapFees(e),this.tokenAprs(e),this.stakingApr(e),this.stakingApr(e,2.5),this.rewardAprs(e),this.protocolApr(e)]);return{swapFees:t,tokenAprs:a,stakingApr:{min:n,max:o},rewardAprs:i,protocolApr:s,min:t+a.total+i.total+n,max:t+a.total+i.total+s+o}}async last24hFees(e){return new As(this.yesterdaysPools).last24h(e)}async totalLiquidity(e){try{const t=new An(this.pools,this.tokenPrices);return await t.getLiquidity(e)}catch(t){return j.getInstance().warn("Liquidity calculcation failed, falling back to subgraph"),e.totalLiquidity}}async bptPrice(e){return parseFloat(await this.totalLiquidity(e))/parseFloat(e.totalShares)}async protocolSwapFeePercentage(e){let t=.5;return t=e.poolType.includes("Gyro")&&this.gyroConfigRepository?await this.gyroConfigRepository.getGyroProtocolFee(e.address):e.protocolSwapFeeCache?parseFloat(e.protocolSwapFeeCache):await this.feeCollector.find("")||.5,t}async rewardTokenApr(e,t){if(t.period_finish.toNumber(){e.includes("Linear")&&vs.includes(e)&&ks.set(e,"batchSwap")})),ks.set(exports.PoolType.Element,"batchSwap"),ks.set(exports.PoolType.Investment,"joinPool"),ks.set(exports.PoolType.LiquidityBootstrapping,"joinPool"),ks.set(exports.PoolType.MetaStable,"joinPool"),ks.set(exports.PoolType.Stable,"joinPool"),ks.set(exports.PoolType.StablePhantom,"batchSwap"),ks.set(exports.PoolType.Weighted,"joinPool"),ks.set(exports.PoolType.ComposableStable,"joinPool");const Bs=new Map;vs.forEach((e=>{e.includes("Linear")&&vs.includes(e)&&Bs.set(e,"batchSwap")})),Bs.set(exports.PoolType.Element,"batchSwap"),Bs.set(exports.PoolType.Investment,"exitPool"),Bs.set(exports.PoolType.LiquidityBootstrapping,"exitPool"),Bs.set(exports.PoolType.MetaStable,"exitPool"),Bs.set(exports.PoolType.Stable,"exitPool"),Bs.set(exports.PoolType.StablePhantom,"batchSwap"),Bs.set(exports.PoolType.Weighted,"exitPool"),Bs.set(exports.PoolType.ComposableStable,"exitPool");class Cs{constructor(e){this.pools=e,this.getGraphNodes=async(e,t,a)=>{if(!await this.pools.find(t))throw new Oa(exports.BalancerErrorCode.POOL_DOESNT_EXIST);const n=await this.buildGraphFromRootPool(t,a);if(n.id!==t)throw new Error("Error creating graph nodes");return e?Cs.orderByBfs(n).reverse():Cs.orderByBfs(n)}}async buildGraphFromRootPool(e,a){const n=await this.pools.find(e);if(!n)throw new Oa(exports.BalancerErrorCode.POOL_DOESNT_EXIST);return(await this.buildGraphFromPool(n.address,0,void 0,t.WeiPerEther,a))[0]}getTokenTotal(e){const a=e.tokensList.indexOf(e.address);let n=t.Zero;const{balancesEvm:o}=be(e);return o.forEach(((e,t)=>{a!==t&&(n=n.add(e))})),n}async buildGraphFromPool(e,n,o,i,s){var r;const p=await this.pools.findBy("address",e);if(!p){if(o){const t=await this.pools.findBy("address",o.address),a=t.tokensList.indexOf(e),s=null!==(r=t.tokens[a].decimals)&&void 0!==r?r:18,{balancesEvm:p}=be(t);return Cs.createInputTokenNode(n,e,s,o,i,p[a].toString())}throw new Oa(exports.BalancerErrorCode.POOL_DOESNT_EXIST)}const l=ks.get(p.poolType),d=Bs.get(p.poolType);if(!l||!d)throw new Oa(exports.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);const u=this.getTokenTotal(p),{spotPriceCalculator:c}=En.from(p.poolType),y={};let b=18;p.tokens.forEach((e=>{if(Je(e.address,p.address))return void(b=e.decimals?e.decimals:18);const t=c.calcPoolSpotPrice(e.address,p.address,p);y[e.address]=t}));let m={address:p.address,id:p.id,type:p.poolType,joinAction:l,exitAction:d,isProportionalExit:!1,children:[],marked:!1,index:n.toString(),parent:o,proportionOfParent:i,isLeaf:!1,spotPrices:y,decimals:b,balance:p.totalShares,priceRate:t.WeiPerEther.toString()};if(this.updateNodeIfProportionalExit(p,m),n++,p.poolType.toString().includes("Linear"))[m,n]=this.createLinearNodeChildren(m,n,p,s);else{const{balancesEvm:e}=be(p);for(let t=0;t2)&&(t.isProportionalExit=!0)}createLinearNodeChildren(e,t,a,n){var o;if(void 0===a.mainIndex)throw new Error("Issue With Linear Pool");if(n.map((e=>e.toLowerCase())).includes(a.tokensList[a.mainIndex].toLowerCase())){const n=this.createWrappedTokenNode(a,t,e,e.proportionOfParent);return e.children.push(n[0]),[e,n[1]]}{const{balancesEvm:n}=be(a),i=null!==(o=a.tokens[a.mainIndex].decimals)&&void 0!==o?o:18,s=Cs.createInputTokenNode(t,a.tokensList[a.mainIndex],i,e,e.proportionOfParent,n[a.mainIndex].toString());return e.children.push(s[0]),[e,t=s[1]]}}createWrappedTokenNode(e,t,a,n){var o;if(void 0===e.wrappedIndex||void 0===e.mainIndex)throw new Error("Issue With Linear Pool");const{balancesEvm:i,upScaledBalances:s,scalingFactorsRaw:r,priceRates:p}=be(e),l={type:"WrappedToken",address:e.tokensList[e.wrappedIndex],id:"N/A",children:[],marked:!1,joinAction:"wrap",exitAction:"unwrap",isProportionalExit:!1,index:t.toString(),parent:a,proportionOfParent:n,isLeaf:!1,spotPrices:{},decimals:18,balance:i[e.wrappedIndex].toString(),priceRate:p[e.wrappedIndex].toString()};t++;const d=null!==(o=e.tokens[e.mainIndex].decimals)&&void 0!==o?o:18,u=de(s[e.wrappedIndex],r[e.mainIndex]).toString(),c=Cs.createInputTokenNode(t,e.tokensList[e.mainIndex],d,l,n,u);return l.children=[c[0]],[l,t=c[1]]}static createInputTokenNode(e,a,n,o,i,s){return[{address:a,id:"N/A",type:"Input",children:[],marked:!1,joinAction:"input",exitAction:"output",isProportionalExit:!1,index:e.toString(),parent:o,proportionOfParent:i,isLeaf:!0,spotPrices:{},decimals:n,balance:s,priceRate:t.WeiPerEther.toString()},e+1]}static orderByBfs(e){const t=[],a=[];for(e.marked=!0,t.push(e);t.length>0;){const e=t.shift();e&&a.push(e),null==e||e.children.forEach((e=>{e.marked||(e.marked=!0,t.push(e))}))}return a}static getLeafAddresses(e){return e.filter((e=>e.isLeaf)).map((e=>e.address))}static isProportionalPools(e){return e.every((e=>!(e.children.length>1)||e.isProportionalExit))}}class Os{constructor(){}}Os.joinInit=t=>e.defaultAbiCoder.decode(["uint256","uint256[]"],t),Os.joinExactTokensInForBPTOut=t=>e.defaultAbiCoder.decode(["uint256","uint256[]","uint256"],t),Os.joinTokenInForExactBPTOut=t=>e.defaultAbiCoder.decode(["uint256","uint256","uint256"],t),Os.joinAllTokensInForExactBPTOut=t=>e.defaultAbiCoder.decode(["uint256","uint256"],t),Os.exitExactBPTInForOneTokenOut=t=>e.defaultAbiCoder.decode(["uint256","uint256","uint256"],t),Os.exitExactBPTInForTokensOut=t=>e.defaultAbiCoder.decode(["uint256","uint256"],t),Os.exitBPTInForExactTokensOut=t=>e.defaultAbiCoder.decode(["uint256","uint256[]","uint256"],t);class Ms{constructor(e){this.relayerModel=e}joinKind(t){const a=e.defaultAbiCoder.decode(["uint256"],t)[0];if(!a)throw new Error("No exit kind.");return a.toNumber()}decodeJoinData(e,t){if(t===exports.WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT){return Os.joinAllTokensInForExactBPTOut(e).toString()}if(t===exports.WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT){const[,t]=Os.joinExactTokensInForBPTOut(e);return t}if(t===exports.WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT){const[,t,a]=Os.joinTokenInForExactBPTOut(e);return[t.toString(),a]}throw new Error("Non supported join data")}allTokensInForExactBPTOut(){throw new Error("joinAllTokensInForExactBPTOut not supported")}joinExactTokensInForBPTOut(e,t){const n=this.decodeJoinData(e,exports.WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT),o=this.relayerModel.doChainedRefReplacements(n),i=t._calcBptOutGivenExactTokensIn(o.map((e=>a.BigNumber.from(e))));if("StablePhantom"==t.SubgraphType||"ComposableStable"==t.SubgraphType){const e=t.tokens.find((e=>Je(e.address,t.address)));if(!e)throw new Error("Pool does not contain BPT as a token");const n=a.parseFixed(e.balance.toString(),e.decimals);t.updateTokenBalanceForPool(t.address,n.sub(i))}else t.updateTokenBalanceForPool(t.address,t.totalShares.add(i));const s=t.tokens.filter((e=>!Je(e.address,t.address)));return o.forEach(((e,n)=>{const o=a.parseFixed(s[n].balance.toString(),s[n].decimals);t.updateTokenBalanceForPool(s[n].address,o.add(e))})),[i.toString(),s.map((e=>e.address)),o]}joinTokenInForExactBPTOut(e,t){const[n,o]=this.decodeJoinData(e,exports.WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT),i=this.relayerModel.doChainedRefReplacement(n),s=t.parsePoolPairData(t.tokensList[Number(o)],t.address),r=a.formatFixed(i,18),l=t._tokenInForExactTokenOut(s,p.bnum(r.toString())).dp(s.decimalsIn),d=a.parseFixed(l.toString(),s.decimalsIn);return t.updateTokenBalanceForPool(s.tokenIn,s.balanceIn.add(d)),t.updateTokenBalanceForPool(s.tokenOut,s.balanceOut.add(i)),[d.toString(),s.tokenIn,d.toString()]}async doJoinPool(e,a){const n=a[e.poolId],o=this.joinKind(e.encodedUserData);let i="0",s=[],r=[];if(o===exports.WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT)i=this.allTokensInForExactBPTOut();else if(o===exports.WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT)[i,s,r]=this.joinExactTokensInForBPTOut(e.encodedUserData,n);else{if(o!==exports.WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT)throw new Error("Exit type not implemented");{let t,a;[i,t,a]=this.joinTokenInForExactBPTOut(e.encodedUserData,n),s.push(t),r.push(a)}}return s.push(n.address),r.push(t.Zero.sub(i).toString()),e.outputReference&&ps.isChainedReference(e.outputReference)&&this.relayerModel.setChainedReferenceValue(e.outputReference,i),[s,r]}}class Fs{constructor(e){this.relayerModel=e}exitKind(t,a){const n=e.defaultAbiCoder.decode(["uint256"],a)[0];if(!n)throw new Error("No exit kind.");return"ComposableStable"===t?n.toNumber()===exports.ComposableStablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT?exports.WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT:n.toNumber()===exports.ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT?exports.WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT:exports.WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT:n.toNumber()}decodeExitData(e,t){if(t===exports.WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT){const[,t,a]=Os.exitBPTInForExactTokensOut(e);return[t.toString(),a.toString()]}if(t===exports.WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT){const[,t,a]=Os.exitExactBPTInForOneTokenOut(e);return[t.toString(),a.toString()]}if(t===exports.WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT){const[,t]=Os.exitExactBPTInForTokensOut(e);return[t.toString()]}throw new Error("Non supported exit data")}exactBptInForTokensOut(e,t){const[n]=this.decodeExitData(e,exports.WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT),o=this.relayerModel.doChainedRefReplacement(n),i=t._calcTokensOutGivenExactBptIn(a.BigNumber.from(o)).map((e=>e.toString()));if("StablePhantom"==t.SubgraphType||"ComposableStable"==t.SubgraphType){const e=t.tokens.find((e=>Je(e.address,t.address)));if(!e)throw new Error("Pool does not contain BPT as a token");const n=a.parseFixed(e.balance.toString(),e.decimals);t.updateTokenBalanceForPool(t.address,n.add(o))}else t.updateTokenBalanceForPool(t.address,t.totalShares.sub(o));const s=t.tokens.filter((e=>!Je(e.address,t.address)));return i.forEach(((e,n)=>{const o=a.parseFixed(s[n].balance.toString(),s[n].decimals);t.updateTokenBalanceForPool(s[n].address,o.sub(e))})),[o,s.map((e=>e.address)),i]}exactBptInForOneTokenOut(e,t){const[n,o]=this.decodeExitData(e,exports.WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT),i=this.relayerModel.doChainedRefReplacement(n),s=t.parsePoolPairData(t.address,t.tokensList[Number(o)]),r=a.formatFixed(i,s.decimalsIn),l=t._exactTokenInForTokenOut(s,p.bnum(r)).dp(s.decimalsOut),d=a.parseFixed(l.toString(),s.decimalsOut),u=function(e,t){const n=[];return t.forEach((t=>{const o=e.tokens.findIndex((e=>Je(e.address,t)));if(o<0)throw"Pool does not contain tokenIn";n.push(a.parseFixed(e.tokens[o].balance,e.tokens[o].decimals).toString())})),n}(t,[t.address,s.tokenOut]);t.updateTokenBalanceForPool(s.tokenOut,a.BigNumber.from(u[1]).sub(d)),"StablePhantom"==t.SubgraphType||"ComposableStable"==t.SubgraphType?t.updateTokenBalanceForPool(t.address,a.BigNumber.from(u[0]).add(i)):t.updateTokenBalanceForPool(t.address,t.totalShares.sub(i));const c=t.tokensList.filter((e=>!Je(e,t.address))),y=new Array(c.length).fill("0");return y[Number(o)]=d.toString(),[i,c,y]}async doExitPool(e,a){const n=a[e.poolId],o=this.exitKind(n.SubgraphType,e.encodedUserData);let i,s=[],r=[];const p=[],l=[];if(o===exports.WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT)[i,r,s]=this.exactBptInForTokensOut(e.encodedUserData,n);else{if(o!==exports.WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT)throw new Error("Exit type not implemented");[i,r,s]=this.exactBptInForOneTokenOut(e.encodedUserData,n)}for(let t=0;tt.Zero.sub(e).toString()))),[p,l]}}class Rs{constructor(e){this.relayerModel=e}async doSingleSwap(e,a){const n=this.relayerModel.doChainedRefReplacement(e.request.amount.toString()),o=a[e.request.poolId],[,i]=this.doSwap(e.request.assetIn,e.request.assetOut,o,e.request.kind,n),s=t.Zero.sub(i);if(!e.outputReference)throw new Error("Missing outputReference");return this.relayerModel.setChainedReferenceValue(e.outputReference.toString(),s.abs().toString()),[s.toString(),n]}async doBatchSwap(e,a){const n=e.assets,o=new Array(n.length).fill(t.Zero);let i;for(let t=0;t{const s=n[t.assetInIndex],r=n[t.assetOutIndex],p=a[t.poolId];let l=t.amount;"0"===l&&(l=i);const[d,u]=this.doSwap(s,r,p,e.swapType,l);i=e.swapType===exports.SwapType.SwapExactIn?u.toString():d.toString(),o[t.assetInIndex]=o[t.assetInIndex].add(d),o[t.assetOutIndex]=o[t.assetOutIndex].sub(u)}));for(let t=0;te.toString()))}doSwap(e,n,o,i,s){const r=o.parsePoolPairData(e,n),l=i===exports.SwapType.SwapExactIn;let d=l?a.BigNumber.from(s):t.Zero,u=l?t.Zero:a.BigNumber.from(s);const c=a.formatFixed(d,r.decimalsIn),y=a.formatFixed(u,r.decimalsOut);if(l){const e=o._exactTokenInForTokenOut(r,p.bnum(c.toString())).dp(r.decimalsOut);u=a.parseFixed(e.toString(),r.decimalsOut)}else{const e=o._tokenInForExactTokenOut(r,p.bnum(y.toString())).dp(r.decimalsIn);d=a.parseFixed(e.toString(),r.decimalsIn)}return o.updateTokenBalanceForPool(r.tokenIn,r.balanceIn.add(d)),o.updateTokenBalanceForPool(r.tokenOut,r.balanceOut.sub(u)),[d,u]}}class Ns{constructor(e){this.relayerModel=e}async doUnwrap(e,n){const o=n[e.poolId],i=o.tokens[o.wrappedIndex],s=o.tokens[o.mainIndex],r=this.relayerModel.doChainedRefReplacement(e.amount.toString()),p=ce.divDownFixed(ce.mulDownFixed(BigInt(r),a.parseFixed(i.priceRate,18).toBigInt()),t.WeiPerEther.toBigInt()).toString();this.relayerModel.setChainedReferenceValue(e.outputReference.toString(),p);return[[i.address,s.address],[r,t.Zero.sub(p).toString()]]}}class Ls{constructor(e){this.relayerModel=e,this.joinModel=new Ms(e),this.exitModel=new Fs(e),this.swapModel=new Rs(e),this.unwrapModel=new Ns(e)}async doJoin(e,t){return this.joinModel.doJoinPool(e,t)}async doExit(e,t){return this.exitModel.doExitPool(e,t)}async doBatchSwap(e,t){return this.swapModel.doBatchSwap(e,t)}async doSingleSwap(e,t){return this.swapModel.doSingleSwap(e,t)}async doUnwrap(e,t){return this.unwrapModel.doUnwrap(e,t)}}class Ds{constructor(){this.chainedRefs={}}setChainedReferenceValue(e,t){this.chainedRefs[e]=t}getChainedReferenceValue(e){return this.chainedRefs[e]}doChainedRefReplacement(e){return ps.isChainedReference(e.toString())?this.getChainedReferenceValue(e.toString()):e}doChainedRefReplacements(e){return e.map((e=>this.doChainedRefReplacement(e).toString()))}}class Us{constructor(e,t){this.poolDataService=e,this.wrappedNativeAsset=t,this.poolsArray=[],this.poolsDict={}}dataSource(){return this.poolDataService}async all(e=!1){if(e||0===this.poolsArray.length){const e=s.cloneDeep(await this.dataSource().getPools());for(const t of e)if(["Weighted","Investment","Stable","LiquidityBootstrapping"].includes(t.poolType)){const e={address:t.address,balance:t.totalShares,decimals:18,priceRate:"1",weight:"0"};t.tokens.push(e),t.tokensList.push(t.address)}this.poolsArray=e}return this.poolsArray}parseToPoolsDict(e){return Object.fromEntries(s.cloneDeep(e).filter((e=>e.tokensList.length>0&&"0"!==e.tokens[0].balance)).map((e=>[e.id,this.parseNewPool(e)])).filter((([,e])=>void 0!==e)))}parseNewPool(e){if(!e.swapEnabled)return;let t={};try{if(["Weighted","Investment","LiquidityBootstrapping"].includes(e.poolType)){t=p.WeightedPool.fromPool(e,!1)}else if("Stable"===e.poolType){t=p.StablePool.fromPool(e)}else if("MetaStable"===e.poolType){t=p.MetaStablePool.fromPool(e)}else if(e.poolType.toString().includes("Linear")){t=p.LinearPool.fromPool(e)}else if("StablePhantom"===e.poolType){t=p.PhantomStablePool.fromPool(e)}else{if("ComposableStable"!==e.poolType){return void j.getInstance().warn(`Unknown pool type or type field missing: ${e.poolType} ${e.id}`)}t=p.ComposableStablePool.fromPool(e)}if(!t)throw new Error("Issue with Pool");t.SubgraphType=e.poolType}catch(e){return void console.error("Error parseNewPool")}return t}async poolsDictionary(e=!1){if(e||0===Object.keys(this.poolsDict).length){const t=await this.all(e);this.poolsDict=this.parseToPoolsDict(t)}return this.poolsDict}}var Vs,qs;!function(e){e[e.BatchSwap=0]="BatchSwap",e[e.Join=1]="Join",e[e.Exit=2]="Exit",e[e.Swap=3]="Swap",e[e.Unwrap=4]="Unwrap"}(Vs||(Vs={}));class Gs{constructor(e,t){this.poolsSource=new Us(e,t)}updateDeltas(e,a,n){return a.forEach(((a,o)=>{e[a]||(e[a]=t.Zero),e[a]=e[a].add(n[o])})),e}async multicall(e,t=!1){const a=new Ds,n=new Ls(a),o=await this.poolsSource.poolsDictionary(t),i={};for(const t of e){let e=[],a=[];switch(t.actionType){case Vs.Join:[e,a]=await n.doJoin(t,o);break;case Vs.Exit:[e,a]=await n.doExit(t,o);break;case Vs.BatchSwap:e=t.assets,a=await n.doBatchSwap(t,o);break;case Vs.Swap:e=[t.request.assetOut,t.request.assetIn],a=await n.doSingleSwap(t,o);break;case Vs.Unwrap:[e,a]=await n.doUnwrap(t,o)}this.updateDeltas(i,e,a)}return i}static mapSwapRequest(e){return{actionType:Vs.Swap,request:e.request,funds:e.funds,outputReference:e.outputReference}}static mapBatchSwapRequest(e){return{actionType:Vs.BatchSwap,swaps:e.swaps,assets:e.assets,funds:e.funds,swapType:e.swapType,outputReferences:e.outputReferences}}static mapJoinPoolRequest(e){return{actionType:Vs.Join,poolId:e.poolId,encodedUserData:e.joinPoolRequest.userData,outputReference:e.outputReference}}static mapExitPoolRequest(e){return{actionType:Vs.Exit,poolId:e.poolId,encodedUserData:e.exitPoolRequest.userData,outputReferences:e.outputReferences}}static mapUnwrapRequest(e,t,a){return{actionType:Vs.Unwrap,poolId:a,amount:e,outputReference:t}}}const Ws=It.createInterface();function Hs(e){j.getInstance()}class Ks{constructor(e,n,o){this.poolGraph=e,this.simulationService=o,this.createCalls=async(e,t,a,n,o)=>{const{multiRequests:i,encodedCalls:s,outputIndexes:r,deltas:p}=this.createActionCalls(e,t,a,n);o&&s.unshift(this.createSetRelayerApproval(o));return{multiRequests:i,encodedCall:Ws.encodeFunctionData("multicall",[s]),outputIndexes:o?r.map((e=>e+1)):r,deltas:p}},this.amountsOutByJoinPath=async(e,n,o,i,s,r,p,l)=>{const d=await this.simulationService.simulateGeneralisedJoin(this.relayer,n,o,s,e,i,r,p,l),u=d.reduce(((e,t)=>e.add(a.BigNumber.from(t))),t.Zero).toString();return{amountsOut:d,totalAmountOut:u}},this.minAmountsOutByJoinPath=(e,t,n)=>({minAmountsOut:t.map((t=>Ke(a.BigNumber.from(t),a.BigNumber.from(e)).toString())),totalMinAmountOut:Ke(a.BigNumber.from(n),a.BigNumber.from(e)).toString()}),this.createActionCalls=(e,t,a,n)=>{const o=[],i=[],s=[],r=!n,p={};return e.forEach(((e,l)=>{const d=e[0].isLeaf,u=[];if(e.forEach(((o,s)=>{var c,y;if(o.children.length>0&&0===o.children.filter((e=>this.shouldBeConsidered(e))).length)return void(o.index="0");const b=o.children.filter((e=>this.shouldBeConsidered(e))).some((e=>"input"===e.joinAction))?t:this.relayer,m=s===e.length-1,f=null!==(y=d&&(null===(c=o.parent)||void 0===c?void 0:c.children.filter((e=>this.shouldBeConsidered(e))).some((e=>"input"===e.joinAction))))&&void 0!==y&&y,T=m||f?t:this.relayer,h=m&&n?n[l]:"0";switch(o.joinAction){case"batchSwap":{const{modelRequest:e,encodedCall:t,assets:n,amounts:s}=this.createSwap(o,l,h,b,T,a,r);u.push(e),i.push(t),this.updateDeltas(p,n,s)}break;case"joinPool":{const{modelRequest:e,encodedCall:t,assets:n,amounts:s,minBptOut:d}=this.createJoinPool(o,l,h,b,T,a,r);u.push(e),i.push(t),this.updateDeltas(p,[o.address,...n],[d,...s])}break;default:return}})),r){const e=100*l,t=ps.encodePeekChainedReferenceValue(ps.toChainedReference(e,!1));i.push(t),s.push(i.indexOf(t))}o.push(u)})),{multiRequests:o,encodedCalls:i,outputIndexes:s,deltas:p}},this.createSetRelayerApproval=e=>ps.encodeSetRelayerApproval(this.relayer,!0,e),this.createSwap=(e,n,o,i,s,r,p)=>{var l;if(1!==e.children.length)throw new Error("Unsupported swap");const d=e.children[0].address,u=this.getOutputRefValue(n,e.children[0]),c=o,y=r&&!p?this.replaceWrappedNativeAsset([d])[0]:d,b={poolId:e.id,kind:exports.SwapType.SwapExactIn,assetIn:y,assetOut:e.address,amount:u.value,userData:"0x"},m={sender:i,recipient:s,fromInternalBalance:this.allImmediateChildrenSendToInternal(e),toInternalBalance:this.allSiblingsSendToInternal(e)},f=a.BigNumber.from(this.getOutputRefValue(n,e).value),T=r&&!p?Ue([y],[u.value]):t.Zero,h={request:b,funds:m,limit:c,deadline:a.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:T,outputReference:f},I=ps.encodeSwap(h);Hs(),Hs(JSON.stringify(h)),Hs(JSON.stringify(null===(l=h.value)||void 0===l?void 0:l.toString()));const g=Gs.mapSwapRequest(h),_=e.children.some((e=>"input"===e.joinAction))?u.value:"0",x=null!=e.parent?"0":a.BigNumber.from(o).mul(-1).toString();return{modelRequest:g,encodedCall:I,assets:[e.address,d],amounts:[x,_]}},this.createJoinPool=(e,a,n,o,i,s,r)=>{var p;const l=[],d=[];e.children.forEach((e=>{l.push(e.address),this.shouldBeConsidered(e)?d.push(this.getOutputRefValue(a,e).value):d.push("0")})),e.type===exports.PoolType.ComposableStable&&(l.push(e.address),d.push("0"));const u=new Y(this.wrappedNativeAsset),[c,y]=u.sortTokens(l,d);let b=[];const m=c.map((e=>e.toLowerCase())).indexOf(e.address.toLowerCase());let f;b=-1===m?y:[...y.slice(0,m),...y.slice(m+1)],f=e.type===exports.PoolType.Weighted?S.joinExactTokensInForBPTOut(b,n):A.joinExactTokensInForBPTOut(b,n);const T=s&&!r?Ue(this.replaceWrappedNativeAsset(c),y):t.Zero,h=this.allImmediateChildrenSendToInternal(e),I=ps.formatJoinPoolInput({poolId:e.id,kind:0,sender:o,recipient:i,value:T,outputReference:this.getOutputRefValue(a,e).value,joinPoolRequest:{},assets:s&&!r?this.replaceWrappedNativeAsset(c):c,maxAmountsIn:y,userData:f,fromInternalBalance:h}),g=ps.encodeJoinPool(I);Hs(),Hs(JSON.stringify(I)),Hs(JSON.stringify(null===(p=I.value)||void 0===p?void 0:p.toString()));const _=Gs.mapJoinPoolRequest(I),x=y.map((e=>ps.isChainedReference(e)?"0":e)),P=ps.isChainedReference(n)?"0":n,w=e.children.filter((e=>this.shouldBeConsidered(e))).some((e=>"input"===e.joinAction));return{modelRequest:_,encodedCall:g,assets:w?c:[],amounts:w?x:[],minBptOut:null!=e.parent?t.Zero.toString():t.Zero.sub(P).toString()}},this.getOutputRefValue=(e,t)=>"input"===t.joinAction?{value:t.index,isRef:!1}:"0"===t.index&&t.parent?{value:"0",isRef:!0}:{value:ps.toChainedReference(a.BigNumber.from(t.index).add(100*e)).toString(),isRef:!0},this.shouldBeConsidered=e=>"0"!==e.index,this.sendsToInternalBalance=e=>"input"!==e.joinAction&&"joinPool"!==e.joinAction,this.allImmediateChildrenSendToInternal=e=>{const t=e.children.filter((e=>this.shouldBeConsidered(e)));return 0!==t.length&&t.filter((e=>this.sendsToInternalBalance(e))).length===t.length},this.allSiblingsSendToInternal=e=>{if(!e.parent)return!1;const t=e.parent.children.filter((e=>this.shouldBeConsidered(e)));return t.filter((e=>this.sendsToInternalBalance(e))).length===t.length},this.replaceWrappedNativeAsset=e=>{const a=e.findIndex((e=>e.toLowerCase()===this.wrappedNativeAsset.toLowerCase()));return Xe(e,a,t.AddressZero)};const{tokens:i,contracts:s}=Ba(n.chainId);this.relayer=s.balancerRelayer,this.wrappedNativeAsset=i.wrappedNativeAsset}checkInputs(e,a){if(0===e.length)throw new Oa(exports.BalancerErrorCode.MISSING_TOKENS);if(a.every((e=>"0"===e)))throw new Oa(exports.BalancerErrorCode.JOIN_WITH_ZERO_AMOUNT);if(e.length!=a.length)throw new Oa(exports.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(e.some((e=>e===t.AddressZero))&&e.some((e=>e.toLowerCase()===this.wrappedNativeAsset.toLowerCase())))throw new Oa(exports.BalancerErrorCode.INPUT_TOKEN_INVALID)}async joinPool(e,a,n,o,i,s,r,p){this.checkInputs(a,n);const l=await this.poolGraph.getGraphNodes(!0,e,[]),d=a.findIndex((e=>e===t.AddressZero)),u=-1!==d,c=Xe(a,d,this.wrappedNativeAsset.toLowerCase()),y=Ks.getJoinPaths(l,c,n),b=Ks.totalBptZeroPriceImpact(y);Hs();const{multiRequests:m,encodedCall:f,outputIndexes:T}=await this.createCalls(y,o,u,void 0,p),{amountsOut:h,totalAmountOut:I}=await this.amountsOutByJoinPath(o,m,f,c,T,s,r,"0"),{minAmountsOut:g,totalMinAmountOut:_}=this.minAmountsOutByJoinPath(i,h,I),x=Ma(BigInt(I),b.toBigInt(),!0).toString();Hs();const{encodedCall:P,deltas:w}=await this.createCalls(y,o,u,g,p),E=u?w[this.wrappedNativeAsset.toLowerCase()]:t.Zero;return Hs(E.toString()),this.assertDeltas(e,w,c,n,_),{to:this.relayer,encodedCall:P,expectedOut:I,minOut:_,priceImpact:x,value:E}}assertDeltas(e,t,n,o,i){var s;const r=R(e);if(t[r.toLowerCase()].add(i).abs().gt(3))throw console.error("join assertDeltas, bptOut: ",r,i,null===(s=t[r.toLowerCase()])||void 0===s?void 0:s.toString()),new Oa(exports.BalancerErrorCode.JOIN_DELTA_AMOUNTS);delete t[r.toLowerCase()],n.forEach(((e,n)=>{var i,s;if(!a.BigNumber.from(o[n]).eq(0)&&(null===(i=t[e.toLowerCase()])||void 0===i?void 0:i.toString())!==o[n])throw console.error("join assertDeltas, tokenIn: ",e,o[n],null===(s=t[e.toLowerCase()])||void 0===s?void 0:s.toString()),new Oa(exports.BalancerErrorCode.JOIN_DELTA_AMOUNTS);delete t[e.toLowerCase()]}));for(const e in t)if("0"!==t[e].toString())throw console.error("join assertDeltas, non-input token should be 0: ",e,t[e].toString()),new Oa(exports.BalancerErrorCode.JOIN_DELTA_AMOUNTS)}updateDeltas(e,a,n){return a.forEach(((a,o)=>{const i=a.toLowerCase();e[i]||(e[i]=t.Zero),e[i]=e[i].add(n[o])})),e}}qs=Ks,Ks.getJoinPaths=(e,n,o)=>{const i=[],r=e.filter((e=>n.filter(((e,t)=>a.BigNumber.from(o[t]).gt(0))).map((e=>e.toLowerCase())).includes(e.address.toLowerCase())));r.some((e=>e.isLeaf))&&i.push(e);const p=r.filter((e=>!e.isLeaf));return p.forEach((e=>{const r=o.find(((t,a)=>Je(n[a],e.address))),l=p.filter((t=>Je(t.address,e.address))).reduce(((e,t)=>e.add(t.proportionOfParent)),a.BigNumber.from(0)),d=a.BigNumber.from(r).mul(e.proportionOfParent).div(l).toString(),[u]=Cs.createInputTokenNode(0,e.address,e.decimals,e.parent,t.WeiPerEther,e.balance);u.index=d,u.isLeaf=!1;const c=[u];let y=u.parent,b=u;for(;y;){const e=s.cloneDeep(y);e.children=e.children.map((e=>e.address===b.address?b:{...e,index:"0"})),c.push(e),b=e,y=e.parent}i.push(c)})),qs.updateInputAmounts(i,n,o),i},Ks.updateInputAmounts=(e,t,n)=>{const o=(e,t)=>{if(e.length>1){const n=e.reduce(((e,t)=>e.add(t.index)),a.BigNumber.from(0)),o=a.BigNumber.from(t).sub(n);e[0].index=o.add(e[0].index).toString()}},i=e.find((e=>e[0].isLeaf));if(i){const e=qs.updateTotalProportions(i);i.forEach((a=>{"input"===a.joinAction&&(a=qs.updateNodeAmount(a,t,n,e))})),t.forEach(((e,t)=>{const a=i.filter((t=>t.isLeaf&&Je(t.address,e)));o(a,n[t])}))}const s=e.filter((e=>!e[0].isLeaf));s.length>1&&t.forEach(((e,t)=>{const a=s.map((e=>e[0])).filter((t=>Je(t.address,e)));o(a,n[t])}))},Ks.totalBptZeroPriceImpact=e=>{let t=a.BigNumber.from("0");return e.forEach((e=>{if(e[0].isLeaf){e.filter((e=>e.isLeaf)).forEach((e=>{const a=qs.bptOutZeroPiForInputNode(e);t=t.add(a)}))}else{const a=qs.bptOutZeroPiForInputNode(e[0]);t=t.add(a)}})),t},Ks.bptOutZeroPiForInputNode=e=>{if("0"===e.index||"input"!==e.joinAction)return BigInt(0);let t=1,n=e.parent,o=e.address;for(;void 0!==n;){if("batchSwap"===n.joinAction||"joinPool"===n.joinAction){const e=n.spotPrices[o.toLowerCase()];t*=parseFloat(e),o=n.address}n=n.parent}const i=a.parseFixed(t.toFixed(18),18),s=re(BigInt(e.decimals)),r=pe(BigInt(e.index),s);return ce.divDownFixed(r,i.toBigInt())},Ks.updateTotalProportions=e=>{const t={};return e.forEach((e=>{t[e.address]?t[e.address]=t[e.address].add(e.proportionOfParent):t[e.address]=e.proportionOfParent})),t},Ks.updateNodeAmount=(e,t,a,n)=>{const o=t.map((e=>e.toLowerCase())).indexOf(e.address.toLowerCase());if(-1===o)return e.index="0",e;const i=n[e.address],s=e.proportionOfParent.mul(1e18.toString()).div(i).mul(a[o]).div(1e18.toString());return e.index=s.toString(),e};class $s{constructor(e,n){this.chainId=e,this.simulateMulticall=async(e,t,a,n,o="0")=>{const i={...await this.encodeBalanceAndAllowanceOverrides(a,n),...await this.encodeRelayerApprovalOverride(a,e)};return this.simulateTransaction(e,t,a,i,o)},this.simulateTransaction=async(e,t,n,o,i)=>{const s=Object.fromEntries(Object.keys(o).map((e=>[e,{storage:o[e].value}]))),r={...s,[n]:{balance:a.parseFixed("100",18).toHexString()}},p={network_id:this.chainId.toString(),block_number:this.blockNumber,from:n,to:e,input:t,value:i,save_if_fails:!0,simulation_type:"quick",state_objects:r},l=this.tenderlyUrl+"simulate";return(await w.default.post(l,p,this.opts)).data.transaction.transaction_info.call_trace.output},this.encodeRelayerApprovalOverride=async(e,t)=>{const a={[`${this.vaultAddress}`]:{value:{[`_approvedRelayers[${e}][${t}]`]:(!0).toString()}}};return await this.requestStateOverrides(a)},this.encodeBalanceAndAllowanceOverrides=async(e,a)=>{const n=a.filter((e=>e!==t.AddressZero));if(0===n.length)return{};let o={};n.forEach((a=>o={...o,[`${a}`]:{value:{[`_balances[${e}]`]:t.MaxInt256.toString(),[`_allowances[${e}][${this.vaultAddress}]`]:t.MaxInt256.toString(),[`balanceOf[${e}]`]:t.MaxInt256.toString(),[`allowance[${e}][${this.vaultAddress}]`]:t.MaxInt256.toString(),[`balances[${e}]`]:t.MaxInt256.toString(),[`allowed[${e}][${this.vaultAddress}]`]:t.MaxInt256.toString()}}}));const i=await this.requestStateOverrides(o);if(Object.keys(i).some((e=>2!==Object.keys(i[e].value).length)))throw new Error("Couldn't encode state overrides - states should match the ones in the contracts");return i},this.requestStateOverrides=async e=>{const t=this.tenderlyUrl+"contracts/encode-states",a={networkID:this.chainId.toString(),stateOverrides:e},n=(await w.default.post(t,a,this.opts)).data.stateOverrides;if(!n||Object.keys(n).length!==Object.keys(e).length)throw new Error("Couldn't encode state overrides - contracts should be verified and whitelisted on Tenderly");return n};const{contracts:o}=Ba(this.chainId);this.vaultAddress=o.vault,this.tenderlyUrl=`https://api.tenderly.co/api/v1/account/${n.user}/project/${n.project}/`,this.opts={headers:{"X-Access-Key":n.accessKey}},this.blockNumber=n.blockNumber}}var Js;exports.SimulationType=void 0,(Js=exports.SimulationType||(exports.SimulationType={}))[Js.Tenderly=0]="Tenderly",Js[Js.VaultModel=1]="VaultModel",Js[Js.Static=2]="Static";class js{constructor(t,a){this.simulateGeneralisedJoin=async(e,t,a,n,o,i,s,r,p)=>{const l=[];switch(r){case exports.SimulationType.Tenderly:{if(!this.tenderlyHelper)throw new Error("Missing Tenderly config");const t=await this.tenderlyHelper.simulateMulticall(e,a,o,i,p);l.push(...this.decodeResult(t,n));break}case exports.SimulationType.VaultModel:{const e=await this.simulateRequests(t);l.push(...e);break}case exports.SimulationType.Static:{const t=await s.call({to:e,data:a,value:p});try{l.push(...this.decodeResult(t,n))}catch(e){const a=Buffer.from(t.split("x")[1],"hex").toString("utf8");throw new Error(`Transaction reverted with error: ${a}`)}break}default:throw new Error("Simulation type not supported")}return l},this.simulateGeneralisedExit=async(e,t,a,n,o,i,s,r)=>{const p=[];switch(r){case exports.SimulationType.Tenderly:{if(!this.tenderlyHelper)throw new Error("Missing Tenderly config");const t=await this.tenderlyHelper.simulateMulticall(e,a,o,[i]);p.push(...this.decodeResult(t,n));break}case exports.SimulationType.VaultModel:{const e=await this.simulateRequests(t);p.push(...e);break}case exports.SimulationType.Static:{const t=await s.call({to:e,data:a});try{p.push(...this.decodeResult(t,n))}catch(e){const a=Buffer.from(t.split("x")[1],"hex").toString("utf8");throw new Error(`Transaction reverted with error: ${a}`)}break}default:throw new Error("Simulation type not supported")}return p},this.decodeResult=(t,a)=>{const n=e.defaultAbiCoder.decode(["bytes[]"],t)[0];return a.map((t=>e.defaultAbiCoder.decode(["uint256"],n[t]).toString()))},this.simulateRequests=async e=>{if(void 0===this.vaultModel)throw new Error("Missing Vault Model Config.");const t=[];for(const[a,n]of e.entries()){const e=await this.vaultModel.multicall(n,0===a),o=Object.values(e).filter((e=>e.lt(0)));if(0===o.length)throw new Error("No delta found for token out.");t.push(...o.map((e=>e.mul(-1).toString())))}return t},t.tenderly&&(this.tenderlyHelper=new $s(t.chainId,t.tenderly)),this.vaultModel=a?new Gs(a,t.addresses.tokens.wrappedNativeAsset):void 0}}const Xs=It.createInterface();function Ys(e){j.getInstance()}class zs{constructor(e,n,o){this.poolGraph=e,this.simulationService=o,this.amountsOutByExitPath=async(e,t,a,n,o,i,s)=>await this.simulationService.simulateGeneralisedExit(this.relayer,t,a,o,e,n,i,s),this.amountsOutByTokenOut=(e,a,n)=>{const o={};a.forEach(((e,a)=>{var i;return o[e]=(null!==(i=o[e])&&void 0!==i?i:t.Zero).add(n[a])}));return e.map((e=>o[e].toString()))},this.minAmountsOut=(e,t,n)=>({minAmountsOutByExitPath:e.map((e=>Ke(a.BigNumber.from(e),a.BigNumber.from(n)).toString())),minAmountsOutByTokenOut:t.map((e=>Ke(a.BigNumber.from(e),a.BigNumber.from(n)).toString()))}),this.getExitPaths=(e,n)=>{const o=e.map((e=>{const a=[e];for(;a[0].parent;)a.unshift(s.cloneDeep(a[0].parent));return a[0].index=a[a.length-1].proportionOfParent.mul(n).div(t.WeiPerEther).toString(),a})),i=o.reduce(((e,t)=>{const n=t[0].index;return a.BigNumber.from(n).add(e)}),t.Zero),r=a.BigNumber.from(n).sub(i);return o[o.length-1][0].index=r.add(o[o.length-1][0].index).toString(),o},this.createUnwrap=(e,a,n,o,i,s)=>{var r,p;const l=ps.toChainedReference(this.getOutputRef(n,e.index)).toString(),d=ps.toChainedReference(this.getOutputRef(n,a.index)),u=null===(r=e.parent)||void 0===r?void 0:r.type,c={wrappedToken:e.address,sender:i,recipient:s,amount:l,outputReference:d},y=ps.encodeUnwrap(c,u);Ys(),Ys(),Ys(JSON.stringify(c));return{modelRequest:Gs.mapUnwrapRequest(l,d,null===(p=e.parent)||void 0===p?void 0:p.id),encodedCall:y,assets:[a.address],amounts:[t.Zero.sub(o).toString()]}},this.getOutputRef=(e,t)=>100*e+parseInt(t),this.receivesFromInternal=e=>!!e.parent&&("output"!==e.exitAction&&"unwrap"!==e.exitAction&&"exitPool"!==e.exitAction);const{tokens:i,contracts:r}=Ba(n.chainId);this.wrappedNativeAsset=i.wrappedNativeAsset,this.relayer=r.balancerRelayer}async getExitInfo(e,t,a,n){Ys();const o=await this.getExit(e,t,a,n,[],exports.SimulationType.VaultModel);return{tokensOut:o.tokensOut,estimatedAmountsOut:o.expectedAmountsOut,priceImpact:o.priceImpact,tokensToUnwrap:o.tokensToUnwrap}}async buildExitCall(e,t,a,n,o,i,s,r){Ys();const p=await this.getExit(e,t,a,o,null!=r?r:[],i,s),{minAmountsOutByExitPath:l,minAmountsOutByTokenOut:d}=this.minAmountsOut(p.expectedAmountsOutByExitPath,p.expectedAmountsOut,n);Ys();const{encodedCall:u,deltas:c}=await this.createCalls(p.exitPaths,a,p.isProportional,l,s);return this.assertDeltas(e,c,t,p.tokensOut,d),{to:this.relayer,encodedCall:u,tokensOut:p.tokensOut,expectedAmountsOut:p.expectedAmountsOut,minAmountsOut:d,priceImpact:p.priceImpact}}async getExit(e,t,n,o,i,s,r){const p=await this.poolGraph.getGraphNodes(!1,e,i),l=Cs.isProportionalPools(p);Ys();let d=[],u=[],c=[];const y=p.filter((e=>"output"===e.exitAction));if(u=y.map((e=>e.address.toLowerCase())),c=[...new Set(u)].sort(),l){const e=p.map(((e,a)=>(0===a&&(e.index=t),e)));d[0]=e}else d=this.getExitPaths(y,t);const{multiRequests:b,encodedCall:m,outputIndexes:f}=await this.createCalls(d,n,l,void 0,r),T=await this.amountsOutByExitPath(n,b,m,p[0].address,f,o,s),h=y.filter(((e,t)=>a.BigNumber.from(T[t]).gt(e.balance))).map((e=>e.address.toLowerCase()));if(i.some((e=>h.includes(e.toLowerCase()))))throw new Error("Insufficient pool balance to perform generalised exit - try exitting with smaller amounts");if(h.length>0)return await this.getExit(e,t,n,o,[...new Set(h)].sort(),s,r);{const a=this.amountsOutByTokenOut(c,u,T),n=await this.calculatePriceImpact(e,this.poolGraph,c,a,t);return{tokensToUnwrap:i,tokensOut:c,exitPaths:d,isProportional:l,expectedAmountsOut:a,expectedAmountsOutByExitPath:T,priceImpact:n}}}async calculatePriceImpact(e,t,a,n,o){const i=await t.getGraphNodes(!0,e,[]),s=Ks.getJoinPaths(i,a,n),r=Ks.totalBptZeroPriceImpact(s);return Ma(BigInt(o),r.toBigInt(),!1).toString()}assertDeltas(e,t,a,n,o){var i;const s=R(e);if(t[s.toLowerCase()].sub(a).abs().gt(3))throw console.error("exit assertDeltas, bptIn: ",s,a,null===(i=t[s.toLowerCase()])||void 0===i?void 0:i.toString()),new Oa(exports.BalancerErrorCode.EXIT_DELTA_AMOUNTS);delete t[s.toLowerCase()],n.forEach(((e,a)=>{var n;if(t[e.toLowerCase()].add(o[a]).abs().gt(1))throw console.error("exit assertDeltas, tokenOut: ",e,o[a],null===(n=t[e.toLowerCase()])||void 0===n?void 0:n.toString()),new Oa(exports.BalancerErrorCode.EXIT_DELTA_AMOUNTS);delete t[e.toLowerCase()]}));for(const e in t)if("0"!==t[e].toString())throw console.error("exit assertDeltas, non-input token should be 0: ",e,t[e].toString()),new Oa(exports.BalancerErrorCode.EXIT_DELTA_AMOUNTS)}async createCalls(e,t,a,n,o){const{multiRequests:i,calls:r,outputIndexes:p,deltas:l}=this.createActionCalls(s.cloneDeep(e),t,a,n);o&&r.unshift(ps.encodeSetRelayerApproval(this.relayer,!0,o));return{multiRequests:i,encodedCall:Xs.encodeFunctionData("multicall",[r]),outputIndexes:o?p.map((e=>e+1)):p,deltas:l}}updateDeltas(e,a,n){return a.forEach(((a,o)=>{const i=a.toLowerCase();e[i]||(e[i]=t.Zero),e[i]=e[i].add(n[o])})),e}createActionCalls(e,a,n,o){const i=[],s=[],r=[],p=!o,l={},d=(e,t)=>t.children.filter((t=>e.map((e=>e.index)).includes(t.index))).some((e=>"output"===e.exitAction))?a:this.relayer;return e.forEach(((e,u)=>{const c=[],y=e.filter((e=>"output"===e.exitAction));e.forEach((i=>{const b=i.children.find((t=>e.map((e=>e.index)).includes(t.index))),m=((e,t)=>t.parent?d(e,t.parent):a)(e,i),f=d(e,i),T=i.children.filter((t=>e.map((e=>e.index)).includes(t.index))).some((e=>"output"===e.exitAction||"unwrap"===e.exitAction));let h="0";const I=Array(i.children.length).fill("0");switch(o&&T&&(n?i.children.forEach(((e,a)=>{let n;"unwrap"===e.exitAction?(n=y.indexOf(e.children[0]),h=t.WeiPerEther.mul(o[n]).div(e.priceRate).toString()):"output"===e.exitAction?(n=y.indexOf(e),h=o[n]):h="0",I[a]=h})):h="unwrap"===(null==b?void 0:b.exitAction)?t.WeiPerEther.mul(o[u]).div(b.priceRate).toString():o[u]),i.exitAction){case"unwrap":{const{modelRequest:e,encodedCall:t,assets:a,amounts:n}=this.createUnwrap(i,b,u,h,m,f);c.push(e),s.push(t),this.updateDeltas(l,a,n);break}case"batchSwap":{const{modelRequest:e,encodedCall:t,assets:a,amounts:n}=this.createSwap(i,b,u,h,m,f);c.push(e),s.push(t),this.updateDeltas(l,a,n);break}case"exitPool":{let e;e=n?this.createExitPoolProportional(i,I,m,f):this.createExitPool(i,b,u,h,m,f);const{modelRequest:t,encodedCall:a,bptIn:o,tokensOut:r,amountsOut:p}=e;c.push(t),s.push(a),this.updateDeltas(l,[i.address,...r],[o,...p]);break}case"output":p&&(s.push(ps.encodePeekChainedReferenceValue(ps.toChainedReference(this.getOutputRef(u,i.index),!1))),r.push(s.length-1));break;default:return}})),i.push(c)})),{multiRequests:i,calls:s,outputIndexes:r,deltas:l}}createSwap(e,t,n,o,i,s){const r=!e.parent,p=r?e.index:ps.toChainedReference(this.getOutputRef(n,e.index)).toString(),l=t.address,d=[l,e.address],u=o,c={poolId:e.id,kind:exports.SwapType.SwapExactIn,assetIn:e.address,assetOut:l,amount:p,userData:"0x"},y={sender:i,recipient:s,fromInternalBalance:this.receivesFromInternal(e),toInternalBalance:this.receivesFromInternal(t)},b=ps.toChainedReference(this.getOutputRef(n,t.index)),m={request:c,funds:y,limit:u,deadline:a.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReference:b};Ys(),Ys(JSON.stringify(m));const f=ps.encodeSwap(m),T=r?p:"0";return{modelRequest:Gs.mapSwapRequest(m),encodedCall:f,assets:d,amounts:["output"!==t.exitAction?"0":a.BigNumber.from(o).mul(-1).toString(),T]}}createBatchSwap(e,n,o,i,s,r){const p=!e.parent,l=p?e.index:ps.toChainedReference(this.getOutputRef(o,e.index)).toString(),d=[...n.map((e=>e.address)),e.address],u=[...i];u.push(l);const c=[],y=[];n.forEach(((a,n)=>{const o=a.proportionOfParent.mul(l).div(t.WeiPerEther).toString(),i={poolId:e.id,assetInIndex:d.length-1,assetOutIndex:n,amount:o,userData:"0x"};c.push(i),y.push({index:n,key:ps.toChainedReference(this.getOutputRef(0,a.index))})}));const b=c.reduce(((e,t)=>e.add(t.amount)),a.BigNumber.from(0)),m=a.BigNumber.from(l).sub(b);c[0].amount=m.add(c[0].amount).toString();const f={sender:s,recipient:r,fromInternalBalance:this.receivesFromInternal(e),toInternalBalance:this.receivesFromInternal(n[0])},T={swapType:exports.SwapType.SwapExactIn,swaps:c,assets:d,funds:f,limits:u,deadline:a.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:y};Ys(),Ys(JSON.stringify(T));const h=ps.encodeBatchSwap(T),I=Gs.mapBatchSwapRequest(T),g=p?l:"0",_=[...n.map(((e,t)=>"output"!==e.exitAction?"0":a.BigNumber.from(i[t]).mul(-1).toString())),g];return{modelRequest:I,encodedCall:h,assets:d,amounts:_}}createExitPool(e,a,n,o,i,s){const r=a.address,p=!e.parent,l=p?e.index:ps.toChainedReference(this.getOutputRef(n,e.index)).toString(),d=[],u=[];e.children.forEach((e=>{d.push(e.address),u.push(e.address===r?o:"0")})),e.type===exports.PoolType.ComposableStable&&(d.push(e.address),u.push("0"));const c=new Y(this.wrappedNativeAsset),[y,b]=c.sortTokens(d,u);let m=[];const f=y.map((e=>e.toLowerCase())).indexOf(e.address.toLowerCase());let T;m=-1===f?y:[...y.slice(0,f),...y.slice(f+1)],T=e.type===exports.PoolType.Weighted?S.exitExactBPTInForOneTokenOut(l,m.indexOf(r)):A.exitExactBPTInForOneTokenOut(l,m.indexOf(r));const h=[{index:y.map((e=>e.toLowerCase())).indexOf(r.toLowerCase()),key:ps.toChainedReference(this.getOutputRef(n,a.index))}],I=this.receivesFromInternal(a),g=ps.formatExitPoolInput({poolId:e.id,poolKind:0,sender:i,recipient:s,outputReferences:h,exitPoolRequest:{},assets:y,minAmountsOut:b,userData:T,toInternalBalance:I});Ys(),Ys(JSON.stringify(g));const _=ps.encodeExitPool(g),x=Gs.mapExitPoolRequest(g),P=b.map((e=>ps.isChainedReference(e)?"0":t.Zero.sub(e).toString())),w=ps.isChainedReference(l)?"0":l;return{modelRequest:x,encodedCall:_,bptIn:p?w:t.Zero.toString(),tokensOut:"output"!==a.exitAction?[]:y,amountsOut:"output"!==a.exitAction?[]:P}}createExitPoolProportional(e,a,n,o){const i=!e.parent,s=i?e.index:ps.toChainedReference(this.getOutputRef(0,e.index)).toString(),r=e.children.map((e=>e.address)),p=[...a];e.type===exports.PoolType.ComposableStable&&(r.push(e.address),p.push("0"));const l=new Y(this.wrappedNativeAsset),[d,u]=l.sortTokens(r,p);let c;c=e.type===exports.PoolType.Weighted?S.exitExactBPTInForTokensOut(s):e.type===exports.PoolType.ComposableStable?C.exitExactBPTInForAllTokensOut(s):A.exitExactBPTInForTokensOut(s);const y=e.children.map((e=>({index:d.map((e=>e.toLowerCase())).indexOf(e.address.toLowerCase()),key:ps.toChainedReference(this.getOutputRef(0,e.index))})));let b=0;e.type===exports.PoolType.ComposableStable&&(b=3);const m=e.children.every((e=>this.receivesFromInternal(e))),f=ps.formatExitPoolInput({poolId:e.id,poolKind:b,sender:n,recipient:o,outputReferences:y,exitPoolRequest:{},assets:d,minAmountsOut:u,userData:c,toInternalBalance:m});Ys(),Ys(JSON.stringify(f));const T=ps.encodeExitPool(f),h=Gs.mapExitPoolRequest(f),I=u.map((e=>ps.isChainedReference(e)?"0":t.Zero.sub(e).toString())),g=ps.isChainedReference(s)?"0":s,_=i?g:t.Zero.toString(),x=d.filter((t=>e.children.filter((e=>"output"===e.exitAction)).map((e=>e.address)).includes(t))),P=I.filter(((e,t)=>x.includes(d[t])));return{modelRequest:h,encodedCall:T,bptIn:_,tokensOut:x,amountsOut:P}}}class Zs{constructor(e){this.yesterdaysPools=e}async last24h(e){let t;return this.yesterdaysPools&&(t=await this.yesterdaysPools.find(e.id)),e.totalSwapVolume?(null==t?void 0:t.totalSwapVolume)?parseFloat(e.totalSwapVolume)-parseFloat(t.totalSwapVolume):e.createTime&&ys(e.createTime)?parseFloat(e.totalSwapVolume):0:0}}class Qs{constructor(e,t){this.checkCreateInputs=({tokenAddresses:e,tokenRateCacheDurations:t,exemptFromYieldProtocolFeeFlags:a,rateProviders:n,swapFeeEvm:o})=>{if(e.length!==t.length||t.length!==a.length||a.length!==n.length)throw new Oa(exports.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(BigInt(o)<=BigInt(0)||BigInt(o)>BigInt(1e17))throw new Oa(exports.BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE)},this.parseCreateParamsForEncoding=({name:e,symbol:t,tokenAddresses:a,amplificationParameter:n,rateProviders:o,tokenRateCacheDurations:i,exemptFromYieldProtocolFeeFlags:s,swapFeeEvm:r,owner:p,salt:l})=>{const d=new Y(this.wrappedNativeAsset),[u,c,y,b]=d.sortTokens(a,o,i,s);return[e,t,u,n,c,y,b,r.toString(),p,l||et()]},this.encodeCreateFunctionData=e=>Et.createInterface().encodeFunctionData("create",e),this.checkInitJoinInputs=({poolId:e,poolAddress:t,tokensIn:a,amountsIn:n})=>{if(!e||!t)throw new Oa(exports.BalancerErrorCode.NO_POOL_DATA);if(a.length!==n.length)throw new Oa(exports.BalancerErrorCode.INPUT_LENGTH_MISMATCH)},this.parseParamsForInitJoin=({joiner:e,poolId:t,poolAddress:a,tokensIn:n,amountsIn:o})=>{const i=new Y(this.wrappedNativeAsset),s=[...n,a],r=[...o,"0"],p=[...o,BigInt.asUintN(256,BigInt(-1)).toString()],[l,d,u]=i.sortTokens(s,r,p),c={poolId:t,sender:e,recipient:e,joinPoolRequest:{assets:l,maxAmountsIn:u,userData:C.joinInit(d),fromInternalBalance:!1}};return{attributes:c,params:[c.poolId,c.sender,c.recipient,c.joinPoolRequest]}},this.encodeInitJoinFunctionData=e=>{const t="joinPool";return{functionName:t,data:la.createInterface().encodeFunctionData(t,e)}},this.getPoolAddressAndIdWithReceipt=async(e,t)=>{var a;const n=Qe({receipt:t,to:(null===(a=this.contracts.composableStablePoolFactory)||void 0===a?void 0:a.address)||"",contractInterface:Et.createInterface(),logName:"PoolCreated"}).args.pool,o=this.getPoolInterface(),i=new y.Contract(n,o,e);return{poolAddress:n,poolId:await i.getPoolId()}};const{tokens:a}=Ba(e.chainId);this.wrappedNativeAsset=a.wrappedNativeAsset,this.contracts=t}create({name:e,symbol:t,tokenAddresses:a,amplificationParameter:n,rateProviders:o,tokenRateCacheDurations:i,exemptFromYieldProtocolFeeFlags:s,swapFeeEvm:r,owner:p,salt:l}){var d;this.checkCreateInputs({rateProviders:o,tokenAddresses:a,tokenRateCacheDurations:i,exemptFromYieldProtocolFeeFlags:s,swapFeeEvm:r});const u=this.parseCreateParamsForEncoding({name:e,symbol:t,tokenAddresses:a,amplificationParameter:n,rateProviders:o,tokenRateCacheDurations:i,exemptFromYieldProtocolFeeFlags:s,swapFeeEvm:r,owner:p,salt:l}),c=this.encodeCreateFunctionData(u);return{to:null===(d=this.contracts.composableStablePoolFactory)||void 0===d?void 0:d.address,data:c}}buildInitJoin({joiner:e,poolId:t,poolAddress:a,tokensIn:n,amountsIn:o}){this.checkInitJoinInputs({tokensIn:n,amountsIn:o,poolId:t,poolAddress:a});const{attributes:i,params:s}=this.parseParamsForInitJoin({joiner:e,poolId:t,poolAddress:a,tokensIn:n,amountsIn:o}),{functionName:r,data:p}=this.encodeInitJoinFunctionData(s);return{to:va,functionName:r,data:p,attributes:i}}getPoolInterface(){return Pt.createInterface()}}class er{constructor(e,t){this.parseCreateParamsForEncoding=({name:e,symbol:t,tokenAddresses:a,normalizedWeights:n,rateProviders:o,swapFeeEvm:i,owner:s,salt:r})=>{const p=new Y(this.wrappedNativeAsset),[l,d,u]=p.sortTokens(a,n,o);return[e,t,l,d,u,i.toString(),s,r||et()]},this.encodeCreateFunctionData=e=>ya.createInterface().encodeFunctionData("create",e),this.parseParamsForInitJoin=({joiner:e,poolId:t,tokensIn:a,amountsIn:n})=>{const o=new Y(this.wrappedNativeAsset),[i,s]=o.sortTokens(a,n),r={poolId:t,sender:e,recipient:e,joinPoolRequest:{assets:i,maxAmountsIn:s,userData:S.joinInit(s),fromInternalBalance:!1}};return{attributes:r,params:[r.poolId,r.sender,r.recipient,r.joinPoolRequest]}},this.encodeInitJoinFunctionData=e=>{const t="joinPool";return{functionName:t,data:la.createInterface().encodeFunctionData(t,e)}},this.checkInitJoinInputs=({poolId:e,tokensIn:t,amountsIn:a})=>{if(!e)throw new Oa(exports.BalancerErrorCode.NO_POOL_DATA);if(t.length!==a.length)throw new Oa(exports.BalancerErrorCode.INPUT_LENGTH_MISMATCH)};const{tokens:a}=Ba(e.chainId);this.wrappedNativeAsset=a.wrappedNativeAsset,this.contracts=t}create({name:e,symbol:t,tokenAddresses:a,normalizedWeights:n,rateProviders:o,swapFeeEvm:i,owner:s,salt:r}){var p;this.checkCreateInputs({tokenAddresses:a,normalizedWeights:n,swapFeeEvm:i,rateProviders:o});const l=this.parseCreateParamsForEncoding({name:e,symbol:t,tokenAddresses:a,normalizedWeights:n,rateProviders:o,swapFeeEvm:i,owner:s,salt:r}),d=this.encodeCreateFunctionData(l);return{to:null===(p=this.contracts.weightedPoolFactory)||void 0===p?void 0:p.address,data:d}}checkCreateInputs({tokenAddresses:e,normalizedWeights:t,swapFeeEvm:a,rateProviders:n}){if(e.length!==t.length||t.length!==n.length)throw new Oa(exports.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(e.length<2)throw new Oa(exports.BalancerErrorCode.BELOW_MIN_TOKENS);if(e.length>8)throw new Oa(exports.BalancerErrorCode.ABOVE_MAX_TOKENS);if(BigInt(a)<=BigInt(0)||BigInt(a)>BigInt(1e17))throw new Oa(exports.BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE);if(t.reduce(((e,t)=>ce.add(e,BigInt(t))),BigInt(0))!==BigInt(1e18))throw new Oa(exports.BalancerErrorCode.INVALID_WEIGHTS)}buildInitJoin({joiner:e,poolId:t,tokensIn:a,amountsIn:n}){this.checkInitJoinInputs({poolId:t,tokensIn:a,amountsIn:n});const{attributes:o,params:i}=this.parseParamsForInitJoin({joiner:e,poolId:t,tokensIn:a,amountsIn:n}),{functionName:s,data:r}=this.encodeInitJoinFunctionData(i);return{to:va,functionName:s,data:r,attributes:o}}async getPoolAddressAndIdWithReceipt(e,t){var a;const n=Qe({receipt:t,to:(null===(a=this.contracts.weightedPoolFactory)||void 0===a?void 0:a.address)||"",contractInterface:ya.createInterface(),logName:"PoolCreated"}).args.pool,o=this.getPoolInterface(),i=new y.Contract(n,o,e);return{poolAddress:n,poolId:await i.getPoolId()}}getPoolInterface(){return ua.createInterface()}}var tr;exports.ProtocolId=void 0,(tr=exports.ProtocolId||(exports.ProtocolId={}))[tr.AAVE_V1=0]="AAVE_V1",tr[tr.AAVE_V2=1]="AAVE_V2",tr[tr.AAVE_V3=2]="AAVE_V3",tr[tr.AMPLEFORTH=3]="AMPLEFORTH",tr[tr.BEEFY=4]="BEEFY",tr[tr.EULER=5]="EULER",tr[tr.GEARBOX=6]="GEARBOX",tr[tr.IDLE=7]="IDLE",tr[tr.MORPHO=8]="MORPHO",tr[tr.RADIANT=9]="RADIANT",tr[tr.REAPER=10]="REAPER",tr[tr.SILO=11]="SILO",tr[tr.STARGATE=12]="STARGATE",tr[tr.STURDY=13]="STURDY",tr[tr.TESSERA=14]="TESSERA",tr[tr.TETU=15]="TETU",tr[tr.YEARN=16]="YEARN",tr[tr.MIDAS=17]="MIDAS",tr[tr.AGAVE=18]="AGAVE";class ar{constructor(e,t){this.getPoolFactoryInterface=()=>{switch(this.poolType){case exports.PoolType.AaveLinear:return rt.createInterface();case exports.PoolType.Linear:case exports.PoolType.ERC4626Linear:return Mt.createInterface();case exports.PoolType.EulerLinear:return Lt.createInterface();case exports.PoolType.GearboxLinear:return Kt.createInterface();case exports.PoolType.YearnLinear:return Ta.createInterface();default:throw new Oa(exports.BalancerErrorCode.UNSUPPORTED_POOL_TYPE)}},this.getPoolInterface=()=>{switch(this.poolType){case exports.PoolType.AaveLinear:return it.createInterface();case exports.PoolType.Linear:case exports.PoolType.ERC4626Linear:return Ct.createInterface();case exports.PoolType.EulerLinear:return Rt.createInterface();case exports.PoolType.GearboxLinear:return Wt.createInterface();case exports.PoolType.YearnLinear:return ma.createInterface();default:throw new Oa(exports.BalancerErrorCode.UNSUPPORTED_POOL_TYPE)}},this.checkCreateInputs=({swapFeeEvm:e,protocolId:t})=>{if(!exports.ProtocolId[t])throw new Oa(exports.BalancerErrorCode.INVALID_PROTOCOL_ID);if(BigInt(e)<=BigInt(0)||BigInt(e)>BigInt(1e17))throw new Oa(exports.BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE);this.getFactoryAddress()},this.parseCreateParamsForEncoding=({name:e,symbol:t,mainToken:a,wrappedToken:n,upperTargetEvm:o,swapFeeEvm:i,owner:s,protocolId:r,salt:p})=>this.poolType===exports.PoolType.EulerLinear?[e,t,a,n,o,i,s,r.toString()]:[e,t,a,n,o,i,s,r.toString(),p||et()],this.encodeCreateFunctionData=e=>{const t=this.getPoolFactoryInterface();return this.poolType,exports.PoolType.EulerLinear,t.encodeFunctionData("create",e)},this.getFactoryAddress=()=>{switch(this.poolType){case exports.PoolType.AaveLinear:if(this.contracts.aaveLinearPoolFactory)return this.contracts.aaveLinearPoolFactory.address;throw new Oa(exports.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);case exports.PoolType.Linear:case exports.PoolType.ERC4626Linear:if(this.contracts.erc4626LinearPoolFactory)return this.contracts.erc4626LinearPoolFactory.address;throw new Oa(exports.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);case exports.PoolType.EulerLinear:if(this.contracts.eulerLinearPoolFactory)return this.contracts.eulerLinearPoolFactory.address;throw new Oa(exports.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);case exports.PoolType.GearboxLinear:if(this.contracts.gearboxLinearPoolFactory)return this.contracts.gearboxLinearPoolFactory.address;throw new Oa(exports.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);case exports.PoolType.YearnLinear:if(this.contracts.yearnLinearPoolFactory)return this.contracts.yearnLinearPoolFactory.address;throw new Oa(exports.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);default:throw new Oa(exports.BalancerErrorCode.UNSUPPORTED_POOL_TYPE)}},this.getPoolAddressAndIdWithReceipt=async(e,t)=>{const a=Qe({receipt:t,to:this.getFactoryAddress()||"",contractInterface:this.getPoolFactoryInterface(),logName:"PoolCreated"}).args.pool,n=this.getPoolInterface(),o=new y.Contract(a,n,e);return{poolAddress:a,poolId:await o.getPoolId()}},this.contracts=e,this.poolType=t}buildInitJoin(){throw new Oa(exports.BalancerErrorCode.UNSUPPORTED_POOL_TYPE)}create({name:e,symbol:t,mainToken:a,wrappedToken:n,upperTargetEvm:o,swapFeeEvm:i,owner:s,protocolId:r,salt:p}){this.checkCreateInputs({swapFeeEvm:i,protocolId:r});const l=this.parseCreateParamsForEncoding({name:e,symbol:t,mainToken:a,wrappedToken:n,upperTargetEvm:o,swapFeeEvm:i,owner:s,protocolId:r,salt:p}),d=this.encodeCreateFunctionData(l);return{to:this.getFactoryAddress(),data:d}}}class nr{constructor(e,t){this.networkConfig=e,this.contracts=t.contracts}of(e){switch(e){case"Weighted":return new er(this.networkConfig,this.contracts);case"Investment":case"LiquidityBootstrapping":case"Stable":case"MetaStable":case"StablePhantom":default:throw new Oa(exports.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);case"ComposableStable":return new Qs(this.networkConfig,this.contracts);case"Linear":case"AaveLinear":case"ERC4626Linear":case"EulerLinear":case"GearboxLinear":case"YearnLinear":return new ar(this.contracts,e)}}}class or{constructor(e){this.pool=e;const t=(e=>{switch(e){case exports.PoolType.Weighted:return S;case exports.PoolType.Stable:case exports.PoolType.MetaStable:case exports.PoolType.StablePhantom:case exports.PoolType.Element:case exports.PoolType.Gyro2:case exports.PoolType.Gyro3:return A;case exports.PoolType.ComposableStable:return C;default:if(Ze(e))return A}})(e.poolType);if(!t)throw"Pool type not supported";this.encoder=t}buildQueryJoinExactIn({maxAmountsInByToken:e,minimumBPT:n=t.Zero}){const o=this.pool.tokensList.findIndex((e=>this.pool.id.includes(e))),i=[...this.pool.tokensList],s=this.pool.tokensList.map((t=>{var n;return null!==(n=e.get(t))&&void 0!==n?n:a.BigNumber.from("0")}));let r;r=o>-1?Ye(s,o):s;const p=this.encoder.joinExactTokensInForBPTOut(r,n);return[this.pool.id,t.AddressZero,t.AddressZero,{assets:i,maxAmountsIn:s,userData:p,fromInternalBalance:!1}]}buildQueryJoinExactOut({maxAmountIn:e,bptOut:a,tokenIn:n}){const o=this.pool.tokensList.findIndex((e=>this.pool.id.includes(e)));let i=[...this.pool.tokensList];o>-1&&(i=Ye(this.pool.tokensList,o));const s=i.indexOf(n),r=this.encoder.joinTokenInForExactBPTOut(a,s),p=e?this.pool.tokensList.map((t=>t===n?e:"0")):[];return[this.pool.id,t.AddressZero,t.AddressZero,{assets:this.pool.tokensList,maxAmountsIn:p,userData:r,fromInternalBalance:!1}]}buildQueryExitToSingleToken({minAmountOut:e,bptIn:a,tokenOut:n}){const o=this.pool.tokensList.findIndex((e=>this.pool.id.includes(e)));let i=[...this.pool.tokensList];o>-1&&(i=Ye(this.pool.tokensList,o));const s=i.indexOf(n),r=this.encoder.exitExactBPTInForOneTokenOut(a,s),p=e?this.pool.tokensList.map((t=>t===n?e:"0")):[];return[this.pool.id,t.AddressZero,t.AddressZero,{assets:this.pool.tokensList,minAmountsOut:p,userData:r,toInternalBalance:!1}]}buildQueryExitProportionally({minAmountsOut:e=[],bptIn:a}){if(!this.encoder.exitExactBPTInForTokensOut)throw"Proportional exit not implemented";const n=this.encoder.exitExactBPTInForTokensOut(a);return[this.pool.id,t.AddressZero,t.AddressZero,{assets:this.pool.tokensList,minAmountsOut:e,userData:n,toInternalBalance:!1}]}buildQueryExitExactOut({minAmountsOut:e,maxBptIn:a=t.MaxUint256}){const n=this.pool.tokensList.findIndex((e=>this.pool.id.includes(e)));let o=[...e];n>-1&&(o=Ye(e,n));const i=this.encoder.exitBPTInForExactTokensOut(o,a);return[this.pool.id,t.AddressZero,t.AddressZero,{assets:this.pool.tokensList,minAmountsOut:e,userData:i,toInternalBalance:!1}]}}class ir{constructor(e){this.liquidityGaugesRepository=e}async relativeWeight(e){const t=await this.liquidityGaugesRepository.findBy("poolId",e);return t?t.relativeWeight:0}async weekly(e){return xs()*await this.relativeWeight(e)}}const sr=(e,t,n)=>{const o=e.tokens.filter((t=>!e.id.toLowerCase().includes(t.address.toLowerCase()))),i=o.findIndex((e=>e.address.toLowerCase()===t.toLowerCase()));if(-1==i)throw new Error("Token not found in pool");const s=o.map((e=>Ce(e.balance,e.decimals))),r=a.BigNumber.from(n),p=s.map((e=>e.mul(r).div(s[i])));return{tokens:o.map((e=>e.address)),amounts:p.map((e=>e.toString()))}},rr=(e,t)=>()=>{throw`${t} for poolType ${e} not implemented`};class pr{constructor(e,t,a){this.networkConfig=e,this.repositories=t,this.balancerContracts=a,this.aprService=new Ss(this.repositories.pools,this.repositories.tokenPrices,this.repositories.tokenMeta,this.repositories.tokenYields,this.repositories.feeCollector,this.repositories.yesterdaysPools,this.repositories.liquidityGauges,this.repositories.feeDistributor,this.repositories.gyroConfigRepository),this.liquidityService=new An(t.pools,t.tokenPrices),this.simulationService=new js(e,this.repositories.poolsForSimulations),this.graphService=new Cs(this.repositories.poolsOnChain),this.joinService=new Ks(this.graphService,e,this.simulationService),this.exitService=new zs(this.graphService,e,this.simulationService),this.feesService=new As(t.yesterdaysPools),this.volumeService=new Zs(t.yesterdaysPools),this.poolFactory=new nr(e,a),this.impermanentLossService=new Ts(t.tokenPrices,t.tokenHistoricalPrices),t.liquidityGauges&&(this.emissionsService=new ir(t.liquidityGauges)),this.proportionalAmounts=sr}static wrap(e,t){let a,n,o;try{a=En.from(e.poolType),o={buildJoin:(t,n,o,s)=>a.join.buildJoin({joiner:t,pool:e,tokensIn:n,amountsIn:o,slippage:s,wrappedNativeAsset:i}),calcPriceImpact:async(t,n,o)=>a.priceImpactCalculator.calcPriceImpact(e,t.map(BigInt),BigInt(n),o),buildExitExactBPTIn:(t,n,o,s=!1,r,p=!1)=>{if(a.exit.buildExitExactBPTIn)return a.exit.buildExitExactBPTIn({exiter:t,pool:e,bptIn:n,slippage:o,shouldUnwrapNativeAsset:s,wrappedNativeAsset:i,singleTokenOut:r,toInternalBalance:p});throw"ExitExactBPTIn not supported"},buildExitExactTokensOut:(t,n,o,s,r=!1)=>a.exit.buildExitExactTokensOut({exiter:t,pool:e,tokensOut:n,amountsOut:o,slippage:s,wrappedNativeAsset:i,toInternalBalance:r}),buildRecoveryExit:(t,n,o,i=!1)=>a.exit.buildRecoveryExit({exiter:t,pool:e,bptIn:n,slippage:o,toInternalBalance:i}),calcSpotPrice:(t,n)=>a.spotPriceCalculator.calcPoolSpotPrice(t,n,e),calcProportionalAmounts:(t,a)=>sr(e,t,a)}}catch(t){if("UNSUPPORTED_POOL_TYPE"!=t.code){j.getInstance().warn(t)}o={buildJoin:rr(e.poolType,"buildJoin"),calcPriceImpact:rr(e.poolType,"calcPriceImpact"),buildExitExactBPTIn:rr(e.poolType,"buildExitExactBPTIn"),buildExitExactTokensOut:rr(e.poolType,"buildExitExactTokensOut"),calcSpotPrice:rr(e.poolType,"calcSpotPrice"),buildRecoveryExit:rr(e.poolType,"buildRecoveryExit")}}try{n=new or(e),o={...o,buildQueryJoinExactIn:n.buildQueryJoinExactIn.bind(n),buildQueryJoinExactOut:n.buildQueryJoinExactOut.bind(n),buildQueryExitExactOut:n.buildQueryExitExactOut.bind(n),buildQueryExitToSingleToken:n.buildQueryExitToSingleToken.bind(n),buildQueryExitProportionally:n.buildQueryExitProportionally.bind(n)}}catch(t){o={...o,buildQueryJoinExactIn:rr(e.poolType,"buildQueryJoinExactIn"),buildQueryJoinExactOut:rr(e.poolType,"buildQueryJoinExactOut"),buildQueryExitExactOut:rr(e.poolType,"buildQueryExitExactOut"),buildQueryExitToSingleToken:rr(e.poolType,"buildQueryExitToSingleToken"),buildQueryExitProportionally:rr(e.poolType,"buildQueryExitProportionally")}}const i=t.addresses.tokens.wrappedNativeAsset.toLowerCase(),s=e.tokensList.indexOf(e.address);return{...e,...o,bptIndex:s}}dataSource(){return this.repositories.pools}async apr(e){return this.aprService.apr(e)}async impermanentLoss(e,t){return this.impermanentLossService.calcImpLoss(e,t)}async liquidity(e){return this.liquidityService.getLiquidity(e)}async bptPrice(e){return this.liquidityService.getBptPrice(e)}buildJoin({pool:e,tokensIn:t,amountsIn:a,userAddress:n,slippage:o}){const i=En.from(e.poolType);if(!i)throw`buildJoin for poolType ${e.poolType} not implemented`;return i.join.buildJoin({joiner:n,pool:e,tokensIn:t,amountsIn:a,slippage:o,wrappedNativeAsset:this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase()})}buildExitExactBPTIn({pool:e,bptAmount:t,userAddress:a,slippage:n,shouldUnwrapNativeAsset:o,singleTokenOut:i}){const s=En.from(e.poolType);if(!s||!s.exit.buildExitExactBPTIn)throw`buildExit for poolType ${e.poolType} not implemented`;return s.exit.buildExitExactBPTIn({pool:e,exiter:a,bptIn:t,slippage:n,wrappedNativeAsset:this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase(),shouldUnwrapNativeAsset:null!=o&&o,singleTokenOut:null!=i?i:void 0,toInternalBalance:!1})}buildRecoveryExit({pool:e,bptAmount:t,userAddress:a,slippage:n,toInternalBalance:o}){const i=En.from(e.poolType);if(!i||!i.exit.buildRecoveryExit)throw`buildRecoveryExit for poolType ${e.poolType} not implemented`;return i.exit.buildRecoveryExit({exiter:a,pool:e,bptIn:t,slippage:n,toInternalBalance:!!o})}async generalisedJoin(e,t,a,n,o,i,s,r){return this.joinService.joinPool(e,t,a,n,o,i,s,r)}async generalisedExit(e,t,a,n,o,i,s,r){return this.exitService.buildExitCall(e,t,a,n,o,i,s,r)}calcPriceImpact({pool:e,tokenAmounts:t,bptAmount:a,isJoin:n}){return En.from(e.poolType).priceImpactCalculator.calcPriceImpact(e,t.map(BigInt),BigInt(a),n)}async getExitInfo(e,t,a,n){return this.exitService.getExitInfo(e,t,a,n)}async fees(e){return this.feesService.last24h(e)}async volume(e){return this.volumeService.last24h(e)}async find(e){const t=await this.dataSource().find(e);if(t)return pr.wrap(t,this.networkConfig)}async findBy(e,t){if("id"==e)return this.find(t);if("address"==e){const e=await this.dataSource().findBy("address",t);if(!e)return;return pr.wrap(e,this.networkConfig)}throw`search by ${e} not implemented`}async all(){const e=await this.dataSource().all();return e?e.map((e=>pr.wrap(e,this.networkConfig))).filter((e=>e)):[]}async where(e){const t=await this.dataSource().where(e);if(!t)return[];return t.map((e=>pr.wrap(e,this.networkConfig))).filter((e=>e))}}const lr=new Se("strings/5.7.0");var dr,ur;function cr(e,t,a,n,o){if(e===ur.BAD_PREFIX||e===ur.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return e===ur.OVERRUN?a.length-t-1:0}function yr(e,t=dr.current){t!=dr.current&&(lr.checkNormalize(),e=e.normalize(t));let a=[];for(let t=0;t>6|192),a.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);if(t>=e.length||56320!=(64512&o))throw new Error("invalid utf-8 string");const i=65536+((1023&n)<<10)+(1023&o);a.push(i>>18|240),a.push(i>>12&63|128),a.push(i>>6&63|128),a.push(63&i|128)}else a.push(n>>12|224),a.push(n>>6&63|128),a.push(63&n|128)}return o.arrayify(a)}function br(e){const a=yr(e);if(a.length>31)throw new Error("bytes32 string must be less than 32 bytes");return o.hexlify(o.concat([a,t.HashZero]).slice(0,32))}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(dr||(dr={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(ur||(ur={})),Object.freeze({error:function(e,t,a,n,o){return lr.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",a)},ignore:cr,replace:function(e,t,a,n,o){return e===ur.OVERLONG?(n.push(o),0):(n.push(65533),cr(e,t,a))}});var mr,fr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Tr={exports:{}};mr=Tr,function(){var e="input is invalid type",t="object"==typeof window,a=t?window:{};a.JS_SHA3_NO_WINDOW&&(t=!1);var n=!t&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?a=fr:n&&(a=self);var o=!a.JS_SHA3_NO_COMMON_JS&&mr.exports,i=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,s="0123456789abcdef".split(""),r=[4,1024,262144,67108864],p=[0,8,16,24],l=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],d=[224,256,384,512],u=[128,256],c=["hex","buffer","arrayBuffer","array","digest"],y={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!i||!a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var b=function(e,t,a){return function(n){return new k(e,t,e).update(n)[a]()}},m=function(e,t,a){return function(n,o){return new k(e,t,o).update(n)[a]()}},f=function(e,t,a){return function(t,n,o,i){return _["cshake"+e].update(t,n,o,i)[a]()}},T=function(e,t,a){return function(t,n,o,i){return _["kmac"+e].update(t,n,o,i)[a]()}},h=function(e,t,a,n){for(var o=0;o>5,this.byteCount=this.blockCount<<2,this.outputBlocks=a>>5,this.extraBytes=(31&a)>>3;for(var n=0;n<50;++n)this.s[n]=0}function B(e,t,a){k.call(this,e,t,a)}k.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var a,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(e);if(null===t)throw new Error(e);if(i&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||i&&ArrayBuffer.isView(t)))throw new Error(e);a=!0}for(var o,s,r=this.blocks,l=this.byteCount,d=t.length,u=this.blockCount,c=0,y=this.s;c>2]|=t[c]<>2]|=s<>2]|=(192|s>>6)<>2]|=(128|63&s)<=57344?(r[o>>2]|=(224|s>>12)<>2]|=(128|s>>6&63)<>2]|=(128|63&s)<>2]|=(240|s>>18)<>2]|=(128|s>>12&63)<>2]|=(128|s>>6&63)<>2]|=(128|63&s)<=l){for(this.start=o-l,this.block=r[u],o=0;o>=8);a>0;)o.unshift(a),a=255&(e>>=8),++n;return t?o.push(n):o.unshift(n),this.update(o),o.length},k.prototype.encodeString=function(t){var a,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(e);if(null===t)throw new Error(e);if(i&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||i&&ArrayBuffer.isView(t)))throw new Error(e);a=!0}var o=0,s=t.length;if(a)o=s;else for(var r=0;r=57344?o+=3:(p=65536+((1023&p)<<10|1023&t.charCodeAt(++r)),o+=4)}return o+=this.encode(8*o),this.update(t),o},k.prototype.bytepad=function(e,t){for(var a=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[a],t=1;t>4&15]+s[15&e]+s[e>>12&15]+s[e>>8&15]+s[e>>20&15]+s[e>>16&15]+s[e>>28&15]+s[e>>24&15];r%t==0&&(C(a),i=0)}return o&&(e=a[i],p+=s[e>>4&15]+s[15&e],o>1&&(p+=s[e>>12&15]+s[e>>8&15]),o>2&&(p+=s[e>>20&15]+s[e>>16&15])),p},k.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,a=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,r=this.outputBits>>3;e=o?new ArrayBuffer(n+1<<2):new ArrayBuffer(r);for(var p=new Uint32Array(e);s>8&255,p[e+2]=t>>16&255,p[e+3]=t>>24&255;r%a==0&&C(n)}return i&&(e=r<<2,t=n[s],p[e]=255&t,i>1&&(p[e+1]=t>>8&255),i>2&&(p[e+2]=t>>16&255)),p},B.prototype=new k,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),k.prototype.finalize.call(this)};var C=function(e){var t,a,n,o,i,s,r,p,d,u,c,y,b,m,f,T,h,I,g,_,x,P,w,E,A,S,v,k,B,C,O,M,F,R,N,L,D,U,V,q,G,W,H,K,$,J,j,X,Y,z,Z,Q,ee,te,ae,ne,oe,ie,se,re,pe,le,de;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],r=e[3]^e[13]^e[23]^e[33]^e[43],p=e[4]^e[14]^e[24]^e[34]^e[44],d=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],t=(y=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|r>>>31),a=(b=e[9]^e[19]^e[29]^e[39]^e[49])^(r<<1|s>>>31),e[0]^=t,e[1]^=a,e[10]^=t,e[11]^=a,e[20]^=t,e[21]^=a,e[30]^=t,e[31]^=a,e[40]^=t,e[41]^=a,t=o^(p<<1|d>>>31),a=i^(d<<1|p>>>31),e[2]^=t,e[3]^=a,e[12]^=t,e[13]^=a,e[22]^=t,e[23]^=a,e[32]^=t,e[33]^=a,e[42]^=t,e[43]^=a,t=s^(u<<1|c>>>31),a=r^(c<<1|u>>>31),e[4]^=t,e[5]^=a,e[14]^=t,e[15]^=a,e[24]^=t,e[25]^=a,e[34]^=t,e[35]^=a,e[44]^=t,e[45]^=a,t=p^(y<<1|b>>>31),a=d^(b<<1|y>>>31),e[6]^=t,e[7]^=a,e[16]^=t,e[17]^=a,e[26]^=t,e[27]^=a,e[36]^=t,e[37]^=a,e[46]^=t,e[47]^=a,t=u^(o<<1|i>>>31),a=c^(i<<1|o>>>31),e[8]^=t,e[9]^=a,e[18]^=t,e[19]^=a,e[28]^=t,e[29]^=a,e[38]^=t,e[39]^=a,e[48]^=t,e[49]^=a,m=e[0],f=e[1],J=e[11]<<4|e[10]>>>28,j=e[10]<<4|e[11]>>>28,k=e[20]<<3|e[21]>>>29,B=e[21]<<3|e[20]>>>29,re=e[31]<<9|e[30]>>>23,pe=e[30]<<9|e[31]>>>23,W=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,T=e[13]<<12|e[12]>>>20,h=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,C=e[33]<<13|e[32]>>>19,O=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,de=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ae=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,D=e[15]<<6|e[14]>>>26,I=e[25]<<11|e[24]>>>21,g=e[24]<<11|e[25]>>>21,z=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,M=e[45]<<29|e[44]>>>3,F=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,A=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,oe=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,V=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,$=e[9]<<27|e[8]>>>5,S=e[18]<<20|e[19]>>>12,v=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,G=e[39]<<8|e[38]>>>24,P=e[48]<<14|e[49]>>>18,w=e[49]<<14|e[48]>>>18,e[0]=m^~T&I,e[1]=f^~h&g,e[10]=E^~S&k,e[11]=A^~v&B,e[20]=R^~L&U,e[21]=N^~D&V,e[30]=K^~J&X,e[31]=$^~j&Y,e[40]=te^~ne&ie,e[41]=ae^~oe&se,e[2]=T^~I&_,e[3]=h^~g&x,e[12]=S^~k&C,e[13]=v^~B&O,e[22]=L^~U&q,e[23]=D^~V&G,e[32]=J^~X&z,e[33]=j^~Y&Z,e[42]=ne^~ie&re,e[43]=oe^~se&pe,e[4]=I^~_&P,e[5]=g^~x&w,e[14]=k^~C&M,e[15]=B^~O&F,e[24]=U^~q&W,e[25]=V^~G&H,e[34]=X^~z&Q,e[35]=Y^~Z&ee,e[44]=ie^~re&le,e[45]=se^~pe&de,e[6]=_^~P&m,e[7]=x^~w&f,e[16]=C^~M&E,e[17]=O^~F&A,e[26]=q^~W&R,e[27]=G^~H&N,e[36]=z^~Q&K,e[37]=Z^~ee&$,e[46]=re^~le&te,e[47]=pe^~de&ae,e[8]=P^~m&T,e[9]=w^~f&h,e[18]=M^~E&S,e[19]=F^~A&v,e[28]=W^~R&L,e[29]=H^~N&D,e[38]=Q^~K&J,e[39]=ee^~$&j,e[48]=le^~te&ne,e[49]=de^~ae&oe,e[0]^=l[n],e[1]^=l[n+1]};if(o)mr.exports=_;else for(P=0;P256)&&xr.throwArgumentError("invalid number type","type",e),n&&(s=256),t=a.BigNumber.from(t).toTwos(s),o.zeroPad(t,s/8)}if(i=e.match(Ir),i){const a=parseInt(i[1]);return(String(a)!==i[1]||0===a||a>32)&&xr.throwArgumentError("invalid bytes type","type",e),o.arrayify(t).byteLength!==a&&xr.throwArgumentError(`invalid value for ${e}`,"value",t),n?o.arrayify((t+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):t}if(i=e.match(_r),i&&Array.isArray(t)){const a=i[1];parseInt(i[2]||String(t.length))!=t.length&&xr.throwArgumentError(`invalid array length for ${e}`,"value",t);const n=[];return t.forEach((function(e){n.push(Pr(a,e,!0))})),o.concat(n)}return xr.throwArgumentError("invalid type","type",e)}function wr(e,t){e.length!=t.length&&xr.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const a=[];return e.forEach((function(e,n){a.push(Pr(e,t[n]))})),o.hexlify(o.concat(a))}function Er(e,t){return a=wr(e,t),"0x"+hr.keccak_256(o.arrayify(a));var a}const Ar=br("PROTOCOL_SWAP_FEE_PERC"),Sr=br("E-CLP"),vr=Er(["bytes"],[e.defaultAbiCoder.encode(["bytes32","bytes32"],[Ar,Sr])]);class kr{constructor(e,t,a){this.gyroConfigAddress=e,this.multicall=t,this.gyroConfigInterface=Jt.createInterface(),this.gyroConfig=Jt.connect(e,a)}async getGyroProtocolFee(t){let n;const o=Er(["bytes"],[e.defaultAbiCoder.encode(["bytes32","uint256"],[Ar,t])]),i=[{target:this.gyroConfigAddress,callData:this.gyroConfigInterface.encodeFunctionData("hasKey",[o])},{target:this.gyroConfigAddress,callData:this.gyroConfigInterface.encodeFunctionData("hasKey",[vr])},{target:this.gyroConfigAddress,callData:this.gyroConfigInterface.encodeFunctionData("hasKey",[Ar])}],[,[s,r,p]]=await this.multicall.callStatic.aggregate(i),l=a.BigNumber.from(s).eq(1),d=a.BigNumber.from(r).eq(1),u=a.BigNumber.from(p).eq(1);return n=l?parseFloat(a.formatFixed(await this.gyroConfig.getUint(o),18)):d?parseFloat(a.formatFixed(await this.gyroConfig.getUint(vr),18)):u?parseFloat(a.formatFixed(await this.gyroConfig.getUint(Ar),18)):0,n}}const Br=new e.Interface(["function gauge_relative_weight(address gauge, uint timestamp) view returns (uint)"]),Cr=new e.Interface(["function gauge_relative_weight(address gauge) view returns (uint)"]);class Or{constructor(e,t,a){this.multicall=e,this.gaugeControllerAddress=t,this.gaugeControllerCheckpointerAddress=a}async getRelativeWeights(e,t){const a=e.map((e=>this.gaugeControllerCheckpointerAddress&&!t?{target:this.gaugeControllerCheckpointerAddress,callData:Cr.encodeFunctionData("gauge_relative_weight",[n.getAddress(e)])}:{target:this.gaugeControllerAddress,callData:Br.encodeFunctionData("gauge_relative_weight",[n.getAddress(e),t||Math.floor(Date.now()/1e3)])})),[,o]=await this.multicall.callStatic.aggregate(a);return e.reduce(((e,t,a)=>(e[t]||(e[t]=parseFloat(Be(o[a],18))),e)),{})}}class Mr{async get(e){const t=await this.query(e);return(null==t?void 0:t.length)>0?t[0]:void 0}async find(e){return this.get({where:{id:e}})}async findBy(e,t){return this.get({where:{[String(e)]:t}})}async findAllBy(e,t,a=1e3,n=0){const o={where:{[String(e)]:t},first:a,skip:n};return this.query(o)}}class Fr extends Mr{constructor(e,t,a){super(),this.chainId=t,this.blockHeight=a,this.client=Ei(e)}}class Rr extends Mr{constructor(e,t,a){super(),this.chainId=t,this.blockHeight=a,this.client=Ai(e)}}class Nr extends Rr{async query(e){e.orderBy||(e.orderBy=ei.balance),e.orderDirection||(e.orderDirection=ri.desc),!e.block&&this.blockHeight&&(e.block={number:await this.blockHeight()});const{gaugeShares:t}=await this.client.GaugeShares(e);return t.map(this.mapType)}mapType(e){var t;return{id:e.id,balance:e.balance,userAddress:null===(t=e.user)||void 0===t?void 0:t.id,gauge:{id:e.gauge.id,poolId:e.gauge.poolId||void 0,isKilled:e.gauge.isKilled,totalSupply:e.gauge.totalSupply}}}async findByUser(e,t,a){return this.findAllBy(exports.GaugeShareAttributes.UserAddress,e,t,a)}async findByGauge(e,t,a){return this.findAllBy(exports.GaugeShareAttributes.GaugeId,e,t,a)}}const Lr=new e.Interface(["function totalSupply() view returns (uint)","function working_supply() view returns (uint)","function reward_count() view returns (uint)","function reward_tokens(uint rewardIndex) view returns (address)","function reward_data(address rewardToken) view returns (tuple(address token, address distributor, uint period_finish, uint rate, uint last_update, uint integral) data)"]),Dr=new e.Interface(["function inflation_rate(uint currentWeekTimestamp) view returns (uint)"]);class Ur{constructor(e,t){this.multicall=e,this.chainId=t}async getTotalSupplies(e){const t=e.map((e=>({target:e,callData:Lr.encodeFunctionData("totalSupply",[])}))),[,a]=await this.multicall.callStatic.aggregate(t),n=a.map((e=>"0x"==e?"0x0":e));return e.reduce(((e,t,a)=>(e[t]||(e[t]=parseFloat(Be(n[a],18))),e)),{})}async getWorkingSupplies(e){const t=e.map((e=>({target:e,callData:Lr.encodeFunctionData("working_supply",[])}))),[,a]=await this.multicall.callStatic.aggregate(t),n=a.map((e=>"0x"==e?"0x0":e));return e.reduce(((e,t,a)=>(e[t]||(e[t]=parseFloat(Be(n[a],18))),e)),{})}async getInflationRates(e){const t=Math.floor(Date.now()/1e3/604800),a=e.map((e=>({target:e,callData:Dr.encodeFunctionData("inflation_rate",[t])}))),[,n]=await this.multicall.callStatic.aggregate(a),o=n.map((e=>"0x"==e?"0x0":e));return e.reduce(((e,t,a)=>(e[t]||(e[t]=parseFloat(Be(o[a],18))),e)),{})}async getRewardCounts(e){let t;if(1==this.chainId){const a=e.map((e=>({target:e,callData:Lr.encodeFunctionData("reward_count",[])}))),[,n]=await this.multicall.callStatic.aggregate(a),o=n.map((e=>"0x"==e?"0x0":e));t=e.reduce(((e,t,a)=>(e[t]||(e[t]=parseInt(o[a])),e)),{})}else t=e.reduce(((e,t)=>(e[t]||(e[t]=1),e)),{});return t}async getRewardTokens(e,t){const a=t||await this.getRewardCounts(e),n=e.filter((e=>a[e]>0)),o=[0],i=n.map(((e,t)=>{const n=[];for(let t=0;t{const n=o[a],i=o[a+1],r=[];for(let e=n;e{const o=[];for(let t=0;tLr.decodeFunctionResult("reward_data",e)[0]));return Object.keys(a).reduce(((e,t,o)=>{const i=n[o],r=a[t].reduce(((e,t,a)=>(e[t]||(e[t]=s[i+a]),e)),{});return e[t]||(e[t]=r),e}),{})}}class Vr{constructor(e){this.gauges=[],this.client=Ai(e)}async fetch(){const e=(await this.client.Pools({first:1e3,where:{preferentialGauge_not:null}})).pools.map((e=>e.preferentialGauge));return this.gauges=e,this.gauges}async find(e){return 0==this.gauges.length&&await this.fetch(),this.gauges.find((t=>t.id==e))}async findBy(e,t){if(0==this.gauges.length&&await this.fetch(),"id"==e)return this.find(t);if("poolId"==e)return this.gauges.find((e=>e.poolId==t));if("poolAddress"==e)return this.gauges.find((e=>e.poolAddress==t));throw`search by ${e} not implemented`}}class qr{constructor(e,t,a,n,o){this.chainId=n,this.workingSupplies={},this.relativeWeights={},this.inflationRates={},this.rewardData={},a&&(this.gaugeController=new Or(t,a,o)),this.multicall=new Ur(t,n),this.subgraph=new Vr(e)}async fetch(){const e=await this.subgraph.fetch(),t=e.map((e=>e.id));if(1==this.chainId)this.workingSupplies=await this.multicall.getWorkingSupplies(t);else{const t=["0x3b8ca519122cdd8efb272b0d3085453404b25bd0","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2","0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647","0x809b79b53f18e9bc08a961ed4678b901ac93213a"],a=e.filter((e=>!t.includes(e.factory.id.toLowerCase()))).map((e=>e.id));a.length>0&&(this.inflationRates=await this.multicall.getInflationRates(a),this.workingSupplies=await this.multicall.getWorkingSupplies(a))}return this.gaugeController&&(this.relativeWeights=await this.gaugeController.getRelativeWeights(t)),this.rewardData=e.reduce(((e,t)=>{var n;return e[n=t.id]||(e[n]=t.tokens?Object.fromEntries(t.tokens.map((e=>[e.id.split("-")[0],{distributor:"",last_update:a.BigNumber.from(0),integral:a.BigNumber.from(0),token:e.id.split("-")[0],decimals:e.decimals,rate:Ce(e.rate||"0",e.decimals),period_finish:a.BigNumber.from(e.periodFinish||"0")}]))):{}),e}),{}),e.map(this.compose.bind(this))}async find(e){return this.gauges||(this.gauges=this.fetch()),(await this.gauges).find((t=>t.id==e))}async findBy(e,t){let a;if(this.gauges||(this.gauges=this.fetch()),"id"==e)return this.find(t);if("address"==e)return this.find(t);if("poolId"==e)a=(await this.gauges).find((e=>e.poolId==t));else{if("poolAddress"!=e)throw`search by ${e} not implemented`;a=(await this.gauges).find((e=>e.poolAddress==t))}return a}compose(e){return{id:e.id,address:e.id,name:e.symbol,poolId:e.poolId,poolAddress:e.poolAddress,totalSupply:parseFloat(e.totalSupply),workingSupply:this.workingSupplies[e.id],relativeWeight:this.relativeWeights[e.id],rewardTokens:this.rewardData[e.id],balInflationRate:this.inflationRates[e.id]}}}class Gr{constructor(e,t){this.url=e,this.apiKey=t}async get(e){try{const t=this.toPayload(e),{data:a}=await w.default.post(this.url,t,{headers:{"x-api-key":this.apiKey}});if(a.errors)throw new Error(a.errors.map((e=>e.message)).join(","));return a.data}catch(e){throw console.error(e),e}return[]}toPayload(e){return JSON.stringify({query:b.jsonToGraphQLQuery({query:e})})}}function Wr(e){return new Promise((t=>setTimeout(t,e)))}const Hr=(e,t)=>{var a,n,o,i,s,r,p,l,d,u,c;return{id:e.id,name:e.name||"",address:e.address,chainId:t,poolType:e.poolType,poolTypeVersion:e.poolTypeVersion||1,swapFee:e.swapFee,swapEnabled:e.swapEnabled,protocolYieldFeeCache:e.protocolYieldFeeCache||"0.5",protocolSwapFeeCache:e.protocolSwapFeeCache||"0.5",amp:null!==(a=e.amp)&&void 0!==a?a:void 0,owner:null!==(n=e.owner)&&void 0!==n?n:void 0,factory:null!==(o=e.factory)&&void 0!==o?o:void 0,symbol:null!==(i=e.symbol)&&void 0!==i?i:void 0,tokens:(e.tokens||[]).map(Kr),tokensList:e.tokensList,tokenAddresses:(e.tokens||[]).map((e=>e.address)),totalLiquidity:e.totalLiquidity,totalShares:e.totalShares,totalSwapFee:e.totalSwapFee,totalSwapVolume:e.totalSwapVolume,priceRateProviders:null!==(s=e.priceRateProviders)&&void 0!==s?s:void 0,createTime:e.createTime,mainIndex:null!==(r=e.mainIndex)&&void 0!==r?r:void 0,wrappedIndex:null!==(p=e.wrappedIndex)&&void 0!==p?p:void 0,totalWeight:e.totalWeight||"1",lowerTarget:null!==(l=e.lowerTarget)&&void 0!==l?l:"0",upperTarget:null!==(d=e.upperTarget)&&void 0!==d?d:"0",isInRecoveryMode:null!==(u=e.isInRecoveryMode)&&void 0!==u&&u,isPaused:null!==(c=e.isPaused)&&void 0!==c&&c}},Kr=e=>{const t=$r(e.token);return{...e,isExemptFromYieldProtocolFee:e.isExemptFromYieldProtocolFee||!1,token:t}},$r=e=>{let t=null;return e.pool&&(t={id:e.pool.id,address:e.pool.address,totalShares:e.pool.totalShares,poolType:e.pool.poolType,mainIndex:e.pool.mainIndex||0},(null==e?void 0:e.pool.tokens)&&(t.tokens=e.pool.tokens.map(Jr))),{pool:t,latestUSDPrice:e.latestUSDPrice||void 0}},Jr=e=>({address:e.address,decimals:e.decimals,symbol:e.symbol,balance:e.balance,priceRate:e.priceRate,weight:e.weight,isExemptFromYieldProtocolFee:e.isExemptFromYieldProtocolFee||void 0,token:e.token?$r(e.token):void 0});class jr{constructor(e){var t,a;this.skip=0,this.client=Ei(e.url),this.blockHeight=e.blockHeight,this.chainId=e.chainId;const n={orderBy:bo.TotalLiquidity,orderDirection:ro.Desc,where:{totalShares:{gt:1e-12}}},o=Object.assign({},(null===(t=e.query)||void 0===t?void 0:t.args)||n),i=Object.assign({},(null===(a=e.query)||void 0===a?void 0:a.attrs)||{});this.query={args:o,attrs:i}}async fetchAllPools(){const e=j.getInstance();e.time("fetching pools"),this.blockHeight&&(this.query.args.block={number:await this.blockHeight()});const t=new nt(this.query.args).format(new at),{pool0:a,pool1000:n,pool2000:o}=await this.client.AllPools(t);return e.timeEnd("fetching pools"),[...a,...n,...o].map((e=>Hr(e,this.chainId)))}async fetch(e){const t=j.getInstance();t.time("fetching pools"),(null==e?void 0:e.skip)&&(this.query.args.skip=e.skip),this.blockHeight&&(this.query.args.block={number:await this.blockHeight()}),this.query.args.first=(null==e?void 0:e.first)||this.query.args.first||1e3;const a=new nt(this.query.args).format(new at),{pools:n}=await this.client.Pools(a);return this.skip=((null==e?void 0:e.skip)||0)+n.length,t.timeEnd("fetching pools"),n.map((e=>Hr(e,this.chainId)))}async find(e){return await this.findBy("id",e)}async findBy(e,t){return this.pools||(this.pools=this.fetchAllPools()),(await this.pools).find((a=>a[e]==t))}async all(){return this.pools||(this.pools=this.fetchAllPools()),this.pools}async block(){return this.blockHeight?{number:await this.blockHeight()}:void 0}async where(e){return this.pools||(this.pools=this.fetchAllPools()),(await this.pools).filter(e)}}class Xr{constructor(e,t,a,n){this.poolsSubgraph=e,this.poolsToIgnore=a,this.batchSize=n,this.skip=0,this.provider=t.provider,this.multicall=t.multicall,this.vault=t.vault}filterPools(e){return e.filter((e=>{if(!1===e.swapEnabled)return!1;if(!this.poolsToIgnore)return!0;return-1===this.poolsToIgnore.findIndex((t=>t.toLowerCase()===e.id.toLowerCase()))}))}async fetchDefault(){const e=await this.poolsSubgraph.all(),t=this.filterPools(e),a=j.getInstance();a.time(`fetching onchain ${t.length} pools`);const n=await Fi(t,this.multicall,this.vault,this.provider,this.batchSize);return a.timeEnd(`fetching onchain ${t.length} pools`),n}async fetch(e){const t=await this.poolsSubgraph.fetch(e),a=this.filterPools(t),n=j.getInstance();n.time(`fetching onchain ${a.length} pools`);const o=await Fi(a,this.multicall,this.vault,this.provider,this.batchSize);return n.timeEnd(`fetching onchain ${a.length} pools`),o}async find(e,t=!1){return await this.findBy("id",e,t)}async findBy(e,t,a=!1){return this.pools&&!a||(this.pools=this.fetchDefault()),(await this.pools).find((a=>a[e]==t))}async all(){return this.pools||(this.pools=this.fetchDefault()),this.pools}async where(e){return this.pools||(this.pools=this.fetchDefault()),(await this.pools).filter(e)}async refresh(e){const t=await Fi([e],this.multicall,this.vault,this.provider);if(this.pools){const a=(await this.pools).findIndex((t=>t.address===e.address));-1!==a&&(this.pools=Promise.resolve([...(await this.pools).splice(a,1),t[0]]))}return t[0]}}class Yr extends Rr{async query(e){!e.block&&this.blockHeight&&(e.block={number:await this.blockHeight()});const{pools:t}=await this.client.PoolGauges(e);return t.map(this.mapType)}mapType(e){return e}}var zr;exports.PoolJoinExitAttributes=void 0,(zr=exports.PoolJoinExitAttributes||(exports.PoolJoinExitAttributes={})).Pool="pool",zr.Sender="sender";class Zr extends Fr{async query(e){e.orderBy||(e.orderBy=no.Timestamp),e.orderDirection||(e.orderDirection=ro.Asc),!e.block&&this.blockHeight&&(e.block={number:await this.blockHeight()});const{joinExits:t}=await this.client.JoinExits(e);return t.map(this.mapType)}mapType(e){return{id:e.id,userAddress:e.user.id,poolId:e.pool.id,timestamp:e.timestamp,type:e.type,amounts:e.amounts,tokens:e.pool.tokensList}}async findByUser(e,t,a){return this.findAllBy(exports.PoolJoinExitAttributes.Sender,e,t,a)}async findJoins(e,t){return this.query({where:{sender:e,pool:t,type:"Join"}})}async findExits(e,t){return this.query({where:{sender:e,pool:t,type:"Exit"}})}async findByPool(e,t,a){return this.findAllBy(exports.PoolJoinExitAttributes.Pool,e,t,a)}}class Qr extends Fr{async query(e){e.orderBy||(e.orderBy=uo.Balance),e.orderDirection||(e.orderDirection=ro.Desc),!e.block&&this.blockHeight&&(e.block={number:await this.blockHeight()});const{poolShares:t}=await this.client.PoolShares(e);return t.map(this.mapType)}mapType(e){return{id:e.id,userAddress:e.userAddress.id,poolId:e.poolId.id,balance:e.balance}}async findByUser(e,t,a){return this.findAllBy(exports.PoolShareAttributes.UserAddress,e,t,a)}async findByPool(e,t,a){return this.findAllBy(exports.PoolShareAttributes.PoolId,e,t,a)}}class ep{constructor(e){this.tokens=e}async find(e){return this.tokens.find((t=>t.address.toLowerCase()===e.toLowerCase()))}async findBy(e,t){return this.tokens.find((a=>a[e]===t))}}class tp{constructor(e,t=1,a){var n;this.chainId=t,this.prices={},this.baseTokenAddresses=e.map(Ne),this.url=`${qi(null==a?void 0:a.isDemoApiKey)}simple/token_price/${this.platform(t)}?vs_currencies=usd,eth`,this.urlNative=`${qi(null==a?void 0:a.isDemoApiKey)}simple/price/?vs_currencies=eth,usd&ids=`,this.coingeckoApiKeyHeaderName=Gi(null==a?void 0:a.isDemoApiKey),this.apiKey=null==a?void 0:a.coingeckoApiKey,this.debouncer=new Ve(this.fetch.bind(this),200,null!==(n=null==a?void 0:a.tokensPerPriceRequest)&&void 0!==n?n:10)}async fetch(e,{signal:t}={}){var a,n,o;try{const{data:n}=await w.default.get(`${this.url}&contract_addresses=${e.join(",")}`,{signal:t,headers:{[this.coingeckoApiKeyHeaderName]:null!==(a=this.apiKey)&&void 0!==a?a:""}});return n}catch(e){const t=["Error fetching token prices from coingecko"];return e.isAxiosError?void 0!==(null===(n=e.response)||void 0===n?void 0:n.status)&&t.push(`with status ${null===(o=e.response)||void 0===o?void 0:o.status}`):t.push(e),Promise.reject(t.join(" "))}}fetchNative({signal:e}={}){var t;let a;!function(e){e.ETH="ethereum",e.MATIC="matic-network",e.XDAI="xdai"}(a||(a={}));let n=a.ETH;return 137===this.chainId&&(n=a.MATIC),100===this.chainId&&(n=a.XDAI),w.default.get(`${this.urlNative}${n}`,{signal:e,headers:{[this.coingeckoApiKeyHeaderName]:null!==(t=this.apiKey)&&void 0!==t?t:""}}).then((({data:e})=>e[n])).catch((e=>{var t;const a=["Error fetching native token from coingecko"];return e.isAxiosError?(null===(t=e.response)||void 0===t?void 0:t.status)&&a.push(`with status ${e.response.status}`):a.push(e),Promise.reject(a.join(" "))})).finally((()=>{}))}find(e){const t=Ne(e,this.chainId);if(!this.prices[t]){if(0===Object.keys(this.prices).length)for(const e of this.baseTokenAddresses)this.prices[e]=this.debouncer.fetch(e).then((t=>t[e]));if(t===Te(this.chainId).Addresses.nativeAsset.toLowerCase())return this.nativePrice||(this.prices[t]=this.fetchNative()),this.prices[t];this.prices[t]=this.debouncer.fetch(t).then((e=>e[t]))}return this.prices[t]}async findBy(e,t){if("address"==e)return this.find(t)}platform(e){switch(e){case 1:case 5:case 42:case 31337:return"ethereum";case 100:return"xdai";case 137:return"polygon-pos";case 250:return"fantom";case 1101:return"polygon-zkevm";case 8453:return"base";case 42161:return"arbitrum-one";case 43114:return"avalanche"}return"2"}}class ap{constructor(e=1,t){this.chainId=e,this.prices={},this.urlBase=`${qi(null==t?void 0:t.isDemoApiKey)}coins/${this.platform(e)}/contract/%TOKEN_ADDRESS%/market_chart/range?vs_currency=usd`,this.apiKey=null==t?void 0:t.coingeckoApiKey,this.coingeckoApiKeyHeaderName=Gi(null==t?void 0:t.isDemoApiKey)}async fetch(e,t,{signal:a}={}){var n,o;const i=this.urlRange(e,t);try{const{data:e}=await w.default.get(i,{signal:a,headers:{[this.coingeckoApiKeyHeaderName]:null!==(n=this.apiKey)&&void 0!==n?n:""}});return e}catch(e){if(e.isAxiosError)throw new Error("Error fetching historical token prices from coingecko - "+e.message+" - "+(null===(o=e.response)||void 0===o?void 0:o.statusText));throw new Error("Unknown Error: "+e)}}async find(e){throw"Historic price requires point-in-time timestamp, please use findBy(address, timestamp)"}async findBy(e,t){const a=Ne(e,this.chainId);return{usd:`${(await this.fetch(a,t)).prices[0][1]}`}}platform(e){switch(e){case 1:case 5:case 42:case 31337:return"ethereum";case 137:return"polygon-pos";case 42161:return"arbitrum-one";case 100:return"xdai"}return"2"}urlRange(e,t){const a=t-3600,n=t+3600;return`${this.urlBase.replace("%TOKEN_ADDRESS%",e)}&from=${a}&to=${n}`}}class np{constructor(e,t=1){this.subgraphUrl=e,this.chainId=t,this.prices={},this.debouncer=new Ve(this.fetch.bind(this),200)}async fetch(e,{signal:t}={}){return e.length,w.default.post(this.subgraphUrl,{variables:{addresses:e},query:"query($addresses: [String!]) {\n tokens(\n where: {\n id_in: $addresses\n }\n ) {\n address\n latestUSDPrice\n }\n }"},{signal:t}).then((e=>e.data.data)).then((({tokens:e})=>Object.fromEntries(e.map((e=>[e.address,{usd:e.latestUSDPrice||void 0}]))))).finally((()=>{e.length}))}async find(e){const t=Ne(e,this.chainId);return this.prices[t]||(this.prices[t]=this.debouncer.fetch(t).then((e=>e[t]))),this.prices[t]}async findBy(e,t){if("address"==e)return this.find(t)}}class op{constructor(e,t,a){this.coingeckoRepository=e,this.subgraphRepository=t,this.aaveRates=a}async find(e){let t;try{if(t=await this.coingeckoRepository.find(e),!(null==t?void 0:t.usd))throw new Error("Price not found")}catch(a){j.getInstance().warn(a),t=await this.subgraphRepository.find(e)}const a=await this.aaveRates.getRate(e)||1;return t&&t.usd?{...t,usd:(parseFloat(t.usd)*a).toString()}:t}async findBy(e,t){if("address"===e)return this.find(t);throw`Token price search by ${e} not implemented`}}class ip{constructor(e,t){this.coingeckoRepository=e,this.aaveRates=t}async find(e){return this.findBy(e,Math.floor(Date.now()/1e3))}async findBy(e,t){const a=await this.coingeckoRepository.findBy(e,t),n=await this.aaveRates.getRate(e)||1;return a&&a.usd?{...a,usd:(parseFloat(a.usd)*n).toString()}:a}}const sp=["function claimTokens(address user, address[] tokens) returns (uint256[])","function claimToken(address user, address token) returns (uint256)"],rp=new e.Interface(["function getTokensDistributedInWeek(address token, uint timestamp) view returns (uint)","function claimTokens(address user, address[] tokens) returns (uint256[])","function claimToken(address user, address token) returns (uint256)"]),pp=new e.Interface(["function totalSupply() view returns (uint)"]);class lp{constructor(e,t,a,n,o,i){this.multicall=e,this.feeDistributorAddress=t,this.balAddress=a,this.veBalAddress=n,this.bbAUsdAddress=o,this.feeDistributor=((e,t)=>new y.Contract(e,sp,t))(t,i)}async fetch(e){const t=this.getPreviousWeek(e),a=[{target:this.feeDistributorAddress,callData:rp.encodeFunctionData("getTokensDistributedInWeek",[n.getAddress(this.balAddress),t])},{target:this.feeDistributorAddress,callData:rp.encodeFunctionData("getTokensDistributedInWeek",[n.getAddress(this.bbAUsdAddress),t])},{target:this.veBalAddress,callData:pp.encodeFunctionData("totalSupply",[])}],[,o]=await this.multicall.callStatic.aggregate(a);return{balAmount:parseFloat(Be(o[0],18)),bbAUsdAmount:parseFloat(Be(o[1],18)),veBalSupply:parseFloat(Be(o[2],18)),bbAUsdPrice:parseFloat("1.0"),balAddress:this.balAddress}}async multicallData(e){return this.data||(this.data=await this.fetch(e)),this.data}getPreviousWeek(e){const t=new Date(e);t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0);let a=t.getUTCDay()-4;return a<0&&(a+=7),a+=7,Math.floor(t.getTime()/1e3)-86400*a}async getClaimableBalances(e,t){try{const a=await this.feeDistributor.callStatic.claimTokens(e,t);return this.extractTokenBalance(t,a)}catch(e){return{}}}claimBalances(e,t){return rp.encodeFunctionData("claimTokens",[e,t])}extractTokenBalance(e,t){return e.reduce(((e,n,o)=>{var i;return e[n]=null!==(i=t[o])&&void 0!==i?i:a.BigNumber.from(0),e}),{})}}const dp=new e.Interface(["function getProtocolFeesCollector() view returns (address)"]),up=new e.Interface(["function getSwapFeePercentage() view returns (uint)"]);let cp;class yp{constructor(e,t){this.provider=t,this.vault=new y.Contract(e,dp,this.provider)}async fetch(){const e=await this.vault.getProtocolFeesCollector(),t=new y.Contract(e,up,this.provider),a=await t.getSwapFeePercentage();return parseFloat(Be(a,18))}async find(){return cp||(cp=this.fetch()),this.swapFeePercentage=await cp,this.swapFeePercentage}async findBy(){return this.find()}}const bp=new e.Interface(["function getSwapFeePercentage() view returns (uint)"]);let mp;class fp{constructor(e,t){this.multicall=e,this.protocolFeePercentagesProviderAddress=t}async fetch(){const e=[{target:this.protocolFeePercentagesProviderAddress,callData:bp.encodeFunctionData("getFeeTypePercentage",[0])},{target:this.protocolFeePercentagesProviderAddress,callData:bp.encodeFunctionData("getFeeTypePercentage",[2])}],[,t]=await this.multicall.callStatic.aggregate(e);return{swapFee:parseFloat(Be(t[0],18)),yieldFee:parseFloat(Be(t[2],18))}}async getFees(){return mp||(mp=this.fetch()),this.protocolFees=await mp,this.protocolFees}}class Tp{constructor(e="https://yield-tokens.balancer.workers.dev/"){this.url=e}async fetch(){let e={};try{e=(await w.default.get(this.url)).data}catch(e){j.getInstance().warn(`Failed to fetch yield tokens: ${e}`)}return e}async find(e){const t=e.toLocaleLowerCase();return this.yields||(this.yields=this.fetch()),this.yields.then((e=>e[t]&&e[t]>0?e[t]:0))}async findBy(e,t){return"address"!=e?0:this.find(t)}}const hp=e=>`{\n blocks(first: 1, orderBy: timestamp, orderDirection: asc, where: { timestamp_gt: ${e} }) {\n number\n }\n}`,Ip=async(e,t)=>{const a={query:hp(t)},n=await w.default.post(e,a),{data:{blocks:o}}=n.data;return parseInt(o[0].number)};class gp{constructor(e){this.endpoint=e,this.blocks={}}async find(e){if("dayAgo"==e){const e=""+(Math.floor(Date.now()/1e3)-86400);return this.blocks[e]||(this.blocks={...this.blocks,[e]:Ip(this.endpoint,e)}),this.blocks[e]}}async findBy(e="",t=""){}}var _p=[{chainId:1,address:"0x8888801af4d980682e47f1a9036e589479e835c5",symbol:"mph"},{chainId:1,address:"0x27054b13b1b798b345b591a4d22e6562d47ea75a",symbol:"ast"},{chainId:1,address:"0x3301ee63fb29f863f2333bd4466acb46cd8323e6",symbol:"akita"},{chainId:1,address:"0x616e8bfa43f920657b3497dbf40d6b1a02d4608d",symbol:"aurabal"},{chainId:1,address:"0xc0c293ce456ff0ed870add98a0828dd4d2903dbf",symbol:"aura"},{chainId:1,address:"0x3472a5a71965499acd81997a54bba8d852c6e53d",symbol:"badger"},{chainId:1,address:"0xba100000625a3754423978a60c9317c58a424e3d",symbol:"bal"},{chainId:1,address:"0x804cdb9116a10bb78768d3252355a1b18067bf8f",symbol:"bb-a-dai"},{chainId:1,address:"0x9210f1204b5a24742eba12f710636d76240df3d0",symbol:"bb-a-usdc"},{chainId:1,address:"0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c",symbol:"bb-a-usdt"},{chainId:1,address:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2",symbol:"bb-a-usd"},{chainId:1,address:"0x2d94aa3e47d9d5024503ca8491fce9a2fb4da198",symbol:"bank"},{chainId:1,address:"0x0d8775f648430679a709e98d2b0cb6250d2887ef",symbol:"bat"},{chainId:1,address:"0xf17e65822b568b3903685a7c9f496cf7656cc6c2",symbol:"bico"},{chainId:1,address:"0x799ebfabe77a6e34311eeee9825190b9ece32824",symbol:"btrst"},{chainId:1,address:"0x514910771af9ca656af840dff83e8264ecf986ca",symbol:"link"},{chainId:1,address:"0x3506424f91fd33084466f402d5d97f05f8e3b4af",symbol:"chz"},{chainId:1,address:"0x41e5560054824ea6b0732e656e3ad64e20e94e45",symbol:"cvc"},{chainId:1,address:"0xc00e94cb662c3520282e6f5717214004a7f26888",symbol:"comp"},{chainId:1,address:"0xdef1ca1fb7fbcdc777520aa7f396b4e015f497ab",symbol:"cow"},{chainId:1,address:"0xd533a949740bb3306d119cc777fa900ba034cd52",symbol:"crv"},{chainId:1,address:"0x6b175474e89094c44da98b954eedeac495271d0f",symbol:"dai"},{chainId:1,address:"0xf2051511b9b121394fa75b8f7d4e7424337af687",symbol:"haus"},{chainId:1,address:"0x888888435fde8e7d4c54cab67f206e4199454c60",symbol:"dfx"},{chainId:1,address:"0x798d1be841a82a273720ce31c822c61a67a601c3",symbol:"digg"},{chainId:1,address:"0xf629cbd94d3791c9250152bd8dfbdf380e2a3b9c",symbol:"enj"},{chainId:1,address:"0xc18360217d8f7ab5e7c516566761ea12ce7f9d72",symbol:"ens"},{chainId:1,address:"0x4e15361fd6b4bb609fa63c81a2be19d873717870",symbol:"ftm"},{chainId:1,address:"0x956f47f50a910163d8bf957cf5846d573e7f87ca",symbol:"fei"},{chainId:1,address:"0xed1480d12be41d92f36f5f7bdd88212e381a3677",symbol:"fdt"},{chainId:1,address:"0x586aa273f262909eef8fa02d90ab65f5015e0516",symbol:"fiat"},{chainId:1,address:"0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",symbol:"gtc"},{chainId:1,address:"0x900db999074d9277c5da2a43f252d74366230da0",symbol:"giv"},{chainId:1,address:"0x6810e776880c02933d47db1b9fc05908e5386b96",symbol:"gno"},{chainId:1,address:"0xba485b556399123261a5f9c95d413b4f93107407",symbol:"graviaura"},{chainId:1,address:"0x3ec8798b81485a254928b70cda1cf0a2bb0b74d7",symbol:"gro"},{chainId:1,address:"0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",symbol:"snx"},{chainId:1,address:"0x5a98fcbea516cf06857215779fd812ca3bef1b32",symbol:"ldo"},{chainId:1,address:"0x6dea81c8171d0ba574754ef6f8b412f2ed88c54d",symbol:"lqty"},{chainId:1,address:"0x5f98805a4e8be255a32880fdec7f6728c6568ba0",symbol:"lusd"},{chainId:1,address:"0x965d79f1a1016b574a62986e13ca8ab04dfdd15c",symbol:"m2"},{chainId:1,address:"0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",symbol:"mkr"},{chainId:1,address:"0xd084944d3c05cd115c09d072b9f44ba3e0e45921",symbol:"fold"},{chainId:1,address:"0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0",symbol:"matic"},{chainId:1,address:"0xa3bed4e1c75d00fa6f4e5e6922db7261b5e9acd2",symbol:"mta"},{chainId:1,address:"0x4b13006980acb09645131b91d259eaa111eaf5ba",symbol:"myc"},{chainId:1,address:"0x333a4823466879eef910a04d473505da62142069",symbol:"nation"},{chainId:1,address:"0xcfeaead4947f0705a14ec42ac3d44129e1ef3ed5",symbol:"note"},{chainId:1,address:"0x967da4048cd07ab37855c090aaf366e4ce1b9f48",symbol:"ocean"},{chainId:1,address:"0x64aa3364f17a4d01c6f1751fd97c2bd3d7e7f1d5",symbol:"ohm"},{chainId:1,address:"0xab846fb6c81370327e784ae7cbb6d6a6af6ff4bf",symbol:"pal"},{chainId:1,address:"0xcafe001067cdef266afb7eb5a286dcfd277f3de5",symbol:"psp"},{chainId:1,address:"0x68037790a0229e9ce6eaa8a99ea92964106c4703",symbol:"par"},{chainId:1,address:"0x45804880de22913dafe09f4980848ece6ecbaf78",symbol:"paxg"},{chainId:1,address:"0x89ab32156e46f46d02ade3fecbe5fc4243b9aaed",symbol:"pnt"},{chainId:1,address:"0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec",symbol:"poly"},{chainId:1,address:"0x43d4a3cd90ddd2f8f4f693170c9c8098163502ad",symbol:"d2d"},{chainId:1,address:"0xeb4c2781e4eba804ce9a9803c67d0893436bb27d",symbol:"renbtc"},{chainId:1,address:"0x408e41876cccdc0f92210600ef50372656052a38",symbol:"ren"},{chainId:1,address:"0xfb5453340c03db5ade474b27e68b6a9c6b2823eb",symbol:"robot"},{chainId:1,address:"0xd33526068d116ce69f19a9ee46f0bd304f21a51f",symbol:"rpl"},{chainId:1,address:"0xae78736cd615f374d3085123a210448e74fc6393",symbol:"reth"},{chainId:1,address:"0xfe18be6b3bd88a2d2a7f928d00292e7a9963cfc6",symbol:"sbtc"},{chainId:1,address:"0x476c5e26a75bd202a9683ffd34359c0cc15be0ff",symbol:"srm"},{chainId:1,address:"0x35e78b3982e87ecfd5b3f3265b601c046cdbe232",symbol:"xai"},{chainId:1,address:"0x3affcca64c2a6f4e3b6bd9c64cd2c969efd1ecbe",symbol:"dsla"},{chainId:1,address:"0xf24d8651578a55b0c119b9910759a351a3458895",symbol:"sdbal"},{chainId:1,address:"0x11c1a6b3ed6bb362954b29d3183cfa97a0c806aa",symbol:"str"},{chainId:1,address:"0x8f693ca8d21b157107184d29d398a8d082b38b76",symbol:"data"},{chainId:1,address:"0x470ebf5f030ed85fc1ed4c2d36b9dd02e77cf1b7",symbol:"temple"},{chainId:1,address:"0xa36fdbbae3c9d55a1d67ee5821d53b50b63a1ab9",symbol:"temp"},{chainId:1,address:"0xdac17f958d2ee523a2206206994597c13d831ec7",symbol:"usdt"},{chainId:1,address:"0x9c4a4204b79dd291d6b6571c5be8bbcd0622f050",symbol:"tcr"},{chainId:1,address:"0x226f7b842e0f0120b7e194d05432b3fd14773a9d",symbol:"unn"},{chainId:1,address:"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",symbol:"uni"},{chainId:1,address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",symbol:"usdc"},{chainId:1,address:"0x81f8f0bb1cb2a06649e51913a151f0e7ef6fa321",symbol:"vita"},{chainId:1,address:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",symbol:"weth"},{chainId:1,address:"0xedb171c18ce90b633db442f2a6f72874093b49ef",symbol:"wampl"},{chainId:1,address:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",symbol:"wbtc"},{chainId:1,address:"0xf203ca1769ca8e9e8fe1da9d147db68b6c919817",symbol:"wncg"},{chainId:1,address:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",symbol:"wsteth"},{chainId:1,address:"0x79c71d3436f39ce382d0f58f1b011d88100b9d91",symbol:"xns"},{chainId:1,address:"0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e",symbol:"yfi"},{chainId:1,address:"0xbcca60bb61934080951369a648fb03df4f96263c",symbol:"ausdc"},{chainId:1,address:"0x028171bca77440897b824ca71d1c56cac55b68a3",symbol:"adai"},{chainId:1,address:"0x3ed3b47dd13ec9a98b44e6204a523e766b225811",symbol:"ausdt"},{chainId:137,address:"0x9c2c5fd7b07e95ee044ddeba0e97a665f142394f",symbol:"1inch"},{chainId:137,address:"0xd6df932a45c0f255f85145f286ea0b292b21c90b",symbol:"aave"},{chainId:137,address:"0xc3fdbadc7c795ef1d6ba111e06ff8f16a20ea539",symbol:"addy"},{chainId:137,address:"0xf84bd51eab957c2e7b7d646a3427c5a50848281d",symbol:"agar"},{chainId:137,address:"0x033d942a6b495c4071083f4cde1f17e986fe856c",symbol:"aga"},{chainId:137,address:"0x0e9b89007eee9c958c0eda24ef70723c2c93dd58",symbol:"amaticc"},{chainId:137,address:"0x034b2090b579228482520c589dbd397c53fc51cc",symbol:"vision"},{chainId:137,address:"0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b",symbol:"avax"},{chainId:137,address:"0x49690541e3f6e933a9aa3cffee6010a7bb5b72d7",symbol:"axiav3"},{chainId:137,address:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",symbol:"bal"},{chainId:137,address:"0xdb7cb471dd0b49b29cab4a1c14d070f27216a0ab",symbol:"bank"},{chainId:137,address:"0xfbdd194376de19a88118e84e279b977f165d01b8",symbol:"bifi"},{chainId:137,address:"0xd6ca869a4ec9ed2c7e618062cdc45306d8dbbc14",symbol:"btc2x-fli-p"},{chainId:137,address:"0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39",symbol:"link"},{chainId:137,address:"0x172370d5cd63279efa6d502dab29171933a610af",symbol:"crv"},{chainId:137,address:"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",symbol:"dai"},{chainId:137,address:"0x1d607faa0a51518a7728580c238d912747e71f7a",symbol:"data"},{chainId:137,address:"0x85955046df4668e1dd369d2de9f3aeb98dd2a369",symbol:"dpi"},{chainId:137,address:"0xe7804d91dfcde7f776c90043e03eaa6df87e6395",symbol:"dfx"},{chainId:137,address:"0xf28164a485b0b2c90639e47b0f377b4a438a16b1",symbol:"dquick"},{chainId:137,address:"0x45c32fa6df82ead1e2ef74d17b76547eddfaff89",symbol:"frax"},{chainId:137,address:"0x50b728d8d964fd00c2d0aad81718b71311fef68a",symbol:"snx"},{chainId:137,address:"0x72928d5436ff65e57f72d5566dcd3baedc649a88",symbol:"hdao"},{chainId:137,address:"0x3ad707da309f3845cd602059901e39c4dcd66473",symbol:"eth2x-fli-p"},{chainId:137,address:"0x4f025829c4b13df652f38abd2ab901185ff1e609",symbol:"ieth-fli-p"},{chainId:137,address:"0x340f412860da7b7823df372a2b59ff78b7ae6abc",symbol:"imatic-fli-p"},{chainId:137,address:"0xf287d97b6345bad3d88856b26fb7c0ab3f2c7976",symbol:"matic2x-fli-p"},{chainId:137,address:"0x130ce4e4f76c2265f94a961d70618562de0bb8d2",symbol:"ibtc-fli-p"},{chainId:137,address:"0x596ebe76e2db4470966ea395b0d063ac6197a8c5",symbol:"jrt"},{chainId:137,address:"0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4",symbol:"stmatic"},{chainId:137,address:"0xf501dd45a1198c2e1b5aef5314a68b9006d842e0",symbol:"mta"},{chainId:137,address:"0xeaecc18198a475c921b24b8a6c1c1f0f5f3f7ea0",symbol:"seed"},{chainId:137,address:"0xfe712251173a2cd5f5be2b46bb528328ea3565e1",symbol:"mvi"},{chainId:137,address:"0xa3fa99a148fa48d14ed51d610c367c61876997f1",symbol:"mimatic"},{chainId:137,address:"0xa486c6bc102f409180ccb8a94ba045d39f8fc7cb",symbol:"nex"},{chainId:137,address:"0xe2aa7db6da1dae97c5f5c6914d285fbfcc32a128",symbol:"par"},{chainId:137,address:"0x580a84c73811e1839f75d86d75d88cca0c241ff4",symbol:"qi"},{chainId:137,address:"0x831753dd7087cac61ab5644b308642cc1c33dc13",symbol:"quick"},{chainId:137,address:"0xb5c064f955d8e7f38fe0460c556a72987494ee17",symbol:"quick"},{chainId:137,address:"0x00e5646f60ac6fb446f621d146b6e1886f002905",symbol:"rai"},{chainId:137,address:"0x431cd3c9ac9fc73644bf68bf5691f4b83f9e104f",symbol:"rbw"},{chainId:137,address:"0xdbf31df14b66535af65aac99c32e9ea844e14501",symbol:"renbtc"},{chainId:137,address:"0x501ace9c35e60f03a2af4d484f49f9b1efde9f40",symbol:"solace"},{chainId:137,address:"0xfa68fb4628dff1028cfec22b4162fccd0d45efb6",symbol:"maticx"},{chainId:137,address:"0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a",symbol:"sushi"},{chainId:137,address:"0xdf7837de1f2fa4631d716cf2502f8b230f1dcc32",symbol:"tel"},{chainId:137,address:"0xe6469ba6d2fd6130788e0ea9c0a0515900563b59",symbol:"ust"},{chainId:137,address:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",symbol:"usdt"},{chainId:137,address:"0x5fe2b58c013d7601147dcdd68c143a77499f5531",symbol:"grt"},{chainId:137,address:"0xbbba073c31bf03b8acf7c28ef0738decf3695683",symbol:"sand"},{chainId:137,address:"0x2934b36ca9a4b31e633c5be670c8c8b28b6aa015",symbol:"thx"},{chainId:137,address:"0x2f800db0fdb5223b3c3f354886d907a671414a7f",symbol:"bct"},{chainId:137,address:"0x2e1ad108ff1d8c782fcbbb89aad783ac49586756",symbol:"tusd"},{chainId:137,address:"0x3809dcdd5dde24b37abe64a5a339784c3323c44f",symbol:"swap"},{chainId:137,address:"0x7fbc10850cae055b27039af31bd258430e714c62",symbol:"ubt"},{chainId:137,address:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",symbol:"usdc"},{chainId:137,address:"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",symbol:"weth"},{chainId:137,address:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",symbol:"wmatic"},{chainId:137,address:"0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",symbol:"wbtc"},{chainId:137,address:"0x24834bbec7e39ef42f4a75eaf8e5b6486d3f0e57",symbol:"lunc"},{chainId:137,address:"0xf153eff70dc0bf3b085134928daeea248d9b30d0",symbol:"xmark"},{chainId:42161,address:"0x9f20de1fc9b161b34089cbeae888168b44b03461",symbol:"arbis"},{chainId:42161,address:"0x040d1edc9569d4bab2d15287dc5a4f10f56a56b8",symbol:"bal"},{chainId:42161,address:"0x031d35296154279dc1984dcd93e392b1f946737b",symbol:"cap"},{chainId:42161,address:"0xf97f4df75117a78c1a5a0dbb814af92458539fb4",symbol:"link"},{chainId:42161,address:"0x354a6da3fcde098f8389cad84b0182725c6c91de",symbol:"comp"},{chainId:42161,address:"0xf4d48ce3ee1ac3651998971541badbb9a14d7234",symbol:"cream"},{chainId:42161,address:"0x11cdb42b0eb46d95f990bedd4695a6e3fa034978",symbol:"crv"},{chainId:42161,address:"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1",symbol:"dai"},{chainId:42161,address:"0x8038f3c971414fd1fc220ba727f2d4a0fc98cb65",symbol:"dht"},{chainId:42161,address:"0xf0b5ceefc89684889e5f7e0a7775bd100fcd3709",symbol:"dusd"},{chainId:42161,address:"0x6c2c06790b3e3e3c38e12ee22f8183b37a13ee55",symbol:"dpx"},{chainId:42161,address:"0x32eb7902d4134bf98a28b963d26de779af92a212",symbol:"rdpx"},{chainId:42161,address:"0xc3ae0333f0f34aa734d5493276223d95b8f9cb37",symbol:"dxd"},{chainId:42161,address:"0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a",symbol:"gmx"},{chainId:42161,address:"0xa0b862f60edef4452f25b4160f177db44deb6cf1",symbol:"gno"},{chainId:42161,address:"0xb965029343d55189c25a7f3e0c9394dc0f5d41b1",symbol:"ndx"},{chainId:42161,address:"0x539bde0d7dbd336b79148aa742883198bbf60342",symbol:"magic"},{chainId:42161,address:"0x4e352cf164e64adcbad318c3a1e222e9eba4ce42",symbol:"mcb"},{chainId:42161,address:"0x3f56e0c36d275367b8c502090edf38289b3dea0d",symbol:"mimatic"},{chainId:42161,address:"0x965772e0e9c84b6f359c8597c891108dcf1c5b1a",symbol:"pickle"},{chainId:42161,address:"0x6694340fc020c5e6b96567843da2df01b2ce1eb6",symbol:"stg"},{chainId:42161,address:"0xd4d42f0b6def4ce0383636770ef773390d85c61a",symbol:"sushi"},{chainId:42161,address:"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",symbol:"usdt"},{chainId:42161,address:"0x23a941036ae778ac51ab04cea08ed6e2fe103614",symbol:"grt"},{chainId:42161,address:"0xa72159fc390f0e3c6d415e658264c7c4051e9b87",symbol:"tcr"},{chainId:42161,address:"0x4d15a3a2286d883af0aa1b3f21367843fac63e07",symbol:"tusd"},{chainId:42161,address:"0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0",symbol:"uni"},{chainId:42161,address:"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",symbol:"usdc"},{chainId:42161,address:"0xa684cd057951541187f288294a1e1c2646aa2d24",symbol:"vsta"},{chainId:42161,address:"0x64343594ab9b56e99087bfa6f2335db24c2d1f17",symbol:"vst"},{chainId:42161,address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",symbol:"weth"},{chainId:42161,address:"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f",symbol:"wbtc"},{chainId:42161,address:"0x82e3a8f066a6989666b031d916c43672085b1582",symbol:"yfi"}];class xp{constructor(e,t,a,n,o){if(this.pools=new jr({url:e.urls.subgraph,chainId:e.chainId,query:n}),this.poolsForSimulations=new Ri(Ei(e.urls.subgraph),t,e,void 0,n),this.poolsOnChain=new Xr(this.pools,{provider:t,multicall:e.addresses.contracts.multicall,vault:e.addresses.contracts.vault},e.poolsToIgnore,e.multicallBatchSize),this.poolShares=new Qr(e.urls.subgraph,e.chainId),this.poolJoinExits=new Zr(e.urls.subgraph,e.chainId),e.urls.gaugesSubgraph&&(this.poolGauges=new Yr(e.urls.gaugesSubgraph,e.chainId),this.gaugeShares=new Nr(e.urls.gaugesSubgraph,e.chainId)),e.urls.blockNumberSubgraph){this.blockNumbers=new gp(e.urls.blockNumberSubgraph);const t=async()=>{if(this.blockNumbers)return await this.blockNumbers.find("dayAgo")};this.yesterdaysPools=new jr({url:e.urls.subgraph,chainId:e.chainId,blockHeight:t,query:n})}else if(e.averageBlockTime){const a=async()=>await t.getBlockNumber()-Math.round(86400/(e.averageBlockTime||2));this.yesterdaysPools=new jr({url:e.urls.subgraph,chainId:e.chainId,blockHeight:a,query:n})}const i=_p.filter((t=>t.chainId==e.chainId)).map((e=>e.address)),s=new tp(i,e.chainId,o),r=new np(e.urls.subgraph,e.chainId),p=new Re(a.contracts.multicall,e.chainId);this.tokenPrices=new op(s,r,p);const l=new ap(e.chainId,o);this.tokenHistoricalPrices=new ip(l,p),this.tokenMeta=new ep([]),e.urls.gaugesSubgraph&&(this.liquidityGauges=new qr(e.urls.gaugesSubgraph,a.contracts.multicall,e.addresses.contracts.gaugeController||"",e.chainId,e.addresses.contracts.gaugeControllerCheckpointer)),e.addresses.contracts.feeDistributor&&e.addresses.tokens.bal&&e.addresses.tokens.veBal&&e.addresses.tokens.bbaUsd&&(this.feeDistributor=new lp(a.contracts.multicall,e.addresses.contracts.feeDistributor,e.addresses.tokens.bal,e.addresses.tokens.veBal,e.addresses.tokens.bbaUsd,t)),this.feeCollector=new yp(e.addresses.contracts.vault,t),e.addresses.contracts.protocolFeePercentagesProvider&&(this.protocolFees=new fp(a.contracts.multicall,e.addresses.contracts.protocolFeePercentagesProvider)),this.tokenYields=new Tp,e.addresses.contracts.gyroConfigProxy&&(this.gyroConfigRepository=new kr(e.addresses.contracts.gyroConfigProxy,a.contracts.multicall,t))}}const Pp=(e,t)=>"Stable"===e?exports.PoolKind.LEGACY_STABLE:"ComposableStable"===e&&1===t?exports.PoolKind.COMPOSABLE_STABLE:"ComposableStable"===e?exports.PoolKind.COMPOSABLE_STABLE_V2:exports.PoolKind.WEIGHTED,wp=ps.encodeSetRelayerApproval,Ep=ps.encodeGaugeWithdraw,Ap=ps.encodeGaugeDeposit,Sp=ps.encodePeekChainedReferenceValue,vp=It.createInterface(),kp=(e,t)=>{var a;return(null===(a=e.poolType)||void 0===a?void 0:a.match(/.*Linear.*/))?Bp(e,t):[]},Bp=(e,t)=>{if(!(e.id&&t.id&&e.tokens&&t.tokens&&e.mainIndex&&t.mainIndex))throw"Missing tokens";const a=e.tokens[e.mainIndex];return[{poolId:e.id,assetIn:e.address,assetOut:a.address},{poolId:t.id,assetIn:a.address,assetOut:t.address}]},Cp=async(e,t)=>{const a=await t.find(e);if(!a)throw`Pool ${e} not found`;const n=async(e,a)=>{let o=[{address:e}];const i=await t.findBy("address",e);if(i&&e!=a){const t=i.tokens.sort(Op),a=await Promise.all(t.map((({address:e})=>n(e,i.address))));o=[{address:e,id:i.id,poolType:i.poolType,poolTypeVersion:i.poolTypeVersion,mainIndex:i.mainIndex,tokens:a.flat()}]}return o},o=a.tokens.sort(Op);return{id:e,address:a.address,tokens:(await Promise.all(o.map((({address:e})=>n(e,a.address))))).flat(),poolType:a.poolType,poolTypeVersion:a.poolTypeVersion,mainIndex:a.mainIndex}},Op=(e,t)=>e.address.toLowerCase()>t.address.toLowerCase()?1:-1,Mp=(e,n,o,i,s,r,p=!1,l,d,u)=>{if(!(s.id&&r.id&&s.tokens&&r.tokens&&s.poolType&&r.poolType))throw"Pool data is missing";const c=s.tokens.flatMap((({address:e})=>e)),y=r.tokens.flatMap((({address:e})=>e)),b="ComposableStable"==s.poolType&&1==s.poolTypeVersion?0:-1;let m,f=[];b>-1?(m=[{index:b,key:ps.toChainedReference(`10${b}`)}],f=[ps.toChainedReference(`20${b}`)]):(m=c.map(((e,t)=>({index:t,key:ps.toChainedReference(`10${t}`)}))),f=c.map(((e,t)=>ps.toChainedReference(`20${t}`))));const T=ps.toChainedReference("999"),h=[];let I=!1;"ComposableStable"===s.poolType&&(I=!0),u&&h.push(wp(n,!0,u)),l&&h.push(Ep(l,e,n,o)),h.push(((e,t,a,n,o=-1,i,s,r,p,l=!0)=>{let d;const u="ComposableStable"===t&&1===a;d=o>-1?A.exitExactBPTInForOneTokenOut(s,o):(u?C.exitExactBPTInForAllTokensOut:A.exitExactBPTInForTokensOut)(s);const c=Pp(t,a);return ps.encodeExitPool({poolId:e,poolKind:c,sender:r,recipient:p,outputReferences:i,exitPoolRequest:{assets:n,minAmountsOut:new Array(n.length).fill("0"),userData:d,toInternalBalance:l}})})(s.id,s.poolType,s.poolTypeVersion||1,c,b,m,o,l?n:e,n));const g=((e,t,a)=>{const n=({tokens:e,mainIndex:t})=>e&&t&&e[t].address||"",o=e.flatMap(n),i=t.flatMap(n),s=o.map(((e,t)=>e&&[t,i.indexOf(e)]||[-1,-1])).map((([a,n])=>{if(-1===a||-1===n)return[];const o=e[a],i=t[n];return kp(o,i)}));return a>-1?[s[a]]:s})(s.tokens,r.tokens,b);if(g.flat().length>0){const e=g.map(((e,t)=>({path:e,inputAmount:String(m[t].key),outputReference:f[t]}))).filter((({path:e})=>e.length>0));h.push(((e,n,o,i,s=!0)=>{const r=[],p=[],l=[],d=[];o.forEach((e=>{const{path:a,inputAmount:n,outputReference:o}=e;for(let e=0;er.address!=e)).map((e=>{var t;const a=c.indexOf(e);return String(I&&f[a]||(null===(t=m[a])||void 0===t?void 0:t.key)||0)}));h.push(((e,a,n,o,i,s,r,p,l,d=!0)=>{const u=o.map((()=>t.MaxInt256)),c=A.joinExactTokensInForBPTOut(i,s),y=Pp(a,n);return ps.encodeJoinPool({poolId:e,kind:y,sender:p,recipient:l,joinPoolRequest:{assets:o,maxAmountsIn:u,userData:c,fromInternalBalance:d},value:"0",outputReference:r})})(r.id,r.poolType,r.poolTypeVersion||1,y,_,i,String(T),n,d?n:e,!0)),!0===p&&h.push(Sp(String(T))),d&&h.push(Ap(d,n,e,String(T)));return vp.encodeFunctionData("multicall",[h])};class Fp{constructor({relayerAddress:e,poolsRepository:t,gaugesRepository:a,provider:n}){this.getExpectedBptOut=Fp.getExpectedBptOut,this.relayerAddress=e,this.poolsRepository=t,this.gaugesRepository=a,this.provider=n}async pool2pool({user:e,from:t,to:a,balance:n,minBptOut:o="0",authorisation:i}){const s=await Cp(t,this.poolsRepository),r=await Cp(a,this.poolsRepository),p=Mp(e,this.relayerAddress,String(n),o,s,r,"0"==o,void 0,void 0,i);return{to:this.relayerAddress,data:p}}async pool2poolWithGauges({user:e,from:t,to:a,balance:n,minBptOut:o="0",authorisation:i}){const s=await this.gaugesRepository.findBy("poolId",t),r=await this.gaugesRepository.findBy("poolId",a);if(!(s&&s.poolId&&r&&r.poolId))throw new Error("Gauge not found");const p=await Cp(s.poolId,this.poolsRepository),l=await Cp(r.poolId,this.poolsRepository),d=Mp(e,this.relayerAddress,String(n),o,p,l,"0"==o,s.id,r.id,i);return{to:this.relayerAddress,data:d}}async gauge2gauge({user:e,from:t,to:a,balance:n,authorisation:o}){const i=[Ep(t,e,this.relayerAddress,n),Ap(a,this.relayerAddress,e,n)];o&&i.unshift(wp(this.relayerAddress,!0,o));const s=vp.encodeFunctionData("multicall",[i]);return{to:this.relayerAddress,data:s}}}Fp.getExpectedBptOut=e=>{const t=vp.decodeFunctionResult("multicall",e)[0].slice(-2).filter((e=>"0x"!==e));return String(BigInt(t))};var Rp,Np;!function(e){e[e.Direct=0]="Direct",e[e.TokenIn=1]="TokenIn",e[e.TokenOut=2]="TokenOut",e[e.Middle=3]="Middle"}(Rp||(Rp={})),function(e){e[e.BatchSwap=0]="BatchSwap",e[e.Join=1]="Join",e[e.Exit=2]="Exit"}(Np||(Np={}));class Lp{constructor(e,t,a,n,o,i,s,r,p,l){const d=this.getActionStep(e,t,a,n);this.amountIn=this.getActionAmount(o,Np.BatchSwap,d,s),this.hasTokenIn=this.actionHasTokenIn(d),this.hasTokenOut=this.actionHasTokenOut(d);const u=this.hasTokenOut?i:"0";this.minOut=this.getActionMinOut(u,r);const[c,y]=this.getActionOutputRef(d,n,s);this.nextOpRefKey=y,this.opRefStart=c,this.sender=this.getSender(this.hasTokenIn,p,l),this.receiver=this.getReceiver(this.hasTokenOut,p,l)}getActionAmount(e,t,a,n){let o=e;return(a===Rp.TokenOut||a===Rp.Middle&&t===Np.Join||a===Rp.Middle&&t===Np.Exit)&&(o=ps.toChainedReference(n-1).toString()),o}getActionOutputRef(e,t,a){let n={};return e!==Rp.TokenIn&&e!==Rp.Middle||(n=this.getOutputRef(a,t),a++),[n,a]}getActionMinOut(e,t){return Ke(a.BigNumber.from(e),a.BigNumber.from(t)).toString()}getActionStep(e,t,a,n){let o;return o=a===e&&n===t?Rp.Direct:a===e?Rp.TokenIn:n===t?Rp.TokenOut:Rp.Middle,o}getOutputRef(e,t){return{index:t,key:ps.toChainedReference(e)}}getFromInternal(e,t){return!e&&!t}getToInternal(e,t){return!e&&!t}actionHasTokenIn(e){return e===Rp.Direct||e===Rp.TokenIn}actionHasTokenOut(e){return e===Rp.Direct||e===Rp.TokenOut}getSender(e,t,a){return e?t:a}getReceiver(e,t,a){return e?t:a}getPoolKind(e){let t=0;return["MetaStable","Stable","StablePhantom"].includes(e)?t=1:"ComposableStable"===e&&(t=3),t}}class Dp extends Lp{constructor(e,t,a,n,o,i,s,r){var p;super(t,a,e.assetInIndex,e.assetOutIndex,e.amount,null!==(p=e.returnAmount)&&void 0!==p?p:"0",n,i,s,r),this.opRefKey=n,this.type=Np.Exit,this.poolId=e.poolId,this.tokenOut=o[e.assetOutIndex],this.toInternalBalance=this.getToInternal(this.hasTokenOut),this.opRef=this.opRefStart}callData(e,t){const a=e.tokensList,n=new Y(t),[o]=n.sortTokens(a),i=this.tokenOut,s=o.findIndex((e=>e.toLowerCase()===i.toLowerCase())),r=Array(a.length).fill("0");r[s]=this.minOut;const p=this.amountIn,l={assets:o,minAmountsOut:r,userData:S.exitExactBPTInForOneTokenOut(p,s),toInternalBalance:this.toInternalBalance,poolId:this.poolId,poolKind:this.getPoolKind(e.poolType),sender:this.sender,recipient:this.receiver,outputReferences:this.opRef.key?[this.opRef]:[],exitPoolRequest:{}},d=ps.formatExitPoolInput(l);return{params:l,encoded:ps.encodeExitPool(d)}}getAmountIn(){return this.hasTokenIn?this.amountIn:"0"}getAmountOut(){return this.hasTokenOut?this.minOut:"0"}}class Up extends Lp{constructor(e,t,a,n,o,i,s,r){var p;super(t,a,e.assetInIndex,e.assetOutIndex,e.amount,null!==(p=e.returnAmount)&&void 0!==p?p:"0",n,i,s,r),this.opRefKey=n,this.type=Np.Join,this.poolId=e.poolId,this.tokenIn=o[e.assetInIndex],this.fromInternal=this.getFromInternal(this.hasTokenIn),this.opRef=this.opRefStart}callData(e,t){const a=e.tokensList,n=new Y(t),[o]=n.sortTokens(a),i=this.tokenIn,s=o.findIndex((e=>e.toLowerCase()===i.toLowerCase())),r=Array(a.length).fill("0");r[s]=this.amountIn;const p=this.minOut,l=S.joinExactTokensInForBPTOut(r,p),d={poolId:this.poolId,sender:this.sender,recipient:this.receiver,kind:this.getPoolKind(e.poolType),joinPoolRequest:{assets:o,maxAmountsIn:r,userData:l,fromInternalBalance:this.fromInternal},value:"0",outputReference:this.opRef.key?this.opRef.key.toString():"0"};return{params:d,encoded:ps.encodeJoinPool(d)}}getAmountIn(){return this.hasTokenIn?this.amountIn:"0"}getAmountOut(){return this.hasTokenOut?this.minOut:"0"}}class Vp extends Lp{constructor(e,t,a,n,o,i,s,r,p){var l;super(t,a,e.assetInIndex,e.assetOutIndex,e.amount,null!==(l=e.returnAmount)&&void 0!==l?l:"0",n,i,r,p),this.mainTokenInIndex=t,this.mainTokenOutIndex=a,this.opRefKey=n,this.assets=o,this.slippage=i,this.pools=s,this.user=r,this.relayer=p,this.approveTokens=[],this.opRef=[],this.type=Np.BatchSwap,this.swaps=[{...e,amount:this.amountIn}];const d=this.isBpt(s,o[e.assetInIndex]);d&&this.approveTokens.push(o[e.assetInIndex]),this.fromInternal=this.getFromInternal(this.hasTokenIn,d);const u=this.isBpt(s,o[e.assetOutIndex]);this.toInternal=this.getToInternal(this.hasTokenOut,u),this.limits=this.getLimits(o,e.assetInIndex,e.assetOutIndex,e.amount,this.hasTokenIn,this.hasTokenOut,this.minOut),this.opRefStart.index&&this.opRef.push(this.opRefStart)}getLimits(e,n,o,i,s,r,p){const l=e.map((()=>a.BigNumber.from(0)));return l[n]=s?a.BigNumber.from(i):t.MaxInt256,r&&(l[o]=a.BigNumber.from(p).mul(-1)),l}updateLimits(e,t){t.hasTokenIn&&(e[t.swaps[0].assetInIndex]=e[t.swaps[0].assetInIndex].add(t.amountIn)),t.hasTokenOut&&(e[t.swaps[0].assetOutIndex]=e[t.swaps[0].assetOutIndex].sub(t.minOut))}isChainedSwap(e){return this.opRef[this.swaps.length-1]&&this.toInternal===e.fromInternal&&this.receiver===e.sender&&this.opRef[this.swaps.length-1].key.toString()===e.amountIn}canAddSwap(e){return!!this.isChainedSwap(e)||e.fromInternal===this.fromInternal&&e.toInternal===this.toInternal&&e.receiver===this.receiver&&e.sender===this.sender}callData(){const e=[];for(const a of this.approveTokens){const n=ps.encodeApproveVault(a,t.MaxUint256.toString());e.push(n)}const n={sender:this.sender,recipient:this.receiver,fromInternalBalance:this.fromInternal,toInternalBalance:this.toInternal},o={swapType:exports.SwapType.SwapExactIn,swaps:this.swaps,assets:this.assets,funds:n,limits:this.limits.map((e=>e.toString())),deadline:a.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:this.opRef},i=ps.encodeBatchSwap(o);return e.push(i),{params:o,encoded:e}}getAmountIn(){return this.limits[this.mainTokenInIndex].toString()}getAmountOut(){return this.limits[this.mainTokenOutIndex].abs().toString()}copy(){return new Vp(this.swaps[0],this.mainTokenInIndex,this.mainTokenOutIndex,this.opRefKey,this.assets,this.slippage,this.pools,this.user,this.relayer)}addSwap(e){const t=this.isChainedSwap(e);this.swaps.push(e.swaps[0]),this.approveTokens=[...new Set([...this.approveTokens,...e.approveTokens])],this.toInternal=e.toInternal,this.receiver=e.receiver,this.hasTokenOut=e.hasTokenOut,this.minOut=e.minOut,this.opRef=[...this.opRef,...e.opRef],t||(this.amountIn=a.BigNumber.from(this.amountIn).add(e.amountIn).toString()),this.updateLimits(this.limits,e)}isBpt(e,t){return e.some((e=>e.address.toLowerCase()===t.toLowerCase()))}}function qp(e){const t=function(e){const t=[],a=[],n=[];for(const o of e)o.type===Np.Exit||o.type===Np.Join?o.hasTokenIn?t.push(o):o.hasTokenOut?a.push(o):n.push(o):n.push(o);return[...t,...n,...a]}(e);return function(e){const t=[];let a;for(const n of e)n.type===Np.BatchSwap?a?a.canAddSwap(n)?a.addSwap(n):(t.push(a),a=n.copy()):a=n.copy():(a&&(t.push(a),a=void 0),t.push(n));return a&&t.push(a),t}(t)}const Gp=new e.Interface([{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"address",name:"libraryAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getLibrary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}]);function Wp(e){j.getInstance()}function Hp(e,t,a){if("Weighted"!==a)return!1;const n=t[e.assetOutIndex],o=R(e.poolId);return n.toLowerCase()===o.toLowerCase()}function Kp(e,t,a){if("Weighted"!==a)return!1;const n=t[e.assetInIndex],o=R(e.poolId);return n.toLowerCase()===o.toLowerCase()}Object.defineProperty(exports,"PoolFilter",{enumerable:!0,get:function(){return p.PoolFilter}}),Object.defineProperty(exports,"SOR",{enumerable:!0,get:function(){return p.SOR}}),Object.defineProperty(exports,"SwapTypes",{enumerable:!0,get:function(){return p.SwapTypes}}),Object.defineProperty(exports,"stableBPTForTokensZeroPriceImpact",{enumerable:!0,get:function(){return p.stableBPTForTokensZeroPriceImpact}}),Object.defineProperty(exports,"weightedBPTForTokensZeroPriceImpact",{enumerable:!0,get:function(){return p.weightedBPTForTokensZeroPriceImpact}}),exports.AMP_PRECISION=3,exports.APR_THRESHOLD=1e4,exports.AaveLinearPoolFactory__factory=rt,exports.AaveLinearPool__factory=it,exports.AaveRates=Re,exports.AaveWrapping__factory=lt,exports.AssetHelpers=Y,exports.Authoriser__factory=ut,exports.BALANCER_NETWORK_CONFIG=ka,exports.BalancerAPIArgsFormatter=tt,exports.BalancerError=Oa,exports.BalancerErrors=Z,exports.BalancerHelpers__factory=yt,exports.BalancerMinterAuthorization=ae,exports.BalancerMinter__factory=mt,exports.BalancerPoolDataQueries__factory=Tt,exports.BalancerRelayer__factory=It,exports.BalancerSDK=class{constructor(e,t=new Hi(e),a=new ls(e)){this.config=e,this.sor=t,this.subgraph=a;j.getInstance().setLoggingEnabled(!!e.enableLogging),this.networkConfig=Li(e),this.provider=t.provider,this.balancerContracts=new fs(this.networkConfig.addresses.contracts,t.provider),this.data=new xp(this.networkConfig,t.provider,this.balancerContracts,e.subgraphQuery,e.coingecko),this.swaps=new is(this.config),this.relayer=new ps,this.pricing=new ds(e,this.swaps),this.pools=new pr(this.networkConfig,this.data,this.balancerContracts),this.data.liquidityGauges&&(this.claimService=new Fn(this.data.liquidityGauges,this.data.feeDistributor,this.networkConfig.chainId,this.contracts.multicall,this.networkConfig.addresses.contracts.gaugeClaimHelper,this.networkConfig.addresses.contracts.balancerMinter),this.migrationService=new Fp({relayerAddress:this.networkConfig.addresses.contracts.balancerRelayer,poolsRepository:this.data.pools,gaugesRepository:this.data.liquidityGauges.subgraph,provider:this.provider})),this.vaultModel=new Gs(this.data.poolsForSimulations,this.networkConfig.addresses.tokens.wrappedNativeAsset)}get contracts(){return this.balancerContracts.contracts}},exports.BasePoolEncoder=E,exports.BatchRelayerLibrary__factory=_t,exports.BlockNumberRepository=gp,exports.CoingeckoHistoricalPriceRepository=ap,exports.CoingeckoPriceRepository=tp,exports.ComposableStablePoolEncoder=C,exports.ComposableStablePoolFactory__factory=Et,exports.ComposableStablePool__factory=Pt,exports.ConvergentCurvePool__factory=St,exports.Data=xp,exports.Debouncer=Ve,exports.ERC20__factory=kt,exports.ERC4626LinearPoolFactory__factory=Mt,exports.ERC4626LinearPool__factory=Ct,exports.EulerLinearPoolFactory__factory=Lt,exports.EulerLinearPool__factory=Rt,exports.FXPool__factory=Ut,exports.FeeCollectorRepository=yp,exports.FeeDistributorRepository=lp,exports.GaugeClaimHelper__factory=qt,exports.GaugeControllerMulticallRepository=Or,exports.GaugeSharesRepository=Nr,exports.GearboxLinearPoolFactory__factory=Kt,exports.GearboxLinearPool__factory=Wt,exports.GraphQLArgsBuilder=nt,exports.GyroConfig__factory=Jt,exports.GyroEV2__factory=Ia,exports.HistoricalPriceProvider=ip,exports.LidoRelayer__factory=Xt,exports.LinearPool__factory=zt,exports.Liquidity=An,exports.LiquidityGaugeSubgraphRPCProvider=qr,exports.LiquidityGaugeV5__factory=Qt,exports.LiquidityGaugesMulticallRepository=Ur,exports.LiquidityGaugesSubgraphRepository=Vr,exports.ManagedPoolEncoder=v,exports.Migrations=Fp,exports.Multicall3__factory=na,exports.Multicall__factory=ta,exports.POOLS=function(e){return V[e]?V[e]:U},exports.PoolGaugesRepository=Yr,exports.PoolJoinExitRepository=Zr,exports.PoolSharesRepository=Qr,exports.Pools=pr,exports.PoolsBalancerAPIRepository=class{constructor(e){var t,a;this.pools=[],this.skip=0,this.hasFetched=!1,this.isFetching=!1,this.client=new Gr(e.url,e.apiKey);this.query={args:Object.assign({},(null===(t=e.query)||void 0===t?void 0:t.args)||{chainId:1,orderBy:"totalLiquidity",orderDirection:"desc",where:{swapEnabled:{eq:!0},totalShares:{gt:.05}}}),attrs:Object.assign({},(null===(a=e.query)||void 0===a?void 0:a.attrs)||{id:!0,address:!0})},delete this.query.args.skip}fetchFromCache(e,t){return this.pools.slice(t,e+t)}async fetch(e){const t=(null==e?void 0:e.first)||10,a=(null==e?void 0:e.skip)||0;return this.hasFetched||this.fetchAll(e),await this.awaitEnoughPoolsFetched(t,a),this.fetchFromCache(t,a)}async fetchAll(e){this.isFetching=!0,this.hasFetched=!0,this.nextToken&&(this.query.args.nextToken=this.nextToken),this.query.args.first=1e3;const t=new nt(this.query.args).format(new tt),a=this.query.attrs;a.nextToken=!0;const n={pools:{__args:t,...a}},o=(await this.client.get(n)).pools;if(this.nextToken=o.nextToken,this.pools=this.pools.concat(o.pools.map(this.format)),this.nextToken)return await this.fetchAll(e);this.isFetching=!1}async awaitEnoughPoolsFetched(e,t){for(let a=0;a<1e3;a++){if(this.pools.length>e+t)return;if(!this.isFetching)return;await Wr(10)}}async find(e){return 0==this.pools.length&&await this.fetch(),this.findBy("id",e)}async findBy(e,t){0==this.pools.length&&await this.fetch();const a=this.pools.find((a=>a[e]==t));if(a)return this.format(a)}format(e){var t,a,n,o;if(null===(t=e.apr)||void 0===t?void 0:t.rewardAprs.breakdown){const t=JSON.parse(null===(a=e.apr)||void 0===a?void 0:a.rewardAprs.breakdown);e.apr.rewardAprs.breakdown=t}if(null===(n=e.apr)||void 0===n?void 0:n.tokenAprs.breakdown){const t=JSON.parse(null===(o=e.apr)||void 0===o?void 0:o.tokenAprs.breakdown);e.apr.tokenAprs.breakdown=t}return e}},exports.PoolsFallbackRepository=class{constructor(e,t={}){this.providers=e,this.currentProviderIdx=0,this.timeout=t.timeout||1e4}async fetch(e){return this.fallbackQuery("fetch",[e])}get currentProvider(){if(this.providers.length&&!(this.currentProviderIdx>=this.providers.length))return this.providers[this.currentProviderIdx]}async find(e){return this.fallbackQuery("find",[e])}async findBy(e,t){return this.fallbackQuery("findBy",[e,t])}async fallbackQuery(e,t){if(this.currentProviderIdx>=this.providers.length)throw new Error("No working providers found");let a;try{const n=this.providers[this.currentProviderIdx];a=await Promise.race([n[e].apply(n,t),new Promise(((e,t)=>setTimeout((()=>t(new Error("timeout"))),this.timeout)))])}catch(n){const o=n.message;if("timeout"===o){j.getInstance().warn("Provider "+this.currentProviderIdx+" timed out, falling back to next provider")}else{const e=j.getInstance();e.warn(`Provider ${this.currentProviderIdx} failed with error, falling back to next provider.`),e.warn(o)}this.currentProviderIdx++,a=await this.fallbackQuery.call(this,e,t)}return a}},exports.PoolsStaticRepository=class{constructor(e){this.pools=e}async find(e){return this.pools.find((t=>t.id.toLowerCase()===e.toLowerCase()))}async findBy(e,t){return this.pools.find((a=>a[e]===t))}async all(){return this.pools}async where(e){return(await this.all()).filter(e)}},exports.PoolsSubgraphOnChainRepository=Xr,exports.PoolsSubgraphRepository=jr,exports.ProtocolFeesProvider=fp,exports.Relayer=ps,exports.RelayerAuthorization=te,exports.SHALLOW_COMPOSABLE_STABLE_BUFFER=1e6,exports.Sor=Hi,exports.StablePoolEncoder=A,exports.StablePool__factory=ia,exports.StaticATokenRateProvider__factory=ra,exports.StaticTokenPriceProvider=class{constructor(e){this.tokenPrices=Object.fromEntries(Object.entries(e).map((([e,t])=>[e.toLowerCase(),t])))}async find(e){const t=e.toLowerCase(),a=this.tokenPrices[t];if(a)return a}async findBy(e,t){if("address"==e)return this.find(t)}},exports.StaticTokenProvider=ep,exports.Subgraph=ls,exports.SubgraphArgsFormatter=at,exports.SubgraphPriceRepository=np,exports.Swaps=is,exports.TokenPriceProvider=op,exports.TokenYieldsRepository=Tp,exports.Vault__factory=la,exports.VeBal__factory=_a,exports.VeDelegationProxy__factory=Pa,exports.WeightedPoolEncoder=S,exports.WeightedPoolFactory__factory=ya,exports.WeightedPool__factory=ua,exports.YearnLinearPoolFactory__factory=Ta,exports.YearnLinearPool__factory=ma,exports.accountToAddress=Q,exports.addSlippage=$e,exports.addressMapIn=Le,exports.balEmissions=ws,exports.bn=e=>a.parseFixed(`${e}`,18),exports.buildRelayerCalls=function(e,t,n,o,i,s,r){const p=function(e,t,a,n,o,i,s,r){var p;const l=n.findIndex((t=>t.toLowerCase()===e.toLowerCase())),d=n.findIndex((e=>e.toLowerCase()===t.toLowerCase())),u=[];let c=0;for(const e of a){const t=null===(p=i.find((t=>t.id===e.poolId)))||void 0===p?void 0:p.poolType;if(Hp(e,n,t)){const t=new Up(e,l,d,c,n,o,s,r);c=t.nextOpRefKey,u.push(t)}else{if(!Kp(e,n,t)){const t=new Vp(e,l,d,c,n,o,i,s,r);c=t.nextOpRefKey,u.push(t);continue}{const t=new Dp(e,l,d,c,n,o,s,r);c=t.nextOpRefKey,u.push(t)}}}return u}(e.tokenIn,e.tokenOut,e.swaps,e.tokenAddresses,s,t,n,o),l=qp(p),d=[],u=[];r&&d.push(ps.encodeSetRelayerApproval(o,!0,r));for(const e of l){if(e.type===Np.Exit||e.type===Np.Join){const a=t.find((t=>t.id===e.poolId));if(void 0===a)throw new Oa(exports.BalancerErrorCode.NO_POOL_DATA);const{params:n,encoded:o}=e.callData(a,i);d.push(o),u.push(n)}if(e.type===Np.BatchSwap){const{params:t,encoded:a}=e.callData();d.push(...a),u.push(t)}}return function(e,t,n,o){const i=e.reduce(((e=a.BigNumber.from(0),t)=>e.add(t))),s=t.reduce(((e=a.BigNumber.from(0),t)=>e.add(t)));Wp(i.toString()),Wp(n.swapAmount.toString()),Wp(s.toString()),Wp(Ke(n.returnAmount,a.BigNumber.from(o)).toString()),Wp(n.returnAmount.toString());const r=s.sub(Ke(n.returnAmount,a.BigNumber.from(o)));if(!i.eq(n.swapAmount)||!r.lt("3"))throw new Oa(exports.BalancerErrorCode.RELAY_SWAP_AMOUNTS)}(l.map((e=>a.BigNumber.from(e.getAmountIn()))),l.map((e=>a.BigNumber.from(e.getAmountOut()))),e,s),{to:o,data:Gp.encodeFunctionData("multicall",[d]),rawCalls:d,inputs:u}},exports.canUseJoinExit=function(e,a,n){return e!==p.SwapTypes.SwapExactOut&&a.toLowerCase()!==t.AddressZero.toLowerCase()&&n.toLowerCase()!==t.AddressZero.toLowerCase()},exports.factories=Ea,exports.fetchOnChainPoolData=Mi,exports.findEventInReceiptLogs=Qe,exports.formatFixed=Ge,exports.formatFromBigInt18=function(e){return a.formatFixed(a.BigNumber.from(e),18)},exports.getEthValue=Ue,exports.getLimitsForSlippage=Aa,exports.getOnChainBalances=Fi,exports.getPoolAddress=R,exports.getPoolNonce=L,exports.getPoolSpecialization=N,exports.getRandomBytes32=et,exports.insert=je,exports.isLinearish=Ze,exports.isNormalizedWeights=e=>{const a=e.reduce(((e,t)=>e.add(t)),t.Zero);return a.eq(t.WeiPerEther)},exports.isSameAddress=Je,exports.mulSlippage=He,exports.parseFixed=qe,exports.parsePoolInfo=be,exports.parseToBigInt18=function(e){return qe(e,18).toBigInt()},exports.removeItem=Ye,exports.reorderArrays=ze,exports.replace=Xe,exports.signPermit=async(e,n,i,s,r=t.MaxUint256,p)=>{const{chainId:l}=await e.provider.getNetwork(),d=await n.getAddress();p||(p=await e.nonces(d));const u={name:await e.name(),version:"1",chainId:l,verifyingContract:e.address},c={owner:d,spender:await Q(i),value:s,nonce:p,deadline:r},y=await n._signTypedData(u,{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},c);return{...o.splitSignature(y),deadline:a.BigNumber.from(r),nonce:a.BigNumber.from(p)}},exports.someJoinExit=function(e,t,a){return t.some((t=>function(e,t,a){const n=e.find((e=>e.id===t.poolId));return"Weighted"===(null==n?void 0:n.poolType)&&[a[t.assetInIndex],a[t.assetOutIndex]].includes(n.address)}(e,t,a)))},exports.splitPoolId=e=>({address:R(e),specialization:N(e),nonce:L(e)}),exports.subSlippage=Ke,exports.toNormalizedWeights=function(e){if(100==e.length)return Array(100).fill(t.WeiPerEther.div(100));const a=e.reduce(((e,t)=>e.add(t)),t.Zero);if(a.eq(t.WeiPerEther))return e;const n=[];let o=t.Zero;for(let i=0;i{e.price&&(t[e.address]=e.price)})),t},exports.truncateAddresses=function(e){return e.map((e=>`${e.slice(0,6)}...${e.slice(38,42)}`))},exports.unwrapToken=De,exports.wrappedTokensMap=Me,exports.yieldTokens=Oe; +//# sourceMappingURL=index.js.map diff --git a/package/dist/index.js.map b/package/dist/index.js.map new file mode 100644 index 000000000..b86c92ca2 --- /dev/null +++ b/package/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../src/pool-base/encoder.ts","../../src/pool-stable/encoder.ts","../../src/pool-weighted/encoder.ts","../../src/pool-composable-stable/encoder.ts","../node_modules/tiny-invariant/dist/esm/tiny-invariant.js","../../src/pool-utils/poolId.ts","../../src/lib/constants/network.ts","../../src/lib/constants/pools.ts","../../src/modules/data/pool-gauges/types.ts","../../src/modules/data/pool-shares/types.ts","../../src/modules/data/gauge-shares/types.ts","../../src/types.ts","../../src/lib/utils/logger.ts","../../src/lib/utils/assetHelpers.ts","../../src/lib/utils/errors.ts","../../src/lib/utils/signatures.ts","../../src/lib/utils/permit.ts","../../src/lib/utils/solidityMaths.ts","../../src/lib/utils/poolHelper.ts","../../src/lib/constants/tokens.ts","../node_modules/@ethersproject/logger/lib.esm/index.js","../node_modules/@ethersproject/logger/lib.esm/_version.js","../node_modules/@ethersproject/units/lib.esm/_version.js","../node_modules/@ethersproject/units/lib.esm/index.js","../../src/modules/data/token-prices/aave-rates.ts","../../src/lib/utils/tokens.ts","../../src/lib/utils/debouncer.ts","../../src/lib/utils/math.ts","../../src/lib/utils/slippageHelper.ts","../../src/lib/utils/index.ts","../../src/lib/graphql/formatters/balancer-api.ts","../../src/lib/graphql/formatters/subgraph.ts","../../src/lib/graphql/args-builder.ts","../../src/contracts/factories/AaveLinearPool__factory.ts","../../src/contracts/factories/AaveLinearPoolFactory__factory.ts","../../src/contracts/factories/AaveWrapping__factory.ts","../../src/contracts/factories/Authoriser__factory.ts","../../src/contracts/factories/BalancerHelpers__factory.ts","../../src/contracts/factories/BalancerMinter__factory.ts","../../src/contracts/factories/BalancerPoolDataQueries__factory.ts","../../src/contracts/factories/BalancerRelayer__factory.ts","../../src/contracts/factories/BatchRelayerLibrary__factory.ts","../../src/contracts/factories/ComposableStablePool__factory.ts","../../src/contracts/factories/ComposableStablePoolFactory__factory.ts","../../src/contracts/factories/ConvergentCurvePool__factory.ts","../../src/contracts/factories/ERC20__factory.ts","../../src/contracts/factories/ERC4626LinearPool__factory.ts","../../src/contracts/factories/ERC4626LinearPoolFactory__factory.ts","../../src/contracts/factories/EulerLinearPool__factory.ts","../../src/contracts/factories/EulerLinearPoolFactory__factory.ts","../../src/contracts/factories/FXPool__factory.ts","../../src/contracts/factories/GaugeClaimHelper__factory.ts","../../src/contracts/factories/GearboxLinearPool__factory.ts","../../src/contracts/factories/GearboxLinearPoolFactory__factory.ts","../../src/contracts/factories/GyroConfig__factory.ts","../../src/contracts/factories/LidoRelayer__factory.ts","../../src/contracts/factories/LinearPool__factory.ts","../../src/contracts/factories/LiquidityGaugeV5__factory.ts","../../src/contracts/factories/Multicall__factory.ts","../../src/contracts/factories/Multicall3__factory.ts","../../src/contracts/factories/StablePool__factory.ts","../../src/contracts/factories/StaticATokenRateProvider__factory.ts","../../src/contracts/factories/Vault__factory.ts","../../src/contracts/factories/WeightedPool__factory.ts","../../src/contracts/factories/WeightedPoolFactory__factory.ts","../../src/contracts/factories/YearnLinearPool__factory.ts","../../src/contracts/factories/YearnLinearPoolFactory__factory.ts","../../src/contracts/factories/GyroEV2__factory.ts","../../src/contracts/factories/VeBal__factory.ts","../../src/contracts/factories/VeDelegationProxy__factory.ts","../../src/modules/swaps/types.ts","../../src/modules/swaps/helpers.ts","../../src/lib/constants/config.ts","../../src/balancerErrors.ts","../../src/modules/pricing/priceImpact.ts","../../src/lib/utils/stableMathHelpers.ts","../../src/modules/pools/pool-types/concerns/stable/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/stable/exit.concern.ts","../../src/modules/pools/pool-types/concerns/stable/join.concern.ts","../../src/modules/pools/pool-types/concerns/stable/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/stable/spotPrice.concern.ts","../../src/modules/pools/pool-types/stable.module.ts","../../src/modules/pools/pool-types/concerns/stablePhantom/spotPrice.concern.ts","../../src/modules/pools/pool-types/concerns/composableStable/join.concern.ts","../../src/modules/pools/pool-types/concerns/composableStable/exit.concern.ts","../../src/modules/pools/pool-types/composableStable.module.ts","../../src/modules/pools/pool-types/concerns/weighted/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/weighted/exit.concern.ts","../../src/modules/pools/pool-types/concerns/weighted/join.concern.ts","../../src/modules/pools/pool-types/concerns/weighted/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/weighted/spotPrice.concern.ts","../../src/modules/pools/pool-types/weighted.module.ts","../../src/modules/pools/pool-types/concerns/metaStable/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/metaStable/spotPrice.concern.ts","../../src/modules/pools/pool-types/metaStable.module.ts","../../src/modules/pools/pool-types/concerns/stablePhantom/exit.concern.ts","../../src/modules/pools/pool-types/concerns/stablePhantom/join.concern.ts","../../src/modules/pools/pool-types/stablePhantom.module.ts","../../src/modules/pools/pool-types/concerns/linear/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/linear/exit.concern.ts","../../src/modules/pools/pool-types/concerns/linear/join.concern.ts","../../src/modules/pools/pool-types/concerns/linear/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/linear/spotPrice.concern.ts","../../src/modules/pools/pool-types/linear.module.ts","../../src/modules/pools/pool-types/concerns/fx/exit.concern.ts","../../src/modules/pools/pool-types/concerns/fx/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/fx/spotPrice.concern.ts","../../src/modules/pools/pool-types/concerns/fx/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/fx/join.concern.ts","../../src/modules/pools/pool-types/fx.module.ts","../../src/modules/pools/pool-types/concerns/gyro/exit.concern.ts","../../src/modules/pools/pool-types/concerns/gyro/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/gyro/spotPrice.concern.ts","../../src/modules/pools/pool-types/concerns/gyro/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/gyro/join.concern.ts","../../src/modules/pools/pool-types/gyro.module.ts","../../src/modules/pools/pool-type-concerns.ts","../../src/modules/liquidity/liquidity.module.ts","../../src/modules/claims/helper.ts","../../src/modules/claims/ClaimService.ts","../../src/modules/swaps/queryBatchSwap.ts","../node_modules/tslib/tslib.es6.js","../node_modules/graphql-tag/lib/index.js","../../src/modules/subgraph/generated/balancer-subgraph-types.ts","../../src/modules/subgraph/generated/balancer-gauges.ts","../../src/modules/subgraph/subgraph.ts","../../src/lib/utils/multiCaller3.ts","../../src/modules/data/pool/onchain-data.ts","../../src/modules/sor/pool-data/subgraphPoolDataService.ts","../../src/modules/sor/token-price/subgraphTokenPriceService.ts","../../src/modules/sdk.helpers.ts","../../src/lib/constants/poolsToIgnore.ts","../../src/modules/sor/token-price/apiTokenPriceService.ts","../../src/lib/utils/coingecko-api.ts","../../src/modules/sor/token-price/coingeckoTokenPriceService.ts","../../src/modules/sor/sor.module.ts","../../src/modules/swaps/flashSwap/index.ts","../../src/modules/swaps/swap_builder/swap_utils.ts","../../src/modules/swaps/swap_builder/swap_info_decorator.ts","../../src/modules/swaps/swap_builder/single_swap_builder.ts","../../src/modules/swaps/swap_builder/batch_swap_builder.ts","../../src/modules/swaps/swaps.module.ts","../../src/modules/relayer/types.ts","../../src/modules/relayer/relayer.module.ts","../../src/modules/subgraph/subgraph.module.ts","../../src/modules/pricing/pricing.module.ts","../../src/modules/contracts/implementations/base-pool.ts","../../src/lib/utils/multiCaller.ts","../../src/lib/utils/time.ts","../../src/modules/contracts/implementations/veBAL.ts","../../src/modules/contracts/implementations/veBAL-proxy.ts","../../src/modules/contracts/contracts.module.ts","../../src/modules/pools/impermanentLoss/impermanentLossService.ts","../../src/modules/data/bal/emissions.ts","../../src/modules/pools/apr/protocol-revenue.ts","../../src/modules/pools/fees/fees.ts","../../src/modules/pools/apr/apr.ts","../../src/modules/graph/graph.ts","../../src/pool-weighted/decoder.ts","../../src/modules/vaultModel/poolModel/join.ts","../../src/modules/vaultModel/poolModel/exit.ts","../../src/modules/vaultModel/poolModel/swap.ts","../../src/modules/vaultModel/poolModel/unwrap.ts","../../src/modules/vaultModel/poolModel/poolModel.ts","../../src/modules/vaultModel/relayer.ts","../../src/modules/vaultModel/poolSource.ts","../../src/modules/vaultModel/vaultModel.module.ts","../../src/modules/joins/joins.module.ts","../../src/lib/utils/tenderlyHelper.ts","../../src/modules/simulation/simulation.module.ts","../../src/modules/exits/exits.module.ts","../../src/modules/pools/volume/volume.ts","../../src/modules/pools/factory/composable-stable/composable-stable.factory.ts","../../src/modules/pools/factory/weighted/weighted.factory.ts","../../src/modules/pools/factory/types.ts","../../src/modules/pools/factory/linear/linear.factory.ts","../../src/modules/pools/pool-factory__factory.ts","../../src/modules/pools/queries/params_builder.ts","../../src/modules/pools/queries/get_encoder.ts","../../src/modules/pools/emissions/index.ts","../../src/modules/pools/proportional-amounts/index.ts","../../src/modules/pools/index.ts","../node_modules/@ethersproject/strings/lib.esm/_version.js","../node_modules/@ethersproject/strings/lib.esm/utf8.js","../node_modules/@ethersproject/strings/lib.esm/bytes32.js","../node_modules/js-sha3/src/sha3.js","../node_modules/@ethersproject/solidity/lib.esm/_version.js","../node_modules/@ethersproject/solidity/lib.esm/index.js","../node_modules/@ethersproject/keccak256/lib.esm/index.js","../../src/modules/data/gyro-config/repository.ts","../../src/modules/data/gauge-controller/multicall.ts","../../src/modules/subgraph/repository/abstract-subgraph-repository.ts","../../src/modules/subgraph/repository/balancer-subgraph-repository.ts","../../src/modules/subgraph/repository/gauges-subgraph-repository.ts","../../src/modules/data/gauge-shares/repository.ts","../../src/modules/data/liquidity-gauges/multicall.ts","../../src/modules/data/liquidity-gauges/subgraph.ts","../../src/modules/data/liquidity-gauges/provider.ts","../../src/modules/api/balancer-api.client.ts","../../src/modules/data/pool/balancer-api.ts","../../src/modules/data/pool/subgraph-helpers.ts","../../src/modules/data/pool/subgraph.ts","../../src/modules/data/pool/subgraphOnChain.ts","../../src/modules/data/pool-gauges/repository.ts","../../src/modules/data/pool-joinExit/types.ts","../../src/modules/data/pool-joinExit/repository.ts","../../src/modules/data/pool-shares/repository.ts","../../src/modules/data/token/static.ts","../../src/modules/data/token-prices/coingecko.ts","../../src/modules/data/token-prices/coingecko-historical.ts","../../src/modules/data/token-prices/subgraph.ts","../../src/modules/data/token-prices/provider.ts","../../src/modules/data/token-prices/historical-price-provider.ts","../../src/modules/contracts/implementations/feeDistributor.ts","../../src/modules/data/fee-distributor/repository.ts","../../src/modules/data/fee-collector/repository.ts","../../src/modules/data/protocol-fees/provider.ts","../../src/modules/data/token-yields/repository.ts","../../src/modules/data/block-number/index.ts","../../src/modules/data/index.ts","../../src/modules/relayer/actions.ts","../../src/modules/liquidity-managment/migrations/helpers.ts","../../src/modules/liquidity-managment/migrations/builder.ts","../../src/modules/liquidity-managment/migrations.ts","../../src/modules/swaps/joinExit/actions/types.ts","../../src/modules/swaps/joinExit/actions/baseAction.ts","../../src/modules/swaps/joinExit/actions/exit.ts","../../src/modules/swaps/joinExit/actions/join.ts","../../src/modules/swaps/joinExit/actions/swap.ts","../../src/modules/swaps/joinExit/actions/helpers.ts","../../src/modules/swaps/joinExit/joinAndExit.ts","../../src/modules/sdk.module.ts","../../src/modules/data/pool/fallback.ts","../../src/modules/data/pool/static.ts","../../src/modules/data/token-prices/static.ts","../../src/pool-weighted/normalizedWeights.ts"],"sourcesContent":["import { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\n\n// RECOVERY_MODE must match BasePoolUserData.RECOVERY_MODE_EXIT_KIND, the value that (Legacy)BasePool uses to detect the special exit enabled in recovery mode.\nenum BasePoolExitKind {\n RECOVERY_MODE = 255,\n}\n\nexport class BasePoolEncoder {\n /**\n * Encodes the userData parameter for exiting any Pool in recovery mode, by removing tokens in return for\n * an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n */\n static recoveryModeExit = (bptAmountIn: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [BasePoolExitKind.RECOVERY_MODE, bptAmountIn]\n );\n}\n","import { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\n\nexport enum StablePoolJoinKind {\n INIT = 0,\n EXACT_TOKENS_IN_FOR_BPT_OUT,\n TOKEN_IN_FOR_EXACT_BPT_OUT,\n}\n\nexport enum StablePhantomPoolJoinKind {\n INIT = 0,\n COLLECT_PROTOCOL_FEES,\n}\n\nexport enum StablePoolExitKind {\n EXACT_BPT_IN_FOR_ONE_TOKEN_OUT = 0,\n EXACT_BPT_IN_FOR_TOKENS_OUT,\n BPT_IN_FOR_EXACT_TOKENS_OUT,\n}\n\nexport class StablePoolEncoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Encodes the userData parameter for providing the initial liquidity to a StablePool\n * @param initialBalances - the amounts of tokens to send to the pool to form the initial balances\n */\n static joinInit = (amountsIn: BigNumberish[]): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]'],\n [StablePoolJoinKind.INIT, amountsIn]\n );\n\n /**\n * Encodes the userData parameter for collecting protocol fees for StablePhantomPool\n */\n static joinCollectProtocolFees = (): string =>\n defaultAbiCoder.encode(\n ['uint256'],\n [StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]\n );\n\n /**\n * Encodes the userData parameter for joining a StablePool with exact token inputs\n * @param amountsIn - the amounts each of token to deposit in the pool as liquidity\n * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens\n */\n static joinExactTokensInForBPTOut = (\n amountsIn: BigNumberish[],\n minimumBPT: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [StablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT, amountsIn, minimumBPT]\n );\n\n /**\n * Encodes the userData parameter for joining a StablePool with to receive an exact amount of BPT\n * @param bptAmountOut - the amount of BPT to be minted\n * @param enterTokenIndex - the index of the token to be provided as liquidity\n */\n static joinTokenInForExactBPTOut = (\n bptAmountOut: BigNumberish,\n enterTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n StablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,\n bptAmountOut,\n enterTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a StablePool by removing a single token in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n * @param enterTokenIndex - the index of the token to removed from the pool\n */\n static exitExactBPTInForOneTokenOut = (\n bptAmountIn: BigNumberish,\n exitTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n StablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,\n bptAmountIn,\n exitTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a StablePool by removing tokens in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n */\n static exitExactBPTInForTokensOut = (bptAmountIn: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [StablePoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT, bptAmountIn]\n );\n\n /**\n * Encodes the userData parameter for exiting a StablePool by removing exact amounts of tokens\n * @param amountsOut - the amounts of each token to be withdrawn from the pool\n * @param maxBPTAmountIn - the minimum acceptable BPT to burn in return for withdrawn tokens\n */\n static exitBPTInForExactTokensOut = (\n amountsOut: BigNumberish[],\n maxBPTAmountIn: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [\n StablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,\n amountsOut,\n maxBPTAmountIn,\n ]\n );\n}\n","import { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\n\nexport enum WeightedPoolJoinKind {\n INIT = 0,\n EXACT_TOKENS_IN_FOR_BPT_OUT,\n TOKEN_IN_FOR_EXACT_BPT_OUT,\n ALL_TOKENS_IN_FOR_EXACT_BPT_OUT,\n}\n\nexport enum WeightedPoolExitKind {\n EXACT_BPT_IN_FOR_ONE_TOKEN_OUT = 0,\n EXACT_BPT_IN_FOR_TOKENS_OUT,\n BPT_IN_FOR_EXACT_TOKENS_OUT,\n MANAGEMENT_FEE_TOKENS_OUT,\n}\n\nexport class WeightedPoolEncoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Encodes the userData parameter for providing the initial liquidity to a WeightedPool\n * @param initialBalances - the amounts of tokens to send to the pool to form the initial balances\n */\n static joinInit = (amountsIn: BigNumberish[]): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]'],\n [WeightedPoolJoinKind.INIT, amountsIn]\n );\n\n /**\n * Encodes the userData parameter for joining a WeightedPool with exact token inputs\n * @param amountsIn - the amounts each of token to deposit in the pool as liquidity\n * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens\n */\n static joinExactTokensInForBPTOut = (\n amountsIn: BigNumberish[],\n minimumBPT: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT, amountsIn, minimumBPT]\n );\n\n /**\n * Encodes the userData parameter for joining a WeightedPool with a single token to receive an exact amount of BPT\n * @param bptAmountOut - the amount of BPT to be minted\n * @param enterTokenIndex - the index of the token to be provided as liquidity\n */\n static joinTokenInForExactBPTOut = (\n bptAmountOut: BigNumberish,\n enterTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,\n bptAmountOut,\n enterTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for joining a WeightedPool proportionally to receive an exact amount of BPT\n * @param bptAmountOut - the amount of BPT to be minted\n */\n static joinAllTokensInForExactBPTOut = (bptAmountOut: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT, bptAmountOut]\n );\n\n /**\n * Encodes the userData parameter for exiting a WeightedPool by removing a single token in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n * @param enterTokenIndex - the index of the token to removed from the pool\n */\n static exitExactBPTInForOneTokenOut = (\n bptAmountIn: BigNumberish,\n exitTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,\n bptAmountIn,\n exitTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a WeightedPool by removing tokens in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n */\n static exitExactBPTInForTokensOut = (bptAmountIn: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT, bptAmountIn]\n );\n\n /**\n * Encodes the userData parameter for exiting a WeightedPool by removing exact amounts of tokens\n * @param amountsOut - the amounts of each token to be withdrawn from the pool\n * @param maxBPTAmountIn - the minimum acceptable BPT to burn in return for withdrawn tokens\n */\n static exitBPTInForExactTokensOut = (\n amountsOut: BigNumberish[],\n maxBPTAmountIn: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [\n WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,\n amountsOut,\n maxBPTAmountIn,\n ]\n );\n}\n\nexport class ManagedPoolEncoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Encodes the userData parameter for exiting a ManagedPool for withdrawing management fees.\n * This can only be done by the pool owner.\n */\n static exitForManagementFees = (): string =>\n defaultAbiCoder.encode(\n ['uint256'],\n [WeightedPoolExitKind.MANAGEMENT_FEE_TOKENS_OUT]\n );\n}\n","import { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\nimport { StablePhantomPoolJoinKind } from '../pool-stable/index';\n\nexport enum ComposableStablePoolJoinKind {\n INIT = 0,\n EXACT_TOKENS_IN_FOR_BPT_OUT,\n TOKEN_IN_FOR_EXACT_BPT_OUT,\n}\n\nexport enum ComposableStablePoolExitKind {\n EXACT_BPT_IN_FOR_ONE_TOKEN_OUT = 0,\n BPT_IN_FOR_EXACT_TOKENS_OUT,\n EXACT_BPT_IN_FOR_ALL_TOKENS_OUT,\n}\n\nexport class ComposableStablePoolEncoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Encodes the userData parameter for providing the initial liquidity to a ComposableStablePool\n * @param initialBalances - the amounts of tokens to send to the pool to form the initial balances\n */\n static joinInit = (amountsIn: BigNumberish[]): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]'],\n [ComposableStablePoolJoinKind.INIT, amountsIn]\n );\n\n /**\n * Encodes the userData parameter for collecting protocol fees for StablePhantomPool\n */\n static joinCollectProtocolFees = (): string =>\n defaultAbiCoder.encode(\n ['uint256'],\n [StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]\n );\n\n /**\n * Encodes the userData parameter for joining a ComposableStablePool with exact token inputs\n * @param amountsIn - the amounts each of token to deposit in the pool as liquidity\n * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens\n */\n static joinExactTokensInForBPTOut = (\n amountsIn: BigNumberish[],\n minimumBPT: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [\n ComposableStablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,\n amountsIn,\n minimumBPT,\n ]\n );\n\n /**\n * Encodes the userData parameter for joining a ComposableStablePool with to receive an exact amount of BPT\n * @param bptAmountOut - the amount of BPT to be minted\n * @param enterTokenIndex - the index of the token to be provided as liquidity\n */\n static joinTokenInForExactBPTOut = (\n bptAmountOut: BigNumberish,\n enterTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n ComposableStablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,\n bptAmountOut,\n enterTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a ComposableStablePool by removing a single token in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n * @param enterTokenIndex - the index of the token to removed from the pool\n */\n static exitExactBPTInForOneTokenOut = (\n bptAmountIn: BigNumberish,\n exitTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,\n bptAmountIn,\n exitTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a StablePool by removing tokens in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n */\n static exitExactBPTInForAllTokensOut = (bptAmountIn: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [\n ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT,\n bptAmountIn,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a ComposableStablePool by removing exact amounts of tokens\n * @param amountsOut - the amounts of each token to be withdrawn from the pool\n * @param maxBPTAmountIn - the max acceptable BPT to burn in return for withdrawn tokens\n */\n static exitBPTInForExactTokensOut = (\n amountsOut: BigNumberish[],\n maxBPTAmountIn: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [\n ComposableStablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,\n amountsOut,\n maxBPTAmountIn,\n ]\n );\n}\n","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\n\nexport { invariant as default };\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { PoolSpecialization } from '../types';\nimport invariant from 'tiny-invariant';\n\n/**\n * Splits a poolId into its components, i.e. pool address, pool specialization and its nonce\n * @param poolId - a bytes32 string of the pool's ID\n * @returns an object with the decomposed poolId\n */\nexport const splitPoolId = (\n poolId: string\n): {\n address: string;\n specialization: PoolSpecialization;\n nonce: BigNumber;\n} => {\n return {\n address: getPoolAddress(poolId),\n specialization: getPoolSpecialization(poolId),\n nonce: getPoolNonce(poolId),\n };\n};\n\n/**\n * Extracts a pool's address from its poolId\n * @param poolId - a bytes32 string of the pool's ID\n * @returns the pool's address\n */\nexport const getPoolAddress = (poolId: string): string => {\n invariant(poolId.length === 66, 'Invalid poolId length');\n return poolId.slice(0, 42);\n};\n\n/**\n * Extracts a pool's specialization from its poolId\n * @param poolId - a bytes32 string of the pool's ID\n * @returns the pool's specialization\n */\nexport const getPoolSpecialization = (poolId: string): PoolSpecialization => {\n invariant(poolId.length === 66, 'Invalid poolId length');\n\n // Only have 3 pool specializations so we can just pull the relevant character\n const specializationCode = parseInt(poolId[45]);\n invariant(specializationCode < 3, 'Invalid pool specialization');\n\n return specializationCode;\n};\n\n/**\n * Extracts a pool's nonce from its poolId\n * @param poolId - a bytes32 string of the pool's ID\n * @returns the pool's nonce\n */\nexport const getPoolNonce = (poolId: string): BigNumber => {\n invariant(poolId.length === 66, 'Invalid poolId length');\n return BigNumber.from(`0x${poolId.slice(46)}`);\n};\n","export enum Network {\n MAINNET = 1,\n GOERLI = 5,\n GÖRLI = 5,\n OPTIMISM = 10,\n GNOSIS = 100,\n POLYGON = 137,\n FANTOM = 250,\n BASE = 8453,\n ZKEVM = 1101,\n ARBITRUM = 42161,\n AVALANCHE = 43114,\n SEPOLIA = 11155111,\n}\n","import { Network } from '@/lib/constants/network';\n\n// Do not display APR values greater than this amount; they are likely to be nonsensical\n// These can arise from pools with extremely low balances (e.g., completed LBPs)\nexport const APR_THRESHOLD = 10_000;\n\n/**\n * For proportional exits from ComposableStable pools the ExactBPTInForTokensOut\n * exit type was removed. Therefore we have to use BPTInForExactTokensOut which\n * makes proportional exits using a user's total BPT balance impossible. In\n * order to 'fix' this we need to subtract a little bit from the bptIn value\n * when calculating the ExactTokensOut. The variable below is that \"little bit\".\n */\nexport const SHALLOW_COMPOSABLE_STABLE_BUFFER = 1e6; // EVM scale, so this is 1 Mwei\n\ntype FactoryType =\n | 'oracleWeightedPool'\n | 'weightedPool'\n | 'stablePool'\n | 'managedPool'\n | 'liquidityBootstrappingPool'\n | 'boostedPool'\n | 'composableStablePool';\n\ntype PoolMetadata = {\n name: string;\n hasIcon: boolean;\n};\n\nexport type NamedPools = {\n staBAL: string;\n bbAaveUSD: {\n v1: string;\n v2: string;\n };\n xMatic: {\n v1: string;\n v2: string;\n };\n stMatic: {\n v1: string;\n v2: string;\n };\n mai4: {\n mai4: string;\n maiBbaUsd: string;\n };\n veBAL: string;\n};\n\ntype Pools = {\n IdsMap: Partial;\n Pagination: {\n PerPage: number;\n PerPool: number;\n PerPoolInitial: number;\n };\n DelegateOwner: string;\n ZeroAddress: string;\n DynamicFees: {\n Gauntlet: string[];\n };\n BlockList: string[];\n ExcludedPoolTypes: string[];\n Stable: {\n AllowList: string[];\n };\n Investment: {\n AllowList: string[];\n };\n Factories: Record;\n Stakable: {\n AllowList: string[];\n };\n Metadata: Record;\n};\n\nconst POOLS_GOERLI: Pools = {\n IdsMap: {\n staBAL:\n '0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062',\n bbAaveUSD: {\n v1: '0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f',\n v2: '0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7',\n },\n veBAL: '0xf8a0623ab66f985effc1c69d05f1af4badb01b00000200000000000000000060',\n },\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [\n '0x22d398c68030ef6b1c55321cca6e0cecc5c93b2f000200000000000000000678',\n ],\n ExcludedPoolTypes: ['Element', 'AaveLinear', 'Linear', 'ERC4626Linear', 'FX'],\n Stable: {\n AllowList: [\n '0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f',\n '0xb60e46d90f2de35f7062a27d3a98749414036d5d000200000000000000000061',\n '0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062',\n '0xc957b1acceb21707b782eb8eee2ed8e20088463d000200000000000000000076',\n '0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7',\n '0x14f93df8a4e37bfdb49d2cec4789df7a010603d700000000000000000000011d',\n '0x00a62d31b6c776b6813543bc99ff265f7222dbe100000000000000000000011e',\n '0x0c925fce89a22e36ebd9b3c6e0262234e853d2f600000000000000000000019c',\n ],\n },\n Investment: {\n AllowList: [],\n },\n Factories: {\n '0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0': 'oracleWeightedPool',\n '0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9': 'weightedPool',\n '0x44afeb87c871d8fea9398a026dea2bd3a13f5769': 'stablePool',\n '0xa55f73e2281c60206ba43a3590db07b8955832be': 'stablePool', // Metastable\n '0xb48cc42c45d262534e46d5965a9ac496f1b7a830': 'liquidityBootstrappingPool',\n '0xb0c726778c3ae4b3454d85557a48e8fa502bdd6a': 'liquidityBootstrappingPool', // LBP (zero protocol fee)\n '0x41e9036ae350baedcc7107760a020dca3c0731ec': 'boostedPool',\n '0xb848f50141f3d4255b37ac288c25c109104f2158': 'composableStablePool',\n '0x94f68b54191f62f781fe8298a8a5fa3ed772d227': 'weightedPool', // weighted pool v2\n },\n Stakable: {\n AllowList: [\n '0x16faf9f73748013155b7bc116a3008b57332d1e600020000000000000000005b',\n '0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f',\n '0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062',\n '0x67f8fcb9d3c463da05de1392efdbb2a87f8599ea000200000000000000000059',\n ],\n },\n Metadata: {\n '0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: false,\n },\n },\n};\n\nconst POOLS_MAINNET: Pools = {\n IdsMap: {\n staBAL:\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063',\n bbAaveUSD: {\n v1: '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe',\n v2: '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d',\n },\n veBAL: '0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014',\n },\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: [\n 'Element',\n 'AaveLinear',\n 'Linear',\n 'ERC4626Linear',\n 'Gyro2',\n 'Gyro3',\n 'GyroE',\n 'FX',\n ],\n Stable: {\n AllowList: [\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063', // staBAL3 (DAI-USD-USDC)\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066', // WBTC-renBTC-sBTC\n '0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e', // PAR-sEUR-EURS\n '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080', // Lido Metastable\n '0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112', // Rocket Pool Metastable\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe', // Mainnet bb-a-USD\n '0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed', // wstETH/WETH #2\n '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249', // b-auraBAL-Stable (auraBal / 8020 BALETH)\n '0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d', // sdBAL Stable Pool (sdBAL / 8020 BALETH)\n '0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d', // Fiat DAO Stable Pool\n '0xf93579002dbe8046c43fefe86ec78b1112247bb80000000000000000000002bc', // USDD 3 pool\n '0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351', // MAI stable pool\n '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d', // bb-a-USD V2\n '0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b', // DOLA/INV stable pool\n ],\n },\n Investment: {\n AllowList: [\n '0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af', // iROBOT mainnet\n '0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a', // Techemy mainnet\n '0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2', // WSB-DEFI mainnet\n ],\n },\n Factories: {\n '0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0': 'oracleWeightedPool',\n '0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9': 'weightedPool',\n '0xc66ba2b6595d3613ccab350c886ace23866ede24': 'stablePool',\n '0x67d27634e44793fe63c467035e31ea8635117cd4': 'stablePool', // Metastable\n '0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de': 'liquidityBootstrappingPool', // Mainnet LBP\n '0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e': 'liquidityBootstrappingPool', // Mainnet LBP (zero protocol fee)\n '0x48767f9f868a4a7b86a90736632f6e44c2df7fa9': 'managedPool', // Mainnet Managed\n '0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2': 'boostedPool', // mainnet stablephantom\n '0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c': 'stablePool', // stable pool v2\n '0xf9ac7b9df2b3454e841110cce5550bd5ac6f875f': 'composableStablePool', // ComposableStable\n '0xcc508a455f5b0073973107db6a878ddbdab957bc': 'weightedPool', // weighted pool v2\n },\n Stakable: {\n AllowList: [\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063',\n '0x072f14b85add63488ddad88f855fda4a99d6ac9b000200000000000000000027',\n '0x0b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a',\n '0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000013',\n '0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112',\n '0x27c9f71cc31464b906e0006d4fcbc8900f48f15f00020000000000000000010f',\n '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080',\n '0x350196326aeaa9b98f1903fb5e8fc2686f85318c000200000000000000000084',\n '0x3e5fa9518ea95c3e533eb377c001702a9aacaa32000200000000000000000052',\n '0x51735bdfbfe3fc13dea8dc6502e2e958989429610002000000000000000000a0',\n '0x5d66fff62c17d841935b60df5f07f6cf79bd0f4700020000000000000000014c',\n '0x5f7fa48d765053f8dd85e052843e12d23e3d7bc50002000000000000000000c0',\n '0x702605f43471183158938c1a3e5f5a359d7b31ba00020000000000000000009f',\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe',\n '0x7edde0cb05ed19e03a9a47cd5e53fc57fde1c80c0002000000000000000000c8',\n '0x8f4205e1604133d1875a3e771ae7e4f2b086563900020000000000000000010e',\n '0x90291319f1d4ea3ad4db0dd8fe9e12baf749e84500020000000000000000013c',\n '0x96646936b91d6b9d7d0c47c496afbf3d6ec7b6f8000200000000000000000019',\n '0x96ba9025311e2f47b840a1f68ed57a3df1ea8747000200000000000000000160',\n '0xa02e4b3d18d4e6b8d18ac421fbc3dfff8933c40a00020000000000000000004b',\n '0xa6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e',\n '0xbaeec99c90e3420ec6c1e7a769d2a856d2898e4d00020000000000000000008a',\n '0xbf96189eee9357a95c7719f4f5047f76bde804e5000200000000000000000087',\n '0xe2469f47ab58cf9cf59f9822e3c5de4950a41c49000200000000000000000089',\n '0xe99481dc77691d8e2456e5f3f61c1810adfc1503000200000000000000000018',\n '0xec60a5fef79a92c741cb74fdd6bfc340c0279b01000200000000000000000015',\n '0xedf085f65b4f6c155e13155502ef925c9a756003000200000000000000000123',\n '0xefaa1604e82e1b3af8430b90192c1b9e8197e377000200000000000000000021',\n '0xf4c0dd9b82da36c07605df83c8a416f11724d88b000200000000000000000026',\n '0xf5aaf7ee8c39b651cebf5f1f50c10631e78e0ef9000200000000000000000069',\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066',\n '0x92762b42a06dcdddc5b7362cfb01e631c4d44b40000200000000000000000182',\n '0xde8c195aa41c11a0c4787372defbbddaa31306d2000200000000000000000181',\n '0x17ddd9646a69c9445cd8a9f921d4cd93bf50d108000200000000000000000159',\n '0xc45d42f801105e861e86658648e3678ad7aa70f900010000000000000000011e',\n '0x2d344a84bac123660b021eebe4eb6f12ba25fe8600020000000000000000018a',\n '0xb460daa847c45f1c4a41cb05bfb3b51c92e41b36000200000000000000000194',\n '0x5122e01d819e58bb2e22528c0d68d310f0aa6fd7000200000000000000000163',\n '0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed',\n '0xe8cc7e765647625b95f59c15848379d10b9ab4af0002000000000000000001de',\n '0x85370d9e3bb111391cc89f6de344e801760461830002000000000000000001ef',\n '0xa7ff759dbef9f3efdd1d59beee44b966acafe214000200000000000000000180',\n '0x3f7c10701b14197e2695dec6428a2ca4cf7fc3b800020000000000000000023c',\n '0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d',\n '0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d',\n '0xcfca23ca9ca720b6e98e3eb9b6aa0ffc4a5c08b9000200000000000000000274',\n '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249',\n '0x0578292cb20a443ba1cde459c985ce14ca2bdee5000100000000000000000269',\n '0x8eb6c82c3081bbbd45dcac5afa631aac53478b7c000100000000000000000270',\n '0x1b65fe4881800b91d4277ba738b567cbb200a60d0002000000000000000002cc',\n '0x99a14324cfd525a34bbc93ac7e348929909d57fd00020000000000000000030e',\n '0x9b532ab955417afd0d012eb9f7389457cd0ea712000000000000000000000338',\n '0x48607651416a943bf5ac71c41be1420538e78f87000200000000000000000327',\n '0x6a5ead5433a50472642cd268e584dafa5a394490000200000000000000000366',\n '0x0fd5663d4893ae0d579d580584806aadd2dd0b8b000200000000000000000367',\n '0x441b8a1980f2f2e43a9397099d15cc2fe6d3625000020000000000000000035f',\n '0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351',\n '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d',\n ],\n },\n Metadata: {\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: true,\n },\n '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: true,\n },\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063': {\n name: 'Balancer Stable USD',\n hasIcon: true,\n },\n '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249': {\n name: 'AuraBAL Stable Pool',\n hasIcon: false,\n },\n },\n};\n\nconst POOLS_POLYGON: Pools = {\n IdsMap: {\n xMatic: {\n v1: '0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4',\n v2: '0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c',\n },\n stMatic: {\n v1: '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366',\n v2: '0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d',\n },\n mai4: {\n mai4: '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012',\n maiBbaUsd:\n '0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e',\n },\n },\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: [\n 'Element',\n 'AaveLinear',\n 'Linear',\n 'ERC4626Linear',\n 'Gyro2',\n 'Gyro3',\n 'GyroE',\n 'FX',\n ],\n Stable: {\n AllowList: [\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012', // polygon MAI/DAI/USDC/USDT\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e', // polygon WBTC/renBTC\n '0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b', // polygon,\n '0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068', // tusd polygon\n '0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b', // dusd polygon\n '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366', // polygon staked matic\n '0xb4670d1389c758e4380c4211bcbc85342688b9c50002000000000000000003d8', // vQi,\n '0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455', // 4pool\n '0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4', // maticx metastable\n '0xb4b22bd6cdad0ab828be6f8a4086dfa54e9b373600020000000000000000058f', // Polygon tetuBAL-80BAL-20WETH\n '0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba', // tetuBAL-80BAL-20WETH V2 (with short name)\n '0x0b8319061732b34cab22445fa83b81f950e4b7ed000000000000000000000709',\n '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366',\n '0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d',\n '0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c',\n '0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e', // mai / bb-am-USD\n '0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b', // bb-am-USD\n '0xa48d164f6eb0edc68bd03b56fa59e12f24499ad10000000000000000000007c4', // ageur stable\n ],\n },\n Investment: {\n AllowList: [''],\n },\n Factories: {\n '0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0': 'oracleWeightedPool',\n '0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9': 'weightedPool',\n '0xc66ba2b6595d3613ccab350c886ace23866ede24': 'stablePool',\n '0xdae7e32adc5d490a43ccba1f0c736033f2b4efca': 'stablePool', // Metastable\n '0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de': 'liquidityBootstrappingPool', // LBP\n '0x41b953164995c11c81da73d212ed8af25741b7ac': 'liquidityBootstrappingPool', // LBP (zero protocol fee)\n '0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193': 'managedPool', // Polygon Managed\n '0xc128a9954e6c874ea3d62ce62b468ba073093f25': 'boostedPool', // polygon stablephantom\n '0xca96c4f198d343e251b1a01f3eba061ef3da73c1': 'stablePool', // stable pool v2,\n '0x136fd06fa01ecf624c7f2b3cb15742c1339dc2c4': 'composableStablePool', // ComposableStable\n '0x0e39c3d9b2ec765efd9c5c70bb290b1fcd8536e3': 'weightedPool', // weighted pool v2\n },\n Stakable: {\n AllowList: [\n '0x0297e37f1873d2dab4487aa67cd56b58e2f27875000100000000000000000002',\n '0x03cd191f589d12b0582a99808cf19851e468e6b500010000000000000000000a',\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012',\n '0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068',\n '0x10f21c9bd8128a29aa785ab2de0d044dcdd79436000200000000000000000059',\n '0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000032',\n '0x36128d5436d2d70cab39c9af9cce146c38554ff0000100000000000000000008',\n '0x5a6ae1fd70d04ba4a279fc219dfabc53825cb01d00020000000000000000020e',\n '0x614b5038611729ed49e0ded154d8a5d3af9d1d9e00010000000000000000001d',\n '0x7c9cf12d783821d5c63d8e9427af5c44bad92445000100000000000000000051',\n '0x805ca3ccc61cc231851dee2da6aabff0a7714aa7000200000000000000000361',\n '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366',\n '0xb204bf10bc3a5435017d3db247f56da601dfe08a0002000000000000000000fe',\n '0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455',\n '0xce66904b68f1f070332cbc631de7ee98b650b499000100000000000000000009',\n '0xcf354603a9aebd2ff9f33e1b04246d8ea204ae9500020000000000000000005a',\n '0xdb1db6e248d7bb4175f6e5a382d0a03fe3dcc813000100000000000000000035',\n '0xea4e073c8ac859f2994c07e627178719c8002dc00002000000000000000003dc',\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e',\n '0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4',\n '0x2dbc9ab0160087ae59474fb7bed95b9e808fa6bc0001000000000000000003db',\n '0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba',\n '0x8f9dd2064eb38e8e40f2ab67bde27c0e16ea9b080002000000000000000004ca',\n '0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b',\n '0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e',\n '0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d',\n '0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c',\n ],\n },\n Metadata: {},\n};\n\nconst POOLS_ARBITRUM: Pools = {\n IdsMap: {},\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: ['Element', 'AaveLinear', 'Linear', 'ERC4626Linear', 'FX'],\n Stable: {\n AllowList: [\n '0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012', // arbitrum\n '0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016', // arbitrum\n '0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020', // tusd arbitrum\n '0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d', // mai\n '0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f', // VST\n '0xd89746affa5483627a87e55713ec1905114394950002000000000000000000bf', // fluid stable\n '0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102', // vesta new stable\n '0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159', // stETH\n ],\n },\n Investment: {\n AllowList: [''],\n },\n Factories: {\n '0x7dfdef5f355096603419239ce743bfaf1120312b': 'weightedPool', // Arbitrum Weighted\n '0xcf0a32bbef8f064969f21f7e02328fb577382018': 'weightedPool', // Arbitrum WeightedOracle\n '0x2433477a10fc5d31b9513c638f19ee85caed53fd': 'stablePool', // Arbitrum Stable\n '0xebfd5681977e38af65a7487dc70b8221d089ccad': 'stablePool', // Arbitrum MetaStable\n '0x142b9666a0a3a30477b052962dda81547e7029ab': 'liquidityBootstrappingPool', // Arbitrum LBP (old)\n '0x1802953277fd955f9a254b80aa0582f193cf1d77': 'liquidityBootstrappingPool', // Arbitrum LBP (new)\n '0xacd615b3705b9c880e4e7293f1030b34e57b4c1c': 'managedPool', // arbitrum managed\n '0xdae7e32adc5d490a43ccba1f0c736033f2b4efca': 'boostedPool', // arbitrum stablephantom\n '0xef44d6786b2b4d544b7850fe67ce6381626bf2d6': 'stablePool', // stable pool v2\n '0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33': 'composableStablePool', // ComposableStable\n '0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c': 'weightedPool', // weighted pool v2\n },\n Stakable: {\n AllowList: [\n '0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d',\n '0x0adeb25cb5920d4f7447af4a0428072edc2cee2200020000000000000000004a',\n '0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016',\n '0x1779900c7707885720d39aa741f4086886307e9e00020000000000000000004b',\n '0x4a3a22a3e7fee0ffbb66f1c28bfac50f75546fc7000200000000000000000008',\n '0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f',\n '0x64541216bafffeec8ea535bb71fbc927831d0595000100000000000000000002',\n '0x651e00ffd5ecfa7f3d4f33d62ede0a97cf62ede2000200000000000000000006',\n '0xb28670b3e7ad27bd41fb5938136bf9e9cba90d6500020000000000000000001e',\n '0xb340b6b1a34019853cb05b2de6ee8ffd0b89a008000100000000000000000036',\n '0xb5b77f1ad2b520df01612399258e7787af63025d000200000000000000000010',\n '0xc2f082d33b5b8ef3a7e3de30da54efd3114512ac000200000000000000000017',\n '0xc61ff48f94d801c1ceface0289085197b5ec44f000020000000000000000004d',\n '0xcc65a812ce382ab909a11e434dbf75b34f1cc59d000200000000000000000001',\n '0xe1b40094f1446722c424c598ac412d590e0b3ffb000200000000000000000076',\n '0xb3028ca124b80cfe6e9ca57b70ef2f0ccc41ebd40002000000000000000000ba',\n '0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102',\n '0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159',\n '0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158',\n ],\n },\n Metadata: {},\n};\n\nconst POOLS_GNOSIS: Pools = {\n IdsMap: {},\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: [\n 'Element',\n 'AaveLinear',\n 'Linear',\n 'ERC4626Linear',\n 'FX',\n 'Gyro2',\n 'Gyro3',\n 'GyroE',\n 'HighAmpComposableStable',\n 'FX',\n ],\n Stable: {\n AllowList: [\n '0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000004',\n '0x707b7d4a1bae449d546dcab869256591bbb3d70b000000000000000000000000',\n ],\n },\n Investment: {\n AllowList: [],\n },\n Factories: {},\n Stakable: {\n AllowList: [],\n },\n Metadata: {},\n};\n\nconst POOLS_GENERIC: Pools = {\n IdsMap: {},\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: ['Element', 'AaveLinear', 'Linear', 'ERC4626Linear', 'FX'],\n Stable: {\n AllowList: [\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063',\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066',\n '0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e',\n '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080', // Lido Metastable\n '0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112', // Rocket Pool Metastable\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012', // polygon\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e', // polygon\n '0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012', // arbitrum\n '0x9f19a375709baf0e8e35c2c5c65aca676c4c7191000200000000000000000022', // polygon PAR/PAR,\n '0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016', // arbitrum\n '0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b', // polygon,\n '0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068', // tusd polygon\n '0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020', // tusd arbitrum\n '0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b', // dusd polygon\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe', // Mainnet bb-a-USD\n '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366', // staked matic\n ],\n },\n Investment: {\n AllowList: [\n '0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af', // iROBOT mainnet\n '0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a', // Techemy mainnet\n '0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2', // WSB-DEFI mainnet\n ],\n },\n Factories: {\n '0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0': 'oracleWeightedPool',\n '0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9': 'weightedPool',\n '0xc66ba2b6595d3613ccab350c886ace23866ede24': 'stablePool',\n '0x67d27634e44793fe63c467035e31ea8635117cd4': 'stablePool', // Metastable\n '0x7dfdef5f355096603419239ce743bfaf1120312b': 'weightedPool', // Arbitrum Weighted\n '0xcf0a32bbef8f064969f21f7e02328fb577382018': 'weightedPool', // Arbitrum WeightedOracle\n '0x2433477a10fc5d31b9513c638f19ee85caed53fd': 'stablePool', // Arbitrum Stable\n '0xebfd5681977e38af65a7487dc70b8221d089ccad': 'stablePool', // Arbitrum MetaStable\n '0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de': 'liquidityBootstrappingPool', // Mainnet LBP\n '0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e': 'liquidityBootstrappingPool', // Mainnet LBP (zero protocol fee)\n '0x142b9666a0a3a30477b052962dda81547e7029ab': 'liquidityBootstrappingPool', // Arbitrum LBP (old)\n '0x1802953277fd955f9a254b80aa0582f193cf1d77': 'liquidityBootstrappingPool', // Arbitrum LBP (new)\n '0x48767f9f868a4a7b86a90736632f6e44c2df7fa9': 'managedPool', // Mainnet Managed\n '0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193': 'managedPool', // Polygon Managed\n '0xacd615b3705b9c880e4e7293f1030b34e57b4c1c': 'managedPool', // arbitrum managed\n '0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2': 'boostedPool', // mainnet stablephantom\n '0xdae7e32adc5d490a43ccba1f0c736033f2b4efca': 'boostedPool', // arbitrum stablephantom\n '0xc128a9954e6c874ea3d62ce62b468ba073093f25': 'boostedPool', // polygon stablephantom\n },\n Stakable: {\n AllowList: [],\n },\n Metadata: {\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: true,\n },\n '0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: true,\n },\n '0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e': {\n name: 'Balancer Stable USD',\n hasIcon: true,\n },\n },\n};\n\nconst POOLS_MAP = {\n [Network.GOERLI]: POOLS_GOERLI,\n [Network.MAINNET]: POOLS_MAINNET,\n [Network.POLYGON]: POOLS_POLYGON,\n [Network.ARBITRUM]: POOLS_ARBITRUM,\n [Network.GNOSIS]: POOLS_GNOSIS,\n};\n\nexport function POOLS(networkId: Network): Pools {\n const id = networkId as keyof typeof POOLS_MAP;\n return POOLS_MAP[id] ? POOLS_MAP[id] : POOLS_GENERIC;\n}\n","export enum PoolGaugesAttributes {\n Id = 'id',\n Address = 'address',\n PoolId = 'poolId',\n}\n\nexport interface PoolGauges {\n preferentialGauge: {\n id: string;\n };\n gauges: {\n id: string;\n relativeWeightCap?: string | null;\n }[];\n}\n","export enum PoolShareAttributes {\n Balance = 'balance',\n Id = 'id',\n PoolId = 'poolId',\n UserAddress = 'userAddress',\n}\n\nexport interface PoolShare {\n id: string;\n userAddress: string;\n poolId: string;\n balance: string;\n}\n","export enum GaugeShareAttributes {\n Id = 'id',\n UserAddress = 'user',\n GaugeId = 'gauge',\n Balance = 'balance',\n}\n\nexport interface GaugeShare {\n id: string;\n balance: string;\n userAddress: string;\n gauge: {\n id: string;\n poolId?: string;\n isKilled: boolean;\n totalSupply: string;\n };\n}\n","import { Network } from './lib/constants/network';\nimport type { BigNumberish } from '@ethersproject/bignumber';\nimport type { Contract } from '@ethersproject/contracts';\nimport type { PoolDataService, TokenPriceService } from '@balancer-labs/sor';\nimport type {\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n JoinPoolAttributes,\n} from './modules/pools/pool-types/concerns/types';\nimport type {\n Findable,\n Searchable,\n LiquidityGauge,\n PoolAttribute,\n TokenAttribute,\n Cacheable,\n} from '@/modules/data/types';\nimport type {\n BaseFeeDistributor,\n GaugeSharesRepository,\n PoolGaugesRepository,\n PoolSharesRepository,\n ProtocolFeesProvider,\n PoolJoinExitRepository,\n} from './modules/data';\nimport type { GraphQLArgs } from './lib/graphql';\nimport type { AprBreakdown } from '@/modules/pools/apr/apr';\nimport { SubgraphPoolDataService } from '@/modules/sor/pool-data/subgraphPoolDataService';\nimport * as Queries from '@/modules/pools/queries/types';\nimport { GyroConfigRepository } from '@/modules/data/gyro-config/repository';\n\nexport * from '@/modules/data/types';\nexport { Network, AprBreakdown };\n\nexport type Address = string;\n\nexport interface BalancerSdkConfig {\n //use a known network or provide an entirely custom config\n network: Network | BalancerNetworkConfig;\n rpcUrl: string;\n //overwrite the subgraph url if you don't want to use the balancer labs maintained version\n customSubgraphUrl?: string;\n subgraphQuery?: GraphQLQuery;\n //optionally overwrite parts of the standard SOR config\n sor?: Partial;\n tenderly?: BalancerTenderlyConfig;\n enableLogging?: boolean;\n coingecko?: CoingeckoConfig;\n}\n\nexport interface BalancerTenderlyConfig {\n accessKey: string;\n user: string;\n project: string;\n blockNumber?: number;\n}\n\nexport interface BalancerSdkSorConfig {\n //use a built-in service or provide a custom implementation of a TokenPriceService\n //defaults to coingecko\n tokenPriceService: 'api' | 'coingecko' | 'subgraph' | TokenPriceService;\n //use a built-in service or provide a custom implementation of a PoolDataService\n //defaults to subgraph\n poolDataService: 'subgraph' | PoolDataService;\n //if a custom PoolDataService is provided, on chain balance fetching needs to be handled externally\n //default to true.\n fetchOnChainBalances: boolean;\n}\n\nexport interface ContractAddresses {\n vault: string;\n multicall: string;\n poolDataQueries: string;\n gaugeClaimHelper?: string;\n balancerHelpers: string;\n balancerMinter?: string;\n lidoRelayer?: string;\n balancerRelayer: string;\n gaugeController?: string;\n feeDistributor?: string;\n veBal?: string;\n veBalProxy?: string;\n protocolFeePercentagesProvider?: string;\n weightedPoolFactory?: string;\n composableStablePoolFactory?: string;\n\n aaveLinearPoolFactory?: string;\n erc4626LinearPoolFactory?: string;\n eulerLinearPoolFactory?: string;\n gearboxLinearPoolFactory?: string;\n yearnLinearPoolFactory?: string;\n\n [key: string]: string | undefined;\n}\n\nexport interface BalancerNetworkConfig {\n chainId: Network;\n addresses: {\n contracts: ContractAddresses;\n tokens: {\n wrappedNativeAsset: string;\n lbpRaisingTokens?: string[];\n stETH?: string;\n wstETH?: string;\n bal: string;\n veBal?: string;\n bbaUsd?: string;\n };\n };\n tenderly?: BalancerTenderlyConfig;\n urls: {\n subgraph: string;\n gaugesSubgraph?: string;\n blockNumberSubgraph?: string;\n };\n thirdParty: {\n coingecko: {\n nativeAssetId: string;\n platformId: string;\n };\n };\n averageBlockTime?: number; // In seconds, used if blockNumberSubgraph not set\n multicallBatchSize?: number; // Only zkEVM needs a smaller batch size of 128, defaults to 1024\n pools: {\n wETHwstETH?: PoolReference;\n };\n poolsToIgnore?: string[];\n sorConnectingTokens?: { symbol: string; address: string }[];\n sorTriPathMidPoolIds?: string[];\n}\n\nexport interface BalancerDataRepositories {\n feeDistributor?: BaseFeeDistributor;\n feeCollector: Findable;\n gaugeShares?: GaugeSharesRepository;\n gyroConfigRepository?: GyroConfigRepository;\n liquidityGauges?: Findable;\n protocolFees?: ProtocolFeesProvider;\n /**\n * Why do we need 3 different pools repositories?\n */\n pools: Findable & Searchable;\n // Does it need to be different from the pools repository?\n poolsForSimulations: SubgraphPoolDataService;\n poolGauges?: PoolGaugesRepository;\n poolJoinExits: PoolJoinExitRepository;\n // Perhaps better to use a function to get upto date balances when needed.\n poolsOnChain: Findable &\n Searchable &\n Cacheable;\n poolShares: PoolSharesRepository;\n tokenHistoricalPrices: Findable;\n tokenMeta: Findable;\n tokenPrices: Findable;\n tokenYields: Findable;\n // Replace with a swapFeeRepository, we don't need historic pools for any other reason than to get the swap fee\n yesterdaysPools?: Findable & Searchable;\n}\n\nexport type PoolReference = {\n id: string;\n address: string;\n};\n\nexport enum PoolSpecialization {\n GeneralPool = 0,\n MinimalSwapInfoPool,\n TwoTokenPool,\n}\n\n// Joins\n\nexport type JoinPoolRequest = {\n assets: string[];\n maxAmountsIn: BigNumberish[];\n userData: string;\n fromInternalBalance: boolean;\n};\n\n// Exit\n\nexport type ExitPoolRequest = {\n assets: string[];\n minAmountsOut: string[];\n userData: string;\n toInternalBalance: boolean;\n};\n\n// Balance Operations\n\nexport enum UserBalanceOpKind {\n DepositInternal = 0,\n WithdrawInternal,\n TransferInternal,\n TransferExternal,\n}\n\nexport type UserBalanceOp = {\n kind: UserBalanceOpKind;\n asset: string;\n amount: BigNumberish;\n sender: string;\n recipient: string;\n};\n\nexport enum PoolBalanceOpKind {\n Withdraw = 0,\n Deposit = 1,\n Update = 2,\n}\n\nexport type PoolBalanceOp = {\n kind: PoolBalanceOpKind;\n poolId: string;\n token: string;\n amount: BigNumberish;\n};\n\nexport interface TransactionData {\n contract?: Contract;\n function: string;\n params: string[];\n outputs?: {\n amountsIn?: string[];\n amountsOut?: string[];\n };\n}\n\nexport type Currency = 'eth' | 'usd';\n\nexport type Price = { [currency in Currency]?: string };\nexport type TokenPrices = { [address: string]: Price };\nexport type HistoricalPrices = {\n prices: [[number, number]];\n market_caps: [[number, number]];\n total_volumes: [[number, number]];\n};\n\nexport interface Token {\n address: string;\n decimals?: number;\n symbol?: string;\n price?: Price;\n}\n\nexport interface PoolToken extends Token {\n balance: string;\n priceRate?: string;\n weight?: string | null;\n isExemptFromYieldProtocolFee?: boolean;\n token?: SubPoolMeta;\n}\n\nexport interface SubPoolMeta {\n pool: SubPool | null;\n latestUSDPrice?: string;\n latestFXPrice?: string;\n}\n\nexport interface SubPool {\n id: string;\n address: string;\n poolType: PoolType;\n totalShares: string;\n mainIndex: number;\n tokens?: PoolToken[];\n}\n\nexport interface OnchainTokenData {\n balance: string;\n weight: number;\n decimals: number;\n logoURI: string | undefined;\n name: string;\n symbol: string;\n}\n\nexport interface OnchainPoolData {\n tokens: Record;\n totalSupply: string;\n decimals: number;\n swapFee: string;\n amp?: string;\n swapEnabled: boolean;\n tokenRates?: string[];\n}\n\nexport enum PoolType {\n Weighted = 'Weighted',\n Investment = 'Investment',\n Stable = 'Stable',\n ComposableStable = 'ComposableStable',\n MetaStable = 'MetaStable',\n StablePhantom = 'StablePhantom',\n LiquidityBootstrapping = 'LiquidityBootstrapping',\n Element = 'Element',\n Gyro2 = 'Gyro2',\n Gyro3 = 'Gyro3',\n GyroE = 'GyroE',\n Managed = 'Managed',\n // Linear Pools defined below all operate the same mathematically but have different factories and names in Subgraph\n AaveLinear = 'AaveLinear',\n Linear = 'Linear',\n EulerLinear = 'EulerLinear',\n ERC4626Linear = 'ERC4626Linear',\n BeefyLinear = 'BeefyLinear',\n GearboxLinear = 'GearboxLinear',\n MidasLinear = 'MidasLinear',\n ReaperLinear = 'ReaperLinear',\n SiloLinear = 'SiloLinear',\n TetuLinear = 'TetuLinear',\n YearnLinear = 'YearnLinear',\n FX = 'FX',\n}\n\nexport interface Pool {\n id: string;\n name: string;\n address: string;\n chainId: number;\n poolType: PoolType;\n poolTypeVersion: number;\n swapFee: string;\n protocolYieldFeeCache: string;\n protocolSwapFeeCache: string;\n owner?: string;\n factory?: string;\n tokens: PoolToken[];\n tokensList: string[];\n tokenAddresses?: string[];\n totalLiquidity: string;\n totalShares: string;\n totalSwapFee?: string;\n totalSwapVolume?: string;\n onchain?: OnchainPoolData;\n createTime?: number;\n mainTokens?: string[];\n wrappedTokens?: string[];\n unwrappedTokens?: string[];\n isNew?: boolean;\n volumeSnapshot?: string;\n feesSnapshot?: string;\n boost?: string;\n symbol?: string;\n swapEnabled: boolean;\n amp?: string;\n wrappedIndex?: number;\n mainIndex?: number;\n apr?: AprBreakdown;\n liquidity?: string;\n totalWeight: string;\n lowerTarget: string;\n upperTarget: string;\n priceRateProviders?: PriceRateProvider[];\n lastJoinExitInvariant?: string;\n isInRecoveryMode?: boolean;\n isPaused?: boolean;\n tokenRates?: string[];\n}\n\nexport interface PriceRateProvider {\n address: string;\n token: {\n address: string;\n };\n}\n\n/**\n * Pool use-cases / controller layer\n */\nexport interface PoolWithMethods extends Pool, Queries.ParamsBuilder {\n /**\n * Build join pool transaction parameters with exact tokens in and minimum BPT out based on slippage tolerance\n * @param joiner Account address joining pool\n * @param tokensIn Token addresses provided for joining pool (same length and order as amountsIn)\n * @param amountsIn Token amounts provided for joining pool in EVM scale\n * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildJoin: (\n joiner: string,\n tokensIn: string[],\n amountsIn: string[],\n slippage: string\n ) => JoinPoolAttributes;\n\n /**\n * Calculate price impact of bptAmount against zero price impact BPT amount.\n * @param tokenAmounts Token amounts. Needs a value for each pool token.\n * @param bptAmount BPT amount for comparison (in EVM scale).\n * @param isJoin boolean indicating if the price impact is for a join or exit.\n * @returns price impact in EVM scale.\n */\n calcPriceImpact: (\n tokenAmounts: string[],\n bptAmount: string,\n isJoin: boolean\n ) => Promise;\n\n /**\n * Build exit pool transaction parameters with exact BPT in and minimum token amounts out based on slippage tolerance\n * @param exiter Account address exiting pool\n * @param bptIn BPT provided for exiting pool in EVM scale\n * @param slippage Maximum slippage tolerance in bps. i.e. 50 = 5%\n * @param shouldUnwrapNativeAsset Indicates whether wrapped native asset should be unwrapped after exit. Defaults to false.\n * @param singleTokenOut Optional: token address that if provided will exit to given token\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildExitExactBPTIn: (\n exiter: string,\n bptIn: string,\n slippage: string,\n shouldUnwrapNativeAsset?: boolean,\n singleTokenOut?: string,\n toInternalBalance?: boolean\n ) => ExitExactBPTInAttributes;\n\n /**\n * Build exit pool transaction parameters with exact tokens out and maximum BPT in based on slippage tolerance\n * @param exiter Account address exiting pool\n * @param tokensOut Tokens provided for exiting pool (same length and order as amountsOut)\n * @param amountsOut Amounts provided for exiting pool in EVM scale\n * @param slippage Maximum slippage tolerance in bps. i.e. 50 = 5%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildExitExactTokensOut: (\n exiter: string,\n tokensOut: string[],\n amountsOut: string[],\n slippage: string,\n toInternalBalance?: boolean\n ) => ExitExactTokensOutAttributes;\n\n /**\n * Build recovery exit pool transaction parameters with exact BPT in and minimum token amounts out based on slippage tolerance\n * @param exiter Account address exiting pool\n * @param bptIn BPT amount in EVM scale\n * @param slippage Maximum slippage tolerance in basis points. i.e. 50 = 5%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildRecoveryExit: (\n exiter: string,\n bptIn: string,\n slippage: string,\n toInternalBalance?: boolean\n ) => ExitExactBPTInAttributes;\n\n /**\n * Calculate spot price for swapping tokenIn with tokenOut\n * @param tokenIn Token address\n * @param tokenOut Token address\n * @returns spot price for swapping tokenIn with tokenOut in EVM scale\n */\n calcSpotPrice: (tokenIn: string, tokenOut: string) => string;\n\n bptIndex: number;\n}\n\nexport interface GraphQLQuery {\n args: GraphQLArgs;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n attrs: any;\n}\n\nexport type CoingeckoConfig = {\n coingeckoApiKey: string;\n tokensPerPriceRequest?: number;\n isDemoApiKey?: boolean;\n};\n","export class Logger {\n private enableLogging: boolean;\n\n private static instance: Logger;\n\n private constructor() {\n this.enableLogging = true; // Logging is initially enabled\n }\n\n static getInstance(): Logger {\n if (!Logger.instance) {\n Logger.instance = new Logger();\n }\n return Logger.instance;\n }\n\n setLoggingEnabled(enabled: boolean): void {\n this.enableLogging = enabled;\n }\n\n info(message: string): void {\n if (this.enableLogging) {\n console.log(`[INFO] ${message}`);\n }\n }\n\n warn(message: string): void {\n if (this.enableLogging) {\n console.warn(`[WARN] ${message}`);\n }\n }\n\n error(message: string): void {\n if (this.enableLogging) {\n console.error(`[ERROR] ${message}`);\n }\n }\n\n time(message: string): void {\n if (this.enableLogging) {\n console.time(`[TIME] ${message}`);\n }\n }\n\n timeEnd(message: string): void {\n if (this.enableLogging) {\n console.timeEnd(`[TIME] ${message}`);\n }\n }\n}\n","import { getAddress } from '@ethersproject/address';\nimport { AddressZero } from '@ethersproject/constants';\nimport invariant from 'tiny-invariant';\n\nconst cmpTokens = (tokenA: string, tokenB: string): number =>\n tokenA.toLowerCase() > tokenB.toLowerCase() ? 1 : -1;\n\nconst transposeMatrix = (matrix: unknown[][]): unknown[][] =>\n matrix[0].map((_, columnIndex) => matrix.map((row) => row[columnIndex]));\n\nexport class AssetHelpers {\n public readonly ETH: string = AddressZero;\n public readonly WETH: string;\n\n constructor(wethAddress: string) {\n this.WETH = getAddress(wethAddress);\n }\n\n static isEqual = (addressA: string, addressB: string): boolean =>\n getAddress(addressA) === getAddress(addressB);\n\n /**\n * Tests whether `token` is ETH (represented by `0x0000...0000`).\n *\n * @param token - the address of the asset to be checked\n */\n isETH = (token: string): boolean => AssetHelpers.isEqual(token, this.ETH);\n\n /**\n * Tests whether `token` is WETH.\n *\n * @param token - the address of the asset to be checked\n */\n isWETH = (token: string): boolean => AssetHelpers.isEqual(token, this.WETH);\n\n /**\n * Converts an asset to the equivalent ERC20 address.\n *\n * For ERC20s this will return the passed address but passing ETH (`0x0000...0000`) will return the WETH address\n * @param token - the address of the asset to be translated to an equivalent ERC20\n * @returns the address of translated ERC20 asset\n */\n translateToERC20 = (token: string): string =>\n this.isETH(token) ? this.WETH : token;\n\n /**\n * Sorts an array of token addresses into ascending order to match the format expected by the Vault.\n *\n * Passing additional arrays will result in each being sorted to maintain relative ordering to token addresses.\n *\n * The zero address (representing ETH) is sorted as if it were the WETH address.\n * This matches the behaviour expected by the Vault when receiving an array of addresses.\n *\n * @param tokens - an array of token addresses to be sorted in ascending order\n * @param others - a set of arrays to be sorted in the same order as the tokens, e.g. token weights or asset manager addresses\n * @returns an array of the form `[tokens, ...others]` where each subarray has been sorted to maintain its ordering relative to `tokens`\n *\n * @example\n * const [tokens] = sortTokens([tokenB, tokenC, tokenA])\n * const [tokens, weights] = sortTokens([tokenB, tokenC, tokenA], [weightB, weightC, weightA])\n * // where tokens = [tokenA, tokenB, tokenC], weights = [weightA, weightB, weightC]\n */\n sortTokens(\n tokens: string[],\n ...others: unknown[][]\n ): [string[], ...unknown[][]] {\n others.forEach((array) =>\n invariant(tokens.length === array.length, 'array length mismatch')\n );\n\n // We want to sort ETH as if were WETH so we translate to ERC20s\n const erc20Tokens = tokens.map(this.translateToERC20);\n\n const transpose = transposeMatrix([erc20Tokens, ...others]) as [\n string,\n ...unknown[]\n ][];\n const sortedTranspose = transpose.sort(([tokenA], [tokenB]) =>\n cmpTokens(tokenA, tokenB)\n );\n const [sortedErc20s, ...sortedOthers] = transposeMatrix(\n sortedTranspose\n ) as [string[], ...unknown[][]];\n\n // If one of the tokens was ETH, we need to translate back from WETH\n const sortedTokens = tokens.includes(this.ETH)\n ? sortedErc20s.map((token) => (this.isWETH(token) ? this.ETH : token))\n : sortedErc20s;\n return [sortedTokens, ...sortedOthers];\n }\n}\n","const balancerErrorCodes: Record = {\n '000': 'ADD_OVERFLOW',\n '001': 'SUB_OVERFLOW',\n '002': 'SUB_UNDERFLOW',\n '003': 'MUL_OVERFLOW',\n '004': 'ZERO_DIVISION',\n '005': 'DIV_INTERNAL',\n '006': 'X_OUT_OF_BOUNDS',\n '007': 'Y_OUT_OF_BOUNDS',\n '008': 'PRODUCT_OUT_OF_BOUNDS',\n '009': 'INVALID_EXPONENT',\n '100': 'OUT_OF_BOUNDS',\n '101': 'UNSORTED_ARRAY',\n '102': 'UNSORTED_TOKENS',\n '103': 'INPUT_LENGTH_MISMATCH',\n '104': 'ZERO_TOKEN',\n '200': 'MIN_TOKENS',\n '201': 'MAX_TOKENS',\n '202': 'MAX_SWAP_FEE_PERCENTAGE',\n '203': 'MIN_SWAP_FEE_PERCENTAGE',\n '204': 'MINIMUM_BPT',\n '205': 'CALLER_NOT_VAULT',\n '206': 'UNINITIALIZED',\n '207': 'BPT_IN_MAX_AMOUNT',\n '208': 'BPT_OUT_MIN_AMOUNT',\n '209': 'EXPIRED_PERMIT',\n '210': 'NOT_TWO_TOKENS',\n '211': 'DISABLED',\n '300': 'MIN_AMP',\n '301': 'MAX_AMP',\n '302': 'MIN_WEIGHT',\n '303': 'MAX_STABLE_TOKENS',\n '304': 'MAX_IN_RATIO',\n '305': 'MAX_OUT_RATIO',\n '306': 'MIN_BPT_IN_FOR_TOKEN_OUT',\n '307': 'MAX_OUT_BPT_FOR_TOKEN_IN',\n '308': 'NORMALIZED_WEIGHT_INVARIANT',\n '309': 'INVALID_TOKEN',\n '310': 'UNHANDLED_JOIN_KIND',\n '311': 'ZERO_INVARIANT',\n '312': 'ORACLE_INVALID_SECONDS_QUERY',\n '313': 'ORACLE_NOT_INITIALIZED',\n '314': 'ORACLE_QUERY_TOO_OLD',\n '315': 'ORACLE_INVALID_INDEX',\n '316': 'ORACLE_BAD_SECS',\n '317': 'AMP_END_TIME_TOO_CLOSE',\n '318': 'AMP_ONGOING_UPDATE',\n '319': 'AMP_RATE_TOO_HIGH',\n '320': 'AMP_NO_ONGOING_UPDATE',\n '321': 'STABLE_INVARIANT_DIDNT_CONVERGE',\n '322': 'STABLE_GET_BALANCE_DIDNT_CONVERGE',\n '323': 'RELAYER_NOT_CONTRACT',\n '324': 'BASE_POOL_RELAYER_NOT_CALLED',\n '325': 'REBALANCING_RELAYER_REENTERED',\n '326': 'GRADUAL_UPDATE_TIME_TRAVEL',\n '327': 'SWAPS_DISABLED',\n '328': 'CALLER_IS_NOT_LBP_OWNER',\n '329': 'PRICE_RATE_OVERFLOW',\n '330': 'INVALID_JOIN_EXIT_KIND_WHILE_SWAPS_DISABLED',\n '331': 'WEIGHT_CHANGE_TOO_FAST',\n '332': 'LOWER_GREATER_THAN_UPPER_TARGET',\n '333': 'UPPER_TARGET_TOO_HIGH',\n '334': 'UNHANDLED_BY_LINEAR_POOL',\n '335': 'OUT_OF_TARGET_RANGE',\n '336': 'UNHANDLED_EXIT_KIND ',\n '337': 'UNAUTHORIZED_EXIT',\n '338': 'MAX_MANAGEMENT_SWAP_FEE_PERCENTAGE',\n '339': 'UNHANDLED_BY_MANAGED_POOL',\n '340': 'UNHANDLED_BY_PHANTOM_POOL',\n '341': 'TOKEN_DOES_NOT_HAVE_RATE_PROVIDER',\n '342': 'INVALID_INITIALIZATION',\n '343': 'OUT_OF_NEW_TARGET_RANGE',\n '344': 'UNAUTHORIZED_OPERATION',\n '345': 'UNINITIALIZED_POOL_CONTROLLER',\n '400': 'REENTRANCY',\n '401': 'SENDER_NOT_ALLOWED',\n '402': 'PAUSED',\n '403': 'PAUSE_WINDOW_EXPIRED',\n '404': 'MAX_PAUSE_WINDOW_DURATION',\n '405': 'MAX_BUFFER_PERIOD_DURATION',\n '406': 'INSUFFICIENT_BALANCE',\n '407': 'INSUFFICIENT_ALLOWANCE',\n '408': 'ERC20_TRANSFER_FROM_ZERO_ADDRESS',\n '409': 'ERC20_TRANSFER_TO_ZERO_ADDRESS',\n '410': 'ERC20_MINT_TO_ZERO_ADDRESS',\n '411': 'ERC20_BURN_FROM_ZERO_ADDRESS',\n '412': 'ERC20_APPROVE_FROM_ZERO_ADDRESS',\n '413': 'ERC20_APPROVE_TO_ZERO_ADDRESS',\n '414': 'ERC20_TRANSFER_EXCEEDS_ALLOWANCE',\n '415': 'ERC20_DECREASED_ALLOWANCE_BELOW_ZERO',\n '416': 'ERC20_TRANSFER_EXCEEDS_BALANCE',\n '417': 'ERC20_BURN_EXCEEDS_ALLOWANCE',\n '418': 'SAFE_ERC20_CALL_FAILED',\n '419': 'ADDRESS_INSUFFICIENT_BALANCE',\n '420': 'ADDRESS_CANNOT_SEND_VALUE',\n '421': 'SAFE_CAST_VALUE_CANT_FIT_INT256',\n '422': 'GRANT_SENDER_NOT_ADMIN',\n '423': 'REVOKE_SENDER_NOT_ADMIN',\n '424': 'RENOUNCE_SENDER_NOT_ALLOWED',\n '425': 'BUFFER_PERIOD_EXPIRED',\n '426': 'CALLER_IS_NOT_OWNER',\n '427': 'NEW_OWNER_IS_ZERO',\n '428': 'CODE_DEPLOYMENT_FAILED',\n '429': 'CALL_TO_NON_CONTRACT',\n '430': 'LOW_LEVEL_CALL_FAILED',\n '431': 'NOT_PAUSED',\n '432': 'ADDRESS_ALREADY_ALLOWLISTED',\n '433': 'ADDRESS_NOT_ALLOWLISTED',\n '434': 'ERC20_BURN_EXCEEDS_BALANCE',\n '500': 'INVALID_POOL_ID',\n '501': 'CALLER_NOT_POOL',\n '502': 'SENDER_NOT_ASSET_MANAGER',\n '503': 'USER_DOESNT_ALLOW_RELAYER',\n '504': 'INVALID_SIGNATURE',\n '505': 'EXIT_BELOW_MIN',\n '506': 'JOIN_ABOVE_MAX',\n '507': 'SWAP_LIMIT',\n '508': 'SWAP_DEADLINE',\n '509': 'CANNOT_SWAP_SAME_TOKEN',\n '510': 'UNKNOWN_AMOUNT_IN_FIRST_SWAP',\n '511': 'MALCONSTRUCTED_MULTIHOP_SWAP',\n '512': 'INTERNAL_BALANCE_OVERFLOW',\n '513': 'INSUFFICIENT_INTERNAL_BALANCE',\n '514': 'INVALID_ETH_INTERNAL_BALANCE',\n '515': 'INVALID_POST_LOAN_BALANCE',\n '516': 'INSUFFICIENT_ETH',\n '517': 'UNALLOCATED_ETH',\n '518': 'ETH_TRANSFER',\n '519': 'CANNOT_USE_ETH_SENTINEL',\n '520': 'TOKENS_MISMATCH',\n '521': 'TOKEN_NOT_REGISTERED',\n '522': 'TOKEN_ALREADY_REGISTERED',\n '523': 'TOKENS_ALREADY_SET',\n '524': 'TOKENS_LENGTH_MUST_BE_2',\n '525': 'NONZERO_TOKEN_BALANCE',\n '526': 'BALANCE_TOTAL_OVERFLOW',\n '527': 'POOL_NO_TOKENS',\n '528': 'INSUFFICIENT_FLASH_LOAN_BALANCE',\n '600': 'SWAP_FEE_PERCENTAGE_TOO_HIGH',\n '601': 'FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH',\n '602': 'INSUFFICIENT_FLASH_LOAN_FEE_AMOUNT',\n};\n\nexport class BalancerErrors {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n static isErrorCode = (error: string): boolean => {\n if (!error.includes('BAL#')) return false;\n\n const errorCode = error.replace('BAL#', '');\n return Object.keys(balancerErrorCodes).includes(errorCode);\n };\n\n /**\n * Decodes a Balancer error code into the corresponding reason\n * @param error - a Balancer error code of the form `BAL#000`\n * @returns The decoded error reason\n */\n static parseErrorCode = (error: string): string => {\n if (!error.includes('BAL#')) throw new Error('Error code not found');\n const errorCode = error.replace('BAL#', '');\n\n const actualError = balancerErrorCodes[errorCode];\n\n if (!actualError) throw new Error('Error code not found');\n\n return actualError;\n };\n\n /**\n * Decodes a Balancer error code into the corresponding reason\n * @param error - a Balancer error code of the form `BAL#000`\n * @returns The decoded error reason if passed a valid error code, otherwise returns passed input\n */\n static tryParseErrorCode = (error: string): string => {\n try {\n return BalancerErrors.parseErrorCode(error);\n } catch {\n return error;\n }\n };\n\n /**\n * Tests whether a string is a known Balancer error message\n * @param error - a string to be checked verified as a Balancer error message\n */\n static isBalancerError = (error: string): boolean =>\n Object.values(balancerErrorCodes).includes(error);\n\n /**\n * Encodes an error string into the corresponding error code\n * @param error - a Balancer error message string\n * @returns a Balancer error code of the form `BAL#000`\n */\n static encodeError = (error: string): string => {\n const encodedError = Object.entries(balancerErrorCodes).find(\n ([, message]) => message === error\n );\n\n if (!encodedError) throw Error('Error message not found');\n\n return `BAL#${encodedError[0]}`;\n };\n}\n","import { MaxUint256 as MAX_DEADLINE } from '@ethersproject/constants';\nimport { Contract } from '@ethersproject/contracts';\nimport { hexValue, hexZeroPad, splitSignature } from '@ethersproject/bytes';\nimport { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { Signer, TypedDataSigner } from '@ethersproject/abstract-signer';\n\nexport type Account = string | Signer | Contract;\n\nexport async function accountToAddress(account: Account): Promise {\n if (typeof account == 'string') return account;\n if (Signer.isSigner(account)) return account.getAddress();\n if (account.address) return account.address;\n throw new Error('Could not read account address');\n}\n\nexport enum RelayerAction {\n JoinPool = 'JoinPool',\n ExitPool = 'ExitPool',\n Swap = 'Swap',\n BatchSwap = 'BatchSwap',\n SetRelayerApproval = 'SetRelayerApproval',\n}\n\nexport class RelayerAuthorization {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n static encodeCalldataAuthorization = (\n calldata: string,\n deadline: BigNumberish,\n signature: string\n ): string => {\n const encodedDeadline = hexZeroPad(hexValue(deadline), 32).slice(2);\n const { v, r, s } = splitSignature(signature);\n const encodedV = hexZeroPad(hexValue(v), 32).slice(2);\n const encodedR = r.slice(2);\n const encodedS = s.slice(2);\n return `${calldata}${encodedDeadline}${encodedV}${encodedR}${encodedS}`;\n };\n\n static signJoinAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.JoinPool,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signExitAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.ExitPool,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signSwapAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.Swap,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signBatchSwapAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.BatchSwap,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signSetRelayerApprovalAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.SetRelayerApproval,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signAuthorizationFor = async (\n type: RelayerAction,\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline: BigNumberish = MAX_DEADLINE,\n nonce?: BigNumberish\n ): Promise => {\n const { chainId } = await validator.provider.getNetwork();\n if (!nonce) {\n const userAddress = await user.getAddress();\n nonce = (await validator.getNextNonce(userAddress)) as BigNumberish;\n }\n\n const domain = {\n name: 'Balancer V2 Vault',\n version: '1',\n chainId,\n verifyingContract: validator.address,\n };\n\n const types = {\n [type]: [\n { name: 'calldata', type: 'bytes' },\n { name: 'sender', type: 'address' },\n { name: 'nonce', type: 'uint256' },\n { name: 'deadline', type: 'uint256' },\n ],\n };\n\n const value = {\n calldata: allowedCalldata,\n sender: await accountToAddress(allowedSender),\n nonce: nonce.toString(),\n deadline: deadline.toString(),\n };\n\n return user._signTypedData(domain, types, value);\n };\n}\n\nexport class BalancerMinterAuthorization {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n static signSetMinterApproval = async (\n minterContract: Contract,\n minter: Account,\n approval: boolean,\n user: Signer & TypedDataSigner,\n deadline: BigNumberish = MAX_DEADLINE,\n nonce?: BigNumberish\n ): Promise<{ v: number; r: string; s: string; deadline: BigNumber }> => {\n const { chainId } = await minterContract.provider.getNetwork();\n if (!nonce) {\n const userAddress = await user.getAddress();\n nonce = (await minterContract.getNextNonce(userAddress)) as BigNumberish;\n }\n\n const domain = {\n name: 'Balancer Minter',\n version: '1',\n chainId,\n verifyingContract: minterContract.address,\n };\n\n const types = {\n SetMinterApproval: [\n { name: 'minter', type: 'address' },\n { name: 'approval', type: 'bool' },\n { name: 'nonce', type: 'uint256' },\n { name: 'deadline', type: 'uint256' },\n ],\n };\n\n const value = {\n minter: await accountToAddress(minter),\n approval,\n nonce: nonce.toString(),\n deadline: deadline.toString(),\n };\n\n const signature = await user._signTypedData(domain, types, value);\n\n return {\n ...splitSignature(signature),\n deadline: BigNumber.from(deadline),\n };\n };\n}\n","import { Signer, TypedDataSigner } from '@ethersproject/abstract-signer';\nimport { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { splitSignature } from '@ethersproject/bytes';\nimport { MaxUint256 as MAX_DEADLINE } from '@ethersproject/constants';\nimport { Contract } from '@ethersproject/contracts';\nimport { Account, accountToAddress } from './signatures';\n\nexport const signPermit = async (\n token: Contract,\n owner: Signer & TypedDataSigner,\n spender: Account,\n amount: BigNumberish,\n deadline: BigNumberish = MAX_DEADLINE,\n nonce?: BigNumberish\n): Promise<{\n v: number;\n r: string;\n s: string;\n deadline: BigNumber;\n nonce: BigNumber;\n}> => {\n const { chainId } = await token.provider.getNetwork();\n const ownerAddress = await owner.getAddress();\n\n if (!nonce) nonce = (await token.nonces(ownerAddress)) as BigNumberish;\n\n const domain = {\n name: await token.name(),\n version: '1',\n chainId,\n verifyingContract: token.address,\n };\n\n const types = {\n Permit: [\n { name: 'owner', type: 'address' },\n { name: 'spender', type: 'address' },\n { name: 'value', type: 'uint256' },\n { name: 'nonce', type: 'uint256' },\n { name: 'deadline', type: 'uint256' },\n ],\n };\n\n const value = {\n owner: ownerAddress,\n spender: await accountToAddress(spender),\n value: amount,\n nonce,\n deadline,\n };\n\n const signature = await owner._signTypedData(domain, types, value);\n return {\n ...splitSignature(signature),\n deadline: BigNumber.from(deadline),\n nonce: BigNumber.from(nonce),\n };\n};\n","export const BZERO = BigInt(0);\nexport const BONE = BigInt(1);\nexport const ONE = BigInt('1000000000000000000'); // 18 decimal places\n\nconst _require = (b: boolean, message: string) => {\n if (!b) throw new Error(message);\n};\n\n/**\n * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\n * it had 18 decimals.\n */\nexport function _computeScalingFactor(tokenDecimals: bigint): bigint {\n // Tokens with more than 18 decimals are not supported.\n const decimalsDifference = BigInt(18) - tokenDecimals;\n return ONE * BigInt(10) ** decimalsDifference;\n}\n\n/**\n * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\n * scaling or not.\n */\nexport function _upscale(amount: bigint, scalingFactor: bigint): bigint {\n // Upscale rounding wouldn't necessarily always go in the same direction: in a swap for example the balance of\n // token in should be rounded up, and that of token out rounded down. This is the only place where we round in\n // the same direction for all amounts, as the impact of this rounding is expected to be minimal (and there's no\n // rounding error unless `_scalingFactor()` is overriden).\n return SolidityMaths.mulDownFixed(amount, scalingFactor);\n}\n\n/**\n * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\n * the `amounts` array.\n */\nexport function _upscaleArray(\n amounts: bigint[],\n scalingFactors: bigint[]\n): bigint[] {\n const upscaledAmounts = new Array(amounts.length);\n for (let i = 0; i < amounts.length; ++i) {\n upscaledAmounts[i] = SolidityMaths.mulDownFixed(\n amounts[i],\n scalingFactors[i]\n );\n }\n return upscaledAmounts;\n}\n\n/**\n * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\n * whether it needed scaling or not. The result is rounded down.\n */\nexport function _downscaleDown(amount: bigint, scalingFactor: bigint): bigint {\n return SolidityMaths.divDownFixed(amount, scalingFactor);\n}\n\n/**\n * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\n * *mutates* the `amounts` array.\n */\nexport function _downscaleDownArray(\n amounts: bigint[],\n scalingFactors: bigint[]\n): bigint[] {\n const downscaledAmounts = new Array(amounts.length);\n for (let i = 0; i < amounts.length; ++i) {\n downscaledAmounts[i] = SolidityMaths.divDownFixed(\n amounts[i],\n scalingFactors[i]\n );\n }\n return downscaledAmounts;\n}\n\n/**\n * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\n * whether it needed scaling or not. The result is rounded up.\n */\nexport function _downscaleUp(amount: bigint, scalingFactor: bigint): bigint {\n return SolidityMaths.divUpFixed(amount, scalingFactor);\n}\n\nexport class SolidityMaths {\n /**\n * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\n */\n // add(a: bigint, b: bigint): bigint {\n // const c = a + b;\n // // _require(c >= a, Errors.ADD_OVERFLOW);\n // return c;\n // }\n\n /**\n * @dev Returns the addition of two signed integers, reverting on overflow.\n */\n static add(a: bigint, b: bigint): bigint {\n const c = a + b;\n _require((b >= 0 && c >= a) || (b < 0 && c < a), 'Errors.ADD_OVERFLOW');\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\n */\n static sub(a: bigint, b: bigint): bigint {\n _require(b <= a, 'Errors.SUB_OVERFLOW');\n const c = a - b;\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two signed integers, reverting on overflow.\n */\n // sub(int256 a, int256 b) internal pure returns (int256) {\n // int256 c = a - b;\n // // _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\n // return c;\n // }\n\n /**\n * @dev Returns the largest bigint in the array.\n */\n static max(args: bigint[]): bigint {\n if (args.length === 0) throw new Error('Errors.EMPTY_ARRAY');\n if (args.length === 1) return args[0];\n return args.reduce((previous, current) =>\n current > previous ? current : previous\n );\n }\n\n /**\n * @dev Returns the smallest of two numbers of 256 bits.\n */\n static min(a: bigint, b: bigint): bigint {\n return a < b ? a : b;\n }\n\n static mul(a: bigint, b: bigint): bigint {\n const c = a * b;\n _require(a == BZERO || c / a == b, 'Errors.MUL_OVERFLOW');\n return c;\n }\n\n static div(a: bigint, b: bigint, roundUp: boolean): bigint {\n return roundUp ? this.divUp(a, b) : this.divDown(a, b);\n }\n\n static divDown(a: bigint, b: bigint): bigint {\n _require(b != BZERO, 'Errors.ZERO_DIVISION');\n return a / b;\n }\n\n static divUp(a: bigint, b: bigint): bigint {\n _require(b != BZERO, 'Errors.ZERO_DIVISION');\n\n if (a == BZERO) {\n return BZERO;\n } else {\n return BONE + (a - BONE) / b;\n }\n }\n\n // Modification: Taken from the fixed point class\n static MAX_POW_RELATIVE_ERROR = BigInt(10000);\n\n static mulUpFixed(a: bigint, b: bigint): bigint {\n const product = a * b;\n _require(a == BZERO || product / a == b, 'Errors.MUL_OVERFLOW');\n\n if (product == BZERO) {\n return BZERO;\n } else {\n // The traditional divUp formula is:\n // divUp(x, y) := (x + y - 1) / y\n // To avoid intermediate overflow in the addition, we distribute the division and get:\n // divUp(x, y) := (x - 1) / y + 1\n // Note that this requires x != 0, which we already tested for.\n\n return (product - BONE) / ONE + BONE;\n }\n }\n\n // Modification: Taken from the fixed point class\n static divDownFixed(a: bigint, b: bigint): bigint {\n _require(b != BZERO, 'Errors.ZERO_DIVISION');\n if (a == BZERO) {\n return BZERO;\n } else {\n const aInflated = a * ONE;\n // _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\n\n return aInflated / b;\n }\n }\n\n // Modification: Taken from the fixed point class\n static divUpFixed(a: bigint, b: bigint): bigint {\n _require(b != BZERO, 'Errors.ZERO_DIVISION');\n\n if (a == BZERO) {\n return BZERO;\n } else {\n const aInflated = a * ONE;\n _require(aInflated / a == ONE, 'Errors.DIV_INTERNAL'); // mul overflow\n\n // The traditional divUp formula is:\n // divUp(x, y) := (x + y - 1) / y\n // To avoid intermediate overflow in the addition, we distribute the division and get:\n // divUp(x, y) := (x - 1) / y + 1\n // Note that this requires x != 0, which we already tested for.\n\n return (aInflated - BONE) / b + BONE;\n }\n }\n\n // Modification: Taken from the fixed point class\n static powUpFixed(x: bigint, y: bigint): bigint {\n const raw = LogExpMath.pow(x, y);\n const maxError = this.add(\n this.mulUpFixed(raw, this.MAX_POW_RELATIVE_ERROR),\n BONE\n );\n\n return this.add(raw, maxError);\n }\n\n // Modification: Taken from the fixed point class\n static complementFixed(x: bigint): bigint {\n return x < ONE ? ONE - x : BZERO;\n }\n\n static mulDownFixed(a: bigint, b: bigint): bigint {\n const product = a * b;\n _require(a == BZERO || product / a == b, 'Errors.MUL_OVERFLOW');\n\n return product / ONE;\n }\n}\n\nclass LogExpMath {\n // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\n // two numbers, and multiply by ONE when dividing them.\n\n // All arguments and return values are 18 decimal fixed point numbers.\n static ONE_18 = BigInt('1000000000000000000');\n\n // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\n // case of ln36, 36 decimals.\n static ONE_20 = BigInt('100000000000000000000');\n static ONE_36 = BigInt('1000000000000000000000000000000000000');\n\n // The domain of natural exponentiation is bound by the word size and number of decimals used.\n //\n // Because internally the result will be stored using 20 decimals, the largest possible result is\n // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\n // The smallest possible result is 10^(-18), which makes largest negative argument\n // ln(10^(-18)) = -41.446531673892822312.\n // We use 130.0 and -41.0 to have some safety margin.\n static MAX_NATURAL_EXPONENT = BigInt('130000000000000000000');\n static MIN_NATURAL_EXPONENT = BigInt('-41000000000000000000');\n\n // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\n // 256 bit integer.\n static LN_36_LOWER_BOUND: bigint =\n BigInt(LogExpMath.ONE_18) - BigInt('100000000000000000');\n static LN_36_UPPER_BOUND: bigint =\n BigInt(LogExpMath.ONE_18) + BigInt('100000000000000000');\n\n static MILD_EXPONENT_BOUND: bigint =\n BigInt(2) ** BigInt(254) / LogExpMath.ONE_20;\n\n // 18 decimal constants\n static x0 = BigInt('128000000000000000000'); // 2ˆ7\n static a0 = BigInt(\n '38877084059945950922200000000000000000000000000000000000'\n ); // eˆ(x0) (no decimals)\n static x1 = BigInt('64000000000000000000'); // 2ˆ6\n static a1 = BigInt('6235149080811616882910000000'); // eˆ(x1) (no decimals)\n\n // 20 decimal constants\n static x2 = BigInt('3200000000000000000000'); // 2ˆ5\n static a2 = BigInt('7896296018268069516100000000000000'); // eˆ(x2)\n static x3 = BigInt('1600000000000000000000'); // 2ˆ4\n static a3 = BigInt('888611052050787263676000000'); // eˆ(x3)\n static x4 = BigInt('800000000000000000000'); // 2ˆ3\n static a4 = BigInt('298095798704172827474000'); // eˆ(x4)\n static x5 = BigInt('400000000000000000000'); // 2ˆ2\n static a5 = BigInt('5459815003314423907810'); // eˆ(x5)\n static x6 = BigInt('200000000000000000000'); // 2ˆ1\n static a6 = BigInt('738905609893065022723'); // eˆ(x6)\n static x7 = BigInt('100000000000000000000'); // 2ˆ0\n static a7 = BigInt('271828182845904523536'); // eˆ(x7)\n static x8 = BigInt('50000000000000000000'); // 2ˆ-1\n static a8 = BigInt('164872127070012814685'); // eˆ(x8)\n static x9 = BigInt('25000000000000000000'); // 2ˆ-2\n static a9 = BigInt('128402541668774148407'); // eˆ(x9)\n static x10 = BigInt('12500000000000000000'); // 2ˆ-3\n static a10 = BigInt('113314845306682631683'); // eˆ(x10)\n static x11 = BigInt('6250000000000000000'); // 2ˆ-4\n static a11 = BigInt('106449445891785942956'); // eˆ(x11)\n\n // All arguments and return values are 18 decimal fixed point numbers.\n static pow(x: bigint, y: bigint): bigint {\n if (y === BZERO) {\n // We solve the 0^0 indetermination by making it equal one.\n return this.ONE_18;\n }\n\n if (x == BZERO) {\n return BZERO;\n }\n\n // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\n // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\n // x^y = exp(y * ln(x)).\n\n // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\n _require(\n x <\n BigInt(\n '57896044618658097711785492504343953926634992332820282019728792003956564819968'\n ),\n 'Errors.X_OUT_OF_BOUNDS'\n );\n const x_int256 = x;\n\n // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\n // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\n\n // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\n _require(y < this.MILD_EXPONENT_BOUND, 'Errors.Y_OUT_OF_BOUNDS');\n const y_int256 = y;\n\n let logx_times_y;\n if (\n this.LN_36_LOWER_BOUND < x_int256 &&\n x_int256 < this.LN_36_UPPER_BOUND\n ) {\n const ln_36_x = this._ln_36(x_int256);\n\n // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\n // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\n // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\n // (downscaled) last 18 decimals.\n logx_times_y =\n (ln_36_x / this.ONE_18) * y_int256 +\n ((ln_36_x % this.ONE_18) * y_int256) / this.ONE_18;\n } else {\n logx_times_y = this._ln(x_int256) * y_int256;\n }\n logx_times_y /= this.ONE_18;\n\n // Finally, we compute exp(y * ln(x)) to arrive at x^y\n _require(\n this.MIN_NATURAL_EXPONENT <= logx_times_y &&\n logx_times_y <= this.MAX_NATURAL_EXPONENT,\n 'Errors.PRODUCT_OUT_OF_BOUNDS'\n );\n\n // return uint256(exp(logx_times_y));\n return this.exp(logx_times_y);\n }\n\n static exp(x: bigint): bigint {\n _require(\n x >= this.MIN_NATURAL_EXPONENT && x <= this.MAX_NATURAL_EXPONENT,\n 'Errors.INVALID_EXPONENT'\n );\n\n if (x < 0) {\n // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\n // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\n // Fixed point division requires multiplying by ONE_18.\n return (this.ONE_18 * this.ONE_18) / this.exp(BigInt(-1) * x);\n }\n\n // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\n // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\n // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\n // decomposition.\n // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\n // decomposition, which will be lower than the smallest x_n.\n // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\n // We mutate x by subtracting x_n, making it the remainder of the decomposition.\n\n // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\n // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\n // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\n // decomposition.\n\n // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\n // it and compute the accumulated product.\n\n let firstAN;\n if (x >= this.x0) {\n x -= this.x0;\n firstAN = this.a0;\n } else if (x >= this.x1) {\n x -= this.x1;\n firstAN = this.a1;\n } else {\n firstAN = BigInt(1); // One with no decimal places\n }\n\n // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\n // smaller terms.\n x *= BigInt(100);\n\n // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\n // one. Recall that fixed point multiplication requires dividing by ONE_20.\n let product = this.ONE_20;\n\n if (x >= this.x2) {\n x -= this.x2;\n product = (product * this.a2) / this.ONE_20;\n }\n if (x >= this.x3) {\n x -= this.x3;\n product = (product * this.a3) / this.ONE_20;\n }\n if (x >= this.x4) {\n x -= this.x4;\n product = (product * this.a4) / this.ONE_20;\n }\n if (x >= this.x5) {\n x -= this.x5;\n product = (product * this.a5) / this.ONE_20;\n }\n if (x >= this.x6) {\n x -= this.x6;\n product = (product * this.a6) / this.ONE_20;\n }\n if (x >= this.x7) {\n x -= this.x7;\n product = (product * this.a7) / this.ONE_20;\n }\n if (x >= this.x8) {\n x -= this.x8;\n product = (product * this.a8) / this.ONE_20;\n }\n if (x >= this.x9) {\n x -= this.x9;\n product = (product * this.a9) / this.ONE_20;\n }\n\n // x10 and x11 are unnecessary here since we have high enough precision already.\n\n // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\n // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\n\n let seriesSum = this.ONE_20; // The initial one in the sum, with 20 decimal places.\n let term; // Each term in the sum, where the nth term is (x^n / n!).\n\n // The first term is simply x.\n term = x;\n seriesSum += term;\n\n // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\n // multiplying by it requires dividing by this.ONE_20, but dividing by the non-fixed point n values does not.\n\n term = (term * x) / this.ONE_20 / BigInt(2);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(3);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(4);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(5);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(6);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(7);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(8);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(9);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(10);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(11);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(12);\n seriesSum += term;\n\n // 12 Taylor terms are sufficient for 18 decimal precision.\n\n // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\n // approximation of the exponentiation of the remainder (both with 20 decimals). All that remains is to multiply\n // all three (one 20 decimal fixed point multiplication, dividing by this.ONE_20, and one integer multiplication),\n // and then drop two digits to return an 18 decimal value.\n\n return (((product * seriesSum) / this.ONE_20) * firstAN) / BigInt(100);\n }\n\n static _ln_36(x: bigint): bigint {\n // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\n // worthwhile.\n\n // First, we transform x to a 36 digit fixed point value.\n x *= this.ONE_18;\n\n // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\n // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\n\n // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\n // division by ONE_36.\n const z = ((x - this.ONE_36) * this.ONE_36) / (x + this.ONE_36);\n const z_squared = (z * z) / this.ONE_36;\n\n // num is the numerator of the series: the z^(2 * n + 1) term\n let num = z;\n\n // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\n let seriesSum = num;\n\n // In each step, the numerator is multiplied by z^2\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(3);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(5);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(7);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(9);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(11);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(13);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(15);\n\n // 8 Taylor terms are sufficient for 36 decimal precision.\n\n // All that remains is multiplying by 2 (non fixed point).\n return seriesSum * BigInt(2);\n }\n\n /**\n * @dev Internal natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\n */\n static _ln(a: bigint): bigint {\n if (a < this.ONE_18) {\n // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\n // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\n // Fixed point division requires multiplying by this.ONE_18.\n return BigInt(-1) * this._ln((this.ONE_18 * this.ONE_18) / a);\n }\n\n // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\n // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\n // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\n // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\n // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\n // decomposition, which will be lower than the smallest a_n.\n // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\n // We mutate a by subtracting a_n, making it the remainder of the decomposition.\n\n // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\n // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\n // this.ONE_18 to convert them to fixed point.\n // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\n // by it and compute the accumulated sum.\n\n let sum = BZERO;\n if (a >= this.a0 * this.ONE_18) {\n a /= this.a0; // Integer, not fixed point division\n sum += this.x0;\n }\n\n if (a >= this.a1 * this.ONE_18) {\n a /= this.a1; // Integer, not fixed point division\n sum += this.x1;\n }\n\n // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\n sum *= BigInt(100);\n a *= BigInt(100);\n\n // Because further a_n are 20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\n\n if (a >= this.a2) {\n a = (a * this.ONE_20) / this.a2;\n sum += this.x2;\n }\n\n if (a >= this.a3) {\n a = (a * this.ONE_20) / this.a3;\n sum += this.x3;\n }\n\n if (a >= this.a4) {\n a = (a * this.ONE_20) / this.a4;\n sum += this.x4;\n }\n\n if (a >= this.a5) {\n a = (a * this.ONE_20) / this.a5;\n sum += this.x5;\n }\n\n if (a >= this.a6) {\n a = (a * this.ONE_20) / this.a6;\n sum += this.x6;\n }\n\n if (a >= this.a7) {\n a = (a * this.ONE_20) / this.a7;\n sum += this.x7;\n }\n\n if (a >= this.a8) {\n a = (a * this.ONE_20) / this.a8;\n sum += this.x8;\n }\n\n if (a >= this.a9) {\n a = (a * this.ONE_20) / this.a9;\n sum += this.x9;\n }\n\n if (a >= this.a10) {\n a = (a * this.ONE_20) / this.a10;\n sum += this.x10;\n }\n\n if (a >= this.a11) {\n a = (a * this.ONE_20) / this.a11;\n sum += this.x11;\n }\n\n // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\n // that converges rapidly for values of `a` close to one - the same one used in ln_36.\n // Let z = (a - 1) / (a + 1).\n // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\n\n // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\n // division by ONE_20.\n const z = ((a - this.ONE_20) * this.ONE_20) / (a + this.ONE_20);\n const z_squared = (z * z) / this.ONE_20;\n\n // num is the numerator of the series: the z^(2 * n + 1) term\n let num = z;\n\n // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\n let seriesSum = num;\n\n // In each step, the numerator is multiplied by z^2\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(3);\n\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(5);\n\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(7);\n\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(9);\n\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(11);\n\n // 6 Taylor terms are sufficient for 36 decimal precision.\n\n // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\n seriesSum *= BigInt(2);\n\n // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\n // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\n // value.\n\n return (sum + seriesSum) / BigInt(100);\n }\n}\n","import { parseFixed } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport { Pool } from '../../types';\nimport {\n SolidityMaths,\n _computeScalingFactor,\n _upscaleArray,\n} from '@/lib/utils/solidityMaths';\nimport { AssetHelpers } from '@/lib/utils/assetHelpers';\n\nexport const AMP_PRECISION = 3; // number of decimals -> precision 1000\n\ntype ParsedPoolInfo = {\n bptIndex: number;\n higherBalanceTokenIndex: number;\n ampWithPrecision: bigint;\n balancesEvm: bigint[];\n balancesEvmWithoutBpt: bigint[];\n priceRates: bigint[];\n priceRatesWithoutBpt: bigint[];\n swapFeeEvm: bigint;\n poolTokens: string[];\n poolTokensWithoutBpt: string[];\n weights: bigint[];\n scalingFactors: bigint[];\n scalingFactorsWithoutBpt: bigint[];\n scalingFactorsRaw: bigint[];\n scalingFactorsRawWithoutBpt: bigint[];\n upScaledBalances: bigint[];\n upScaledBalancesWithoutBpt: bigint[];\n totalSharesEvm: bigint;\n};\n\n/**\n * Parse pool info into EVM amounts. Sorts by token order if wrappedNativeAsset param passed.\n * @param pool Pool object to be parsed\n * @param wrappedNativeAsset e.g. wETH address\n * @param unwrapNativeAsset if true, changes wETH address to ETH address\n * @returns parsed pool info\n */\nexport const parsePoolInfo = (\n pool: Pool,\n wrappedNativeAsset?: string,\n unwrapNativeAsset?: boolean\n): ParsedPoolInfo => {\n let poolTokens = unwrapNativeAsset\n ? pool.tokens.map((token) =>\n token.address === wrappedNativeAsset ? AddressZero : token.address\n )\n : pool.tokens.map((token) => token.address);\n let decimals = pool.tokens.map((token) => {\n return token.decimals ?? 18;\n });\n let balancesEvm = pool.tokens.map((token) =>\n parseFixed(token.balance, token.decimals).toBigInt()\n );\n let weights = pool.tokens.map((token) => {\n return parseFixed(token.weight ?? '1', 18).toBigInt();\n });\n let priceRates = pool.tokens.map((token) => {\n return parseFixed(token.priceRate ?? '1', 18).toBigInt();\n });\n\n let scalingFactorsRaw = decimals.map((d) => _computeScalingFactor(BigInt(d)));\n let scalingFactors = scalingFactorsRaw.map((sf, i) =>\n SolidityMaths.mulDownFixed(sf, priceRates[i])\n );\n // This assumes token.balance is in human scale (e.g. from SG)\n let upScaledBalances = _upscaleArray(balancesEvm, scalingFactors);\n if (wrappedNativeAsset) {\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n [\n poolTokens,\n decimals,\n scalingFactors,\n scalingFactorsRaw,\n balancesEvm,\n upScaledBalances,\n weights,\n priceRates,\n ] = assetHelpers.sortTokens(\n poolTokens,\n decimals,\n scalingFactors,\n scalingFactorsRaw,\n balancesEvm,\n upScaledBalances,\n weights,\n priceRates\n ) as [\n string[],\n number[],\n bigint[],\n bigint[],\n bigint[],\n bigint[],\n bigint[],\n bigint[]\n ];\n }\n\n // Solidity maths uses precison method for amp that must be replicated\n const ampWithPrecision = parseFixed(\n pool.amp ?? '1',\n AMP_PRECISION\n ).toBigInt();\n\n const higherBalanceTokenIndex = upScaledBalances.indexOf(\n SolidityMaths.max(upScaledBalances)\n );\n\n const scalingFactorsWithoutBpt = [...scalingFactors];\n const scalingFactorsRawWithoutBpt = [...scalingFactorsRaw];\n const poolTokensWithoutBpt = [...poolTokens];\n const balancesEvmWithoutBpt = [...balancesEvm];\n const priceRatesWithoutBpt = [...priceRates];\n const upScaledBalancesWithoutBpt = [...upScaledBalances];\n\n const bptIndex = poolTokens.indexOf(pool.address);\n if (bptIndex !== -1) {\n scalingFactorsWithoutBpt.splice(bptIndex, 1);\n scalingFactorsRawWithoutBpt.splice(bptIndex, 1);\n poolTokensWithoutBpt.splice(bptIndex, 1);\n balancesEvmWithoutBpt.splice(bptIndex, 1);\n priceRatesWithoutBpt.splice(bptIndex, 1);\n upScaledBalancesWithoutBpt.splice(bptIndex, 1);\n }\n\n return {\n bptIndex,\n higherBalanceTokenIndex,\n ampWithPrecision,\n balancesEvm,\n balancesEvmWithoutBpt,\n priceRates,\n priceRatesWithoutBpt,\n swapFeeEvm: parseFixed(pool.swapFee, 18).toBigInt(),\n poolTokens,\n poolTokensWithoutBpt,\n weights,\n scalingFactors,\n scalingFactorsWithoutBpt,\n scalingFactorsRaw,\n scalingFactorsRawWithoutBpt,\n upScaledBalances,\n upScaledBalancesWithoutBpt,\n totalSharesEvm: parseFixed(pool.totalShares || '0', 18).toBigInt(),\n };\n};\n","import { Network } from '@/lib/constants/network';\n\n/**\n * TYPES\n */\ntype CommonTokens = {\n nativeAsset: string;\n wNativeAsset: string;\n WETH: string;\n BAL: string;\n bbaUSD?: string;\n bbaUSDv2?: string;\n};\n\ntype TokenConstants = {\n Popular: {\n Symbols: string[];\n };\n Addresses: CommonTokens;\n PriceChainMap?: Record;\n};\n\n/**\n * CONSTANTS\n */\nexport const DEFAULT_TOKEN_DECIMALS = 18;\n\nexport const TOKENS_MAINNET: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'AAVE', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n WETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n BAL: '0xba100000625a3754423978a60c9317c58a424e3d',\n bbaUSD: '0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2',\n bbaUSDv2: '0xA13a9247ea42D743238089903570127DdA72fE44',\n },\n};\n\nexport const TOKENS_POLYGON: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'AAVE', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',\n WETH: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619',\n BAL: '0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3',\n },\n};\n\nexport const TOKENS_ARBITRUM: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'AAVE', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',\n WETH: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',\n BAL: '0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8',\n },\n};\n\nexport const TOKENS_GNOSIS: TokenConstants = {\n Popular: {\n Symbols: ['xDAI', 'WXDAI', 'WETH', 'BAL'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0xe91d153e0b41518a2ce8dd3d7944fa863463a97d',\n WETH: '0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1',\n BAL: '0x7eF541E2a22058048904fE5744f9c7E4C57AF717',\n },\n};\nexport const TOKENS_GOERLI: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'USDT', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1',\n WETH: '0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1',\n BAL: '0xfA8449189744799aD2AcE7e0EBAC8BB7575eff47',\n bbaUSD: '0x13ACD41C585d7EbB4a9460f7C8f50BE60DC080Cd',\n },\n PriceChainMap: {\n /**\n * Addresses must be lower case and map from goerli to mainnet, e.g\n * [goerli address]: mainnet address\n */\n '0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1':\n '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n '0x37f03a12241e9fd3658ad6777d289c3fb8512bc9':\n '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',\n '0xfa8449189744799ad2ace7e0ebac8bb7575eff47':\n '0xba100000625a3754423978a60c9317c58a424e3d',\n '0xe0c9275e44ea80ef17579d33c55136b7da269aeb':\n '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n '0x8c9e6c40d3402480ace624730524facc5482798c':\n '0x6b175474e89094c44da98b954eedeac495271d0f',\n '0x1f1f156e0317167c11aa412e3d1435ea29dc3cce':\n '0xdac17f958d2ee523a2206206994597c13d831ec7',\n '0x4cb1892fddf14f772b2e39e299f44b2e5da90d04':\n '0x3ed3b47dd13ec9a98b44e6204a523e766b225811',\n '0x811151066392fd641fe74a9b55a712670572d161':\n '0xbcca60bb61934080951369a648fb03df4f96263c',\n '0x89534a24450081aa267c79b07411e9617d984052':\n '0x028171bca77440897b824ca71d1c56cac55b68a3',\n '0x829f35cebbcd47d3c120793c12f7a232c903138b':\n '0x956f47f50a910163d8bf957cf5846d573e7f87ca',\n '0xff386a3d08f80ac38c77930d173fa56c6286dc8b':\n '0x6810e776880c02933d47db1b9fc05908e5386b96',\n },\n};\n\nexport const TOKENS_GENERIC: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'AAVE', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n WETH: '0x0000000000000000000000000000000000000000',\n BAL: '0x0000000000000000000000000000000000000000',\n },\n};\n\nexport const TOKENS_MAP = {\n [Network.GOERLI]: TOKENS_GOERLI,\n [Network.MAINNET]: TOKENS_MAINNET,\n [Network.POLYGON]: TOKENS_POLYGON,\n [Network.ARBITRUM]: TOKENS_ARBITRUM,\n [Network.GNOSIS]: TOKENS_GNOSIS,\n};\n\nexport function TOKENS(networkId: Network): TokenConstants {\n const id = networkId as keyof typeof TOKENS_MAP;\n return TOKENS_MAP[id] ? TOKENS_MAP[id] : TOKENS_GENERIC;\n}\n","\"use strict\";\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\nconst LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\nimport { version } from \"./_version\";\nlet _globalLogger = null;\nfunction _checkNormalize() {\n try {\n const missing = [];\n // Make sure all forms of normalization are supported\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n }\n catch (error) {\n missing.push(form);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\");\n }\n }\n catch (error) {\n return error.message;\n }\n return null;\n}\nconst _normalizeError = _checkNormalize();\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[\"DEBUG\"] = \"DEBUG\";\n LogLevel[\"INFO\"] = \"INFO\";\n LogLevel[\"WARNING\"] = \"WARNING\";\n LogLevel[\"ERROR\"] = \"ERROR\";\n LogLevel[\"OFF\"] = \"OFF\";\n})(LogLevel || (LogLevel = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ///////////////////\n // Generic Errors\n // Unknown Error\n ErrorCode[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n // Not Implemented\n ErrorCode[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n // Unsupported Operation\n // - operation\n ErrorCode[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n // Network Error (i.e. Ethereum Network, such as an invalid chain ID)\n // - event (\"noNetwork\" is not re-thrown in provider.ready; otherwise thrown)\n ErrorCode[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n // Some sort of bad response from the server\n ErrorCode[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n // Timeout\n ErrorCode[\"TIMEOUT\"] = \"TIMEOUT\";\n ///////////////////\n // Operational Errors\n // Buffer Overrun\n ErrorCode[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n ErrorCode[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ///////////////////\n // Argument Errors\n // Missing new operator to an object\n // - name: The name of the class\n ErrorCode[\"MISSING_NEW\"] = \"MISSING_NEW\";\n // Invalid argument (e.g. value is incompatible with type) to a function:\n // - argument: The argument name that was invalid\n // - value: The value of the argument\n ErrorCode[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ///////////////////\n // Blockchain Errors\n // Call exception\n // - transaction: the transaction\n // - address?: the contract address\n // - args?: The arguments passed into the function\n // - method?: The Solidity method signature\n // - errorSignature?: The EIP848 error signature\n // - errorArgs?: The EIP848 error parameters\n // - reason: The reason (only for EIP848 \"Error(string)\")\n ErrorCode[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n ErrorCode[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n // Nonce has already been used\n // - transaction: the transaction attempted\n ErrorCode[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n ErrorCode[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n ErrorCode[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n // The transaction was replaced by one with a higher gas price\n // - reason: \"cancelled\", \"replaced\" or \"repriced\"\n // - cancelled: true if reason == \"cancelled\" or reason == \"replaced\")\n // - hash: original transaction hash\n // - replacement: the full TransactionsResponse for the replacement\n // - receipt: the receipt of the replacement\n ErrorCode[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ///////////////////\n // Interaction Errors\n // The user rejected the action, such as signing a message or sending\n // a transaction\n ErrorCode[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n})(ErrorCode || (ErrorCode = {}));\n;\nconst HEX = \"0123456789abcdef\";\nexport class Logger {\n constructor(version) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n _log(logLevel, args) {\n const level = logLevel.toLowerCase();\n if (LogLevels[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel > LogLevels[level]) {\n return;\n }\n console.log.apply(console, args);\n }\n debug(...args) {\n this._log(Logger.levels.DEBUG, args);\n }\n info(...args) {\n this._log(Logger.levels.INFO, args);\n }\n warn(...args) {\n this._log(Logger.levels.WARNING, args);\n }\n makeError(message, code, params) {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n try {\n if (value instanceof Uint8Array) {\n let hex = \"\";\n for (let i = 0; i < value.length; i++) {\n hex += HEX[value[i] >> 4];\n hex += HEX[value[i] & 0x0f];\n }\n messageDetails.push(key + \"=Uint8Array(0x\" + hex + \")\");\n }\n else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\n }\n catch (error) {\n messageDetails.push(key + \"=\" + JSON.stringify(params[key].toString()));\n }\n });\n messageDetails.push(`code=${code}`);\n messageDetails.push(`version=${this.version}`);\n const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https:/\\/links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n // @TODO: Any??\n const error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function (key) {\n error[key] = params[key];\n });\n return error;\n }\n throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\", form: _normalizeError\n });\n }\n }\n checkSafeUint53(value, message) {\n if (typeof (value) !== \"number\") {\n return;\n }\n if (message == null) {\n message = \"value not safe\";\n }\n if (value < 0 || value >= 0x1fffffffffffff) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value: value\n });\n }\n if (value % 1) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value: value\n });\n }\n }\n checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n }\n else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger.errors.UNEXPECTED_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n }\n checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n }\n else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n static globalLogger() {\n if (!_globalLogger) {\n _globalLogger = new Logger(version);\n }\n return _globalLogger;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n static setLogLevel(logLevel) {\n const level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n Logger.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n }\n static from(version) {\n return new Logger(version);\n }\n}\nLogger.errors = ErrorCode;\nLogger.levels = LogLevel;\n//# sourceMappingURL=index.js.map","export const version = \"logger/5.7.0\";\n//# sourceMappingURL=_version.js.map","export const version = \"units/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { formatFixed, parseFixed } from \"@ethersproject/bignumber\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nconst names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\",\n];\n// Some environments have issues with RegEx that contain back-tracking, so we cannot\n// use them.\nexport function commify(value) {\n const comps = String(value).split(\".\");\n if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === \".\" || value === \"-.\") {\n logger.throwArgumentError(\"invalid value\", \"value\", value);\n }\n // Make sure we have at least one whole digit (0 if none)\n let whole = comps[0];\n let negative = \"\";\n if (whole.substring(0, 1) === \"-\") {\n negative = \"-\";\n whole = whole.substring(1);\n }\n // Make sure we have at least 1 whole digit with no leading zeros\n while (whole.substring(0, 1) === \"0\") {\n whole = whole.substring(1);\n }\n if (whole === \"\") {\n whole = \"0\";\n }\n let suffix = \"\";\n if (comps.length === 2) {\n suffix = \".\" + (comps[1] || \"0\");\n }\n while (suffix.length > 2 && suffix[suffix.length - 1] === \"0\") {\n suffix = suffix.substring(0, suffix.length - 1);\n }\n const formatted = [];\n while (whole.length) {\n if (whole.length <= 3) {\n formatted.unshift(whole);\n break;\n }\n else {\n const index = whole.length - 3;\n formatted.unshift(whole.substring(index));\n whole = whole.substring(0, index);\n }\n }\n return negative + formatted.join(\",\") + suffix;\n}\nexport function formatUnits(value, unitName) {\n if (typeof (unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) {\n unitName = 3 * index;\n }\n }\n return formatFixed(value, (unitName != null) ? unitName : 18);\n}\nexport function parseUnits(value, unitName) {\n if (typeof (value) !== \"string\") {\n logger.throwArgumentError(\"value must be a string\", \"value\", value);\n }\n if (typeof (unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) {\n unitName = 3 * index;\n }\n }\n return parseFixed(value, (unitName != null) ? unitName : 18);\n}\nexport function formatEther(wei) {\n return formatUnits(wei, 18);\n}\nexport function parseEther(ether) {\n return parseUnits(ether, 18);\n}\n//# sourceMappingURL=index.js.map","import { Interface } from '@ethersproject/abi';\nimport { formatUnits } from '@ethersproject/units';\nimport { Multicall } from '@/contracts';\nimport { Network } from '@/types';\n\nexport const yieldTokens = {\n [Network.MAINNET]: {\n waUSDT: '0xf8fd466f12e236f4c96f7cce6c79eadb819abf58',\n waUSDC: '0xd093fa4fb80d09bb30817fdcd442d4d02ed3e5de',\n waDAI: '0x02d60b84491589974263d922d9cc7a3152618ef6',\n },\n [Network.POLYGON]: {\n wamDAI: '0xee029120c72b0607344f35b17cdd90025e647b00',\n wamUSDC: '0x221836a597948dce8f3568e044ff123108acc42a',\n wamUSDT: '0x19c60a251e525fa88cd6f3768416a8024e98fc19',\n },\n};\n\nexport const wrappedTokensMap = {\n [Network.MAINNET]: {\n // USDT\n [yieldTokens[Network.MAINNET].waUSDT]: {\n aToken: '0x3ed3b47dd13ec9a98b44e6204a523e766b225811',\n underlying: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n },\n // USDC\n [yieldTokens[Network.MAINNET].waUSDC]: {\n aToken: '0xbcca60bb61934080951369a648fb03df4f96263c',\n underlying: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n },\n // DAI\n [yieldTokens[Network.MAINNET].waDAI]: {\n aToken: '0x028171bca77440897b824ca71d1c56cac55b68a3',\n underlying: '0x6b175474e89094c44da98b954eedeac495271d0f',\n },\n },\n [Network.POLYGON]: {\n // USDT\n [yieldTokens[Network.POLYGON].wamUSDT]: {\n aToken: '0x60d55f02a771d515e077c9c2403a1ef324885cec',\n underlying: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f',\n },\n // USDC\n [yieldTokens[Network.POLYGON].wamUSDC]: {\n aToken: '0x1a13f4ca1d028320a707d99520abfefca3998b7f',\n underlying: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',\n },\n // DAI\n [yieldTokens[Network.POLYGON].wamDAI]: {\n aToken: '0x27f8d03b3a2196956ed754badc28d73be8830a6e',\n underlying: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063',\n },\n },\n};\n\nconst wrappedATokenInterface = new Interface([\n 'function rate() view returns (uint256)',\n]);\n\nexport interface IAaveRates {\n getRate: (address: string) => Promise;\n}\n\nexport class AaveRates implements IAaveRates {\n rates?: Promise<{ [wrappedATokenAddress: string]: number }>;\n\n constructor(private multicall: Multicall, private network: Network) {}\n\n private async fetch(\n network: Network.MAINNET | Network.POLYGON\n ): Promise<{ [wrappedATokenAddress: string]: number }> {\n console.time('Fetching aave rates');\n const addresses = Object.values(yieldTokens[network]);\n const payload = addresses.map((wrappedATokenAddress) => ({\n target: wrappedATokenAddress,\n callData: wrappedATokenInterface.encodeFunctionData('rate', []),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const rates = addresses.reduce((p: { [key: string]: number }, a, i) => {\n p[a] ||= res[i] == '0x' ? 0 : parseFloat(formatUnits(res[i], 27));\n return p;\n }, {});\n console.timeEnd('Fetching aave rates');\n\n return rates;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async getRate(wrappedAToken: string): Promise {\n //To prevent bricked linear pools from effecting this call\n /*if (this.network != Network.MAINNET && this.network != Network.POLYGON) {\n return 1;\n }\n if (!Object.values(yieldTokens[this.network]).includes(wrappedAToken)) {\n return 1;\n }\n if (!this.rates) {\n this.rates = this.fetch(this.network);\n }\n\n return (await this.rates)[wrappedAToken];*/\n\n return 1;\n }\n}\n","import { Token, TokenPrices, Network } from '@/types';\nimport { TOKENS } from '@/lib/constants/tokens';\nimport { wrappedTokensMap as aaveWrappedMap } from '@/modules/data/token-prices/aave-rates';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\n\nexport function tokensToTokenPrices(tokens: Token[]): TokenPrices {\n const tokenPrices: TokenPrices = {};\n tokens.forEach((token) => {\n if (token.price) {\n tokenPrices[token.address] = token.price;\n }\n });\n\n return tokenPrices;\n}\n\nexport function tokenAddressForPricing(\n address: string,\n chainId: Network\n): string {\n let a = address.toLowerCase();\n a = addressMapIn(a, chainId);\n a = unwrapToken(a, chainId);\n\n return a;\n}\n\n/**\n * Maps testnet tokens, eg: on Göreli to a mainnet one.\n * Used to get the pricing information on networks not supported by a price feed.\n *\n * @param address Address on a testnet network\n */\nexport const addressMapIn = (address: string, chainId: Network): string => {\n const addressMap = TOKENS(chainId).PriceChainMap;\n return (addressMap && addressMap[address.toLowerCase()]) || address;\n};\n\n/**\n * Finds an underlying token address for a wrapped one\n *\n * @param wrappedAddress\n * @param chainId\n * @returns underlying token address\n */\nexport const unwrapToken = (\n wrappedAddress: string,\n chainId: Network\n): string => {\n const lowercase = wrappedAddress.toLocaleLowerCase();\n\n const aaveChain = chainId as keyof typeof aaveWrappedMap;\n if (\n aaveWrappedMap[aaveChain] != undefined &&\n aaveWrappedMap[aaveChain] != null\n ) {\n // Double if to avoid skipping just to at after compile: Object.keys()?.includes\n if (Object.keys(aaveWrappedMap[aaveChain]).includes(lowercase)) {\n return aaveWrappedMap[aaveChain][\n lowercase as keyof (typeof aaveWrappedMap)[typeof aaveChain]\n ].aToken;\n } else {\n return lowercase;\n }\n } else {\n return lowercase;\n }\n};\n\n// filter native asset (e.g. ETH) amounts\nexport const getEthValue = (tokens: string[], amounts: string[]): BigNumber => {\n const values = amounts.filter((amount, i) => tokens[i] === AddressZero);\n return values[0] ? BigNumber.from(values[0]) : BigNumber.from(0);\n};\n","/* eslint-disable @typescript-eslint/no-empty-function */\n\n/**\n * Debouncer for different attributes requested over time, which need to be aggregated into a single resolving call\n *\n * Choosing deferred promise since we have setTimeout that returns a promise\n * Some reference for history buffs: https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns\n */\n\ninterface Promised {\n promise: Promise;\n resolve: (value: T) => void;\n reject: (reason: unknown) => void;\n}\n\nconst makePromise = (): Promised => {\n let resolve: (value: T) => void = () => {};\n let reject: (reason: unknown) => void = () => {};\n const promise = new Promise((res, rej) => {\n [resolve, reject] = [res, rej];\n });\n return { promise, reject, resolve };\n};\n\n/**\n * Aggregates attributes and exectutes a debounced call\n *\n * @param fn Function to debounce\n * @param wait Debouncing waiting time [ms]\n * @param limit Maximum number of attributes to execute in one promise\n * @returns Debouncer instance\n */\nexport class Debouncer {\n requestSets = []>[]; // new Set(); // collection of requested attributes\n promisedCalls: Promised[] = []; // When requesting a price we return a deferred promise\n promisedCount = 0; // New request coming when setTimeout is executing will make a new promise\n timeout?: ReturnType;\n debounceCancel = (): void => {}; // Allow to cancel mid-flight requests\n\n constructor(\n private fn: (attrs: A[]) => Promise,\n private wait = 200,\n private limit = 100\n ) {}\n\n fetch(attr?: A): Promise {\n this.requestSets[this.promisedCount] ||= new Set();\n\n // Accumulate attributes for debounced execution\n if (attr) {\n this.requestSets[this.promisedCount].add(attr);\n }\n\n // Execute immediately when limit is reached\n if (this.requestSets[this.promisedCount].size >= this.limit) {\n return this.execute(0);\n }\n\n // Return a running promise\n if (this.promisedCalls[this.promisedCount]) {\n return this.promisedCalls[this.promisedCount].promise;\n }\n\n // If no promise is running, start a new one\n return this.execute(this.wait);\n }\n\n execute(timeout = 0): Promise {\n // if no promise is running, start a new one\n if (!this.promisedCalls[this.promisedCount]) {\n this.promisedCalls[this.promisedCount] = makePromise();\n }\n\n const { promise, resolve, reject } = this.promisedCalls[this.promisedCount];\n\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n\n const call = () => {\n const requestAttrs = [...this.requestSets[this.promisedCount]];\n this.promisedCount++;\n this.fn(requestAttrs)\n .then((results) => {\n resolve(results);\n this.debounceCancel = () => {};\n })\n .catch((reason) => {\n if (\n reason.response &&\n reason.response.data &&\n reason.response.data.error\n ) {\n reason = reason.response.data.error;\n }\n reject(reason);\n });\n };\n\n if (timeout > 0) {\n this.timeout = setTimeout(call.bind(this), timeout);\n } else {\n call();\n }\n\n this.debounceCancel = () => {\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n reject('Cancelled');\n delete this.promisedCalls[this.promisedCount];\n };\n\n return promise;\n }\n}\n","import {\n BigNumber,\n BigNumberish,\n parseFixed as _parseFixed,\n formatFixed as _formatFixed,\n} from '@ethersproject/bignumber';\n\n/**\n * Scales a number up by 10 ^ decimals. Also ensures the returned value is an\n * integer, any additional decimals post scaling are removed.\n * @param value The value to be scaled up\n * @param decimals The total decimal places / order of magnitude to scale by\n * @returns The scaled value\n */\nexport function parseFixed(value: string, decimals?: BigNumberish): BigNumber {\n const valueWithTrimmedDecimals = new RegExp(`[0-9]+\\\\.?[0-9]{0,${decimals}}`);\n const result = value.match(valueWithTrimmedDecimals);\n let parsedValue = value;\n if (result) {\n parsedValue = result[0];\n }\n\n return _parseFixed(parsedValue, decimals);\n}\n\n/**\n * Scales a number down by 10 ^ decimals. Also ensures the returned value doesn't\n * have a .0 at the end, so integers are returned as integers.\n * @param value The value to be scaled down\n * @param decimals The total decimal places / order of magnitude to scale down by\n * @returns The scaled value\n */\nexport function formatFixed(\n value: BigNumberish,\n decimals: BigNumberish\n): string {\n const ethersFormat = _formatFixed(value, decimals);\n return ethersFormat.replace(/(.0$)/, '');\n}\n\nexport function parseToBigInt18(value: string): bigint {\n return parseFixed(value, 18).toBigInt();\n}\n\nexport function formatFromBigInt18(value: bigint): string {\n return _formatFixed(BigNumber.from(value), 18);\n}\n\n/**\n * Like parseEther but for numbers. Converts floating point to BigNumber using 18 decimals\n */\nexport const bn = (value: number): BigNumber => _parseFixed(`${value}`, 18);\n","import { BigNumber } from '@ethersproject/bignumber';\n\nconst bpsPerOne = BigNumber.from('10000'); // number of basis points in 100%\n\n/**\n * Multiplies input by slippage amount\n *\n * @param amount Input amount (not parsed)\n * @param slippage Slippage value in bps - i.e. 50 = 0.5%\n * @returns Result delta from multiplying amount and slippage\n */\nexport const mulSlippage = (\n amount: BigNumber,\n slippage: BigNumber\n): BigNumber => {\n const delta = amount.mul(slippage).div(bpsPerOne);\n return delta;\n};\n\n/**\n * Reduce input amount by slippage factor\n *\n * @param amount Input in EVM amounts\n * @param slippage Slippage value in bps - i.e. 50 = 0.5%\n * @returns Result amount subtracting slippage\n */\nexport const subSlippage = (\n amount: BigNumber,\n slippage: BigNumber\n): BigNumber => {\n const delta = mulSlippage(amount, slippage);\n return amount.sub(delta);\n};\n\n/**\n * Increase input amount by slippage factor\n *\n * @param amount Input in EVM amounts\n * @param slippage Slippage value in bps - i.e. 50 = 0.5%\n * @returns Result amount adding slippage\n */\nexport const addSlippage = (\n amount: BigNumber,\n slippage: BigNumber\n): BigNumber => {\n const delta = mulSlippage(amount, slippage);\n return amount.add(delta);\n};\n","import { Address, PoolType } from '@/types';\nimport { getAddress } from '@ethersproject/address';\nimport { Log, TransactionReceipt } from '@ethersproject/providers';\nimport { Interface, LogDescription } from '@ethersproject/abi';\nimport { Logger } from '@/lib/utils/logger';\n\nexport * from './assetHelpers';\nexport * from './errors';\nexport * from './permit';\nexport * from './poolHelper';\nexport * from './signatures';\nexport * from './tokens';\nexport * from './debouncer';\nexport * from './math';\nexport * from './slippageHelper';\n\nexport const isSameAddress = (address1: string, address2: string): boolean =>\n getAddress(address1) === getAddress(address2);\n\nexport function insert(arr: T[], index: number, newItem: T): T[] {\n if (index < 0 || index > arr.length) {\n return arr;\n }\n return [\n // part of the array before the specified index\n ...arr.slice(0, index),\n // inserted item\n newItem,\n // part of the array after the specified index\n ...arr.slice(index),\n ];\n}\n\n/**\n * Returns a new array with item on the specified index replaced by newItem\n * @param arr\n * @param index\n * @param newItem\n */\nexport function replace(arr: T[], index: number, newItem: T): T[] {\n if (index < 0 || index >= arr.length) {\n return arr;\n }\n return [\n // part of the array before the specified index\n ...arr.slice(0, index),\n // inserted item\n newItem,\n // part of the array after the specified index\n ...arr.slice(index + 1),\n ];\n}\n\n/**\n * Removes item from array at specified index and returns new array. (Does not mutate original)\n * @param arr Original array\n * @param index Index of item to be removed\n * @returns New array with item at index removed\n */\nexport function removeItem(arr: T[], index: number): T[] {\n const newArray = [...arr];\n if (index < 0 || index >= arr.length) {\n return newArray;\n }\n newArray.splice(index, 1);\n return newArray;\n}\n\n/**\n * REORDER ARRAYS USING A REFERENCE AND ORIGINAL ARRAY,\n * Example:\n * Input -> reference: [c,b,a], original: [a,b,c], others: [[1,2,3], [4,5,6]]\n * Sorts like -> [[c,b,a],[3,2,1],[6,5,4]]\n * Returns -> [6,5,4]\n * @param reference\n * @param original\n * @param others\n * @returns Sorted others\n */\nexport function reorderArrays(\n reference: T[],\n original: T[],\n ...others: unknown[][]\n): unknown[][] {\n if (\n reference.length !== original.length ||\n others.some((arr) => arr.length !== original.length)\n ) {\n throw new Error('Array length mismatch');\n }\n const indexesOfOriginal = reference.map((value) => original.indexOf(value));\n if (indexesOfOriginal.indexOf(-1) >= 0) {\n throw new Error('Invalid reference or original array');\n }\n const othersResorted: unknown[][] = [];\n indexesOfOriginal.forEach((indexOfOriginal, i) => {\n others.forEach((arr, arrIndex) => {\n if (!othersResorted[arrIndex]) {\n othersResorted[arrIndex] = [];\n }\n othersResorted[arrIndex][i] = arr[indexOfOriginal];\n });\n });\n return othersResorted;\n}\n\nexport function isLinearish(poolType: string): boolean {\n const supportedPoolTypes: string[] = Object.values(PoolType);\n if (poolType.includes('Linear') && supportedPoolTypes.includes(poolType))\n return true;\n else return false;\n}\n\nexport function truncateAddresses(addresses: string[]): string[] {\n return addresses.map((t) => `${t.slice(0, 6)}...${t.slice(38, 42)}`);\n}\n\nexport const findEventInReceiptLogs = ({\n receipt,\n to,\n contractInterface,\n logName,\n}: {\n receipt: TransactionReceipt;\n to: Address;\n contractInterface: Interface;\n logName: string;\n}): LogDescription => {\n const event = receipt.logs\n .filter((log: Log) => {\n return isSameAddress(log.address, to);\n })\n .map((log) => {\n try {\n return contractInterface.parseLog(log);\n } catch (error) {\n const logger = Logger.getInstance();\n logger.warn(error as string);\n return null;\n }\n })\n .find((parsedLog) => parsedLog?.name === logName);\n if (!event) {\n throw new Error('Event not found in logs');\n }\n return event;\n};\n\nexport const getRandomBytes32 = (): string => {\n const getRandomBytes8 = () => Math.random().toString(16).slice(2, 10);\n const randomBytes32 = Array(8).fill(null).map(getRandomBytes8).join('');\n return `0x${randomBytes32}`;\n};\n","import { GraphQLArgs, GraphQLArgsFormatter } from '../types';\n\nexport class BalancerAPIArgsFormatter implements GraphQLArgsFormatter {\n format(args: GraphQLArgs): GraphQLArgs {\n return args;\n }\n}\n","import { GraphQLArgs, GraphQLArgsFormatter, GraphQLFilter } from '../types';\n\nexport class SubgraphArgsFormatter implements GraphQLArgsFormatter {\n operatorMap: Record;\n\n constructor() {\n this.operatorMap = {\n gt: '_gt',\n lt: '_lt',\n eq: '',\n in: '_in',\n not_in: '_not_in',\n contains: '_contains',\n };\n }\n\n format(args: GraphQLArgs): GraphQLArgs {\n const whereQuery: Record = {};\n if (args.where) {\n Object.entries(args.where).forEach(([name, filter]) => {\n Object.entries(filter).forEach(([operator, value]) => {\n whereQuery[`${name}${this.operatorMap[operator]}`] = value;\n });\n });\n }\n\n return {\n ...args,\n ...{ where: whereQuery },\n };\n }\n}\n","import { mergeWith } from 'lodash';\nimport { GraphQLArgs, GraphQLArgsFormatter } from './types';\n\nexport * from './formatters';\n\nexport class GraphQLArgsBuilder {\n constructor(readonly args: GraphQLArgs) {}\n\n merge(other: GraphQLArgsBuilder): GraphQLArgsBuilder {\n const mergedArgs = mergeWith(\n this.args,\n other.args,\n (objValue: unknown, srcValue: unknown) => {\n if (Array.isArray(objValue)) {\n return objValue.concat(srcValue);\n }\n }\n );\n\n return new GraphQLArgsBuilder(mergedArgs);\n }\n\n format(formatter: GraphQLArgsFormatter): unknown {\n return formatter.format(this.args);\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n AaveLinearPool,\n AaveLinearPoolInterface,\n} from \"../AaveLinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct AaveLinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class AaveLinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): AaveLinearPoolInterface {\n return new utils.Interface(_abi) as AaveLinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): AaveLinearPool {\n return new Contract(address, _abi, signerOrProvider) as AaveLinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n AaveLinearPoolFactory,\n AaveLinearPoolFactoryInterface,\n} from \"../AaveLinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"AaveLinearPoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract AaveLinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class AaveLinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): AaveLinearPoolFactoryInterface {\n return new utils.Interface(_abi) as AaveLinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): AaveLinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as AaveLinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { AaveWrapping, AaveWrappingInterface } from \"../AaveWrapping\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approveVault\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStaticATokenLM\",\n name: \"staticToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"toUnderlying\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapAaveStaticToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStaticATokenLM\",\n name: \"staticToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"fromUnderlying\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapAaveDynamicToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n] as const;\n\nexport class AaveWrapping__factory {\n static readonly abi = _abi;\n static createInterface(): AaveWrappingInterface {\n return new utils.Interface(_abi) as AaveWrappingInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): AaveWrapping {\n return new Contract(address, _abi, signerOrProvider) as AaveWrapping;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { Authoriser, AuthoriserInterface } from \"../Authoriser\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"admin\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"previousAdminRole\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"newAdminRole\",\n type: \"bytes32\",\n },\n ],\n name: \"RoleAdminChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n ],\n name: \"RoleGranted\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n ],\n name: \"RoleRevoked\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DEFAULT_ADMIN_ROLE\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"actionId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n name: \"canPerform\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n ],\n name: \"getRoleAdmin\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\",\n },\n ],\n name: \"getRoleMember\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n ],\n name: \"getRoleMemberCount\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"grantRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"roles\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"grantRoles\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"roles\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"address[]\",\n name: \"accounts\",\n type: \"address[]\",\n },\n ],\n name: \"grantRolesToMany\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"hasRole\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"renounceRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"revokeRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"roles\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"revokeRoles\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"roles\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"address[]\",\n name: \"accounts\",\n type: \"address[]\",\n },\n ],\n name: \"revokeRolesFromMany\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class Authoriser__factory {\n static readonly abi = _abi;\n static createInterface(): AuthoriserInterface {\n return new utils.Interface(_abi) as AuthoriserInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): Authoriser {\n return new Contract(address, _abi, signerOrProvider) as Authoriser;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BalancerHelpers,\n BalancerHelpersInterface,\n} from \"../BalancerHelpers\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"_vault\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"minAmountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.ExitPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"maxAmountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.JoinPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"vault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class BalancerHelpers__factory {\n static readonly abi = _abi;\n static createInterface(): BalancerHelpersInterface {\n return new utils.Interface(_abi) as BalancerHelpersInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BalancerHelpers {\n return new Contract(address, _abi, signerOrProvider) as BalancerHelpers;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BalancerMinter,\n BalancerMinterInterface,\n} from \"../BalancerMinter\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IBalancerTokenAdmin\",\n name: \"tokenAdmin\",\n type: \"address\",\n },\n {\n internalType: \"contract IGaugeController\",\n name: \"gaugeController\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"minted\",\n type: \"uint256\",\n },\n ],\n name: \"Minted\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"approval\",\n type: \"bool\",\n },\n ],\n name: \"MinterApprovalSet\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"allowed_to_mint_for\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBalancerToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBalancerTokenAdmin\",\n outputs: [\n {\n internalType: \"contract IBalancerTokenAdmin\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getGaugeController\",\n outputs: [\n {\n internalType: \"contract IGaugeController\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"getMinterApproval\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n ],\n name: \"mint\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"mintFor\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n ],\n name: \"mintMany\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"mintManyFor\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"mint_for\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[8]\",\n name: \"gauges\",\n type: \"address[8]\",\n },\n ],\n name: \"mint_many\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n ],\n name: \"minted\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"approval\",\n type: \"bool\",\n },\n ],\n name: \"setMinterApproval\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"approval\",\n type: \"bool\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"setMinterApprovalWithSignature\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n ],\n name: \"toggle_approve_mint\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class BalancerMinter__factory {\n static readonly abi = _abi;\n static createInterface(): BalancerMinterInterface {\n return new utils.Interface(_abi) as BalancerMinterInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BalancerMinter {\n return new Contract(address, _abi, signerOrProvider) as BalancerMinter;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BalancerPoolDataQueries,\n BalancerPoolDataQueriesInterface,\n} from \"../BalancerPoolDataQueries\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"_vault\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getAmpForPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getInRecoveryModeForPools\",\n outputs: [\n {\n internalType: \"bool[]\",\n name: \"\",\n type: \"bool[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getIsPausedForPools\",\n outputs: [\n {\n internalType: \"bool[]\",\n name: \"\",\n type: \"bool[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getLinearTargetsForPools\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"\",\n type: \"uint256[][]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getNormalizedWeightsForPools\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"\",\n type: \"uint256[][]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"poolIds\",\n type: \"bytes32[]\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"loadTokenBalanceUpdatesAfterBlock\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadTotalSupply\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadSwapFees\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadLinearWrappedTokenRates\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadLinearTargets\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadNormalizedWeights\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadScalingFactors\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadAmps\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadRates\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n internalType: \"enum TotalSupplyType[]\",\n name: \"totalSupplyTypes\",\n type: \"uint8[]\",\n },\n {\n internalType: \"enum SwapFeeType[]\",\n name: \"swapFeeTypes\",\n type: \"uint8[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"linearPoolIdxs\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"weightedPoolIdxs\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"scalingFactorPoolIdxs\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"ampPoolIdxs\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"ratePoolIdxs\",\n type: \"uint256[]\",\n },\n ],\n internalType: \"struct PoolDataQueryConfig\",\n name: \"config\",\n type: \"tuple\",\n },\n ],\n name: \"getPoolData\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"balances\",\n type: \"uint256[][]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"totalSupplies\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"swapFees\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"linearWrappedTokenRates\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[][]\",\n name: \"linearTargets\",\n type: \"uint256[][]\",\n },\n {\n internalType: \"uint256[][]\",\n name: \"weights\",\n type: \"uint256[][]\",\n },\n {\n internalType: \"uint256[][]\",\n name: \"scalingFactors\",\n type: \"uint256[][]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amps\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"rates\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"ignoreIdxs\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"poolIds\",\n type: \"bytes32[]\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"loadInRecoveryMode\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadIsPaused\",\n type: \"bool\",\n },\n ],\n internalType: \"struct PoolStatusQueryConfig\",\n name: \"config\",\n type: \"tuple\",\n },\n ],\n name: \"getPoolStatus\",\n outputs: [\n {\n internalType: \"bool[]\",\n name: \"isPaused\",\n type: \"bool[]\",\n },\n {\n internalType: \"bool[]\",\n name: \"inRecoveryMode\",\n type: \"bool[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"poolIds\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n ],\n name: \"getPoolTokenBalancesWithUpdatesAfterBlock\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"\",\n type: \"uint256[][]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getRateForPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getScalingFactorsForPools\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"\",\n type: \"uint256[][]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n {\n internalType: \"enum SwapFeeType[]\",\n name: \"swapFeeTypes\",\n type: \"uint8[]\",\n },\n ],\n name: \"getSwapFeePercentageForPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n {\n internalType: \"enum TotalSupplyType[]\",\n name: \"totalSupplyTypes\",\n type: \"uint8[]\",\n },\n ],\n name: \"getTotalSupplyForPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getWrappedTokenRateForLinearPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"vault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class BalancerPoolDataQueries__factory {\n static readonly abi = _abi;\n static createInterface(): BalancerPoolDataQueriesInterface {\n return new utils.Interface(_abi) as BalancerPoolDataQueriesInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BalancerPoolDataQueries {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as BalancerPoolDataQueries;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BalancerRelayer,\n BalancerRelayerInterface,\n} from \"../BalancerRelayer\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"libraryAddress\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [],\n name: \"getLibrary\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes[]\",\n name: \"data\",\n type: \"bytes[]\",\n },\n ],\n name: \"multicall\",\n outputs: [\n {\n internalType: \"bytes[]\",\n name: \"results\",\n type: \"bytes[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n stateMutability: \"payable\",\n type: \"receive\",\n },\n] as const;\n\nexport class BalancerRelayer__factory {\n static readonly abi = _abi;\n static createInterface(): BalancerRelayerInterface {\n return new utils.Interface(_abi) as BalancerRelayerInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BalancerRelayer {\n return new Contract(address, _abi, signerOrProvider) as BalancerRelayer;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BatchRelayerLibrary,\n BatchRelayerLibraryInterface,\n} from \"../BatchRelayerLibrary\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wstETH\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerMinter\",\n name: \"minter\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approveVault\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"assetInIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"assetOutIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.BatchSwapStep[]\",\n name: \"swaps\",\n type: \"tuple[]\",\n },\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"int256[]\",\n name: \"limits\",\n type: \"int256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"key\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct VaultActions.OutputReference[]\",\n name: \"outputReferences\",\n type: \"tuple[]\",\n },\n ],\n name: \"batchSwap\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum VaultActions.PoolKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"minAmountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.ExitPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"key\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct VaultActions.OutputReference[]\",\n name: \"outputReferences\",\n type: \"tuple[]\",\n },\n ],\n name: \"exitPool\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStakingLiquidityGauge[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n ],\n name: \"gaugeClaimRewards\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStakingLiquidityGauge\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"gaugeDeposit\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"gaugeMint\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"approval\",\n type: \"bool\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"gaugeSetMinterApproval\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStakingLiquidityGauge\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"gaugeWithdraw\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getEntrypoint\",\n outputs: [\n {\n internalType: \"contract IBalancerRelayer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum VaultActions.PoolKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"maxAmountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.JoinPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"joinPool\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.UserBalanceOpKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"asset\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n ],\n internalType: \"struct IVault.UserBalanceOp[]\",\n name: \"ops\",\n type: \"tuple[]\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"manageUserBalance\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"ref\",\n type: \"uint256\",\n },\n ],\n name: \"peekChainedReferenceValue\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"relayer\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"authorisation\",\n type: \"bytes\",\n },\n ],\n name: \"setRelayerApproval\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"stakeETH\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"stakeETHAndWrap\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.SingleSwap\",\n name: \"singleSwap\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"limit\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"swap\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStaticATokenLM\",\n name: \"staticToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"toUnderlying\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapAaveStaticToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract ICToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapCompoundV2\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC4626\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapERC4626\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IEulerToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapEuler\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IGearboxDieselToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"dieselAmount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapGearbox\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IReaperTokenVault\",\n name: \"vaultToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapReaperVaultToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IShareToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapShareToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract ITetuSmartVault\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapTetu\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IUnbuttonToken\",\n name: \"wrapperToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapUnbuttonToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapWstETH\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IYearnTokenVault\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapYearn\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20Permit\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"vaultPermit\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20PermitDAI\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"holder\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"expiry\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"allowed\",\n type: \"bool\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"vaultPermitDAI\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStaticATokenLM\",\n name: \"staticToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"fromUnderlying\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapAaveDynamicToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract ICToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapCompoundV2\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC4626\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapERC4626\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IEulerToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"eulerProtocol\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapEuler\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IGearboxDieselToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"mainAmount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapGearbox\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IReaperTokenVault\",\n name: \"vaultToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapReaperVaultToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IShareToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapShareToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapStETH\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract ITetuSmartVault\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapTetu\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IUnbuttonToken\",\n name: \"wrapperToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"uAmount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapUnbuttonToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IYearnTokenVault\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapYearn\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n] as const;\n\nexport class BatchRelayerLibrary__factory {\n static readonly abi = _abi;\n static createInterface(): BatchRelayerLibraryInterface {\n return new utils.Interface(_abi) as BatchRelayerLibraryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BatchRelayerLibrary {\n return new Contract(address, _abi, signerOrProvider) as BatchRelayerLibrary;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ComposableStablePool,\n ComposableStablePoolInterface,\n} from \"../ComposableStablePool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"tokenRateCacheDurations\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bool[]\",\n name: \"exemptFromYieldProtocolFeeFlags\",\n type: \"bool[]\",\n },\n {\n internalType: \"uint256\",\n name: \"amplificationParameter\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n internalType: \"struct ComposableStablePool.NewPoolParams\",\n name: \"params\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"startValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"endValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"startTime\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"endTime\",\n type: \"uint256\",\n },\n ],\n name: \"AmpUpdateStarted\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"currentValue\",\n type: \"uint256\",\n },\n ],\n name: \"AmpUpdateStopped\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"feeType\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"protocolFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"ProtocolFeePercentageCacheUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenIndex\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"rate\",\n type: \"uint256\",\n },\n ],\n name: \"TokenRateCacheUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenIndex\",\n type: \"uint256\",\n },\n {\n indexed: true,\n internalType: \"contract IRateProvider\",\n name: \"provider\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"cacheDuration\",\n type: \"uint256\",\n },\n ],\n name: \"TokenRateProviderSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getActualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAmplificationParameter\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"isUpdating\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"precision\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastJoinExitData\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lastJoinExitAmplification\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"lastPostJoinExitInvariant\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMinimumBpt\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"feeType\",\n type: \"uint256\",\n },\n ],\n name: \"getProtocolFeePercentageCache\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolSwapFeeDelegation\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRateProviders\",\n outputs: [\n {\n internalType: \"contract IRateProvider[]\",\n name: \"\",\n type: \"address[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"getTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"getTokenRateCache\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"rate\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"oldRate\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"duration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"expires\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"isTokenExemptFromYieldProtocolFee\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"swapRequest\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"poolConfig\",\n type: \"bytes\",\n },\n ],\n name: \"setAssetManagerPoolConfig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"duration\",\n type: \"uint256\",\n },\n ],\n name: \"setTokenRateCacheDuration\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"rawEndValue\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"endTime\",\n type: \"uint256\",\n },\n ],\n name: \"startAmplificationParameterUpdate\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"stopAmplificationParameterUpdate\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"updateProtocolFeePercentageCache\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"updateTokenRateCache\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class ComposableStablePool__factory {\n static readonly abi = _abi;\n static createInterface(): ComposableStablePoolInterface {\n return new utils.Interface(_abi) as ComposableStablePoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ComposableStablePool {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as ComposableStablePool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ComposableStablePoolFactory,\n ComposableStablePoolFactoryInterface,\n} from \"../ComposableStablePoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"amplificationParameter\",\n type: \"uint256\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"tokenRateCacheDurations\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bool[]\",\n name: \"exemptFromYieldProtocolFeeFlags\",\n type: \"bool[]\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract ComposableStablePool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class ComposableStablePoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): ComposableStablePoolFactoryInterface {\n return new utils.Interface(_abi) as ComposableStablePoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ComposableStablePoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as ComposableStablePoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ConvergentCurvePool,\n ConvergentCurvePoolInterface,\n} from \"../ConvergentCurvePool\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"_underlying\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"_bond\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"_expiration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_unitSeconds\",\n type: \"uint256\",\n },\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"_percentFee\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_percentFeeGov\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"_governance\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"collectedBase\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"collectedBond\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"remainingBase\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"remainingBond\",\n type: \"uint256\",\n },\n ],\n name: \"FeeCollection\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"FEE_BOUND\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"bond\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"bondDecimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseApproval\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"expiration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"feesBond\",\n outputs: [\n {\n internalType: \"uint128\",\n name: \"\",\n type: \"uint128\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"feesUnderlying\",\n outputs: [\n {\n internalType: \"uint128\",\n name: \"\",\n type: \"uint128\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"governance\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"increaseApproval\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"currentBalances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFee\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"currentBalances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFee\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"swapRequest\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"currentBalanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"currentBalanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"percentFee\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"percentFeeGov\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amountX\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"reserveX\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"reserveY\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"out\",\n type: \"bool\",\n },\n ],\n name: \"solveTradeInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"underlying\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"underlyingDecimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unitSeconds\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class ConvergentCurvePool__factory {\n static readonly abi = _abi;\n static createInterface(): ConvergentCurvePoolInterface {\n return new utils.Interface(_abi) as ConvergentCurvePoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ConvergentCurvePool {\n return new Contract(address, _abi, signerOrProvider) as ConvergentCurvePool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { ERC20, ERC20Interface } from \"../ERC20\";\n\nconst _abi = [\n {\n constant: true,\n inputs: [],\n name: \"name\",\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_from\",\n type: \"address\",\n },\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n name: \"\",\n type: \"uint8\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n name: \"balance\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n },\n {\n name: \"_spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n payable: true,\n stateMutability: \"payable\",\n type: \"fallback\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n] as const;\n\nexport class ERC20__factory {\n static readonly abi = _abi;\n static createInterface(): ERC20Interface {\n return new utils.Interface(_abi) as ERC20Interface;\n }\n static connect(address: string, signerOrProvider: Signer | Provider): ERC20 {\n return new Contract(address, _abi, signerOrProvider) as ERC20;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ERC4626LinearPool,\n ERC4626LinearPoolInterface,\n} from \"../ERC4626LinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct ERC4626LinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class ERC4626LinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): ERC4626LinearPoolInterface {\n return new utils.Interface(_abi) as ERC4626LinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ERC4626LinearPool {\n return new Contract(address, _abi, signerOrProvider) as ERC4626LinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ERC4626LinearPoolFactory,\n ERC4626LinearPoolFactoryInterface,\n} from \"../ERC4626LinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"Erc4626LinearPoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract LinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class ERC4626LinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): ERC4626LinearPoolFactoryInterface {\n return new utils.Interface(_abi) as ERC4626LinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ERC4626LinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as ERC4626LinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n EulerLinearPool,\n EulerLinearPoolInterface,\n} from \"../EulerLinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct EulerLinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class EulerLinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): EulerLinearPoolInterface {\n return new utils.Interface(_abi) as EulerLinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): EulerLinearPool {\n return new Contract(address, _abi, signerOrProvider) as EulerLinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n EulerLinearPoolFactory,\n EulerLinearPoolFactoryInterface,\n} from \"../EulerLinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"_eulerProtocol\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"EulerLinearPoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract LinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"eulerProtocol\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class EulerLinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): EulerLinearPoolFactoryInterface {\n return new utils.Interface(_abi) as EulerLinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): EulerLinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as EulerLinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { FXPool, FXPoolInterface } from \"../FXPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"_assetsToRegister\",\n type: \"address[]\",\n },\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"_protocolPercentFee\",\n type: \"uint256\",\n },\n {\n internalType: \"string\",\n name: \"_name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"_symbol\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"numeraire\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"reserve\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"weight\",\n type: \"uint256\",\n },\n ],\n name: \"AssetIncluded\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"derivative\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"numeraire\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"reserve\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"assimilator\",\n type: \"address\",\n },\n ],\n name: \"AssimilatorIncluded\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"newCollector\",\n type: \"address\",\n },\n ],\n name: \"ChangeCollectorAddress\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"isEmergency\",\n type: \"bool\",\n },\n ],\n name: \"EmergencyAlarm\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lptAmountBurned\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"amountsWithdrawn\",\n type: \"uint256[]\",\n },\n ],\n name: \"EmergencyWithdraw\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"feesCollected\",\n type: \"uint256\",\n },\n ],\n name: \"FeesAccrued\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"feesCollected\",\n type: \"uint256\",\n },\n ],\n name: \"FeesCollected\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lptAmountBurned\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"amountsWithdrawn\",\n type: \"uint256[]\",\n },\n ],\n name: \"OnExitPool\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lptAmountMinted\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"amountsDeposited\",\n type: \"uint256[]\",\n },\n ],\n name: \"OnJoinPool\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\",\n },\n ],\n name: \"OwnershipTransferred\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"alpha\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"beta\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"delta\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"epsilon\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lambda\",\n type: \"uint256\",\n },\n ],\n name: \"ParametersSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"Paused\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"updater\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newProtocolPercentage\",\n type: \"uint256\",\n },\n ],\n name: \"ProtocolFeeShareUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"trader\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"origin\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"originAmount\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"targetAmount\",\n type: \"uint256\",\n },\n ],\n name: \"Trade\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"Unpaused\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_derivative\",\n type: \"address\",\n },\n ],\n name: \"assimilator\",\n outputs: [\n {\n internalType: \"address\",\n name: \"assimilator_\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"collectorAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"curve\",\n outputs: [\n {\n internalType: \"int128\",\n name: \"alpha\",\n type: \"int128\",\n },\n {\n internalType: \"int128\",\n name: \"beta\",\n type: \"int128\",\n },\n {\n internalType: \"int128\",\n name: \"delta\",\n type: \"int128\",\n },\n {\n internalType: \"int128\",\n name: \"epsilon\",\n type: \"int128\",\n },\n {\n internalType: \"int128\",\n name: \"lambda\",\n type: \"int128\",\n },\n {\n internalType: \"uint256\",\n name: \"cap\",\n type: \"uint256\",\n },\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"fxPoolAddress\",\n type: \"address\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n name: \"derivatives\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"emergency\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"_assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"_assetWeights\",\n type: \"uint256[]\",\n },\n ],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"liquidity\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"total_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"individual_\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n name: \"numeraires\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"swapRequest\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"paused\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"protocolPercentFee\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"renounceOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n name: \"reserves\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_cap\",\n type: \"uint256\",\n },\n ],\n name: \"setCap\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_collectorAddress\",\n type: \"address\",\n },\n ],\n name: \"setCollectorAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"_emergency\",\n type: \"bool\",\n },\n ],\n name: \"setEmergency\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_alpha\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_beta\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_feeAtHalt\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_epsilon\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_lambda\",\n type: \"uint256\",\n },\n ],\n name: \"setParams\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_protocolPercentFee\",\n type: \"uint256\",\n },\n ],\n name: \"setProtocolPercentFee\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalUnclaimedFeesInNumeraire\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\",\n },\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"totalDepositNumeraire\",\n type: \"uint256\",\n },\n ],\n name: \"viewDeposit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"viewParameters\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"alpha_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"beta_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"delta_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"epsilon_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"lambda_\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_curvesToBurn\",\n type: \"uint256\",\n },\n ],\n name: \"viewWithdraw\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class FXPool__factory {\n static readonly abi = _abi;\n static createInterface(): FXPoolInterface {\n return new utils.Interface(_abi) as FXPoolInterface;\n }\n static connect(address: string, signerOrProvider: Signer | Provider): FXPool {\n return new Contract(address, _abi, signerOrProvider) as FXPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n GaugeClaimHelper,\n GaugeClaimHelperInterface,\n} from \"../GaugeClaimHelper\";\n\nconst _abi = [\n {\n inputs: [],\n name: \"CLAIM_FREQUENCY\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IRewardsOnlyGauge\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"claimRewardsFromGauge\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IRewardsOnlyGauge[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"claimRewardsFromGauges\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IRewardsOnlyGauge\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"getPendingRewards\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class GaugeClaimHelper__factory {\n static readonly abi = _abi;\n static createInterface(): GaugeClaimHelperInterface {\n return new utils.Interface(_abi) as GaugeClaimHelperInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GaugeClaimHelper {\n return new Contract(address, _abi, signerOrProvider) as GaugeClaimHelper;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n GearboxLinearPool,\n GearboxLinearPoolInterface,\n} from \"../GearboxLinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct GearboxLinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class GearboxLinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): GearboxLinearPoolInterface {\n return new utils.Interface(_abi) as GearboxLinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GearboxLinearPool {\n return new Contract(address, _abi, signerOrProvider) as GearboxLinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n GearboxLinearPoolFactory,\n GearboxLinearPoolFactoryInterface,\n} from \"../GearboxLinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"GearboxLinearPoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract GearboxLinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class GearboxLinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): GearboxLinearPoolFactoryInterface {\n return new utils.Interface(_abi) as GearboxLinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GearboxLinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as GearboxLinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { GyroConfig, GyroConfigInterface } from \"../GyroConfig\";\n\nconst _abi = [\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"previousValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newValue\",\n type: \"uint256\",\n },\n ],\n name: \"ConfigChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"ConfigFrozen\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"ConfigUnset\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"newGovernor\",\n type: \"address\",\n },\n ],\n name: \"GovernorChangeRequested\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"oldGovernor\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"newGovernor\",\n type: \"address\",\n },\n ],\n name: \"GovernorChanged\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"acceptGovernance\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newGovernor\",\n type: \"address\",\n },\n ],\n name: \"changeGovernor\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"freeze\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"defaultValue\",\n type: \"address\",\n },\n ],\n name: \"getAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"getAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"getConfigMeta\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"getUint\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"governor\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"hasKey\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_governor\",\n type: \"address\",\n },\n ],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"listKeys\",\n outputs: [\n {\n internalType: \"bytes32[]\",\n name: \"\",\n type: \"bytes32[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pendingGovernor\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"newValue\",\n type: \"address\",\n },\n ],\n name: \"setAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"newValue\",\n type: \"uint256\",\n },\n ],\n name: \"setUint\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"unset\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class GyroConfig__factory {\n static readonly abi = _abi;\n static createInterface(): GyroConfigInterface {\n return new utils.Interface(_abi) as GyroConfigInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GyroConfig {\n return new Contract(address, _abi, signerOrProvider) as GyroConfig;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { LidoRelayer, LidoRelayerInterface } from \"../LidoRelayer\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IwstETH\",\n name: \"wstETH\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"assetInIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"assetOutIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.BatchSwapStep[]\",\n name: \"swaps\",\n type: \"tuple[]\",\n },\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"int256[]\",\n name: \"limits\",\n type: \"int256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n ],\n name: \"batchSwap\",\n outputs: [\n {\n internalType: \"int256[]\",\n name: \"swapAmounts\",\n type: \"int256[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"minAmountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.ExitPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"exitPool\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getStETH\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWstETH\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"maxAmountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.JoinPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"joinPool\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.SingleSwap\",\n name: \"singleSwap\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"limit\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n ],\n name: \"swap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"swapAmount\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n stateMutability: \"payable\",\n type: \"receive\",\n },\n] as const;\n\nexport class LidoRelayer__factory {\n static readonly abi = _abi;\n static createInterface(): LidoRelayerInterface {\n return new utils.Interface(_abi) as LidoRelayerInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): LidoRelayer {\n return new Contract(address, _abi, signerOrProvider) as LidoRelayer;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { LinearPool, LinearPoolInterface } from \"../LinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"poolConfig\",\n type: \"bytes\",\n },\n ],\n name: \"setAssetManagerPoolConfig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class LinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): LinearPoolInterface {\n return new utils.Interface(_abi) as LinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): LinearPool {\n return new Contract(address, _abi, signerOrProvider) as LinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n LiquidityGaugeV5,\n LiquidityGaugeV5Interface,\n} from \"../LiquidityGaugeV5\";\n\nconst _abi = [\n {\n name: \"Deposit\",\n inputs: [\n {\n name: \"provider\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Withdraw\",\n inputs: [\n {\n name: \"provider\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"UpdateLiquidityLimit\",\n inputs: [\n {\n name: \"user\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"original_balance\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"original_supply\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"working_balance\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"working_supply\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Transfer\",\n inputs: [\n {\n name: \"_from\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"_to\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"_value\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Approval\",\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"_spender\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"_value\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n inputs: [\n {\n name: \"minter\",\n type: \"address\",\n },\n {\n name: \"veBoostProxy\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_addr\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_claim_rewards\",\n type: \"bool\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_claim_rewards\",\n type: \"bool\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"claim_rewards\",\n inputs: [],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"claim_rewards\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"claim_rewards\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_receiver\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"transferFrom\",\n inputs: [\n {\n name: \"_from\",\n type: \"address\",\n },\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"transfer\",\n inputs: [\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"approve\",\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"permit\",\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n },\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_deadline\",\n type: \"uint256\",\n },\n {\n name: \"_v\",\n type: \"uint8\",\n },\n {\n name: \"_r\",\n type: \"bytes32\",\n },\n {\n name: \"_s\",\n type: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"increaseAllowance\",\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_added_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"decreaseAllowance\",\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_subtracted_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"user_checkpoint\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"set_rewards_receiver\",\n inputs: [\n {\n name: \"_receiver\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"kick\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit_reward_token\",\n inputs: [\n {\n name: \"_reward_token\",\n type: \"address\",\n },\n {\n name: \"_amount\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"add_reward\",\n inputs: [\n {\n name: \"_reward_token\",\n type: \"address\",\n },\n {\n name: \"_distributor\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"set_reward_distributor\",\n inputs: [\n {\n name: \"_reward_token\",\n type: \"address\",\n },\n {\n name: \"_distributor\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"set_killed\",\n inputs: [\n {\n name: \"_is_killed\",\n type: \"bool\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"claimed_reward\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_token\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"claimable_reward\",\n inputs: [\n {\n name: \"_user\",\n type: \"address\",\n },\n {\n name: \"_reward_token\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"claimable_reward_write\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_token\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"claimable_tokens\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_checkpoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"future_epoch_time\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"inflation_rate\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"decimals\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"version\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"allowance\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n },\n {\n name: \"spender\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"initialize\",\n inputs: [\n {\n name: \"_lp_token\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"balanceOf\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"totalSupply\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"name\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"symbol\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"DOMAIN_SEPARATOR\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"nonces\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"factory\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"lp_token\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"is_killed\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"reward_count\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"reward_data\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n components: [\n {\n name: \"token\",\n type: \"address\",\n },\n {\n name: \"distributor\",\n type: \"address\",\n },\n {\n name: \"period_finish\",\n type: \"uint256\",\n },\n {\n name: \"rate\",\n type: \"uint256\",\n },\n {\n name: \"last_update\",\n type: \"uint256\",\n },\n {\n name: \"integral\",\n type: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"rewards_receiver\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"reward_integral_for\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n {\n name: \"arg1\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"working_balances\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"working_supply\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_inv_supply_of\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_checkpoint_of\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_fraction\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"period\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"int128\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"reward_tokens\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"period_timestamp\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_inv_supply\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n] as const;\n\nexport class LiquidityGaugeV5__factory {\n static readonly abi = _abi;\n static createInterface(): LiquidityGaugeV5Interface {\n return new utils.Interface(_abi) as LiquidityGaugeV5Interface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): LiquidityGaugeV5 {\n return new Contract(address, _abi, signerOrProvider) as LiquidityGaugeV5;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { Multicall, MulticallInterface } from \"../Multicall\";\n\nconst _abi = [\n {\n constant: false,\n inputs: [\n {\n components: [\n {\n name: \"target\",\n type: \"address\",\n },\n {\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate\",\n outputs: [\n {\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n name: \"returnData\",\n type: \"bytes[]\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class Multicall__factory {\n static readonly abi = _abi;\n static createInterface(): MulticallInterface {\n return new utils.Interface(_abi) as MulticallInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): Multicall {\n return new Contract(address, _abi, signerOrProvider) as Multicall;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { Multicall3, Multicall3Interface } from \"../Multicall3\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes[]\",\n name: \"returnData\",\n type: \"bytes[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"allowFailure\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call3[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate3\",\n outputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"allowFailure\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call3Value[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate3Value\",\n outputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"blockAndAggregate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"blockHash\",\n type: \"bytes32\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBasefee\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"basefee\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n ],\n name: \"getBlockHash\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"blockHash\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBlockNumber\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getChainId\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"chainid\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockCoinbase\",\n outputs: [\n {\n internalType: \"address\",\n name: \"coinbase\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockDifficulty\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"difficulty\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockGasLimit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"gaslimit\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockTimestamp\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"timestamp\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"addr\",\n type: \"address\",\n },\n ],\n name: \"getEthBalance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"balance\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastBlockHash\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"blockHash\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"requireSuccess\",\n type: \"bool\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"tryAggregate\",\n outputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"requireSuccess\",\n type: \"bool\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"tryBlockAndAggregate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"blockHash\",\n type: \"bytes32\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n] as const;\n\nexport class Multicall3__factory {\n static readonly abi = _abi;\n static createInterface(): Multicall3Interface {\n return new utils.Interface(_abi) as Multicall3Interface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): Multicall3 {\n return new Contract(address, _abi, signerOrProvider) as Multicall3;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { StablePool, StablePoolInterface } from \"../StablePool\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"amplificationParameter\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"startValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"endValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"startTime\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"endTime\",\n type: \"uint256\",\n },\n ],\n name: \"AmpUpdateStarted\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"currentValue\",\n type: \"uint256\",\n },\n ],\n name: \"AmpUpdateStopped\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAmplificationParameter\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"isUpdating\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"precision\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"swapRequest\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"poolConfig\",\n type: \"bytes\",\n },\n ],\n name: \"setAssetManagerPoolConfig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"rawEndValue\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"endTime\",\n type: \"uint256\",\n },\n ],\n name: \"startAmplificationParameterUpdate\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"stopAmplificationParameterUpdate\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class StablePool__factory {\n static readonly abi = _abi;\n static createInterface(): StablePoolInterface {\n return new utils.Interface(_abi) as StablePoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): StablePool {\n return new Contract(address, _abi, signerOrProvider) as StablePool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n StaticATokenRateProvider,\n StaticATokenRateProviderInterface,\n} from \"../StaticATokenRateProvider\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IStaticAToken\",\n name: \"_waToken\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"waToken\",\n outputs: [\n {\n internalType: \"contract IStaticAToken\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class StaticATokenRateProvider__factory {\n static readonly abi = _abi;\n static createInterface(): StaticATokenRateProviderInterface {\n return new utils.Interface(_abi) as StaticATokenRateProviderInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): StaticATokenRateProvider {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as StaticATokenRateProvider;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { Vault, VaultInterface } from \"../Vault\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"authorizer\",\n type: \"address\",\n },\n {\n internalType: \"contract IWETH\",\n name: \"weth\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IAuthorizer\",\n name: \"newAuthorizer\",\n type: \"address\",\n },\n ],\n name: \"AuthorizerChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"ExternalBalanceTransfer\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IFlashLoanRecipient\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"feeAmount\",\n type: \"uint256\",\n },\n ],\n name: \"FlashLoan\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"int256\",\n name: \"delta\",\n type: \"int256\",\n },\n ],\n name: \"InternalBalanceChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"liquidityProvider\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n indexed: false,\n internalType: \"int256[]\",\n name: \"deltas\",\n type: \"int256[]\",\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"protocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n name: \"PoolBalanceChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"int256\",\n name: \"cashDelta\",\n type: \"int256\",\n },\n {\n indexed: false,\n internalType: \"int256\",\n name: \"managedDelta\",\n type: \"int256\",\n },\n ],\n name: \"PoolBalanceManaged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"poolAddress\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"enum IVault.PoolSpecialization\",\n name: \"specialization\",\n type: \"uint8\",\n },\n ],\n name: \"PoolRegistered\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"relayer\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\",\n },\n ],\n name: \"RelayerApprovalChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amountIn\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amountOut\",\n type: \"uint256\",\n },\n ],\n name: \"Swap\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n ],\n name: \"TokensDeregistered\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n indexed: false,\n internalType: \"address[]\",\n name: \"assetManagers\",\n type: \"address[]\",\n },\n ],\n name: \"TokensRegistered\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"WETH\",\n outputs: [\n {\n internalType: \"contract IWETH\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"assetInIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"assetOutIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.BatchSwapStep[]\",\n name: \"swaps\",\n type: \"tuple[]\",\n },\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"int256[]\",\n name: \"limits\",\n type: \"int256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n ],\n name: \"batchSwap\",\n outputs: [\n {\n internalType: \"int256[]\",\n name: \"assetDeltas\",\n type: \"int256[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n ],\n name: \"deregisterTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"minAmountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.ExitPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"exitPool\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IFlashLoanRecipient\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amounts\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"flashLoan\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n ],\n name: \"getInternalBalance\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n ],\n name: \"getPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"enum IVault.PoolSpecialization\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"getPoolTokenInfo\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"cash\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"managed\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n ],\n name: \"getPoolTokens\",\n outputs: [\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract ProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"relayer\",\n type: \"address\",\n },\n ],\n name: \"hasApprovedRelayer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"maxAmountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.JoinPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"joinPool\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.PoolBalanceOpKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct IVault.PoolBalanceOp[]\",\n name: \"ops\",\n type: \"tuple[]\",\n },\n ],\n name: \"managePoolBalance\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.UserBalanceOpKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"asset\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n ],\n internalType: \"struct IVault.UserBalanceOp[]\",\n name: \"ops\",\n type: \"tuple[]\",\n },\n ],\n name: \"manageUserBalance\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"assetInIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"assetOutIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.BatchSwapStep[]\",\n name: \"swaps\",\n type: \"tuple[]\",\n },\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n ],\n name: \"queryBatchSwap\",\n outputs: [\n {\n internalType: \"int256[]\",\n name: \"\",\n type: \"int256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.PoolSpecialization\",\n name: \"specialization\",\n type: \"uint8\",\n },\n ],\n name: \"registerPool\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"address[]\",\n name: \"assetManagers\",\n type: \"address[]\",\n },\n ],\n name: \"registerTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"newAuthorizer\",\n type: \"address\",\n },\n ],\n name: \"setAuthorizer\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"relayer\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\",\n },\n ],\n name: \"setRelayerApproval\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.SingleSwap\",\n name: \"singleSwap\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"limit\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n ],\n name: \"swap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"amountCalculated\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n stateMutability: \"payable\",\n type: \"receive\",\n },\n] as const;\n\nexport class Vault__factory {\n static readonly abi = _abi;\n static createInterface(): VaultInterface {\n return new utils.Interface(_abi) as VaultInterface;\n }\n static connect(address: string, signerOrProvider: Signer | Provider): Vault {\n return new Contract(address, _abi, signerOrProvider) as Vault;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { WeightedPool, WeightedPoolInterface } from \"../WeightedPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"normalizedWeights\",\n type: \"uint256[]\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"address[]\",\n name: \"assetManagers\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct WeightedPool.NewPoolParams\",\n name: \"params\",\n type: \"tuple\",\n },\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"feeType\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"protocolFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"ProtocolFeePercentageCacheUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getATHRateProduct\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getActualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastPostJoinExitInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getNormalizedWeights\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"feeType\",\n type: \"uint256\",\n },\n ],\n name: \"getProtocolFeePercentageCache\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolSwapFeeDelegation\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRateProviders\",\n outputs: [\n {\n internalType: \"contract IRateProvider[]\",\n name: \"\",\n type: \"address[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"poolConfig\",\n type: \"bytes\",\n },\n ],\n name: \"setAssetManagerPoolConfig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"updateProtocolFeePercentageCache\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class WeightedPool__factory {\n static readonly abi = _abi;\n static createInterface(): WeightedPoolInterface {\n return new utils.Interface(_abi) as WeightedPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): WeightedPool {\n return new Contract(address, _abi, signerOrProvider) as WeightedPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n WeightedPoolFactory,\n WeightedPoolFactoryInterface,\n} from \"../WeightedPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"normalizedWeights\",\n type: \"uint256[]\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class WeightedPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): WeightedPoolFactoryInterface {\n return new utils.Interface(_abi) as WeightedPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): WeightedPoolFactory {\n return new Contract(address, _abi, signerOrProvider) as WeightedPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n YearnLinearPool,\n YearnLinearPoolInterface,\n} from \"../YearnLinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct YearnLinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class YearnLinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): YearnLinearPoolInterface {\n return new utils.Interface(_abi) as YearnLinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): YearnLinearPool {\n return new Contract(address, _abi, signerOrProvider) as YearnLinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n YearnLinearPoolFactory,\n YearnLinearPoolFactoryInterface,\n} from \"../YearnLinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"YearnLinearPoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract LinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class YearnLinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): YearnLinearPoolFactoryInterface {\n return new utils.Interface(_abi) as YearnLinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): YearnLinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as YearnLinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { GyroEV2, GyroEV2Interface, GyroECLPPool } from \"../GyroEV2\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"token0\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"token1\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"oracleEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n internalType: \"struct ExtensibleWeightedPool2Tokens.NewPoolParams\",\n name: \"baseParams\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"int256\",\n name: \"alpha\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"beta\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"c\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"s\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"lambda\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Params\",\n name: \"eclpParams\",\n type: \"tuple\",\n },\n {\n components: [\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"tauAlpha\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"tauBeta\",\n type: \"tuple\",\n },\n {\n internalType: \"int256\",\n name: \"u\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"v\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"w\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"z\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"dSq\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.DerivedParams\",\n name: \"derivedEclpParams\",\n type: \"tuple\",\n },\n {\n internalType: \"address\",\n name: \"rateProvider0\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"rateProvider1\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"capManager\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"capEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint120\",\n name: \"perAddressCap\",\n type: \"uint120\",\n },\n {\n internalType: \"uint128\",\n name: \"globalCap\",\n type: \"uint128\",\n },\n ],\n internalType: \"struct ICappedLiquidity.CapParams\",\n name: \"capParams\",\n type: \"tuple\",\n },\n {\n internalType: \"address\",\n name: \"pauseManager\",\n type: \"address\",\n },\n ],\n internalType: \"struct GyroECLPPool.GyroParams\",\n name: \"params\",\n type: \"tuple\",\n },\n {\n internalType: \"address\",\n name: \"configAddress\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"capManager\",\n type: \"address\",\n },\n ],\n name: \"CapManagerUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"capEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint120\",\n name: \"perAddressCap\",\n type: \"uint120\",\n },\n {\n internalType: \"uint128\",\n name: \"globalCap\",\n type: \"uint128\",\n },\n ],\n indexed: false,\n internalType: \"struct ICappedLiquidity.CapParams\",\n name: \"params\",\n type: \"tuple\",\n },\n ],\n name: \"CapParamsUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"derivedParamsValidated\",\n type: \"bool\",\n },\n ],\n name: \"ECLPDerivedParamsValidated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paramsValidated\",\n type: \"bool\",\n },\n ],\n name: \"ECLPParamsValidated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"invariantAfterJoin\",\n type: \"uint256\",\n },\n ],\n name: \"InvariantAterInitializeJoin\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"oldInvariant\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newInvariant\",\n type: \"uint256\",\n },\n ],\n name: \"InvariantOldAndNew\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"OracleEnabledChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"oracleUpdatedIndex\",\n type: \"uint256\",\n },\n ],\n name: \"OracleIndexUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"oldPauseManager\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"newPauseManager\",\n type: \"address\",\n },\n ],\n name: \"PauseManagerChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"PausedLocally\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n indexed: false,\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"invariant\",\n type: \"tuple\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"SwapParams\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"UnpausedLocally\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_dSq\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsAlpha\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsBeta\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsC\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsLambda\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsS\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_tauAlphaX\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_tauAlphaY\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_tauBetaX\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_tauBetaY\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_u\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_v\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_w\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_z\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"capManager\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"capParams\",\n outputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"capEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint120\",\n name: \"perAddressCap\",\n type: \"uint120\",\n },\n {\n internalType: \"uint128\",\n name: \"globalCap\",\n type: \"uint128\",\n },\n ],\n internalType: \"struct ICappedLiquidity.CapParams\",\n name: \"\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_pauseManager\",\n type: \"address\",\n },\n ],\n name: \"changePauseManager\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"startIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"endIndex\",\n type: \"uint256\",\n },\n ],\n name: \"dirtyUninitializedOracleSamples\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableOracle\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getECLPParams\",\n outputs: [\n {\n components: [\n {\n internalType: \"int256\",\n name: \"alpha\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"beta\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"c\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"s\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"lambda\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Params\",\n name: \"params\",\n type: \"tuple\",\n },\n {\n components: [\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"tauAlpha\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"tauBeta\",\n type: \"tuple\",\n },\n {\n internalType: \"int256\",\n name: \"u\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"v\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"w\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"z\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"dSq\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.DerivedParams\",\n name: \"d\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLargestSafeQueryWindow\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IPriceOracle.Variable\",\n name: \"variable\",\n type: \"uint8\",\n },\n ],\n name: \"getLatest\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMiscData\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"logInvariant\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"logTotalSupply\",\n type: \"int256\",\n },\n {\n internalType: \"uint256\",\n name: \"oracleSampleCreationTimestamp\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"oracleIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"oracleEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getNormalizedWeights\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IPriceOracle.Variable\",\n name: \"variable\",\n type: \"uint8\",\n },\n {\n internalType: \"uint256\",\n name: \"ago\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct IPriceOracle.OracleAccumulatorQuery[]\",\n name: \"queries\",\n type: \"tuple[]\",\n },\n ],\n name: \"getPastAccumulators\",\n outputs: [\n {\n internalType: \"int256[]\",\n name: \"results\",\n type: \"int256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPrice\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"spotPrice\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\",\n },\n ],\n name: \"getSample\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"logPairPrice\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"accLogPairPrice\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"logBptPrice\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"accLogBptPrice\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"logInvariant\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"accLogInvariant\",\n type: \"int256\",\n },\n {\n internalType: \"uint256\",\n name: \"timestamp\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IPriceOracle.Variable\",\n name: \"variable\",\n type: \"uint8\",\n },\n {\n internalType: \"uint256\",\n name: \"secs\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"ago\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct IPriceOracle.OracleAverageQuery[]\",\n name: \"queries\",\n type: \"tuple[]\",\n },\n ],\n name: \"getTimeWeightedAverage\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"results\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTokenRates\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"rate0\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"rate1\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTotalSamples\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"gyroConfig\",\n outputs: [\n {\n internalType: \"contract IGyroConfig\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pauseManager\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"rateProvider0\",\n outputs: [\n {\n internalType: \"contract IRateProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"rateProvider1\",\n outputs: [\n {\n internalType: \"contract IRateProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_capManager\",\n type: \"address\",\n },\n ],\n name: \"setCapManager\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"capEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint120\",\n name: \"perAddressCap\",\n type: \"uint120\",\n },\n {\n internalType: \"uint128\",\n name: \"globalCap\",\n type: \"uint128\",\n },\n ],\n internalType: \"struct ICappedLiquidity.CapParams\",\n name: \"params\",\n type: \"tuple\",\n },\n ],\n name: \"setCapParams\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class GyroEV2__factory {\n static readonly abi = _abi;\n static createInterface(): GyroEV2Interface {\n return new utils.Interface(_abi) as GyroEV2Interface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GyroEV2 {\n return new Contract(address, _abi, signerOrProvider) as GyroEV2;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { VeBal, VeBalInterface } from \"../VeBal\";\n\nconst _abi = [\n {\n name: \"Deposit\",\n inputs: [\n {\n name: \"provider\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"locktime\",\n type: \"uint256\",\n indexed: true,\n },\n {\n name: \"type\",\n type: \"int128\",\n indexed: false,\n },\n {\n name: \"ts\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Withdraw\",\n inputs: [\n {\n name: \"provider\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"ts\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Supply\",\n inputs: [\n {\n name: \"prevSupply\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"supply\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n inputs: [\n {\n name: \"token_addr\",\n type: \"address\",\n },\n {\n name: \"_name\",\n type: \"string\",\n },\n {\n name: \"_symbol\",\n type: \"string\",\n },\n {\n name: \"_authorizer_adaptor\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"token\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"name\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"symbol\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"decimals\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"admin\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"commit_smart_wallet_checker\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"apply_smart_wallet_checker\",\n inputs: [],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"get_last_user_slope\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"int128\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"user_point_history__ts\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_idx\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"locked__end\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"checkpoint\",\n inputs: [],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit_for\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"create_lock\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_unlock_time\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"increase_amount\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"increase_unlock_time\",\n inputs: [\n {\n name: \"_unlock_time\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"withdraw\",\n inputs: [],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"balanceOf\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"balanceOf\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n {\n name: \"_t\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"balanceOfAt\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n {\n name: \"_block\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"totalSupply\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"totalSupply\",\n inputs: [\n {\n name: \"t\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"totalSupplyAt\",\n inputs: [\n {\n name: \"_block\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"supply\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"locked\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n components: [\n {\n name: \"amount\",\n type: \"int128\",\n },\n {\n name: \"end\",\n type: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"epoch\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"point_history\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n components: [\n {\n name: \"bias\",\n type: \"int128\",\n },\n {\n name: \"slope\",\n type: \"int128\",\n },\n {\n name: \"ts\",\n type: \"uint256\",\n },\n {\n name: \"blk\",\n type: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"user_point_history\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n {\n name: \"arg1\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n components: [\n {\n name: \"bias\",\n type: \"int128\",\n },\n {\n name: \"slope\",\n type: \"int128\",\n },\n {\n name: \"ts\",\n type: \"uint256\",\n },\n {\n name: \"blk\",\n type: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"user_point_epoch\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"slope_changes\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"int128\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"future_smart_wallet_checker\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"smart_wallet_checker\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n] as const;\n\nexport class VeBal__factory {\n static readonly abi = _abi;\n static createInterface(): VeBalInterface {\n return new utils.Interface(_abi) as VeBalInterface;\n }\n static connect(address: string, signerOrProvider: Signer | Provider): VeBal {\n return new Contract(address, _abi, signerOrProvider) as VeBal;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n VeDelegationProxy,\n VeDelegationProxyInterface,\n} from \"../VeDelegationProxy\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"votingEscrow\",\n type: \"address\",\n },\n {\n internalType: \"contract IVeDelegation\",\n name: \"delegation\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"newImplementation\",\n type: \"address\",\n },\n ],\n name: \"DelegationImplementationUpdated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"adjustedBalanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"adjusted_balance_of\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDelegationImplementation\",\n outputs: [\n {\n internalType: \"contract IVeDelegation\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVotingEscrow\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"killDelegation\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IVeDelegation\",\n name: \"delegation\",\n type: \"address\",\n },\n ],\n name: \"setDelegation\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class VeDelegationProxy__factory {\n static readonly abi = _abi;\n static createInterface(): VeDelegationProxyInterface {\n return new utils.Interface(_abi) as VeDelegationProxyInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): VeDelegationProxy {\n return new Contract(address, _abi, signerOrProvider) as VeDelegationProxy;\n }\n}\n","import { SwapInfo } from '@balancer-labs/sor';\nimport { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { Vault } from '@/contracts/Vault';\n\nexport interface TokenAmounts {\n [token: string]: string;\n}\n\nexport interface SwapsOptions {\n maxPools?: number;\n gasPrice?: string;\n deadline?: string;\n maxSlippage?: number;\n}\n\nexport enum SwapType {\n SwapExactIn,\n SwapExactOut,\n}\n\nexport type FundManagement = {\n sender: string;\n recipient: string;\n fromInternalBalance: boolean;\n toInternalBalance: boolean;\n};\n\nexport type SingleSwap = {\n poolId: string;\n kind: SwapType;\n assetIn: string;\n assetOut: string;\n amount: BigNumberish;\n userData: string;\n};\n\nexport type Swap = {\n request: SingleSwap;\n funds: FundManagement;\n limit: BigNumberish;\n deadline: BigNumberish;\n value?: BigNumberish;\n outputReference?: BigNumberish;\n};\n\nexport type BatchSwapStep = {\n poolId: string;\n assetInIndex: number;\n assetOutIndex: number;\n amount: string;\n userData: string;\n};\n\nexport type BatchSwap = {\n kind: SwapType;\n swaps: BatchSwapStep[];\n assets: string[];\n funds: FundManagement;\n limits: BigNumberish[];\n deadline: BigNumberish;\n value?: BigNumberish;\n outputReferences?: { index: BigNumberish; key: BigNumberish }[];\n};\n\nexport interface SwapInput {\n tokenIn: string;\n tokenOut: string;\n swapType: SwapType;\n amount: string;\n}\n\nexport interface QuerySimpleFlashSwapParameters {\n poolIds: string[];\n assets: BatchSwap['assets'];\n flashLoanAmount: string;\n vaultContract: Vault;\n}\n\nexport interface SimpleFlashSwapParameters {\n poolIds: string[];\n assets: BatchSwap['assets'];\n flashLoanAmount: string;\n walletAddress: string;\n}\n\nexport interface QuerySimpleFlashSwapResponse {\n profits: Record;\n isProfitable: boolean;\n}\n\nexport interface FindRouteParameters {\n tokenIn: string;\n tokenOut: string;\n amount: BigNumber;\n gasPrice: BigNumber;\n maxPools?: number;\n}\n\nexport interface BuildTransactionParameters {\n userAddress: string;\n recipient?: string;\n swapInfo: SwapInfo;\n kind: SwapType;\n deadline: string;\n maxSlippage: number;\n}\n\nexport interface SwapTransactionRequest {\n to: string;\n data: string;\n value?: BigNumber;\n}\n\nexport interface SwapAttributes {\n to: string;\n functionName: string;\n attributes: Swap | BatchSwap;\n data: string;\n value?: BigNumber;\n}\n","import { BigNumberish, BigNumber } from '@ethersproject/bignumber';\nimport { Zero, WeiPerEther } from '@ethersproject/constants';\n\nimport { SwapType } from './types';\nimport { isSameAddress } from '@/lib/utils';\n\n/**\n * Helper to create limits using a defined slippage amount.\n * @param tokensIn - Array of token in addresses.\n * @param tokensOut - Array of token out addresses.\n * @param swapType - Type of swap - SwapExactIn or SwapExactOut\n * @param deltas - An array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array.\n * @param assets - array contains the addresses of all assets involved in the swaps.\n * @param slippage - Slippage to be applied. i.e. 5%=50000000000000000.\n * @returns Returns an array (same length as assets) with limits applied for each asset.\n */\nexport function getLimitsForSlippage(\n tokensIn: string[],\n tokensOut: string[],\n swapType: SwapType,\n deltas: BigNumberish[],\n assets: string[],\n slippage: BigNumberish\n): BigNumberish[] {\n // Limits:\n // +ve means max to send\n // -ve mean min to receive\n // For a multihop the intermediate tokens should be 0\n const limits: BigNumber[] = new Array(assets.length).fill(Zero);\n\n assets.forEach((token, i) => {\n if (tokensIn.some((tokenIn) => isSameAddress(token, tokenIn))) {\n // For SwapExactOut slippage is on tokenIn, i.e. amtIn + slippage\n const slippageAmount = BigNumber.from(slippage).add(WeiPerEther);\n limits[i] =\n swapType === SwapType.SwapExactOut\n ? limits[i].add(\n BigNumber.from(deltas[i]).mul(slippageAmount).div(WeiPerEther)\n )\n : limits[i].add(deltas[i]);\n }\n\n if (tokensOut.some((tokenOut) => isSameAddress(token, tokenOut))) {\n // For SwapExactIn slippage is on tokenOut, i.e. amtOut - slippage\n const slippageAmount = WeiPerEther.sub(BigNumber.from(slippage));\n limits[i] =\n swapType === SwapType.SwapExactIn\n ? limits[i].add(\n BigNumber.from(deltas[i]).mul(slippageAmount).div(WeiPerEther)\n )\n : limits[i].add(deltas[i]);\n }\n });\n\n return limits;\n}\n","import { Network } from './network';\nimport { BalancerNetworkConfig } from '@/types';\nimport addressesByNetwork from './addresses.json';\n\nexport const balancerVault = '0xBA12222222228d8Ba445958a75a0704d566BF2C8';\n\n// Info fetched using npm package slot20\nexport const BPT_SLOT = 0;\nexport const BPT_DECIMALS = 18;\n\nexport const BALANCER_NETWORK_CONFIG: Record = {\n [Network.MAINNET]: {\n chainId: Network.MAINNET, //1\n addresses: {\n //Mainnet deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/mainnet.html\n contracts: {\n multicall: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441',\n poolDataQueries: '0xf5CDdF6feD9C589f1Be04899F48f9738531daD59',\n lidoRelayer: '0xdcdbf71A870cc60C6F9B621E28a7D3Ffd6Dd4965',\n veBal: '0xC128a9954e6c874eA3d62ce62B468bA073093F25',\n gaugeControllerCheckpointer:\n '0x8e5698dc4897dc12243c8642e77b4f21349db97c',\n veBalProxy: '0x6f5a2eE11E7a772AeB5114A20d0D7c0ff61EB8A0',\n gyroConfigProxy: '0xac89cc9d78bbad7eb3a02601b4d65daa1f908aa6',\n ...addressesByNetwork[Network.MAINNET].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.MAINNET].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.MAINNET].contracts.weth,\n bbaUsd: addressesByNetwork[Network.MAINNET].tokens.bb_a_usd,\n lbpRaisingTokens: [\n '0x6b175474e89094c44da98b954eedeac495271d0f', // DAI\n '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // USDC\n '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH\n ],\n stETH: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',\n wstETH: '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',\n veBal: '0xC128a9954e6c874eA3d62ce62B468bA073093F25',\n ...addressesByNetwork[Network.MAINNET].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'ethereum',\n },\n },\n pools: {\n wETHwstETH: {\n id: '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080',\n address: '0x32296969ef14eb0c6d29669c550d4a0449130230',\n },\n },\n poolsToIgnore: [\n '0xbd482ffb3e6e50dc1c437557c3bea2b68f3683ee0000000000000000000003c6', // a pool made by an external dev who was playing with a novel rate provider mechanism in production.\n '0x0afbd58beca09545e4fb67772faf3858e610bcd00000000000000000000004b9',\n '0xf22ff21e17157340575158ad7394e068048dd98b0000000000000000000004b8',\n '0xf71d0774b214c4cf51e33eb3d30ef98132e4dbaa00000000000000000000046e',\n ],\n sorConnectingTokens: [\n {\n symbol: 'wEth',\n address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n },\n {\n symbol: 'wstEth',\n address: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',\n },\n {\n symbol: 'DOLA',\n address: '0x865377367054516e17014CcdED1e7d814EDC9ce4',\n },\n {\n symbol: 'rEth',\n address: '0xae78736cd615f374d3085123a210448e74fc6393',\n },\n {\n symbol: 'ETHx',\n address: '0xa35b1b31ce002fbf2058d22f30f95d405200a15b',\n },\n ],\n sorTriPathMidPoolIds: [\n '0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112', // rETH/WETH\n ],\n },\n [Network.POLYGON]: {\n chainId: Network.POLYGON, //137\n addresses: {\n //Polygon deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/polygon.html\n contracts: {\n multicall: '0xa1B2b503959aedD81512C37e9dce48164ec6a94d',\n poolDataQueries: '0x84813aA3e079A665C0B80F944427eE83cBA63617',\n gaugeClaimHelper: '0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33',\n gyroConfigProxy: '0xfdc2e9e03f515804744a40d0f8d25c16e93fbe67',\n ...addressesByNetwork[Network.POLYGON].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.POLYGON].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.POLYGON].contracts.weth,\n lbpRaisingTokens: [\n '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063', // DAI\n '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', // USDC\n '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', // WMATIC\n ],\n ...addressesByNetwork[Network.POLYGON].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-prune-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-polygon',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/ianlapham/polygon-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: '',\n platformId: 'polygon-pos',\n },\n },\n pools: {},\n poolsToIgnore: [\n '0x600bd01b6526611079e12e1ff93aba7a3e34226f0000000000000000000009e4', // This pool has rateProviders with incorrect scaling\n '0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455', // Stable pool with Convergence issues\n ],\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',\n },\n {\n symbol: 'bbrz2',\n address: '0xe22483774bd8611be2ad2f4194078dac9159f4ba',\n }, // Joins Stables<>BRZ via https://app.balancer.fi/#/polygon/pool/0x4a0b73f0d13ff6d43e304a174697e3d5cfd310a400020000000000000000091c\n ],\n },\n [Network.ARBITRUM]: {\n chainId: Network.ARBITRUM, //42161\n //Arbitrum deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/arbitrum.html\n addresses: {\n contracts: {\n multicall: '0x269ff446d9892c9e19082564df3f5e8741e190a1',\n poolDataQueries: '0x7Ba29fE8E83dd6097A7298075C4AFfdBda3121cC',\n gaugeClaimHelper: '0xa0dabebaad1b243bbb243f933013d560819eb66f',\n gyroConfigProxy: '0x9b683ca24b0e013512e2566b68704dbe9677413c',\n ...addressesByNetwork[Network.ARBITRUM].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.ARBITRUM].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.ARBITRUM].contracts.weth,\n lbpRaisingTokens: [\n '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1', // DAI\n '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8', // USDC\n '0x82af49447d8a07e3bd95bd0d56f35241523fbab1', // WETH\n ],\n ...addressesByNetwork[Network.ARBITRUM].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-arbitrum-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-arbitrum',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/ianlapham/arbitrum-one-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'arbitrum-one',\n },\n },\n pools: {},\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',\n },\n ],\n sorTriPathMidPoolIds: [\n '0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158', // wstEth/USDC.e to open up auraBAL/USDC\n '0x0052688295413b32626d226a205b95cdb337de860002000000000000000003d1', // arb/USDC.e to open up aura/USDC\n '0xa1a8bf131571a2139feb79401aa4a2e9482df6270002000000000000000004b4', // wstEth/Stable4Pool\n ],\n },\n [Network.GOERLI]: {\n chainId: Network.GOERLI, //5\n //Goerli deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/goerli.html\n addresses: {\n contracts: {\n multicall: '0x77dCa2C955b15e9dE4dbBCf1246B4B85b651e50e',\n poolDataQueries: '0x6d3197d069F8F9f1Fe7e23665Bc64CB77ED8b089',\n veBal: '0x33A99Dcc4C85C014cf12626959111D5898bbCAbF',\n veBalProxy: '0xA1F107D1cD709514AE8A914eCB757E95f9cedB31',\n erc4626LinearPoolFactory: '0xba240c856498e2d7a70af4911aafae0d6b565a5b',\n aaveLinearPoolFactory: '0x76578ecf9a141296ec657847fb45b0585bcda3a6',\n ...addressesByNetwork[Network.GOERLI].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.GOERLI].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.GOERLI].contracts.weth,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-goerli-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-goerli',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/blocklytics/goerli-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'ethereum',\n },\n },\n pools: {},\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1',\n },\n ],\n },\n [Network.OPTIMISM]: {\n chainId: Network.OPTIMISM, //10\n // Optimism deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/optimism.html\n addresses: {\n contracts: {\n multicall: '0x2dc0e2aa608532da689e89e237df582b783e552c',\n poolDataQueries: '0x6B5dA774890Db7B7b96C6f44e6a4b0F657399E2e',\n gyroConfigProxy: '0x32acb44fc929339b9f16f0449525cc590d2a23f3',\n ...addressesByNetwork[Network.OPTIMISM].contracts,\n },\n tokens: {\n bal: '0xfe8b128ba8c78aabc59d4c64cee7ff28e9379921',\n wrappedNativeAsset: addressesByNetwork[Network.OPTIMISM].contracts.weth,\n lbpRaisingTokens: [\n '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1', // DAI\n '0x7f5c764cbc14f9669b88837ca1490cca17c31607', // USDC\n '0x4200000000000000000000000000000000000006', // WETH\n ],\n ...addressesByNetwork[Network.OPTIMISM].tokens,\n },\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'optimistic-ethereum',\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-optimism',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-optimism',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/lyra-finance/optimism-mainnet-blocks',\n },\n pools: {},\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x4200000000000000000000000000000000000006',\n },\n ],\n },\n [Network.GNOSIS]: {\n chainId: Network.GNOSIS, //100\n // Gnosis deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/gnosis.html\n addresses: {\n contracts: {\n multicall: '0xbb6fab6b627947dae0a75808250d8b2652952cb5',\n poolDataQueries: '0x3f170631ed9821Ca51A59D996aB095162438DC10',\n ...addressesByNetwork[Network.GNOSIS].contracts,\n },\n tokens: {\n wrappedNativeAsset: addressesByNetwork[Network.GNOSIS].contracts.weth,\n bal: addressesByNetwork[Network.GNOSIS].contracts.bal,\n ...addressesByNetwork[Network.GNOSIS].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gnosis-chain-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-gnosis-chain',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'xdai',\n platformId: 'xdai',\n },\n },\n averageBlockTime: 5,\n pools: {},\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d',\n },\n {\n symbol: 'wsEth',\n address: '0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6',\n },\n ],\n sorTriPathMidPoolIds: [\n '0xeb30c85cc528537f5350cf5684ce6a4538e13394000200000000000000000059', // 3POOL_BPT/wstETH\n '0x7644fa5d0ea14fcf3e813fdf93ca9544f8567655000000000000000000000066', // sBAL3\n ],\n },\n [Network.FANTOM]: {\n chainId: Network.FANTOM, //250\n //Fantom deployment addresses: https://docs.beets.fi/technicals/deployments\n addresses: {\n contracts: {\n vault: '0x20dd72Ed959b6147912C2e529F0a0C651c33c9ce',\n multicall: '0x66335d7ad8011f6aa3f48aadcb523b62b38ed961',\n poolDataQueries: '0xb132F1E145DcC085980C531e2dA81f2b84efc14F',\n gaugeClaimHelper: '0x0000000000000000000000000000000000000000', // no guages on fantom\n balancerRelayer: '0x419f7925b8c9e409b6ee8792242556fa210a7a09',\n balancerHelpers: '0xfE18C7C70b0a2c6541bEde0367124278BC345Dc8',\n weightedPoolFactory: '0x60467cb225092cE0c989361934311175f437Cf53',\n composableStablePoolFactory:\n '0x44814E3A603bb7F1198617995c5696C232F6e8Ed',\n yearnLinearPoolFactory: '0x1f73ae6ed391a2b1e84ff988a1bb5394b78a4a71',\n },\n tokens: {\n bal: '0xF24Bcf4d1e507740041C9cFd2DddB29585aDCe1e', //beets\n wrappedNativeAsset: '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83',\n lbpRaisingTokens: [\n '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83', // WFTM\n '0x04068DA6C83AFCFA0e13ba15A6696662335D5B75', // USDC\n '0x8D11eC38a3EB5E956B052f67Da8Bdc9bef8Abf3E', // DAI\n ],\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-v2-fantom',\n gaugesSubgraph: '', // no guages on fantom\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/beethovenxfi/fantom-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'ftm',\n platformId: 'fantom',\n },\n },\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [\n {\n symbol: 'wftm',\n address: '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83',\n },\n ],\n },\n [Network.SEPOLIA]: {\n chainId: Network.SEPOLIA, //11155111\n addresses: {\n contracts: {\n multicall: '0xcA11bde05977b3631167028862bE2a173976CA11',\n poolDataQueries: '0x9805dcfD25e6De36bad8fe9D3Fe2c9b44B764102',\n ...addressesByNetwork[Network.SEPOLIA].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.SEPOLIA].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.SEPOLIA].contracts.weth,\n ...addressesByNetwork[Network.SEPOLIA].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-sepolia-v2/version/latest',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'ethereum',\n },\n },\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [],\n },\n [Network.ZKEVM]: {\n chainId: Network.ZKEVM, //1101\n addresses: {\n contracts: {\n balancerMinter: '0x475D18169BE8a89357A9ee3Ab00ca386d20fA229',\n multicall: '0xcA11bde05977b3631167028862bE2a173976CA11',\n poolDataQueries: '0xF24917fB88261a37Cc57F686eBC831a5c0B9fD39',\n ...addressesByNetwork[Network.ZKEVM].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.ZKEVM].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.ZKEVM].contracts.weth,\n ...addressesByNetwork[Network.ZKEVM].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-polygon-zk-v2/version/latest',\n gaugesSubgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-gauges-polygon-zk/version/latest',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'polygon-zkevm',\n },\n },\n averageBlockTime: 4,\n multicallBatchSize: 128,\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9',\n },\n {\n symbol: 'wsEth',\n address: '0x5D8cfF95D7A57c0BF50B30b43c7CC0D52825D4a9',\n },\n ],\n },\n [Network.AVALANCHE]: {\n chainId: Network.AVALANCHE, //43114\n addresses: {\n contracts: {\n balancerMinter: '0xEa924b45a3fcDAAdf4E5cFB1665823B8F8F2039B',\n multicall: '0xcA11bde05977b3631167028862bE2a173976CA11',\n poolDataQueries: '0x67af5D428d38C5176a286a2371Df691cDD914Fb8',\n ...addressesByNetwork[Network.AVALANCHE].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.AVALANCHE].contracts.bal,\n wrappedNativeAsset:\n addressesByNetwork[Network.AVALANCHE].contracts.weth,\n ...addressesByNetwork[Network.AVALANCHE].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-avalanche-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-avalanche',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/iliaazhel/avalanche-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'avalanche-2',\n platformId: 'avalanche',\n },\n },\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [\n {\n symbol: 'WAVAX',\n address: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7',\n },\n {\n symbol: 'sAVAX',\n address: '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be',\n },\n ],\n },\n [Network.BASE]: {\n chainId: Network.BASE, //8453\n addresses: {\n contracts: {\n balancerMinter: '0xc7E5ED1054A24Ef31D827E6F86caA58B3Bc168d7',\n multicall: '0xcA11bde05977b3631167028862bE2a173976CA11',\n poolDataQueries: '',\n ...addressesByNetwork[Network.BASE].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.BASE].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.BASE].contracts.weth,\n ...addressesByNetwork[Network.BASE].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-base-v2/version/latest',\n gaugesSubgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-gauges-base/version/latest',\n blockNumberSubgraph:\n 'https://api.studio.thegraph.com/query/48427/bleu-base-blocks/version/latest',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'base',\n },\n },\n averageBlockTime: 2,\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x4200000000000000000000000000000000000006',\n },\n ],\n sorTriPathMidPoolIds: [\n '0x2db50a0e0310723ef0c2a165cb9a9f80d772ba2f00020000000000000000000d', // weth/staBal\n ],\n },\n};\n\nexport const networkAddresses = (\n chainId: number\n): BalancerNetworkConfig['addresses'] =>\n BALANCER_NETWORK_CONFIG[chainId as Network].addresses;\n","export enum BalancerErrorCode {\n ABOVE_MAX_TOKENS = 'ABOVE_MAX_TOKENS',\n BELOW_MIN_TOKENS = 'BELOW_MIN_TOKENS',\n EXIT_DELTA_AMOUNTS = 'EXIT_DELTA_AMOUNTS',\n FEE_PROVIDER_NOT_PROVIDED = 'FEE_PROVIDER_NOT_PROVIDED',\n GAUGES_HELPER_ADDRESS_NOT_PROVIDED = 'GAUGES_HELPER_ADDRESS_NOT_PROVIDED',\n GAUGES_NOT_FOUND = 'GAUGES_NOT_FOUND',\n GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED = 'GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED',\n GAUGES_REWARD_TOKEN_EMPTY = 'GAUGES_REWARD_TOKEN_EMPTY',\n ILLEGAL_PARAMETER = 'ILLEGAL_PARAMETER',\n INTERNAL_ERROR_INVALID_ABI = 'INTERNAL_ERROR_INVALID_ABI',\n INPUT_LENGTH_MISMATCH = 'INPUT_LENGTH_MISMATCH',\n INPUT_OUT_OF_BOUNDS = 'INPUT_OUT_OF_BOUNDS',\n INPUT_TOKEN_INVALID = 'INPUT_TOKEN_INVALID',\n INVALID_PROTOCOL_ID = 'INVALID_PROTOCOL_ID',\n INVALID_SWAP_FEE_PERCENTAGE = 'INVALID_SWAP_FEE_PERCENTAGE',\n INVALID_WEIGHTS = 'INVALID_WEIGHTS',\n JOIN_DELTA_AMOUNTS = 'JOIN_DELTA_AMOUNTS',\n JOIN_WITH_ZERO_AMOUNT = 'JOIN_WITH_ZERO_AMOUNT',\n MISSING_AMP = 'MISSING_AMP',\n MISSING_DECIMALS = 'MISSING_DECIMALS',\n MISSING_PRICE_RATE = 'MISSING_PRICE_RATE',\n MISSING_TOKENS = 'MISSING_TOKENS',\n MISSING_WEIGHT = 'MISSING_WEIGHT',\n NO_POOL_DATA = 'NO_POOL_DATA',\n NO_VALUE_PARAMETER = 'NO_VALUE_PARAMETER',\n POOL_DOESNT_EXIST = 'POOL_DOESNT_EXIST',\n QUERY_BATCH_SWAP = 'QUERY_BATCH_SWAP',\n RELAY_SWAP_AMOUNTS = 'RELAY_SWAP_AMOUNTS',\n REWARD_TOKEN_ZERO = 'REWARD_TOKEN_ZERO',\n TIMESTAMP_IN_THE_FUTURE = 'TIMESTAMP_IN_THE_FUTURE',\n TOKEN_MISMATCH = 'TOKEN_MISMATCH',\n UNSUPPORTED_PAIR = 'UNSUPPORTED_PAIR',\n UNSUPPORTED_POOL_TYPE = 'UNSUPPORTED_POOL_TYPE',\n UNSUPPORTED_POOL_TYPE_VERSION = 'UNSUPPORTED_POOL_TYPE_VERSION',\n}\n\nexport class BalancerError extends Error {\n constructor(public code: BalancerErrorCode) {\n super(BalancerError.getMessage(code));\n this.name = 'BalancerError';\n }\n\n static getMessage(code: BalancerErrorCode): string {\n switch (code) {\n case BalancerErrorCode.ABOVE_MAX_TOKENS:\n return 'the array contains more tokens than the maximum allowed';\n case BalancerErrorCode.BELOW_MIN_TOKENS:\n return 'the array does not contain the minimum quantity of tokens';\n case BalancerErrorCode.EXIT_DELTA_AMOUNTS:\n return 'Error when checking exit call deltas';\n case BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED:\n return 'Fee Provider Repository has not been provided';\n case BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED:\n return 'Liquidity Gauges Helper Contract address has not been provided';\n case BalancerErrorCode.GAUGES_NOT_FOUND:\n return 'Liquidity Gauges not found with given addresses';\n case BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED:\n return 'Liquidity Gauges Reward Minter Contract address has not been provided';\n case BalancerErrorCode.GAUGES_REWARD_TOKEN_EMPTY:\n return 'No Reward Tokens for Liquidity Gauges provided';\n case BalancerErrorCode.INPUT_LENGTH_MISMATCH:\n return 'input length mismatch';\n case BalancerErrorCode.INPUT_OUT_OF_BOUNDS:\n return 'input out of bounds';\n case BalancerErrorCode.INPUT_TOKEN_INVALID:\n return 'input token invalid';\n case BalancerErrorCode.INVALID_PROTOCOL_ID:\n return 'The provided protocol id does not correspond to a protocol';\n case BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE:\n return 'The swap fee needs to be greater than zero and less than 1e17(10%)';\n case BalancerErrorCode.INVALID_WEIGHTS:\n return 'The sum of the weights needs to be equal to 1e18(100%)';\n case BalancerErrorCode.JOIN_DELTA_AMOUNTS:\n return 'Error when checking join call deltas';\n case BalancerErrorCode.JOIN_WITH_ZERO_AMOUNT:\n return 'Cant join pool with 0 amount of token in';\n case BalancerErrorCode.MISSING_AMP:\n return 'missing amp';\n case BalancerErrorCode.MISSING_DECIMALS:\n return 'missing decimals';\n case BalancerErrorCode.MISSING_PRICE_RATE:\n return 'missing price rate';\n case BalancerErrorCode.MISSING_TOKENS:\n return 'missing tokens';\n case BalancerErrorCode.MISSING_WEIGHT:\n return 'missing weight';\n case BalancerErrorCode.NO_POOL_DATA:\n return 'no pool data';\n case BalancerErrorCode.NO_VALUE_PARAMETER:\n return 'Illegal value passed as parameter';\n case BalancerErrorCode.POOL_DOESNT_EXIST:\n return 'balancer pool does not exist';\n case BalancerErrorCode.RELAY_SWAP_AMOUNTS:\n return 'Error when checking swap amounts';\n case BalancerErrorCode.REWARD_TOKEN_ZERO:\n return 'All Zero Values for Reward Tokens';\n case BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE:\n return 'Timestamp cannot be in the future';\n case BalancerErrorCode.TOKEN_MISMATCH:\n return 'token mismatch';\n case BalancerErrorCode.UNSUPPORTED_PAIR:\n return 'unsupported token pair';\n case BalancerErrorCode.UNSUPPORTED_POOL_TYPE:\n return 'unsupported pool type';\n default:\n return 'Unknown error';\n }\n }\n}\n","import { ONE, SolidityMaths } from '@/lib/utils/solidityMaths';\n\nexport function calcPriceImpact(\n bptAmount: bigint,\n bptZeroPriceImpact: bigint,\n isJoin: boolean\n): bigint {\n if (isJoin) return calcPriceImpactJoin(bptAmount, bptZeroPriceImpact);\n else return calcPriceImpactExit(bptAmount, bptZeroPriceImpact);\n}\n\nfunction calcPriceImpactJoin(\n bptAmount: bigint,\n bptZeroPriceImpact: bigint\n): bigint {\n // 1 - (bptAmount/bptZeroPI)\n const pi = ONE - SolidityMaths.divDownFixed(bptAmount, bptZeroPriceImpact);\n return pi < 0 ? BigInt(0) : pi;\n}\nfunction calcPriceImpactExit(\n bptAmount: bigint,\n bptZeroPriceImpact: bigint\n): bigint {\n // (bptAmount/bptZeroPI) - 1\n const pi = SolidityMaths.divDownFixed(bptAmount, bptZeroPriceImpact) - ONE;\n return pi < 0 ? BigInt(0) : pi;\n}\n","import { BZERO, SolidityMaths } from './solidityMaths';\n\nconst AMP_PRECISION = BigInt(1e3);\n\nexport function bptSpotPrice(\n amp: bigint,\n balances: bigint[],\n bptSupply: bigint,\n tokenIndexIn: number\n): bigint {\n const totalCoins = balances.length;\n const D = _calculateInvariant(amp, balances, true);\n let S = BZERO;\n let D_P = D / BigInt(totalCoins);\n for (let i = 0; i < totalCoins; i++) {\n if (i != tokenIndexIn) {\n S = S + balances[i];\n D_P = (D_P * D) / (BigInt(totalCoins) * balances[i]);\n }\n }\n const x = balances[tokenIndexIn];\n const alpha = amp * BigInt(totalCoins);\n const beta = alpha * S; // units: 10 ** 21\n const gamma = BigInt(AMP_PRECISION) - alpha;\n const partial_x = BigInt(2) * alpha * x + beta + gamma * D;\n const minus_partial_D =\n D_P * BigInt(totalCoins + 1) * AMP_PRECISION - gamma * x;\n const ans = SolidityMaths.divUpFixed(\n (partial_x * bptSupply) / minus_partial_D,\n D\n );\n return ans;\n}\n\nfunction _calculateInvariant(\n amp: bigint,\n balances: bigint[],\n roundUp: boolean\n): bigint {\n /**********************************************************************************************\n // invariant //\n // D = invariant D^(n+1) //\n // A = amplification coefficient A n^n S + D = A D n^n + ----------- //\n // S = sum of balances n^n P //\n // P = product of balances //\n // n = number of tokens //\n *********x************************************************************************************/\n\n // We support rounding up or down.\n\n let sum = BZERO;\n const numTokens = balances.length;\n for (let i = 0; i < numTokens; i++) {\n sum = sum + balances[i];\n }\n if (sum == BZERO) {\n return BZERO;\n }\n\n let prevInvariant = BZERO;\n let invariant = sum;\n const ampTimesTotal = amp * BigInt(numTokens);\n\n for (let i = 0; i < 255; i++) {\n let P_D = balances[0] * BigInt(numTokens);\n for (let j = 1; j < numTokens; j++) {\n P_D = SolidityMaths.div(\n SolidityMaths.mul(\n SolidityMaths.mul(P_D, balances[j]),\n BigInt(numTokens)\n ),\n invariant,\n roundUp\n );\n }\n prevInvariant = invariant;\n invariant = SolidityMaths.div(\n SolidityMaths.mul(\n SolidityMaths.mul(BigInt(numTokens), invariant),\n invariant\n ) +\n SolidityMaths.div(\n SolidityMaths.mul(SolidityMaths.mul(ampTimesTotal, sum), P_D),\n AMP_PRECISION,\n roundUp\n ),\n SolidityMaths.mul(BigInt(numTokens + 1), invariant) +\n // No need to use checked arithmetic for the amp precision, the amp is guaranteed to be at least 1\n SolidityMaths.div(\n SolidityMaths.mul(ampTimesTotal - AMP_PRECISION, P_D),\n AMP_PRECISION,\n !roundUp\n ),\n roundUp\n );\n\n if (invariant > prevInvariant) {\n if (invariant - prevInvariant <= 1) {\n return invariant;\n }\n } else if (prevInvariant - invariant <= 1) {\n return invariant;\n }\n }\n\n throw new Error('Errors.STABLE_INVARIANT_DIDNT_CONVERGE');\n}\n","import { PriceImpactConcern } from '@/modules/pools/pool-types/concerns/types';\nimport { ONE, BZERO, _upscale } from '@/lib/utils/solidityMaths';\nimport { calcPriceImpact } from '@/modules/pricing/priceImpact';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Pool } from '@/types';\nimport { bptSpotPrice } from '@/lib/utils/stableMathHelpers';\nimport { parsePoolInfo } from '@/lib/utils';\n\n// Note: this concern is used by Stable, MetaStable and StablePhantom pools\nexport class StablePoolPriceImpact implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n // upscales amp, swapfee, totalshares\n const {\n ampWithPrecision,\n scalingFactorsWithoutBpt,\n totalSharesEvm,\n upScaledBalancesWithoutBpt,\n } = parsePoolInfo(pool);\n\n // Check against array without BPT because concern is being reused by stablePhantom pools\n // Stable and MetaStable pools don't have BPT in the token list, so array without BPT is the same as the original array\n if (tokenAmounts.length !== upScaledBalancesWithoutBpt.length)\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n\n let bptZeroPriceImpact = BZERO;\n for (let i = 0; i < upScaledBalancesWithoutBpt.length; i++) {\n const price = bptSpotPrice(\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n totalSharesEvm,\n i\n );\n const amountUpscaled = _upscale(\n tokenAmounts[i],\n scalingFactorsWithoutBpt[i]\n );\n const newTerm = (price * amountUpscaled) / ONE;\n bptZeroPriceImpact += newTerm;\n }\n return bptZeroPriceImpact;\n }\n\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n const bptZeroPriceImpact = this.bptZeroPriceImpact(pool, tokenAmounts);\n return calcPriceImpact(bptAmount, bptZeroPriceImpact, isJoin).toString();\n }\n}\n","import { BigNumber, parseFixed } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport * as SOR from '@balancer-labs/sor';\nimport {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n ExitExactBPTInParameters,\n ExitExactTokensOutParameters,\n ExitPool,\n ExitPoolAttributes,\n} from '../types';\nimport { AssetHelpers, isSameAddress, parsePoolInfo } from '@/lib/utils';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { addSlippage, subSlippage } from '@/lib/utils/slippageHelper';\nimport { balancerVault } from '@/lib/constants/config';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport {\n _downscaleDown,\n _downscaleDownArray,\n _upscaleArray,\n} from '@/lib/utils/solidityMaths';\nimport { Pool } from '@/types';\nimport { BasePoolEncoder } from '@/pool-base';\nimport { StablePoolPriceImpact } from '../stable/priceImpact.concern';\n\ninterface SortedValues {\n poolTokens: string[];\n ampWithPrecision: bigint;\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n}\n\ntype ExactBPTInSortedValues = SortedValues & {\n scalingFactors: bigint[];\n singleTokenOutIndex: number;\n};\n\ntype ExactTokensOutSortedValues = SortedValues & {\n upScaledAmountsOut: bigint[];\n downScaledAmountsOut: string[];\n};\ntype CalcBptInGivenExactTokensOutParams = ExactTokensOutSortedValues &\n Pick;\n\ntype SortValuesParams = {\n pool: Pool;\n wrappedNativeAsset: string;\n shouldUnwrapNativeAsset?: boolean;\n};\n\ntype SortValuesExactBptInParams = SortValuesParams & {\n singleTokenOut?: string;\n};\n\ntype SortValuesExactTokensOutParams = SortValuesParams & {\n amountsOut: string[];\n tokensOut: string[];\n};\n\ntype EncodeExitParams = Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'toInternalBalance'\n> & {\n poolTokens: string[];\n poolId: string;\n userData: string;\n minAmountsOut: string[];\n};\n\nexport class StablePoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n });\n const sortedValues = this.sortValuesExitExactBptIn({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n });\n const { minAmountsOut, expectedAmountsOut } =\n sortedValues.singleTokenOutIndex >= 0\n ? this.calcTokenOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n })\n : this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData =\n sortedValues.singleTokenOutIndex >= 0\n ? StablePoolEncoder.exitExactBPTInForOneTokenOut(\n bptIn,\n sortedValues.singleTokenOutIndex\n )\n : StablePoolEncoder.exitExactBPTInForTokensOut(bptIn);\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n this.checkInputsExactTokensOut(amountsOut, tokensOut, pool);\n\n const sortedValues = this.sortValuesExitExactTokensOut({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n });\n const { expectedBPTIn, maxBPTIn } = this.calcBptInGivenExactTokensOut({\n ...sortedValues,\n slippage,\n });\n\n const { downScaledAmountsOut, poolTokens } = sortedValues;\n const userData = StablePoolEncoder.exitBPTInForExactTokensOut(\n downScaledAmountsOut,\n maxBPTIn\n );\n const encodedData = this.encodeExitPool({\n poolId: pool.id,\n userData,\n poolTokens,\n minAmountsOut: downScaledAmountsOut,\n exiter,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n downScaledAmountsOut.map(BigInt),\n BigInt(expectedBPTIn),\n false\n );\n\n return {\n ...encodedData,\n expectedBPTIn,\n maxBPTIn,\n priceImpact,\n };\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut: undefined,\n pool,\n shouldUnwrapNativeAsset: false,\n });\n const sortedValues = parsePoolInfo(pool);\n const { minAmountsOut, expectedAmountsOut } =\n this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n singleTokenOutIndex: -1,\n bptIn,\n slippage,\n });\n\n const userData = BasePoolEncoder.recoveryModeExit(bptIn);\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt inserted in the transaction\n * @param singleTokenOut (optional) the address of the single token that will be withdrawn, if null|undefined, all tokens will be withdrawn proportionally.\n * @param pool the pool that is being exited\n * @param shouldUnwrapNativeAsset Set true if the weth should be unwrapped to Eth\n */\n checkInputsExactBPTIn = ({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n }: Pick<\n ExitExactBPTInParameters,\n 'bptIn' | 'singleTokenOut' | 'pool' | 'shouldUnwrapNativeAsset'\n >): void => {\n if (!bptIn.length || parseFixed(bptIn, 18).isNegative()) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n if (\n singleTokenOut &&\n singleTokenOut !== AddressZero &&\n !pool.tokens\n .map((t) => t.address)\n .some((a) => isSameAddress(a, singleTokenOut))\n ) {\n throw new BalancerError(BalancerErrorCode.TOKEN_MISMATCH);\n }\n\n if (!shouldUnwrapNativeAsset && singleTokenOut === AddressZero)\n throw new Error(\n 'shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values'\n );\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n /**\n * Checks if the input of buildExitExactTokensOut is valid\n * @param amountsOut Must have an amount for each token, if the user will not withdraw any amount for a token, the value shall be '0'\n * @param tokensOut Must contain all the tokens of the pool\n * @param pool The pool that is being exited\n */\n checkInputsExactTokensOut = (\n amountsOut: string[],\n tokensOut: string[],\n pool: Pool\n ): void => {\n if (\n tokensOut.length != amountsOut.length ||\n tokensOut.length != pool.tokensList.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n sortValuesExitExactBptIn = ({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n }: SortValuesExactBptInParams): ExactBPTInSortedValues => {\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n // Parse pool info into EVM amounts in order to match amountsIn scalling\n const { poolTokens } = parsedPoolInfo;\n let singleTokenOutIndex = -1;\n if (singleTokenOut) {\n singleTokenOutIndex = poolTokens.indexOf(singleTokenOut);\n }\n return {\n ...parsedPoolInfo,\n singleTokenOutIndex,\n };\n };\n sortValuesExitExactTokensOut = ({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n }: SortValuesExactTokensOutParams): ExactTokensOutSortedValues => {\n const shouldUnwrapNativeAsset = tokensOut.some((a) => a === AddressZero);\n // Parse pool info into EVM amounts in order to match amountsOut scaling\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n const { scalingFactors } = parsedPoolInfo;\n\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts in into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, downScaledAmountsOut] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n // Maths should use upscaled amounts, e.g. 1USDC => 1e18 not 1e6\n const upScaledAmountsOut = _upscaleArray(\n downScaledAmountsOut.map((a) => BigInt(a)),\n scalingFactors.map((a) => BigInt(a))\n );\n\n return {\n ...parsedPoolInfo,\n upScaledAmountsOut,\n downScaledAmountsOut,\n };\n };\n calcTokenOutGivenExactBptIn = ({\n poolTokens,\n ampWithPrecision,\n upScaledBalances,\n totalSharesEvm,\n swapFeeEvm,\n singleTokenOutIndex,\n bptIn,\n slippage,\n scalingFactors,\n }: Pick<\n ExactBPTInSortedValues,\n | 'poolTokens'\n | 'ampWithPrecision'\n | 'upScaledBalances'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n | 'singleTokenOutIndex'\n | 'scalingFactors'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n // Calculate amount out given BPT in\n const amountOut = SOR.StableMathBigInt._calcTokenOutGivenExactBptIn(\n ampWithPrecision,\n upScaledBalances,\n singleTokenOutIndex,\n BigInt(bptIn),\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n const downscaledAmountOut = _downscaleDown(\n BigInt(amountOut) - BigInt(1), // The -1 is to solve rounding errors, sometimes the amount comes 1 point lower than expected\n scalingFactors[singleTokenOutIndex]\n ).toString();\n\n const expectedAmountsOut = Array(poolTokens.length).fill('0');\n const minAmountsOut = Array(poolTokens.length).fill('0');\n\n expectedAmountsOut[singleTokenOutIndex] = downscaledAmountOut;\n // Apply slippage tolerance\n minAmountsOut[singleTokenOutIndex] = subSlippage(\n BigNumber.from(downscaledAmountOut),\n BigNumber.from(slippage)\n ).toString();\n\n return { minAmountsOut, expectedAmountsOut };\n };\n\n calcTokensOutGivenExactBptIn = ({\n upScaledBalances,\n totalSharesEvm,\n scalingFactors,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n | 'upScaledBalances'\n | 'totalSharesEvm'\n | 'scalingFactors'\n | 'singleTokenOutIndex'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n const amountsOut = SOR.StableMathBigInt._calcTokensOutGivenExactBptIn(\n upScaledBalances,\n BigInt(bptIn),\n totalSharesEvm\n );\n // Maths return numbers scaled to 18 decimals. Must scale down to token decimals.\n const amountsOutScaledDown = _downscaleDownArray(\n amountsOut,\n scalingFactors\n );\n\n const expectedAmountsOut = amountsOutScaledDown.map((amount) =>\n amount.toString()\n );\n // Apply slippage tolerance\n const minAmountsOut = amountsOutScaledDown.map((amount) => {\n const minAmount = subSlippage(\n BigNumber.from(amount),\n BigNumber.from(slippage)\n );\n return minAmount.toString();\n });\n return { minAmountsOut, expectedAmountsOut };\n };\n calcBptInGivenExactTokensOut = ({\n ampWithPrecision,\n upScaledBalances,\n upScaledAmountsOut,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: CalcBptInGivenExactTokensOutParams): {\n maxBPTIn: string;\n expectedBPTIn: string;\n } => {\n // Calculate expected BPT in given tokens out\n const bptIn = SOR.StableMathBigInt._calcBptInGivenExactTokensOut(\n ampWithPrecision,\n upScaledBalances,\n upScaledAmountsOut,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n // Apply slippage tolerance\n const maxBPTIn = addSlippage(\n BigNumber.from(bptIn),\n BigNumber.from(slippage)\n ).toString();\n return { maxBPTIn, expectedBPTIn: bptIn };\n };\n\n encodeExitPool = ({\n poolId,\n exiter,\n poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n }: EncodeExitParams): ExitPoolAttributes => {\n const to = balancerVault;\n const functionName = 'exitPool';\n const attributes: ExitPool = {\n poolId,\n sender: exiter,\n recipient: exiter,\n exitPoolRequest: {\n assets: poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n },\n };\n // Encode transaction data into an ABI byte string which can be sent to the network to be executed\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.exitPoolRequest,\n ]);\n return { data, to, functionName, attributes };\n };\n}\n","import * as SOR from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { balancerVault } from '@/lib/constants/config';\nimport { AssetHelpers, getEthValue, parsePoolInfo } from '@/lib/utils';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { _upscaleArray } from '@/lib/utils/solidityMaths';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport { Pool } from '@/types';\n\nimport { StablePoolPriceImpact } from '../stable/priceImpact.concern';\nimport {\n JoinConcern,\n JoinPool,\n JoinPoolAttributes,\n JoinPoolParameters,\n} from '../types';\nimport { AddressZero } from '@ethersproject/constants';\n\ntype SortedValues = {\n poolTokens: string[];\n ampWithPrecision: bigint;\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n upScaledAmountsIn: bigint[];\n sortedAmountsIn: string[];\n};\n\ntype EncodeJoinPoolParams = {\n joiner: string;\n poolId: string;\n minBPTOut: string;\n} & Pick &\n Pick;\n\nexport class StablePoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n this.checkInputs(tokensIn, amountsIn, pool);\n const sortedValues = this.sortValues({\n pool,\n wrappedNativeAsset,\n tokensIn,\n amountsIn,\n });\n\n const { expectedBPTOut, minBPTOut } = this.calcBptOutGivenExactTokensIn({\n ...sortedValues,\n slippage,\n });\n\n const encodedData = this.encodeJoinPool({\n joiner,\n amountsIn,\n tokensIn,\n poolId: pool.id,\n minBPTOut,\n ...sortedValues,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n sortedValues.sortedAmountsIn.map(BigInt),\n BigInt(expectedBPTOut),\n true\n );\n\n return {\n ...encodedData,\n minBPTOut,\n expectedBPTOut,\n priceImpact,\n };\n };\n\n /**\n * Check if the input parameters of the buildJoin function are right\n * @param amountsIn Must have an amount for each token, if the user will not deposit any amount for a token, the value shall be '0'\n * @param tokensIn Must contain all the tokens of the pool\n * @param pool The pool that is being joined\n */\n checkInputs = (amountsIn: string[], tokensIn: string[], pool: Pool): void => {\n if (\n tokensIn.length != amountsIn.length ||\n tokensIn.length != pool.tokensList.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n\n sortValues = ({\n pool,\n wrappedNativeAsset,\n amountsIn,\n tokensIn,\n }: Pick<\n JoinPoolParameters,\n 'pool' | 'wrappedNativeAsset' | 'amountsIn' | 'tokensIn'\n >): SortedValues => {\n // Parse pool info into EVM amounts in order to match amountsIn scalling\n const {\n poolTokens,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n scalingFactors,\n upScaledBalances,\n } = parsePoolInfo(pool, wrappedNativeAsset, tokensIn.includes(AddressZero));\n\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts in into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, sortedAmountsIn] = assetHelpers.sortTokens(\n tokensIn,\n amountsIn\n ) as [string[], string[]];\n\n // Maths should use upscaled amounts, e.g. 1USDC => 1e18 not 1e6\n const upScaledAmountsIn = _upscaleArray(\n sortedAmountsIn.map((a) => BigInt(a)),\n scalingFactors.map((a) => BigInt(a))\n );\n return {\n poolTokens,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n upScaledBalances,\n upScaledAmountsIn,\n sortedAmountsIn,\n };\n };\n\n calcBptOutGivenExactTokensIn = ({\n ampWithPrecision,\n upScaledBalances,\n upScaledAmountsIn,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: Pick &\n Pick<\n SortedValues,\n | 'ampWithPrecision'\n | 'upScaledBalances'\n | 'upScaledAmountsIn'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n >): { expectedBPTOut: string; minBPTOut: string } => {\n const expectedBPTOut = SOR.StableMathBigInt._calcBptOutGivenExactTokensIn(\n ampWithPrecision,\n upScaledBalances,\n upScaledAmountsIn,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n const minBPTOut = subSlippage(\n BigNumber.from(expectedBPTOut),\n BigNumber.from(slippage)\n ).toString();\n\n return {\n expectedBPTOut,\n minBPTOut,\n };\n };\n\n encodeJoinPool = ({\n poolId,\n joiner,\n poolTokens,\n sortedAmountsIn,\n amountsIn,\n tokensIn,\n minBPTOut,\n }: EncodeJoinPoolParams): Pick<\n JoinPoolAttributes,\n 'value' | 'data' | 'to' | 'functionName' | 'attributes'\n > => {\n const userData = StablePoolEncoder.joinExactTokensInForBPTOut(\n sortedAmountsIn,\n minBPTOut\n );\n\n const to = balancerVault;\n const functionName = 'joinPool';\n const attributes: JoinPool = {\n poolId,\n sender: joiner,\n recipient: joiner,\n joinPoolRequest: {\n assets: poolTokens,\n maxAmountsIn: sortedAmountsIn,\n userData,\n fromInternalBalance: false,\n },\n };\n const vaultInterface = Vault__factory.createInterface();\n // encode transaction data into an ABI byte string which can be sent to the network to be executed\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ]);\n\n // If joining with a native asset value must be set in call\n const value = getEthValue(tokensIn, amountsIn);\n\n return {\n attributes,\n data,\n functionName,\n to,\n value,\n };\n };\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { parseFixed } from '@/lib/utils/math';\n\nconst SCALING_FACTOR = 18;\n\nexport class StablePoolLiquidity implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = BigNumber.from(0);\n let sumValue = BigNumber.from(0);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(token.price.usd.toString(), SCALING_FACTOR);\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n\n const value = balance.mul(price);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance.gt(0)) {\n const avgPrice = sumValue.div(sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n\n const value = balance.mul(avgPrice);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n }\n\n return formatFixed(sumValue, SCALING_FACTOR * 2).toString();\n }\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, StablePool, ZERO } from '@balancer-labs/sor';\nimport { Pool } from '@/types';\n\nexport class StablePoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const stablePool = StablePool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = stablePool.parsePoolPairData(tokenIn, tokenOut);\n return stablePool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n }\n}\n","import { StablePoolExit } from './concerns/stable/exit.concern';\nimport { StablePoolJoin } from './concerns/stable/join.concern';\nimport { StablePoolLiquidity } from './concerns/stable/liquidity.concern';\nimport { StablePoolSpotPrice } from './concerns/stable/spotPrice.concern';\nimport { StablePoolPriceImpact } from './concerns/stable/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class Stable implements PoolType {\n constructor(\n public exit: ExitConcern = new StablePoolExit(),\n public join: JoinConcern = new StablePoolJoin(),\n public liquidity: LiquidityConcern = new StablePoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new StablePoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new StablePoolPriceImpact()\n ) {}\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, PhantomStablePool, ZERO } from '@balancer-labs/sor';\nimport { Pool } from '@/types';\n\nexport class PhantomStablePoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const metaStablePool = PhantomStablePool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = metaStablePool.parsePoolPairData(tokenIn, tokenOut);\n return metaStablePool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n }\n}\n","import { StableMathBigInt } from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { balancerVault } from '@/lib/constants/config';\nimport {\n AssetHelpers,\n parsePoolInfo,\n insert,\n reorderArrays,\n getEthValue,\n} from '@/lib/utils';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { _upscaleArray } from '@/lib/utils/solidityMaths';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { Pool } from '@/types';\n\nimport { StablePoolPriceImpact } from '../stable/priceImpact.concern';\nimport {\n JoinPoolParameters,\n JoinConcern,\n JoinPoolAttributes,\n JoinPool,\n} from '../types';\nimport { AddressZero } from '@ethersproject/constants';\n\ninterface SortedValues {\n sortedAmountsIn: string[];\n scalingFactorsWithoutBpt: bigint[];\n upScaledBalancesWithoutBpt: bigint[];\n ampWithPrecision: bigint;\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n bptIndex: number;\n poolTokens: string[];\n}\n\ntype SortedInputs = SortedValues &\n Pick & {\n poolId: string;\n };\n\nexport class ComposableStablePoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n this.checkInputs(tokensIn, amountsIn, pool.tokensList);\n\n const sortedValues = this.sortValuesBasedOnPoolVersion({\n pool,\n wrappedNativeAsset,\n amountsIn,\n tokensIn,\n });\n\n const encodedData = this.buildExactTokensInForBPTOut({\n ...sortedValues,\n slippage,\n joiner,\n poolId: pool.id,\n });\n\n // If joining with a native asset value must be set in call\n const value = getEthValue(tokensIn, amountsIn);\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n sortedValues.sortedAmountsIn.map(BigInt),\n BigInt(encodedData.expectedBPTOut),\n true\n );\n\n return {\n ...encodedData,\n to: balancerVault,\n value,\n priceImpact,\n };\n };\n\n /**\n * Sorts inputs and pool value to be correct order and scale for maths and Vault interaction.\n * @param pool Pool data\n * @param wrappedNativeAsset (Used for sorting)\n * @param amountsIn Downscaled amounts in\n * @param tokensIn Addresses of token in\n * @returns Sorted values\n */\n sortValuesBasedOnPoolVersion({\n pool,\n wrappedNativeAsset,\n amountsIn,\n tokensIn,\n }: Pick<\n JoinPoolParameters,\n 'pool' | 'wrappedNativeAsset' | 'amountsIn' | 'tokensIn'\n >): SortedValues {\n /**\n * V1: Does not have proportional exits.\n * V2: Reintroduced proportional exits. Has vulnerability.\n * V3: Fixed vulnerability. Functionally the same as V2.\n * V4: Update to use new create method with new salt parameter\n * V5: Fixed vulnerability. Functionally the same as V4.\n */\n return this.sortV1(wrappedNativeAsset, tokensIn, amountsIn, pool);\n // Not release yet and needs tests to confirm\n // else if (values.pool.poolTypeVersion === 5)\n // sortedValues = this.sortV4(\n // values.tokensIn,\n // values.amountsIn,\n // values.pool\n // );\n }\n\n /**\n * Ensure tokensIn and amountsIn match pool tokens length\n * @param tokensIn\n * @param amountsIn\n * @param poolTokens\n */\n checkInputs(\n tokensIn: string[],\n amountsIn: string[],\n poolTokens: string[]\n ): void {\n if (\n tokensIn.length != amountsIn.length ||\n tokensIn.length != poolTokens.length - 1\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n }\n\n /**\n * Encodes user data with slippage applied to expected BPT out.\n * @param expectedBPTOut\n * @param slippage\n * @param amountsIn\n * @returns\n */\n encodeUserDataExactTokensInForBPTOut(\n expectedBPTOut: bigint,\n slippage: string,\n amountsIn: string[]\n ): { userData: string; minBPTOut: string } {\n const minBPTOut = subSlippage(\n BigNumber.from(expectedBPTOut),\n BigNumber.from(slippage)\n ).toString();\n\n //NEEDS TO ENCODE USER DATA WITHOUT BPT AMOUNT\n return {\n userData: ComposableStablePoolEncoder.joinExactTokensInForBPTOut(\n amountsIn, // No BPT amount\n minBPTOut\n ),\n minBPTOut,\n };\n }\n\n /**\n * Encode transaction data into an ABI byte string which can be sent to the network to be executed\n * @param poolId\n * @param sender\n * @param recipient\n * @param assetsWithBpt\n * @param encodedUserData\n * @param maxAmountsInWithBpt\n * @returns\n */\n encodeJoinPool(\n poolId: string,\n sender: string,\n recipient: string,\n assetsWithBpt: string[],\n encodedUserData: string,\n maxAmountsInWithBpt: string[]\n ): Pick {\n const functionName = 'joinPool';\n //assets AND maxAmountsIn NEEDS THE BPT VALUE IN THE ARRAY\n const attributes: JoinPool = {\n poolId,\n sender,\n recipient,\n joinPoolRequest: {\n assets: assetsWithBpt,\n maxAmountsIn: maxAmountsInWithBpt,\n userData: encodedUserData,\n fromInternalBalance: false,\n },\n };\n\n const vaultInterface = Vault__factory.createInterface();\n\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ]);\n\n return {\n functionName,\n attributes,\n data,\n };\n }\n\n /**\n * Sorts and scales values correctly for V1-V3 ComposableStable pool.\n * @param wrappedNativeAsset (Used for sorting)\n * @param tokensIn Addresses of token in\n * @param amountsIn Downscaled amounts in\n * @param pool Pool data\n * @returns Sorted values\n */\n sortV1(\n wrappedNativeAsset: string,\n tokensIn: string[],\n amountsIn: string[],\n pool: Pool\n ): SortedValues {\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts in into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, sortedAmountsIn] = assetHelpers.sortTokens(\n tokensIn,\n amountsIn\n ) as [string[], string[]];\n\n const {\n poolTokens,\n ampWithPrecision,\n swapFeeEvm,\n totalSharesEvm,\n bptIndex,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n } = parsePoolInfo(pool, wrappedNativeAsset, tokensIn.includes(AddressZero));\n return {\n sortedAmountsIn,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n bptIndex,\n poolTokens,\n };\n }\n\n buildExactTokensInForBPTOut(\n sortedValues: SortedInputs\n ): Pick<\n JoinPoolAttributes,\n 'minBPTOut' | 'functionName' | 'attributes' | 'data' | 'expectedBPTOut'\n > {\n const {\n sortedAmountsIn,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n bptIndex,\n poolTokens,\n slippage,\n poolId,\n joiner,\n } = sortedValues;\n // BPT out will be in correct scale and price rate is always 1e18 do doesn't need to be considered\n // Maths needs to have BPT values removed\n const expectedBPTOut = this.calcBptOutGivenExactTokensIn(\n sortedAmountsIn,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm\n );\n\n const userData = this.encodeUserDataExactTokensInForBPTOut(\n expectedBPTOut,\n slippage,\n sortedAmountsIn\n );\n\n const { functionName, data, attributes } = this.encodeJoinPool(\n poolId,\n joiner,\n joiner,\n poolTokens,\n userData.userData,\n insert(sortedAmountsIn, bptIndex, '0') // Adds value for BPT\n );\n\n return {\n functionName,\n data,\n attributes,\n minBPTOut: userData.minBPTOut,\n expectedBPTOut: expectedBPTOut.toString(),\n };\n }\n\n calcBptOutGivenExactTokensIn(\n amountsIn: string[],\n scalingFactorsWithoutBpt: bigint[],\n upScaledBalancesWithoutBpt: bigint[],\n ampWithPrecision: bigint,\n totalSharesEvm: bigint,\n swapFeeEvm: bigint\n ): bigint {\n /*\n Maths should use: \n - upscaled amounts, e.g. 1USDC = 1e18\n - rates (scaling factors should include these)\n */\n const upScaledAmountsIn = _upscaleArray(\n amountsIn.map(BigInt),\n scalingFactorsWithoutBpt.map(BigInt)\n );\n const expectedBPTOut = StableMathBigInt._calcBptOutGivenExactTokensIn(\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n upScaledAmountsIn, // Should not have BPT\n totalSharesEvm,\n swapFeeEvm\n );\n // BPT out will be in correct scale and price rate is always 1e18 do doesn't need to be considered\n return expectedBPTOut;\n }\n\n // This uses sorting where BPT is always at index 0.\n // Not currently released but keep for when it is.\n sortV4(tokensIn: string[], amountsIn: string[], pool: Pool): SortedValues {\n // This will keep ordering as read from Pool\n const {\n poolTokens,\n poolTokensWithoutBpt,\n ampWithPrecision,\n swapFeeEvm,\n totalSharesEvm,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n } = parsePoolInfo(pool);\n\n // Reorder amountsIn to match pool token order TODO - May have issues when adding native tokens to this mix.\n const [sortedAmountsIn] = reorderArrays(\n poolTokensWithoutBpt,\n tokensIn,\n amountsIn\n ) as [string[]];\n return {\n sortedAmountsIn,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n bptIndex: 0,\n poolTokens,\n };\n }\n}\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\n\nimport * as SOR from '@balancer-labs/sor';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport {\n AssetHelpers,\n insert,\n isSameAddress,\n parsePoolInfo,\n} from '@/lib/utils';\nimport { addSlippage, subSlippage } from '@/lib/utils/slippageHelper';\nimport {\n _downscaleDown,\n _downscaleDownArray,\n _upscaleArray,\n} from '@/lib/utils/solidityMaths';\nimport { balancerVault } from '@/lib/constants/config';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { Pool } from '@/types';\nimport {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactBPTInParameters,\n ExitExactTokensOutAttributes,\n ExitExactTokensOutParameters,\n ExitPool,\n ExitPoolAttributes,\n} from '../types';\nimport { BasePoolEncoder } from '@/pool-base';\nimport { StablePoolPriceImpact } from '../stable/priceImpact.concern';\n\ninterface SortedValues {\n poolTokens: string[];\n ampWithPrecision: bigint;\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n bptIndex: number;\n upScaledBalancesWithoutBpt: bigint[];\n scalingFactors: bigint[];\n scalingFactorsWithoutBpt: bigint[];\n}\n\ntype ExactBPTInSortedValues = SortedValues & {\n singleTokenOutIndexWithoutBpt: number;\n};\ntype ExactTokensOutSortedValues = SortedValues & {\n upScaledAmountsOutWithoutBpt: bigint[];\n downscaledAmountsOutWithoutBpt: string[];\n downscaledAmountsOutWithBpt: string[];\n};\n\ntype CalcBptInGivenExactTokensOutParams = ExactTokensOutSortedValues &\n Pick;\n\ntype SortValuesParams = {\n pool: Pool;\n wrappedNativeAsset: string;\n shouldUnwrapNativeAsset?: boolean;\n};\n\ntype SortValuesExactBptInParams = SortValuesParams & {\n singleTokenOut?: string;\n};\n\ntype SortValuesExactTokensOutParams = SortValuesParams & {\n amountsOut: string[];\n tokensOut: string[];\n};\n\ntype EncodeExitParams = Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'toInternalBalance'\n> & {\n poolTokens: string[];\n poolId: string;\n userData: string;\n minAmountsOut: string[];\n};\n\nexport class ComposableStablePoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n });\n\n const sortedValues = this.sortValuesExitExactBptIn({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n });\n\n const { minAmountsOut, expectedAmountsOut } =\n sortedValues.singleTokenOutIndexWithoutBpt >= 0\n ? this.calcTokenOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n })\n : this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData =\n sortedValues.singleTokenOutIndexWithoutBpt >= 0\n ? ComposableStablePoolEncoder.exitExactBPTInForOneTokenOut(\n bptIn,\n sortedValues.singleTokenOutIndexWithoutBpt\n )\n : ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut(bptIn);\n\n // MinAmounts needs a value for BPT for encoding\n const minAmountsOutWithBpt = insert(\n minAmountsOut,\n sortedValues.bptIndex,\n '0'\n );\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n userData,\n minAmountsOut: minAmountsOutWithBpt,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n this.checkInputsExactTokensOut(tokensOut, amountsOut, pool);\n const sortedValues = this.sortValuesExitExactTokensOut({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n });\n\n const { bptIn, maxBPTIn } = this.calcBptInGivenExactTokensOut({\n ...sortedValues,\n slippage,\n });\n\n // Have to make sure amountsOut does not have value for BPT index\n const userData = ComposableStablePoolEncoder.exitBPTInForExactTokensOut(\n sortedValues.downscaledAmountsOutWithoutBpt,\n maxBPTIn\n );\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n minAmountsOut: sortedValues.downscaledAmountsOutWithBpt,\n userData,\n exiter,\n poolId: pool.id,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n sortedValues.downscaledAmountsOutWithoutBpt.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n maxBPTIn,\n expectedBPTIn: bptIn,\n priceImpact,\n };\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n this.checkInputsRecoveryExit({\n bptIn,\n pool,\n });\n // Recovery exits don't use rates. We use them as part of scalingFactor so default to 1 incase of issues\n pool.tokens.forEach((t) => (t.priceRate = '1'));\n\n const sortedValues = parsePoolInfo(pool);\n\n const { minAmountsOut, expectedAmountsOut } =\n this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData = BasePoolEncoder.recoveryModeExit(bptIn);\n\n // MinAmounts needs a value for BPT for encoding\n const minAmountsOutWithBpt = insert(\n minAmountsOut,\n sortedValues.bptIndex,\n '0'\n );\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n userData,\n minAmountsOut: minAmountsOutWithBpt,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt amoun in EVM scale\n * @param singleTokenOut (optional) the address of the single token that will be withdrawn, if null|undefined, all tokens will be withdrawn proportionally.\n * @param pool the pool that is being exited\n * @param shouldUnwrapNativeAsset Set true if the weth should be unwrapped to Eth\n */\n checkInputsExactBPTIn = ({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n }: Pick<\n ExitExactBPTInParameters,\n 'bptIn' | 'singleTokenOut' | 'pool' | 'shouldUnwrapNativeAsset'\n >): void => {\n if (BigNumber.from(bptIn).lte(0)) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n if (!singleTokenOut && pool.poolTypeVersion < 2) {\n throw new Error('Unsupported Exit Type For Pool');\n }\n if (\n singleTokenOut &&\n singleTokenOut !== AddressZero &&\n !pool.tokens\n .map((t) => t.address)\n .some((a) => isSameAddress(a, singleTokenOut))\n ) {\n throw new BalancerError(BalancerErrorCode.TOKEN_MISMATCH);\n }\n\n if (!shouldUnwrapNativeAsset && singleTokenOut === AddressZero)\n throw new Error(\n 'shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values'\n );\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n\n /**\n * Checks if the input of buildExitExactTokensOut is valid\n */\n checkInputsExactTokensOut = (\n tokensOut: string[],\n amountsOut: string[],\n pool: Pool\n ): void => {\n // Should have a token for input for each non-BPT pool token\n // Should be an amount out for each token out\n if (\n tokensOut.length != amountsOut.length ||\n tokensOut.length != pool.tokensList.length - 1\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt amount in EVM scale\n * @param pool the pool that is being exited\n */\n checkInputsRecoveryExit = ({\n bptIn,\n pool,\n }: Pick): void => {\n if (BigNumber.from(bptIn).lte(0)) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n if (!pool.isInRecoveryMode) {\n throw new Error(\n 'Exit type not supported because pool is not in Recovery Mode'\n );\n }\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n\n /**\n * Sorts and returns the values of amounts, tokens, balances, indexes, that are necessary to do the maths and build the exit transactions\n * @param pool\n * @param singleTokenOut\n * @param wrappedNativeAsset\n * @param shouldUnwrapNativeAsset\n * @param amountsOut\n * @param tokensOut\n */\n sortValuesExitExactBptIn = ({\n pool,\n singleTokenOut,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n }: SortValuesExactBptInParams): ExactBPTInSortedValues => {\n const parsedValues = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n let singleTokenOutIndexWithoutBpt = -1;\n if (singleTokenOut) {\n singleTokenOutIndexWithoutBpt =\n parsedValues.poolTokensWithoutBpt.indexOf(singleTokenOut);\n }\n return {\n ...parsedValues,\n singleTokenOutIndexWithoutBpt,\n };\n };\n /**\n * Sorts and returns the values of amounts, tokens, balances, indexes, that are necessary to do the maths and build the exit transactions\n * @param pool\n * @param singleTokenOut\n * @param wrappedNativeAsset\n * @param amountsOut\n * @param tokensOut\n */\n sortValuesExitExactTokensOut = ({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n }: SortValuesExactTokensOutParams): ExactTokensOutSortedValues => {\n const shouldUnwrapNativeAsset = tokensOut.some((a) => a === AddressZero);\n const parsedValues = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts out into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, downscaledAmountsOutWithoutBpt] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n const downscaledAmountsOutWithBpt = insert(\n downscaledAmountsOutWithoutBpt,\n parsedValues.bptIndex,\n '0'\n );\n\n // This should not be required but there is currently a rounding issue with maths and this will ensure tx\n const downscaledAmountsOutWithBptWithRounding =\n downscaledAmountsOutWithBpt.map((a) => {\n const value = BigNumber.from(a);\n return value.isZero() ? a : value.sub(1).toString();\n });\n\n // Maths should use upscaled amounts with rates, e.g. 1USDC => 1e18 not 1e6\n const upScaledAmountsOutWithoutBpt = _upscaleArray(\n downscaledAmountsOutWithoutBpt.map((a) => BigInt(a)),\n parsedValues.scalingFactorsWithoutBpt\n );\n\n return {\n ...parsedValues,\n upScaledAmountsOutWithoutBpt,\n downscaledAmountsOutWithBpt: downscaledAmountsOutWithBptWithRounding,\n downscaledAmountsOutWithoutBpt,\n };\n };\n /**\n * Calculate the minimum and expect amountOut of the exit with exact bpt in transaction, and passes it to minAmountsOut and expectedAmountsOut arrays passed as parameters;\n * @param sortedValues\n * @param expectedAmountsOut\n * @param minAmountsOut\n * @param bptIn\n * @param slippage\n */\n calcTokenOutGivenExactBptIn = ({\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n singleTokenOutIndexWithoutBpt,\n scalingFactorsWithoutBpt,\n totalSharesEvm,\n swapFeeEvm,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n | 'ampWithPrecision'\n | 'upScaledBalancesWithoutBpt'\n | 'singleTokenOutIndexWithoutBpt'\n | 'scalingFactorsWithoutBpt'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n // Calculate amount out given BPT in\n const amountOut = SOR.StableMathBigInt._calcTokenOutGivenExactBptIn(\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n singleTokenOutIndexWithoutBpt,\n BigInt(bptIn),\n totalSharesEvm,\n swapFeeEvm\n );\n const expectedAmountsOut = Array(upScaledBalancesWithoutBpt.length).fill(\n '0'\n );\n const minAmountsOut = Array(upScaledBalancesWithoutBpt.length).fill('0');\n // Downscales to token decimals and removes priceRate\n const downscaledAmountOut = _downscaleDown(\n amountOut,\n scalingFactorsWithoutBpt[singleTokenOutIndexWithoutBpt]\n );\n\n expectedAmountsOut[singleTokenOutIndexWithoutBpt] =\n downscaledAmountOut.toString();\n // Apply slippage tolerance\n minAmountsOut[singleTokenOutIndexWithoutBpt] = subSlippage(\n BigNumber.from(downscaledAmountOut),\n BigNumber.from(slippage)\n ).toString();\n\n return { minAmountsOut, expectedAmountsOut };\n };\n\n calcTokensOutGivenExactBptIn = ({\n upScaledBalancesWithoutBpt,\n totalSharesEvm,\n scalingFactorsWithoutBpt,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n 'upScaledBalancesWithoutBpt' | 'totalSharesEvm' | 'scalingFactorsWithoutBpt'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n const amountsOut = SOR.StableMathBigInt._calcTokensOutGivenExactBptIn(\n upScaledBalancesWithoutBpt,\n BigInt(bptIn),\n totalSharesEvm\n );\n // Maths return numbers scaled to 18 decimals. Must scale down to token decimals.\n const amountsOutScaledDown = _downscaleDownArray(\n amountsOut,\n scalingFactorsWithoutBpt\n );\n\n const expectedAmountsOut = amountsOutScaledDown.map((amount) =>\n amount.toString()\n );\n // Apply slippage tolerance\n const minAmountsOut = amountsOutScaledDown.map((amount) => {\n const minAmount = subSlippage(\n BigNumber.from(amount),\n BigNumber.from(slippage)\n );\n return minAmount.toString();\n });\n return { minAmountsOut, expectedAmountsOut };\n };\n\n /**\n * Calculate the bptIn and maxBPTIn of the exit with exact tokens out transaction and returns them;\n * @param ampWithPrecision\n * @param upScaledBalancesWithoutBpt\n * @param upScaledAmountsOut\n * @param totalSharesEvm\n * @param swapFeeEvm\n * @param slippage\n */\n calcBptInGivenExactTokensOut = ({\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n upScaledAmountsOutWithoutBpt,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: CalcBptInGivenExactTokensOutParams): {\n bptIn: string;\n maxBPTIn: string;\n } => {\n const bptIn = SOR.StableMathBigInt._calcBptInGivenExactTokensOut(\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n upScaledAmountsOutWithoutBpt,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n // Apply slippage tolerance\n const maxBPTIn = addSlippage(\n BigNumber.from(bptIn),\n BigNumber.from(slippage)\n ).toString();\n\n return { bptIn, maxBPTIn };\n };\n\n /**\n * Encodes the function data and does the final building of the exit(with exact tokens out) transaction\n * @param params\n */\n encodeExitPool = (params: EncodeExitParams): ExitPoolAttributes => {\n const {\n exiter,\n poolId,\n minAmountsOut,\n userData,\n poolTokens,\n toInternalBalance,\n } = params;\n\n const to = balancerVault;\n const functionName = 'exitPool';\n const attributes: ExitPool = {\n poolId: poolId,\n sender: exiter,\n recipient: exiter,\n exitPoolRequest: {\n assets: poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n },\n };\n\n // encode transaction data into an ABI byte string which can be sent to the network to be executed\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.exitPoolRequest,\n ]);\n\n return {\n to,\n functionName,\n attributes,\n data,\n };\n };\n}\n","import { StablePoolLiquidity } from './concerns/stable/liquidity.concern';\nimport { PhantomStablePoolSpotPrice } from './concerns/stablePhantom/spotPrice.concern';\nimport { StablePoolPriceImpact } from './concerns/stable/priceImpact.concern';\nimport { ComposableStablePoolJoin } from './concerns/composableStable/join.concern';\nimport { ComposableStablePoolExit } from './concerns/composableStable/exit.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class ComposableStable implements PoolType {\n constructor(\n public exit: ExitConcern = new ComposableStablePoolExit(),\n public liquidity: LiquidityConcern = new StablePoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new PhantomStablePoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new StablePoolPriceImpact(),\n public join: JoinConcern = new ComposableStablePoolJoin()\n ) {}\n}\n","import { PriceImpactConcern } from '@/modules/pools/pool-types/concerns/types';\nimport { calcPriceImpact } from '@/modules/pricing/priceImpact';\nimport { ONE, BZERO, _upscale } from '@/lib/utils/solidityMaths';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Pool } from '@/types';\nimport { parsePoolInfo } from '@/lib/utils';\n\nexport class WeightedPoolPriceImpact implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n if (tokenAmounts.length !== pool.tokensList.length)\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n\n // totalShares, balances and weights all scaled up to 18 decimals\n const { scalingFactorsRaw, totalSharesEvm, upScaledBalances, weights } =\n parsePoolInfo(pool);\n\n let bptZeroPriceImpact = BZERO;\n for (let i = 0; i < tokenAmounts.length; i++) {\n const price = (weights[i] * totalSharesEvm) / upScaledBalances[i];\n const amountUpscaled = _upscale(tokenAmounts[i], scalingFactorsRaw[i]);\n const newTerm = (price * amountUpscaled) / ONE;\n bptZeroPriceImpact += newTerm;\n }\n return bptZeroPriceImpact;\n }\n\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n const bptZeroPriceImpact = this.bptZeroPriceImpact(pool, tokenAmounts);\n return calcPriceImpact(bptAmount, bptZeroPriceImpact, isJoin).toString();\n }\n}\n","import { BigNumber, parseFixed } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport * as SOR from '@balancer-labs/sor';\nimport {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n ExitExactBPTInParameters,\n ExitExactTokensOutParameters,\n ExitPool,\n ExitPoolAttributes,\n} from '../types';\nimport { AssetHelpers, isSameAddress, parsePoolInfo } from '@/lib/utils';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { addSlippage, subSlippage } from '@/lib/utils/slippageHelper';\nimport { balancerVault } from '@/lib/constants/config';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport {\n _downscaleDown,\n _downscaleDownArray,\n _upscaleArray,\n} from '@/lib/utils/solidityMaths';\nimport { Pool } from '@/types';\nimport { BasePoolEncoder } from '@/pool-base';\nimport { WeightedPoolPriceImpact } from '../weighted/priceImpact.concern';\n\ninterface SortedValues {\n poolTokens: string[];\n weights: bigint[];\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n}\n\ntype ExactBPTInSortedValues = SortedValues & {\n scalingFactors: bigint[];\n singleTokenOutIndex: number;\n};\n\ntype ExactTokensOutSortedValues = SortedValues & {\n upScaledAmountsOut: bigint[];\n downScaledAmountsOut: string[];\n};\ntype CalcBptInGivenExactTokensOutParams = ExactTokensOutSortedValues &\n Pick;\n\ntype SortValuesParams = {\n pool: Pool;\n wrappedNativeAsset: string;\n shouldUnwrapNativeAsset?: boolean;\n};\n\ntype SortValuesExactBptInParams = SortValuesParams & {\n singleTokenOut?: string;\n};\n\ntype SortValuesExactTokensOutParams = SortValuesParams & {\n amountsOut: string[];\n tokensOut: string[];\n};\n\ntype EncodeExitParams = Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'toInternalBalance'\n> & {\n poolTokens: string[];\n poolId: string;\n userData: string;\n minAmountsOut: string[];\n};\n\nexport class WeightedPoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n });\n const sortedValues = this.sortValuesExitExactBptIn({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n });\n const { minAmountsOut, expectedAmountsOut } =\n sortedValues.singleTokenOutIndex >= 0\n ? this.calcTokenOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n })\n : this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData =\n sortedValues.singleTokenOutIndex >= 0\n ? WeightedPoolEncoder.exitExactBPTInForOneTokenOut(\n bptIn,\n sortedValues.singleTokenOutIndex\n )\n : WeightedPoolEncoder.exitExactBPTInForTokensOut(bptIn);\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new WeightedPoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n this.checkInputsExactTokensOut(amountsOut, tokensOut, pool);\n\n const sortedValues = this.sortValuesExitExactTokensOut({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n });\n const { expectedBPTIn, maxBPTIn } = this.calcBptInGivenExactTokensOut({\n ...sortedValues,\n slippage,\n });\n\n const { downScaledAmountsOut, poolTokens } = sortedValues;\n const userData = WeightedPoolEncoder.exitBPTInForExactTokensOut(\n downScaledAmountsOut,\n maxBPTIn\n );\n const encodedData = this.encodeExitPool({\n poolId: pool.id,\n userData,\n poolTokens,\n minAmountsOut: downScaledAmountsOut,\n exiter,\n toInternalBalance,\n });\n\n const priceImpactConcern = new WeightedPoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n downScaledAmountsOut.map(BigInt),\n BigInt(expectedBPTIn),\n false\n );\n\n return {\n ...encodedData,\n expectedBPTIn,\n maxBPTIn,\n priceImpact,\n };\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut: undefined,\n pool,\n shouldUnwrapNativeAsset: false,\n });\n // Recovery exits don't use rates. We use them as part of scalingFactor so default to 1 incase of issues\n pool.tokens.forEach((t) => (t.priceRate = '1'));\n const sortedValues = parsePoolInfo(pool);\n const { minAmountsOut, expectedAmountsOut } =\n this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n singleTokenOutIndex: -1,\n });\n\n const userData = BasePoolEncoder.recoveryModeExit(bptIn);\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new WeightedPoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt inserted in the transaction\n * @param singleTokenOut (optional) the address of the single token that will be withdrawn, if null|undefined, all tokens will be withdrawn proportionally.\n * @param pool the pool that is being exited\n * @param shouldUnwrapNativeAsset Set true if the weth should be unwrapped to Eth\n */\n checkInputsExactBPTIn = ({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n }: Pick<\n ExitExactBPTInParameters,\n 'bptIn' | 'singleTokenOut' | 'pool' | 'shouldUnwrapNativeAsset'\n >): void => {\n if (!bptIn.length || parseFixed(bptIn, 18).isNegative()) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n if (\n singleTokenOut &&\n singleTokenOut !== AddressZero &&\n !pool.tokens\n .map((t) => t.address)\n .some((a) => isSameAddress(a, singleTokenOut))\n ) {\n throw new BalancerError(BalancerErrorCode.TOKEN_MISMATCH);\n }\n\n if (!shouldUnwrapNativeAsset && singleTokenOut === AddressZero)\n throw new Error(\n 'shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values'\n );\n\n // Check if there's any relevant weighted pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n };\n /**\n * Checks if the input of buildExitExactTokensOut is valid\n * @param amountsOut Must have an amount for each token, if the user will not withdraw any amount for a token, the value shall be '0'\n * @param tokensOut Must contain all the tokens of the pool\n * @param pool The pool that is being exited\n */\n checkInputsExactTokensOut = (\n amountsOut: string[],\n tokensOut: string[],\n pool: Pool\n ): void => {\n if (\n tokensOut.length != amountsOut.length ||\n tokensOut.length != pool.tokensList.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n // Check if there's any important weighted pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n };\n sortValuesExitExactBptIn = ({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n }: SortValuesExactBptInParams): ExactBPTInSortedValues => {\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n // Parse pool info into EVM amounts in order to match amountsIn scalling\n const { poolTokens } = parsedPoolInfo;\n let singleTokenOutIndex = -1;\n if (singleTokenOut) {\n singleTokenOutIndex = poolTokens.indexOf(singleTokenOut.toLowerCase());\n }\n return {\n ...parsedPoolInfo,\n singleTokenOutIndex,\n };\n };\n sortValuesExitExactTokensOut = ({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n }: SortValuesExactTokensOutParams): ExactTokensOutSortedValues => {\n const shouldUnwrapNativeAsset = tokensOut.some((a) => a === AddressZero);\n // Parse pool info into EVM amounts in order to match amountsOut scaling\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n const { scalingFactors } = parsedPoolInfo;\n\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts in into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, downScaledAmountsOut] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n // Maths should use upscaled amounts, e.g. 1USDC => 1e18 not 1e6\n const upScaledAmountsOut = _upscaleArray(\n downScaledAmountsOut.map((a) => BigInt(a)),\n scalingFactors.map((a) => BigInt(a))\n );\n\n return {\n ...parsedPoolInfo,\n upScaledAmountsOut,\n downScaledAmountsOut,\n };\n };\n calcTokenOutGivenExactBptIn = ({\n poolTokens,\n weights,\n upScaledBalances,\n totalSharesEvm,\n swapFeeEvm,\n singleTokenOutIndex,\n bptIn,\n slippage,\n scalingFactors,\n }: Pick<\n ExactBPTInSortedValues,\n | 'poolTokens'\n | 'weights'\n | 'upScaledBalances'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n | 'singleTokenOutIndex'\n | 'scalingFactors'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n // Calculate amount out given BPT in\n const amountOut = SOR.WeightedMaths._calcTokenOutGivenExactBptIn(\n upScaledBalances[singleTokenOutIndex],\n weights[singleTokenOutIndex],\n BigInt(bptIn),\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n const downscaledAmountOut = _downscaleDown(\n BigInt(amountOut) - BigInt(1), // The -1 is to solve rounding errors, sometimes the amount comes 1 point lower than expected\n scalingFactors[singleTokenOutIndex]\n ).toString();\n\n const expectedAmountsOut = Array(poolTokens.length).fill('0');\n const minAmountsOut = Array(poolTokens.length).fill('0');\n\n expectedAmountsOut[singleTokenOutIndex] = downscaledAmountOut;\n // Apply slippage tolerance\n minAmountsOut[singleTokenOutIndex] = subSlippage(\n BigNumber.from(downscaledAmountOut),\n BigNumber.from(slippage)\n ).toString();\n\n return { minAmountsOut, expectedAmountsOut };\n };\n\n calcTokensOutGivenExactBptIn = ({\n upScaledBalances,\n totalSharesEvm,\n scalingFactors,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n | 'upScaledBalances'\n | 'totalSharesEvm'\n | 'scalingFactors'\n | 'singleTokenOutIndex'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n // Calculate amounts out given BPT in\n const amountsOut = SOR.WeightedMaths._calcTokensOutGivenExactBptIn(\n upScaledBalances,\n BigInt(bptIn),\n totalSharesEvm\n ).map((amount) => amount.toString());\n // Maths return numbers scaled to 18 decimals. Must scale down to token decimals.\n const amountsOutScaledDown = _downscaleDownArray(\n amountsOut.map((a) => BigInt(a)),\n scalingFactors\n );\n\n const expectedAmountsOut = amountsOutScaledDown.map((amount) =>\n amount.toString()\n );\n // Apply slippage tolerance\n const minAmountsOut = amountsOutScaledDown.map((amount) => {\n const minAmount = subSlippage(\n BigNumber.from(amount),\n BigNumber.from(slippage)\n );\n return minAmount.toString();\n });\n return { minAmountsOut, expectedAmountsOut };\n };\n calcBptInGivenExactTokensOut = ({\n weights,\n upScaledBalances,\n upScaledAmountsOut,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: CalcBptInGivenExactTokensOutParams): {\n maxBPTIn: string;\n expectedBPTIn: string;\n } => {\n // Calculate expected BPT in given tokens out\n const bptIn = SOR.WeightedMaths._calcBptInGivenExactTokensOut(\n upScaledBalances,\n weights,\n upScaledAmountsOut,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n // Apply slippage tolerance\n const maxBPTIn = addSlippage(\n BigNumber.from(bptIn),\n BigNumber.from(slippage)\n ).toString();\n return { maxBPTIn, expectedBPTIn: bptIn };\n };\n\n encodeExitPool = ({\n poolId,\n exiter,\n poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n }: EncodeExitParams): ExitPoolAttributes => {\n const to = balancerVault;\n const functionName = 'exitPool';\n const attributes: ExitPool = {\n poolId,\n sender: exiter,\n recipient: exiter,\n exitPoolRequest: {\n assets: poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n },\n };\n // Encode transaction data into an ABI byte string which can be sent to the network to be executed\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.exitPoolRequest,\n ]);\n return { data, to, functionName, attributes };\n };\n}\n","import { WeightedMaths } from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { balancerVault } from '@/lib/constants/config';\nimport { AssetHelpers, getEthValue, parsePoolInfo } from '@/lib/utils';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { _upscaleArray } from '@/lib/utils/solidityMaths';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { Address, Pool } from '@/types';\nimport {\n JoinConcern,\n JoinPool,\n JoinPoolAttributes,\n JoinPoolParameters,\n} from '../types';\nimport { WeightedPoolPriceImpact } from '../weighted/priceImpact.concern';\n\ntype SortedValues = {\n poolTokens: string[];\n weights: bigint[];\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n upScaledAmountsIn: bigint[];\n sortedAmountsIn: string[];\n};\n\nexport class WeightedPoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n this.checkInputs(amountsIn, tokensIn, pool);\n\n const sortedValues = this.sortValues({\n pool,\n wrappedNativeAsset,\n tokensIn,\n amountsIn,\n });\n\n const { expectedBPTOut, minBPTOut } = this.calcBptOutGivenExactTokensIn({\n ...sortedValues,\n slippage,\n });\n\n const encodedFunctionData = this.encodeJoinPool({\n ...sortedValues,\n poolId: pool.id,\n joiner,\n minBPTOut,\n tokensIn,\n amountsIn,\n });\n\n const priceImpactConcern = new WeightedPoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n sortedValues.sortedAmountsIn.map(BigInt),\n BigInt(expectedBPTOut),\n true\n );\n\n return {\n ...encodedFunctionData,\n minBPTOut,\n expectedBPTOut,\n priceImpact,\n };\n };\n\n /**\n * Check if the input parameters of the buildJoin function are right\n * @param amountsIn Must have an amount for each token, if the user will not deposit any amount for a token, the value shall be '0'\n * @param tokensIn Must contain all the tokens of the pool\n * @param pool The pool that is being joined\n */\n checkInputs = (tokensIn: string[], amountsIn: string[], pool: Pool): void => {\n if (\n tokensIn.length != amountsIn.length ||\n tokensIn.length != pool.tokensList.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n\n // Check if there's any relevant weighted pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (pool.tokens.some((token) => !token.weight))\n throw new BalancerError(BalancerErrorCode.MISSING_WEIGHT);\n };\n\n sortValues = ({\n pool,\n tokensIn,\n amountsIn,\n wrappedNativeAsset,\n }: Pick<\n JoinPoolParameters,\n 'pool' | 'wrappedNativeAsset' | 'amountsIn' | 'tokensIn'\n >): SortedValues => {\n const shouldUnwrapNativeAsset = tokensIn.some((a) => a === AddressZero);\n // Parse pool info into EVM amounts in order to match amountsIn scalling\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // sort inputs\n const [, sortedAmountsIn] = assetHelpers.sortTokens(\n tokensIn,\n amountsIn\n ) as [string[], string[]];\n const upScaledAmountsIn = _upscaleArray(\n sortedAmountsIn.map(BigInt),\n parsedPoolInfo.scalingFactors\n );\n // sort pool info\n return {\n ...parsedPoolInfo,\n sortedAmountsIn,\n upScaledAmountsIn,\n };\n };\n\n calcBptOutGivenExactTokensIn = ({\n upScaledBalances,\n weights,\n upScaledAmountsIn,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: Pick &\n Pick<\n SortedValues,\n | 'upScaledBalances'\n | 'weights'\n | 'upScaledAmountsIn'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n >): { expectedBPTOut: string; minBPTOut: string } => {\n const expectedBPTOut = WeightedMaths._calcBptOutGivenExactTokensIn(\n upScaledBalances,\n weights,\n upScaledAmountsIn,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n const minBPTOut = subSlippage(\n BigNumber.from(expectedBPTOut),\n BigNumber.from(slippage)\n ).toString();\n\n return {\n expectedBPTOut,\n minBPTOut,\n };\n };\n encodeJoinPool = ({\n sortedAmountsIn,\n poolTokens,\n poolId,\n joiner,\n minBPTOut,\n amountsIn,\n tokensIn,\n }: Pick &\n Pick & {\n joiner: Address;\n poolId: string;\n minBPTOut: string;\n }): Pick<\n JoinPoolAttributes,\n 'value' | 'data' | 'to' | 'functionName' | 'attributes'\n > => {\n const userData = WeightedPoolEncoder.joinExactTokensInForBPTOut(\n sortedAmountsIn,\n minBPTOut\n );\n const to = balancerVault;\n const functionName = 'joinPool';\n const attributes: JoinPool = {\n poolId,\n sender: joiner,\n recipient: joiner,\n joinPoolRequest: {\n assets: poolTokens,\n maxAmountsIn: sortedAmountsIn,\n userData,\n fromInternalBalance: false,\n },\n };\n const vaultInterface = Vault__factory.createInterface();\n // encode transaction data into an ABI byte string which can be sent to the network to be executed\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ]);\n\n const value = getEthValue(tokensIn, amountsIn);\n\n return {\n to,\n functionName,\n data,\n attributes,\n value,\n };\n };\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { parseFixed, formatFixed } from '@/lib/utils/math';\n\nconst SCALING_FACTOR = 18;\n\nexport class WeightedPoolLiquidity implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumWeight = BigNumber.from(0);\n let sumValue = BigNumber.from(0);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n if (!token.price?.usd) {\n continue;\n }\n\n let price: BigNumber;\n if (parseFloat(token.price.usd) < 1) {\n price = parseFixed(parseFloat(token.price.usd).toFixed(10), 10).mul(\n 1e8\n );\n } else {\n price = parseFixed(token.price.usd, SCALING_FACTOR);\n }\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n const weight = parseFixed(token.weight || '0', SCALING_FACTOR);\n\n const value = balance.mul(price);\n sumValue = sumValue.add(value);\n sumWeight = sumWeight.add(weight);\n }\n\n // Scale the known prices of x% of the pool to get value of 100% of the pool.\n const totalWeight = tokens.reduce(\n (total: BigNumber, token) =>\n total.add(parseFixed(token.weight || '0', SCALING_FACTOR)),\n BigNumber.from(0)\n );\n if (sumWeight.gt(0)) {\n const liquidity = sumValue.mul(totalWeight).div(sumWeight);\n return formatFixed(liquidity, SCALING_FACTOR * 2);\n }\n\n return '0';\n }\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, WeightedPool, ZERO } from '@balancer-labs/sor';\nimport { Pool, PoolToken } from '@/types';\n\nexport class WeightedPoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const isBPTAsToken = tokenIn === pool.address || tokenOut === pool.address;\n if (isBPTAsToken) {\n const bptAsToken: PoolToken = {\n address: pool.address,\n balance: pool.totalShares,\n decimals: 18,\n priceRate: '1',\n weight: '0',\n };\n pool.tokens.push(bptAsToken);\n pool.tokensList.push(pool.address);\n }\n const weightedPool = WeightedPool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = weightedPool.parsePoolPairData(tokenIn, tokenOut);\n const spotPrice = weightedPool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n if (isBPTAsToken) {\n pool.tokens.pop();\n pool.tokensList.pop();\n }\n return spotPrice;\n }\n}\n","import { WeightedPoolExit } from './concerns/weighted/exit.concern';\nimport { WeightedPoolJoin } from './concerns/weighted/join.concern';\nimport { WeightedPoolLiquidity } from './concerns/weighted/liquidity.concern';\nimport { WeightedPoolSpotPrice } from './concerns/weighted/spotPrice.concern';\nimport { WeightedPoolPriceImpact } from './concerns/weighted/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class Weighted implements PoolType {\n constructor(\n public exit: ExitConcern = new WeightedPoolExit(),\n public join: JoinConcern = new WeightedPoolJoin(),\n public liquidity: LiquidityConcern = new WeightedPoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new WeightedPoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new WeightedPoolPriceImpact()\n ) {}\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { formatFixed } from '@ethersproject/bignumber';\nimport { parseFixed } from '@/lib/utils/math';\nimport { Zero } from '@ethersproject/constants';\n\nconst SCALING_FACTOR = 18;\n\nexport class MetaStablePoolLiquidity implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = Zero;\n let sumValue = Zero;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(token.price.usd.toString(), SCALING_FACTOR);\n\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n\n const value = balance.mul(price);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance.gt(0)) {\n const avgPrice = sumValue.div(sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n\n const value = balance.mul(avgPrice);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n }\n\n return formatFixed(sumValue, SCALING_FACTOR * 2).toString();\n }\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, MetaStablePool, ZERO } from '@balancer-labs/sor';\nimport { Pool } from '@/types';\n\nexport class MetaStablePoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const metaStablePool = MetaStablePool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = metaStablePool.parsePoolPairData(tokenIn, tokenOut);\n return metaStablePool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n }\n}\n","import { MetaStablePoolLiquidity } from './concerns/metaStable/liquidity.concern';\nimport { MetaStablePoolSpotPrice } from './concerns/metaStable/spotPrice.concern';\nimport { StablePoolPriceImpact } from './concerns/stable/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n SpotPriceConcern,\n PriceImpactConcern,\n} from './concerns/types';\nimport { StablePoolExit } from '@/modules/pools/pool-types/concerns/stable/exit.concern';\nimport { StablePoolJoin } from '@/modules/pools/pool-types/concerns/stable/join.concern';\n\nexport class MetaStable implements PoolType {\n constructor(\n public exit: ExitConcern = new StablePoolExit(),\n public join: JoinConcern = new StablePoolJoin(),\n public liquidity: LiquidityConcern = new MetaStablePoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new MetaStablePoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new StablePoolPriceImpact()\n ) {}\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport {\n ExitConcern,\n ExitExactBPTInParameters,\n ExitExactTokensOutParameters,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n} from '../types';\n\nexport class StablePhantomPoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n /**\n * Exit type only supported when pool is in paused state and pause window\n * has expired, so this type of exit will not be supported.\n */\n throw new Error('Exit type not supported');\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n throw new Error('Exit type not supported');\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n throw new Error('Exit type not supported');\n };\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { JoinPoolParameters, JoinConcern, JoinPoolAttributes } from '../types';\n\nexport class StablePhantomPoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n throw new Error('Join type not supported');\n };\n}\n","import { StablePhantomPoolExit } from './concerns/stablePhantom/exit.concern';\nimport { StablePhantomPoolJoin } from './concerns/stablePhantom/join.concern';\nimport { StablePoolLiquidity } from './concerns/stable/liquidity.concern';\nimport { PhantomStablePoolSpotPrice } from './concerns/stablePhantom/spotPrice.concern';\nimport { StablePoolPriceImpact } from './concerns/stable/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n PriceImpactConcern,\n LiquidityConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class StablePhantom implements PoolType {\n constructor(\n public exit: ExitConcern = new StablePhantomPoolExit(),\n public join: JoinConcern = new StablePhantomPoolJoin(),\n public liquidity: LiquidityConcern = new StablePoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new PhantomStablePoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new StablePoolPriceImpact()\n ) {}\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { PriceImpactConcern } from '../types';\nimport { Pool } from '@/types';\n\nexport class LinearPriceImpact implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n throw new Error('Linear Pool bptZeroPriceImpact Not Implented');\n }\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n // Linear pools don't have price impact\n return '0';\n }\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport * as SOR from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts';\nimport { balancerVault } from '@/lib/constants/config';\nimport { insert, parsePoolInfo, removeItem } from '@/lib/utils';\nimport { _downscaleDownArray } from '@/lib/utils/solidityMaths';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { BasePoolEncoder } from '@/pool-base';\n\nimport {\n ExitConcern,\n ExitExactBPTInParameters,\n ExitExactTokensOutParameters,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n ExitPoolAttributes,\n ExitPool,\n} from '../types';\nimport { LinearPriceImpact } from '../linear/priceImpact.concern';\n\ninterface SortedValues {\n bptIndex: number;\n poolTokens: string[];\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n}\n\ntype ExactBPTInSortedValues = SortedValues & {\n scalingFactors: bigint[];\n};\n\ntype EncodeExitParams = Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'toInternalBalance'\n> & {\n poolTokens: string[];\n poolId: string;\n userData: string;\n minAmountsOut: string[];\n};\n\nexport class LinearPoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n throw new Error('Exit type not supported');\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n throw new Error('Exit type not supported');\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut: undefined,\n pool,\n shouldUnwrapNativeAsset: false,\n });\n // Recovery exits don't use rates. We use them as part of scalingFactor so default to 1 incase of issues\n pool.tokens.forEach((t) => (t.priceRate = '1'));\n const sortedValues = parsePoolInfo(pool);\n const { minAmountsOut, expectedAmountsOut } =\n this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData = BasePoolEncoder.recoveryModeExit(bptIn);\n\n // MinAmounts needs a value for BPT for encoding\n const minAmountsOutWithBpt = insert(\n minAmountsOut,\n sortedValues.bptIndex,\n '0'\n );\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut: minAmountsOutWithBpt,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new LinearPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt amount in EVM scale\n * @param pool the pool that is being exited\n */\n checkInputsExactBPTIn = ({\n bptIn,\n pool,\n }: Pick<\n ExitExactBPTInParameters,\n 'bptIn' | 'singleTokenOut' | 'pool' | 'shouldUnwrapNativeAsset'\n >): void => {\n if (BigNumber.from(bptIn).lte(0)) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n };\n\n calcTokensOutGivenExactBptIn = ({\n bptIndex,\n upScaledBalances,\n totalSharesEvm,\n scalingFactors,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n 'bptIndex' | 'upScaledBalances' | 'totalSharesEvm' | 'scalingFactors'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n const amountsOut = SOR.LinearMaths._calcTokensOutGivenExactBptIn(\n upScaledBalances,\n BigInt(bptIn),\n totalSharesEvm,\n bptIndex\n );\n // Maths return numbers scaled to 18 decimals. Must scale down to token decimals.\n const amountsOutScaledDown = _downscaleDownArray(\n amountsOut,\n scalingFactors\n );\n\n const expectedAmountsOut = removeItem(amountsOutScaledDown, bptIndex).map(\n (amount) => amount.toString()\n );\n // Apply slippage tolerance\n const minAmountsOut = expectedAmountsOut.map((amount) => {\n const minAmount = subSlippage(\n BigNumber.from(amount),\n BigNumber.from(slippage)\n );\n return minAmount.toString();\n });\n return { minAmountsOut, expectedAmountsOut };\n };\n\n /**\n * Encodes the function data and does the final building of the exit(with exact tokens out) transaction\n * @param params\n */\n encodeExitPool = (params: EncodeExitParams): ExitPoolAttributes => {\n const {\n exiter,\n poolId,\n minAmountsOut,\n userData,\n poolTokens,\n toInternalBalance,\n } = params;\n\n const to = balancerVault;\n const functionName = 'exitPool';\n const attributes: ExitPool = {\n poolId: poolId,\n sender: exiter,\n recipient: exiter,\n exitPoolRequest: {\n assets: poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n },\n };\n\n // encode transaction data into an ABI byte string which can be sent to the network to be executed\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.exitPoolRequest,\n ]);\n\n return {\n to,\n functionName,\n attributes,\n data,\n };\n };\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { JoinPoolParameters, JoinConcern, JoinPoolAttributes } from '../types';\n\nexport class LinearPoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n throw new Error('Join type not supported');\n };\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { parseFixed, formatFixed } from '@/lib/utils/math';\nimport { Zero } from '@ethersproject/constants';\n\nconst SCALING_FACTOR = 18;\nconst ONE = parseFixed('1', SCALING_FACTOR);\n\nexport class LinearPoolLiquidity implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = Zero;\n let sumValue = Zero;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(token.price.usd.toString(), SCALING_FACTOR);\n\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n const value = balance.mul(price);\n\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance.gt(0)) {\n const avgPrice = sumValue.div(sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const priceRate = parseFixed(token.priceRate || '1', SCALING_FACTOR);\n\n // Apply priceRate to scale the balance correctly\n const balance = parseFixed(token.balance, SCALING_FACTOR)\n .mul(priceRate)\n .div(ONE);\n\n const value = balance.mul(avgPrice);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n }\n\n return formatFixed(sumValue, SCALING_FACTOR * 2);\n }\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, LinearPool, ZERO } from '@balancer-labs/sor';\nimport { Pool } from '@/types';\n\nexport class LinearPoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const linearPool = LinearPool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = linearPool.parsePoolPairData(tokenIn, tokenOut);\n return linearPool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n }\n}\n","import { LinearPoolExit } from './concerns/linear/exit.concern';\nimport { LinearPoolJoin } from './concerns/linear/join.concern';\nimport { LinearPoolLiquidity } from './concerns/linear/liquidity.concern';\nimport { LinearPoolSpotPrice } from './concerns/linear/spotPrice.concern';\nimport { LinearPriceImpact } from './concerns/linear/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class Linear implements PoolType {\n constructor(\n public exit: ExitConcern = new LinearPoolExit(),\n public join: JoinConcern = new LinearPoolJoin(),\n public liquidity: LiquidityConcern = new LinearPoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new LinearPoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new LinearPriceImpact()\n ) {}\n}\n","import {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n} from '@/modules/pools/pool-types/concerns/types';\n\nexport class FXExitConcern implements ExitConcern {\n buildExitExactTokensOut(): ExitExactTokensOutAttributes {\n throw new Error('FXExitConcern Not implemented');\n }\n\n buildRecoveryExit(): ExitExactBPTInAttributes {\n throw new Error('FXExitConcern Not implemented');\n }\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { formatFixed } from '@ethersproject/bignumber';\nimport { parseFixed } from '@/lib/utils/math';\nimport { SolidityMaths } from '@/lib/utils/solidityMaths';\n\nconst SCALING_FACTOR = 18;\n\nexport class FXLiquidityConcern implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = BigInt(0);\n let sumValue = BigInt(0);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(\n token.price.usd.toString(),\n SCALING_FACTOR\n ).toBigInt();\n const balance = parseFixed(token.balance, SCALING_FACTOR).toBigInt();\n\n const value = SolidityMaths.mulDownFixed(balance, price);\n sumValue = SolidityMaths.add(sumValue, value);\n sumBalance = SolidityMaths.add(sumBalance, balance);\n }\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance > BigInt(0)) {\n const avgPrice = SolidityMaths.divDownFixed(sumValue, sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const balance = parseFixed(token.balance, SCALING_FACTOR).toBigInt();\n\n const value = SolidityMaths.mulDownFixed(balance, avgPrice);\n sumValue = SolidityMaths.add(sumValue, value);\n sumBalance = SolidityMaths.add(sumBalance, balance);\n }\n }\n return formatFixed(sumValue.toString(), SCALING_FACTOR).toString();\n }\n}\n","import { SpotPriceConcern } from '@/modules/pools/pool-types/concerns/types';\n\nexport class FXSpotPriceConcern implements SpotPriceConcern {\n calcPoolSpotPrice(): string {\n throw new Error('FXSpotPriceConcern Not implemented');\n }\n}\n","import { PriceImpactConcern } from '@/modules/pools/pool-types/concerns/types';\nimport { Pool } from '@/types';\n\nexport class FXPriceImpactConcern implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n console.log(pool, tokenAmounts);\n throw new Error('Not implemented');\n }\n\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n console.log(pool, tokenAmounts, bptAmount, isJoin);\n throw new Error('Not implemented');\n }\n}\n","import {\n JoinConcern,\n JoinPoolAttributes,\n} from '@/modules/pools/pool-types/concerns/types';\n\nexport class FXJoinConcern implements JoinConcern {\n buildJoin(): JoinPoolAttributes {\n throw new Error('FXJoinConcern Not implemented');\n }\n}\n","import { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from '@/modules/pools/pool-types/concerns/types';\nimport { FXExitConcern } from '@/modules/pools/pool-types/concerns/fx/exit.concern';\nimport { FXLiquidityConcern } from '@/modules/pools/pool-types/concerns/fx/liquidity.concern';\nimport { FXSpotPriceConcern } from '@/modules/pools/pool-types/concerns/fx/spotPrice.concern';\nimport { FXPriceImpactConcern } from '@/modules/pools/pool-types/concerns/fx/priceImpact.concern';\nimport { FXJoinConcern } from '@/modules/pools/pool-types/concerns/fx/join.concern';\n\nexport class FX implements PoolType {\n constructor(\n public exit: ExitConcern = new FXExitConcern(),\n public liquidity: LiquidityConcern = new FXLiquidityConcern(),\n public spotPriceCalculator: SpotPriceConcern = new FXSpotPriceConcern(),\n public priceImpactCalculator: PriceImpactConcern = new FXPriceImpactConcern(),\n public join: JoinConcern = new FXJoinConcern()\n ) {}\n}\n","import {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactBPTInParameters,\n ExitExactTokensOutAttributes,\n ExitExactTokensOutParameters,\n} from '@/modules/pools/pool-types/concerns/types';\n\nexport class GyroExitConcern implements ExitConcern {\n buildExitExactTokensOut({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes {\n console.log(\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset\n );\n throw new Error('Not implemented');\n }\n\n buildRecoveryExit({\n exiter,\n pool,\n bptIn,\n slippage,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage'\n >): ExitExactBPTInAttributes {\n console.log(exiter, pool, bptIn, slippage);\n throw new Error('Not implemented');\n }\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { formatFixed } from '@ethersproject/bignumber';\nimport { parseFixed } from '@/lib/utils/math';\nimport { SolidityMaths } from '@/lib/utils/solidityMaths';\n\nconst SCALING_FACTOR = 18;\n\nexport class GyroLiquidityConcern implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = BigInt(0);\n let sumValue = BigInt(0);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(\n token.price.usd.toString(),\n SCALING_FACTOR\n ).toBigInt();\n const balance = parseFixed(token.balance, SCALING_FACTOR).toBigInt();\n\n const value = SolidityMaths.mulDownFixed(balance, price);\n sumValue = SolidityMaths.add(sumValue, value);\n sumBalance = SolidityMaths.add(sumBalance, balance);\n }\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance > BigInt(0)) {\n const avgPrice = SolidityMaths.divDownFixed(sumValue, sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const balance = parseFixed(token.balance, SCALING_FACTOR).toBigInt();\n\n const value = SolidityMaths.mulDownFixed(balance, avgPrice);\n sumValue = SolidityMaths.add(sumValue, value);\n sumBalance = SolidityMaths.add(sumBalance, balance);\n }\n }\n return formatFixed(sumValue.toString(), SCALING_FACTOR).toString();\n }\n}\n","import { SpotPriceConcern } from '@/modules/pools/pool-types/concerns/types';\n\nexport class GyroSpotPriceConcern implements SpotPriceConcern {\n calcPoolSpotPrice(): string {\n throw new Error('GyroSpotPriceConcern Not implemented');\n }\n}\n","import { PriceImpactConcern } from '@/modules/pools/pool-types/concerns/types';\nimport { Pool } from '@/types';\n\nexport class GyroPriceImpactConcern implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n console.log(pool, tokenAmounts);\n throw new Error('Not implemented');\n }\n\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n console.log(pool, tokenAmounts, bptAmount, isJoin);\n throw new Error('Not implemented');\n }\n}\n","import {\n JoinConcern,\n JoinPoolAttributes,\n} from '@/modules/pools/pool-types/concerns/types';\n\nexport class GyroJoinConcern implements JoinConcern {\n buildJoin(): JoinPoolAttributes {\n throw new Error('GyroJoinConcern Not implemented');\n }\n}\n","import { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from '@/modules/pools/pool-types/concerns/types';\nimport { GyroExitConcern } from '@/modules/pools/pool-types/concerns/gyro/exit.concern';\nimport { GyroLiquidityConcern } from '@/modules/pools/pool-types/concerns/gyro/liquidity.concern';\nimport { GyroSpotPriceConcern } from '@/modules/pools/pool-types/concerns/gyro/spotPrice.concern';\nimport { GyroPriceImpactConcern } from '@/modules/pools/pool-types/concerns/gyro/priceImpact.concern';\nimport { GyroJoinConcern } from '@/modules/pools/pool-types/concerns/gyro/join.concern';\n\nexport class Gyro implements PoolType {\n constructor(\n public exit: ExitConcern = new GyroExitConcern(),\n public liquidity: LiquidityConcern = new GyroLiquidityConcern(),\n public spotPriceCalculator: SpotPriceConcern = new GyroSpotPriceConcern(),\n public priceImpactCalculator: PriceImpactConcern = new GyroPriceImpactConcern(),\n public join: JoinConcern = new GyroJoinConcern()\n ) {}\n}\n","import { BalancerSdkConfig, PoolType } from '@/types';\nimport { Stable } from './pool-types/stable.module';\nimport { ComposableStable } from './pool-types/composableStable.module';\nimport { Weighted } from './pool-types/weighted.module';\nimport { MetaStable } from './pool-types/metaStable.module';\nimport { StablePhantom } from './pool-types/stablePhantom.module';\nimport { Linear } from './pool-types/linear.module';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { isLinearish } from '@/lib/utils';\nimport { FX } from '@/modules/pools/pool-types/fx.module';\nimport { Gyro } from '@/modules/pools/pool-types/gyro.module';\n\n/**\n * Wrapper around pool type specific methods.\n *\n * Returns a class instance of a type specific method handlers.\n */\nexport class PoolTypeConcerns {\n constructor(\n config: BalancerSdkConfig,\n public weighted = new Weighted(),\n public stable = new Stable(),\n public composableStable = new ComposableStable(),\n public metaStable = new MetaStable(),\n public stablePhantom = new StablePhantom(),\n public linear = new Linear()\n ) {}\n\n static from(\n poolType: PoolType\n ):\n | Weighted\n | Stable\n | ComposableStable\n | MetaStable\n | StablePhantom\n | Linear {\n // Calculate spot price using pool type\n switch (poolType) {\n case 'ComposableStable': {\n return new ComposableStable();\n }\n case 'FX': {\n return new FX();\n }\n case 'GyroE':\n case 'Gyro2':\n case 'Gyro3': {\n return new Gyro();\n }\n case 'MetaStable': {\n return new MetaStable();\n }\n case 'Stable': {\n return new Stable();\n }\n case 'StablePhantom': {\n return new StablePhantom();\n }\n case 'Investment':\n case 'LiquidityBootstrapping':\n case 'Weighted': {\n return new Weighted();\n }\n default: {\n // Handles all Linear pool types\n if (isLinearish(poolType)) return new Linear();\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n }\n }\n}\n","import { Findable, Pool, PoolToken, Price } from '@/types';\nimport { PoolAttribute } from '../data';\nimport { PoolTypeConcerns } from '../pools/pool-type-concerns';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { formatFixed, parseFixed } from '@/lib/utils/math';\n\nconst SCALE = 18;\n\nexport interface PoolBPTValue {\n address: string;\n liquidity: string;\n}\n\nexport class Liquidity {\n constructor(\n private pools: Findable,\n private tokenPrices: Findable\n ) {}\n\n async getLiquidity(pool: Pool): Promise {\n // Remove any tokens with same address as pool as they are pre-printed BPT\n const parsedTokens = pool.tokens.filter((token) => {\n return token.address !== pool.address;\n });\n\n // For all tokens that are pools (BPT), recurse into them and fetch their liquidity\n const subPoolLiquidity = await Promise.all(\n parsedTokens.map(async (token) => {\n const pool = await this.pools.findBy('address', token.address);\n if (!pool) return;\n\n const liquidity = parseFixed(await this.getLiquidity(pool), SCALE);\n const totalBPT = parseFixed(pool.totalShares, SCALE);\n const bptInParentPool = parseFixed(token.balance, SCALE);\n const liquidityInParentPool = totalBPT.eq(0)\n ? 0\n : liquidity.mul(bptInParentPool).div(totalBPT);\n\n return {\n address: pool.address,\n liquidity: liquidityInParentPool.toString(),\n };\n })\n );\n\n const totalSubPoolLiquidity = subPoolLiquidity.reduce(\n (totalLiquidity, subPool) => {\n return totalLiquidity.add(\n subPool ? subPool.liquidity : BigNumber.from(0)\n );\n },\n BigNumber.from(0)\n );\n\n // Filter tokens within pool that are not BPT themselves\n const nonPoolTokens = parsedTokens.filter((token) => {\n return !subPoolLiquidity.find((pool) => pool?.address === token.address);\n });\n\n // Update price using tokenPrices repository\n const nonPoolTokensWithUpdatedPrice: PoolToken[] = await Promise.all(\n nonPoolTokens.map(async (token) => {\n const tokenPrice = await this.tokenPrices.find(token.address);\n const poolToken: PoolToken = {\n address: token.address,\n decimals: token.decimals,\n priceRate: token.priceRate,\n price: (tokenPrice?.usd && tokenPrice) || {\n usd: token.token?.latestUSDPrice,\n },\n balance: token.balance,\n weight: token.weight,\n };\n return poolToken;\n })\n );\n\n // TODO: Just in case we need it soon. Otherwise remove without mercy.\n // Any of the tokens is missing the price, use subgraph totalLiquidity\n // if(nonPoolTokensWithUpdatedPrice.map((t) => t.price?.usd).indexOf(undefined) > -1) {\n // return pool.totalLiquidity\n // }\n\n const tokenLiquidity = PoolTypeConcerns.from(\n pool.poolType\n ).liquidity.calcTotal(nonPoolTokensWithUpdatedPrice);\n\n const parsedTokenLiquidity = parseFixed(tokenLiquidity, SCALE);\n\n const totalLiquidity = totalSubPoolLiquidity.add(parsedTokenLiquidity);\n\n return formatFixed(totalLiquidity, SCALE);\n }\n\n async getBptPrice(pool: Pool): Promise {\n const liquidity = await this.getLiquidity(pool);\n return (parseFloat(liquidity) / parseFloat(pool.totalShares)).toString();\n }\n}\n","import { LiquidityGauge } from '@/modules/data';\nimport { BigNumber } from '@ethersproject/bignumber';\n\nexport interface Tokens {\n [tokenAddress: string]: BigNumber;\n}\n\nexport interface GaugeTokens {\n [gaugeAddress: string]: Tokens;\n}\n\nexport interface ReduceGaugeTokens {\n (p: GaugeTokens, address: string, index: number): GaugeTokens;\n}\n\nexport interface ReduceGaugeRewards {\n (\n rewards: GaugeTokens,\n path: { gauge: string; token: string },\n index: number\n ): GaugeTokens;\n}\n\nexport const ZERO = BigNumber.from('0');\n\nexport const filterTokens = (tokens: Tokens): Tokens => {\n if (!tokens) return {};\n return Object.keys(tokens)\n .filter((token) => tokens[token].gt(ZERO))\n .reduce((obj: Tokens, token) => {\n obj[token] = tokens[token];\n return obj;\n }, {});\n};\n\nexport const populateGauge = (\n gauge: LiquidityGauge,\n rewards: GaugeTokens,\n tokens: GaugeTokens\n): LiquidityGauge => {\n if (!rewards[gauge.address] && !tokens[gauge.address]) return gauge;\n const claimableRewards = filterTokens(rewards[gauge.address]);\n const claimableTokens = filterTokens(tokens[gauge.address]);\n gauge.claimableTokens ||= {\n ...claimableRewards,\n ...claimableTokens,\n };\n return gauge;\n};\n\nexport const populateGauges = (\n gauges: LiquidityGauge[],\n claimableRewards: GaugeTokens,\n claimableTokens: GaugeTokens\n): LiquidityGauge[] => {\n return gauges\n .map((gauge) => populateGauge(gauge, claimableRewards, claimableTokens))\n .filter(\n (it) => it.claimableTokens && Object.keys(it.claimableTokens).length\n );\n};\n\nexport const reduceClaimableRewards = (res0x: string[]): ReduceGaugeRewards => {\n return (\n rewards: GaugeTokens,\n path: { gauge: string; token: string },\n index: number\n ): GaugeTokens => {\n const value = BigNumber.from(`${res0x[index]}`);\n if (value.gt(ZERO)) {\n rewards[path.gauge] ||= {};\n rewards[path.gauge][path.token] = value;\n }\n return rewards;\n };\n};\n\nexport const reduceClaimableTokens = (\n res0x: string[],\n balAddress: string\n): ReduceGaugeTokens => {\n return (p: GaugeTokens, address: string, index: number): GaugeTokens => {\n const value = BigNumber.from(`${res0x[index]}`);\n if (value.gt(ZERO)) {\n p[address] ||= {};\n p[address][balAddress] = value;\n }\n return p;\n };\n};\n\nexport const reduceRewardTokens = (\n result: { [gaugeAddress: string]: string[] },\n gauge: LiquidityGauge\n): { [gaugeAddress: string]: string[] } => {\n if (gauge.rewardTokens) {\n for (const key of Object.keys(gauge.rewardTokens)) {\n result[gauge.id] ||= [];\n result[gauge.id].push(key);\n }\n }\n return result;\n};\n","import { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Network } from '@/lib/constants';\nimport { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { Multicall } from '@/contracts';\nimport {\n FeeDistributorRepository,\n LiquidityGauge,\n LiquidityGaugeSubgraphRPCProvider,\n} from '@/modules/data';\nimport { Interface } from '@ethersproject/abi';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport {\n GaugeTokens,\n populateGauges,\n reduceClaimableRewards,\n reduceClaimableTokens,\n reduceRewardTokens,\n ZERO,\n} from './helper';\n\nconst liquidityGaugeV5Interface = new Interface([\n 'function claim_rewards(address sender, address receiver) returns (uint256)',\n 'function claimable_tokens(address addr) view returns (uint256)',\n 'function claimable_reward(address addr, address token) view returns (uint256)',\n]);\n\nconst balancerMinterInterface = new Interface([\n 'function mintMany(address[] gauges) returns (uint256)',\n]);\n\nconst gaugeClaimHelperInterface = new Interface([\n 'function getPendingRewards(address gauge, address user, address token) view returns (uint256)',\n 'function claimRewardsFromGauges(address[] gauges, address user)',\n]);\n\nexport interface TransactionData {\n to: string;\n from: string;\n callData: string;\n tokensOut: string[];\n expectedTokensValue: BigNumber[];\n functionName: string;\n}\n\nexport interface TokenBalance {\n [token: string]: BigNumber;\n}\n\nexport interface IClaimService {\n getClaimableRewardTokens(userAddress: string): Promise;\n buildClaimRewardTokensRequest(\n gaugeAddresses: string[],\n userAddress: string\n ): Promise;\n getClaimableVeBalTokens(\n userAddress: string,\n claimableTokens: string[]\n ): Promise;\n buildClaimVeBalTokensRequest(\n userAddress: string,\n claimableTokens: string[]\n ): Promise;\n}\n\nexport class ClaimService implements IClaimService {\n private readonly liquidityGauges: LiquidityGaugeSubgraphRPCProvider;\n private readonly gaugeClaimHelperAddress?: string;\n private readonly balancerMinterAddress?: string;\n private readonly chainId: Network;\n private readonly feeDistributor: FeeDistributorRepository | undefined;\n\n constructor(\n liquidityGauges: LiquidityGaugeSubgraphRPCProvider,\n feeDistributor: FeeDistributorRepository | undefined,\n chainId: Network,\n private multicall: Multicall,\n gaugeClaimHelperAddress?: string,\n balancerMinterAddress?: string\n ) {\n this.liquidityGauges = liquidityGauges;\n this.feeDistributor = feeDistributor;\n this.chainId = chainId;\n this.gaugeClaimHelperAddress = gaugeClaimHelperAddress;\n this.balancerMinterAddress = balancerMinterAddress;\n }\n\n /**\n * Get a list of liquidity gauges populated with the claimable tokens for the user.\n *\n * @param userAddress the user's account address\n */\n async getClaimableRewardTokens(\n userAddress: string\n ): Promise {\n const gauges = await this.getGauges();\n if (!gauges.length)\n throw new BalancerError(BalancerErrorCode.GAUGES_NOT_FOUND);\n\n const gaugeAddresses = gauges.map((it) => it.address);\n const rewardTokens = this.getRewardTokens(gauges);\n\n const claimableTokens = await this.retrieveClaimableTokens(\n gaugeAddresses,\n userAddress\n );\n const claimableRewards = await this.retrieveClaimableRewards(\n rewardTokens,\n userAddress\n );\n return populateGauges(gauges, claimableRewards, claimableTokens);\n }\n\n /**\n * Returns the data to be signed to claim the tokens on a list of liquidity gauges.\n * Only the tokens with balance will be claimed.\n *\n * @param gaugeAddresses the liquidity gauges' addresses\n * @param userAddress the user's account address\n * @throws error if no claimable token is found\n */\n async buildClaimRewardTokensRequest(\n gaugeAddresses: string[],\n userAddress: string\n ): Promise {\n if (this.chainId === 1 || this.chainId === 5) {\n if (!this.balancerMinterAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED\n );\n } else {\n if (!this.gaugeClaimHelperAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED\n );\n }\n const allGauges = await this.getClaimableRewardTokens(userAddress);\n const gauges = allGauges\n .filter((it) =>\n gaugeAddresses\n .map((it) => it.toLowerCase())\n .includes(it.address.toLowerCase())\n )\n .filter(\n (it) => it.claimableTokens && Object.keys(it.claimableTokens).length\n );\n const claimableTokens = Array.from(\n new Set(\n gauges\n .map((gauge) => gauge.claimableTokens)\n .map((tokens) => Object.keys(tokens || {}))\n .flatMap((it) => it)\n )\n );\n if (!claimableTokens.length)\n throw new BalancerError(BalancerErrorCode.GAUGES_REWARD_TOKEN_EMPTY);\n const expectedValues = claimableTokens.map((tokenAddress) => {\n return gauges.reduce((value: BigNumber, gauge) => {\n if (\n gauge.claimableTokens &&\n gauge.claimableTokens[tokenAddress] &&\n gauge.claimableTokens[tokenAddress] !== ZERO\n )\n value = gauge.claimableTokens[tokenAddress].add(value);\n return value;\n }, BigNumber.from(0));\n });\n if (!expectedValues.length || expectedValues.every((it) => it.eq(ZERO)))\n throw new BalancerError(BalancerErrorCode.REWARD_TOKEN_ZERO);\n if (this.chainId === 1 || this.chainId === 5) {\n if (!this.balancerMinterAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED\n );\n const callData = balancerMinterInterface.encodeFunctionData('mintMany', [\n gaugeAddresses,\n ]);\n return {\n to: this.balancerMinterAddress,\n from: userAddress,\n callData: callData,\n tokensOut: claimableTokens,\n expectedTokensValue: expectedValues,\n functionName: 'mintMany',\n };\n } else {\n if (!this.gaugeClaimHelperAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED\n );\n const callData = gaugeClaimHelperInterface.encodeFunctionData(\n 'claimRewardsFromGauges',\n [gaugeAddresses, userAddress]\n );\n return {\n to: this.gaugeClaimHelperAddress,\n from: userAddress,\n callData: callData,\n tokensOut: claimableTokens,\n expectedTokensValue: expectedValues,\n functionName: 'claimRewardsFromGauges',\n };\n }\n }\n\n /**\n * returns all the tokens' balance for protocol revenue and veBal incentives.\n *\n * @param userAddress the user's account address\n * @param claimableTokens the list of tokens for which the balance is desired\n */\n async getClaimableVeBalTokens(\n userAddress: string,\n claimableTokens: string[]\n ): Promise {\n if (!this.feeDistributor)\n throw new BalancerError(BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED);\n return this.feeDistributor?.getClaimableBalances(\n userAddress,\n claimableTokens\n );\n }\n\n /**\n * Returns the data to be signed to claim the tokens for protocol revenue and veBal incentives.\n *\n * @param userAddress the user's account address\n * @param claimableTokens the list of tokens to be claimed\n * @throws error if no claimable token is found\n */\n async buildClaimVeBalTokensRequest(\n userAddress: string,\n claimableTokens: string[]\n ): Promise {\n if (!this.feeDistributor)\n throw new BalancerError(BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED);\n const tokenBalance = await this.feeDistributor.getClaimableBalances(\n userAddress,\n claimableTokens\n );\n const expectedTokensValue = claimableTokens.map(\n (it) => tokenBalance[it] ?? ZERO\n );\n if (expectedTokensValue.every((it) => it.eq(ZERO)))\n throw new BalancerError(BalancerErrorCode.REWARD_TOKEN_ZERO);\n const callData = this.feeDistributor.claimBalances(\n userAddress,\n claimableTokens\n );\n return {\n to: this.feeDistributor.feeDistributor.address,\n from: userAddress,\n callData: callData,\n tokensOut: claimableTokens,\n expectedTokensValue: expectedTokensValue,\n functionName: 'claimTokens',\n };\n }\n\n // Private Functions\n\n private async getGauges(): Promise {\n return await this.liquidityGauges.fetch();\n }\n\n private getRewardTokens(gauges: LiquidityGauge[]): {\n [gaugeAddress: string]: string[];\n } {\n return gauges.reduce(reduceRewardTokens, {});\n }\n\n private async retrieveClaimableRewards(\n rewardTokens: { [address: string]: string[] },\n userAddress: string\n ): Promise {\n const gaugeAddresses = Object.keys(rewardTokens);\n const { payload, paths } = this.getPayload(\n gaugeAddresses,\n rewardTokens,\n userAddress\n );\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n return paths.reduce(reduceClaimableRewards(res0x), {});\n }\n\n private getPayload(\n gaugeAddresses: string[],\n rewardTokens: { [address: string]: string[] },\n userAddress: string\n ): {\n payload: { target: string; callData: string }[];\n paths: { gauge: string; token: string }[];\n } {\n const payload = [];\n const paths: { gauge: string; token: string }[] = [];\n for (const gaugeAddress of gaugeAddresses) {\n for (const tokenAddress of rewardTokens[gaugeAddress]) {\n paths.push({ gauge: gaugeAddress, token: tokenAddress });\n payload.push(\n this.getArguments(userAddress, gaugeAddress, tokenAddress)\n );\n }\n }\n return { payload, paths };\n }\n\n private getArguments(\n userAddress: string,\n gaugeAddress: string,\n tokenAddress: string\n ): { target: string; callData: string } {\n if (this.chainId === 1 || this.chainId === 5) {\n return {\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'claimable_reward',\n [userAddress, tokenAddress]\n ),\n };\n }\n if (!this.gaugeClaimHelperAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED\n );\n return {\n target: this.gaugeClaimHelperAddress,\n callData: gaugeClaimHelperInterface.encodeFunctionData(\n 'getPendingRewards',\n [gaugeAddress, userAddress, tokenAddress]\n ),\n };\n }\n\n private async retrieveClaimableTokens(\n gaugeAddresses: string[],\n userAddress: string\n ): Promise {\n if (this.chainId === Network.MAINNET || this.chainId === Network.GOERLI) {\n const balAddress = BALANCER_NETWORK_CONFIG[this.chainId].addresses.tokens\n .bal as string;\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'claimable_tokens',\n [userAddress]\n ),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n return gaugeAddresses.reduce(\n reduceClaimableTokens(res0x, balAddress),\n {}\n );\n }\n return {};\n }\n}\n","import { BigNumberish } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport { SOR, SwapTypes, SwapInfo } from '@balancer-labs/sor';\nimport { SwapType, BatchSwapStep, FundManagement } from './types';\nimport { Vault } from '@/contracts/Vault';\n\n/*\n * queryBatchSwap simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\n * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\n *\n * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\n * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\n * receives are the same that an equivalent `batchSwap` call would receive.\n */\nexport async function queryBatchSwap(\n vaultContract: Vault,\n swapType: SwapType,\n swaps: BatchSwapStep[],\n assets: string[]\n): Promise {\n const funds: FundManagement = {\n sender: AddressZero,\n recipient: AddressZero,\n fromInternalBalance: false,\n toInternalBalance: false,\n };\n\n try {\n const deltas = await vaultContract.callStatic.queryBatchSwap(\n swapType,\n swaps,\n assets,\n funds\n );\n return deltas.map((d: BigNumberish) => d.toString());\n } catch (err) {\n throw `queryBatchSwap call error: ${err}`;\n }\n}\n\n/*\nUse SOR to get swapInfo for tokenIn>tokenOut.\nSwapInfos.swaps has path information.\n*/\nexport async function getSorSwapInfo(\n tokenIn: string,\n tokenOut: string,\n swapType: SwapType,\n amount: string,\n sor: SOR\n): Promise {\n const swapTypeSOR: SwapTypes =\n swapType === SwapType.SwapExactIn\n ? SwapTypes.SwapExactIn\n : SwapTypes.SwapExactOut;\n const swapInfo = await sor.getSwaps(\n tokenIn.toLowerCase(),\n tokenOut.toLowerCase(),\n swapTypeSOR,\n amount\n );\n return swapInfo;\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import { __assign } from \"tslib\";\nimport { parse } from 'graphql';\nvar docCache = new Map();\nvar fragmentSourceMap = new Map();\nvar printFragmentWarnings = true;\nvar experimentalFragmentVariables = false;\nfunction normalize(string) {\n return string.replace(/[\\s,]+/g, ' ').trim();\n}\nfunction cacheKeyFromLoc(loc) {\n return normalize(loc.source.body.substring(loc.start, loc.end));\n}\nfunction processFragments(ast) {\n var seenKeys = new Set();\n var definitions = [];\n ast.definitions.forEach(function (fragmentDefinition) {\n if (fragmentDefinition.kind === 'FragmentDefinition') {\n var fragmentName = fragmentDefinition.name.value;\n var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc);\n var sourceKeySet = fragmentSourceMap.get(fragmentName);\n if (sourceKeySet && !sourceKeySet.has(sourceKey)) {\n if (printFragmentWarnings) {\n console.warn(\"Warning: fragment with name \" + fragmentName + \" already exists.\\n\"\n + \"graphql-tag enforces all fragment names across your application to be unique; read more about\\n\"\n + \"this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names\");\n }\n }\n else if (!sourceKeySet) {\n fragmentSourceMap.set(fragmentName, sourceKeySet = new Set);\n }\n sourceKeySet.add(sourceKey);\n if (!seenKeys.has(sourceKey)) {\n seenKeys.add(sourceKey);\n definitions.push(fragmentDefinition);\n }\n }\n else {\n definitions.push(fragmentDefinition);\n }\n });\n return __assign(__assign({}, ast), { definitions: definitions });\n}\nfunction stripLoc(doc) {\n var workSet = new Set(doc.definitions);\n workSet.forEach(function (node) {\n if (node.loc)\n delete node.loc;\n Object.keys(node).forEach(function (key) {\n var value = node[key];\n if (value && typeof value === 'object') {\n workSet.add(value);\n }\n });\n });\n var loc = doc.loc;\n if (loc) {\n delete loc.startToken;\n delete loc.endToken;\n }\n return doc;\n}\nfunction parseDocument(source) {\n var cacheKey = normalize(source);\n if (!docCache.has(cacheKey)) {\n var parsed = parse(source, {\n experimentalFragmentVariables: experimentalFragmentVariables,\n allowLegacyFragmentVariables: experimentalFragmentVariables\n });\n if (!parsed || parsed.kind !== 'Document') {\n throw new Error('Not a valid GraphQL document.');\n }\n docCache.set(cacheKey, stripLoc(processFragments(parsed)));\n }\n return docCache.get(cacheKey);\n}\nexport function gql(literals) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof literals === 'string') {\n literals = [literals];\n }\n var result = literals[0];\n args.forEach(function (arg, i) {\n if (arg && arg.kind === 'Document') {\n result += arg.loc.source.body;\n }\n else {\n result += arg;\n }\n result += literals[i + 1];\n });\n return parseDocument(result);\n}\nexport function resetCaches() {\n docCache.clear();\n fragmentSourceMap.clear();\n}\nexport function disableFragmentWarnings() {\n printFragmentWarnings = false;\n}\nexport function enableExperimentalFragmentVariables() {\n experimentalFragmentVariables = true;\n}\nexport function disableExperimentalFragmentVariables() {\n experimentalFragmentVariables = false;\n}\nvar extras = {\n gql: gql,\n resetCaches: resetCaches,\n disableFragmentWarnings: disableFragmentWarnings,\n enableExperimentalFragmentVariables: enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables: disableExperimentalFragmentVariables\n};\n(function (gql_1) {\n gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;\n})(gql || (gql = {}));\ngql[\"default\"] = gql;\nexport default gql;\n//# sourceMappingURL=index.js.map","import { GraphQLClient } from 'graphql-request';\nimport * as Dom from 'graphql-request/dist/types.dom';\nimport gql from 'graphql-tag';\nexport type Maybe = T | null;\nexport type InputMaybe = Maybe;\nexport type Exact = { [K in keyof T]: T[K] };\nexport type MakeOptional = Omit & { [SubKey in K]?: Maybe };\nexport type MakeMaybe = Omit & { [SubKey in K]: Maybe };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: string;\n String: string;\n Boolean: boolean;\n Int: number;\n Float: number;\n BigDecimal: string;\n BigInt: string;\n Bytes: string;\n Int8: any;\n};\n\nexport type AmpUpdate = {\n __typename?: 'AmpUpdate';\n endAmp: Scalars['BigInt'];\n endTimestamp: Scalars['BigInt'];\n id: Scalars['ID'];\n poolId: Pool;\n scheduledTimestamp: Scalars['Int'];\n startAmp: Scalars['BigInt'];\n startTimestamp: Scalars['BigInt'];\n};\n\nexport type AmpUpdate_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n endAmp?: InputMaybe;\n endAmp_gt?: InputMaybe;\n endAmp_gte?: InputMaybe;\n endAmp_in?: InputMaybe>;\n endAmp_lt?: InputMaybe;\n endAmp_lte?: InputMaybe;\n endAmp_not?: InputMaybe;\n endAmp_not_in?: InputMaybe>;\n endTimestamp?: InputMaybe;\n endTimestamp_gt?: InputMaybe;\n endTimestamp_gte?: InputMaybe;\n endTimestamp_in?: InputMaybe>;\n endTimestamp_lt?: InputMaybe;\n endTimestamp_lte?: InputMaybe;\n endTimestamp_not?: InputMaybe;\n endTimestamp_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n scheduledTimestamp?: InputMaybe;\n scheduledTimestamp_gt?: InputMaybe;\n scheduledTimestamp_gte?: InputMaybe;\n scheduledTimestamp_in?: InputMaybe>;\n scheduledTimestamp_lt?: InputMaybe;\n scheduledTimestamp_lte?: InputMaybe;\n scheduledTimestamp_not?: InputMaybe;\n scheduledTimestamp_not_in?: InputMaybe>;\n startAmp?: InputMaybe;\n startAmp_gt?: InputMaybe;\n startAmp_gte?: InputMaybe;\n startAmp_in?: InputMaybe>;\n startAmp_lt?: InputMaybe;\n startAmp_lte?: InputMaybe;\n startAmp_not?: InputMaybe;\n startAmp_not_in?: InputMaybe>;\n startTimestamp?: InputMaybe;\n startTimestamp_gt?: InputMaybe;\n startTimestamp_gte?: InputMaybe;\n startTimestamp_in?: InputMaybe>;\n startTimestamp_lt?: InputMaybe;\n startTimestamp_lte?: InputMaybe;\n startTimestamp_not?: InputMaybe;\n startTimestamp_not_in?: InputMaybe>;\n};\n\nexport enum AmpUpdate_OrderBy {\n EndAmp = 'endAmp',\n EndTimestamp = 'endTimestamp',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n ScheduledTimestamp = 'scheduledTimestamp',\n StartAmp = 'startAmp',\n StartTimestamp = 'startTimestamp'\n}\n\nexport type Balancer = {\n __typename?: 'Balancer';\n id: Scalars['ID'];\n poolCount: Scalars['Int'];\n pools?: Maybe>;\n protocolFeesCollector?: Maybe;\n totalLiquidity: Scalars['BigDecimal'];\n totalProtocolFee?: Maybe;\n totalSwapCount: Scalars['BigInt'];\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n};\n\n\nexport type BalancerPoolsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type BalancerSnapshot = {\n __typename?: 'BalancerSnapshot';\n id: Scalars['ID'];\n poolCount: Scalars['Int'];\n timestamp: Scalars['Int'];\n totalLiquidity: Scalars['BigDecimal'];\n totalProtocolFee?: Maybe;\n totalSwapCount: Scalars['BigInt'];\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n vault: Balancer;\n};\n\nexport type BalancerSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolCount?: InputMaybe;\n poolCount_gt?: InputMaybe;\n poolCount_gte?: InputMaybe;\n poolCount_in?: InputMaybe>;\n poolCount_lt?: InputMaybe;\n poolCount_lte?: InputMaybe;\n poolCount_not?: InputMaybe;\n poolCount_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n totalLiquidity?: InputMaybe;\n totalLiquidity_gt?: InputMaybe;\n totalLiquidity_gte?: InputMaybe;\n totalLiquidity_in?: InputMaybe>;\n totalLiquidity_lt?: InputMaybe;\n totalLiquidity_lte?: InputMaybe;\n totalLiquidity_not?: InputMaybe;\n totalLiquidity_not_in?: InputMaybe>;\n totalProtocolFee?: InputMaybe;\n totalProtocolFee_gt?: InputMaybe;\n totalProtocolFee_gte?: InputMaybe;\n totalProtocolFee_in?: InputMaybe>;\n totalProtocolFee_lt?: InputMaybe;\n totalProtocolFee_lte?: InputMaybe;\n totalProtocolFee_not?: InputMaybe;\n totalProtocolFee_not_in?: InputMaybe>;\n totalSwapCount?: InputMaybe;\n totalSwapCount_gt?: InputMaybe;\n totalSwapCount_gte?: InputMaybe;\n totalSwapCount_in?: InputMaybe>;\n totalSwapCount_lt?: InputMaybe;\n totalSwapCount_lte?: InputMaybe;\n totalSwapCount_not?: InputMaybe;\n totalSwapCount_not_in?: InputMaybe>;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n vault?: InputMaybe;\n vault_?: InputMaybe;\n vault_contains?: InputMaybe;\n vault_contains_nocase?: InputMaybe;\n vault_ends_with?: InputMaybe;\n vault_ends_with_nocase?: InputMaybe;\n vault_gt?: InputMaybe;\n vault_gte?: InputMaybe;\n vault_in?: InputMaybe>;\n vault_lt?: InputMaybe;\n vault_lte?: InputMaybe;\n vault_not?: InputMaybe;\n vault_not_contains?: InputMaybe;\n vault_not_contains_nocase?: InputMaybe;\n vault_not_ends_with?: InputMaybe;\n vault_not_ends_with_nocase?: InputMaybe;\n vault_not_in?: InputMaybe>;\n vault_not_starts_with?: InputMaybe;\n vault_not_starts_with_nocase?: InputMaybe;\n vault_starts_with?: InputMaybe;\n vault_starts_with_nocase?: InputMaybe;\n};\n\nexport enum BalancerSnapshot_OrderBy {\n Id = 'id',\n PoolCount = 'poolCount',\n Timestamp = 'timestamp',\n TotalLiquidity = 'totalLiquidity',\n TotalProtocolFee = 'totalProtocolFee',\n TotalSwapCount = 'totalSwapCount',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume',\n Vault = 'vault',\n VaultId = 'vault__id',\n VaultPoolCount = 'vault__poolCount',\n VaultProtocolFeesCollector = 'vault__protocolFeesCollector',\n VaultTotalLiquidity = 'vault__totalLiquidity',\n VaultTotalProtocolFee = 'vault__totalProtocolFee',\n VaultTotalSwapCount = 'vault__totalSwapCount',\n VaultTotalSwapFee = 'vault__totalSwapFee',\n VaultTotalSwapVolume = 'vault__totalSwapVolume'\n}\n\nexport type Balancer_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolCount?: InputMaybe;\n poolCount_gt?: InputMaybe;\n poolCount_gte?: InputMaybe;\n poolCount_in?: InputMaybe>;\n poolCount_lt?: InputMaybe;\n poolCount_lte?: InputMaybe;\n poolCount_not?: InputMaybe;\n poolCount_not_in?: InputMaybe>;\n pools_?: InputMaybe;\n protocolFeesCollector?: InputMaybe;\n protocolFeesCollector_contains?: InputMaybe;\n protocolFeesCollector_gt?: InputMaybe;\n protocolFeesCollector_gte?: InputMaybe;\n protocolFeesCollector_in?: InputMaybe>;\n protocolFeesCollector_lt?: InputMaybe;\n protocolFeesCollector_lte?: InputMaybe;\n protocolFeesCollector_not?: InputMaybe;\n protocolFeesCollector_not_contains?: InputMaybe;\n protocolFeesCollector_not_in?: InputMaybe>;\n totalLiquidity?: InputMaybe;\n totalLiquidity_gt?: InputMaybe;\n totalLiquidity_gte?: InputMaybe;\n totalLiquidity_in?: InputMaybe>;\n totalLiquidity_lt?: InputMaybe;\n totalLiquidity_lte?: InputMaybe;\n totalLiquidity_not?: InputMaybe;\n totalLiquidity_not_in?: InputMaybe>;\n totalProtocolFee?: InputMaybe;\n totalProtocolFee_gt?: InputMaybe;\n totalProtocolFee_gte?: InputMaybe;\n totalProtocolFee_in?: InputMaybe>;\n totalProtocolFee_lt?: InputMaybe;\n totalProtocolFee_lte?: InputMaybe;\n totalProtocolFee_not?: InputMaybe;\n totalProtocolFee_not_in?: InputMaybe>;\n totalSwapCount?: InputMaybe;\n totalSwapCount_gt?: InputMaybe;\n totalSwapCount_gte?: InputMaybe;\n totalSwapCount_in?: InputMaybe>;\n totalSwapCount_lt?: InputMaybe;\n totalSwapCount_lte?: InputMaybe;\n totalSwapCount_not?: InputMaybe;\n totalSwapCount_not_in?: InputMaybe>;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n};\n\nexport enum Balancer_OrderBy {\n Id = 'id',\n PoolCount = 'poolCount',\n Pools = 'pools',\n ProtocolFeesCollector = 'protocolFeesCollector',\n TotalLiquidity = 'totalLiquidity',\n TotalProtocolFee = 'totalProtocolFee',\n TotalSwapCount = 'totalSwapCount',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume'\n}\n\nexport type BlockChangedFilter = {\n number_gte: Scalars['Int'];\n};\n\nexport type Block_Height = {\n hash?: InputMaybe;\n number?: InputMaybe;\n number_gte?: InputMaybe;\n};\n\nexport type CircuitBreaker = {\n __typename?: 'CircuitBreaker';\n bptPrice: Scalars['BigDecimal'];\n id: Scalars['ID'];\n lowerBoundPercentage: Scalars['BigDecimal'];\n pool: Pool;\n token: PoolToken;\n upperBoundPercentage: Scalars['BigDecimal'];\n};\n\nexport type CircuitBreaker_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n bptPrice?: InputMaybe;\n bptPrice_gt?: InputMaybe;\n bptPrice_gte?: InputMaybe;\n bptPrice_in?: InputMaybe>;\n bptPrice_lt?: InputMaybe;\n bptPrice_lte?: InputMaybe;\n bptPrice_not?: InputMaybe;\n bptPrice_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n lowerBoundPercentage?: InputMaybe;\n lowerBoundPercentage_gt?: InputMaybe;\n lowerBoundPercentage_gte?: InputMaybe;\n lowerBoundPercentage_in?: InputMaybe>;\n lowerBoundPercentage_lt?: InputMaybe;\n lowerBoundPercentage_lte?: InputMaybe;\n lowerBoundPercentage_not?: InputMaybe;\n lowerBoundPercentage_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n token?: InputMaybe;\n token_?: InputMaybe;\n token_contains?: InputMaybe;\n token_contains_nocase?: InputMaybe;\n token_ends_with?: InputMaybe;\n token_ends_with_nocase?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_contains_nocase?: InputMaybe;\n token_not_ends_with?: InputMaybe;\n token_not_ends_with_nocase?: InputMaybe;\n token_not_in?: InputMaybe>;\n token_not_starts_with?: InputMaybe;\n token_not_starts_with_nocase?: InputMaybe;\n token_starts_with?: InputMaybe;\n token_starts_with_nocase?: InputMaybe;\n upperBoundPercentage?: InputMaybe;\n upperBoundPercentage_gt?: InputMaybe;\n upperBoundPercentage_gte?: InputMaybe;\n upperBoundPercentage_in?: InputMaybe>;\n upperBoundPercentage_lt?: InputMaybe;\n upperBoundPercentage_lte?: InputMaybe;\n upperBoundPercentage_not?: InputMaybe;\n upperBoundPercentage_not_in?: InputMaybe>;\n};\n\nexport enum CircuitBreaker_OrderBy {\n BptPrice = 'bptPrice',\n Id = 'id',\n LowerBoundPercentage = 'lowerBoundPercentage',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n Token = 'token',\n TokenAddress = 'token__address',\n TokenAssetManager = 'token__assetManager',\n TokenBalance = 'token__balance',\n TokenCashBalance = 'token__cashBalance',\n TokenDecimals = 'token__decimals',\n TokenId = 'token__id',\n TokenIndex = 'token__index',\n TokenIsExemptFromYieldProtocolFee = 'token__isExemptFromYieldProtocolFee',\n TokenManagedBalance = 'token__managedBalance',\n TokenName = 'token__name',\n TokenOldPriceRate = 'token__oldPriceRate',\n TokenPaidProtocolFees = 'token__paidProtocolFees',\n TokenPriceRate = 'token__priceRate',\n TokenSymbol = 'token__symbol',\n TokenWeight = 'token__weight',\n UpperBoundPercentage = 'upperBoundPercentage'\n}\n\nexport type GradualWeightUpdate = {\n __typename?: 'GradualWeightUpdate';\n endTimestamp: Scalars['BigInt'];\n endWeights: Array;\n id: Scalars['ID'];\n poolId: Pool;\n scheduledTimestamp: Scalars['Int'];\n startTimestamp: Scalars['BigInt'];\n startWeights: Array;\n};\n\nexport type GradualWeightUpdate_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n endTimestamp?: InputMaybe;\n endTimestamp_gt?: InputMaybe;\n endTimestamp_gte?: InputMaybe;\n endTimestamp_in?: InputMaybe>;\n endTimestamp_lt?: InputMaybe;\n endTimestamp_lte?: InputMaybe;\n endTimestamp_not?: InputMaybe;\n endTimestamp_not_in?: InputMaybe>;\n endWeights?: InputMaybe>;\n endWeights_contains?: InputMaybe>;\n endWeights_contains_nocase?: InputMaybe>;\n endWeights_not?: InputMaybe>;\n endWeights_not_contains?: InputMaybe>;\n endWeights_not_contains_nocase?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n scheduledTimestamp?: InputMaybe;\n scheduledTimestamp_gt?: InputMaybe;\n scheduledTimestamp_gte?: InputMaybe;\n scheduledTimestamp_in?: InputMaybe>;\n scheduledTimestamp_lt?: InputMaybe;\n scheduledTimestamp_lte?: InputMaybe;\n scheduledTimestamp_not?: InputMaybe;\n scheduledTimestamp_not_in?: InputMaybe>;\n startTimestamp?: InputMaybe;\n startTimestamp_gt?: InputMaybe;\n startTimestamp_gte?: InputMaybe;\n startTimestamp_in?: InputMaybe>;\n startTimestamp_lt?: InputMaybe;\n startTimestamp_lte?: InputMaybe;\n startTimestamp_not?: InputMaybe;\n startTimestamp_not_in?: InputMaybe>;\n startWeights?: InputMaybe>;\n startWeights_contains?: InputMaybe>;\n startWeights_contains_nocase?: InputMaybe>;\n startWeights_not?: InputMaybe>;\n startWeights_not_contains?: InputMaybe>;\n startWeights_not_contains_nocase?: InputMaybe>;\n};\n\nexport enum GradualWeightUpdate_OrderBy {\n EndTimestamp = 'endTimestamp',\n EndWeights = 'endWeights',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n ScheduledTimestamp = 'scheduledTimestamp',\n StartTimestamp = 'startTimestamp',\n StartWeights = 'startWeights'\n}\n\nexport enum InvestType {\n Exit = 'Exit',\n Join = 'Join'\n}\n\nexport type JoinExit = {\n __typename?: 'JoinExit';\n amounts: Array;\n id: Scalars['ID'];\n pool: Pool;\n sender: Scalars['Bytes'];\n timestamp: Scalars['Int'];\n tx: Scalars['Bytes'];\n type: InvestType;\n user: User;\n valueUSD?: Maybe;\n};\n\nexport type JoinExit_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n amounts?: InputMaybe>;\n amounts_contains?: InputMaybe>;\n amounts_contains_nocase?: InputMaybe>;\n amounts_not?: InputMaybe>;\n amounts_not_contains?: InputMaybe>;\n amounts_not_contains_nocase?: InputMaybe>;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n sender?: InputMaybe;\n sender_contains?: InputMaybe;\n sender_gt?: InputMaybe;\n sender_gte?: InputMaybe;\n sender_in?: InputMaybe>;\n sender_lt?: InputMaybe;\n sender_lte?: InputMaybe;\n sender_not?: InputMaybe;\n sender_not_contains?: InputMaybe;\n sender_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n tx?: InputMaybe;\n tx_contains?: InputMaybe;\n tx_gt?: InputMaybe;\n tx_gte?: InputMaybe;\n tx_in?: InputMaybe>;\n tx_lt?: InputMaybe;\n tx_lte?: InputMaybe;\n tx_not?: InputMaybe;\n tx_not_contains?: InputMaybe;\n tx_not_in?: InputMaybe>;\n type?: InputMaybe;\n type_in?: InputMaybe>;\n type_not?: InputMaybe;\n type_not_in?: InputMaybe>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n valueUSD?: InputMaybe;\n valueUSD_gt?: InputMaybe;\n valueUSD_gte?: InputMaybe;\n valueUSD_in?: InputMaybe>;\n valueUSD_lt?: InputMaybe;\n valueUSD_lte?: InputMaybe;\n valueUSD_not?: InputMaybe;\n valueUSD_not_in?: InputMaybe>;\n};\n\nexport enum JoinExit_OrderBy {\n Amounts = 'amounts',\n Id = 'id',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n Sender = 'sender',\n Timestamp = 'timestamp',\n Tx = 'tx',\n Type = 'type',\n User = 'user',\n UserId = 'user__id',\n ValueUsd = 'valueUSD'\n}\n\nexport type LatestPrice = {\n __typename?: 'LatestPrice';\n asset: Scalars['Bytes'];\n block: Scalars['BigInt'];\n id: Scalars['ID'];\n poolId: Pool;\n price: Scalars['BigDecimal'];\n pricingAsset: Scalars['Bytes'];\n};\n\nexport type LatestPrice_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n asset?: InputMaybe;\n asset_contains?: InputMaybe;\n asset_gt?: InputMaybe;\n asset_gte?: InputMaybe;\n asset_in?: InputMaybe>;\n asset_lt?: InputMaybe;\n asset_lte?: InputMaybe;\n asset_not?: InputMaybe;\n asset_not_contains?: InputMaybe;\n asset_not_in?: InputMaybe>;\n block?: InputMaybe;\n block_gt?: InputMaybe;\n block_gte?: InputMaybe;\n block_in?: InputMaybe>;\n block_lt?: InputMaybe;\n block_lte?: InputMaybe;\n block_not?: InputMaybe;\n block_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n price?: InputMaybe;\n price_gt?: InputMaybe;\n price_gte?: InputMaybe;\n price_in?: InputMaybe>;\n price_lt?: InputMaybe;\n price_lte?: InputMaybe;\n price_not?: InputMaybe;\n price_not_in?: InputMaybe>;\n pricingAsset?: InputMaybe;\n pricingAsset_contains?: InputMaybe;\n pricingAsset_gt?: InputMaybe;\n pricingAsset_gte?: InputMaybe;\n pricingAsset_in?: InputMaybe>;\n pricingAsset_lt?: InputMaybe;\n pricingAsset_lte?: InputMaybe;\n pricingAsset_not?: InputMaybe;\n pricingAsset_not_contains?: InputMaybe;\n pricingAsset_not_in?: InputMaybe>;\n};\n\nexport enum LatestPrice_OrderBy {\n Asset = 'asset',\n Block = 'block',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n Price = 'price',\n PricingAsset = 'pricingAsset'\n}\n\nexport type ManagementOperation = {\n __typename?: 'ManagementOperation';\n cashDelta: Scalars['BigDecimal'];\n id: Scalars['ID'];\n managedDelta: Scalars['BigDecimal'];\n poolTokenId: PoolToken;\n timestamp: Scalars['Int'];\n type: OperationType;\n};\n\nexport type ManagementOperation_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n cashDelta?: InputMaybe;\n cashDelta_gt?: InputMaybe;\n cashDelta_gte?: InputMaybe;\n cashDelta_in?: InputMaybe>;\n cashDelta_lt?: InputMaybe;\n cashDelta_lte?: InputMaybe;\n cashDelta_not?: InputMaybe;\n cashDelta_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n managedDelta?: InputMaybe;\n managedDelta_gt?: InputMaybe;\n managedDelta_gte?: InputMaybe;\n managedDelta_in?: InputMaybe>;\n managedDelta_lt?: InputMaybe;\n managedDelta_lte?: InputMaybe;\n managedDelta_not?: InputMaybe;\n managedDelta_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolTokenId?: InputMaybe;\n poolTokenId_?: InputMaybe;\n poolTokenId_contains?: InputMaybe;\n poolTokenId_contains_nocase?: InputMaybe;\n poolTokenId_ends_with?: InputMaybe;\n poolTokenId_ends_with_nocase?: InputMaybe;\n poolTokenId_gt?: InputMaybe;\n poolTokenId_gte?: InputMaybe;\n poolTokenId_in?: InputMaybe>;\n poolTokenId_lt?: InputMaybe;\n poolTokenId_lte?: InputMaybe;\n poolTokenId_not?: InputMaybe;\n poolTokenId_not_contains?: InputMaybe;\n poolTokenId_not_contains_nocase?: InputMaybe;\n poolTokenId_not_ends_with?: InputMaybe;\n poolTokenId_not_ends_with_nocase?: InputMaybe;\n poolTokenId_not_in?: InputMaybe>;\n poolTokenId_not_starts_with?: InputMaybe;\n poolTokenId_not_starts_with_nocase?: InputMaybe;\n poolTokenId_starts_with?: InputMaybe;\n poolTokenId_starts_with_nocase?: InputMaybe;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n type?: InputMaybe;\n type_in?: InputMaybe>;\n type_not?: InputMaybe;\n type_not_in?: InputMaybe>;\n};\n\nexport enum ManagementOperation_OrderBy {\n CashDelta = 'cashDelta',\n Id = 'id',\n ManagedDelta = 'managedDelta',\n PoolTokenId = 'poolTokenId',\n PoolTokenIdAddress = 'poolTokenId__address',\n PoolTokenIdAssetManager = 'poolTokenId__assetManager',\n PoolTokenIdBalance = 'poolTokenId__balance',\n PoolTokenIdCashBalance = 'poolTokenId__cashBalance',\n PoolTokenIdDecimals = 'poolTokenId__decimals',\n PoolTokenIdId = 'poolTokenId__id',\n PoolTokenIdIndex = 'poolTokenId__index',\n PoolTokenIdIsExemptFromYieldProtocolFee = 'poolTokenId__isExemptFromYieldProtocolFee',\n PoolTokenIdManagedBalance = 'poolTokenId__managedBalance',\n PoolTokenIdName = 'poolTokenId__name',\n PoolTokenIdOldPriceRate = 'poolTokenId__oldPriceRate',\n PoolTokenIdPaidProtocolFees = 'poolTokenId__paidProtocolFees',\n PoolTokenIdPriceRate = 'poolTokenId__priceRate',\n PoolTokenIdSymbol = 'poolTokenId__symbol',\n PoolTokenIdWeight = 'poolTokenId__weight',\n Timestamp = 'timestamp',\n Type = 'type'\n}\n\nexport enum OperationType {\n Deposit = 'Deposit',\n Update = 'Update',\n Withdraw = 'Withdraw'\n}\n\n/** Defines the order direction, either ascending or descending */\nexport enum OrderDirection {\n Asc = 'asc',\n Desc = 'desc'\n}\n\nexport type Pool = {\n __typename?: 'Pool';\n address: Scalars['Bytes'];\n alpha?: Maybe;\n amp?: Maybe;\n ampUpdates?: Maybe>;\n baseToken?: Maybe;\n beta?: Maybe;\n c?: Maybe;\n circuitBreakers?: Maybe>;\n createTime: Scalars['Int'];\n dSq?: Maybe;\n delta?: Maybe;\n epsilon?: Maybe;\n expiryTime?: Maybe;\n factory?: Maybe;\n historicalValues?: Maybe>;\n holdersCount: Scalars['BigInt'];\n id: Scalars['ID'];\n isInRecoveryMode?: Maybe;\n isPaused?: Maybe;\n joinExitEnabled?: Maybe;\n lambda?: Maybe;\n lastJoinExitAmp?: Maybe;\n lastPostJoinExitInvariant?: Maybe;\n latestAmpUpdate?: Maybe;\n lowerTarget?: Maybe;\n mainIndex?: Maybe;\n managementAumFee?: Maybe;\n managementFee?: Maybe;\n mustAllowlistLPs?: Maybe;\n name?: Maybe;\n oracleEnabled: Scalars['Boolean'];\n owner?: Maybe;\n poolType?: Maybe;\n poolTypeVersion?: Maybe;\n priceRateProviders?: Maybe>;\n principalToken?: Maybe;\n protocolAumFeeCache?: Maybe;\n protocolId?: Maybe;\n protocolIdData?: Maybe;\n protocolSwapFeeCache?: Maybe;\n protocolYieldFeeCache?: Maybe;\n root3Alpha?: Maybe;\n s?: Maybe;\n shares?: Maybe>;\n snapshots?: Maybe>;\n sqrtAlpha?: Maybe;\n sqrtBeta?: Maybe;\n strategyType: Scalars['Int'];\n /** Indicates if a pool can be swapped against. Combines multiple sources, including offchain curation */\n swapEnabled: Scalars['Boolean'];\n /** External indication from an offchain permissioned actor */\n swapEnabledCurationSignal?: Maybe;\n /** The native swapEnabled boolean. internal to the pool. Only applies to Gyro, LBPs and InvestmentPools */\n swapEnabledInternal?: Maybe;\n swapFee: Scalars['BigDecimal'];\n swaps?: Maybe>;\n swapsCount: Scalars['BigInt'];\n symbol?: Maybe;\n tauAlphaX?: Maybe;\n tauAlphaY?: Maybe;\n tauBetaX?: Maybe;\n tauBetaY?: Maybe;\n tokens?: Maybe>;\n tokensList: Array;\n totalAumFeeCollectedInBPT?: Maybe;\n totalLiquidity: Scalars['BigDecimal'];\n totalLiquiditySansBPT?: Maybe;\n totalProtocolFee?: Maybe;\n totalProtocolFeePaidInBPT?: Maybe;\n totalShares: Scalars['BigDecimal'];\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n totalWeight?: Maybe;\n tx?: Maybe;\n u?: Maybe;\n unitSeconds?: Maybe;\n upperTarget?: Maybe;\n v?: Maybe;\n vaultID: Balancer;\n w?: Maybe;\n weightUpdates?: Maybe>;\n wrappedIndex?: Maybe;\n z?: Maybe;\n};\n\n\nexport type PoolAmpUpdatesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolCircuitBreakersArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolHistoricalValuesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolPriceRateProvidersArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolSharesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolSnapshotsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolSwapsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolTokensArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolWeightUpdatesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type PoolContract = {\n __typename?: 'PoolContract';\n id: Scalars['ID'];\n pool: Pool;\n};\n\nexport type PoolContract_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n};\n\nexport enum PoolContract_OrderBy {\n Id = 'id',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z'\n}\n\nexport type PoolHistoricalLiquidity = {\n __typename?: 'PoolHistoricalLiquidity';\n block: Scalars['BigInt'];\n id: Scalars['ID'];\n poolId: Pool;\n poolLiquidity: Scalars['BigDecimal'];\n poolShareValue: Scalars['BigDecimal'];\n poolTotalShares: Scalars['BigDecimal'];\n pricingAsset: Scalars['Bytes'];\n};\n\nexport type PoolHistoricalLiquidity_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n block?: InputMaybe;\n block_gt?: InputMaybe;\n block_gte?: InputMaybe;\n block_in?: InputMaybe>;\n block_lt?: InputMaybe;\n block_lte?: InputMaybe;\n block_not?: InputMaybe;\n block_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n poolLiquidity?: InputMaybe;\n poolLiquidity_gt?: InputMaybe;\n poolLiquidity_gte?: InputMaybe;\n poolLiquidity_in?: InputMaybe>;\n poolLiquidity_lt?: InputMaybe;\n poolLiquidity_lte?: InputMaybe;\n poolLiquidity_not?: InputMaybe;\n poolLiquidity_not_in?: InputMaybe>;\n poolShareValue?: InputMaybe;\n poolShareValue_gt?: InputMaybe;\n poolShareValue_gte?: InputMaybe;\n poolShareValue_in?: InputMaybe>;\n poolShareValue_lt?: InputMaybe;\n poolShareValue_lte?: InputMaybe;\n poolShareValue_not?: InputMaybe;\n poolShareValue_not_in?: InputMaybe>;\n poolTotalShares?: InputMaybe;\n poolTotalShares_gt?: InputMaybe;\n poolTotalShares_gte?: InputMaybe;\n poolTotalShares_in?: InputMaybe>;\n poolTotalShares_lt?: InputMaybe;\n poolTotalShares_lte?: InputMaybe;\n poolTotalShares_not?: InputMaybe;\n poolTotalShares_not_in?: InputMaybe>;\n pricingAsset?: InputMaybe;\n pricingAsset_contains?: InputMaybe;\n pricingAsset_gt?: InputMaybe;\n pricingAsset_gte?: InputMaybe;\n pricingAsset_in?: InputMaybe>;\n pricingAsset_lt?: InputMaybe;\n pricingAsset_lte?: InputMaybe;\n pricingAsset_not?: InputMaybe;\n pricingAsset_not_contains?: InputMaybe;\n pricingAsset_not_in?: InputMaybe>;\n};\n\nexport enum PoolHistoricalLiquidity_OrderBy {\n Block = 'block',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n PoolLiquidity = 'poolLiquidity',\n PoolShareValue = 'poolShareValue',\n PoolTotalShares = 'poolTotalShares',\n PricingAsset = 'pricingAsset'\n}\n\nexport type PoolShare = {\n __typename?: 'PoolShare';\n balance: Scalars['BigDecimal'];\n id: Scalars['ID'];\n poolId: Pool;\n userAddress: User;\n};\n\nexport type PoolShare_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n balance?: InputMaybe;\n balance_gt?: InputMaybe;\n balance_gte?: InputMaybe;\n balance_in?: InputMaybe>;\n balance_lt?: InputMaybe;\n balance_lte?: InputMaybe;\n balance_not?: InputMaybe;\n balance_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n userAddress?: InputMaybe;\n userAddress_?: InputMaybe;\n userAddress_contains?: InputMaybe;\n userAddress_contains_nocase?: InputMaybe;\n userAddress_ends_with?: InputMaybe;\n userAddress_ends_with_nocase?: InputMaybe;\n userAddress_gt?: InputMaybe;\n userAddress_gte?: InputMaybe;\n userAddress_in?: InputMaybe>;\n userAddress_lt?: InputMaybe;\n userAddress_lte?: InputMaybe;\n userAddress_not?: InputMaybe;\n userAddress_not_contains?: InputMaybe;\n userAddress_not_contains_nocase?: InputMaybe;\n userAddress_not_ends_with?: InputMaybe;\n userAddress_not_ends_with_nocase?: InputMaybe;\n userAddress_not_in?: InputMaybe>;\n userAddress_not_starts_with?: InputMaybe;\n userAddress_not_starts_with_nocase?: InputMaybe;\n userAddress_starts_with?: InputMaybe;\n userAddress_starts_with_nocase?: InputMaybe;\n};\n\nexport enum PoolShare_OrderBy {\n Balance = 'balance',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n UserAddress = 'userAddress',\n UserAddressId = 'userAddress__id'\n}\n\nexport type PoolSnapshot = {\n __typename?: 'PoolSnapshot';\n amounts: Array;\n holdersCount: Scalars['BigInt'];\n id: Scalars['ID'];\n liquidity: Scalars['BigDecimal'];\n pool: Pool;\n protocolFee?: Maybe;\n swapFees: Scalars['BigDecimal'];\n swapVolume: Scalars['BigDecimal'];\n swapsCount: Scalars['BigInt'];\n timestamp: Scalars['Int'];\n totalShares: Scalars['BigDecimal'];\n};\n\nexport type PoolSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n amounts?: InputMaybe>;\n amounts_contains?: InputMaybe>;\n amounts_contains_nocase?: InputMaybe>;\n amounts_not?: InputMaybe>;\n amounts_not_contains?: InputMaybe>;\n amounts_not_contains_nocase?: InputMaybe>;\n and?: InputMaybe>>;\n holdersCount?: InputMaybe;\n holdersCount_gt?: InputMaybe;\n holdersCount_gte?: InputMaybe;\n holdersCount_in?: InputMaybe>;\n holdersCount_lt?: InputMaybe;\n holdersCount_lte?: InputMaybe;\n holdersCount_not?: InputMaybe;\n holdersCount_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n liquidity?: InputMaybe;\n liquidity_gt?: InputMaybe;\n liquidity_gte?: InputMaybe;\n liquidity_in?: InputMaybe>;\n liquidity_lt?: InputMaybe;\n liquidity_lte?: InputMaybe;\n liquidity_not?: InputMaybe;\n liquidity_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n protocolFee?: InputMaybe;\n protocolFee_gt?: InputMaybe;\n protocolFee_gte?: InputMaybe;\n protocolFee_in?: InputMaybe>;\n protocolFee_lt?: InputMaybe;\n protocolFee_lte?: InputMaybe;\n protocolFee_not?: InputMaybe;\n protocolFee_not_in?: InputMaybe>;\n swapFees?: InputMaybe;\n swapFees_gt?: InputMaybe;\n swapFees_gte?: InputMaybe;\n swapFees_in?: InputMaybe>;\n swapFees_lt?: InputMaybe;\n swapFees_lte?: InputMaybe;\n swapFees_not?: InputMaybe;\n swapFees_not_in?: InputMaybe>;\n swapVolume?: InputMaybe;\n swapVolume_gt?: InputMaybe;\n swapVolume_gte?: InputMaybe;\n swapVolume_in?: InputMaybe>;\n swapVolume_lt?: InputMaybe;\n swapVolume_lte?: InputMaybe;\n swapVolume_not?: InputMaybe;\n swapVolume_not_in?: InputMaybe>;\n swapsCount?: InputMaybe;\n swapsCount_gt?: InputMaybe;\n swapsCount_gte?: InputMaybe;\n swapsCount_in?: InputMaybe>;\n swapsCount_lt?: InputMaybe;\n swapsCount_lte?: InputMaybe;\n swapsCount_not?: InputMaybe;\n swapsCount_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n totalShares?: InputMaybe;\n totalShares_gt?: InputMaybe;\n totalShares_gte?: InputMaybe;\n totalShares_in?: InputMaybe>;\n totalShares_lt?: InputMaybe;\n totalShares_lte?: InputMaybe;\n totalShares_not?: InputMaybe;\n totalShares_not_in?: InputMaybe>;\n};\n\nexport enum PoolSnapshot_OrderBy {\n Amounts = 'amounts',\n HoldersCount = 'holdersCount',\n Id = 'id',\n Liquidity = 'liquidity',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n ProtocolFee = 'protocolFee',\n SwapFees = 'swapFees',\n SwapVolume = 'swapVolume',\n SwapsCount = 'swapsCount',\n Timestamp = 'timestamp',\n TotalShares = 'totalShares'\n}\n\nexport type PoolToken = {\n __typename?: 'PoolToken';\n address: Scalars['String'];\n assetManager: Scalars['Bytes'];\n balance: Scalars['BigDecimal'];\n cashBalance: Scalars['BigDecimal'];\n circuitBreaker?: Maybe;\n decimals: Scalars['Int'];\n id: Scalars['ID'];\n index?: Maybe;\n isExemptFromYieldProtocolFee?: Maybe;\n managedBalance: Scalars['BigDecimal'];\n managements?: Maybe>;\n name: Scalars['String'];\n oldPriceRate?: Maybe;\n paidProtocolFees?: Maybe;\n poolId?: Maybe;\n priceRate: Scalars['BigDecimal'];\n symbol: Scalars['String'];\n token: Token;\n weight?: Maybe;\n};\n\n\nexport type PoolTokenManagementsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type PoolToken_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_contains_nocase?: InputMaybe;\n address_ends_with?: InputMaybe;\n address_ends_with_nocase?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_contains_nocase?: InputMaybe;\n address_not_ends_with?: InputMaybe;\n address_not_ends_with_nocase?: InputMaybe;\n address_not_in?: InputMaybe>;\n address_not_starts_with?: InputMaybe;\n address_not_starts_with_nocase?: InputMaybe;\n address_starts_with?: InputMaybe;\n address_starts_with_nocase?: InputMaybe;\n and?: InputMaybe>>;\n assetManager?: InputMaybe;\n assetManager_contains?: InputMaybe;\n assetManager_gt?: InputMaybe;\n assetManager_gte?: InputMaybe;\n assetManager_in?: InputMaybe>;\n assetManager_lt?: InputMaybe;\n assetManager_lte?: InputMaybe;\n assetManager_not?: InputMaybe;\n assetManager_not_contains?: InputMaybe;\n assetManager_not_in?: InputMaybe>;\n balance?: InputMaybe;\n balance_gt?: InputMaybe;\n balance_gte?: InputMaybe;\n balance_in?: InputMaybe>;\n balance_lt?: InputMaybe;\n balance_lte?: InputMaybe;\n balance_not?: InputMaybe;\n balance_not_in?: InputMaybe>;\n cashBalance?: InputMaybe;\n cashBalance_gt?: InputMaybe;\n cashBalance_gte?: InputMaybe;\n cashBalance_in?: InputMaybe>;\n cashBalance_lt?: InputMaybe;\n cashBalance_lte?: InputMaybe;\n cashBalance_not?: InputMaybe;\n cashBalance_not_in?: InputMaybe>;\n circuitBreaker?: InputMaybe;\n circuitBreaker_?: InputMaybe;\n circuitBreaker_contains?: InputMaybe;\n circuitBreaker_contains_nocase?: InputMaybe;\n circuitBreaker_ends_with?: InputMaybe;\n circuitBreaker_ends_with_nocase?: InputMaybe;\n circuitBreaker_gt?: InputMaybe;\n circuitBreaker_gte?: InputMaybe;\n circuitBreaker_in?: InputMaybe>;\n circuitBreaker_lt?: InputMaybe;\n circuitBreaker_lte?: InputMaybe;\n circuitBreaker_not?: InputMaybe;\n circuitBreaker_not_contains?: InputMaybe;\n circuitBreaker_not_contains_nocase?: InputMaybe;\n circuitBreaker_not_ends_with?: InputMaybe;\n circuitBreaker_not_ends_with_nocase?: InputMaybe;\n circuitBreaker_not_in?: InputMaybe>;\n circuitBreaker_not_starts_with?: InputMaybe;\n circuitBreaker_not_starts_with_nocase?: InputMaybe;\n circuitBreaker_starts_with?: InputMaybe;\n circuitBreaker_starts_with_nocase?: InputMaybe;\n decimals?: InputMaybe;\n decimals_gt?: InputMaybe;\n decimals_gte?: InputMaybe;\n decimals_in?: InputMaybe>;\n decimals_lt?: InputMaybe;\n decimals_lte?: InputMaybe;\n decimals_not?: InputMaybe;\n decimals_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n index?: InputMaybe;\n index_gt?: InputMaybe;\n index_gte?: InputMaybe;\n index_in?: InputMaybe>;\n index_lt?: InputMaybe;\n index_lte?: InputMaybe;\n index_not?: InputMaybe;\n index_not_in?: InputMaybe>;\n isExemptFromYieldProtocolFee?: InputMaybe;\n isExemptFromYieldProtocolFee_in?: InputMaybe>;\n isExemptFromYieldProtocolFee_not?: InputMaybe;\n isExemptFromYieldProtocolFee_not_in?: InputMaybe>;\n managedBalance?: InputMaybe;\n managedBalance_gt?: InputMaybe;\n managedBalance_gte?: InputMaybe;\n managedBalance_in?: InputMaybe>;\n managedBalance_lt?: InputMaybe;\n managedBalance_lte?: InputMaybe;\n managedBalance_not?: InputMaybe;\n managedBalance_not_in?: InputMaybe>;\n managements_?: InputMaybe;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n oldPriceRate?: InputMaybe;\n oldPriceRate_gt?: InputMaybe;\n oldPriceRate_gte?: InputMaybe;\n oldPriceRate_in?: InputMaybe>;\n oldPriceRate_lt?: InputMaybe;\n oldPriceRate_lte?: InputMaybe;\n oldPriceRate_not?: InputMaybe;\n oldPriceRate_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n paidProtocolFees?: InputMaybe;\n paidProtocolFees_gt?: InputMaybe;\n paidProtocolFees_gte?: InputMaybe;\n paidProtocolFees_in?: InputMaybe>;\n paidProtocolFees_lt?: InputMaybe;\n paidProtocolFees_lte?: InputMaybe;\n paidProtocolFees_not?: InputMaybe;\n paidProtocolFees_not_in?: InputMaybe>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n priceRate?: InputMaybe;\n priceRate_gt?: InputMaybe;\n priceRate_gte?: InputMaybe;\n priceRate_in?: InputMaybe>;\n priceRate_lt?: InputMaybe;\n priceRate_lte?: InputMaybe;\n priceRate_not?: InputMaybe;\n priceRate_not_in?: InputMaybe>;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n token?: InputMaybe;\n token_?: InputMaybe;\n token_contains?: InputMaybe;\n token_contains_nocase?: InputMaybe;\n token_ends_with?: InputMaybe;\n token_ends_with_nocase?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_contains_nocase?: InputMaybe;\n token_not_ends_with?: InputMaybe;\n token_not_ends_with_nocase?: InputMaybe;\n token_not_in?: InputMaybe>;\n token_not_starts_with?: InputMaybe;\n token_not_starts_with_nocase?: InputMaybe;\n token_starts_with?: InputMaybe;\n token_starts_with_nocase?: InputMaybe;\n weight?: InputMaybe;\n weight_gt?: InputMaybe;\n weight_gte?: InputMaybe;\n weight_in?: InputMaybe>;\n weight_lt?: InputMaybe;\n weight_lte?: InputMaybe;\n weight_not?: InputMaybe;\n weight_not_in?: InputMaybe>;\n};\n\nexport enum PoolToken_OrderBy {\n Address = 'address',\n AssetManager = 'assetManager',\n Balance = 'balance',\n CashBalance = 'cashBalance',\n CircuitBreaker = 'circuitBreaker',\n CircuitBreakerBptPrice = 'circuitBreaker__bptPrice',\n CircuitBreakerId = 'circuitBreaker__id',\n CircuitBreakerLowerBoundPercentage = 'circuitBreaker__lowerBoundPercentage',\n CircuitBreakerUpperBoundPercentage = 'circuitBreaker__upperBoundPercentage',\n Decimals = 'decimals',\n Id = 'id',\n Index = 'index',\n IsExemptFromYieldProtocolFee = 'isExemptFromYieldProtocolFee',\n ManagedBalance = 'managedBalance',\n Managements = 'managements',\n Name = 'name',\n OldPriceRate = 'oldPriceRate',\n PaidProtocolFees = 'paidProtocolFees',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n PriceRate = 'priceRate',\n Symbol = 'symbol',\n Token = 'token',\n TokenAddress = 'token__address',\n TokenDecimals = 'token__decimals',\n TokenFxOracleDecimals = 'token__fxOracleDecimals',\n TokenId = 'token__id',\n TokenLatestFxPrice = 'token__latestFXPrice',\n TokenLatestUsdPrice = 'token__latestUSDPrice',\n TokenLatestUsdPriceTimestamp = 'token__latestUSDPriceTimestamp',\n TokenName = 'token__name',\n TokenSymbol = 'token__symbol',\n TokenTotalBalanceNotional = 'token__totalBalanceNotional',\n TokenTotalBalanceUsd = 'token__totalBalanceUSD',\n TokenTotalSwapCount = 'token__totalSwapCount',\n TokenTotalVolumeNotional = 'token__totalVolumeNotional',\n TokenTotalVolumeUsd = 'token__totalVolumeUSD',\n Weight = 'weight'\n}\n\nexport type Pool_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_in?: InputMaybe>;\n alpha?: InputMaybe;\n alpha_gt?: InputMaybe;\n alpha_gte?: InputMaybe;\n alpha_in?: InputMaybe>;\n alpha_lt?: InputMaybe;\n alpha_lte?: InputMaybe;\n alpha_not?: InputMaybe;\n alpha_not_in?: InputMaybe>;\n amp?: InputMaybe;\n ampUpdates_?: InputMaybe;\n amp_gt?: InputMaybe;\n amp_gte?: InputMaybe;\n amp_in?: InputMaybe>;\n amp_lt?: InputMaybe;\n amp_lte?: InputMaybe;\n amp_not?: InputMaybe;\n amp_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n baseToken?: InputMaybe;\n baseToken_contains?: InputMaybe;\n baseToken_gt?: InputMaybe;\n baseToken_gte?: InputMaybe;\n baseToken_in?: InputMaybe>;\n baseToken_lt?: InputMaybe;\n baseToken_lte?: InputMaybe;\n baseToken_not?: InputMaybe;\n baseToken_not_contains?: InputMaybe;\n baseToken_not_in?: InputMaybe>;\n beta?: InputMaybe;\n beta_gt?: InputMaybe;\n beta_gte?: InputMaybe;\n beta_in?: InputMaybe>;\n beta_lt?: InputMaybe;\n beta_lte?: InputMaybe;\n beta_not?: InputMaybe;\n beta_not_in?: InputMaybe>;\n c?: InputMaybe;\n c_gt?: InputMaybe;\n c_gte?: InputMaybe;\n c_in?: InputMaybe>;\n c_lt?: InputMaybe;\n c_lte?: InputMaybe;\n c_not?: InputMaybe;\n c_not_in?: InputMaybe>;\n circuitBreakers_?: InputMaybe;\n createTime?: InputMaybe;\n createTime_gt?: InputMaybe;\n createTime_gte?: InputMaybe;\n createTime_in?: InputMaybe>;\n createTime_lt?: InputMaybe;\n createTime_lte?: InputMaybe;\n createTime_not?: InputMaybe;\n createTime_not_in?: InputMaybe>;\n dSq?: InputMaybe;\n dSq_gt?: InputMaybe;\n dSq_gte?: InputMaybe;\n dSq_in?: InputMaybe>;\n dSq_lt?: InputMaybe;\n dSq_lte?: InputMaybe;\n dSq_not?: InputMaybe;\n dSq_not_in?: InputMaybe>;\n delta?: InputMaybe;\n delta_gt?: InputMaybe;\n delta_gte?: InputMaybe;\n delta_in?: InputMaybe>;\n delta_lt?: InputMaybe;\n delta_lte?: InputMaybe;\n delta_not?: InputMaybe;\n delta_not_in?: InputMaybe>;\n epsilon?: InputMaybe;\n epsilon_gt?: InputMaybe;\n epsilon_gte?: InputMaybe;\n epsilon_in?: InputMaybe>;\n epsilon_lt?: InputMaybe;\n epsilon_lte?: InputMaybe;\n epsilon_not?: InputMaybe;\n epsilon_not_in?: InputMaybe>;\n expiryTime?: InputMaybe;\n expiryTime_gt?: InputMaybe;\n expiryTime_gte?: InputMaybe;\n expiryTime_in?: InputMaybe>;\n expiryTime_lt?: InputMaybe;\n expiryTime_lte?: InputMaybe;\n expiryTime_not?: InputMaybe;\n expiryTime_not_in?: InputMaybe>;\n factory?: InputMaybe;\n factory_contains?: InputMaybe;\n factory_gt?: InputMaybe;\n factory_gte?: InputMaybe;\n factory_in?: InputMaybe>;\n factory_lt?: InputMaybe;\n factory_lte?: InputMaybe;\n factory_not?: InputMaybe;\n factory_not_contains?: InputMaybe;\n factory_not_in?: InputMaybe>;\n historicalValues_?: InputMaybe;\n holdersCount?: InputMaybe;\n holdersCount_gt?: InputMaybe;\n holdersCount_gte?: InputMaybe;\n holdersCount_in?: InputMaybe>;\n holdersCount_lt?: InputMaybe;\n holdersCount_lte?: InputMaybe;\n holdersCount_not?: InputMaybe;\n holdersCount_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n isInRecoveryMode?: InputMaybe;\n isInRecoveryMode_in?: InputMaybe>;\n isInRecoveryMode_not?: InputMaybe;\n isInRecoveryMode_not_in?: InputMaybe>;\n isPaused?: InputMaybe;\n isPaused_in?: InputMaybe>;\n isPaused_not?: InputMaybe;\n isPaused_not_in?: InputMaybe>;\n joinExitEnabled?: InputMaybe;\n joinExitEnabled_in?: InputMaybe>;\n joinExitEnabled_not?: InputMaybe;\n joinExitEnabled_not_in?: InputMaybe>;\n lambda?: InputMaybe;\n lambda_gt?: InputMaybe;\n lambda_gte?: InputMaybe;\n lambda_in?: InputMaybe>;\n lambda_lt?: InputMaybe;\n lambda_lte?: InputMaybe;\n lambda_not?: InputMaybe;\n lambda_not_in?: InputMaybe>;\n lastJoinExitAmp?: InputMaybe;\n lastJoinExitAmp_gt?: InputMaybe;\n lastJoinExitAmp_gte?: InputMaybe;\n lastJoinExitAmp_in?: InputMaybe>;\n lastJoinExitAmp_lt?: InputMaybe;\n lastJoinExitAmp_lte?: InputMaybe;\n lastJoinExitAmp_not?: InputMaybe;\n lastJoinExitAmp_not_in?: InputMaybe>;\n lastPostJoinExitInvariant?: InputMaybe;\n lastPostJoinExitInvariant_gt?: InputMaybe;\n lastPostJoinExitInvariant_gte?: InputMaybe;\n lastPostJoinExitInvariant_in?: InputMaybe>;\n lastPostJoinExitInvariant_lt?: InputMaybe;\n lastPostJoinExitInvariant_lte?: InputMaybe;\n lastPostJoinExitInvariant_not?: InputMaybe;\n lastPostJoinExitInvariant_not_in?: InputMaybe>;\n latestAmpUpdate?: InputMaybe;\n latestAmpUpdate_?: InputMaybe;\n latestAmpUpdate_contains?: InputMaybe;\n latestAmpUpdate_contains_nocase?: InputMaybe;\n latestAmpUpdate_ends_with?: InputMaybe;\n latestAmpUpdate_ends_with_nocase?: InputMaybe;\n latestAmpUpdate_gt?: InputMaybe;\n latestAmpUpdate_gte?: InputMaybe;\n latestAmpUpdate_in?: InputMaybe>;\n latestAmpUpdate_lt?: InputMaybe;\n latestAmpUpdate_lte?: InputMaybe;\n latestAmpUpdate_not?: InputMaybe;\n latestAmpUpdate_not_contains?: InputMaybe;\n latestAmpUpdate_not_contains_nocase?: InputMaybe;\n latestAmpUpdate_not_ends_with?: InputMaybe;\n latestAmpUpdate_not_ends_with_nocase?: InputMaybe;\n latestAmpUpdate_not_in?: InputMaybe>;\n latestAmpUpdate_not_starts_with?: InputMaybe;\n latestAmpUpdate_not_starts_with_nocase?: InputMaybe;\n latestAmpUpdate_starts_with?: InputMaybe;\n latestAmpUpdate_starts_with_nocase?: InputMaybe;\n lowerTarget?: InputMaybe;\n lowerTarget_gt?: InputMaybe;\n lowerTarget_gte?: InputMaybe;\n lowerTarget_in?: InputMaybe>;\n lowerTarget_lt?: InputMaybe;\n lowerTarget_lte?: InputMaybe;\n lowerTarget_not?: InputMaybe;\n lowerTarget_not_in?: InputMaybe>;\n mainIndex?: InputMaybe;\n mainIndex_gt?: InputMaybe;\n mainIndex_gte?: InputMaybe;\n mainIndex_in?: InputMaybe>;\n mainIndex_lt?: InputMaybe;\n mainIndex_lte?: InputMaybe;\n mainIndex_not?: InputMaybe;\n mainIndex_not_in?: InputMaybe>;\n managementAumFee?: InputMaybe;\n managementAumFee_gt?: InputMaybe;\n managementAumFee_gte?: InputMaybe;\n managementAumFee_in?: InputMaybe>;\n managementAumFee_lt?: InputMaybe;\n managementAumFee_lte?: InputMaybe;\n managementAumFee_not?: InputMaybe;\n managementAumFee_not_in?: InputMaybe>;\n managementFee?: InputMaybe;\n managementFee_gt?: InputMaybe;\n managementFee_gte?: InputMaybe;\n managementFee_in?: InputMaybe>;\n managementFee_lt?: InputMaybe;\n managementFee_lte?: InputMaybe;\n managementFee_not?: InputMaybe;\n managementFee_not_in?: InputMaybe>;\n mustAllowlistLPs?: InputMaybe;\n mustAllowlistLPs_in?: InputMaybe>;\n mustAllowlistLPs_not?: InputMaybe;\n mustAllowlistLPs_not_in?: InputMaybe>;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n oracleEnabled?: InputMaybe;\n oracleEnabled_in?: InputMaybe>;\n oracleEnabled_not?: InputMaybe;\n oracleEnabled_not_in?: InputMaybe>;\n owner?: InputMaybe;\n owner_contains?: InputMaybe;\n owner_gt?: InputMaybe;\n owner_gte?: InputMaybe;\n owner_in?: InputMaybe>;\n owner_lt?: InputMaybe;\n owner_lte?: InputMaybe;\n owner_not?: InputMaybe;\n owner_not_contains?: InputMaybe;\n owner_not_in?: InputMaybe>;\n poolType?: InputMaybe;\n poolTypeVersion?: InputMaybe;\n poolTypeVersion_gt?: InputMaybe;\n poolTypeVersion_gte?: InputMaybe;\n poolTypeVersion_in?: InputMaybe>;\n poolTypeVersion_lt?: InputMaybe;\n poolTypeVersion_lte?: InputMaybe;\n poolTypeVersion_not?: InputMaybe;\n poolTypeVersion_not_in?: InputMaybe>;\n poolType_contains?: InputMaybe;\n poolType_contains_nocase?: InputMaybe;\n poolType_ends_with?: InputMaybe;\n poolType_ends_with_nocase?: InputMaybe;\n poolType_gt?: InputMaybe;\n poolType_gte?: InputMaybe;\n poolType_in?: InputMaybe>;\n poolType_lt?: InputMaybe;\n poolType_lte?: InputMaybe;\n poolType_not?: InputMaybe;\n poolType_not_contains?: InputMaybe;\n poolType_not_contains_nocase?: InputMaybe;\n poolType_not_ends_with?: InputMaybe;\n poolType_not_ends_with_nocase?: InputMaybe;\n poolType_not_in?: InputMaybe>;\n poolType_not_starts_with?: InputMaybe;\n poolType_not_starts_with_nocase?: InputMaybe;\n poolType_starts_with?: InputMaybe;\n poolType_starts_with_nocase?: InputMaybe;\n priceRateProviders_?: InputMaybe;\n principalToken?: InputMaybe;\n principalToken_contains?: InputMaybe;\n principalToken_gt?: InputMaybe;\n principalToken_gte?: InputMaybe;\n principalToken_in?: InputMaybe>;\n principalToken_lt?: InputMaybe;\n principalToken_lte?: InputMaybe;\n principalToken_not?: InputMaybe;\n principalToken_not_contains?: InputMaybe;\n principalToken_not_in?: InputMaybe>;\n protocolAumFeeCache?: InputMaybe;\n protocolAumFeeCache_gt?: InputMaybe;\n protocolAumFeeCache_gte?: InputMaybe;\n protocolAumFeeCache_in?: InputMaybe>;\n protocolAumFeeCache_lt?: InputMaybe;\n protocolAumFeeCache_lte?: InputMaybe;\n protocolAumFeeCache_not?: InputMaybe;\n protocolAumFeeCache_not_in?: InputMaybe>;\n protocolId?: InputMaybe;\n protocolIdData?: InputMaybe;\n protocolIdData_?: InputMaybe;\n protocolIdData_contains?: InputMaybe;\n protocolIdData_contains_nocase?: InputMaybe;\n protocolIdData_ends_with?: InputMaybe;\n protocolIdData_ends_with_nocase?: InputMaybe;\n protocolIdData_gt?: InputMaybe;\n protocolIdData_gte?: InputMaybe;\n protocolIdData_in?: InputMaybe>;\n protocolIdData_lt?: InputMaybe;\n protocolIdData_lte?: InputMaybe;\n protocolIdData_not?: InputMaybe;\n protocolIdData_not_contains?: InputMaybe;\n protocolIdData_not_contains_nocase?: InputMaybe;\n protocolIdData_not_ends_with?: InputMaybe;\n protocolIdData_not_ends_with_nocase?: InputMaybe;\n protocolIdData_not_in?: InputMaybe>;\n protocolIdData_not_starts_with?: InputMaybe;\n protocolIdData_not_starts_with_nocase?: InputMaybe;\n protocolIdData_starts_with?: InputMaybe;\n protocolIdData_starts_with_nocase?: InputMaybe;\n protocolId_gt?: InputMaybe;\n protocolId_gte?: InputMaybe;\n protocolId_in?: InputMaybe>;\n protocolId_lt?: InputMaybe;\n protocolId_lte?: InputMaybe;\n protocolId_not?: InputMaybe;\n protocolId_not_in?: InputMaybe>;\n protocolSwapFeeCache?: InputMaybe;\n protocolSwapFeeCache_gt?: InputMaybe;\n protocolSwapFeeCache_gte?: InputMaybe;\n protocolSwapFeeCache_in?: InputMaybe>;\n protocolSwapFeeCache_lt?: InputMaybe;\n protocolSwapFeeCache_lte?: InputMaybe;\n protocolSwapFeeCache_not?: InputMaybe;\n protocolSwapFeeCache_not_in?: InputMaybe>;\n protocolYieldFeeCache?: InputMaybe;\n protocolYieldFeeCache_gt?: InputMaybe;\n protocolYieldFeeCache_gte?: InputMaybe;\n protocolYieldFeeCache_in?: InputMaybe>;\n protocolYieldFeeCache_lt?: InputMaybe;\n protocolYieldFeeCache_lte?: InputMaybe;\n protocolYieldFeeCache_not?: InputMaybe;\n protocolYieldFeeCache_not_in?: InputMaybe>;\n root3Alpha?: InputMaybe;\n root3Alpha_gt?: InputMaybe;\n root3Alpha_gte?: InputMaybe;\n root3Alpha_in?: InputMaybe>;\n root3Alpha_lt?: InputMaybe;\n root3Alpha_lte?: InputMaybe;\n root3Alpha_not?: InputMaybe;\n root3Alpha_not_in?: InputMaybe>;\n s?: InputMaybe;\n s_gt?: InputMaybe;\n s_gte?: InputMaybe;\n s_in?: InputMaybe>;\n s_lt?: InputMaybe;\n s_lte?: InputMaybe;\n s_not?: InputMaybe;\n s_not_in?: InputMaybe>;\n shares_?: InputMaybe;\n snapshots_?: InputMaybe;\n sqrtAlpha?: InputMaybe;\n sqrtAlpha_gt?: InputMaybe;\n sqrtAlpha_gte?: InputMaybe;\n sqrtAlpha_in?: InputMaybe>;\n sqrtAlpha_lt?: InputMaybe;\n sqrtAlpha_lte?: InputMaybe;\n sqrtAlpha_not?: InputMaybe;\n sqrtAlpha_not_in?: InputMaybe>;\n sqrtBeta?: InputMaybe;\n sqrtBeta_gt?: InputMaybe;\n sqrtBeta_gte?: InputMaybe;\n sqrtBeta_in?: InputMaybe>;\n sqrtBeta_lt?: InputMaybe;\n sqrtBeta_lte?: InputMaybe;\n sqrtBeta_not?: InputMaybe;\n sqrtBeta_not_in?: InputMaybe>;\n strategyType?: InputMaybe;\n strategyType_gt?: InputMaybe;\n strategyType_gte?: InputMaybe;\n strategyType_in?: InputMaybe>;\n strategyType_lt?: InputMaybe;\n strategyType_lte?: InputMaybe;\n strategyType_not?: InputMaybe;\n strategyType_not_in?: InputMaybe>;\n swapEnabled?: InputMaybe;\n swapEnabledCurationSignal?: InputMaybe;\n swapEnabledCurationSignal_in?: InputMaybe>;\n swapEnabledCurationSignal_not?: InputMaybe;\n swapEnabledCurationSignal_not_in?: InputMaybe>;\n swapEnabledInternal?: InputMaybe;\n swapEnabledInternal_in?: InputMaybe>;\n swapEnabledInternal_not?: InputMaybe;\n swapEnabledInternal_not_in?: InputMaybe>;\n swapEnabled_in?: InputMaybe>;\n swapEnabled_not?: InputMaybe;\n swapEnabled_not_in?: InputMaybe>;\n swapFee?: InputMaybe;\n swapFee_gt?: InputMaybe;\n swapFee_gte?: InputMaybe;\n swapFee_in?: InputMaybe>;\n swapFee_lt?: InputMaybe;\n swapFee_lte?: InputMaybe;\n swapFee_not?: InputMaybe;\n swapFee_not_in?: InputMaybe>;\n swapsCount?: InputMaybe;\n swapsCount_gt?: InputMaybe;\n swapsCount_gte?: InputMaybe;\n swapsCount_in?: InputMaybe>;\n swapsCount_lt?: InputMaybe;\n swapsCount_lte?: InputMaybe;\n swapsCount_not?: InputMaybe;\n swapsCount_not_in?: InputMaybe>;\n swaps_?: InputMaybe;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n tauAlphaX?: InputMaybe;\n tauAlphaX_gt?: InputMaybe;\n tauAlphaX_gte?: InputMaybe;\n tauAlphaX_in?: InputMaybe>;\n tauAlphaX_lt?: InputMaybe;\n tauAlphaX_lte?: InputMaybe;\n tauAlphaX_not?: InputMaybe;\n tauAlphaX_not_in?: InputMaybe>;\n tauAlphaY?: InputMaybe;\n tauAlphaY_gt?: InputMaybe;\n tauAlphaY_gte?: InputMaybe;\n tauAlphaY_in?: InputMaybe>;\n tauAlphaY_lt?: InputMaybe;\n tauAlphaY_lte?: InputMaybe;\n tauAlphaY_not?: InputMaybe;\n tauAlphaY_not_in?: InputMaybe>;\n tauBetaX?: InputMaybe;\n tauBetaX_gt?: InputMaybe;\n tauBetaX_gte?: InputMaybe;\n tauBetaX_in?: InputMaybe>;\n tauBetaX_lt?: InputMaybe;\n tauBetaX_lte?: InputMaybe;\n tauBetaX_not?: InputMaybe;\n tauBetaX_not_in?: InputMaybe>;\n tauBetaY?: InputMaybe;\n tauBetaY_gt?: InputMaybe;\n tauBetaY_gte?: InputMaybe;\n tauBetaY_in?: InputMaybe>;\n tauBetaY_lt?: InputMaybe;\n tauBetaY_lte?: InputMaybe;\n tauBetaY_not?: InputMaybe;\n tauBetaY_not_in?: InputMaybe>;\n tokensList?: InputMaybe>;\n tokensList_contains?: InputMaybe>;\n tokensList_contains_nocase?: InputMaybe>;\n tokensList_not?: InputMaybe>;\n tokensList_not_contains?: InputMaybe>;\n tokensList_not_contains_nocase?: InputMaybe>;\n tokens_?: InputMaybe;\n totalAumFeeCollectedInBPT?: InputMaybe;\n totalAumFeeCollectedInBPT_gt?: InputMaybe;\n totalAumFeeCollectedInBPT_gte?: InputMaybe;\n totalAumFeeCollectedInBPT_in?: InputMaybe>;\n totalAumFeeCollectedInBPT_lt?: InputMaybe;\n totalAumFeeCollectedInBPT_lte?: InputMaybe;\n totalAumFeeCollectedInBPT_not?: InputMaybe;\n totalAumFeeCollectedInBPT_not_in?: InputMaybe>;\n totalLiquidity?: InputMaybe;\n totalLiquiditySansBPT?: InputMaybe;\n totalLiquiditySansBPT_gt?: InputMaybe;\n totalLiquiditySansBPT_gte?: InputMaybe;\n totalLiquiditySansBPT_in?: InputMaybe>;\n totalLiquiditySansBPT_lt?: InputMaybe;\n totalLiquiditySansBPT_lte?: InputMaybe;\n totalLiquiditySansBPT_not?: InputMaybe;\n totalLiquiditySansBPT_not_in?: InputMaybe>;\n totalLiquidity_gt?: InputMaybe;\n totalLiquidity_gte?: InputMaybe;\n totalLiquidity_in?: InputMaybe>;\n totalLiquidity_lt?: InputMaybe;\n totalLiquidity_lte?: InputMaybe;\n totalLiquidity_not?: InputMaybe;\n totalLiquidity_not_in?: InputMaybe>;\n totalProtocolFee?: InputMaybe;\n totalProtocolFeePaidInBPT?: InputMaybe;\n totalProtocolFeePaidInBPT_gt?: InputMaybe;\n totalProtocolFeePaidInBPT_gte?: InputMaybe;\n totalProtocolFeePaidInBPT_in?: InputMaybe>;\n totalProtocolFeePaidInBPT_lt?: InputMaybe;\n totalProtocolFeePaidInBPT_lte?: InputMaybe;\n totalProtocolFeePaidInBPT_not?: InputMaybe;\n totalProtocolFeePaidInBPT_not_in?: InputMaybe>;\n totalProtocolFee_gt?: InputMaybe;\n totalProtocolFee_gte?: InputMaybe;\n totalProtocolFee_in?: InputMaybe>;\n totalProtocolFee_lt?: InputMaybe;\n totalProtocolFee_lte?: InputMaybe;\n totalProtocolFee_not?: InputMaybe;\n totalProtocolFee_not_in?: InputMaybe>;\n totalShares?: InputMaybe;\n totalShares_gt?: InputMaybe;\n totalShares_gte?: InputMaybe;\n totalShares_in?: InputMaybe>;\n totalShares_lt?: InputMaybe;\n totalShares_lte?: InputMaybe;\n totalShares_not?: InputMaybe;\n totalShares_not_in?: InputMaybe>;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n totalWeight?: InputMaybe;\n totalWeight_gt?: InputMaybe;\n totalWeight_gte?: InputMaybe;\n totalWeight_in?: InputMaybe>;\n totalWeight_lt?: InputMaybe;\n totalWeight_lte?: InputMaybe;\n totalWeight_not?: InputMaybe;\n totalWeight_not_in?: InputMaybe>;\n tx?: InputMaybe;\n tx_contains?: InputMaybe;\n tx_gt?: InputMaybe;\n tx_gte?: InputMaybe;\n tx_in?: InputMaybe>;\n tx_lt?: InputMaybe;\n tx_lte?: InputMaybe;\n tx_not?: InputMaybe;\n tx_not_contains?: InputMaybe;\n tx_not_in?: InputMaybe>;\n u?: InputMaybe;\n u_gt?: InputMaybe;\n u_gte?: InputMaybe;\n u_in?: InputMaybe>;\n u_lt?: InputMaybe;\n u_lte?: InputMaybe;\n u_not?: InputMaybe;\n u_not_in?: InputMaybe>;\n unitSeconds?: InputMaybe;\n unitSeconds_gt?: InputMaybe;\n unitSeconds_gte?: InputMaybe;\n unitSeconds_in?: InputMaybe>;\n unitSeconds_lt?: InputMaybe;\n unitSeconds_lte?: InputMaybe;\n unitSeconds_not?: InputMaybe;\n unitSeconds_not_in?: InputMaybe>;\n upperTarget?: InputMaybe;\n upperTarget_gt?: InputMaybe;\n upperTarget_gte?: InputMaybe;\n upperTarget_in?: InputMaybe>;\n upperTarget_lt?: InputMaybe;\n upperTarget_lte?: InputMaybe;\n upperTarget_not?: InputMaybe;\n upperTarget_not_in?: InputMaybe>;\n v?: InputMaybe;\n v_gt?: InputMaybe;\n v_gte?: InputMaybe;\n v_in?: InputMaybe>;\n v_lt?: InputMaybe;\n v_lte?: InputMaybe;\n v_not?: InputMaybe;\n v_not_in?: InputMaybe>;\n vaultID?: InputMaybe;\n vaultID_?: InputMaybe;\n vaultID_contains?: InputMaybe;\n vaultID_contains_nocase?: InputMaybe;\n vaultID_ends_with?: InputMaybe;\n vaultID_ends_with_nocase?: InputMaybe;\n vaultID_gt?: InputMaybe;\n vaultID_gte?: InputMaybe;\n vaultID_in?: InputMaybe>;\n vaultID_lt?: InputMaybe;\n vaultID_lte?: InputMaybe;\n vaultID_not?: InputMaybe;\n vaultID_not_contains?: InputMaybe;\n vaultID_not_contains_nocase?: InputMaybe;\n vaultID_not_ends_with?: InputMaybe;\n vaultID_not_ends_with_nocase?: InputMaybe;\n vaultID_not_in?: InputMaybe>;\n vaultID_not_starts_with?: InputMaybe;\n vaultID_not_starts_with_nocase?: InputMaybe;\n vaultID_starts_with?: InputMaybe;\n vaultID_starts_with_nocase?: InputMaybe;\n w?: InputMaybe;\n w_gt?: InputMaybe;\n w_gte?: InputMaybe;\n w_in?: InputMaybe>;\n w_lt?: InputMaybe;\n w_lte?: InputMaybe;\n w_not?: InputMaybe;\n w_not_in?: InputMaybe>;\n weightUpdates_?: InputMaybe;\n wrappedIndex?: InputMaybe;\n wrappedIndex_gt?: InputMaybe;\n wrappedIndex_gte?: InputMaybe;\n wrappedIndex_in?: InputMaybe>;\n wrappedIndex_lt?: InputMaybe;\n wrappedIndex_lte?: InputMaybe;\n wrappedIndex_not?: InputMaybe;\n wrappedIndex_not_in?: InputMaybe>;\n z?: InputMaybe;\n z_gt?: InputMaybe;\n z_gte?: InputMaybe;\n z_in?: InputMaybe>;\n z_lt?: InputMaybe;\n z_lte?: InputMaybe;\n z_not?: InputMaybe;\n z_not_in?: InputMaybe>;\n};\n\nexport enum Pool_OrderBy {\n Address = 'address',\n Alpha = 'alpha',\n Amp = 'amp',\n AmpUpdates = 'ampUpdates',\n BaseToken = 'baseToken',\n Beta = 'beta',\n C = 'c',\n CircuitBreakers = 'circuitBreakers',\n CreateTime = 'createTime',\n DSq = 'dSq',\n Delta = 'delta',\n Epsilon = 'epsilon',\n ExpiryTime = 'expiryTime',\n Factory = 'factory',\n HistoricalValues = 'historicalValues',\n HoldersCount = 'holdersCount',\n Id = 'id',\n IsInRecoveryMode = 'isInRecoveryMode',\n IsPaused = 'isPaused',\n JoinExitEnabled = 'joinExitEnabled',\n Lambda = 'lambda',\n LastJoinExitAmp = 'lastJoinExitAmp',\n LastPostJoinExitInvariant = 'lastPostJoinExitInvariant',\n LatestAmpUpdate = 'latestAmpUpdate',\n LatestAmpUpdateEndAmp = 'latestAmpUpdate__endAmp',\n LatestAmpUpdateEndTimestamp = 'latestAmpUpdate__endTimestamp',\n LatestAmpUpdateId = 'latestAmpUpdate__id',\n LatestAmpUpdateScheduledTimestamp = 'latestAmpUpdate__scheduledTimestamp',\n LatestAmpUpdateStartAmp = 'latestAmpUpdate__startAmp',\n LatestAmpUpdateStartTimestamp = 'latestAmpUpdate__startTimestamp',\n LowerTarget = 'lowerTarget',\n MainIndex = 'mainIndex',\n ManagementAumFee = 'managementAumFee',\n ManagementFee = 'managementFee',\n MustAllowlistLPs = 'mustAllowlistLPs',\n Name = 'name',\n OracleEnabled = 'oracleEnabled',\n Owner = 'owner',\n PoolType = 'poolType',\n PoolTypeVersion = 'poolTypeVersion',\n PriceRateProviders = 'priceRateProviders',\n PrincipalToken = 'principalToken',\n ProtocolAumFeeCache = 'protocolAumFeeCache',\n ProtocolId = 'protocolId',\n ProtocolIdData = 'protocolIdData',\n ProtocolIdDataId = 'protocolIdData__id',\n ProtocolIdDataName = 'protocolIdData__name',\n ProtocolSwapFeeCache = 'protocolSwapFeeCache',\n ProtocolYieldFeeCache = 'protocolYieldFeeCache',\n Root3Alpha = 'root3Alpha',\n S = 's',\n Shares = 'shares',\n Snapshots = 'snapshots',\n SqrtAlpha = 'sqrtAlpha',\n SqrtBeta = 'sqrtBeta',\n StrategyType = 'strategyType',\n SwapEnabled = 'swapEnabled',\n SwapEnabledCurationSignal = 'swapEnabledCurationSignal',\n SwapEnabledInternal = 'swapEnabledInternal',\n SwapFee = 'swapFee',\n Swaps = 'swaps',\n SwapsCount = 'swapsCount',\n Symbol = 'symbol',\n TauAlphaX = 'tauAlphaX',\n TauAlphaY = 'tauAlphaY',\n TauBetaX = 'tauBetaX',\n TauBetaY = 'tauBetaY',\n Tokens = 'tokens',\n TokensList = 'tokensList',\n TotalAumFeeCollectedInBpt = 'totalAumFeeCollectedInBPT',\n TotalLiquidity = 'totalLiquidity',\n TotalLiquiditySansBpt = 'totalLiquiditySansBPT',\n TotalProtocolFee = 'totalProtocolFee',\n TotalProtocolFeePaidInBpt = 'totalProtocolFeePaidInBPT',\n TotalShares = 'totalShares',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume',\n TotalWeight = 'totalWeight',\n Tx = 'tx',\n U = 'u',\n UnitSeconds = 'unitSeconds',\n UpperTarget = 'upperTarget',\n V = 'v',\n VaultId = 'vaultID',\n VaultIdId = 'vaultID__id',\n VaultIdPoolCount = 'vaultID__poolCount',\n VaultIdProtocolFeesCollector = 'vaultID__protocolFeesCollector',\n VaultIdTotalLiquidity = 'vaultID__totalLiquidity',\n VaultIdTotalProtocolFee = 'vaultID__totalProtocolFee',\n VaultIdTotalSwapCount = 'vaultID__totalSwapCount',\n VaultIdTotalSwapFee = 'vaultID__totalSwapFee',\n VaultIdTotalSwapVolume = 'vaultID__totalSwapVolume',\n W = 'w',\n WeightUpdates = 'weightUpdates',\n WrappedIndex = 'wrappedIndex',\n Z = 'z'\n}\n\nexport type PriceRateProvider = {\n __typename?: 'PriceRateProvider';\n address: Scalars['Bytes'];\n cacheDuration?: Maybe;\n cacheExpiry?: Maybe;\n id: Scalars['ID'];\n lastCached?: Maybe;\n poolId: Pool;\n rate?: Maybe;\n token: PoolToken;\n};\n\nexport type PriceRateProvider_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n cacheDuration?: InputMaybe;\n cacheDuration_gt?: InputMaybe;\n cacheDuration_gte?: InputMaybe;\n cacheDuration_in?: InputMaybe>;\n cacheDuration_lt?: InputMaybe;\n cacheDuration_lte?: InputMaybe;\n cacheDuration_not?: InputMaybe;\n cacheDuration_not_in?: InputMaybe>;\n cacheExpiry?: InputMaybe;\n cacheExpiry_gt?: InputMaybe;\n cacheExpiry_gte?: InputMaybe;\n cacheExpiry_in?: InputMaybe>;\n cacheExpiry_lt?: InputMaybe;\n cacheExpiry_lte?: InputMaybe;\n cacheExpiry_not?: InputMaybe;\n cacheExpiry_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n lastCached?: InputMaybe;\n lastCached_gt?: InputMaybe;\n lastCached_gte?: InputMaybe;\n lastCached_in?: InputMaybe>;\n lastCached_lt?: InputMaybe;\n lastCached_lte?: InputMaybe;\n lastCached_not?: InputMaybe;\n lastCached_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n rate?: InputMaybe;\n rate_gt?: InputMaybe;\n rate_gte?: InputMaybe;\n rate_in?: InputMaybe>;\n rate_lt?: InputMaybe;\n rate_lte?: InputMaybe;\n rate_not?: InputMaybe;\n rate_not_in?: InputMaybe>;\n token?: InputMaybe;\n token_?: InputMaybe;\n token_contains?: InputMaybe;\n token_contains_nocase?: InputMaybe;\n token_ends_with?: InputMaybe;\n token_ends_with_nocase?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_contains_nocase?: InputMaybe;\n token_not_ends_with?: InputMaybe;\n token_not_ends_with_nocase?: InputMaybe;\n token_not_in?: InputMaybe>;\n token_not_starts_with?: InputMaybe;\n token_not_starts_with_nocase?: InputMaybe;\n token_starts_with?: InputMaybe;\n token_starts_with_nocase?: InputMaybe;\n};\n\nexport enum PriceRateProvider_OrderBy {\n Address = 'address',\n CacheDuration = 'cacheDuration',\n CacheExpiry = 'cacheExpiry',\n Id = 'id',\n LastCached = 'lastCached',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n Rate = 'rate',\n Token = 'token',\n TokenAddress = 'token__address',\n TokenAssetManager = 'token__assetManager',\n TokenBalance = 'token__balance',\n TokenCashBalance = 'token__cashBalance',\n TokenDecimals = 'token__decimals',\n TokenId = 'token__id',\n TokenIndex = 'token__index',\n TokenIsExemptFromYieldProtocolFee = 'token__isExemptFromYieldProtocolFee',\n TokenManagedBalance = 'token__managedBalance',\n TokenName = 'token__name',\n TokenOldPriceRate = 'token__oldPriceRate',\n TokenPaidProtocolFees = 'token__paidProtocolFees',\n TokenPriceRate = 'token__priceRate',\n TokenSymbol = 'token__symbol',\n TokenWeight = 'token__weight'\n}\n\nexport type ProtocolIdData = {\n __typename?: 'ProtocolIdData';\n id: Scalars['ID'];\n name: Scalars['String'];\n};\n\nexport type ProtocolIdData_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n};\n\nexport enum ProtocolIdData_OrderBy {\n Id = 'id',\n Name = 'name'\n}\n\nexport type Query = {\n __typename?: 'Query';\n /** Access to subgraph metadata */\n _meta?: Maybe<_Meta_>;\n ampUpdate?: Maybe;\n ampUpdates: Array;\n balancer?: Maybe;\n balancerSnapshot?: Maybe;\n balancerSnapshots: Array;\n balancers: Array;\n circuitBreaker?: Maybe;\n circuitBreakers: Array;\n gradualWeightUpdate?: Maybe;\n gradualWeightUpdates: Array;\n joinExit?: Maybe;\n joinExits: Array;\n latestPrice?: Maybe;\n latestPrices: Array;\n managementOperation?: Maybe;\n managementOperations: Array;\n pool?: Maybe;\n poolContract?: Maybe;\n poolContracts: Array;\n poolHistoricalLiquidities: Array;\n poolHistoricalLiquidity?: Maybe;\n poolShare?: Maybe;\n poolShares: Array;\n poolSnapshot?: Maybe;\n poolSnapshots: Array;\n poolToken?: Maybe;\n poolTokens: Array;\n pools: Array;\n priceRateProvider?: Maybe;\n priceRateProviders: Array;\n protocolIdData?: Maybe;\n protocolIdDatas: Array;\n swap?: Maybe;\n swapFeeUpdate?: Maybe;\n swapFeeUpdates: Array;\n swaps: Array;\n token?: Maybe;\n tokenPrice?: Maybe;\n tokenPrices: Array;\n tokenSnapshot?: Maybe;\n tokenSnapshots: Array;\n tokens: Array;\n tradePair?: Maybe;\n tradePairSnapshot?: Maybe;\n tradePairSnapshots: Array;\n tradePairs: Array;\n user?: Maybe;\n userInternalBalance?: Maybe;\n userInternalBalances: Array;\n users: Array;\n};\n\n\nexport type Query_MetaArgs = {\n block?: InputMaybe;\n};\n\n\nexport type QueryAmpUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryAmpUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryBalancerArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryBalancerSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryBalancerSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryBalancersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryCircuitBreakerArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryCircuitBreakersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGradualWeightUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGradualWeightUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryJoinExitArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryJoinExitsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryLatestPriceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryLatestPricesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryManagementOperationArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryManagementOperationsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolContractArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolContractsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolHistoricalLiquiditiesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolHistoricalLiquidityArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolShareArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolSharesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPriceRateProviderArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPriceRateProvidersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryProtocolIdDataArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryProtocolIdDatasArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QuerySwapArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QuerySwapFeeUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QuerySwapFeeUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QuerySwapsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTokenPriceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTokenPricesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTokenSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTokenSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTradePairArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTradePairSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTradePairSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTradePairsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryUserArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryUserInternalBalanceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryUserInternalBalancesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryUsersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\nexport type Subscription = {\n __typename?: 'Subscription';\n /** Access to subgraph metadata */\n _meta?: Maybe<_Meta_>;\n ampUpdate?: Maybe;\n ampUpdates: Array;\n balancer?: Maybe;\n balancerSnapshot?: Maybe;\n balancerSnapshots: Array;\n balancers: Array;\n circuitBreaker?: Maybe;\n circuitBreakers: Array;\n gradualWeightUpdate?: Maybe;\n gradualWeightUpdates: Array;\n joinExit?: Maybe;\n joinExits: Array;\n latestPrice?: Maybe;\n latestPrices: Array;\n managementOperation?: Maybe;\n managementOperations: Array;\n pool?: Maybe;\n poolContract?: Maybe;\n poolContracts: Array;\n poolHistoricalLiquidities: Array;\n poolHistoricalLiquidity?: Maybe;\n poolShare?: Maybe;\n poolShares: Array;\n poolSnapshot?: Maybe;\n poolSnapshots: Array;\n poolToken?: Maybe;\n poolTokens: Array;\n pools: Array;\n priceRateProvider?: Maybe;\n priceRateProviders: Array;\n protocolIdData?: Maybe;\n protocolIdDatas: Array;\n swap?: Maybe;\n swapFeeUpdate?: Maybe;\n swapFeeUpdates: Array;\n swaps: Array;\n token?: Maybe;\n tokenPrice?: Maybe;\n tokenPrices: Array;\n tokenSnapshot?: Maybe;\n tokenSnapshots: Array;\n tokens: Array;\n tradePair?: Maybe;\n tradePairSnapshot?: Maybe;\n tradePairSnapshots: Array;\n tradePairs: Array;\n user?: Maybe;\n userInternalBalance?: Maybe;\n userInternalBalances: Array;\n users: Array;\n};\n\n\nexport type Subscription_MetaArgs = {\n block?: InputMaybe;\n};\n\n\nexport type SubscriptionAmpUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionAmpUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionBalancerArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionBalancerSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionBalancerSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionBalancersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionCircuitBreakerArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionCircuitBreakersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGradualWeightUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGradualWeightUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionJoinExitArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionJoinExitsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionLatestPriceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionLatestPricesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionManagementOperationArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionManagementOperationsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolContractArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolContractsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolHistoricalLiquiditiesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolHistoricalLiquidityArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolShareArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolSharesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPriceRateProviderArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPriceRateProvidersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionProtocolIdDataArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionProtocolIdDatasArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionSwapArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionSwapFeeUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionSwapFeeUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionSwapsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTokenPriceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTokenPricesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTokenSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTokenSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTradePairArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTradePairSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTradePairSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTradePairsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionUserArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionUserInternalBalanceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionUserInternalBalancesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionUsersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\nexport type Swap = {\n __typename?: 'Swap';\n caller: Scalars['Bytes'];\n id: Scalars['ID'];\n poolId: Pool;\n timestamp: Scalars['Int'];\n tokenAmountIn: Scalars['BigDecimal'];\n tokenAmountOut: Scalars['BigDecimal'];\n tokenIn: Scalars['Bytes'];\n tokenInSym: Scalars['String'];\n tokenOut: Scalars['Bytes'];\n tokenOutSym: Scalars['String'];\n tx: Scalars['Bytes'];\n userAddress: User;\n valueUSD: Scalars['BigDecimal'];\n};\n\nexport type SwapFeeUpdate = {\n __typename?: 'SwapFeeUpdate';\n endSwapFeePercentage: Scalars['BigDecimal'];\n endTimestamp: Scalars['BigInt'];\n id: Scalars['ID'];\n pool: Pool;\n scheduledTimestamp: Scalars['Int'];\n startSwapFeePercentage: Scalars['BigDecimal'];\n startTimestamp: Scalars['BigInt'];\n};\n\nexport type SwapFeeUpdate_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n endSwapFeePercentage?: InputMaybe;\n endSwapFeePercentage_gt?: InputMaybe;\n endSwapFeePercentage_gte?: InputMaybe;\n endSwapFeePercentage_in?: InputMaybe>;\n endSwapFeePercentage_lt?: InputMaybe;\n endSwapFeePercentage_lte?: InputMaybe;\n endSwapFeePercentage_not?: InputMaybe;\n endSwapFeePercentage_not_in?: InputMaybe>;\n endTimestamp?: InputMaybe;\n endTimestamp_gt?: InputMaybe;\n endTimestamp_gte?: InputMaybe;\n endTimestamp_in?: InputMaybe>;\n endTimestamp_lt?: InputMaybe;\n endTimestamp_lte?: InputMaybe;\n endTimestamp_not?: InputMaybe;\n endTimestamp_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n scheduledTimestamp?: InputMaybe;\n scheduledTimestamp_gt?: InputMaybe;\n scheduledTimestamp_gte?: InputMaybe;\n scheduledTimestamp_in?: InputMaybe>;\n scheduledTimestamp_lt?: InputMaybe;\n scheduledTimestamp_lte?: InputMaybe;\n scheduledTimestamp_not?: InputMaybe;\n scheduledTimestamp_not_in?: InputMaybe>;\n startSwapFeePercentage?: InputMaybe;\n startSwapFeePercentage_gt?: InputMaybe;\n startSwapFeePercentage_gte?: InputMaybe;\n startSwapFeePercentage_in?: InputMaybe>;\n startSwapFeePercentage_lt?: InputMaybe;\n startSwapFeePercentage_lte?: InputMaybe;\n startSwapFeePercentage_not?: InputMaybe;\n startSwapFeePercentage_not_in?: InputMaybe>;\n startTimestamp?: InputMaybe;\n startTimestamp_gt?: InputMaybe;\n startTimestamp_gte?: InputMaybe;\n startTimestamp_in?: InputMaybe>;\n startTimestamp_lt?: InputMaybe;\n startTimestamp_lte?: InputMaybe;\n startTimestamp_not?: InputMaybe;\n startTimestamp_not_in?: InputMaybe>;\n};\n\nexport enum SwapFeeUpdate_OrderBy {\n EndSwapFeePercentage = 'endSwapFeePercentage',\n EndTimestamp = 'endTimestamp',\n Id = 'id',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n ScheduledTimestamp = 'scheduledTimestamp',\n StartSwapFeePercentage = 'startSwapFeePercentage',\n StartTimestamp = 'startTimestamp'\n}\n\nexport type Swap_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n caller?: InputMaybe;\n caller_contains?: InputMaybe;\n caller_gt?: InputMaybe;\n caller_gte?: InputMaybe;\n caller_in?: InputMaybe>;\n caller_lt?: InputMaybe;\n caller_lte?: InputMaybe;\n caller_not?: InputMaybe;\n caller_not_contains?: InputMaybe;\n caller_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n tokenAmountIn?: InputMaybe;\n tokenAmountIn_gt?: InputMaybe;\n tokenAmountIn_gte?: InputMaybe;\n tokenAmountIn_in?: InputMaybe>;\n tokenAmountIn_lt?: InputMaybe;\n tokenAmountIn_lte?: InputMaybe;\n tokenAmountIn_not?: InputMaybe;\n tokenAmountIn_not_in?: InputMaybe>;\n tokenAmountOut?: InputMaybe;\n tokenAmountOut_gt?: InputMaybe;\n tokenAmountOut_gte?: InputMaybe;\n tokenAmountOut_in?: InputMaybe>;\n tokenAmountOut_lt?: InputMaybe;\n tokenAmountOut_lte?: InputMaybe;\n tokenAmountOut_not?: InputMaybe;\n tokenAmountOut_not_in?: InputMaybe>;\n tokenIn?: InputMaybe;\n tokenInSym?: InputMaybe;\n tokenInSym_contains?: InputMaybe;\n tokenInSym_contains_nocase?: InputMaybe;\n tokenInSym_ends_with?: InputMaybe;\n tokenInSym_ends_with_nocase?: InputMaybe;\n tokenInSym_gt?: InputMaybe;\n tokenInSym_gte?: InputMaybe;\n tokenInSym_in?: InputMaybe>;\n tokenInSym_lt?: InputMaybe;\n tokenInSym_lte?: InputMaybe;\n tokenInSym_not?: InputMaybe;\n tokenInSym_not_contains?: InputMaybe;\n tokenInSym_not_contains_nocase?: InputMaybe;\n tokenInSym_not_ends_with?: InputMaybe;\n tokenInSym_not_ends_with_nocase?: InputMaybe;\n tokenInSym_not_in?: InputMaybe>;\n tokenInSym_not_starts_with?: InputMaybe;\n tokenInSym_not_starts_with_nocase?: InputMaybe;\n tokenInSym_starts_with?: InputMaybe;\n tokenInSym_starts_with_nocase?: InputMaybe;\n tokenIn_contains?: InputMaybe;\n tokenIn_gt?: InputMaybe;\n tokenIn_gte?: InputMaybe;\n tokenIn_in?: InputMaybe>;\n tokenIn_lt?: InputMaybe;\n tokenIn_lte?: InputMaybe;\n tokenIn_not?: InputMaybe;\n tokenIn_not_contains?: InputMaybe;\n tokenIn_not_in?: InputMaybe>;\n tokenOut?: InputMaybe;\n tokenOutSym?: InputMaybe;\n tokenOutSym_contains?: InputMaybe;\n tokenOutSym_contains_nocase?: InputMaybe;\n tokenOutSym_ends_with?: InputMaybe;\n tokenOutSym_ends_with_nocase?: InputMaybe;\n tokenOutSym_gt?: InputMaybe;\n tokenOutSym_gte?: InputMaybe;\n tokenOutSym_in?: InputMaybe>;\n tokenOutSym_lt?: InputMaybe;\n tokenOutSym_lte?: InputMaybe;\n tokenOutSym_not?: InputMaybe;\n tokenOutSym_not_contains?: InputMaybe;\n tokenOutSym_not_contains_nocase?: InputMaybe;\n tokenOutSym_not_ends_with?: InputMaybe;\n tokenOutSym_not_ends_with_nocase?: InputMaybe;\n tokenOutSym_not_in?: InputMaybe>;\n tokenOutSym_not_starts_with?: InputMaybe;\n tokenOutSym_not_starts_with_nocase?: InputMaybe;\n tokenOutSym_starts_with?: InputMaybe;\n tokenOutSym_starts_with_nocase?: InputMaybe;\n tokenOut_contains?: InputMaybe;\n tokenOut_gt?: InputMaybe;\n tokenOut_gte?: InputMaybe;\n tokenOut_in?: InputMaybe>;\n tokenOut_lt?: InputMaybe;\n tokenOut_lte?: InputMaybe;\n tokenOut_not?: InputMaybe;\n tokenOut_not_contains?: InputMaybe;\n tokenOut_not_in?: InputMaybe>;\n tx?: InputMaybe;\n tx_contains?: InputMaybe;\n tx_gt?: InputMaybe;\n tx_gte?: InputMaybe;\n tx_in?: InputMaybe>;\n tx_lt?: InputMaybe;\n tx_lte?: InputMaybe;\n tx_not?: InputMaybe;\n tx_not_contains?: InputMaybe;\n tx_not_in?: InputMaybe>;\n userAddress?: InputMaybe;\n userAddress_?: InputMaybe;\n userAddress_contains?: InputMaybe;\n userAddress_contains_nocase?: InputMaybe;\n userAddress_ends_with?: InputMaybe;\n userAddress_ends_with_nocase?: InputMaybe;\n userAddress_gt?: InputMaybe;\n userAddress_gte?: InputMaybe;\n userAddress_in?: InputMaybe>;\n userAddress_lt?: InputMaybe;\n userAddress_lte?: InputMaybe;\n userAddress_not?: InputMaybe;\n userAddress_not_contains?: InputMaybe;\n userAddress_not_contains_nocase?: InputMaybe;\n userAddress_not_ends_with?: InputMaybe;\n userAddress_not_ends_with_nocase?: InputMaybe;\n userAddress_not_in?: InputMaybe>;\n userAddress_not_starts_with?: InputMaybe;\n userAddress_not_starts_with_nocase?: InputMaybe;\n userAddress_starts_with?: InputMaybe;\n userAddress_starts_with_nocase?: InputMaybe;\n valueUSD?: InputMaybe;\n valueUSD_gt?: InputMaybe;\n valueUSD_gte?: InputMaybe;\n valueUSD_in?: InputMaybe>;\n valueUSD_lt?: InputMaybe;\n valueUSD_lte?: InputMaybe;\n valueUSD_not?: InputMaybe;\n valueUSD_not_in?: InputMaybe>;\n};\n\nexport enum Swap_OrderBy {\n Caller = 'caller',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n Timestamp = 'timestamp',\n TokenAmountIn = 'tokenAmountIn',\n TokenAmountOut = 'tokenAmountOut',\n TokenIn = 'tokenIn',\n TokenInSym = 'tokenInSym',\n TokenOut = 'tokenOut',\n TokenOutSym = 'tokenOutSym',\n Tx = 'tx',\n UserAddress = 'userAddress',\n UserAddressId = 'userAddress__id',\n ValueUsd = 'valueUSD'\n}\n\nexport type Token = {\n __typename?: 'Token';\n address: Scalars['String'];\n decimals: Scalars['Int'];\n fxOracleDecimals?: Maybe;\n id: Scalars['ID'];\n latestFXPrice?: Maybe;\n latestPrice?: Maybe;\n latestUSDPrice?: Maybe;\n latestUSDPriceTimestamp?: Maybe;\n name?: Maybe;\n pool?: Maybe;\n symbol?: Maybe;\n totalBalanceNotional: Scalars['BigDecimal'];\n totalBalanceUSD: Scalars['BigDecimal'];\n totalSwapCount: Scalars['BigInt'];\n totalVolumeNotional: Scalars['BigDecimal'];\n totalVolumeUSD: Scalars['BigDecimal'];\n};\n\nexport type TokenPrice = {\n __typename?: 'TokenPrice';\n amount: Scalars['BigDecimal'];\n asset: Scalars['Bytes'];\n block: Scalars['BigInt'];\n id: Scalars['ID'];\n poolId: Pool;\n price: Scalars['BigDecimal'];\n pricingAsset: Scalars['Bytes'];\n timestamp: Scalars['Int'];\n};\n\nexport type TokenPrice_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n amount?: InputMaybe;\n amount_gt?: InputMaybe;\n amount_gte?: InputMaybe;\n amount_in?: InputMaybe>;\n amount_lt?: InputMaybe;\n amount_lte?: InputMaybe;\n amount_not?: InputMaybe;\n amount_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n asset?: InputMaybe;\n asset_contains?: InputMaybe;\n asset_gt?: InputMaybe;\n asset_gte?: InputMaybe;\n asset_in?: InputMaybe>;\n asset_lt?: InputMaybe;\n asset_lte?: InputMaybe;\n asset_not?: InputMaybe;\n asset_not_contains?: InputMaybe;\n asset_not_in?: InputMaybe>;\n block?: InputMaybe;\n block_gt?: InputMaybe;\n block_gte?: InputMaybe;\n block_in?: InputMaybe>;\n block_lt?: InputMaybe;\n block_lte?: InputMaybe;\n block_not?: InputMaybe;\n block_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n price?: InputMaybe;\n price_gt?: InputMaybe;\n price_gte?: InputMaybe;\n price_in?: InputMaybe>;\n price_lt?: InputMaybe;\n price_lte?: InputMaybe;\n price_not?: InputMaybe;\n price_not_in?: InputMaybe>;\n pricingAsset?: InputMaybe;\n pricingAsset_contains?: InputMaybe;\n pricingAsset_gt?: InputMaybe;\n pricingAsset_gte?: InputMaybe;\n pricingAsset_in?: InputMaybe>;\n pricingAsset_lt?: InputMaybe;\n pricingAsset_lte?: InputMaybe;\n pricingAsset_not?: InputMaybe;\n pricingAsset_not_contains?: InputMaybe;\n pricingAsset_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n};\n\nexport enum TokenPrice_OrderBy {\n Amount = 'amount',\n Asset = 'asset',\n Block = 'block',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n Price = 'price',\n PricingAsset = 'pricingAsset',\n Timestamp = 'timestamp'\n}\n\nexport type TokenSnapshot = {\n __typename?: 'TokenSnapshot';\n id: Scalars['ID'];\n timestamp: Scalars['Int'];\n token: Token;\n totalBalanceNotional: Scalars['BigDecimal'];\n totalBalanceUSD: Scalars['BigDecimal'];\n totalSwapCount: Scalars['BigInt'];\n totalVolumeNotional: Scalars['BigDecimal'];\n totalVolumeUSD: Scalars['BigDecimal'];\n};\n\nexport type TokenSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n token?: InputMaybe;\n token_?: InputMaybe;\n token_contains?: InputMaybe;\n token_contains_nocase?: InputMaybe;\n token_ends_with?: InputMaybe;\n token_ends_with_nocase?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_contains_nocase?: InputMaybe;\n token_not_ends_with?: InputMaybe;\n token_not_ends_with_nocase?: InputMaybe;\n token_not_in?: InputMaybe>;\n token_not_starts_with?: InputMaybe;\n token_not_starts_with_nocase?: InputMaybe;\n token_starts_with?: InputMaybe;\n token_starts_with_nocase?: InputMaybe;\n totalBalanceNotional?: InputMaybe;\n totalBalanceNotional_gt?: InputMaybe;\n totalBalanceNotional_gte?: InputMaybe;\n totalBalanceNotional_in?: InputMaybe>;\n totalBalanceNotional_lt?: InputMaybe;\n totalBalanceNotional_lte?: InputMaybe;\n totalBalanceNotional_not?: InputMaybe;\n totalBalanceNotional_not_in?: InputMaybe>;\n totalBalanceUSD?: InputMaybe;\n totalBalanceUSD_gt?: InputMaybe;\n totalBalanceUSD_gte?: InputMaybe;\n totalBalanceUSD_in?: InputMaybe>;\n totalBalanceUSD_lt?: InputMaybe;\n totalBalanceUSD_lte?: InputMaybe;\n totalBalanceUSD_not?: InputMaybe;\n totalBalanceUSD_not_in?: InputMaybe>;\n totalSwapCount?: InputMaybe;\n totalSwapCount_gt?: InputMaybe;\n totalSwapCount_gte?: InputMaybe;\n totalSwapCount_in?: InputMaybe>;\n totalSwapCount_lt?: InputMaybe;\n totalSwapCount_lte?: InputMaybe;\n totalSwapCount_not?: InputMaybe;\n totalSwapCount_not_in?: InputMaybe>;\n totalVolumeNotional?: InputMaybe;\n totalVolumeNotional_gt?: InputMaybe;\n totalVolumeNotional_gte?: InputMaybe;\n totalVolumeNotional_in?: InputMaybe>;\n totalVolumeNotional_lt?: InputMaybe;\n totalVolumeNotional_lte?: InputMaybe;\n totalVolumeNotional_not?: InputMaybe;\n totalVolumeNotional_not_in?: InputMaybe>;\n totalVolumeUSD?: InputMaybe;\n totalVolumeUSD_gt?: InputMaybe;\n totalVolumeUSD_gte?: InputMaybe;\n totalVolumeUSD_in?: InputMaybe>;\n totalVolumeUSD_lt?: InputMaybe;\n totalVolumeUSD_lte?: InputMaybe;\n totalVolumeUSD_not?: InputMaybe;\n totalVolumeUSD_not_in?: InputMaybe>;\n};\n\nexport enum TokenSnapshot_OrderBy {\n Id = 'id',\n Timestamp = 'timestamp',\n Token = 'token',\n TokenAddress = 'token__address',\n TokenDecimals = 'token__decimals',\n TokenFxOracleDecimals = 'token__fxOracleDecimals',\n TokenId = 'token__id',\n TokenLatestFxPrice = 'token__latestFXPrice',\n TokenLatestUsdPrice = 'token__latestUSDPrice',\n TokenLatestUsdPriceTimestamp = 'token__latestUSDPriceTimestamp',\n TokenName = 'token__name',\n TokenSymbol = 'token__symbol',\n TokenTotalBalanceNotional = 'token__totalBalanceNotional',\n TokenTotalBalanceUsd = 'token__totalBalanceUSD',\n TokenTotalSwapCount = 'token__totalSwapCount',\n TokenTotalVolumeNotional = 'token__totalVolumeNotional',\n TokenTotalVolumeUsd = 'token__totalVolumeUSD',\n TotalBalanceNotional = 'totalBalanceNotional',\n TotalBalanceUsd = 'totalBalanceUSD',\n TotalSwapCount = 'totalSwapCount',\n TotalVolumeNotional = 'totalVolumeNotional',\n TotalVolumeUsd = 'totalVolumeUSD'\n}\n\nexport type Token_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_contains_nocase?: InputMaybe;\n address_ends_with?: InputMaybe;\n address_ends_with_nocase?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_contains_nocase?: InputMaybe;\n address_not_ends_with?: InputMaybe;\n address_not_ends_with_nocase?: InputMaybe;\n address_not_in?: InputMaybe>;\n address_not_starts_with?: InputMaybe;\n address_not_starts_with_nocase?: InputMaybe;\n address_starts_with?: InputMaybe;\n address_starts_with_nocase?: InputMaybe;\n and?: InputMaybe>>;\n decimals?: InputMaybe;\n decimals_gt?: InputMaybe;\n decimals_gte?: InputMaybe;\n decimals_in?: InputMaybe>;\n decimals_lt?: InputMaybe;\n decimals_lte?: InputMaybe;\n decimals_not?: InputMaybe;\n decimals_not_in?: InputMaybe>;\n fxOracleDecimals?: InputMaybe;\n fxOracleDecimals_gt?: InputMaybe;\n fxOracleDecimals_gte?: InputMaybe;\n fxOracleDecimals_in?: InputMaybe>;\n fxOracleDecimals_lt?: InputMaybe;\n fxOracleDecimals_lte?: InputMaybe;\n fxOracleDecimals_not?: InputMaybe;\n fxOracleDecimals_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n latestFXPrice?: InputMaybe;\n latestFXPrice_gt?: InputMaybe;\n latestFXPrice_gte?: InputMaybe;\n latestFXPrice_in?: InputMaybe>;\n latestFXPrice_lt?: InputMaybe;\n latestFXPrice_lte?: InputMaybe;\n latestFXPrice_not?: InputMaybe;\n latestFXPrice_not_in?: InputMaybe>;\n latestPrice?: InputMaybe;\n latestPrice_?: InputMaybe;\n latestPrice_contains?: InputMaybe;\n latestPrice_contains_nocase?: InputMaybe;\n latestPrice_ends_with?: InputMaybe;\n latestPrice_ends_with_nocase?: InputMaybe;\n latestPrice_gt?: InputMaybe;\n latestPrice_gte?: InputMaybe;\n latestPrice_in?: InputMaybe>;\n latestPrice_lt?: InputMaybe;\n latestPrice_lte?: InputMaybe;\n latestPrice_not?: InputMaybe;\n latestPrice_not_contains?: InputMaybe;\n latestPrice_not_contains_nocase?: InputMaybe;\n latestPrice_not_ends_with?: InputMaybe;\n latestPrice_not_ends_with_nocase?: InputMaybe;\n latestPrice_not_in?: InputMaybe>;\n latestPrice_not_starts_with?: InputMaybe;\n latestPrice_not_starts_with_nocase?: InputMaybe;\n latestPrice_starts_with?: InputMaybe;\n latestPrice_starts_with_nocase?: InputMaybe;\n latestUSDPrice?: InputMaybe;\n latestUSDPriceTimestamp?: InputMaybe;\n latestUSDPriceTimestamp_gt?: InputMaybe;\n latestUSDPriceTimestamp_gte?: InputMaybe;\n latestUSDPriceTimestamp_in?: InputMaybe>;\n latestUSDPriceTimestamp_lt?: InputMaybe;\n latestUSDPriceTimestamp_lte?: InputMaybe;\n latestUSDPriceTimestamp_not?: InputMaybe;\n latestUSDPriceTimestamp_not_in?: InputMaybe>;\n latestUSDPrice_gt?: InputMaybe;\n latestUSDPrice_gte?: InputMaybe;\n latestUSDPrice_in?: InputMaybe>;\n latestUSDPrice_lt?: InputMaybe;\n latestUSDPrice_lte?: InputMaybe;\n latestUSDPrice_not?: InputMaybe;\n latestUSDPrice_not_in?: InputMaybe>;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n totalBalanceNotional?: InputMaybe;\n totalBalanceNotional_gt?: InputMaybe;\n totalBalanceNotional_gte?: InputMaybe;\n totalBalanceNotional_in?: InputMaybe>;\n totalBalanceNotional_lt?: InputMaybe;\n totalBalanceNotional_lte?: InputMaybe;\n totalBalanceNotional_not?: InputMaybe;\n totalBalanceNotional_not_in?: InputMaybe>;\n totalBalanceUSD?: InputMaybe;\n totalBalanceUSD_gt?: InputMaybe;\n totalBalanceUSD_gte?: InputMaybe;\n totalBalanceUSD_in?: InputMaybe>;\n totalBalanceUSD_lt?: InputMaybe;\n totalBalanceUSD_lte?: InputMaybe;\n totalBalanceUSD_not?: InputMaybe;\n totalBalanceUSD_not_in?: InputMaybe>;\n totalSwapCount?: InputMaybe;\n totalSwapCount_gt?: InputMaybe;\n totalSwapCount_gte?: InputMaybe;\n totalSwapCount_in?: InputMaybe>;\n totalSwapCount_lt?: InputMaybe;\n totalSwapCount_lte?: InputMaybe;\n totalSwapCount_not?: InputMaybe;\n totalSwapCount_not_in?: InputMaybe>;\n totalVolumeNotional?: InputMaybe;\n totalVolumeNotional_gt?: InputMaybe;\n totalVolumeNotional_gte?: InputMaybe;\n totalVolumeNotional_in?: InputMaybe>;\n totalVolumeNotional_lt?: InputMaybe;\n totalVolumeNotional_lte?: InputMaybe;\n totalVolumeNotional_not?: InputMaybe;\n totalVolumeNotional_not_in?: InputMaybe>;\n totalVolumeUSD?: InputMaybe;\n totalVolumeUSD_gt?: InputMaybe;\n totalVolumeUSD_gte?: InputMaybe;\n totalVolumeUSD_in?: InputMaybe>;\n totalVolumeUSD_lt?: InputMaybe;\n totalVolumeUSD_lte?: InputMaybe;\n totalVolumeUSD_not?: InputMaybe;\n totalVolumeUSD_not_in?: InputMaybe>;\n};\n\nexport enum Token_OrderBy {\n Address = 'address',\n Decimals = 'decimals',\n FxOracleDecimals = 'fxOracleDecimals',\n Id = 'id',\n LatestFxPrice = 'latestFXPrice',\n LatestPrice = 'latestPrice',\n LatestPriceAsset = 'latestPrice__asset',\n LatestPriceBlock = 'latestPrice__block',\n LatestPriceId = 'latestPrice__id',\n LatestPricePrice = 'latestPrice__price',\n LatestPricePricingAsset = 'latestPrice__pricingAsset',\n LatestUsdPrice = 'latestUSDPrice',\n LatestUsdPriceTimestamp = 'latestUSDPriceTimestamp',\n Name = 'name',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n Symbol = 'symbol',\n TotalBalanceNotional = 'totalBalanceNotional',\n TotalBalanceUsd = 'totalBalanceUSD',\n TotalSwapCount = 'totalSwapCount',\n TotalVolumeNotional = 'totalVolumeNotional',\n TotalVolumeUsd = 'totalVolumeUSD'\n}\n\nexport type TradePair = {\n __typename?: 'TradePair';\n /** Token Address - Token Address */\n id: Scalars['ID'];\n token0: Token;\n token1: Token;\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n};\n\nexport type TradePairSnapshot = {\n __typename?: 'TradePairSnapshot';\n id: Scalars['ID'];\n pair: TradePair;\n timestamp: Scalars['Int'];\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n};\n\nexport type TradePairSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pair?: InputMaybe;\n pair_?: InputMaybe;\n pair_contains?: InputMaybe;\n pair_contains_nocase?: InputMaybe;\n pair_ends_with?: InputMaybe;\n pair_ends_with_nocase?: InputMaybe;\n pair_gt?: InputMaybe;\n pair_gte?: InputMaybe;\n pair_in?: InputMaybe>;\n pair_lt?: InputMaybe;\n pair_lte?: InputMaybe;\n pair_not?: InputMaybe;\n pair_not_contains?: InputMaybe;\n pair_not_contains_nocase?: InputMaybe;\n pair_not_ends_with?: InputMaybe;\n pair_not_ends_with_nocase?: InputMaybe;\n pair_not_in?: InputMaybe>;\n pair_not_starts_with?: InputMaybe;\n pair_not_starts_with_nocase?: InputMaybe;\n pair_starts_with?: InputMaybe;\n pair_starts_with_nocase?: InputMaybe;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n};\n\nexport enum TradePairSnapshot_OrderBy {\n Id = 'id',\n Pair = 'pair',\n PairId = 'pair__id',\n PairTotalSwapFee = 'pair__totalSwapFee',\n PairTotalSwapVolume = 'pair__totalSwapVolume',\n Timestamp = 'timestamp',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume'\n}\n\nexport type TradePair_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n token0?: InputMaybe;\n token0_?: InputMaybe;\n token0_contains?: InputMaybe;\n token0_contains_nocase?: InputMaybe;\n token0_ends_with?: InputMaybe;\n token0_ends_with_nocase?: InputMaybe;\n token0_gt?: InputMaybe;\n token0_gte?: InputMaybe;\n token0_in?: InputMaybe>;\n token0_lt?: InputMaybe;\n token0_lte?: InputMaybe;\n token0_not?: InputMaybe;\n token0_not_contains?: InputMaybe;\n token0_not_contains_nocase?: InputMaybe;\n token0_not_ends_with?: InputMaybe;\n token0_not_ends_with_nocase?: InputMaybe;\n token0_not_in?: InputMaybe>;\n token0_not_starts_with?: InputMaybe;\n token0_not_starts_with_nocase?: InputMaybe;\n token0_starts_with?: InputMaybe;\n token0_starts_with_nocase?: InputMaybe;\n token1?: InputMaybe;\n token1_?: InputMaybe;\n token1_contains?: InputMaybe;\n token1_contains_nocase?: InputMaybe;\n token1_ends_with?: InputMaybe;\n token1_ends_with_nocase?: InputMaybe;\n token1_gt?: InputMaybe;\n token1_gte?: InputMaybe;\n token1_in?: InputMaybe>;\n token1_lt?: InputMaybe;\n token1_lte?: InputMaybe;\n token1_not?: InputMaybe;\n token1_not_contains?: InputMaybe;\n token1_not_contains_nocase?: InputMaybe;\n token1_not_ends_with?: InputMaybe;\n token1_not_ends_with_nocase?: InputMaybe;\n token1_not_in?: InputMaybe>;\n token1_not_starts_with?: InputMaybe;\n token1_not_starts_with_nocase?: InputMaybe;\n token1_starts_with?: InputMaybe;\n token1_starts_with_nocase?: InputMaybe;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n};\n\nexport enum TradePair_OrderBy {\n Id = 'id',\n Token0 = 'token0',\n Token0Address = 'token0__address',\n Token0Decimals = 'token0__decimals',\n Token0FxOracleDecimals = 'token0__fxOracleDecimals',\n Token0Id = 'token0__id',\n Token0LatestFxPrice = 'token0__latestFXPrice',\n Token0LatestUsdPrice = 'token0__latestUSDPrice',\n Token0LatestUsdPriceTimestamp = 'token0__latestUSDPriceTimestamp',\n Token0Name = 'token0__name',\n Token0Symbol = 'token0__symbol',\n Token0TotalBalanceNotional = 'token0__totalBalanceNotional',\n Token0TotalBalanceUsd = 'token0__totalBalanceUSD',\n Token0TotalSwapCount = 'token0__totalSwapCount',\n Token0TotalVolumeNotional = 'token0__totalVolumeNotional',\n Token0TotalVolumeUsd = 'token0__totalVolumeUSD',\n Token1 = 'token1',\n Token1Address = 'token1__address',\n Token1Decimals = 'token1__decimals',\n Token1FxOracleDecimals = 'token1__fxOracleDecimals',\n Token1Id = 'token1__id',\n Token1LatestFxPrice = 'token1__latestFXPrice',\n Token1LatestUsdPrice = 'token1__latestUSDPrice',\n Token1LatestUsdPriceTimestamp = 'token1__latestUSDPriceTimestamp',\n Token1Name = 'token1__name',\n Token1Symbol = 'token1__symbol',\n Token1TotalBalanceNotional = 'token1__totalBalanceNotional',\n Token1TotalBalanceUsd = 'token1__totalBalanceUSD',\n Token1TotalSwapCount = 'token1__totalSwapCount',\n Token1TotalVolumeNotional = 'token1__totalVolumeNotional',\n Token1TotalVolumeUsd = 'token1__totalVolumeUSD',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume'\n}\n\nexport type User = {\n __typename?: 'User';\n id: Scalars['ID'];\n sharesOwned?: Maybe>;\n swaps?: Maybe>;\n userInternalBalances?: Maybe>;\n};\n\n\nexport type UserSharesOwnedArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserSwapsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserUserInternalBalancesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type UserInternalBalance = {\n __typename?: 'UserInternalBalance';\n balance: Scalars['BigDecimal'];\n id: Scalars['ID'];\n token: Scalars['Bytes'];\n tokenInfo?: Maybe;\n userAddress?: Maybe;\n};\n\nexport type UserInternalBalance_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n balance?: InputMaybe;\n balance_gt?: InputMaybe;\n balance_gte?: InputMaybe;\n balance_in?: InputMaybe>;\n balance_lt?: InputMaybe;\n balance_lte?: InputMaybe;\n balance_not?: InputMaybe;\n balance_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n token?: InputMaybe;\n tokenInfo?: InputMaybe;\n tokenInfo_?: InputMaybe;\n tokenInfo_contains?: InputMaybe;\n tokenInfo_contains_nocase?: InputMaybe;\n tokenInfo_ends_with?: InputMaybe;\n tokenInfo_ends_with_nocase?: InputMaybe;\n tokenInfo_gt?: InputMaybe;\n tokenInfo_gte?: InputMaybe;\n tokenInfo_in?: InputMaybe>;\n tokenInfo_lt?: InputMaybe;\n tokenInfo_lte?: InputMaybe;\n tokenInfo_not?: InputMaybe;\n tokenInfo_not_contains?: InputMaybe;\n tokenInfo_not_contains_nocase?: InputMaybe;\n tokenInfo_not_ends_with?: InputMaybe;\n tokenInfo_not_ends_with_nocase?: InputMaybe;\n tokenInfo_not_in?: InputMaybe>;\n tokenInfo_not_starts_with?: InputMaybe;\n tokenInfo_not_starts_with_nocase?: InputMaybe;\n tokenInfo_starts_with?: InputMaybe;\n tokenInfo_starts_with_nocase?: InputMaybe;\n token_contains?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_in?: InputMaybe>;\n userAddress?: InputMaybe;\n userAddress_?: InputMaybe;\n userAddress_contains?: InputMaybe;\n userAddress_contains_nocase?: InputMaybe;\n userAddress_ends_with?: InputMaybe;\n userAddress_ends_with_nocase?: InputMaybe;\n userAddress_gt?: InputMaybe;\n userAddress_gte?: InputMaybe;\n userAddress_in?: InputMaybe>;\n userAddress_lt?: InputMaybe;\n userAddress_lte?: InputMaybe;\n userAddress_not?: InputMaybe;\n userAddress_not_contains?: InputMaybe;\n userAddress_not_contains_nocase?: InputMaybe;\n userAddress_not_ends_with?: InputMaybe;\n userAddress_not_ends_with_nocase?: InputMaybe;\n userAddress_not_in?: InputMaybe>;\n userAddress_not_starts_with?: InputMaybe;\n userAddress_not_starts_with_nocase?: InputMaybe;\n userAddress_starts_with?: InputMaybe;\n userAddress_starts_with_nocase?: InputMaybe;\n};\n\nexport enum UserInternalBalance_OrderBy {\n Balance = 'balance',\n Id = 'id',\n Token = 'token',\n TokenInfo = 'tokenInfo',\n TokenInfoAddress = 'tokenInfo__address',\n TokenInfoDecimals = 'tokenInfo__decimals',\n TokenInfoFxOracleDecimals = 'tokenInfo__fxOracleDecimals',\n TokenInfoId = 'tokenInfo__id',\n TokenInfoLatestFxPrice = 'tokenInfo__latestFXPrice',\n TokenInfoLatestUsdPrice = 'tokenInfo__latestUSDPrice',\n TokenInfoLatestUsdPriceTimestamp = 'tokenInfo__latestUSDPriceTimestamp',\n TokenInfoName = 'tokenInfo__name',\n TokenInfoSymbol = 'tokenInfo__symbol',\n TokenInfoTotalBalanceNotional = 'tokenInfo__totalBalanceNotional',\n TokenInfoTotalBalanceUsd = 'tokenInfo__totalBalanceUSD',\n TokenInfoTotalSwapCount = 'tokenInfo__totalSwapCount',\n TokenInfoTotalVolumeNotional = 'tokenInfo__totalVolumeNotional',\n TokenInfoTotalVolumeUsd = 'tokenInfo__totalVolumeUSD',\n UserAddress = 'userAddress',\n UserAddressId = 'userAddress__id'\n}\n\nexport type User_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n sharesOwned_?: InputMaybe;\n swaps_?: InputMaybe;\n userInternalBalances_?: InputMaybe;\n};\n\nexport enum User_OrderBy {\n Id = 'id',\n SharesOwned = 'sharesOwned',\n Swaps = 'swaps',\n UserInternalBalances = 'userInternalBalances'\n}\n\nexport type _Block_ = {\n __typename?: '_Block_';\n /** The hash of the block */\n hash?: Maybe;\n /** The block number */\n number: Scalars['Int'];\n /** Integer representation of the timestamp stored in blocks for the chain */\n timestamp?: Maybe;\n};\n\n/** The type for the top-level _meta field */\nexport type _Meta_ = {\n __typename?: '_Meta_';\n /**\n * Information about a specific subgraph block. The hash of the block\n * will be null if the _meta field has a block constraint that asks for\n * a block number. It will be filled if the _meta field has no block constraint\n * and therefore asks for the latest block\n *\n */\n block: _Block_;\n /** The deployment ID */\n deployment: Scalars['String'];\n /** If `true`, the subgraph encountered indexing errors at some past block */\n hasIndexingErrors: Scalars['Boolean'];\n};\n\nexport enum _SubgraphErrorPolicy_ {\n /** Data will be returned even if the subgraph has indexing errors */\n Allow = 'allow',\n /** If the subgraph has indexing errors, data will be omitted. The default. */\n Deny = 'deny'\n}\n\nexport type PoolShareQueryVariables = Exact<{\n id: Scalars['ID'];\n block?: InputMaybe;\n}>;\n\n\nexport type PoolShareQuery = { __typename?: 'Query', poolShare?: { __typename?: 'PoolShare', id: string, balance: string, userAddress: { __typename?: 'User', id: string }, poolId: { __typename?: 'Pool', id: string, address: string } } | null };\n\nexport type PoolSharesQueryVariables = Exact<{\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolSharesQuery = { __typename?: 'Query', poolShares: Array<{ __typename?: 'PoolShare', id: string, balance: string, userAddress: { __typename?: 'User', id: string }, poolId: { __typename?: 'Pool', id: string, address: string } }> };\n\nexport type SubgraphPoolShareFragment = { __typename?: 'PoolShare', id: string, balance: string, userAddress: { __typename?: 'User', id: string }, poolId: { __typename?: 'Pool', id: string, address: string } };\n\nexport type PoolsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolsQuery = { __typename?: 'Query', pools: Array<{ __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null }> };\n\nexport type AllPoolsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type AllPoolsQuery = { __typename?: 'Query', pool0: Array<{ __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null }>, pool1000: Array<{ __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null }>, pool2000: Array<{ __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null }> };\n\nexport type PoolQueryVariables = Exact<{\n id: Scalars['ID'];\n block?: InputMaybe;\n}>;\n\n\nexport type PoolQuery = { __typename?: 'Query', pool?: { __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null } | null };\n\nexport type SubgraphPoolFragment = { __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null };\n\nexport type SubgraphPoolTokenFragment = { __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } };\n\nexport type SubgraphSubPoolTokenFragment = { __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null };\n\nexport type TokenAttrsFragment = { __typename?: 'Token', address: string, symbol?: string | null, decimals: number };\n\nexport type SubgraphSubPoolFragment = { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null };\n\nexport type TokenTreeFragment = { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null };\n\nexport type SubgraphPriceRateProviderFragment = { __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } };\n\nexport type PoolHistoricalLiquiditiesQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolHistoricalLiquiditiesQuery = { __typename?: 'Query', poolHistoricalLiquidities: Array<{ __typename?: 'PoolHistoricalLiquidity', id: string, poolTotalShares: string, poolLiquidity: string, poolShareValue: string, pricingAsset: string, block: string, poolId: { __typename?: 'Pool', id: string } }> };\n\nexport type PoolSnapshotsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolSnapshotsQuery = { __typename?: 'Query', poolSnapshots: Array<{ __typename?: 'PoolSnapshot', id: string, totalShares: string, swapVolume: string, swapFees: string, timestamp: number, pool: { __typename?: 'Pool', id: string } }> };\n\nexport type SubgraphPoolSnapshotFragment = { __typename?: 'PoolSnapshot', id: string, totalShares: string, swapVolume: string, swapFees: string, timestamp: number, pool: { __typename?: 'Pool', id: string } };\n\nexport type JoinExitsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type JoinExitsQuery = { __typename?: 'Query', joinExits: Array<{ __typename?: 'JoinExit', amounts: Array, id: string, sender: string, timestamp: number, tx: string, type: InvestType, user: { __typename?: 'User', id: string }, pool: { __typename?: 'Pool', id: string, tokensList: Array } }> };\n\nexport type SubgraphJoinExitFragment = { __typename?: 'JoinExit', amounts: Array, id: string, sender: string, timestamp: number, tx: string, type: InvestType, user: { __typename?: 'User', id: string }, pool: { __typename?: 'Pool', id: string, tokensList: Array } };\n\nexport type BalancersQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type BalancersQuery = { __typename?: 'Query', balancers: Array<{ __typename?: 'Balancer', id: string, totalLiquidity: string, totalSwapVolume: string, totalSwapFee: string, totalSwapCount: string, poolCount: number }> };\n\nexport type SubgraphBalancerFragment = { __typename?: 'Balancer', id: string, totalLiquidity: string, totalSwapVolume: string, totalSwapFee: string, totalSwapCount: string, poolCount: number };\n\nexport type TokenPricesQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type TokenPricesQuery = { __typename?: 'Query', tokenPrices: Array<{ __typename?: 'TokenPrice', id: string, asset: string, amount: string, pricingAsset: string, price: string, block: string, timestamp: number, poolId: { __typename?: 'Pool', id: string } }> };\n\nexport type SubgraphTokenPriceFragment = { __typename?: 'TokenPrice', id: string, asset: string, amount: string, pricingAsset: string, price: string, block: string, timestamp: number, poolId: { __typename?: 'Pool', id: string } };\n\nexport type TokenLatestPricesQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type TokenLatestPricesQuery = { __typename?: 'Query', latestPrices: Array<{ __typename?: 'LatestPrice', id: string, asset: string, price: string, pricingAsset: string, poolId: { __typename?: 'Pool', id: string } }> };\n\nexport type TokenLatestPriceQueryVariables = Exact<{\n id: Scalars['ID'];\n}>;\n\n\nexport type TokenLatestPriceQuery = { __typename?: 'Query', latestPrice?: { __typename?: 'LatestPrice', id: string, asset: string, price: string, pricingAsset: string, poolId: { __typename?: 'Pool', id: string } } | null };\n\nexport type SubgraphTokenLatestPriceFragment = { __typename?: 'LatestPrice', id: string, asset: string, price: string, pricingAsset: string, poolId: { __typename?: 'Pool', id: string } };\n\nexport type UserQueryVariables = Exact<{\n id: Scalars['ID'];\n block?: InputMaybe;\n}>;\n\n\nexport type UserQuery = { __typename?: 'Query', user?: { __typename?: 'User', id: string, sharesOwned?: Array<{ __typename?: 'PoolShare', balance: string, poolId: { __typename?: 'Pool', id: string } }> | null } | null };\n\nexport type UsersQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type UsersQuery = { __typename?: 'Query', users: Array<{ __typename?: 'User', id: string, sharesOwned?: Array<{ __typename?: 'PoolShare', balance: string, poolId: { __typename?: 'Pool', id: string } }> | null }> };\n\nexport type SubgraphUserFragment = { __typename?: 'User', id: string, sharesOwned?: Array<{ __typename?: 'PoolShare', balance: string, poolId: { __typename?: 'Pool', id: string } }> | null };\n\nexport const SubgraphPoolShareFragmentDoc = gql`\n fragment SubgraphPoolShare on PoolShare {\n id\n balance\n userAddress {\n id\n }\n poolId {\n id\n address\n }\n}\n `;\nexport const SubgraphSubPoolFragmentDoc = gql`\n fragment SubgraphSubPool on Pool {\n id\n totalShares\n address\n poolType\n mainIndex\n}\n `;\nexport const SubgraphSubPoolTokenFragmentDoc = gql`\n fragment SubgraphSubPoolToken on PoolToken {\n address\n balance\n weight\n priceRate\n symbol\n decimals\n isExemptFromYieldProtocolFee\n}\n `;\nexport const TokenTreeFragmentDoc = gql`\n fragment TokenTree on Token {\n latestUSDPrice\n latestFXPrice\n pool {\n ...SubgraphSubPool\n tokens(first: 100, orderBy: index) {\n ...SubgraphSubPoolToken\n token {\n latestUSDPrice\n pool {\n ...SubgraphSubPool\n tokens(first: 100, orderBy: index) {\n ...SubgraphSubPoolToken\n token {\n latestUSDPrice\n pool {\n ...SubgraphSubPool\n }\n }\n }\n }\n }\n }\n }\n}\n ${SubgraphSubPoolFragmentDoc}\n${SubgraphSubPoolTokenFragmentDoc}`;\nexport const SubgraphPoolTokenFragmentDoc = gql`\n fragment SubgraphPoolToken on PoolToken {\n id\n symbol\n name\n decimals\n address\n balance\n managedBalance\n weight\n priceRate\n isExemptFromYieldProtocolFee\n token {\n ...TokenTree\n }\n}\n ${TokenTreeFragmentDoc}`;\nexport const SubgraphPriceRateProviderFragmentDoc = gql`\n fragment SubgraphPriceRateProvider on PriceRateProvider {\n address\n token {\n address\n }\n}\n `;\nexport const SubgraphPoolFragmentDoc = gql`\n fragment SubgraphPool on Pool {\n id\n address\n poolType\n poolTypeVersion\n factory\n strategyType\n symbol\n name\n swapEnabled\n swapFee\n protocolYieldFeeCache\n protocolSwapFeeCache\n owner\n totalWeight\n totalSwapVolume\n totalSwapFee\n totalLiquidity\n totalShares\n tokens(first: 100, orderBy: index) {\n ...SubgraphPoolToken\n }\n swapsCount\n holdersCount\n tokensList\n amp\n priceRateProviders(first: 100) {\n ...SubgraphPriceRateProvider\n }\n expiryTime\n unitSeconds\n createTime\n principalToken\n baseToken\n wrappedIndex\n mainIndex\n lowerTarget\n upperTarget\n sqrtAlpha\n sqrtBeta\n root3Alpha\n isInRecoveryMode\n isPaused\n alpha\n beta\n c\n s\n lambda\n tauAlphaX\n tauAlphaY\n tauBetaX\n tauBetaY\n u\n v\n w\n z\n dSq\n delta\n epsilon\n}\n ${SubgraphPoolTokenFragmentDoc}\n${SubgraphPriceRateProviderFragmentDoc}`;\nexport const TokenAttrsFragmentDoc = gql`\n fragment TokenAttrs on Token {\n address\n symbol\n decimals\n}\n `;\nexport const SubgraphPoolSnapshotFragmentDoc = gql`\n fragment SubgraphPoolSnapshot on PoolSnapshot {\n id\n pool {\n id\n }\n totalShares\n swapVolume\n swapFees\n timestamp\n}\n `;\nexport const SubgraphJoinExitFragmentDoc = gql`\n fragment SubgraphJoinExit on JoinExit {\n amounts\n id\n sender\n timestamp\n tx\n type\n user {\n id\n }\n pool {\n id\n tokensList\n }\n}\n `;\nexport const SubgraphBalancerFragmentDoc = gql`\n fragment SubgraphBalancer on Balancer {\n id\n totalLiquidity\n totalSwapVolume\n totalSwapFee\n totalSwapCount\n poolCount\n}\n `;\nexport const SubgraphTokenPriceFragmentDoc = gql`\n fragment SubgraphTokenPrice on TokenPrice {\n id\n poolId {\n id\n }\n asset\n amount\n pricingAsset\n price\n block\n timestamp\n}\n `;\nexport const SubgraphTokenLatestPriceFragmentDoc = gql`\n fragment SubgraphTokenLatestPrice on LatestPrice {\n id\n asset\n price\n poolId {\n id\n }\n pricingAsset\n}\n `;\nexport const SubgraphUserFragmentDoc = gql`\n fragment SubgraphUser on User {\n id\n sharesOwned(first: 1000) {\n balance\n poolId {\n id\n }\n }\n}\n `;\nexport const PoolShareDocument = gql`\n query PoolShare($id: ID!, $block: Block_height) {\n poolShare(id: $id, block: $block) {\n ...SubgraphPoolShare\n }\n}\n ${SubgraphPoolShareFragmentDoc}`;\nexport const PoolSharesDocument = gql`\n query PoolShares($first: Int, $orderBy: PoolShare_orderBy, $orderDirection: OrderDirection, $skip: Int, $where: PoolShare_filter, $block: Block_height) {\n poolShares(\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n skip: $skip\n where: $where\n block: $block\n ) {\n ...SubgraphPoolShare\n }\n}\n ${SubgraphPoolShareFragmentDoc}`;\nexport const PoolsDocument = gql`\n query Pools($skip: Int, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter, $block: Block_height) {\n pools(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPool\n }\n}\n ${SubgraphPoolFragmentDoc}`;\nexport const AllPoolsDocument = gql`\n query AllPools($skip: Int, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter, $block: Block_height) {\n pool0: pools(\n first: 1000\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPool\n }\n pool1000: pools(\n first: 1000\n skip: 1000\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPool\n }\n pool2000: pools(\n first: 1000\n skip: 2000\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPool\n }\n}\n ${SubgraphPoolFragmentDoc}`;\nexport const PoolDocument = gql`\n query Pool($id: ID!, $block: Block_height) {\n pool(id: $id, block: $block) {\n ...SubgraphPool\n }\n}\n ${SubgraphPoolFragmentDoc}`;\nexport const PoolHistoricalLiquiditiesDocument = gql`\n query PoolHistoricalLiquidities($skip: Int, $first: Int, $orderBy: PoolHistoricalLiquidity_orderBy, $orderDirection: OrderDirection, $where: PoolHistoricalLiquidity_filter, $block: Block_height) {\n poolHistoricalLiquidities(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n id\n poolId {\n id\n }\n poolTotalShares\n poolLiquidity\n poolShareValue\n pricingAsset\n block\n }\n}\n `;\nexport const PoolSnapshotsDocument = gql`\n query PoolSnapshots($skip: Int, $first: Int, $orderBy: PoolSnapshot_orderBy, $orderDirection: OrderDirection, $where: PoolSnapshot_filter, $block: Block_height) {\n poolSnapshots(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPoolSnapshot\n }\n}\n ${SubgraphPoolSnapshotFragmentDoc}`;\nexport const JoinExitsDocument = gql`\n query JoinExits($skip: Int, $first: Int, $orderBy: JoinExit_orderBy, $orderDirection: OrderDirection, $where: JoinExit_filter, $block: Block_height) {\n joinExits(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphJoinExit\n }\n}\n ${SubgraphJoinExitFragmentDoc}`;\nexport const BalancersDocument = gql`\n query Balancers($skip: Int, $first: Int, $orderBy: Balancer_orderBy, $orderDirection: OrderDirection, $where: Balancer_filter, $block: Block_height) {\n balancers(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphBalancer\n }\n}\n ${SubgraphBalancerFragmentDoc}`;\nexport const TokenPricesDocument = gql`\n query TokenPrices($skip: Int, $first: Int, $orderBy: TokenPrice_orderBy, $orderDirection: OrderDirection, $where: TokenPrice_filter, $block: Block_height) {\n tokenPrices(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphTokenPrice\n }\n}\n ${SubgraphTokenPriceFragmentDoc}`;\nexport const TokenLatestPricesDocument = gql`\n query TokenLatestPrices($skip: Int, $first: Int, $orderBy: LatestPrice_orderBy, $orderDirection: OrderDirection, $where: LatestPrice_filter, $block: Block_height) {\n latestPrices(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphTokenLatestPrice\n }\n}\n ${SubgraphTokenLatestPriceFragmentDoc}`;\nexport const TokenLatestPriceDocument = gql`\n query TokenLatestPrice($id: ID!) {\n latestPrice(id: $id) {\n ...SubgraphTokenLatestPrice\n }\n}\n ${SubgraphTokenLatestPriceFragmentDoc}`;\nexport const UserDocument = gql`\n query User($id: ID!, $block: Block_height) {\n user(id: $id, block: $block) {\n ...SubgraphUser\n }\n}\n ${SubgraphUserFragmentDoc}`;\nexport const UsersDocument = gql`\n query Users($skip: Int, $first: Int, $orderBy: User_orderBy, $orderDirection: OrderDirection, $where: User_filter, $block: Block_height) {\n users(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphUser\n }\n}\n ${SubgraphUserFragmentDoc}`;\n\nexport type SdkFunctionWrapper = (action: (requestHeaders?:Record) => Promise, operationName: string, operationType?: string) => Promise;\n\n\nconst defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action();\n\nexport function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) {\n return {\n PoolShare(variables: PoolShareQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolShareDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolShare', 'query');\n },\n PoolShares(variables?: PoolSharesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolSharesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolShares', 'query');\n },\n Pools(variables?: PoolsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Pools', 'query');\n },\n AllPools(variables?: AllPoolsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(AllPoolsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'AllPools', 'query');\n },\n Pool(variables: PoolQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Pool', 'query');\n },\n PoolHistoricalLiquidities(variables?: PoolHistoricalLiquiditiesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolHistoricalLiquiditiesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolHistoricalLiquidities', 'query');\n },\n PoolSnapshots(variables?: PoolSnapshotsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolSnapshotsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolSnapshots', 'query');\n },\n JoinExits(variables?: JoinExitsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(JoinExitsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'JoinExits', 'query');\n },\n Balancers(variables?: BalancersQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(BalancersDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Balancers', 'query');\n },\n TokenPrices(variables?: TokenPricesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(TokenPricesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'TokenPrices', 'query');\n },\n TokenLatestPrices(variables?: TokenLatestPricesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(TokenLatestPricesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'TokenLatestPrices', 'query');\n },\n TokenLatestPrice(variables: TokenLatestPriceQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(TokenLatestPriceDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'TokenLatestPrice', 'query');\n },\n User(variables: UserQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(UserDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'User', 'query');\n },\n Users(variables?: UsersQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(UsersDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Users', 'query');\n }\n };\n}\nexport type Sdk = ReturnType;","import { GraphQLClient } from 'graphql-request';\nimport * as Dom from 'graphql-request/dist/types.dom';\nimport gql from 'graphql-tag';\nexport type Maybe = T | null;\nexport type InputMaybe = Maybe;\nexport type Exact = { [K in keyof T]: T[K] };\nexport type MakeOptional = Omit & { [SubKey in K]?: Maybe };\nexport type MakeMaybe = Omit & { [SubKey in K]: Maybe };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: string;\n String: string;\n Boolean: boolean;\n Int: number;\n Float: number;\n BigDecimal: string;\n BigInt: string;\n Bytes: string;\n Int8: any;\n};\n\nexport type BlockChangedFilter = {\n number_gte: Scalars['Int'];\n};\n\nexport type Block_Height = {\n hash?: InputMaybe;\n number?: InputMaybe;\n number_gte?: InputMaybe;\n};\n\nexport enum Chain {\n Arbitrum = 'Arbitrum',\n Avalanche = 'Avalanche',\n Base = 'Base',\n Gnosis = 'Gnosis',\n Optimism = 'Optimism',\n Polygon = 'Polygon',\n PolygonZkEvm = 'PolygonZkEvm'\n}\n\nexport type Gauge = {\n __typename?: 'Gauge';\n /** Timestamp at which Balancer DAO added the gauge to GaugeController [seconds] */\n addedTimestamp: Scalars['Int'];\n /** Address of the gauge */\n address: Scalars['Bytes'];\n /** Equal to: - */\n id: Scalars['ID'];\n /** Reference to LiquidityGauge */\n liquidityGauge?: Maybe;\n /** Reference to RootGauge */\n rootGauge?: Maybe;\n /** Type of the gauge */\n type: GaugeType;\n};\n\nexport type GaugeFactory = {\n __typename?: 'GaugeFactory';\n /** List of gauges created through the factory */\n gauges?: Maybe>;\n /** Factory contract address */\n id: Scalars['ID'];\n /** Number of gauges created through the factory */\n numGauges: Scalars['Int'];\n};\n\n\nexport type GaugeFactoryGaugesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type GaugeFactory_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n gauges_?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n numGauges?: InputMaybe;\n numGauges_gt?: InputMaybe;\n numGauges_gte?: InputMaybe;\n numGauges_in?: InputMaybe>;\n numGauges_lt?: InputMaybe;\n numGauges_lte?: InputMaybe;\n numGauges_not?: InputMaybe;\n numGauges_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n};\n\nexport enum GaugeFactory_OrderBy {\n gauges = 'gauges',\n id = 'id',\n numGauges = 'numGauges'\n}\n\nexport type GaugeShare = {\n __typename?: 'GaugeShare';\n /** User's balance of gauge deposit tokens */\n balance: Scalars['BigDecimal'];\n /** Reference to LiquidityGauge entity */\n gauge: LiquidityGauge;\n /** Equal to: - */\n id: Scalars['ID'];\n /** Reference to User entity */\n user: User;\n};\n\nexport type GaugeShare_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n balance?: InputMaybe;\n balance_gt?: InputMaybe;\n balance_gte?: InputMaybe;\n balance_in?: InputMaybe>;\n balance_lt?: InputMaybe;\n balance_lte?: InputMaybe;\n balance_not?: InputMaybe;\n balance_not_in?: InputMaybe>;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n};\n\nexport enum GaugeShare_OrderBy {\n balance = 'balance',\n gauge = 'gauge',\n gauge__id = 'gauge__id',\n gauge__isKilled = 'gauge__isKilled',\n gauge__isPreferentialGauge = 'gauge__isPreferentialGauge',\n gauge__poolAddress = 'gauge__poolAddress',\n gauge__poolId = 'gauge__poolId',\n gauge__relativeWeightCap = 'gauge__relativeWeightCap',\n gauge__streamer = 'gauge__streamer',\n gauge__symbol = 'gauge__symbol',\n gauge__totalSupply = 'gauge__totalSupply',\n id = 'id',\n user = 'user',\n user__id = 'user__id'\n}\n\nexport type GaugeType = {\n __typename?: 'GaugeType';\n /** Type ID */\n id: Scalars['ID'];\n /** Name of the type - empty string if call reverts */\n name: Scalars['String'];\n};\n\nexport type GaugeType_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n};\n\nexport enum GaugeType_OrderBy {\n id = 'id',\n name = 'name'\n}\n\nexport type GaugeVote = {\n __typename?: 'GaugeVote';\n /** Reference to Gauge entity */\n gauge: Gauge;\n /** Equal to: - */\n id: Scalars['ID'];\n /** Timestamp at which user voted [seconds] */\n timestamp?: Maybe;\n /** Reference to User entity */\n user: User;\n /** Weight of veBAL power user has used to vote */\n weight?: Maybe;\n};\n\nexport type GaugeVote_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n weight?: InputMaybe;\n weight_gt?: InputMaybe;\n weight_gte?: InputMaybe;\n weight_in?: InputMaybe>;\n weight_lt?: InputMaybe;\n weight_lte?: InputMaybe;\n weight_not?: InputMaybe;\n weight_not_in?: InputMaybe>;\n};\n\nexport enum GaugeVote_OrderBy {\n gauge = 'gauge',\n gauge__addedTimestamp = 'gauge__addedTimestamp',\n gauge__address = 'gauge__address',\n gauge__id = 'gauge__id',\n id = 'id',\n timestamp = 'timestamp',\n user = 'user',\n user__id = 'user__id',\n weight = 'weight'\n}\n\nexport type Gauge_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n addedTimestamp?: InputMaybe;\n addedTimestamp_gt?: InputMaybe;\n addedTimestamp_gte?: InputMaybe;\n addedTimestamp_in?: InputMaybe>;\n addedTimestamp_lt?: InputMaybe;\n addedTimestamp_lte?: InputMaybe;\n addedTimestamp_not?: InputMaybe;\n addedTimestamp_not_in?: InputMaybe>;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n liquidityGauge?: InputMaybe;\n liquidityGauge_?: InputMaybe;\n liquidityGauge_contains?: InputMaybe;\n liquidityGauge_contains_nocase?: InputMaybe;\n liquidityGauge_ends_with?: InputMaybe;\n liquidityGauge_ends_with_nocase?: InputMaybe;\n liquidityGauge_gt?: InputMaybe;\n liquidityGauge_gte?: InputMaybe;\n liquidityGauge_in?: InputMaybe>;\n liquidityGauge_lt?: InputMaybe;\n liquidityGauge_lte?: InputMaybe;\n liquidityGauge_not?: InputMaybe;\n liquidityGauge_not_contains?: InputMaybe;\n liquidityGauge_not_contains_nocase?: InputMaybe;\n liquidityGauge_not_ends_with?: InputMaybe;\n liquidityGauge_not_ends_with_nocase?: InputMaybe;\n liquidityGauge_not_in?: InputMaybe>;\n liquidityGauge_not_starts_with?: InputMaybe;\n liquidityGauge_not_starts_with_nocase?: InputMaybe;\n liquidityGauge_starts_with?: InputMaybe;\n liquidityGauge_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n rootGauge?: InputMaybe;\n rootGauge_?: InputMaybe;\n rootGauge_contains?: InputMaybe;\n rootGauge_contains_nocase?: InputMaybe;\n rootGauge_ends_with?: InputMaybe;\n rootGauge_ends_with_nocase?: InputMaybe;\n rootGauge_gt?: InputMaybe;\n rootGauge_gte?: InputMaybe;\n rootGauge_in?: InputMaybe>;\n rootGauge_lt?: InputMaybe;\n rootGauge_lte?: InputMaybe;\n rootGauge_not?: InputMaybe;\n rootGauge_not_contains?: InputMaybe;\n rootGauge_not_contains_nocase?: InputMaybe;\n rootGauge_not_ends_with?: InputMaybe;\n rootGauge_not_ends_with_nocase?: InputMaybe;\n rootGauge_not_in?: InputMaybe>;\n rootGauge_not_starts_with?: InputMaybe;\n rootGauge_not_starts_with_nocase?: InputMaybe;\n rootGauge_starts_with?: InputMaybe;\n rootGauge_starts_with_nocase?: InputMaybe;\n type?: InputMaybe;\n type_?: InputMaybe;\n type_contains?: InputMaybe;\n type_contains_nocase?: InputMaybe;\n type_ends_with?: InputMaybe;\n type_ends_with_nocase?: InputMaybe;\n type_gt?: InputMaybe;\n type_gte?: InputMaybe;\n type_in?: InputMaybe>;\n type_lt?: InputMaybe;\n type_lte?: InputMaybe;\n type_not?: InputMaybe;\n type_not_contains?: InputMaybe;\n type_not_contains_nocase?: InputMaybe;\n type_not_ends_with?: InputMaybe;\n type_not_ends_with_nocase?: InputMaybe;\n type_not_in?: InputMaybe>;\n type_not_starts_with?: InputMaybe;\n type_not_starts_with_nocase?: InputMaybe;\n type_starts_with?: InputMaybe;\n type_starts_with_nocase?: InputMaybe;\n};\n\nexport enum Gauge_OrderBy {\n addedTimestamp = 'addedTimestamp',\n address = 'address',\n id = 'id',\n liquidityGauge = 'liquidityGauge',\n liquidityGauge__id = 'liquidityGauge__id',\n liquidityGauge__isKilled = 'liquidityGauge__isKilled',\n liquidityGauge__isPreferentialGauge = 'liquidityGauge__isPreferentialGauge',\n liquidityGauge__poolAddress = 'liquidityGauge__poolAddress',\n liquidityGauge__poolId = 'liquidityGauge__poolId',\n liquidityGauge__relativeWeightCap = 'liquidityGauge__relativeWeightCap',\n liquidityGauge__streamer = 'liquidityGauge__streamer',\n liquidityGauge__symbol = 'liquidityGauge__symbol',\n liquidityGauge__totalSupply = 'liquidityGauge__totalSupply',\n rootGauge = 'rootGauge',\n rootGauge__chain = 'rootGauge__chain',\n rootGauge__id = 'rootGauge__id',\n rootGauge__isKilled = 'rootGauge__isKilled',\n rootGauge__recipient = 'rootGauge__recipient',\n rootGauge__relativeWeightCap = 'rootGauge__relativeWeightCap',\n type = 'type',\n type__id = 'type__id',\n type__name = 'type__name'\n}\n\nexport type LiquidityGauge = {\n __typename?: 'LiquidityGauge';\n /** Factory contract address */\n factory: GaugeFactory;\n /** Reference to Gauge entity - created when LiquidityGauge is added to GaugeController */\n gauge?: Maybe;\n /** LiquidityGauge contract address */\n id: Scalars['ID'];\n /** Whether Balancer DAO killed the gauge */\n isKilled: Scalars['Boolean'];\n /** Whether the LiquidityGauge is the most recent added to GaugeController */\n isPreferentialGauge: Scalars['Boolean'];\n /** Reference to Pool entity */\n pool?: Maybe;\n /** Address of the pool (lp_token of the gauge) */\n poolAddress: Scalars['Bytes'];\n /** Pool ID if lp_token is a Balancer pool; null otherwise */\n poolId?: Maybe;\n /** Relative weight cap of the gauge (0.01 = 1%) - V2 factories only */\n relativeWeightCap?: Maybe;\n /** List of reward tokens depositted in the gauge - ChildChainLiquidityGauge only */\n rewardTokensList?: Maybe>;\n /** List of user shares */\n shares?: Maybe>;\n /** Address of the contract that streams reward tokens to the gauge - ChildChainLiquidityGauge only */\n streamer?: Maybe;\n /** ERC20 token symbol */\n symbol: Scalars['String'];\n /** List of reward tokens depositted in the gauge */\n tokens?: Maybe>;\n /** Total of BPTs users have staked in the LiquidityGauge */\n totalSupply: Scalars['BigDecimal'];\n};\n\n\nexport type LiquidityGaugeSharesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type LiquidityGaugeTokensArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type LiquidityGauge_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n factory?: InputMaybe;\n factory_?: InputMaybe;\n factory_contains?: InputMaybe;\n factory_contains_nocase?: InputMaybe;\n factory_ends_with?: InputMaybe;\n factory_ends_with_nocase?: InputMaybe;\n factory_gt?: InputMaybe;\n factory_gte?: InputMaybe;\n factory_in?: InputMaybe>;\n factory_lt?: InputMaybe;\n factory_lte?: InputMaybe;\n factory_not?: InputMaybe;\n factory_not_contains?: InputMaybe;\n factory_not_contains_nocase?: InputMaybe;\n factory_not_ends_with?: InputMaybe;\n factory_not_ends_with_nocase?: InputMaybe;\n factory_not_in?: InputMaybe>;\n factory_not_starts_with?: InputMaybe;\n factory_not_starts_with_nocase?: InputMaybe;\n factory_starts_with?: InputMaybe;\n factory_starts_with_nocase?: InputMaybe;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n isKilled?: InputMaybe;\n isKilled_in?: InputMaybe>;\n isKilled_not?: InputMaybe;\n isKilled_not_in?: InputMaybe>;\n isPreferentialGauge?: InputMaybe;\n isPreferentialGauge_in?: InputMaybe>;\n isPreferentialGauge_not?: InputMaybe;\n isPreferentialGauge_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n poolAddress?: InputMaybe;\n poolAddress_contains?: InputMaybe;\n poolAddress_gt?: InputMaybe;\n poolAddress_gte?: InputMaybe;\n poolAddress_in?: InputMaybe>;\n poolAddress_lt?: InputMaybe;\n poolAddress_lte?: InputMaybe;\n poolAddress_not?: InputMaybe;\n poolAddress_not_contains?: InputMaybe;\n poolAddress_not_in?: InputMaybe>;\n poolId?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n relativeWeightCap?: InputMaybe;\n relativeWeightCap_gt?: InputMaybe;\n relativeWeightCap_gte?: InputMaybe;\n relativeWeightCap_in?: InputMaybe>;\n relativeWeightCap_lt?: InputMaybe;\n relativeWeightCap_lte?: InputMaybe;\n relativeWeightCap_not?: InputMaybe;\n relativeWeightCap_not_in?: InputMaybe>;\n rewardTokensList?: InputMaybe>;\n rewardTokensList_contains?: InputMaybe>;\n rewardTokensList_contains_nocase?: InputMaybe>;\n rewardTokensList_not?: InputMaybe>;\n rewardTokensList_not_contains?: InputMaybe>;\n rewardTokensList_not_contains_nocase?: InputMaybe>;\n shares_?: InputMaybe;\n streamer?: InputMaybe;\n streamer_contains?: InputMaybe;\n streamer_gt?: InputMaybe;\n streamer_gte?: InputMaybe;\n streamer_in?: InputMaybe>;\n streamer_lt?: InputMaybe;\n streamer_lte?: InputMaybe;\n streamer_not?: InputMaybe;\n streamer_not_contains?: InputMaybe;\n streamer_not_in?: InputMaybe>;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n tokens_?: InputMaybe;\n totalSupply?: InputMaybe;\n totalSupply_gt?: InputMaybe;\n totalSupply_gte?: InputMaybe;\n totalSupply_in?: InputMaybe>;\n totalSupply_lt?: InputMaybe;\n totalSupply_lte?: InputMaybe;\n totalSupply_not?: InputMaybe;\n totalSupply_not_in?: InputMaybe>;\n};\n\nexport enum LiquidityGauge_OrderBy {\n factory = 'factory',\n factory__id = 'factory__id',\n factory__numGauges = 'factory__numGauges',\n gauge = 'gauge',\n gauge__addedTimestamp = 'gauge__addedTimestamp',\n gauge__address = 'gauge__address',\n gauge__id = 'gauge__id',\n id = 'id',\n isKilled = 'isKilled',\n isPreferentialGauge = 'isPreferentialGauge',\n pool = 'pool',\n poolAddress = 'poolAddress',\n poolId = 'poolId',\n pool__address = 'pool__address',\n pool__id = 'pool__id',\n pool__poolId = 'pool__poolId',\n relativeWeightCap = 'relativeWeightCap',\n rewardTokensList = 'rewardTokensList',\n shares = 'shares',\n streamer = 'streamer',\n symbol = 'symbol',\n tokens = 'tokens',\n totalSupply = 'totalSupply'\n}\n\nexport type LockSnapshot = {\n __typename?: 'LockSnapshot';\n /** veBAL balance at the moment user locks */\n bias: Scalars['BigDecimal'];\n /** Equal to - */\n id: Scalars['ID'];\n /** veBAL decay rate (per second) */\n slope: Scalars['BigDecimal'];\n /** Timestamp at which the snapshot was taken [seconds] */\n timestamp: Scalars['Int'];\n /** Reference to User entity */\n user: User;\n};\n\nexport type LockSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n bias?: InputMaybe;\n bias_gt?: InputMaybe;\n bias_gte?: InputMaybe;\n bias_in?: InputMaybe>;\n bias_lt?: InputMaybe;\n bias_lte?: InputMaybe;\n bias_not?: InputMaybe;\n bias_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n slope?: InputMaybe;\n slope_gt?: InputMaybe;\n slope_gte?: InputMaybe;\n slope_in?: InputMaybe>;\n slope_lt?: InputMaybe;\n slope_lte?: InputMaybe;\n slope_not?: InputMaybe;\n slope_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n};\n\nexport enum LockSnapshot_OrderBy {\n bias = 'bias',\n id = 'id',\n slope = 'slope',\n timestamp = 'timestamp',\n user = 'user',\n user__id = 'user__id'\n}\n\nexport type OmniVotingEscrowLock = {\n __typename?: 'OmniVotingEscrowLock';\n /** veBAL balance at the moment user locks */\n bias: Scalars['BigDecimal'];\n /** Chain where the lock was bridged to */\n dstChainId: Scalars['Int'];\n /** Equal to: - */\n id: Scalars['ID'];\n /** User on the local chain (reference to User entity) */\n localUser: User;\n /** User address on the remote chain */\n remoteUser: Scalars['Bytes'];\n /** veBAL decay rate (per second) */\n slope: Scalars['BigDecimal'];\n /** Timestamp the lock was created [seconds] */\n timestamp: Scalars['Int'];\n /** Reference to VotingEscrow entity */\n votingEscrowID: VotingEscrow;\n};\n\nexport type OmniVotingEscrowLock_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n bias?: InputMaybe;\n bias_gt?: InputMaybe;\n bias_gte?: InputMaybe;\n bias_in?: InputMaybe>;\n bias_lt?: InputMaybe;\n bias_lte?: InputMaybe;\n bias_not?: InputMaybe;\n bias_not_in?: InputMaybe>;\n dstChainId?: InputMaybe;\n dstChainId_gt?: InputMaybe;\n dstChainId_gte?: InputMaybe;\n dstChainId_in?: InputMaybe>;\n dstChainId_lt?: InputMaybe;\n dstChainId_lte?: InputMaybe;\n dstChainId_not?: InputMaybe;\n dstChainId_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n localUser?: InputMaybe;\n localUser_?: InputMaybe;\n localUser_contains?: InputMaybe;\n localUser_contains_nocase?: InputMaybe;\n localUser_ends_with?: InputMaybe;\n localUser_ends_with_nocase?: InputMaybe;\n localUser_gt?: InputMaybe;\n localUser_gte?: InputMaybe;\n localUser_in?: InputMaybe>;\n localUser_lt?: InputMaybe;\n localUser_lte?: InputMaybe;\n localUser_not?: InputMaybe;\n localUser_not_contains?: InputMaybe;\n localUser_not_contains_nocase?: InputMaybe;\n localUser_not_ends_with?: InputMaybe;\n localUser_not_ends_with_nocase?: InputMaybe;\n localUser_not_in?: InputMaybe>;\n localUser_not_starts_with?: InputMaybe;\n localUser_not_starts_with_nocase?: InputMaybe;\n localUser_starts_with?: InputMaybe;\n localUser_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n remoteUser?: InputMaybe;\n remoteUser_contains?: InputMaybe;\n remoteUser_gt?: InputMaybe;\n remoteUser_gte?: InputMaybe;\n remoteUser_in?: InputMaybe>;\n remoteUser_lt?: InputMaybe;\n remoteUser_lte?: InputMaybe;\n remoteUser_not?: InputMaybe;\n remoteUser_not_contains?: InputMaybe;\n remoteUser_not_in?: InputMaybe>;\n slope?: InputMaybe;\n slope_gt?: InputMaybe;\n slope_gte?: InputMaybe;\n slope_in?: InputMaybe>;\n slope_lt?: InputMaybe;\n slope_lte?: InputMaybe;\n slope_not?: InputMaybe;\n slope_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n votingEscrowID?: InputMaybe;\n votingEscrowID_?: InputMaybe;\n votingEscrowID_contains?: InputMaybe;\n votingEscrowID_contains_nocase?: InputMaybe;\n votingEscrowID_ends_with?: InputMaybe;\n votingEscrowID_ends_with_nocase?: InputMaybe;\n votingEscrowID_gt?: InputMaybe;\n votingEscrowID_gte?: InputMaybe;\n votingEscrowID_in?: InputMaybe>;\n votingEscrowID_lt?: InputMaybe;\n votingEscrowID_lte?: InputMaybe;\n votingEscrowID_not?: InputMaybe;\n votingEscrowID_not_contains?: InputMaybe;\n votingEscrowID_not_contains_nocase?: InputMaybe;\n votingEscrowID_not_ends_with?: InputMaybe;\n votingEscrowID_not_ends_with_nocase?: InputMaybe;\n votingEscrowID_not_in?: InputMaybe>;\n votingEscrowID_not_starts_with?: InputMaybe;\n votingEscrowID_not_starts_with_nocase?: InputMaybe;\n votingEscrowID_starts_with?: InputMaybe;\n votingEscrowID_starts_with_nocase?: InputMaybe;\n};\n\nexport enum OmniVotingEscrowLock_OrderBy {\n bias = 'bias',\n dstChainId = 'dstChainId',\n id = 'id',\n localUser = 'localUser',\n localUser__id = 'localUser__id',\n remoteUser = 'remoteUser',\n slope = 'slope',\n timestamp = 'timestamp',\n votingEscrowID = 'votingEscrowID',\n votingEscrowID__id = 'votingEscrowID__id',\n votingEscrowID__stakedSupply = 'votingEscrowID__stakedSupply'\n}\n\n/** Defines the order direction, either ascending or descending */\nexport enum OrderDirection {\n asc = 'asc',\n desc = 'desc'\n}\n\nexport type Pool = {\n __typename?: 'Pool';\n /** Address of the pool (lp_token of the gauge) */\n address: Scalars['Bytes'];\n /** List of gauges created for the pool */\n gauges?: Maybe>;\n /** List of the pool's gauges addresses */\n gaugesList: Array;\n /** Address of the pool (lp_token of the gauge) */\n id: Scalars['ID'];\n /** Pool ID if lp_token is a Balancer pool; null otherwise */\n poolId?: Maybe;\n /** Most recent, unkilled gauge in the GaugeController */\n preferentialGauge?: Maybe;\n};\n\n\nexport type PoolGaugesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type Pool_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n gaugesList?: InputMaybe>;\n gaugesList_contains?: InputMaybe>;\n gaugesList_contains_nocase?: InputMaybe>;\n gaugesList_not?: InputMaybe>;\n gaugesList_not_contains?: InputMaybe>;\n gaugesList_not_contains_nocase?: InputMaybe>;\n gauges_?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n preferentialGauge?: InputMaybe;\n preferentialGauge_?: InputMaybe;\n preferentialGauge_contains?: InputMaybe;\n preferentialGauge_contains_nocase?: InputMaybe;\n preferentialGauge_ends_with?: InputMaybe;\n preferentialGauge_ends_with_nocase?: InputMaybe;\n preferentialGauge_gt?: InputMaybe;\n preferentialGauge_gte?: InputMaybe;\n preferentialGauge_in?: InputMaybe>;\n preferentialGauge_lt?: InputMaybe;\n preferentialGauge_lte?: InputMaybe;\n preferentialGauge_not?: InputMaybe;\n preferentialGauge_not_contains?: InputMaybe;\n preferentialGauge_not_contains_nocase?: InputMaybe;\n preferentialGauge_not_ends_with?: InputMaybe;\n preferentialGauge_not_ends_with_nocase?: InputMaybe;\n preferentialGauge_not_in?: InputMaybe>;\n preferentialGauge_not_starts_with?: InputMaybe;\n preferentialGauge_not_starts_with_nocase?: InputMaybe;\n preferentialGauge_starts_with?: InputMaybe;\n preferentialGauge_starts_with_nocase?: InputMaybe;\n};\n\nexport enum Pool_OrderBy {\n address = 'address',\n gauges = 'gauges',\n gaugesList = 'gaugesList',\n id = 'id',\n poolId = 'poolId',\n preferentialGauge = 'preferentialGauge',\n preferentialGauge__id = 'preferentialGauge__id',\n preferentialGauge__isKilled = 'preferentialGauge__isKilled',\n preferentialGauge__isPreferentialGauge = 'preferentialGauge__isPreferentialGauge',\n preferentialGauge__poolAddress = 'preferentialGauge__poolAddress',\n preferentialGauge__poolId = 'preferentialGauge__poolId',\n preferentialGauge__relativeWeightCap = 'preferentialGauge__relativeWeightCap',\n preferentialGauge__streamer = 'preferentialGauge__streamer',\n preferentialGauge__symbol = 'preferentialGauge__symbol',\n preferentialGauge__totalSupply = 'preferentialGauge__totalSupply'\n}\n\nexport type Query = {\n __typename?: 'Query';\n /** Access to subgraph metadata */\n _meta?: Maybe<_Meta_>;\n gauge?: Maybe;\n gaugeFactories: Array;\n gaugeFactory?: Maybe;\n gaugeShare?: Maybe;\n gaugeShares: Array;\n gaugeType?: Maybe;\n gaugeTypes: Array;\n gaugeVote?: Maybe;\n gaugeVotes: Array;\n gauges: Array;\n liquidityGauge?: Maybe;\n liquidityGauges: Array;\n lockSnapshot?: Maybe;\n lockSnapshots: Array;\n omniVotingEscrowLock?: Maybe;\n omniVotingEscrowLocks: Array;\n pool?: Maybe;\n pools: Array;\n rewardToken?: Maybe;\n rewardTokens: Array;\n rootGauge?: Maybe;\n rootGauges: Array;\n singleRecipientGauge?: Maybe;\n singleRecipientGauges: Array;\n user?: Maybe;\n users: Array;\n votingEscrow?: Maybe;\n votingEscrowLock?: Maybe;\n votingEscrowLocks: Array;\n votingEscrows: Array;\n};\n\n\nexport type Query_MetaArgs = {\n block?: InputMaybe;\n};\n\n\nexport type QueryGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeFactoriesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGaugeFactoryArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeShareArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeSharesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGaugeTypeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeTypesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGaugeVoteArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeVotesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryLiquidityGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryLiquidityGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryLockSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryLockSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryOmniVotingEscrowLockArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryOmniVotingEscrowLocksArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryRewardTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryRewardTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryRootGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryRootGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QuerySingleRecipientGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QuerySingleRecipientGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryUserArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryUsersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryVotingEscrowArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryVotingEscrowLockArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryVotingEscrowLocksArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryVotingEscrowsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\nexport type RewardToken = {\n __typename?: 'RewardToken';\n /** ERC20 token decimals - zero if call to decimals() reverts */\n decimals: Scalars['Int'];\n /** Reference to LiquidityGauge entity */\n gauge: LiquidityGauge;\n /** Equal to: - */\n id: Scalars['ID'];\n /** Timestamp at which finishes the period of rewards */\n periodFinish?: Maybe;\n /** Rate of reward tokens streamed per second */\n rate?: Maybe;\n /** ERC20 token symbol - empty string if call to symbol() reverts */\n symbol: Scalars['String'];\n /** Amount of reward tokens that has been deposited into the gauge */\n totalDeposited: Scalars['BigDecimal'];\n};\n\nexport type RewardToken_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n decimals?: InputMaybe;\n decimals_gt?: InputMaybe;\n decimals_gte?: InputMaybe;\n decimals_in?: InputMaybe>;\n decimals_lt?: InputMaybe;\n decimals_lte?: InputMaybe;\n decimals_not?: InputMaybe;\n decimals_not_in?: InputMaybe>;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n periodFinish?: InputMaybe;\n periodFinish_gt?: InputMaybe;\n periodFinish_gte?: InputMaybe;\n periodFinish_in?: InputMaybe>;\n periodFinish_lt?: InputMaybe;\n periodFinish_lte?: InputMaybe;\n periodFinish_not?: InputMaybe;\n periodFinish_not_in?: InputMaybe>;\n rate?: InputMaybe;\n rate_gt?: InputMaybe;\n rate_gte?: InputMaybe;\n rate_in?: InputMaybe>;\n rate_lt?: InputMaybe;\n rate_lte?: InputMaybe;\n rate_not?: InputMaybe;\n rate_not_in?: InputMaybe>;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n totalDeposited?: InputMaybe;\n totalDeposited_gt?: InputMaybe;\n totalDeposited_gte?: InputMaybe;\n totalDeposited_in?: InputMaybe>;\n totalDeposited_lt?: InputMaybe;\n totalDeposited_lte?: InputMaybe;\n totalDeposited_not?: InputMaybe;\n totalDeposited_not_in?: InputMaybe>;\n};\n\nexport enum RewardToken_OrderBy {\n decimals = 'decimals',\n gauge = 'gauge',\n gauge__id = 'gauge__id',\n gauge__isKilled = 'gauge__isKilled',\n gauge__isPreferentialGauge = 'gauge__isPreferentialGauge',\n gauge__poolAddress = 'gauge__poolAddress',\n gauge__poolId = 'gauge__poolId',\n gauge__relativeWeightCap = 'gauge__relativeWeightCap',\n gauge__streamer = 'gauge__streamer',\n gauge__symbol = 'gauge__symbol',\n gauge__totalSupply = 'gauge__totalSupply',\n id = 'id',\n periodFinish = 'periodFinish',\n rate = 'rate',\n symbol = 'symbol',\n totalDeposited = 'totalDeposited'\n}\n\nexport type RootGauge = {\n __typename?: 'RootGauge';\n /** Chain where emissions by this gauge will be bridged to */\n chain: Chain;\n /** Factory contract address */\n factory: GaugeFactory;\n /** Reference to Gauge entity - created when LiquidityGauge is added to GaugeController */\n gauge?: Maybe;\n /** RootGauge contract address */\n id: Scalars['ID'];\n /** Whether Balancer DAO killed the gauge */\n isKilled: Scalars['Boolean'];\n /** Address where emissions by this gauge will be bridged to */\n recipient: Scalars['Bytes'];\n /** Relative weight cap of the gauge (0.01 = 1%) - V2 factories only */\n relativeWeightCap?: Maybe;\n};\n\nexport type RootGauge_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n chain?: InputMaybe;\n chain_in?: InputMaybe>;\n chain_not?: InputMaybe;\n chain_not_in?: InputMaybe>;\n factory?: InputMaybe;\n factory_?: InputMaybe;\n factory_contains?: InputMaybe;\n factory_contains_nocase?: InputMaybe;\n factory_ends_with?: InputMaybe;\n factory_ends_with_nocase?: InputMaybe;\n factory_gt?: InputMaybe;\n factory_gte?: InputMaybe;\n factory_in?: InputMaybe>;\n factory_lt?: InputMaybe;\n factory_lte?: InputMaybe;\n factory_not?: InputMaybe;\n factory_not_contains?: InputMaybe;\n factory_not_contains_nocase?: InputMaybe;\n factory_not_ends_with?: InputMaybe;\n factory_not_ends_with_nocase?: InputMaybe;\n factory_not_in?: InputMaybe>;\n factory_not_starts_with?: InputMaybe;\n factory_not_starts_with_nocase?: InputMaybe;\n factory_starts_with?: InputMaybe;\n factory_starts_with_nocase?: InputMaybe;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n isKilled?: InputMaybe;\n isKilled_in?: InputMaybe>;\n isKilled_not?: InputMaybe;\n isKilled_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n recipient?: InputMaybe;\n recipient_contains?: InputMaybe;\n recipient_gt?: InputMaybe;\n recipient_gte?: InputMaybe;\n recipient_in?: InputMaybe>;\n recipient_lt?: InputMaybe;\n recipient_lte?: InputMaybe;\n recipient_not?: InputMaybe;\n recipient_not_contains?: InputMaybe;\n recipient_not_in?: InputMaybe>;\n relativeWeightCap?: InputMaybe;\n relativeWeightCap_gt?: InputMaybe;\n relativeWeightCap_gte?: InputMaybe;\n relativeWeightCap_in?: InputMaybe>;\n relativeWeightCap_lt?: InputMaybe;\n relativeWeightCap_lte?: InputMaybe;\n relativeWeightCap_not?: InputMaybe;\n relativeWeightCap_not_in?: InputMaybe>;\n};\n\nexport enum RootGauge_OrderBy {\n chain = 'chain',\n factory = 'factory',\n factory__id = 'factory__id',\n factory__numGauges = 'factory__numGauges',\n gauge = 'gauge',\n gauge__addedTimestamp = 'gauge__addedTimestamp',\n gauge__address = 'gauge__address',\n gauge__id = 'gauge__id',\n id = 'id',\n isKilled = 'isKilled',\n recipient = 'recipient',\n relativeWeightCap = 'relativeWeightCap'\n}\n\nexport type SingleRecipientGauge = {\n __typename?: 'SingleRecipientGauge';\n /** Factory contract address */\n factory: GaugeFactory;\n /** Reference to Gauge entity - created when SingleRecipientGauge is added to GaugeController */\n gauge?: Maybe;\n /** SingleRecipientGauge contract address */\n id: Scalars['ID'];\n /** Whether Balancer DAO killed the gauge */\n isKilled: Scalars['Boolean'];\n /** Address where emissions for this gauge will be sent to */\n recipient: Scalars['Bytes'];\n /** Relative weight cap of the gauge (0.01 = 1%) - V2 factories only */\n relativeWeightCap?: Maybe;\n};\n\nexport type SingleRecipientGauge_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n factory?: InputMaybe;\n factory_?: InputMaybe;\n factory_contains?: InputMaybe;\n factory_contains_nocase?: InputMaybe;\n factory_ends_with?: InputMaybe;\n factory_ends_with_nocase?: InputMaybe;\n factory_gt?: InputMaybe;\n factory_gte?: InputMaybe;\n factory_in?: InputMaybe>;\n factory_lt?: InputMaybe;\n factory_lte?: InputMaybe;\n factory_not?: InputMaybe;\n factory_not_contains?: InputMaybe;\n factory_not_contains_nocase?: InputMaybe;\n factory_not_ends_with?: InputMaybe;\n factory_not_ends_with_nocase?: InputMaybe;\n factory_not_in?: InputMaybe>;\n factory_not_starts_with?: InputMaybe;\n factory_not_starts_with_nocase?: InputMaybe;\n factory_starts_with?: InputMaybe;\n factory_starts_with_nocase?: InputMaybe;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n isKilled?: InputMaybe;\n isKilled_in?: InputMaybe>;\n isKilled_not?: InputMaybe;\n isKilled_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n recipient?: InputMaybe;\n recipient_contains?: InputMaybe;\n recipient_gt?: InputMaybe;\n recipient_gte?: InputMaybe;\n recipient_in?: InputMaybe>;\n recipient_lt?: InputMaybe;\n recipient_lte?: InputMaybe;\n recipient_not?: InputMaybe;\n recipient_not_contains?: InputMaybe;\n recipient_not_in?: InputMaybe>;\n relativeWeightCap?: InputMaybe;\n relativeWeightCap_gt?: InputMaybe;\n relativeWeightCap_gte?: InputMaybe;\n relativeWeightCap_in?: InputMaybe>;\n relativeWeightCap_lt?: InputMaybe;\n relativeWeightCap_lte?: InputMaybe;\n relativeWeightCap_not?: InputMaybe;\n relativeWeightCap_not_in?: InputMaybe>;\n};\n\nexport enum SingleRecipientGauge_OrderBy {\n factory = 'factory',\n factory__id = 'factory__id',\n factory__numGauges = 'factory__numGauges',\n gauge = 'gauge',\n gauge__addedTimestamp = 'gauge__addedTimestamp',\n gauge__address = 'gauge__address',\n gauge__id = 'gauge__id',\n id = 'id',\n isKilled = 'isKilled',\n recipient = 'recipient',\n relativeWeightCap = 'relativeWeightCap'\n}\n\nexport type Subscription = {\n __typename?: 'Subscription';\n /** Access to subgraph metadata */\n _meta?: Maybe<_Meta_>;\n gauge?: Maybe;\n gaugeFactories: Array;\n gaugeFactory?: Maybe;\n gaugeShare?: Maybe;\n gaugeShares: Array;\n gaugeType?: Maybe;\n gaugeTypes: Array;\n gaugeVote?: Maybe;\n gaugeVotes: Array;\n gauges: Array;\n liquidityGauge?: Maybe;\n liquidityGauges: Array;\n lockSnapshot?: Maybe;\n lockSnapshots: Array;\n omniVotingEscrowLock?: Maybe;\n omniVotingEscrowLocks: Array;\n pool?: Maybe;\n pools: Array;\n rewardToken?: Maybe;\n rewardTokens: Array;\n rootGauge?: Maybe;\n rootGauges: Array;\n singleRecipientGauge?: Maybe;\n singleRecipientGauges: Array;\n user?: Maybe;\n users: Array;\n votingEscrow?: Maybe;\n votingEscrowLock?: Maybe;\n votingEscrowLocks: Array;\n votingEscrows: Array;\n};\n\n\nexport type Subscription_MetaArgs = {\n block?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeFactoriesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugeFactoryArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeShareArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeSharesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugeTypeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeTypesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugeVoteArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeVotesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionLiquidityGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionLiquidityGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionLockSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionLockSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionOmniVotingEscrowLockArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionOmniVotingEscrowLocksArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionRewardTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionRewardTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionRootGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionRootGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionSingleRecipientGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionSingleRecipientGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionUserArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionUsersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionVotingEscrowArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionVotingEscrowLockArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionVotingEscrowLocksArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionVotingEscrowsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\nexport type User = {\n __typename?: 'User';\n /** List of gauge the user has shares */\n gaugeShares?: Maybe>;\n /** List of votes on gauges */\n gaugeVotes?: Maybe>;\n /** User address */\n id: Scalars['ID'];\n /** List of omni locks the user created */\n omniVotingLocks?: Maybe>;\n /** List of locks the user created */\n votingLocks?: Maybe>;\n};\n\n\nexport type UserGaugeSharesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserGaugeVotesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserOmniVotingLocksArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserVotingLocksArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type User_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n gaugeShares_?: InputMaybe;\n gaugeVotes_?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n omniVotingLocks_?: InputMaybe;\n or?: InputMaybe>>;\n votingLocks_?: InputMaybe;\n};\n\nexport enum User_OrderBy {\n gaugeShares = 'gaugeShares',\n gaugeVotes = 'gaugeVotes',\n id = 'id',\n omniVotingLocks = 'omniVotingLocks',\n votingLocks = 'votingLocks'\n}\n\nexport type VotingEscrow = {\n __typename?: 'VotingEscrow';\n /** VotingEscrow contract address */\n id: Scalars['ID'];\n /** List of veBAL locks created */\n locks?: Maybe>;\n /** List of veBAL locks created */\n omniLocks?: Maybe>;\n /** Amount of B-80BAL-20WETH BPT locked, only applies on mainnet */\n stakedSupply?: Maybe;\n};\n\n\nexport type VotingEscrowLocksArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type VotingEscrowOmniLocksArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type VotingEscrowLock = {\n __typename?: 'VotingEscrowLock';\n /** veBAL balance at the moment user locks */\n bias: Scalars['BigDecimal'];\n /** Equal to: - */\n id: Scalars['ID'];\n /** Amount of B-80BAL-20WETH BPT the user has locked */\n lockedBalance: Scalars['BigDecimal'];\n /** veBAL decay rate (per second) */\n slope: Scalars['BigDecimal'];\n /** Timestamp at which the lock was created [seconds] */\n timestamp: Scalars['Int'];\n /** Timestamp at which B-80BAL-20WETH BPT can be unlocked by user [seconds] */\n unlockTime: Scalars['BigInt'];\n /** Timestamp at which the lcok was created [seconds]. Same as timestamp */\n updatedAt: Scalars['Int'];\n /** Reference to User entity */\n user: User;\n /** Reference to VotingEscrow entity */\n votingEscrowID: VotingEscrow;\n};\n\nexport type VotingEscrowLock_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n bias?: InputMaybe;\n bias_gt?: InputMaybe;\n bias_gte?: InputMaybe;\n bias_in?: InputMaybe>;\n bias_lt?: InputMaybe;\n bias_lte?: InputMaybe;\n bias_not?: InputMaybe;\n bias_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n lockedBalance?: InputMaybe;\n lockedBalance_gt?: InputMaybe;\n lockedBalance_gte?: InputMaybe;\n lockedBalance_in?: InputMaybe>;\n lockedBalance_lt?: InputMaybe;\n lockedBalance_lte?: InputMaybe;\n lockedBalance_not?: InputMaybe;\n lockedBalance_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n slope?: InputMaybe;\n slope_gt?: InputMaybe;\n slope_gte?: InputMaybe;\n slope_in?: InputMaybe>;\n slope_lt?: InputMaybe;\n slope_lte?: InputMaybe;\n slope_not?: InputMaybe;\n slope_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n unlockTime?: InputMaybe;\n unlockTime_gt?: InputMaybe;\n unlockTime_gte?: InputMaybe;\n unlockTime_in?: InputMaybe>;\n unlockTime_lt?: InputMaybe;\n unlockTime_lte?: InputMaybe;\n unlockTime_not?: InputMaybe;\n unlockTime_not_in?: InputMaybe>;\n updatedAt?: InputMaybe;\n updatedAt_gt?: InputMaybe;\n updatedAt_gte?: InputMaybe;\n updatedAt_in?: InputMaybe>;\n updatedAt_lt?: InputMaybe;\n updatedAt_lte?: InputMaybe;\n updatedAt_not?: InputMaybe;\n updatedAt_not_in?: InputMaybe>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n votingEscrowID?: InputMaybe;\n votingEscrowID_?: InputMaybe;\n votingEscrowID_contains?: InputMaybe;\n votingEscrowID_contains_nocase?: InputMaybe;\n votingEscrowID_ends_with?: InputMaybe;\n votingEscrowID_ends_with_nocase?: InputMaybe;\n votingEscrowID_gt?: InputMaybe;\n votingEscrowID_gte?: InputMaybe;\n votingEscrowID_in?: InputMaybe>;\n votingEscrowID_lt?: InputMaybe;\n votingEscrowID_lte?: InputMaybe;\n votingEscrowID_not?: InputMaybe;\n votingEscrowID_not_contains?: InputMaybe;\n votingEscrowID_not_contains_nocase?: InputMaybe;\n votingEscrowID_not_ends_with?: InputMaybe;\n votingEscrowID_not_ends_with_nocase?: InputMaybe;\n votingEscrowID_not_in?: InputMaybe>;\n votingEscrowID_not_starts_with?: InputMaybe;\n votingEscrowID_not_starts_with_nocase?: InputMaybe;\n votingEscrowID_starts_with?: InputMaybe;\n votingEscrowID_starts_with_nocase?: InputMaybe;\n};\n\nexport enum VotingEscrowLock_OrderBy {\n bias = 'bias',\n id = 'id',\n lockedBalance = 'lockedBalance',\n slope = 'slope',\n timestamp = 'timestamp',\n unlockTime = 'unlockTime',\n updatedAt = 'updatedAt',\n user = 'user',\n user__id = 'user__id',\n votingEscrowID = 'votingEscrowID',\n votingEscrowID__id = 'votingEscrowID__id',\n votingEscrowID__stakedSupply = 'votingEscrowID__stakedSupply'\n}\n\nexport type VotingEscrow_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n locks_?: InputMaybe;\n omniLocks_?: InputMaybe;\n or?: InputMaybe>>;\n stakedSupply?: InputMaybe;\n stakedSupply_gt?: InputMaybe;\n stakedSupply_gte?: InputMaybe;\n stakedSupply_in?: InputMaybe>;\n stakedSupply_lt?: InputMaybe;\n stakedSupply_lte?: InputMaybe;\n stakedSupply_not?: InputMaybe;\n stakedSupply_not_in?: InputMaybe>;\n};\n\nexport enum VotingEscrow_OrderBy {\n id = 'id',\n locks = 'locks',\n omniLocks = 'omniLocks',\n stakedSupply = 'stakedSupply'\n}\n\nexport type _Block_ = {\n __typename?: '_Block_';\n /** The hash of the block */\n hash?: Maybe;\n /** The block number */\n number: Scalars['Int'];\n /** Integer representation of the timestamp stored in blocks for the chain */\n timestamp?: Maybe;\n};\n\n/** The type for the top-level _meta field */\nexport type _Meta_ = {\n __typename?: '_Meta_';\n /**\n * Information about a specific subgraph block. The hash of the block\n * will be null if the _meta field has a block constraint that asks for\n * a block number. It will be filled if the _meta field has no block constraint\n * and therefore asks for the latest block\n *\n */\n block: _Block_;\n /** The deployment ID */\n deployment: Scalars['String'];\n /** If `true`, the subgraph encountered indexing errors at some past block */\n hasIndexingErrors: Scalars['Boolean'];\n};\n\nexport enum _SubgraphErrorPolicy_ {\n /** Data will be returned even if the subgraph has indexing errors */\n allow = 'allow',\n /** If the subgraph has indexing errors, data will be omitted. The default. */\n deny = 'deny'\n}\n\nexport type GaugeShareQueryVariables = Exact<{\n id: Scalars['ID'];\n block?: InputMaybe;\n}>;\n\n\nexport type GaugeShareQuery = { __typename?: 'Query', gaugeShare?: { __typename?: 'GaugeShare', id: string, balance: string, user: { __typename?: 'User', id: string }, gauge: { __typename?: 'LiquidityGauge', id: string, isKilled: boolean, poolId?: string | null, poolAddress: string, totalSupply: string } } | null };\n\nexport type GaugeSharesQueryVariables = Exact<{\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type GaugeSharesQuery = { __typename?: 'Query', gaugeShares: Array<{ __typename?: 'GaugeShare', id: string, balance: string, user: { __typename?: 'User', id: string }, gauge: { __typename?: 'LiquidityGauge', id: string, isKilled: boolean, poolId?: string | null, poolAddress: string, totalSupply: string } }> };\n\nexport type SubgraphGaugeShareFragment = { __typename?: 'GaugeShare', id: string, balance: string, user: { __typename?: 'User', id: string }, gauge: { __typename?: 'LiquidityGauge', id: string, isKilled: boolean, poolId?: string | null, poolAddress: string, totalSupply: string } };\n\nexport type LiquidityGaugesQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type LiquidityGaugesQuery = { __typename?: 'Query', liquidityGauges: Array<{ __typename?: 'LiquidityGauge', id: string, symbol: string, poolAddress: string, poolId?: string | null, streamer?: string | null, totalSupply: string, factory: { __typename?: 'GaugeFactory', id: string, numGauges: number }, tokens?: Array<{ __typename?: 'RewardToken', id: string, symbol: string, decimals: number, totalDeposited: string, rate?: string | null, periodFinish?: string | null }> | null }> };\n\nexport type SubgraphLiquidityGaugeFragment = { __typename?: 'LiquidityGauge', id: string, symbol: string, poolAddress: string, poolId?: string | null, streamer?: string | null, totalSupply: string, factory: { __typename?: 'GaugeFactory', id: string, numGauges: number }, tokens?: Array<{ __typename?: 'RewardToken', id: string, symbol: string, decimals: number, totalDeposited: string, rate?: string | null, periodFinish?: string | null }> | null };\n\nexport type PoolsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolsQuery = { __typename?: 'Query', pools: Array<{ __typename?: 'Pool', id: string, poolId?: string | null, preferentialGauge?: { __typename?: 'LiquidityGauge', id: string, symbol: string, poolAddress: string, poolId?: string | null, streamer?: string | null, totalSupply: string, factory: { __typename?: 'GaugeFactory', id: string, numGauges: number }, tokens?: Array<{ __typename?: 'RewardToken', id: string, symbol: string, decimals: number, totalDeposited: string, rate?: string | null, periodFinish?: string | null }> | null } | null }> };\n\nexport type SubgraphPoolWithPreferentialGaugeFragment = { __typename?: 'Pool', id: string, poolId?: string | null, preferentialGauge?: { __typename?: 'LiquidityGauge', id: string, symbol: string, poolAddress: string, poolId?: string | null, streamer?: string | null, totalSupply: string, factory: { __typename?: 'GaugeFactory', id: string, numGauges: number }, tokens?: Array<{ __typename?: 'RewardToken', id: string, symbol: string, decimals: number, totalDeposited: string, rate?: string | null, periodFinish?: string | null }> | null } | null };\n\nexport type PoolGaugesQueryVariables = Exact<{\n where?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolGaugesQuery = { __typename?: 'Query', pools: Array<{ __typename?: 'Pool', gauges?: Array<{ __typename?: 'LiquidityGauge', id: string, relativeWeightCap?: string | null }> | null, preferentialGauge?: { __typename?: 'LiquidityGauge', id: string } | null }> };\n\nexport const SubgraphGaugeShareFragmentDoc = gql`\n fragment SubgraphGaugeShare on GaugeShare {\n id\n balance\n user {\n id\n }\n gauge {\n id\n isKilled\n poolId\n poolAddress\n totalSupply\n }\n}\n `;\nexport const SubgraphLiquidityGaugeFragmentDoc = gql`\n fragment SubgraphLiquidityGauge on LiquidityGauge {\n id\n symbol\n poolAddress\n poolId\n streamer\n factory {\n id\n numGauges\n }\n totalSupply\n tokens {\n id\n symbol\n decimals\n totalDeposited\n rate\n periodFinish\n }\n}\n `;\nexport const SubgraphPoolWithPreferentialGaugeFragmentDoc = gql`\n fragment SubgraphPoolWithPreferentialGauge on Pool {\n id\n poolId\n preferentialGauge {\n ...SubgraphLiquidityGauge\n }\n}\n ${SubgraphLiquidityGaugeFragmentDoc}`;\nexport const GaugeShareDocument = gql`\n query GaugeShare($id: ID!, $block: Block_height) {\n gaugeShare(id: $id, block: $block) {\n ...SubgraphGaugeShare\n }\n}\n ${SubgraphGaugeShareFragmentDoc}`;\nexport const GaugeSharesDocument = gql`\n query GaugeShares($first: Int, $orderBy: GaugeShare_orderBy, $orderDirection: OrderDirection, $skip: Int, $where: GaugeShare_filter, $block: Block_height) {\n gaugeShares(\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n skip: $skip\n where: $where\n block: $block\n ) {\n ...SubgraphGaugeShare\n }\n}\n ${SubgraphGaugeShareFragmentDoc}`;\nexport const LiquidityGaugesDocument = gql`\n query LiquidityGauges($skip: Int, $first: Int, $orderBy: LiquidityGauge_orderBy, $orderDirection: OrderDirection, $where: LiquidityGauge_filter, $block: Block_height) {\n liquidityGauges(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphLiquidityGauge\n }\n}\n ${SubgraphLiquidityGaugeFragmentDoc}`;\nexport const PoolsDocument = gql`\n query Pools($skip: Int, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter, $block: Block_height) {\n pools(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPoolWithPreferentialGauge\n }\n}\n ${SubgraphPoolWithPreferentialGaugeFragmentDoc}`;\nexport const PoolGaugesDocument = gql`\n query PoolGauges($where: Pool_filter, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $skip: Int, $block: Block_height) {\n pools(\n where: $where\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n skip: $skip\n block: $block\n ) {\n gauges {\n id\n relativeWeightCap\n }\n preferentialGauge {\n id\n }\n }\n}\n `;\n\nexport type SdkFunctionWrapper = (action: (requestHeaders?:Record) => Promise, operationName: string, operationType?: string) => Promise;\n\n\nconst defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action();\n\nexport function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) {\n return {\n GaugeShare(variables: GaugeShareQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(GaugeShareDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'GaugeShare', 'query');\n },\n GaugeShares(variables?: GaugeSharesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(GaugeSharesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'GaugeShares', 'query');\n },\n LiquidityGauges(variables?: LiquidityGaugesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(LiquidityGaugesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'LiquidityGauges', 'query');\n },\n Pools(variables?: PoolsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Pools', 'query');\n },\n PoolGauges(variables?: PoolGaugesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolGaugesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolGauges', 'query');\n }\n };\n}\nexport type Sdk = ReturnType;","import { GraphQLClient } from 'graphql-request';\nimport { getSdk, Sdk } from './generated/balancer-subgraph-types';\nimport * as Gauges from './generated/balancer-gauges';\nimport * as V2 from './generated/balancer-subgraph-types';\n\nexport * from './generated/balancer-subgraph-types';\n\nexport type SubgraphClient = Sdk;\nexport type GaugesClient = Gauges.Sdk;\nexport type SubgraphLiquidityGauge = Gauges.LiquidityGauge;\nexport type SubgraphPool = V2.SubgraphPoolFragment;\n\nexport function createSubgraphClient(subgraphUrl: string): SubgraphClient {\n const client = new GraphQLClient(subgraphUrl);\n\n return getSdk(client);\n}\n\nexport function createGaugesClient(url: string): GaugesClient {\n const client = new GraphQLClient(url);\n\n return Gauges.getSdk(client);\n}\n","import { set } from 'lodash';\nimport { Fragment, JsonFragment, Interface, Result } from '@ethersproject/abi';\nimport { CallOverrides } from '@ethersproject/contracts';\nimport { Multicall3, Multicall3__factory } from '@/contracts';\nimport { Provider } from '@ethersproject/providers';\n\nexport class Multicaller3 {\n private interface: Interface;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private calls: [string, string, any][] = [];\n private paths: string[] = [];\n address = '0xcA11bde05977b3631167028862bE2a173976CA11';\n multicall: Multicall3;\n\n constructor(\n abi: string | Array,\n provider: Provider,\n private options: CallOverrides = {}\n ) {\n this.interface = new Interface(abi);\n this.multicall = Multicall3__factory.connect(this.address, provider);\n }\n\n call(\n path: string,\n address: string,\n functionName: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n params?: any[]\n ): Multicaller3 {\n this.calls.push([address, functionName, params]);\n this.paths.push(path);\n return this;\n }\n\n async execute(\n from: Record = {},\n batchSize = 1024 // Define the number of function calls in each batch\n ): Promise> {\n const obj = from;\n const results = await this.executeMulticall(batchSize);\n results.forEach((result, i) =>\n set(obj, this.paths[i], result.length > 1 ? result : result[0])\n );\n this.calls = [];\n this.paths = [];\n return obj;\n }\n\n private async executeMulticall(batchSize: number): Promise {\n const numBatches = Math.ceil(this.calls.length / batchSize);\n const results: Result[] = [];\n\n const batchPromises = [];\n\n for (let batchIndex = 0; batchIndex < numBatches; batchIndex++) {\n const batchCalls = this.calls.slice(\n batchIndex * batchSize,\n (batchIndex + 1) * batchSize\n );\n\n const batchRequests = batchCalls.map(\n ([address, functionName, params]) => ({\n target: address,\n allowFailure: true,\n callData: this.interface.encodeFunctionData(functionName, params),\n })\n );\n\n batchPromises.push(\n this.multicall.callStatic.aggregate3(batchRequests, this.options)\n );\n }\n\n const batchResults = await Promise.all(batchPromises);\n\n batchResults.forEach((res, batchIndex) => {\n const offset = batchIndex * batchSize;\n\n for (let i = 0; i < res.length; i++) {\n const callIndex = offset + i;\n const { success, returnData } = res[i];\n\n if (success) {\n try {\n const result = this.interface.decodeFunctionResult(\n this.calls[callIndex][1],\n returnData\n );\n results[callIndex] = result;\n } catch (e) {\n console.error('Multicall error', this.paths[callIndex]);\n results[callIndex] = [];\n }\n } else {\n console.error('Failed request in multicall', this.paths[callIndex]);\n results[callIndex] = [];\n }\n }\n });\n\n return results;\n }\n}\n","import { Multicaller3 } from '@/lib/utils/multiCaller3';\nimport { SubgraphPoolBase } from '@/.';\nimport { Provider } from '@ethersproject/providers';\nimport { formatFixed } from '@ethersproject/bignumber';\nimport { SubgraphToken } from '@balancer-labs/sor';\nimport { PoolToken, Pool } from '@/types';\n\nconst abi = [\n 'function getSwapFeePercentage() view returns (uint256)',\n 'function percentFee() view returns (uint256)',\n 'function protocolPercentFee() view returns (uint256)',\n 'function getNormalizedWeights() view returns (uint256[])',\n 'function totalSupply() view returns (uint256)',\n 'function getVirtualSupply() view returns (uint256)',\n 'function getActualSupply() view returns (uint256)',\n 'function getTargets() view returns (uint256 lowerTarget, uint256 upperTarget)',\n 'function getTokenRates() view returns (uint256, uint256)',\n 'function getWrappedTokenRate() view returns (uint256)',\n 'function getAmplificationParameter() view returns (uint256 value, bool isUpdating, uint256 precision)',\n 'function getPausedState() view returns (bool)',\n 'function inRecoveryMode() view returns (bool)',\n 'function getRate() view returns (uint256)',\n 'function getScalingFactors() view returns (uint256[] memory)', // do we need this here?\n 'function getPoolTokens(bytes32) view returns (address[], uint256[])',\n];\n\nconst getTotalSupplyFn = (poolType: string) => {\n if (poolType.includes('Linear') || ['StablePhantom'].includes(poolType)) {\n return 'getVirtualSupply';\n } else if (poolType === 'ComposableStable') {\n return 'getActualSupply';\n } else {\n return 'totalSupply';\n }\n};\n\nconst getSwapFeeFn = (poolType: string) => {\n if (poolType === 'Element') {\n return 'percentFee';\n } else if (poolType === 'FX') {\n return 'protocolPercentFee';\n } else {\n return 'getSwapFeePercentage';\n }\n};\n\ntype GenericToken = SubgraphToken | PoolToken;\ntype GenericPool = Omit & {\n tokens: GenericToken[];\n};\n\ninterface OnchainData {\n poolTokens: [string[], string[]];\n totalShares: string;\n swapFee: string;\n isPaused?: boolean;\n inRecoveryMode?: boolean;\n rate?: string;\n scalingFactors?: string[];\n weights?: string[];\n targets?: [string, string];\n wrappedTokenRate?: string;\n amp?: [string, boolean, string];\n tokenRates?: [string, string];\n}\n\nconst defaultCalls = (\n id: string,\n address: string,\n vaultAddress: string,\n poolType: string,\n multicaller: Multicaller3\n) => {\n multicaller.call(`${id}.poolTokens`, vaultAddress, 'getPoolTokens', [id]);\n multicaller.call(`${id}.totalShares`, address, getTotalSupplyFn(poolType));\n multicaller.call(`${id}.swapFee`, address, getSwapFeeFn(poolType));\n // Following where added to the pools query contract, however legacy onchain data didn't have them.\n // multicaller.call(`${id}.isPaused`, address, 'getPausedState');\n // multicaller.call(`${id}.inRecoveryMode`, address, 'inRecoveryMode');\n // multicaller.call(`${id}.rate`, address, 'getRate');\n // multicaller.call(`${id}.scalingFactors`, address, 'getScalingFactors');\n};\n\nconst weightedCalls = (\n id: string,\n address: string,\n multicaller: Multicaller3\n) => {\n multicaller.call(`${id}.weights`, address, 'getNormalizedWeights');\n};\n\nconst linearCalls = (\n id: string,\n address: string,\n multicaller: Multicaller3\n) => {\n multicaller.call(`${id}.targets`, address, 'getTargets');\n multicaller.call(`${id}.wrappedTokenRate`, address, 'getWrappedTokenRate');\n};\n\nconst stableCalls = (\n id: string,\n address: string,\n multicaller: Multicaller3\n) => {\n multicaller.call(`${id}.amp`, address, 'getAmplificationParameter');\n};\n\nconst gyroECalls = (id: string, address: string, multicaller: Multicaller3) => {\n multicaller.call(`${id}.tokenRates`, address, 'getTokenRates');\n};\n\nconst poolTypeCalls = (poolType: string, poolTypeVersion = 1) => {\n const do_nothing = () => ({});\n switch (poolType) {\n case 'Weighted':\n case 'LiquidityBootstrapping':\n case 'Investment':\n return weightedCalls;\n case 'Stable':\n case 'StablePhantom':\n case 'MetaStable':\n case 'ComposableStable':\n return stableCalls;\n case 'GyroE':\n if (poolTypeVersion === 2) {\n return gyroECalls;\n } else {\n return do_nothing;\n }\n case 'Gyro2':\n if (poolTypeVersion === 2) {\n // Gyro2 V2 has tokenRates same as GyroE V2\n return gyroECalls;\n } else {\n return do_nothing;\n }\n case 'AaveLinear':\n if (poolTypeVersion === 1) {\n return linearCalls;\n } else {\n return do_nothing;\n }\n default:\n return do_nothing;\n }\n};\n\nconst merge = (pool: T, result: OnchainData) => ({\n ...pool,\n tokens: result.poolTokens\n ? pool.tokens.map((token) => {\n const idx = result.poolTokens[0]\n .map((t) => t.toLowerCase())\n .indexOf(token.address);\n const wrappedToken =\n pool.wrappedIndex && pool.tokensList[pool.wrappedIndex];\n const tokenDecimals =\n token.decimals === undefined ? 18 : token.decimals;\n return {\n ...token,\n balance: formatFixed(result.poolTokens[1][idx], tokenDecimals),\n weight:\n (result.weights && formatFixed(result.weights[idx], 18)) ||\n token.weight,\n priceRate:\n (result.wrappedTokenRate &&\n wrappedToken &&\n wrappedToken.toLowerCase() === token.address.toLowerCase() &&\n formatFixed(result.wrappedTokenRate, 18)) ||\n token.priceRate,\n } as SubgraphToken;\n })\n : pool.tokens,\n totalShares: result.totalShares\n ? formatFixed(result.totalShares, 18)\n : pool.totalShares,\n swapFee: result.swapFee ? formatFixed(result.swapFee, 18) : pool.swapFee,\n amp:\n (result.amp &&\n result.amp[0] &&\n formatFixed(result.amp[0], String(result.amp[2]).length - 1)) ||\n pool.amp,\n lowerTarget:\n (result.targets && formatFixed(result.targets[0], 18)) || pool.lowerTarget,\n upperTarget:\n (result.targets && formatFixed(result.targets[1], 18)) || pool.upperTarget,\n tokenRates:\n (result.tokenRates &&\n result.tokenRates.map((rate) => formatFixed(rate, 18))) ||\n pool.tokenRates,\n // rate: result.rate,\n // isPaused: result.isPaused,\n // inRecoveryMode: result.inRecoveryMode,\n // scalingFactors: result.scalingFactors,\n});\n\nexport const fetchOnChainPoolData = async (\n pools: {\n id: string;\n address: string;\n poolType: string;\n poolTypeVersion?: number;\n }[],\n vaultAddress: string,\n provider: Provider,\n batchSize = 1024\n): Promise<{ [id: string]: OnchainData }> => {\n if (pools.length === 0) {\n return {};\n }\n\n const multicaller = new Multicaller3(abi, provider);\n\n pools.forEach(({ id, address, poolType, poolTypeVersion }) => {\n defaultCalls(id, address, vaultAddress, poolType, multicaller);\n poolTypeCalls(poolType, poolTypeVersion)(id, address, multicaller);\n });\n\n const results = (await multicaller.execute({}, batchSize)) as {\n [id: string]: OnchainData;\n };\n\n return results;\n};\n\nexport async function getOnChainBalances(\n subgraphPoolsOriginal: T[],\n _multiAddress: string,\n vaultAddress: string,\n provider: Provider,\n batchSize = 1024\n): Promise {\n if (subgraphPoolsOriginal.length === 0) return subgraphPoolsOriginal;\n\n const poolsWithOnchainData: T[] = [];\n\n const onchainData = (await fetchOnChainPoolData(\n subgraphPoolsOriginal,\n vaultAddress,\n provider,\n batchSize\n )) as { [id: string]: OnchainData };\n\n subgraphPoolsOriginal.forEach((pool) => {\n const data = onchainData[pool.id];\n poolsWithOnchainData.push(merge(pool, data));\n });\n\n return poolsWithOnchainData;\n}\n","import { PoolDataService, SubgraphPoolBase } from '@balancer-labs/sor';\nimport {\n OrderDirection,\n Pool_OrderBy,\n PoolsQueryVariables,\n SubgraphClient,\n} from '@/modules/subgraph/subgraph';\nimport { parseInt } from 'lodash';\nimport { getOnChainBalances } from './onChainData3';\nimport { Provider } from '@ethersproject/providers';\nimport {\n BalancerNetworkConfig,\n BalancerSdkSorConfig,\n GraphQLQuery,\n} from '@/types';\nimport { GraphQLArgs } from '@/lib/graphql/types';\nimport {\n GraphQLArgsBuilder,\n SubgraphArgsFormatter,\n} from '@/lib/graphql/args-builder';\n\nimport { Logger } from '@/lib/utils/logger';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function mapPools(pools: any[]): SubgraphPoolBase[] {\n return pools.map((pool) => ({\n ...pool,\n poolType: pool.poolType || '',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tokens: (pool.tokens || []).map((token: any) => ({\n ...token,\n weight: token.weight || null,\n })),\n totalWeight: pool.totalWeight || undefined,\n amp: pool.amp || undefined,\n expiryTime: pool.expiryTime ? parseInt(pool.expiryTime) : undefined,\n unitSeconds: pool.unitSeconds ? parseInt(pool.unitSeconds) : undefined,\n principalToken: pool.principalToken || undefined,\n baseToken: pool.baseToken || undefined,\n }));\n}\n\nexport class SubgraphPoolDataService implements PoolDataService {\n private readonly defaultArgs: GraphQLArgs;\n constructor(\n private readonly client: SubgraphClient,\n private readonly provider: Provider,\n private readonly network: BalancerNetworkConfig,\n private readonly sorConfig?: BalancerSdkSorConfig,\n query?: GraphQLQuery\n ) {\n // Default args can be overwritten by passing in a queryArgs object to .getPools\n this.defaultArgs = query?.args || {\n orderBy: Pool_OrderBy.TotalLiquidity,\n orderDirection: OrderDirection.Desc,\n where: {\n swapEnabled: {\n eq: true,\n },\n totalShares: {\n gt: 0.000000000001,\n },\n },\n };\n }\n\n /**\n * Returns pools from the subgraph filtered by queryArgs with on-chain balances\n *\n * @param queryArgs\n * @returns SubgraphPoolBase[]\n */\n async getPools(queryArgs?: GraphQLArgs): Promise {\n const pools = await this.getSubgraphPools(queryArgs);\n\n const filteredPools = pools.filter((p) => {\n if (!this.network.poolsToIgnore) return true;\n const index = this.network.poolsToIgnore.findIndex(\n (id) => id.toLowerCase() === p.id.toLowerCase()\n );\n return index === -1;\n });\n\n const mapped = mapPools(filteredPools);\n\n if (this.sorConfig && this.sorConfig.fetchOnChainBalances === false) {\n return mapped;\n }\n\n const logger = Logger.getInstance();\n logger.time(`fetching on-chain balances for ${mapped.length} pools`);\n\n const onChainBalances = await getOnChainBalances(\n mapped,\n this.network.addresses.contracts.multicall,\n this.network.addresses.contracts.vault,\n this.provider,\n this.network.multicallBatchSize\n );\n\n logger.timeEnd(`fetching on-chain balances for ${mapped.length} pools`);\n\n return onChainBalances;\n }\n\n private async getSubgraphPools(queryArgs?: GraphQLArgs) {\n const formattedQuery = new GraphQLArgsBuilder(\n queryArgs || this.defaultArgs\n ).format(new SubgraphArgsFormatter()) as PoolsQueryVariables;\n\n if (formattedQuery.first) {\n const { pools } = await this.client.Pools(formattedQuery);\n return pools;\n }\n\n const { pool0, pool1000, pool2000 } = await this.client.AllPools(\n formattedQuery\n );\n\n const pools = [...pool0, ...pool1000, ...pool2000];\n\n return pools;\n }\n}\n","import { TokenPriceService } from '@balancer-labs/sor';\nimport { SubgraphClient } from '@/modules/subgraph/subgraph';\nimport { keyBy } from 'lodash';\n\nexport class SubgraphTokenPriceService implements TokenPriceService {\n private readonly weth: string;\n\n constructor(private readonly client: SubgraphClient, weth: string) {\n //the subgraph addresses are all toLowerCase\n this.weth = weth.toLowerCase();\n }\n\n public async getNativeAssetPriceInToken(\n tokenAddress: string\n ): Promise {\n const ethPerToken = await this.getLatestPriceInEthFromSubgraph(\n tokenAddress\n );\n\n if (!ethPerToken) {\n throw Error('No price found in the subgraph');\n }\n\n // We want the price of 1 ETH in terms of the token base units\n return `${1 / ethPerToken}`;\n }\n\n public async getLatestPriceInEthFromSubgraph(\n tokenAddress: string\n ): Promise {\n tokenAddress = tokenAddress.toLowerCase();\n\n const { latestPrices } = await this.client.TokenLatestPrices({\n where: { asset_in: [tokenAddress, this.weth] },\n });\n const pricesKeyedOnId = keyBy(latestPrices, 'id');\n\n //the ids are set as ${asset}-${pricingAsset}\n //first try to find an exact match\n if (pricesKeyedOnId[`${tokenAddress}-${this.weth}`]) {\n return parseFloat(pricesKeyedOnId[`${tokenAddress}-${this.weth}`].price);\n }\n\n //no exact match, try to traverse the path\n const matchingLatestPrices = latestPrices.filter(\n (price) => price.asset === tokenAddress\n );\n\n //pick the first one we match on.\n //There is no timestamp on latestPrice, should get introduced to allow for sorting by latest\n for (const tokenPrice of matchingLatestPrices) {\n const pricingAssetPricedInEth =\n pricesKeyedOnId[`${tokenPrice.pricingAsset}-${this.weth}`];\n\n //1 BAL = 20 USDC, 1 USDC = 0.00025 ETH, 1 BAL = 20 * 0.00025\n if (pricingAssetPricedInEth) {\n return (\n parseFloat(tokenPrice.price) *\n parseFloat(pricingAssetPricedInEth.price)\n );\n }\n }\n\n return null;\n }\n}\n","import { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { BalancerNetworkConfig, BalancerSdkConfig } from '@/types';\nexport function getNetworkConfig(\n config: BalancerSdkConfig\n): BalancerNetworkConfig {\n if (typeof config.network === 'number') {\n const networkConfig = BALANCER_NETWORK_CONFIG[config.network];\n\n return {\n ...networkConfig,\n urls: {\n ...networkConfig.urls,\n subgraph: config.customSubgraphUrl ?? networkConfig.urls.subgraph,\n },\n tenderly: config.tenderly,\n };\n }\n\n return {\n ...config.network,\n urls: {\n ...config.network.urls,\n subgraph: config.customSubgraphUrl ?? config.network.urls.subgraph,\n },\n tenderly: config.network.tenderly,\n };\n}\n","export const POOLS_TO_IGNORE = [\n '0x00c2a4be503869fa751c2dbcb7156cc970b5a8da000000000000000000000477',\n '0x02d928e68d8f10c0358566152677db51e1e2dc8c00000000000000000000051e',\n '0x04248aabca09e9a1a3d5129a7ba05b7f17de768400000000000000000000050e',\n '0x05513ca725b6ce035ca2641075474eb469f05f4c00020000000000000000041f',\n '0x0a0fb4ff697de5ac5b6770cd8ee1b72af80b57cf000000000000000000000496',\n '0x0afbd58beca09545e4fb67772faf3858e610bcd00000000000000000000004b9',\n '0x0d05aac44ac7dd3c7ba5d50be93eb884a057d23400000000000000000000051c',\n '0x11839d635e2f0270da37e8ef4324d4d5d54329570002000000000000000004d8',\n '0x126e7643235ec0ab9c103c507642dc3f4ca23c66000000000000000000000468',\n '0x133d241f225750d2c92948e464a5a80111920331000000000000000000000476',\n '0x159cb00338fb63f263fd6f621df619cef71da9540000000000000000000004d5',\n '0x173063a30e095313eee39411f07e95a8a806014e0002000000000000000003ab',\n '0x1bd2f176a812e312077bca87e37c08432bb09f3e0000000000000000000005a1',\n '0x20b156776114e8a801e9767d90c6ccccc8adf398000000000000000000000499',\n '0x246ffb4d928e394a02e45761fecdba6c2e79b8eb000000000000000000000541',\n '0x25accb7943fd73dda5e23ba6329085a3c24bfb6a000200000000000000000387',\n '0x26c2b83fc8535deead276f5cc3ad9c1a2192e02700020000000000000000056b',\n '0x2b218683178d029bab6c9789b1073aa6c96e517600000000000000000000058c',\n '0x2ba7aa2213fa2c909cd9e46fed5a0059542b36b00000000000000000000003a3',\n '0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c0000000000000000000000fd',\n '0x2e52c64fd319e380cdbcfc4577ea1fda558a32e40002000000000000000005ba',\n '0x2f4eb100552ef93840d5adc30560e5513dfffacb000000000000000000000334',\n '0x2ff1a9dbdacd55297452cfd8a4d94724bc22a5f7000000000000000000000484',\n '0x3035917be42af437cbdd774be26b9ec90a2bd677000200000000000000000543',\n '0x331d50e0b00fc1c32742f151e56b9b616227e23e00000000000000000000047c',\n '0x334c96d792e4b26b841d28f53235281cec1be1f200020000000000000000038a',\n '0x335d1709d4da9aca59d16328db5cd4ea66bfe06b0000000000000000000004d6',\n '0x395d8a1d9ad82b5abe558f8abbfe183b27138af40000000000000000000004e5',\n '0x3bb22fc9033b802f2ac47c18885f63476f158afc000000000000000000000483',\n '0x3c640f0d3036ad85afa2d5a9e32be651657b874f00000000000000000000046b',\n '0x3cdae4f12a67ba563499e102f309c73213cb241c000000000000000000000335',\n '0x3dbb8d974b82e82ce79c20c0f5995f4f1f533ede000000000000000000000470',\n '0x3f7a7fd7f214be45ec26820fd01ac3be4fc75aa70002000000000000000004c5',\n '0x3fcb7085b8f2f473f80bf6d879cae99ea4de934400000000000000000000056d',\n '0x41503c9d499ddbd1dcdf818a1b05e9774203bf46000000000000000000000594',\n '0x4228290ee9cab692938ff0b4ba303fbcdb68e9f200020000000000000000057d',\n '0x454ed96955d04d2f5cdd05e0fd1c77975bfe5307000000000000000000000410',\n '0x481c5fc05d63a58aa2f0f2aa417c021b5d419cb200000000000000000000056a',\n '0x483006684f422a9448023b2382615c57c5ecf18f000000000000000000000488',\n '0x4a82b580365cff9b146281ab72500957a849abdc000000000000000000000494',\n '0x4c81255cc9ed7062180ea99962fe05ac0d57350b0000000000000000000005a3',\n '0x4c8d2e60863e8d7e1033eda2b3d84e92a641802000000000000000000000040f',\n '0x4cbde5c4b4b53ebe4af4adb85404725985406163000000000000000000000595',\n '0x4ce0bd7debf13434d3ae127430e9bd4291bfb61f00020000000000000000038b',\n '0x4ce277df0feb5b4d07a0ca2adcf5326e4005239d000000000000000000000518',\n '0x4fd4687ec38220f805b6363c3c1e52d0df3b5023000200000000000000000473',\n '0x4fd63966879300cafafbb35d157dc5229278ed230000000000000000000000e9',\n '0x50cf90b954958480b8df7958a9e965752f62712400000000000000000000046f',\n '0x53bc3cba3832ebecbfa002c12023f8ab1aa3a3a0000000000000000000000411',\n '0x5a6a8cffb4347ff7fc484bf5f0f8a2e234d34255000200000000000000000275',\n '0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b',\n '0x60683b05e9a39e3509d8fdb9c959f23170f8a0fa000000000000000000000489',\n '0x60d604890feaa0b5460b28a424407c24fe89374a0000000000000000000004fc',\n '0x639883476960a23b38579acfd7d71561a0f408cf000200000000000000000505',\n '0x652d486b80c461c397b0d95612a404da936f3db30000000000000000000000e7',\n '0x6667c6fa9f2b3fc1cc8d85320b62703d938e43850000000000000000000004fb',\n '0x6a1eb2e9b45e772f55bd9a34659a04b6f75da68700000000000000000000040d',\n '0x6c56e72c551b5ac4bf54a620a76077ca768c8fe40002000000000000000004da',\n '0x70b7d3b3209a59fb0400e17f67f3ee8c37363f4900020000000000000000018f',\n '0x7337224d59cb16c2dc6938cd45a7b2c60c865d6a0000000000000000000004d4',\n '0x74cbfaf94a3577c539a9dcee9870a6349a33b34f000000000000000000000534',\n '0x779d01f939d78a918a3de18cc236ee89221dfd4e0000000000000000000004c7',\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe',\n '0x804cdb9116a10bb78768d3252355a1b18067bf8f0000000000000000000000fb',\n '0x813e3fe1761f714c502d1d2d3a7cceb33f37f59d00000000000000000000040c',\n '0x82698aecc9e28e9bb27608bd52cf57f704bd1b83000000000000000000000336',\n '0x8a6b25e33b12d1bb6929a8793961076bd1f9d3eb0002000000000000000003e8',\n '0x8e6ec57a822c2f527f2df7c7d7d361df3e7530a1000000000000000000000498',\n '0x8f4063446f5011bc1c9f79a819efe87776f23704000000000000000000000197',\n '0x9001cbbd96f54a658ff4e6e65ab564ded76a543100000000000000000000050a',\n '0x9210f1204b5a24742eba12f710636d76240df3d00000000000000000000000fc',\n '0x9516a2d25958edb8da246a320f2c7d94a0dbe25d000000000000000000000519',\n '0x959216bb492b2efa72b15b7aacea5b5c984c3cca000200000000000000000472',\n '0x968024662b9566b42d78af23a0f441bc8723fa83000200000000000000000418',\n '0x99c88ad7dc566616548adde8ed3effa730eb6c3400000000000000000000049a',\n '0x9b1c8407a360443a9e5eca004713e4088fab8ac0000000000000000000000497',\n '0x9b692f571b256140a39a34676bffa30634c586e100000000000000000000059d',\n '0x9d7f992c900fbea0ec314bdd71b7cc1becf76a33000200000000000000000573',\n '0x9fb771d530b0ceba5160f7bfe2dd1e8b8aa1340300000000000000000000040e',\n '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d',\n '0xa1697f9af0875b63ddc472d6eebada8c1fab85680000000000000000000004f9',\n '0xa3823e50f20982656557a4a6a9c06ba5467ae9080000000000000000000000e6',\n '0xa718042e5622099e5f0ace4e7122058ab39e1bbe000200000000000000000475',\n '0xa8b103a10a94f4f2d7ed2fdcd5545e807557330700000000000000000000048e',\n '0xac5b4ef7ede2f2843a704e96dcaa637f4ba3dc3f00000000000000000000051d',\n '0xac976bb42cb0c85635644e8c7c74d0e0286aa61c0000000000000000000003cb',\n '0xae37d54ae477268b9997d4161b96b8200755935c000000000000000000000337',\n '0xae8535c23afedda9304b03c68a3563b75fc8f92b0000000000000000000005a0',\n '0xb0f75e97a114a4eb4a425edc48990e6760726709000000000000000000000198',\n '0xb5e3de837f869b0248825e0175da73d4e8c3db6b000200000000000000000474',\n '0xb841b062ea8ccf5c4cb78032e91de4ae875560420002000000000000000005b7',\n '0xb9bd68a77ccf8314c0dfe51bc291c77590c4e9e6000200000000000000000385',\n '0xbb6881874825e60e1160416d6c426eae65f2459e000000000000000000000592',\n '0xbc0f2372008005471874e426e86ccfae7b4de79d000000000000000000000485',\n '0xbf2ef8bdc2fc0f3203b3a01778e3ec5009aeef3300000000000000000000058d',\n '0xbfa413a2ff0f20456d57b643746133f54bfe0cd20000000000000000000004c3',\n '0xc2b021133d1b0cf07dba696fd5dd89338428225b000000000000000000000598',\n '0xc443c15033fcb6cf72cc24f1bda0db070ddd9786000000000000000000000593',\n '0xc50d4347209f285247bda8a09fc1c12ce42031c3000000000000000000000590',\n '0xc5dc1316ab670a2eed5716d7f19ced321191f38200000000000000000000056e',\n '0xc8c79fcd0e859e7ec81118e91ce8e4379a481ee6000000000000000000000196',\n '0xcaa052584b462198a5a9356c28bce0634d65f65c0000000000000000000004db',\n '0xcbfa4532d8b2ade2c261d3dd5ef2a2284f7926920000000000000000000004fa',\n '0xcfae6e251369467f465f13836ac8135bd42f8a56000000000000000000000591',\n '0xd4e7c1f3da1144c9e2cfd1b015eda7652b4a439900000000000000000000046a',\n '0xd6e355036f41dc261b3f1ed3bbc6003e87aadb4f000000000000000000000495',\n '0xd7edb56f63b2a0191742aea32df1f98ca81ed9c600000000000000000000058e',\n '0xd997f35c9b1281b82c8928039d14cddab5e13c2000000000000000000000019c',\n '0xdba274b4d04097b90a72b62467d828cefd708037000000000000000000000486',\n '0xdc063deafce952160ec112fa382ac206305657e60000000000000000000004c4',\n '0xdec02e6642e2c999af429f5ce944653cad15e093000000000000000000000469',\n '0xe03af00fabe8401560c1ff7d242d622a5b601573000000000000000000000493',\n '0xe0fcbf4d98f0ad982db260f86cf28b49845403c5000000000000000000000504',\n '0xe2d16b0a39f3fbb4389a0e8f1efcbecfb3d1e6e10000000000000000000005a7',\n '0xe4dc3c1998ac693d68f4c77476d7c815694c3e94000200000000000000000416',\n '0xe6bcc79f328eec93d4ec8f7ed35534d9ab549faa0000000000000000000000e8',\n '0xe8c56405bc405840154d9b572927f4197d110de10000000000000000000005a4',\n '0xeb486af868aeb3b6e53066abc9623b1041b42bc000000000000000000000046c',\n '0xeb567dde03f3da7fe185bdacd5ab495ab220769d000000000000000000000548',\n '0xec3626fee40ef95e7c0cbb1d495c8b67b34d398300000000000000000000053d',\n '0xf22ff21e17157340575158ad7394e068048dd98b0000000000000000000004b8',\n '0xf57c794f42da72b38c8f610ff3b5e8502e48cbde00000000000000000000055c',\n '0xf71d0774b214c4cf51e33eb3d30ef98132e4dbaa00000000000000000000046e',\n '0xfa24a90a3f2bbe5feea92b95cd0d14ce709649f900000000000000000000058f',\n '0xfd11ccdbdb7ab91cb9427a6d6bf570c95876d1950000000000000000000004c2',\n '0xfebb0bbf162e64fb9d0dfe186e517d84c395f016000000000000000000000502',\n '0xfef969638c52899f91781f1be594af6f40b99bad00000000000000000000047b',\n '0x02e139d53ebf4033bf78ab66c6a1e7f1f204487f0002000000000000000009f9',\n '0x03090a9811181a2afe830a3a0b467698ccf3a8b1000000000000000000000bf5',\n '0x0320c1c5b6df19a194d48882aaec1c72940081d9000000000000000000000a7d',\n '0x04b54ea92d73de2d62d651db7d9778f0c49157d8000200000000000000000ba2',\n '0x0503dd6b2d3dd463c9bef67fb5156870af63393e00000000000000000000042e',\n '0x0889b240a5876aae745ac19f1771853671dc5d36000000000000000000000b3f',\n '0x0bc54e914f53f98d16035f4f0d948f3e09c2fac0000200000000000000000bac',\n '0x0c06e87c7b88d998f645b91c1f53b51294b12bca000100000000000000000bb9',\n '0x10b040038f87219d9b42e025e3bd9b8095c87dd9000000000000000000000b11',\n '0x117a3d474976274b37b7b94af5dcade5c90c6e85000000000000000000000aca',\n '0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000a5f',\n '0x1379b816b9be611431d693290289c204720ca56d000100000000000000000b6f',\n '0x150e7b885bdfce974f2abe88a72fdbd692175c6f0002000000000000000009fd',\n '0x178e029173417b1f9c8bc16dcec6f697bc323746000000000000000000000758',\n '0x1aafc31091d93c3ff003cff5d2d8f7ba2e7284250000000000000000000003b3',\n '0x216690738aac4aa0c4770253ca26a28f0115c595000000000000000000000b2c',\n '0x216d6db0c28204014618482c369d7fbf0a8f3232000100000000000000000b60',\n '0x230ecdb2a7cee56d6889965a023aa0473d6da507000000000000000000000bf3',\n '0x252ff6a3a6fd7b5e8e999de8e3f5c3b306ed1401000200000000000000000bec',\n '0x25e57f4612912614e6c99616bd2abb9b5ae71e99000000000000000000000bf0',\n '0x2645b13fd2c5295296e94a76280b968bdcbbdfed000000000000000000000c11',\n '0x284eb68520c8fa83361c1a3a5910aec7f873c18b000000000000000000000ac9',\n '0x2c8dbe8eb86135d9f2f26d196748c088d47f73e7000200000000000000000a29',\n '0x31bccf9e28b94e5dacebaa67fe8bc1603cecd904000000000000000000000a01',\n '0x341068a547c3cde3c09e338714010dd01b32f93f000200000000000000000a34',\n '0x3db543faf7a92052de7860c5c9debabee59ed5bd000000000000000000000a62',\n '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd00000000000000000000070d',\n '0x3efb91c4f9b103ee45885695c67794591916f34e000200000000000000000b43',\n '0x402cfdb7781fa85d52f425352661128250b79e12000000000000000000000be3',\n '0x43894de14462b421372bcfe445fa51b1b4a0ff3d000000000000000000000b36',\n '0x4739e50b59b552d490d3fdc60d200977a38510c0000000000000000000000b10',\n '0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b',\n '0x4a0b73f0d13ff6d43e304a174697e3d5cfd310a400020000000000000000091c',\n '0x4a77ef015ddcd972fd9ba2c7d5d658689d090f1a000000000000000000000b38',\n '0x4ae3661afa119892f0cc8c43edaf6a94989ac171000000000000000000000c06',\n '0x4ccb966d8246240afb7a1a24628efb930870b1c40002000000000000000009fc',\n '0x52cc8389c6b93d740325729cc7c958066cee4262000000000000000000000b0f',\n '0x5b77107fcdf2b41903bab2bc555d4fc14cf7667d000000000000000000000b32',\n '0x5bae72b75caab1f260d21bc028c630140607d6e8000000000000000000000ac6',\n '0x600bd01b6526611079e12e1ff93aba7a3e34226f0000000000000000000009e4',\n '0x63ce19ccd39930725b8a3d2733627804718ab83d000000000000000000000bf2',\n '0x64efad69f099813021b41f4cac6e749fd55e188f000000000000000000000b39',\n '0x6933ec1ca55c06a894107860c92acdfd2dd8512f000000000000000000000428',\n '0x6abe4e7a497b8293c258389c1b00d177e4f257ed00010000000000000000080d',\n '0x6c8c7fc50247a47038015eb1fd5dc105d05dafba000200000000000000000ba0',\n '0x7079a25dec33be61bbd81b2fb69b468e80d3e72c0000000000000000000009ff',\n '0x71bd10c2a590b5858f5576550c163976a48af906000000000000000000000b27',\n '0x7c82a23b4c48d796dee36a9ca215b641c6a8709d000000000000000000000acd',\n '0x7f4f4942f2a14b6ab7b08b10ada1aacede4ee8d4000200000000000000000b44',\n '0x86aef31951e0a3a54333bd9e72f9a95587d058c5000200000000000000000912',\n '0x882c7a84231484b3e9f3fd45ac04b1eb5d35b076000200000000000000000a91',\n '0x894c82800526e0391e709c0983a5aea3718b7f6d000000000000000000000ac5',\n '0x89b28a9494589b09dbccb69911c189f74fdadc5a000000000000000000000b33',\n '0x89bb15076c9f2d86aa98ec6cffc1a71e31c38953000000000000000000000bf1',\n '0x89f1146fee52b5d9166e9c83cc388b6d8f69f1380001000000000000000009e7',\n '0x8a819a4cabd6efcb4e5504fe8679a1abd831dd8f00000000000000000000042d',\n '0x8b58a1e7fff52001c22386c2918d45938a6a9be30001000000000000000008d9',\n '0x8b8225bfedebaf1708c55743acb4ad43fd4d0f21000200000000000000000918',\n '0x8fbd0f8e490735cfc3abf4f29cbddd5c3289b9a7000000000000000000000b5b',\n '0x8fd39252d683fdb60bddd4df4b53c9380b496d59000200000000000000000b45',\n '0x9321e2250767d79bab5aa06daa8606a2b3b7b4c5000000000000000000000bf4',\n '0x949a12b95ec5b80c375b98963a5d6b33b0d0efff0002000000000000000009fe',\n '0x9a020bdc2faff5bd24c6acc2020d01ff9f2c627a000000000000000000000ae2',\n '0x9cf9358300e34bf9373d30129a1e718d8d058b54000200000000000000000913',\n '0x9e34631547adcf2f8cefa0f5f223955c7b137571000000000000000000000ad5',\n '0xa5a935833f6a5312715f182733eab088452335d7000100000000000000000bee',\n '0xa5fe91dde37d8bf2dacacc0168b115d28ed03f84000000000000000000000b35',\n '0xa8bf1c584519be0184311c48adbdc4c15cb2e8c1000000000000000000000bf6',\n '0xab269164a10fab22bc87c39946da06c870b172d6000000000000000000000bfc',\n '0xac2cae8d2f78a4a8f92f20dbe74042cd0a8d5af3000000000000000000000be2',\n '0xae646817e458c0be890b81e8d880206710e3c44e000000000000000000000acb',\n '0xaef2c171dbe64b0c18977e16e70bfd29d4ee0256000000000000000000000ac8',\n '0xb0c830dceb4ef55a60192472c20c8bf19df03488000000000000000000000be1',\n '0xb266ac3b7c98d7bcb28731dac0ef42dba1b276be000000000000000000000be4',\n '0xb371aa09f5a110ab69b39a84b5469d29f9b22b76000000000000000000000b37',\n '0xb3d658d5b95bf04e2932370dd1ff976fe18dd66a000000000000000000000ace',\n '0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e',\n '0xb59be8f3c85a9dd6e2899103b6fbf6ea405b99a4000000000000000000000b34',\n '0xb878ecce26838fbba4f78cb5b791a0e09152c067000000000000000000000427',\n '0xb973ca96a3f0d61045f53255e319aedb6ed4924000000000000000000000042f',\n '0xbd4e35784c832d0f9049b54cb3609e5907c5b495000100000000000000000b14',\n '0xc55ec796a4debe625d95436a3531f4950b11bdcf000000000000000000000b3e',\n '0xc7e6389e364f4275eb442ef215ed21877028e2af000000000000000000000ac7',\n '0xc83b55bbd005f1f84906545fcdb145dee53523e0000200000000000000000b30',\n '0xcb21a9e647c95127ed784626485b3104cb28d0e7000000000000000000000425',\n '0xd00f9ca46ce0e4a63067c4657986f0167b0de1e5000000000000000000000b42',\n '0xd2f3b9e67c69762dd1c88f1d3dadd1649a190761000200000000000000000bf7',\n '0xd4accb350f9cf59fe3cf7a5ee6ed9ace6a568ea9000200000000000000000b75',\n '0xda1cd1711743e57dd57102e9e61b75f3587703da000000000000000000000acc',\n '0xdae301690004946424e41051ace1791083be42a1000000000000000000000b40',\n '0xde0a77ab6689b980c30306b10f9131a007e1af81000200000000000000000ba1',\n '0xe051605a83deae38d26a7346b100ef1ac2ef8a0b0000000000000000000003ce',\n '0xe1fb90d0d3b47e551d494d7ebe8f209753526b01000000000000000000000ac4',\n '0xe2272cddb2cc408e79e02a73d1db9acc24a843d5000200000000000000000ba7',\n '0xe2dc0e0f2c358d6e31836dee69a558ab8d1390e70000000000000000000009fa',\n '0xe4885ed2818cc9e840a25f94f9b2a28169d1aea7000000000000000000000b29',\n '0xe6909c2f18a29d97217a6146f045e1780606991f000100000000000000000bfe',\n '0xe78b25c06db117fdf8f98583cdaaa6c92b79e917000000000000000000000b2b',\n '0xea11645ac7d8f2def94c9d8d86bd766296c9b6b6000000000000000000000b3a',\n '0xeb480dbbdd921cd6c359e4cc4c65ddea6395e2a1000200000000000000000946',\n '0xed35f28f837e96f81240ebb82e0e3f518c7e8a2f000100000000000000000bb5',\n '0xf0211cceebe6fcc45052b4e57ee95d233f5669d2000100000000000000000c01',\n '0xf22a66046b5307842f21b311ecb4c462c24c0635000000000000000000000b15',\n '0xf28f17be00f8ca3c9b7f66a4aad5513757fb3341000200000000000000000b5a',\n '0xf42ed61450458ee4620f5ef4f29adb25a6ef0fb6000000000000000000000bf8',\n '0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56000000000000000000000445',\n '0xf93579002dbe8046c43fefe86ec78b1112247bb8000000000000000000000759',\n '0xf984eb2b8a7ef780245a797a2fccd82f346409ca000000000000000000000a59',\n '0xfa2c0bd8327c99db5bde4c9e9e5cbf30946351bb000000000000000000000948',\n '0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea600000000000000000000075a',\n '0x1ac55c31dac78ca943cb8ebfca5945ce09e036e2000000000000000000000024',\n '0x225e0047671939a8d78e08ebd692788abe63f15c000000000000000000000009',\n '0x41211bba6d37f5a74b22e667533f080c7c7f3f1300000000000000000000000b',\n '0x4de21b365d6543661d0e105e579a34b963862497000200000000000000000045',\n '0x581ec1f5e7ced12b186deae32256adb53bdd5b08000000000000000000000001',\n '0x66f33ae36dd80327744207a48122f874634b3ada000100000000000000000013',\n '0xa3ed6f78edc29f69df8a0d16b1d1ccf9871f918c000000000000000000000032',\n '0xa611a551b95b205ccd9490657acf7899daee5db700000000000000000000002e',\n '0xb95829adbacd8af89e291dee78bc09e24de51d6b000000000000000000000043',\n '0xb973ca96a3f0d61045f53255e319aedb6ed49240000200000000000000000011',\n '0xba1a5b19d09a79dada039b1f974015c5a989d5fd000100000000000000000046',\n '0xbb9cd48d33033f5effbedec9dd700c7d7e1dcf5000000000000000000000000e',\n '0xd16f72b02da5f51231fde542a8b9e2777a478c8800000000000000000000000f',\n '0xd4015683b8153666190e0b2bec352580ebc4caca00000000000000000000000d',\n '0xe15cac1df3621e001f76210ab12a7f1a1691481f000000000000000000000044',\n '0xe7f88d7d4ef2eb18fcf9dd7216ba7da1c46f3dd600000000000000000000000a',\n '0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56000200000000000000000012',\n '0xfedb19ec000d38d92af4b21436870f115db22725000000000000000000000010',\n '0xffff76a3280e95dc855696111c2562da09db2ac000000000000000000000000c',\n '0x00fcd3d55085e998e291a0005cedecf58ac14c4000020000000000000000047f',\n '0x077794c30afeccdf5ad2abc0588e8cee7197b71a000000000000000000000352',\n '0x117a3d474976274b37b7b94af5dcade5c90c6e85000000000000000000000381',\n '0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000353',\n '0x19b1c92631405a0a9495ccba0becf4f2e8e908bd000000000000000000000410',\n '0x1e550b7764da9638fdd32c8a701364de31f45ee800000000000000000000047c',\n '0x1fa7f727934226aedab636d62a084931b97d366b000000000000000000000411',\n '0x23ca0306b21ea71552b148cf3c4db4fc85ae19290000000000000000000000c9',\n '0x284eb68520c8fa83361c1a3a5910aec7f873c18b000000000000000000000380',\n '0x2a96254ca32020b20ed3506f8f75318da24709f9000200000000000000000456',\n '0x36942963e3b6f37ecc45a4e72349558514233f0000000000000000000000048a',\n '0x3f53a862919ccfa023cb6ace91378a79fb0f6bf500000000000000000000040f',\n '0x40af308e3d07ec769d85eb80afb116525ff4ac99000000000000000000000485',\n '0x418de00ae109e6f874d872658767866d680eaa1900000000000000000000047d',\n '0x45c4d1376943ab28802b995acffc04903eb5223f000000000000000000000470',\n '0x4689122d360c4725d244c5cfea22861333d862e6000100000000000000000468',\n '0x4739e50b59b552d490d3fdc60d200977a38510c0000000000000000000000409',\n '0x49a0e3334496442a9706e481617724e7e37eaa080000000000000000000003ff',\n '0x519cce718fcd11ac09194cff4517f12d263be067000000000000000000000382',\n '0x52cc8389c6b93d740325729cc7c958066cee4262000000000000000000000408',\n '0x567ecfcb22205d279bb8eed3e066989902bf03d5000000000000000000000452',\n '0x585d95df0231fa08aeee35ff0c16b92fd0ecdc3300020000000000000000045f',\n '0x5a7f39435fd9c381e4932fa2047c9a5136a5e3e7000000000000000000000400',\n '0x5bae72b75caab1f260d21bc028c630140607d6e8000000000000000000000350',\n '0x6cb787a419c3e6ee2e9ff365856c29cd10659113000000000000000000000474',\n '0x7c82a23b4c48d796dee36a9ca215b641c6a8709d000000000000000000000406',\n '0x81fc12c60ee5b753cf5fd0adc342dfb5f3817e3200000000000000000000035d',\n '0x894c82800526e0391e709c0983a5aea3718b7f6d00000000000000000000034f',\n '0x970712708a08e8fb152be4d81b2dc586923f5369000200000000000000000479',\n '0x9bf7c3b63c77b4b4f2717776f15a4bec1b532a280000000000000000000000c8',\n '0x9cebf13bb702f253abf1579294694a1edad00eaa000000000000000000000486',\n '0x9e34631547adcf2f8cefa0f5f223955c7b137571000000000000000000000407',\n '0x9fb7d6dcac7b6aa20108bad226c35b85a9e31b63000200000000000000000412',\n '0xa1ea76c42b2938cfa9abea12357881006c52851300000000000000000000048f',\n '0xa50f89e9f439fde2a6fe05883721a00475da3c4500000000000000000000048b',\n '0xa612b6aed2e7ca1a3a4f23fbca9128461bbb7718000000000000000000000274',\n '0xa8af146d79ac0bb981e4e0d8b788ec5711b1d5d000000000000000000000047b',\n '0xad28940024117b442a9efb6d0f25c8b59e1c950b00000000000000000000046f',\n '0xae646817e458c0be890b81e8d880206710e3c44e00000000000000000000039d',\n '0xaef2c171dbe64b0c18977e16e70bfd29d4ee0256000000000000000000000351',\n '0xbbf9d705b75f408cfcaee91da32966124d2c6f7d00000000000000000000047e',\n '0xbd724eb087d4cc0f61a5fed1fffaf937937e14de000000000000000000000473',\n '0xbe0f30217be1e981add883848d0773a86d2d2cd4000000000000000000000471',\n '0xc46be4b8bb6b5a3d3120660efae9c5416318ed40000000000000000000000472',\n '0xc69771058481551261709d8db44977e9afde645000010000000000000000042a',\n '0xc6eee8cb7643ec2f05f46d569e9ec8ef8b41b389000000000000000000000475',\n '0xcba9ff45cfb9ce238afde32b0148eb82cbe635620000000000000000000003fd',\n '0xcf8b555b7754556cf2ac2165e77ee23ed8517d7900020000000000000000045e',\n '0xd0dc20e6342db2de82692b8dc842301ff9121805000200000000000000000454',\n '0xd3d5d45f4edf82ba0dfaf061d230766032a10e07000200000000000000000413',\n '0xd6d20527c7b0669989ee082b9d3a1c63af742290000000000000000000000483',\n '0xda1cd1711743e57dd57102e9e61b75f3587703da0000000000000000000003fc',\n '0xe1fb90d0d3b47e551d494d7ebe8f209753526b0100000000000000000000034e',\n '0xee02583596aee94cccb7e8ccd3921d955f17982a00000000000000000000040a',\n '0xf984eb2b8a7ef780245a797a2fccd82f346409ca00000000000000000000034d',\n '0xff8f84e8c87532af96aef5582ee451572233678b000200000000000000000478',\n '0x054e7b0c73e1ee5aed6864fa511658fc2b54bcaa000000000000000000000015',\n '0x3f1a2c4a3a751f6626bd90ef16e104f0772d4d6b00020000000000000000001b',\n '0x7275c131b1f67e8b53b4691f92b0e35a4c1c6e22000000000000000000000010',\n '0xa154009870e9b6431305f19b09f9cfd7284d4e7a000000000000000000000013',\n '0xa1d14d922a575232066520eda11e27760946c991000000000000000000000012',\n '0xa826a114b0c7db4d1ff4a4be845a78998c64564c000000000000000000000008',\n '0xea67626e1f0b59e0d172a04f5702ef90bcdf440c00000000000000000000000f',\n '0xeb496161099d45b3ea4892408ef745c6182eb56e00000000000000000000000e',\n '0xece571847897fd61e764d455dc15cf1cd9de8d6f000000000000000000000014',\n '0xed3e2f496cbcd8e212192fb8d1499842f04a0d19000000000000000000000009',\n '0x02c9dcb975262719a61f9b40bdf0987ead9add3a000000000000000000000006',\n '0x16c9a4d841e88e52b51936106010f27085a529ec00000000000000000000000c',\n '0x32be2d0ddeaf3333501b24a28668ce373ba8e763000200000000000000000014',\n '0x32f03464fdf909fdf3798f87ff3712b10c59bd86000000000000000000000005',\n '0x4b718e0e2fea1da68b763cd50c446fba03ceb2ea00000000000000000000000b',\n '0x68a69c596b3839023c0e08d09682314f582314e5000200000000000000000011',\n '0x6f34a44fce1506352a171232163e7716dd073ade000200000000000000000015',\n '0x9e2d87f904862671eb49cb358e74284762cc9f42000200000000000000000013',\n '0xac4b72c01072a52b73ca71105504f1372efcce0d000000000000000000000003',\n '0xbfd65c6160cfd638a85c645e6e6d8acac5dac935000000000000000000000004',\n '0xe274c9deb6ed34cfe4130f8d0a8a948dea5bb28600000000000000000000000d',\n];\n","import { TokenPriceService } from '@balancer-labs/sor';\nimport { gql, request } from 'graphql-request';\nimport { Network } from '@/types';\n\nexport class ApiTokenPriceService implements TokenPriceService {\n private chainKey: string;\n\n private balancerApiUrl = 'https://api-v3.balancer.fi/';\n\n private tokenPriceQuery = gql`\n query queryTokenPrices($chainKey: GqlChain!) {\n tokenGetCurrentPrices(chains: [$chainKey]) {\n address\n price\n }\n }\n `;\n\n constructor(private readonly chainId: number) {\n this.chainKey = Network[chainId];\n }\n async getNativeAssetPriceInToken(tokenAddress: string): Promise {\n const { tokenGetCurrentPrices: tokenPrices } = await request(\n this.balancerApiUrl,\n this.tokenPriceQuery,\n {\n chainKey: this.chainKey,\n }\n );\n const tokenPriceUsd = (\n tokenPrices as { address: string; price: number }[]\n ).find(\n ({ address }) => address.toLowerCase() === tokenAddress.toLowerCase()\n );\n if (!tokenPriceUsd) {\n throw new Error('Token Price not found in the API');\n }\n const nativeAssetPriceUsd = (\n tokenPrices as { address: string; price: number }[]\n ).find(\n ({ address }) =>\n address.toLowerCase() ===\n NativeAssetAddress[this.chainKey as keyof typeof NativeAssetAddress]\n );\n if (!nativeAssetPriceUsd) {\n throw new Error('Native Token Price not found in the API');\n }\n const tokenPriceInNativeAsset =\n tokenPriceUsd.price / nativeAssetPriceUsd.price;\n return String(tokenPriceInNativeAsset);\n }\n}\n\nenum NativeAssetAddress {\n MAINNET = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n POLYGON = '0x0000000000000000000000000000000000001010',\n ARBITRUM = '0x912ce59144191c1204e64559fe8253a0e49e6548',\n AVALANCHE = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n BASE = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n FANTOM = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n GNOSIS = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n OPTIMISM = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n ZKEVM = '0xa2036f0538221a77a3937f1379699f44945018d0',\n}\n","export function getCoingeckoApiBaseUrl(isDemoApi = true): string {\n if (isDemoApi) {\n return 'https://api.coingecko.com/api/v3/';\n }\n return 'https://pro-api.coingecko.com/api/v3/';\n}\n\nexport function getCoingeckoApiKeyHeaderName(isDemoApi = true): string {\n if (isDemoApi) {\n return 'x-cg-demo-api-key';\n }\n return 'x-cg-pro-api-key';\n}\n","import { TokenPriceService } from '@balancer-labs/sor';\nimport axios from 'axios';\nimport { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { Network, BalancerNetworkConfig, CoingeckoConfig } from '@/types';\nimport {\n getCoingeckoApiBaseUrl,\n getCoingeckoApiKeyHeaderName,\n} from '@/lib/utils/coingecko-api';\n\nexport class CoingeckoTokenPriceService implements TokenPriceService {\n private readonly urlBase: string;\n private readonly apiKey: string;\n private readonly coingeckoApiKeyHeaderName: string;\n constructor(private readonly chainId: number, coingecko: CoingeckoConfig) {\n this.urlBase = `${getCoingeckoApiBaseUrl(\n coingecko?.isDemoApiKey\n )}simple/token_price/${this.platformId}?vs_currencies=${\n this.nativeAssetId\n }`;\n this.coingeckoApiKeyHeaderName = getCoingeckoApiKeyHeaderName(\n coingecko?.isDemoApiKey\n );\n this.apiKey = coingecko.coingeckoApiKey;\n }\n\n public async getNativeAssetPriceInToken(\n tokenAddress: string\n ): Promise {\n const ethPerToken = await this.getTokenPriceInNativeAsset(tokenAddress);\n\n // We get the price of token in terms of ETH\n // We want the price of 1 ETH in terms of the token base units\n return `${1 / parseFloat(ethPerToken)}`;\n }\n\n /**\n * @dev Assumes that the native asset has 18 decimals\n * @param tokenAddress - the address of the token contract\n * @returns the price of 1 ETH in terms of the token base units\n */\n async getTokenPriceInNativeAsset(tokenAddress: string): Promise {\n const endpoint = `${this.urlBase}&contract_addresses=${tokenAddress}`;\n\n const { data } = await axios.get(endpoint, {\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n [this.coingeckoApiKeyHeaderName]: this.apiKey ?? '',\n },\n });\n\n if (\n data[tokenAddress.toLowerCase()] === undefined ||\n data[tokenAddress.toLowerCase()][this.nativeAssetId] === undefined\n ) {\n throw Error('No price returned from Coingecko');\n }\n\n return data[tokenAddress.toLowerCase()][this.nativeAssetId];\n }\n\n private get platformId(): string {\n const networkConfig: BalancerNetworkConfig =\n BALANCER_NETWORK_CONFIG[this.chainId as Network];\n return networkConfig.thirdParty.coingecko.platformId || '2';\n }\n\n private get nativeAssetId(): string {\n const networkConfig: BalancerNetworkConfig =\n BALANCER_NETWORK_CONFIG[this.chainId as Network];\n return networkConfig.thirdParty.coingecko.nativeAssetId || '';\n }\n}\n","import { SOR, SorConfig, TokenPriceService } from '@balancer-labs/sor';\nimport { Provider, JsonRpcProvider } from '@ethersproject/providers';\nimport { SubgraphPoolDataService } from './pool-data/subgraphPoolDataService';\nimport {\n SubgraphClient,\n createSubgraphClient,\n} from '@/modules/subgraph/subgraph';\nimport {\n BalancerNetworkConfig,\n BalancerSdkConfig,\n BalancerSdkSorConfig,\n CoingeckoConfig,\n} from '@/types';\nimport { SubgraphTokenPriceService } from './token-price/subgraphTokenPriceService';\nimport { getNetworkConfig } from '@/modules/sdk.helpers';\nimport { POOLS_TO_IGNORE } from '@/lib/constants/poolsToIgnore';\nimport { ApiTokenPriceService } from '@/modules/sor/token-price/apiTokenPriceService';\nimport { CoingeckoTokenPriceService } from '@/modules/sor/token-price/coingeckoTokenPriceService';\n\nexport class Sor extends SOR {\n constructor(sdkConfig: BalancerSdkConfig) {\n const network = getNetworkConfig(sdkConfig);\n const sorConfig = Sor.getSorConfig(sdkConfig);\n const sorNetworkConfig = Sor.getSorNetworkConfig(network);\n const provider = new JsonRpcProvider(\n sdkConfig.rpcUrl,\n sdkConfig.network as number\n );\n const subgraphClient = createSubgraphClient(network.urls.subgraph);\n\n const poolDataService = Sor.getPoolDataService(\n network,\n sorConfig,\n provider,\n subgraphClient\n );\n\n const tokenPriceService = Sor.getTokenPriceService(\n network,\n sorConfig,\n subgraphClient,\n sdkConfig.coingecko\n );\n\n super(provider, sorNetworkConfig, poolDataService, tokenPriceService);\n }\n\n private static getSorConfig(config: BalancerSdkConfig): BalancerSdkSorConfig {\n return {\n tokenPriceService: 'api',\n poolDataService: 'subgraph',\n fetchOnChainBalances: true,\n ...config.sor,\n };\n }\n\n private static getSorNetworkConfig(\n network: BalancerNetworkConfig\n ): SorConfig {\n return {\n ...network,\n vault: network.addresses.contracts.vault,\n weth: network.addresses.tokens.wrappedNativeAsset,\n lbpRaisingTokens: network.addresses.tokens?.lbpRaisingTokens,\n wETHwstETH: network.pools.wETHwstETH,\n connectingTokens: network.sorConnectingTokens,\n triPathMidPoolIds: network.sorTriPathMidPoolIds,\n };\n }\n\n private static getPoolDataService(\n network: BalancerNetworkConfig,\n sorConfig: BalancerSdkSorConfig,\n provider: Provider,\n subgraphClient: SubgraphClient\n ) {\n // For SOR we want to ignore all configured pools (for Vault/Simulation we don't)\n const allPoolsToIgnore = [\n ...(network.poolsToIgnore ?? []),\n ...POOLS_TO_IGNORE,\n ];\n return typeof sorConfig.poolDataService === 'object'\n ? sorConfig.poolDataService\n : new SubgraphPoolDataService(\n subgraphClient,\n provider,\n { ...network, poolsToIgnore: allPoolsToIgnore },\n sorConfig\n );\n }\n\n private static getTokenPriceService(\n network: BalancerNetworkConfig,\n sorConfig: BalancerSdkSorConfig,\n subgraphClient: SubgraphClient,\n coingeckoConfig?: CoingeckoConfig\n ): TokenPriceService {\n if (sorConfig.tokenPriceService === 'coingecko' && coingeckoConfig) {\n return new CoingeckoTokenPriceService(network.chainId, coingeckoConfig);\n }\n if (typeof sorConfig.tokenPriceService === 'object') {\n return sorConfig.tokenPriceService;\n } else if (sorConfig.tokenPriceService === 'subgraph') {\n return new SubgraphTokenPriceService(\n subgraphClient,\n network.addresses.tokens.wrappedNativeAsset\n );\n }\n return new ApiTokenPriceService(network.chainId);\n }\n}\n","import {\n QuerySimpleFlashSwapParameters,\n QuerySimpleFlashSwapResponse,\n SimpleFlashSwapParameters,\n SwapType,\n} from '../types';\nimport { queryBatchSwap } from '../queryBatchSwap';\nimport { BatchSwap } from '../types';\nimport { sum } from 'lodash';\n\nfunction checkSimpleFlashSwapParams(params: {\n poolIds: string[];\n assets: string[];\n}) {\n if (params.poolIds.length > 2) {\n throw new Error('Simple flash swap only supports a maximum of two pools');\n }\n\n if (params.assets.length > 2) {\n throw new Error(\n 'Simple flash swap only supports a maximum of to two assets (tokens)'\n );\n }\n}\n\nfunction createSwaps(\n poolIds: SimpleFlashSwapParameters['poolIds'],\n amount: string\n): BatchSwap['swaps'] {\n return [\n {\n poolId: poolIds[0],\n assetInIndex: 0,\n assetOutIndex: 1,\n amount,\n userData: '0x',\n },\n {\n poolId: poolIds[1],\n assetInIndex: 1,\n assetOutIndex: 0,\n amount: '0',\n userData: '0x',\n },\n ];\n}\n\nexport function convertSimpleFlashSwapToBatchSwapParameters({\n poolIds,\n assets,\n flashLoanAmount,\n walletAddress,\n}: SimpleFlashSwapParameters & {\n walletAddress: string;\n}): BatchSwap {\n checkSimpleFlashSwapParams({ poolIds, assets });\n\n const swaps = createSwaps(poolIds, flashLoanAmount);\n\n const funds = {\n sender: walletAddress,\n fromInternalBalance: false,\n recipient: walletAddress,\n toInternalBalance: false,\n };\n\n const limits = ['0', '0'];\n\n const deadline = '999999999999999999';\n\n return {\n kind: SwapType.SwapExactIn,\n swaps,\n assets,\n funds,\n limits,\n deadline,\n };\n}\n\nfunction deltaToExpectedProfit(delta: string) {\n return Number(delta) * -1;\n}\n\nfunction calcProfit(profits: string[]) {\n return sum(profits);\n}\n\n/**\n * Simple interface to test if a simple flash swap is valid and see potential profits.\n *\n * A \"simple\" flash swap is an arbitrage executed with only two tokens and two pools,\n * swapping in the first pool and then back in the second pool for a profit. For more\n * complex flash swaps, you will have to use the batch swap method.\n *\n * Learn more: A [Flash Swap](https://dev.balancer.fi/resources/swaps/flash-swaps).\n *\n * _NB: This method doesn't execute a flashSwap\n *\n * @param {SimpleFlashSwapParameters} params - BatchSwap information used for query.\n * @param {Contract} params.vaultContract - the ethersjs contract for the Balancer Vault.\n * @param {string} params.flashLoanAmount - initial input amount for the flash loan (first asset)\n * @param {string[]} params.poolIds - array of Balancer pool ids\n * @param {string[]} params.assets - array of token addresses\n * @returns {Promise} Returns an ethersjs transaction response\n */\nexport async function querySimpleFlashSwap(\n params: QuerySimpleFlashSwapParameters\n): Promise {\n checkSimpleFlashSwapParams(params);\n\n const [tokenAddress0, tokenAddress1] = params.assets;\n\n try {\n const deltas = await queryBatchSwap(\n params.vaultContract,\n SwapType.SwapExactIn,\n createSwaps(params.poolIds, params.flashLoanAmount),\n params.assets\n );\n\n const profits = {\n [tokenAddress0]: deltaToExpectedProfit(deltas[0]).toString(),\n [tokenAddress1]: deltaToExpectedProfit(deltas[1]).toString(),\n };\n\n return {\n profits,\n isProfitable:\n calcProfit([profits[tokenAddress0], profits[tokenAddress1]]) > 0,\n };\n } catch (err) {\n throw `Failed to querySimpleFlashSwap: ${err}`;\n }\n}\n","import { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { JsonFragment } from '@ethersproject/abi';\nimport { networkAddresses } from '@/lib/constants/config';\nimport { BatchRelayerLibrary__factory } from '@/contracts';\n\n/**\n * Maps SOR data to get the tokenIn used in swaps.\n * Logic related to a relayer wrapping and unwrapping tokens.\n * SOR returns list of already wrapped tokenAddresses used in the swap.\n * However tokenIn defined as an input is the unwrapped token.\n * Note: tokenAddresses are transformed in SOR lib wrapInfo.setWrappedInfo\n * TODO: Once PR is merged, this table can be removed.\n */\ntype WrappedList = {\n [key: string]: string;\n};\n\nconst underlyingToWrappedMap: WrappedList = {\n // stETH => wstETH\n '0xae7ab96520de3a18e5e111b5eaab095312d7fe84':\n '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',\n\n // AMPL => WAMPL\n '0xd46ba6d942050d489dbd938a2c909a5d5039a161':\n '0xedb171c18ce90b633db442f2a6f72874093b49ef',\n\n // aAMPL -> ubAAMPL\n '0x1e6bb68acec8fefbd87d192be09bb274170a0548':\n '0xF03387d8d0FF326ab586A58E0ab4121d106147DF',\n};\n\n/**\n * Vault swaps are operating on wrapped tokens. When user is sending an unwrapped token, it's wrapped in a relayer.\n * SOR is returning an array of tokens already wrapped.\n * Converts tokenIn to match tokenIn used in a swap.\n *\n * TODO: add tokenIn and tokenOut addressed used for swap in the SOR results as tokenInForSwap, tokenOutForSwap\n *\n * @param token token address\n * @returns wrapped token address\n */\nfunction tokenForSwaps(token: string): string {\n let wrapped = token;\n // eslint-disable-next-line no-prototype-builtins\n if (underlyingToWrappedMap.hasOwnProperty(token)) {\n wrapped = underlyingToWrappedMap[token as keyof WrappedList];\n }\n return wrapped;\n}\n\nexport enum Relayers {\n vault = 1,\n lido = 2,\n}\n\nexport interface SwapRelayer {\n id: Relayers;\n address: string;\n}\n\n/**\n * Resolves a contract address for sending swap transaction to.\n * Balancer is using relayers to automatically wrap / unwrap tokens not compatibile with ERC20.\n */\nfunction relayerResolver(\n assetIn: string,\n assetOut: string,\n chainId: number\n): SwapRelayer {\n const { tokens, contracts } = networkAddresses(chainId);\n\n let to = {\n id: Relayers.vault,\n address: contracts.vault,\n };\n\n if (tokens.stETH && contracts.lidoRelayer)\n if ([assetIn, assetOut].includes(tokens.stETH))\n to = {\n id: Relayers.lido,\n address: contracts.lidoRelayer,\n };\n\n return to;\n}\n\nfunction swapFragment(relayer: SwapRelayer): JsonFragment[] {\n if (relayer.id === Relayers.lido)\n return BatchRelayerLibrary__factory.abi.filter(\n (f) =>\n f.type === 'function' &&\n f.name &&\n ['swap', 'batchSwap'].includes(f.name)\n );\n else\n return Vault__factory.abi.filter(\n (f) =>\n f.type === 'function' &&\n f.name &&\n ['swap', 'batchSwap'].includes(f.name)\n );\n}\n\nfunction batchSwapFragment(\n assetIn: string,\n assetOut: string,\n chainId: number\n): JsonFragment[] {\n const { tokens, contracts } = networkAddresses(chainId);\n if (tokens.stETH && contracts.lidoRelayer) {\n if ([assetIn, assetOut].includes(tokens.stETH)) {\n const relayerSignaturesForSwaps = BatchRelayerLibrary__factory.abi.filter(\n (f) => f.type === 'function' && f.name === 'batchSwap'\n );\n return relayerSignaturesForSwaps;\n }\n }\n const vaultSignaturesForSwaps = Vault__factory.abi.filter(\n (f) => f.type === 'function' && f.name === 'batchSwap'\n );\n return vaultSignaturesForSwaps;\n}\n\nexport { tokenForSwaps, relayerResolver, swapFragment, batchSwapFragment };\n","import { SwapInfo } from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { tokenForSwaps } from './swap_utils';\nimport { SwapType } from '../types';\n\ninterface AmountForLimit {\n amount: BigNumber;\n max: (slippage: number) => BigNumber;\n min: (slippage: number) => BigNumber;\n}\n\ninterface SDKSwapInfo extends SwapInfo {\n /** Name mapping to improve readability. */\n amountIn: BigNumber;\n amountOut: BigNumber;\n /** Name mapping for amounts used specifically for limits calculations. */\n amountInForLimits: AmountForLimit;\n amountOutForLimits: AmountForLimit;\n /** Wrapped token addresses used in the swap. */\n tokenInForSwaps: string;\n tokenOutFromSwaps: string;\n}\n\n/** Applies slippage to a number */\nfunction amountForLimit(amount: BigNumber): AmountForLimit {\n return {\n amount,\n max: (maxSlippage: number): BigNumber => {\n return amount.mul(1e4 + maxSlippage).div(1e4);\n },\n min: (maxSlippage: number): BigNumber => {\n return amount.mul(1e4 - maxSlippage).div(1e4);\n },\n };\n}\n\nfunction decorateSorSwapInfo(\n swapInfo: SwapInfo,\n swapType: SwapType\n): SDKSwapInfo {\n const amountIn =\n swapType === SwapType.SwapExactIn\n ? swapInfo.swapAmount\n : swapInfo.returnAmount;\n const amountOut =\n swapType === SwapType.SwapExactIn\n ? swapInfo.returnAmount\n : swapInfo.swapAmount;\n const amountInForLimits =\n swapType === SwapType.SwapExactIn\n ? swapInfo.swapAmountForSwaps || swapInfo.swapAmount\n : swapInfo.returnAmountFromSwaps || swapInfo.returnAmount;\n const amountOutForLimits =\n swapType === SwapType.SwapExactIn\n ? swapInfo.returnAmountFromSwaps || swapInfo.returnAmount\n : swapInfo.swapAmountForSwaps || swapInfo.swapAmount;\n const tokenInForSwaps = tokenForSwaps(swapInfo.tokenIn);\n const tokenOutFromSwaps = tokenForSwaps(swapInfo.tokenOut);\n\n return {\n ...swapInfo,\n amountIn,\n amountOut,\n amountInForLimits: amountForLimit(amountInForLimits),\n amountOutForLimits: amountForLimit(amountOutForLimits),\n tokenInForSwaps,\n tokenOutFromSwaps,\n };\n}\n\nexport { SDKSwapInfo, tokenForSwaps, decorateSorSwapInfo };\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { FundManagement, SingleSwap, Swap, SwapType } from '../types';\nimport { Interface, JsonFragment } from '@ethersproject/abi';\nimport { SwapInfo } from '@balancer-labs/sor';\nimport { SDKSwapInfo, decorateSorSwapInfo } from './swap_info_decorator';\nimport { AddressZero } from '@ethersproject/constants';\nimport { swapFragment, relayerResolver, SwapRelayer } from './swap_utils';\n\nclass SingleSwapBuilder {\n private swapInfo: SDKSwapInfo;\n funds?: FundManagement;\n limit?: BigNumberish;\n deadline?: string;\n relayer: SwapRelayer;\n readonly functionName = 'swap';\n\n /**\n * Building swap transaction data\n *\n * @param swapInfo SOR result\n * @param kind\n * @param chainId used to resolve relayer addresses\n */\n constructor(\n swapInfo: SwapInfo,\n private readonly kind: SwapType,\n private readonly chainId: number\n ) {\n this.swapInfo = decorateSorSwapInfo(swapInfo, kind);\n this.relayer = relayerResolver(\n this.swapInfo.tokenIn,\n this.swapInfo.tokenOut,\n this.chainId\n );\n }\n\n setFunds(sender: string, recipient?: string): void {\n this.funds = {\n sender,\n recipient: recipient || sender,\n fromInternalBalance: false,\n toInternalBalance: false,\n };\n }\n\n /**\n * @param deadline block timestamp\n */\n setDeadline(deadline: string): void {\n this.deadline = deadline;\n }\n\n get amount(): BigNumber {\n return this.kind === SwapType.SwapExactOut\n ? this.swapInfo.amountOutForLimits.amount\n : this.swapInfo.amountInForLimits.amount;\n }\n\n /**\n * Calculates the limit for token amount.\n * https://dev.balancer.fi/guides/swaps/single-swaps\n * https://dev.balancer.fi/resources/swaps/single-swap\n *\n * For swap:\n * The meaning of limit depends on the value of kind\n * GIVEN_IN: The minimum amount of tokens we would accept to receive from the swap.\n * GIVEN_OUT: The maximum amount of tokens we would be sending to swap.\n *\n * @param maxSlippage [bps], eg: 1 === 0.01%, 100 === 1%\n */\n setLimits(maxSlippage: number): void {\n this.limit =\n this.kind === SwapType.SwapExactIn\n ? this.swapInfo.amountOutForLimits.min(maxSlippage).toString()\n : this.swapInfo.amountInForLimits.max(maxSlippage).toString();\n }\n\n get singleSwap(): SingleSwap {\n const poolId = this.swapInfo.swaps[0].poolId;\n const kind = this.kind;\n const assetIn = this.swapInfo.tokenInForSwaps;\n const assetOut = this.swapInfo.tokenOutFromSwaps;\n const amount = this.amount.toString();\n const userData = '0x';\n\n return {\n poolId,\n kind,\n assetIn,\n assetOut,\n amount,\n userData,\n };\n }\n\n attributes(): Swap {\n if (!this.funds || !this.limit || !this.deadline) {\n throw new Error('Uninitialized arguments');\n }\n\n // TODO: Raise errors when some parameters are missing\n let attrs: Swap = {\n request: this.singleSwap,\n funds: this.funds,\n limit: this.limit,\n deadline: this.deadline,\n };\n\n // TODO: Call this logic from a relayer module maybe? Do we actually need to do that?\n // additional parameters on a contract:\n // https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/standalone-utils/contracts/relayer/VaultActions.sol#L44\n const fragment = this.fragment();\n if (fragment[0].inputs && fragment[0].inputs?.length > 4) {\n attrs = {\n ...attrs,\n value: '0',\n outputReference: '0',\n };\n }\n\n return attrs;\n }\n\n data(): string {\n const contractInterface = new Interface(this.fragment());\n\n return contractInterface.encodeFunctionData(\n 'swap',\n Object.values(this.attributes())\n );\n }\n\n value(maxSlippage: number): BigNumber {\n let amount = BigNumber.from(0);\n if (this.swapInfo.tokenIn === AddressZero)\n amount =\n this.kind === SwapType.SwapExactIn\n ? this.swapInfo.amountIn\n : this.swapInfo.amountInForLimits.max(maxSlippage);\n return amount;\n }\n\n to(): string {\n return this.relayer.address;\n }\n\n private fragment(): JsonFragment[] {\n return swapFragment(this.relayer).filter(\n (f) => f.name === this.functionName\n );\n }\n}\n\nexport { SingleSwapBuilder };\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { BatchSwap, FundManagement, SwapType } from '../types';\nimport { Interface, JsonFragment } from '@ethersproject/abi';\nimport { SwapInfo } from '@balancer-labs/sor';\nimport { SDKSwapInfo, decorateSorSwapInfo } from './swap_info_decorator';\nimport { AddressZero } from '@ethersproject/constants';\nimport { swapFragment, relayerResolver, SwapRelayer } from './swap_utils';\n\nclass BatchSwapBuilder {\n private swapInfo: SDKSwapInfo;\n funds?: FundManagement;\n limits?: BigNumberish[];\n deadline?: string;\n relayer: SwapRelayer;\n readonly functionName = 'batchSwap';\n\n /**\n * Building swap transaction data\n *\n * @param swapInfo SOR result\n * @param kind\n */\n constructor(\n swapInfo: SwapInfo,\n private readonly kind: SwapType,\n private readonly chainId: number\n ) {\n this.swapInfo = decorateSorSwapInfo(swapInfo, kind);\n this.relayer = relayerResolver(\n this.swapInfo.tokenIn,\n this.swapInfo.tokenOut,\n this.chainId\n );\n }\n\n setFunds(sender: string, recipient?: string): void {\n this.funds = {\n sender,\n recipient: recipient || sender,\n fromInternalBalance: false,\n toInternalBalance: false,\n };\n }\n\n /**\n * @param deadline block timestamp\n */\n setDeadline(deadline: string): void {\n this.deadline = deadline;\n }\n\n /**\n * Given IN it's the minimum amount we are willing to accept.\n * Given OUT it's the fixed amount defined as output.\n */\n minAmountOut(maxSlippage: number): BigNumber {\n return this.kind === SwapType.SwapExactIn\n ? this.swapInfo.amountOutForLimits.min(maxSlippage)\n : this.swapInfo.amountOutForLimits.amount;\n }\n\n /**\n * Given IN it's the fixed amount we define as input.\n * Given OUT it's the maximum amount we are willing to pay for the request.\n */\n maxAmountIn(maxSlippage: number): BigNumber {\n return this.kind === SwapType.SwapExactOut\n ? this.swapInfo.amountInForLimits.max(maxSlippage)\n : this.swapInfo.amountInForLimits.amount;\n }\n\n /**\n * Calculates limits for token amount.\n * Maximum number of tokens to send is a positive number\n * Minimum amount of tokens to receive is a negative number\n * https://dev.balancer.fi/guides/swaps/batch-swaps\n * https://dev.balancer.fi/resources/swaps/batch-swaps#multi-hop-examples\n *\n * For batchSwap:\n * An array of of the maximum net amounts of each asset which can be taken to perform the swap.\n * Should the total trade require more than limits[i] tokens to be taken from sender for any i\n * then the transaction shall fail.\n *\n * @param maxSlippage [bps], eg: 1 === 0.01%, 100 === 1%\n */\n setLimits(maxSlippage: number): void {\n // TODO: This implementation handles only a single input. We might want to extend it for multiple token inputs\n this.limits = this.swapInfo.tokenAddresses\n .map((token) => {\n let amount = BigNumber.from(0);\n if (token === this.swapInfo.tokenInForSwaps) {\n amount = this.maxAmountIn(maxSlippage);\n }\n if (token === this.swapInfo.tokenOutFromSwaps) {\n amount = this.minAmountOut(maxSlippage).mul(-1);\n }\n return amount;\n })\n .map((limit) => limit.toString().split('.')[0]);\n }\n\n attributes(): BatchSwap {\n // TODO: Raise errors when some parameters are missing\n if (!this.funds || !this.limits || !this.deadline) {\n throw new Error('Uninitialized arguments');\n }\n\n let attrs: BatchSwap = {\n kind: this.kind,\n swaps: this.swapInfo.swaps,\n assets: this.swapInfo.tokenAddresses,\n funds: this.funds,\n limits: this.limits,\n deadline: this.deadline,\n };\n\n const fragment = this.fragment();\n\n // TODO: Call this logic from a relayer module maybe? Do we actually need to do that?\n // additional parameters on a contract:\n // https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/standalone-utils/contracts/relayer/VaultActions.sol#L67\n if (fragment[0].inputs && fragment[0].inputs?.length > 6) {\n attrs = {\n ...attrs,\n value: '0',\n outputReferences: [],\n };\n }\n\n return attrs;\n }\n\n data(): string {\n const contractInterface = new Interface(this.fragment());\n\n return contractInterface.encodeFunctionData(\n 'batchSwap',\n Object.values(this.attributes())\n );\n }\n\n value(maxSlippage: number): BigNumber {\n let amount = BigNumber.from(0);\n if (this.swapInfo.tokenIn === AddressZero)\n amount = this.maxAmountIn(maxSlippage);\n return amount;\n }\n\n to(): string {\n return this.relayer.address;\n }\n\n private fragment(): JsonFragment[] {\n return swapFragment(this.relayer).filter(\n (f) => f.name === this.functionName\n );\n }\n}\n\nexport { BatchSwapBuilder };\n","import { SOR, SubgraphPoolBase, SwapInfo, SwapTypes } from '@balancer-labs/sor';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { Vault } from '@/contracts/Vault';\nimport {\n BatchSwap,\n QuerySimpleFlashSwapParameters,\n QuerySimpleFlashSwapResponse,\n SimpleFlashSwapParameters,\n FindRouteParameters,\n BuildTransactionParameters,\n SwapAttributes,\n SwapType,\n TokenAmounts,\n SwapsOptions,\n} from './types';\nimport { queryBatchSwap, getSorSwapInfo } from './queryBatchSwap';\nimport { balancerVault } from '@/lib/constants/config';\nimport { getLimitsForSlippage } from './helpers';\nimport { BalancerSdkConfig } from '@/types';\nimport { SwapInput } from './types';\nimport { Sor } from '@/modules/sor/sor.module';\nimport {\n convertSimpleFlashSwapToBatchSwapParameters,\n querySimpleFlashSwap,\n} from './flashSwap';\nimport {\n SingleSwapBuilder,\n BatchSwapBuilder,\n} from '@/modules/swaps/swap_builder';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport { GraphQLArgs } from '@/lib/graphql';\n\nconst buildRouteDefaultOptions = {\n maxPools: 4,\n gasPrice: '1',\n deadline: '999999999999999999',\n maxSlippage: 10, // in bspt, eg: 10 = 0.1%\n};\n\nexport class Swaps {\n readonly sor: SOR;\n chainId: number;\n vaultContract: Vault;\n\n // TODO: sorOrConfig - let's make it more predictable and always pass configuration explicitly\n constructor(sorOrConfig: SOR | BalancerSdkConfig) {\n if (sorOrConfig instanceof SOR) {\n this.sor = sorOrConfig;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.chainId = (this.sor.provider)['_network']['chainId'];\n } else {\n this.sor = new Sor(sorOrConfig);\n if (typeof sorOrConfig.network === 'number')\n this.chainId = sorOrConfig.network as number;\n else this.chainId = sorOrConfig.network.chainId;\n }\n\n this.vaultContract = Vault__factory.connect(\n balancerVault,\n this.sor.provider\n );\n }\n\n static getLimitsForSlippage(\n tokensIn: string[],\n tokensOut: string[],\n swapType: SwapType,\n deltas: string[],\n assets: string[],\n slippage: string\n ): string[] {\n // TO DO - Check best way to do this?\n const limits = getLimitsForSlippage(\n tokensIn,\n tokensOut,\n swapType,\n deltas,\n assets,\n slippage\n );\n\n return limits.map((l) => l.toString());\n }\n\n /**\n * Uses SOR to find optimal route for a trading pair and amount\n *\n * @param FindRouteParameters\n * @param FindRouteParameters.tokenIn Address\n * @param FindRouteParameters.tokenOut Address\n * @param FindRouteParameters.amount BigNumber with a trade amount\n * @param FindRouteParameters.gasPrice BigNumber current gas price\n * @param FindRouteParameters.maxPools number of pool included in path, default 4\n * @returns Best trade route information\n */\n async findRouteGivenIn({\n tokenIn,\n tokenOut,\n amount,\n gasPrice,\n maxPools = 4,\n }: FindRouteParameters): Promise {\n return this.sor.getSwaps(tokenIn, tokenOut, SwapTypes.SwapExactIn, amount, {\n gasPrice,\n maxPools,\n });\n }\n\n /**\n * Uses SOR to find optimal route for a trading pair and amount\n *\n * @param FindRouteParameters\n * @param FindRouteParameters.tokenIn Address\n * @param FindRouteParameters.tokenOut Address\n * @param FindRouteParameters.amount BigNumber with a trade amount\n * @param FindRouteParameters.gasPrice BigNumber current gas price\n * @param FindRouteParameters.maxPools number of pool included in path, default 4\n * @returns Best trade route information\n */\n async findRouteGivenOut({\n tokenIn,\n tokenOut,\n amount,\n gasPrice,\n maxPools = 4,\n }: FindRouteParameters): Promise {\n return this.sor.getSwaps(\n tokenIn,\n tokenOut,\n SwapTypes.SwapExactOut,\n amount,\n {\n gasPrice,\n maxPools,\n }\n );\n }\n\n /**\n * Uses SOR to find optimal route for a trading pair and amount\n *\n * @param BuildTransactionParameters\n * @param BuildTransactionParameters.userAddress Address\n * @param BuildTransactionParameters.swapInfo result of route finding\n * @param BuildTransactionParameters.kind 0 - givenIn, 1 - givenOut\n * @param BuildTransactionParameters.deadline block linux timestamp as string\n * @param BuildTransactionParameters.maxSlippage [bps], eg: 1 === 0.01%, 100 === 1%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildSwap({\n userAddress,\n recipient,\n swapInfo,\n kind,\n deadline,\n maxSlippage,\n }: BuildTransactionParameters): SwapAttributes {\n if (!this.chainId) throw 'Missing network configuration';\n\n // one vs batch (gas cost optimisation when using single swap)\n const builder =\n swapInfo.swaps.length > 1\n ? new BatchSwapBuilder(swapInfo, kind, this.chainId)\n : new SingleSwapBuilder(swapInfo, kind, this.chainId);\n builder.setFunds(userAddress, recipient);\n builder.setDeadline(deadline);\n builder.setLimits(maxSlippage);\n\n const to = builder.to();\n const { functionName } = builder;\n const attributes = builder.attributes();\n const data = builder.data();\n const value = builder.value(maxSlippage);\n\n return { to, functionName, attributes, data, value };\n }\n\n /**\n * Uses SOR to find optimal route for a trading pair and amount\n * and builds a transaction request\n *\n * @param sender Sender of the swap\n * @param recipient Reciever of the swap\n * @param tokenIn Address of tokenIn\n * @param tokenOut Address of tokenOut\n * @param amount Amount of tokenIn to swap as a string with 18 decimals precision\n * @param options\n * @param options.maxPools number of pool included in path\n * @param options.gasPrice BigNumber current gas price\n * @param options.deadline BigNumber block timestamp\n * @param options.maxSlippage [bps], eg: 1 === 0.01%, 100 === 1%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n async buildRouteExactIn(\n sender: string,\n recipient: string,\n tokenIn: string,\n tokenOut: string,\n amount: string,\n options: SwapsOptions = buildRouteDefaultOptions\n ): Promise {\n const opts = {\n ...buildRouteDefaultOptions,\n ...options,\n };\n\n const swapInfo = await this.findRouteGivenIn({\n tokenIn,\n tokenOut,\n amount: BigNumber.from(amount),\n gasPrice: BigNumber.from(opts.gasPrice),\n maxPools: opts.maxPools,\n });\n\n const tx = this.buildSwap({\n userAddress: sender, // sender account\n recipient, // recipient account\n swapInfo, // result from the previous step\n kind: SwapType.SwapExactIn, // or SwapExactOut\n deadline: opts.deadline, // BigNumber block timestamp\n maxSlippage: opts.maxSlippage, // [bps], eg: 1 == 0.01%, 100 == 1%\n });\n\n // TODO: add query support\n // query will be a function that returns the deltas for the swap in { [address: string]: string } format\n // const query = this.queryBatchSwap(tx);\n\n return tx;\n }\n\n /**\n * Encode batchSwap in an ABI byte string\n *\n * [See method for a batchSwap](https://dev.balancer.fi/references/contracts/apis/the-vault#batch-swaps).\n *\n * _NB: This method doesn't execute a batchSwap -- it returns an [ABI byte string](https://docs.soliditylang.org/en/latest/abi-spec.html)\n * containing the data of the function call on a contract, which can then be sent to the network to be executed.\n * (ex. [sendTransaction](https://web3js.readthedocs.io/en/v1.2.11/web3-eth.html#sendtransaction)).\n *\n * @param {BatchSwap} batchSwap - BatchSwap information used for query.\n * @param {SwapType} batchSwap.kind - either exactIn or exactOut\n * @param {BatchSwapSteps[]} batchSwap.swaps - sequence of swaps\n * @param {string[]} batchSwap.assets - array contains the addresses of all assets involved in the swaps\n * @param {FundManagement} batchSwap.funds - object containing information about where funds should be taken/sent\n * @param {number[]} batchSwap.limits - limits for each token involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the minimum amount of tokens to receive (by passing a negative value) is specified\n * @param {string} batchSwap.deadline - time (in Unix timestamp) after which it will no longer attempt to make a trade\n * @returns {string} encodedBatchSwapData - Returns an ABI byte string containing the data of the function call on a contract\n */\n static encodeBatchSwap(batchSwap: BatchSwap): string {\n const vaultInterface = Vault__factory.createInterface();\n\n return vaultInterface.encodeFunctionData('batchSwap', [\n batchSwap.kind,\n batchSwap.swaps,\n batchSwap.assets,\n batchSwap.funds,\n batchSwap.limits,\n batchSwap.deadline,\n ]);\n }\n\n /**\n * Encode simple flash swap into a ABI byte string\n *\n * A \"simple\" flash swap is an arbitrage executed with only two tokens and two pools,\n * swapping in the first pool and then back in the second pool for a profit. For more\n * complex flash swaps, you will have to use the batch swap method.\n *\n * Learn more: A [Flash Swap](https://dev.balancer.fi/resources/swaps/flash-swaps).\n *\n * @param {SimpleFlashSwapParameters} params - BatchSwap information used for query.\n * @param {string} params.flashLoanAmount - initial input amount for the flash loan (first asset)\n * @param {string[]} params.poolIds - array of Balancer pool ids\n * @param {string[]} params.assets - array of token addresses\n * @param {string} params.walletAddress - array of token addresses\n * @returns {string} encodedBatchSwapData - Returns an ABI byte string containing the data of the function call on a contract\n */\n static encodeSimpleFlashSwap(params: SimpleFlashSwapParameters): string {\n return this.encodeBatchSwap(\n convertSimpleFlashSwapToBatchSwapParameters(params)\n );\n }\n\n /**\n * fetchPools saves updated pools data to SOR internal onChainBalanceCache.\n *\n * @returns Boolean indicating whether pools data was fetched correctly (true) or not (false).\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async fetchPools(queryArgs?: GraphQLArgs): Promise {\n return this.sor.fetchPools(queryArgs);\n }\n\n public getPools(): SubgraphPoolBase[] {\n return this.sor.getPools();\n }\n\n /**\n * queryBatchSwap simulates a call to `batchSwap`, returning an array of Vault asset deltas.\n * @param batchSwap - BatchSwap information used for query.\n * @param {SwapType} batchSwap.kind - either exactIn or exactOut.\n * @param {BatchSwapStep[]} batchSwap.swaps - sequence of swaps.\n * @param {string[]} batchSwap.assets - array contains the addresses of all assets involved in the swaps.\n * @returns {Promise} Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\n * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\n * the same index in the `assets` array.\n */\n async queryBatchSwap(\n batchSwap: Pick\n ): Promise {\n return await queryBatchSwap(\n this.vaultContract,\n batchSwap.kind,\n batchSwap.swaps,\n batchSwap.assets\n );\n }\n\n /**\n * Simple interface to test if a simple flash swap is valid and see potential profits.\n *\n * A \"simple\" flash swap is an arbitrage executed with only two tokens and two pools,\n * swapping in the first pool and then back in the second pool for a profit. For more\n * complex flash swaps, you will have to use the batch swap method.\n *\n * Learn more: A [Flash Swap](https://dev.balancer.fi/resources/swaps/flash-swaps).\n *\n * _NB: This method doesn't execute a flashSwap\n *\n * @param {SimpleFlashSwapParameters} params - BatchSwap information used for query.\n * @param {string} params.flashLoanAmount - initial input amount for the flash loan (first asset)\n * @param {string[]} params.poolIds - array of Balancer pool ids\n * @param {string[]} params.assets - array of token addresses\n * @returns {Promise<{profits: Record, isProfitable: boolean}>} Returns an ethersjs transaction response\n */\n async querySimpleFlashSwap(\n params: Omit\n ): Promise {\n return await querySimpleFlashSwap({\n ...params,\n vaultContract: this.vaultContract,\n });\n }\n\n /**\n * Use SOR to get swapInfo for tokenIn<>tokenOut.\n * @param {SwapInput} swapInput - Swap information used for querying using SOR.\n * @param {string} swapInput.tokenIn - Addresse of asset in.\n * @param {string} swapInput.tokenOut - Addresse of asset out.\n * @param {SwapType} swapInput.swapType - Type of Swap, ExactIn/Out.\n * @param {string} swapInput.amount - Amount used in swap.\n * @returns {Promise} SOR swap info.\n */\n async getSorSwap(swapInput: SwapInput): Promise {\n return await getSorSwapInfo(\n swapInput.tokenIn,\n swapInput.tokenOut,\n swapInput.swapType,\n swapInput.amount,\n this.sor\n );\n }\n\n async queryExactIn(swap: SwapInfo): Promise {\n const deltas = await this.query(swap, SwapType.SwapExactIn);\n return this.assetDeltas(deltas.map(String), swap.tokenAddresses);\n }\n\n async queryExactOut(swap: SwapInfo): Promise {\n const deltas = await this.query(swap, SwapType.SwapExactOut);\n return this.assetDeltas(deltas.map(String), swap.tokenAddresses);\n }\n\n private query(swap: SwapInfo, kind: SwapType): Promise {\n const { swaps, tokenAddresses: assets } = swap;\n\n const funds = {\n sender: AddressZero,\n recipient: AddressZero,\n fromInternalBalance: false,\n toInternalBalance: false,\n };\n\n return this.vaultContract.callStatic.queryBatchSwap(\n kind,\n swaps,\n assets,\n funds\n );\n }\n\n private assetDeltas(deltas: string[], assets: string[]): TokenAmounts {\n return Object.fromEntries(deltas.map((delta, idx) => [assets[idx], delta]));\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\n\nimport { ExitPoolRequest, JoinPoolRequest } from '@/types';\nimport { SwapType, BatchSwapStep, FundManagement } from '@/modules/swaps/types';\n\nexport enum PoolKind {\n WEIGHTED = 0,\n LEGACY_STABLE,\n COMPOSABLE_STABLE,\n COMPOSABLE_STABLE_V2,\n}\n\nexport type OutputReference = {\n index: number;\n key: BigNumber;\n};\n\nexport interface EncodeBatchSwapInput {\n swapType: SwapType;\n swaps: BatchSwapStep[];\n assets: string[];\n funds: FundManagement;\n limits: string[];\n deadline: BigNumberish;\n value: BigNumberish;\n outputReferences: OutputReference[];\n}\n\nexport interface EncodeExitPoolInput {\n poolId: string;\n poolKind: number;\n sender: string;\n recipient: string;\n outputReferences: OutputReference[];\n exitPoolRequest: ExitPoolRequest;\n}\n\nexport interface EncodeJoinPoolInput {\n poolId: string;\n kind: number;\n sender: string;\n recipient: string;\n joinPoolRequest: JoinPoolRequest;\n value: BigNumberish;\n outputReference: string;\n}\n\nexport interface EncodeWrapAaveDynamicTokenInput {\n staticToken: string;\n sender: string;\n recipient: string;\n amount: BigNumberish;\n fromUnderlying: boolean;\n outputReference: BigNumberish;\n}\n\nexport interface EncodeUnwrapAaveStaticTokenInput {\n staticToken: string;\n sender: string;\n recipient: string;\n amount: BigNumberish;\n toUnderlying: boolean;\n outputReference: BigNumberish;\n}\n\nexport interface EncodeUnwrapInput {\n wrappedToken: string;\n sender: string;\n recipient: string;\n amount: BigNumberish;\n outputReference: BigNumberish;\n}\n\nexport interface EncodeUnwrapWstETHInput {\n sender: string;\n recipient: string;\n amount: BigNumberish;\n outputReference: BigNumberish;\n}\n\nexport type ExitPoolData = ExitPoolRequest & EncodeExitPoolInput;\nexport type JoinPoolData = JoinPoolRequest & EncodeJoinPoolInput;\n","import { JsonRpcSigner } from '@ethersproject/providers';\nimport { BigNumberish, BigNumber } from '@ethersproject/bignumber';\nimport { MaxUint256 } from '@ethersproject/constants';\nimport { BatchRelayerLibrary__factory } from '@/contracts';\nimport { IVault, Vault } from '@/contracts/Vault';\nimport {\n EncodeBatchSwapInput,\n EncodeExitPoolInput,\n EncodeJoinPoolInput,\n EncodeUnwrapAaveStaticTokenInput,\n EncodeUnwrapInput,\n EncodeUnwrapWstETHInput,\n EncodeWrapAaveDynamicTokenInput,\n ExitPoolData,\n JoinPoolData,\n} from './types';\nimport { ExitPoolRequest, JoinPoolRequest } from '@/types';\nimport { Swap } from '../swaps/types';\nimport { RelayerAuthorization } from '@/lib/utils';\nimport FundManagementStruct = IVault.FundManagementStruct;\nimport SingleSwapStruct = IVault.SingleSwapStruct;\n\nexport * from './types';\n\nconst relayerLibrary = BatchRelayerLibrary__factory.createInterface();\n\nexport class Relayer {\n static CHAINED_REFERENCE_TEMP_PREFIX = 'ba10'; // Temporary reference: it is deleted after a read.\n static CHAINED_REFERENCE_READONLY_PREFIX = 'ba11'; // Read-only reference: it is not deleted after a read.\n\n static encodeApproveVault(tokenAddress: string, maxAmount: string): string {\n return relayerLibrary.encodeFunctionData('approveVault', [\n tokenAddress,\n maxAmount,\n ]);\n }\n\n static encodeSetRelayerApproval(\n relayerAdress: string,\n approved: boolean,\n authorisation: string\n ): string {\n return relayerLibrary.encodeFunctionData('setRelayerApproval', [\n relayerAdress,\n approved,\n authorisation,\n ]);\n }\n\n static encodeGaugeWithdraw(\n gaugeAddress: string,\n sender: string,\n recipient: string,\n amount: string\n ): string {\n return relayerLibrary.encodeFunctionData('gaugeWithdraw', [\n gaugeAddress,\n sender,\n recipient,\n amount,\n ]);\n }\n\n static encodeGaugeDeposit(\n gaugeAddress: string,\n sender: string,\n recipient: string,\n amount: string\n ): string {\n return relayerLibrary.encodeFunctionData('gaugeDeposit', [\n gaugeAddress,\n sender,\n recipient,\n amount,\n ]);\n }\n\n static encodeSwap(params: Swap): string {\n return relayerLibrary.encodeFunctionData('swap', [\n params.request as SingleSwapStruct,\n params.funds as FundManagementStruct,\n params.limit,\n params.deadline as BigNumberish,\n params.value as BigNumberish,\n params.outputReference as BigNumberish,\n ]);\n }\n\n static encodeBatchSwap(params: EncodeBatchSwapInput): string {\n return relayerLibrary.encodeFunctionData('batchSwap', [\n params.swapType,\n params.swaps,\n params.assets,\n params.funds,\n params.limits,\n params.deadline,\n params.value,\n params.outputReferences,\n ]);\n }\n\n static encodeExitPool(params: EncodeExitPoolInput): string {\n return relayerLibrary.encodeFunctionData('exitPool', [\n params.poolId,\n params.poolKind,\n params.sender,\n params.recipient,\n params.exitPoolRequest,\n params.outputReferences,\n ]);\n }\n\n static encodeJoinPool(params: EncodeJoinPoolInput): string {\n return relayerLibrary.encodeFunctionData('joinPool', [\n params.poolId,\n params.kind,\n params.sender,\n params.recipient,\n params.joinPoolRequest,\n params.value,\n params.outputReference,\n ]);\n }\n\n static encodeWrapAaveDynamicToken(\n params: EncodeWrapAaveDynamicTokenInput\n ): string {\n return relayerLibrary.encodeFunctionData('wrapAaveDynamicToken', [\n params.staticToken,\n params.sender,\n params.recipient,\n params.amount,\n params.fromUnderlying,\n params.outputReference,\n ]);\n }\n\n static encodeUnwrapAaveStaticToken(\n params: EncodeUnwrapAaveStaticTokenInput\n ): string {\n return relayerLibrary.encodeFunctionData('unwrapAaveStaticToken', [\n params.staticToken,\n params.sender,\n params.recipient,\n params.amount,\n params.toUnderlying,\n params.outputReference,\n ]);\n }\n\n static encodeUnwrapWstETH(params: EncodeUnwrapWstETHInput): string {\n return relayerLibrary.encodeFunctionData('unwrapWstETH', [\n params.sender,\n params.recipient,\n params.amount,\n params.outputReference,\n ]);\n }\n\n static encodeUnwrap(\n params: EncodeUnwrapInput,\n linearPoolType: string\n ): string {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let unwrapType: any;\n\n /**\n * Other unwrap types available on BatchRelayerLibrary that does not seem to\n * have a respective Linear pool type in the SDK:\n * - unwrapUnbuttonToken\n * - unwrapWstETH\n */\n\n switch (linearPoolType) {\n case 'AaveLinear':\n return this.encodeUnwrapAaveStaticToken({\n staticToken: params.wrappedToken,\n sender: params.sender,\n recipient: params.recipient,\n amount: params.amount,\n toUnderlying: true,\n outputReference: params.outputReference,\n });\n case 'BeefyLinear':\n case 'ERC4626Linear':\n unwrapType = 'unwrapERC4626';\n break;\n case 'EulerLinear':\n unwrapType = 'unwrapEuler';\n break;\n case 'GearboxLinear':\n unwrapType = 'unwrapGearbox';\n break;\n case 'ReaperLinear':\n unwrapType = 'unwrapReaperVaultToken';\n break;\n case 'TetuLinear':\n unwrapType = 'unwrapTetu';\n break;\n case 'YearnLinear':\n unwrapType = 'unwrapYearn';\n break;\n case 'MidasLinear':\n unwrapType = 'unwrapCompoundV2';\n break;\n case 'SiloLinear':\n unwrapType = 'unwrapShareToken';\n break;\n default:\n throw new Error(\n 'Unwrapping not supported for this pool type: ' + linearPoolType\n );\n }\n\n return relayerLibrary.encodeFunctionData(unwrapType, [\n params.wrappedToken,\n params.sender,\n params.recipient,\n params.amount,\n params.outputReference,\n ]);\n }\n\n static encodePeekChainedReferenceValue(reference: BigNumberish): string {\n return relayerLibrary.encodeFunctionData('peekChainedReferenceValue', [\n reference,\n ]);\n }\n\n static toChainedReference(key: BigNumberish, isTemporary = true): BigNumber {\n const prefix = isTemporary\n ? Relayer.CHAINED_REFERENCE_TEMP_PREFIX\n : Relayer.CHAINED_REFERENCE_READONLY_PREFIX;\n // The full padded prefix is 66 characters long, with 64 hex characters and the 0x prefix.\n const paddedPrefix = `0x${prefix}${'0'.repeat(64 - prefix.length)}`;\n return BigNumber.from(paddedPrefix).add(key);\n }\n\n static fromChainedReference(ref: string, isTemporary = true): BigNumber {\n const prefix = isTemporary\n ? Relayer.CHAINED_REFERENCE_TEMP_PREFIX\n : Relayer.CHAINED_REFERENCE_READONLY_PREFIX;\n // The full padded prefix is 66 characters long, with 64 hex characters and the 0x prefix.\n const paddedPrefix = `0x${prefix}${'0'.repeat(64 - prefix.length)}`;\n return BigNumber.from(ref).sub(BigNumber.from(paddedPrefix));\n }\n\n /**\n * Returns true if `amount` is not actually an amount, but rather a chained reference.\n */\n static isChainedReference(amount: string): boolean {\n const amountBn = BigNumber.from(amount);\n const mask = BigNumber.from(\n '0xfff0000000000000000000000000000000000000000000000000000000000000'\n );\n const readonly =\n '0xba10000000000000000000000000000000000000000000000000000000000000';\n const check = amountBn.toBigInt() & mask.toBigInt();\n return readonly === BigNumber.from(check)._hex.toString();\n }\n\n static formatExitPoolInput(params: ExitPoolData): EncodeExitPoolInput {\n const {\n assets,\n minAmountsOut,\n userData,\n toInternalBalance,\n poolId,\n poolKind,\n sender,\n recipient,\n outputReferences,\n } = params;\n\n const exitPoolRequest: ExitPoolRequest = {\n assets,\n minAmountsOut,\n userData,\n toInternalBalance,\n };\n\n const exitPoolInput: EncodeExitPoolInput = {\n poolId,\n poolKind,\n sender,\n recipient,\n outputReferences,\n exitPoolRequest,\n };\n return exitPoolInput;\n }\n\n static formatJoinPoolInput(params: JoinPoolData): EncodeJoinPoolInput {\n const {\n assets,\n maxAmountsIn,\n userData,\n fromInternalBalance,\n poolId,\n kind,\n sender,\n recipient,\n value,\n outputReference,\n } = params;\n\n const joinPoolRequest: JoinPoolRequest = {\n assets,\n maxAmountsIn,\n userData,\n fromInternalBalance,\n };\n\n const joinPoolInput: EncodeJoinPoolInput = {\n poolId,\n kind,\n sender,\n recipient,\n value,\n outputReference,\n joinPoolRequest,\n };\n\n return joinPoolInput;\n }\n\n static signRelayerApproval = async (\n relayerAddress: string,\n signerAddress: string,\n signer: JsonRpcSigner,\n vault: Vault\n ): Promise => {\n const approval = vault.interface.encodeFunctionData('setRelayerApproval', [\n signerAddress,\n relayerAddress,\n true,\n ]);\n\n const signature =\n await RelayerAuthorization.signSetRelayerApprovalAuthorization(\n vault,\n signer,\n relayerAddress,\n approval\n );\n\n const calldata = RelayerAuthorization.encodeCalldataAuthorization(\n '0x',\n MaxUint256,\n signature\n );\n\n return calldata;\n };\n}\n","import { BalancerSdkConfig } from '@/types';\nimport { GraphQLClient } from 'graphql-request';\nimport { getNetworkConfig } from '../sdk.helpers';\nimport { getSdk } from './generated/balancer-subgraph-types';\nimport { SubgraphClient } from './subgraph';\n\nexport class Subgraph {\n public readonly url: string;\n public readonly client: SubgraphClient;\n\n constructor(config: BalancerSdkConfig) {\n this.url = getNetworkConfig(config).urls.subgraph;\n this.client = this.initClient();\n }\n\n private initClient(): SubgraphClient {\n const client = new GraphQLClient(this.url);\n return getSdk(client);\n }\n}\n","import { Swaps } from '@/modules/swaps/swaps.module';\nimport { BalancerSdkConfig } from '@/types';\nimport {\n SubgraphPoolBase,\n ZERO,\n parseToPoolsDict,\n getSpotPriceAfterSwapForPath,\n} from '@balancer-labs/sor';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\n\nexport class Pricing {\n private readonly swaps: Swaps;\n\n constructor(config: BalancerSdkConfig, swaps?: Swaps) {\n if (swaps) {\n this.swaps = swaps;\n } else {\n this.swaps = new Swaps(config);\n }\n }\n\n /**\n * Retrieves pools using poolDataService.\n * @returns {boolean} Boolean indicating whether pools data was fetched correctly (true) or not (false).\n */\n async fetchPools(): Promise {\n return this.swaps.fetchPools();\n }\n\n /**\n * Get currently saved pools list (fetched using fetchPools()).\n * @returns {SubgraphPoolBase[]} pools list.\n */\n public getPools(): SubgraphPoolBase[] {\n return this.swaps.getPools();\n }\n\n /**\n * Calculates Spot Price for a token pair - finds most liquid path and uses this as reference SP.\n * @param { string } tokenIn Token in address.\n * @param { string } tokenOut Token out address.\n * @param { SubgraphPoolBase[] } pools Optional - Pool data. Will be fetched via dataProvider if not supplied.\n * @returns { string } Spot price.\n */\n async getSpotPrice(\n tokenIn: string,\n tokenOut: string,\n pools: SubgraphPoolBase[] = []\n ): Promise {\n // If pools list isn't supplied fetch it from swaps data provider\n if (pools.length === 0) {\n await this.fetchPools();\n pools = this.getPools();\n }\n\n // We find the path for the pair with the highest liquidity and use this as the ref SP\n const poolsDict = parseToPoolsDict(pools, 0);\n // This creates all paths for tokenIn>Out ordered by liquidity\n const paths = this.swaps.sor.routeProposer.getCandidatePathsFromDict(\n tokenIn,\n tokenOut,\n 0,\n poolsDict,\n 4\n );\n\n if (paths.length === 0)\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_PAIR);\n return getSpotPriceAfterSwapForPath(paths[0], 0, ZERO).toString();\n }\n}\n","import { Contract } from '@ethersproject/contracts';\nimport { Provider } from '@ethersproject/providers';\nimport { Signer } from '@ethersproject/abstract-signer';\n\nconst abi = [\n 'function getPoolId() view returns (bytes32)',\n 'function getSwapFeePercentage() view returns (uint256)',\n 'function getProtocolFeesCollector() view returns (address)',\n 'function inRecoveryMode() view returns (bool)',\n];\n\nexport const BasePool = (\n address: string,\n signerOrProvider: Signer | Provider\n): Contract => new Contract(address, abi, signerOrProvider);\n","import { set } from 'lodash';\nimport { Fragment, JsonFragment, Interface, Result } from '@ethersproject/abi';\nimport { CallOverrides } from '@ethersproject/contracts';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { Multicall } from '@/contracts';\n\nexport class Multicaller {\n private interface: Interface;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private calls: [string, string, any][] = [];\n private paths: string[] = [];\n\n constructor(\n private multicall: Multicall,\n abi: string | Array,\n private options: CallOverrides = {}\n ) {\n this.interface = new Interface(abi);\n }\n\n call(\n path: string,\n address: string,\n functionName: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n params?: any[]\n ): Multicaller {\n this.calls.push([address, functionName, params]);\n this.paths.push(path);\n return this;\n }\n\n async execute(\n from: Record = {}\n ): Promise> {\n const obj = from;\n const results = await this.executeMulticall();\n results.forEach((result, i) =>\n set(obj, this.paths[i], result.length > 1 ? result : result[0])\n );\n this.calls = [];\n this.paths = [];\n return obj;\n }\n\n private async executeMulticall(): Promise {\n const [, res] = await this.multicall.callStatic.aggregate(\n this.calls.map(([address, functionName, params]) => ({\n target: address,\n callData: this.interface.encodeFunctionData(functionName, params),\n })),\n this.options\n );\n\n return res.map((result: BytesLike, i: number) =>\n this.interface.decodeFunctionResult(this.calls[i][1], result)\n );\n }\n}\n","export const oneSecondInMs = 1000;\nexport const twentyFourHoursInSecs = 24 * 60 * 60;\n\nexport function toJsTimestamp(unixTimestamp: number): number {\n return unixTimestamp * oneSecondInMs;\n}\n\nexport function toUnixTimestamp(jsTimestamp: number): number {\n return Math.round(jsTimestamp / oneSecondInMs);\n}\n\nexport function isLessThan24Hours(incomingDateInSec: number): boolean {\n const now = Math.round(Date.now() / 1000);\n const difference = now - incomingDateInSec;\n\n return difference < twentyFourHoursInSecs;\n}\n","import { JsonFragment } from '@ethersproject/abi';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { formatUnits } from '@ethersproject/units';\nimport { Multicall, VeBal__factory } from '@/contracts';\nimport { Multicaller } from '@/lib/utils/multiCaller';\nimport { toJsTimestamp } from '@/lib/utils/time';\n\nexport type VeBalLockInfo = {\n lockedEndDate: number;\n lockedAmount: string;\n totalSupply: string;\n epoch: string;\n hasExistingLock: boolean;\n isExpired: boolean;\n};\n\ntype VeBalLockInfoResult = {\n locked: BigNumber[];\n epoch: BigNumber;\n totalSupply: BigNumber;\n};\n\nexport class VeBal {\n constructor(private veBalAddress: string, private multicall: Multicall) {}\n\n public async getLockInfo(\n account: string\n ): Promise {\n if (!this.veBalAddress) throw new Error('veBal address must be defined');\n\n const multicaller = new Multicaller(this.multicall, [\n ...(VeBal__factory.abi as readonly JsonFragment[]),\n ]);\n\n multicaller.call('locked', this.veBalAddress, 'locked', [account]);\n multicaller.call('epoch', this.veBalAddress, 'epoch');\n multicaller.call('totalSupply', this.veBalAddress, 'totalSupply()');\n\n const result = await multicaller.execute();\n\n return this.formatLockInfo(result);\n }\n\n public formatLockInfo(lockInfo: VeBalLockInfoResult): VeBalLockInfo {\n const [lockedAmount, lockedEndDate] = lockInfo.locked;\n\n const hasExistingLock = lockedAmount.gt(0);\n const lockedEndDateNormalised = toJsTimestamp(lockedEndDate.toNumber());\n const isExpired = hasExistingLock && Date.now() > lockedEndDateNormalised;\n\n return {\n lockedEndDate: lockedEndDateNormalised,\n lockedAmount: formatUnits(lockedAmount),\n totalSupply: formatUnits(lockInfo.totalSupply),\n epoch: formatUnits(lockInfo.epoch, 0),\n hasExistingLock,\n isExpired,\n };\n }\n}\n","import { Provider } from '@ethersproject/providers';\nimport { Contract } from '@ethersproject/contracts';\nimport { formatUnits } from '@ethersproject/units';\n\nimport { VeDelegationProxy__factory } from '@/contracts';\nimport { ContractAddresses } from '@/types';\n\nexport class VeBalProxy {\n instance: Contract;\n\n constructor(addresses: ContractAddresses, provider: Provider) {\n if (!addresses.veBalProxy)\n throw new Error('veBalProxy address must be defined');\n this.instance = VeDelegationProxy__factory.connect(\n addresses.veBalProxy,\n provider\n );\n }\n\n async getAdjustedBalance(account: string): Promise {\n const balance = await this.instance.adjustedBalanceOf(account);\n return formatUnits(balance);\n }\n}\n","import { Contract } from '@ethersproject/contracts';\nimport { Provider } from '@ethersproject/providers';\nimport { Signer } from '@ethersproject/abstract-signer';\n\nimport { BasePool } from './implementations/base-pool';\nimport { VeBal } from './implementations/veBAL';\nimport { VeBalProxy } from './implementations/veBAL-proxy';\nimport {\n AaveLinearPoolFactory,\n AaveLinearPoolFactory__factory,\n BalancerHelpers,\n BalancerHelpers__factory,\n BalancerRelayer__factory,\n ComposableStablePoolFactory,\n ComposableStablePoolFactory__factory,\n ERC20,\n ERC20__factory,\n ERC4626LinearPoolFactory,\n ERC4626LinearPoolFactory__factory,\n EulerLinearPoolFactory,\n EulerLinearPoolFactory__factory,\n GaugeClaimHelper,\n GaugeClaimHelper__factory,\n GearboxLinearPoolFactory,\n GearboxLinearPoolFactory__factory,\n GyroConfig,\n GyroConfig__factory,\n LidoRelayer,\n LidoRelayer__factory,\n LiquidityGaugeV5__factory,\n Multicall,\n Multicall__factory,\n Vault,\n Vault__factory,\n WeightedPoolFactory,\n WeightedPoolFactory__factory,\n YearnLinearPoolFactory,\n YearnLinearPoolFactory__factory,\n} from '@/contracts';\nimport { Network } from '@/lib/constants/network';\nimport { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { ContractAddresses } from '@/types';\n\ntype ContractFactory = (\n address: string,\n signerOrProvider: Signer | Provider\n) => Contract;\n\nexport interface ContractInstances {\n aaveLinearPoolFactory?: AaveLinearPoolFactory;\n balancerHelpers: BalancerHelpers;\n BasePool: ContractFactory;\n composableStablePoolFactory?: ComposableStablePoolFactory;\n ERC20: ContractFactory;\n erc4626LinearPoolFactory?: ERC4626LinearPoolFactory;\n eulerLinearPoolFactory?: EulerLinearPoolFactory;\n gaugeClaimHelper?: GaugeClaimHelper;\n gearboxLinearPoolFactory?: GearboxLinearPoolFactory;\n gyroConfig?: GyroConfig;\n lidoRelayer?: LidoRelayer;\n liquidityGauge: ContractFactory;\n multicall: Multicall;\n relayer: Contract;\n vault: Vault;\n veBal?: VeBal;\n veBalProxy?: VeBalProxy;\n weightedPoolFactory?: WeightedPoolFactory;\n yearnLinearPoolFactory?: YearnLinearPoolFactory;\n}\n\nexport class Contracts {\n contractAddresses: ContractAddresses;\n private instances: ContractInstances;\n\n /**\n * Create instances of Balancer contracts connected to passed provider.\n * @param { Network | ContractAddresses } networkOrAddresses\n * @param { Provider } provider\n */\n constructor(\n networkOrAddresses: Network | ContractAddresses,\n provider: Provider\n ) {\n // Access addresses using passed network if available\n if (typeof networkOrAddresses === 'number') {\n this.contractAddresses =\n BALANCER_NETWORK_CONFIG[networkOrAddresses].addresses.contracts;\n } else {\n this.contractAddresses = networkOrAddresses;\n }\n\n const vault: Vault = Vault__factory.connect(\n this.contractAddresses.vault,\n provider\n );\n const balancerHelpers: BalancerHelpers = BalancerHelpers__factory.connect(\n this.contractAddresses.balancerHelpers,\n provider\n );\n let lidoRelayer: undefined | LidoRelayer;\n if (this.contractAddresses.lidoRelayer)\n lidoRelayer = LidoRelayer__factory.connect(\n this.contractAddresses.lidoRelayer,\n provider\n );\n\n const multicall: Multicall = Multicall__factory.connect(\n this.contractAddresses.multicall,\n provider\n );\n const relayer = BalancerRelayer__factory.connect(\n this.contractAddresses.balancerRelayer,\n provider\n );\n let veBal: undefined | VeBal;\n if (this.contractAddresses.veBal) {\n veBal = new VeBal(this.contractAddresses.veBal, multicall);\n }\n let veBalProxy: undefined | VeBalProxy;\n if (this.contractAddresses.veBalProxy) {\n veBalProxy = new VeBalProxy(this.contractAddresses, provider);\n }\n let gaugeClaimHelper: undefined | GaugeClaimHelper;\n if (this.contractAddresses.gaugeClaimHelper)\n gaugeClaimHelper = GaugeClaimHelper__factory.connect(\n this.contractAddresses.gaugeClaimHelper,\n provider\n );\n let composableStablePoolFactory: undefined | ComposableStablePoolFactory;\n if (this.contractAddresses.composableStablePoolFactory) {\n composableStablePoolFactory =\n ComposableStablePoolFactory__factory.connect(\n this.contractAddresses.composableStablePoolFactory,\n provider\n );\n }\n let weightedPoolFactory: undefined | WeightedPoolFactory;\n if (this.contractAddresses.weightedPoolFactory) {\n weightedPoolFactory = WeightedPoolFactory__factory.connect(\n this.contractAddresses.weightedPoolFactory,\n provider\n );\n }\n let aaveLinearPoolFactory: undefined | AaveLinearPoolFactory;\n if (this.contractAddresses.aaveLinearPoolFactory) {\n aaveLinearPoolFactory = AaveLinearPoolFactory__factory.connect(\n this.contractAddresses.aaveLinearPoolFactory,\n provider\n );\n }\n let erc4626LinearPoolFactory: undefined | ERC4626LinearPoolFactory;\n if (this.contractAddresses.erc4626LinearPoolFactory) {\n erc4626LinearPoolFactory = ERC4626LinearPoolFactory__factory.connect(\n this.contractAddresses.erc4626LinearPoolFactory,\n provider\n );\n }\n let eulerLinearPoolFactory: undefined | EulerLinearPoolFactory;\n if (this.contractAddresses.eulerLinearPoolFactory) {\n eulerLinearPoolFactory = EulerLinearPoolFactory__factory.connect(\n this.contractAddresses.eulerLinearPoolFactory,\n provider\n );\n }\n let gearboxLinearPoolFactory: undefined | GearboxLinearPoolFactory;\n if (this.contractAddresses.gearboxLinearPoolFactory) {\n gearboxLinearPoolFactory = GearboxLinearPoolFactory__factory.connect(\n this.contractAddresses.gearboxLinearPoolFactory,\n provider\n );\n }\n let yearnLinearPoolFactory: undefined | YearnLinearPoolFactory;\n if (this.contractAddresses.yearnLinearPoolFactory) {\n yearnLinearPoolFactory = YearnLinearPoolFactory__factory.connect(\n this.contractAddresses.yearnLinearPoolFactory,\n provider\n );\n }\n let gyroConfig: undefined | GyroConfig;\n if (this.contractAddresses.gyroConfigProxy) {\n gyroConfig = GyroConfig__factory.connect(\n this.contractAddresses.gyroConfigProxy,\n provider\n );\n }\n\n this.instances = {\n aaveLinearPoolFactory,\n balancerHelpers,\n BasePool: this.getBasePool,\n composableStablePoolFactory,\n ERC20: this.getErc20,\n erc4626LinearPoolFactory,\n eulerLinearPoolFactory,\n gaugeClaimHelper,\n gearboxLinearPoolFactory,\n gyroConfig,\n liquidityGauge: this.getLiquidityGauge,\n lidoRelayer,\n multicall,\n relayer,\n veBal,\n veBalProxy,\n weightedPoolFactory,\n yearnLinearPoolFactory,\n vault,\n };\n }\n\n /**\n * Expose contract instances.\n */\n get contracts(): ContractInstances {\n return this.instances;\n }\n\n /**\n * Helper to create ERC20 contract.\n * @param { string } address ERC20 address.\n * @param { Signer | Provider } signerOrProvider Signer or Provider.\n * @returns Contract.\n */\n getErc20(address: string, signerOrProvider: Signer | Provider): ERC20 {\n return ERC20__factory.connect(address, signerOrProvider);\n }\n\n /**\n * Helper to create base pool contract.\n * @param { string } address pool address.\n * @param { Signer | Provider } signerOrProvider Signer or Provider.\n * @returns Contract.\n */\n getBasePool(address: string, signerOrProvider: Signer | Provider): Contract {\n return BasePool(address, signerOrProvider);\n }\n\n /**\n * Helper to create LiquidityGauge contract.\n * @param { string } address Gauge address.\n * @param { Signer | Provider} signerOrProvider Signer or Provider.\n * @returns Contract.\n */\n getLiquidityGauge = LiquidityGaugeV5__factory.connect;\n}\n","/**\n * Calculate the Impermanent Loss for a given pool and user.\n *\n * 1. Prepare the data:\n * a. get exit price for pools' tokens\n * b. get entry price for pools' tokens\n * 2. calculate delta values for tokens in pools\n * 3. calculate and return the impermanent loss as percentage rounded to 2 decimal places.\n *\n */\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Findable, Pool, PoolToken, Price } from '@/types';\nimport { Logger } from '@/lib/utils/logger';\n\ntype Asset = {\n priceDelta: number;\n weight: number;\n};\n\ntype TokenPrices = {\n [key: string]: number;\n};\n\nexport class ImpermanentLossService {\n constructor(\n private tokenPrices: Findable,\n private tokenHistoricalPrices: Findable\n ) {}\n\n /**\n * entry point to calculate impermanent loss.\n *\n * The function will\n * - retrieve the tokens' historical value at the desired time in the future\n * - calculate the relative variation between current and historical value\n * - return the IL in percentage rounded to 2 decimal places\n *\n * @param timestamp UNIX timestamp from which the IL is desired\n * @param pool the pool\n * @returns the impermanent loss as percentage rounded to 2 decimal places\n */\n async calcImpLoss(timestamp: number, pool: Pool): Promise {\n if (timestamp * 1000 >= Date.now()) {\n console.error(\n `[ImpermanentLossService][calcImpLoss]Error: ${BalancerError.getMessage(\n BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE\n )}`\n );\n throw new BalancerError(BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE);\n }\n const assets = await this.prepareData(timestamp, pool);\n\n const poolValueDelta = this.getPoolValueDelta(assets);\n const holdValueDelta = this.getHoldValueDelta(assets);\n\n const impLoss = this.calculateImpermanentLoss(\n poolValueDelta,\n holdValueDelta\n );\n return impLoss;\n }\n\n calculateImpermanentLoss(\n poolValueDelta: number,\n holdValueDelta: number\n ): number {\n return (\n Math.floor(Math.abs(poolValueDelta / holdValueDelta - 1) * 100 * 100) /\n 100\n );\n }\n\n getPoolValueDelta(assets: Asset[]): number {\n return assets.reduce(\n (result, asset) =>\n result * Math.pow(Math.abs(asset.priceDelta + 1), asset.weight),\n 1\n );\n }\n\n getHoldValueDelta(assets: Asset[]): number {\n return assets.reduce(\n (result, asset) => result + Math.abs(asset.priceDelta + 1) * asset.weight,\n 0\n );\n }\n\n /**\n * prepare the data for calculating the impermanent loss\n *\n * @param entryTimestamp UNIX timestamp from which the IL is desired\n * @param pool the pool\n * @returns a list of pair weight/price delta for each token in the pool\n * @throws BalancerError if\n * 1. a token's price is unknown\n * 2. a token's weight is unknown\n * 3. the user has no liquidity invested in the pool\n */\n async prepareData(entryTimestamp: number, pool: Pool): Promise {\n const poolTokens = pool.tokens.filter(\n (token) => token.address !== pool.address\n );\n\n const weights = this.getWeights(poolTokens);\n\n const tokenAddresses = poolTokens.map((t) => t.address);\n\n const entryPrices = await this.getEntryPrices(\n entryTimestamp,\n tokenAddresses\n );\n const exitPrices: TokenPrices = await this.getExitPrices(poolTokens);\n\n return this.getAssets(poolTokens, exitPrices, entryPrices, weights);\n }\n\n getAssets(\n poolTokens: PoolToken[],\n exitPrices: TokenPrices,\n entryPrices: TokenPrices,\n weights: number[]\n ): Asset[] {\n return poolTokens.map((token, i) => ({\n priceDelta: this.getDelta(\n entryPrices[token.address],\n exitPrices[token.address]\n ),\n weight: weights[i],\n }));\n }\n\n getDelta(entryPrice: number, exitPrice: number): number {\n if (entryPrice === 0) {\n console.error(\n `[ImpermanentLossService][getDelta]Error: ${BalancerError.getMessage(\n BalancerErrorCode.ILLEGAL_PARAMETER\n )}: entry price is 0`\n );\n throw new BalancerError(BalancerErrorCode.ILLEGAL_PARAMETER);\n }\n return (exitPrice - entryPrice) / entryPrice;\n }\n\n /**\n * returns the list of token's weights.\n *\n * @param poolTokens the pools' tokens\n * @returns the list of token's weights\n * @throws BalancerError if a token's weight is missing\n *\n */\n getWeights(poolTokens: PoolToken[]): number[] {\n const noWeights = poolTokens.every((token) => !token.weight);\n const uniformWeight = Math.round((1 / poolTokens.length) * 100) / 100;\n const weights: number[] = noWeights\n ? poolTokens.map(() => uniformWeight) // if no weight is returned we assume the tokens are balanced uniformly in the pool\n : poolTokens.map((token) => Number(token.weight ?? 0));\n\n if (weights.some((w) => w === 0)) {\n console.error(\n `[ImpermanentLossService][getWeights]Error: ${BalancerError.getMessage(\n BalancerErrorCode.MISSING_WEIGHT\n )}`\n );\n throw new BalancerError(BalancerErrorCode.MISSING_WEIGHT);\n }\n return weights;\n }\n\n /**\n * get the current's tokens' prices\n * @param tokens the pools' tokens\n * @returns a list of tokens with prices\n */\n async getExitPrices(tokens: PoolToken[]): Promise {\n const prices = await Promise.all(\n tokens.map((token) => this.tokenPrices.find(token.address))\n ).catch(() => []);\n\n if (!prices.length || prices.some((price) => price?.usd === undefined)) {\n console.error(\n `[ImpermanentLossService][getExitPrices]Error: ${BalancerError.getMessage(\n BalancerErrorCode.MISSING_PRICE_RATE\n )}`\n );\n throw new BalancerError(BalancerErrorCode.MISSING_PRICE_RATE);\n }\n\n const tokensWithPrice = tokens.map((token, i) => ({\n ...token,\n price: prices[i],\n }));\n\n const tokenPrices: TokenPrices = {};\n for (const token of tokensWithPrice) {\n if (token.price?.usd) tokenPrices[token.address] = +token.price.usd; // price.usd is never undefined but JS complains\n }\n return tokenPrices;\n }\n\n /**\n * get the tokens' price at a given time\n *\n * @param timestamp the Unix timestamp\n * @param tokenAddresses the tokens' addresses\n * @returns a map of tokens' price\n */\n async getEntryPrices(\n timestamp: number,\n tokenAddresses: string[]\n ): Promise {\n const prices: TokenPrices = {};\n for (const address of tokenAddresses) {\n const price = await this.tokenHistoricalPrices\n .findBy(address, timestamp)\n .catch((reason) => {\n const logger = Logger.getInstance();\n logger.warn(\n `[ImpermanentLossService][getEntryPrices]Error: ${reason.message}`\n );\n return undefined;\n });\n if (!price?.usd) {\n const logger = Logger.getInstance();\n logger.warn(\n `[ImpermanentLossService][getEntryPrices]Error: ${BalancerError.getMessage(\n BalancerErrorCode.MISSING_PRICE_RATE\n )}`\n );\n throw new BalancerError(BalancerErrorCode.MISSING_PRICE_RATE);\n }\n prices[address] = +price.usd;\n }\n return prices;\n }\n}\n","/**\n * Weekly Bal emissions are fixed / year according to:\n * https://docs.google.com/spreadsheets/d/1FY0gi596YWBOTeu_mrxhWcdF74SwKMNhmu0qJVgs0KI/edit#gid=0\n *\n * Using regular numbers for simplicity assuming frontend use only.\n *\n * Calculation source\n * https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/liquidity-mining/contracts/BalancerTokenAdmin.sol\n */\n\nexport const INITIAL_RATE = 145000;\nexport const START_EPOCH_TIME = 1648465251;\nconst RATE_REDUCTION_TIME = 365 * 86400;\nconst RATE_REDUCTION_COEFFICIENT = 2 ** (1 / 4);\n\n/**\n * Weekly BAL emissions\n *\n * @param currentTimestamp used to get the epoch\n * @returns BAL emitted in a week\n */\nexport const weekly = (\n currentTimestamp: number = Math.round(new Date().getTime() / 1000)\n): number => {\n const miningEpoch = Math.floor(\n (currentTimestamp - START_EPOCH_TIME) / RATE_REDUCTION_TIME\n );\n\n const rate = INITIAL_RATE * RATE_REDUCTION_COEFFICIENT ** -miningEpoch;\n\n return rate;\n};\n\n/**\n * Total BAL emitted in epoch (1 year)\n *\n * @param epoch starting from 0 for the first year of emissions\n * @returns BAL emitted in epoch\n */\nexport const total = (epoch: number): number => {\n const weeklyRate = INITIAL_RATE * RATE_REDUCTION_COEFFICIENT ** -epoch;\n const dailyRate = weeklyRate / 7;\n\n return dailyRate * 365;\n};\n\n/**\n * Total BAL emitted between two timestamps\n *\n * @param start starting timestamp\n * @param end ending timestamp\n * @returns BAL emitted in period\n */\nexport const between = (start: number, end: number): number => {\n if (start < START_EPOCH_TIME) {\n throw 'start timestamp before emission schedule deployment';\n }\n if (end < start) {\n throw 'cannot finish before starting';\n }\n\n let totalEmissions = 0;\n\n const startingEpoch = Math.floor(\n (start - START_EPOCH_TIME) / RATE_REDUCTION_TIME\n );\n const endingEpoch = Math.floor(\n (end - START_EPOCH_TIME) / RATE_REDUCTION_TIME\n );\n\n for (\n let currentEpoch = startingEpoch;\n currentEpoch <= endingEpoch;\n currentEpoch++\n ) {\n totalEmissions += total(currentEpoch);\n }\n\n // Subtract what isn't emmited within the time range\n const startingEpochEnd =\n START_EPOCH_TIME + RATE_REDUCTION_TIME * (startingEpoch + 1);\n const endingEpochStart = START_EPOCH_TIME + RATE_REDUCTION_TIME * endingEpoch;\n\n const secondsInStartingEpoch = startingEpochEnd - start;\n const secondsInEndingEpoch = end - endingEpochStart;\n\n totalEmissions -=\n (total(startingEpoch) * (RATE_REDUCTION_TIME - secondsInStartingEpoch)) /\n RATE_REDUCTION_TIME;\n totalEmissions -=\n (total(endingEpoch) * (RATE_REDUCTION_TIME - secondsInEndingEpoch)) /\n RATE_REDUCTION_TIME;\n\n return totalEmissions;\n};\n","import { Findable, Price } from '@/types';\nimport { BaseFeeDistributor } from '@/modules/data';\n\nexport interface ProtocolRevenueData {\n lastWeekBalRevenue: number;\n lastWeekBBAUsdRevenue: number;\n veBalSupply: number;\n}\n\nexport class ProtocolRevenue {\n constructor(\n private repository: BaseFeeDistributor,\n private tokenPrices: Findable\n ) {}\n\n async data(now = Date.now()): Promise {\n const data = await this.repository.multicallData(now);\n const balPrice = await this.tokenPrices.find(data.balAddress);\n\n if (!balPrice || !balPrice.usd) {\n throw `No BAL USD price found`;\n }\n\n return {\n lastWeekBalRevenue: data.balAmount * parseFloat(balPrice.usd),\n lastWeekBBAUsdRevenue: data.bbAUsdAmount * data.bbAUsdPrice,\n veBalSupply: data.veBalSupply,\n };\n }\n}\n","/**\n * Calculates pool fees\n *\n * 1. Pool fees in last 24hrs\n */\nimport { isLessThan24Hours } from '@/lib/utils/time';\nimport { Pool, Findable, PoolAttribute } from '@/types';\n\nexport class PoolFees {\n constructor(\n private yesterdaysPools: Findable | undefined\n ) {}\n\n // 🚨 this is adding 1 call to get yesterday's block height and 2nd call to fetch yesterday's pools data from subgraph\n // TODO: find a better data source for that eg. add blocks to graph, replace with a database, or dune\n async last24h(pool: Pool): Promise {\n let yesterdaysPool;\n if (this.yesterdaysPools) {\n yesterdaysPool = await this.yesterdaysPools.find(pool.id);\n }\n if (!pool.totalSwapFee) {\n return 0;\n }\n\n if (!yesterdaysPool?.totalSwapFee) {\n // Process edge case when pool creation time is less that 24h\n if (pool.createTime && isLessThan24Hours(pool.createTime)) {\n return parseFloat(pool.totalSwapFee);\n }\n return 0;\n }\n\n return (\n parseFloat(pool.totalSwapFee) - parseFloat(yesterdaysPool.totalSwapFee)\n );\n }\n}\n","import { formatUnits } from '@ethersproject/units';\nimport * as emissions from '@/modules/data/bal/emissions';\nimport type {\n Findable,\n Pool,\n PoolAttribute,\n Price,\n Token,\n TokenAttribute,\n LiquidityGauge,\n Network,\n PoolToken,\n} from '@/types';\nimport { BaseFeeDistributor } from '@/modules/data';\nimport { ProtocolRevenue } from './protocol-revenue';\nimport { Liquidity } from '@/modules/liquidity/liquidity.module';\nimport { identity, zipObject, pickBy } from 'lodash';\nimport { PoolFees } from '../fees/fees';\nimport { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { Logger } from '@/lib/utils/logger';\nimport { GyroConfigRepository } from '@/modules/data/gyro-config/repository';\nimport { POOLS_TO_IGNORE } from '@/lib/constants/poolsToIgnore';\n\nexport interface AprBreakdown {\n swapFees: number;\n tokenAprs: {\n total: number;\n breakdown: { [address: string]: number };\n };\n stakingApr: {\n min: number;\n max: number;\n };\n rewardAprs: {\n total: number;\n breakdown: { [address: string]: number };\n };\n protocolApr: number;\n min: number;\n max: number;\n}\n\n/**\n * Calculates pool APR via summing up sources of APR:\n *\n * 1. Swap fees (pool level) data coming from subgraph\n * 2. Yield bearing pool tokens, with data from external sources eg: http endpoints, subgraph, onchain\n * * stETH\n * * aave\n * * usd+\n * map token: calculatorFn\n * 3. Staking rewards based from veBal gauges\n */\nexport class PoolApr {\n constructor(\n private pools: Findable,\n private tokenPrices: Findable,\n private tokenMeta: Findable,\n private tokenYields: Findable,\n private feeCollector: Findable,\n private yesterdaysPools?: Findable,\n private liquidityGauges?: Findable,\n private feeDistributor?: BaseFeeDistributor,\n private gyroConfigRepository?: GyroConfigRepository\n ) {}\n\n /**\n * Pool revenue via swap fees.\n * Fees and liquidity are takes from subgraph as USD floats.\n *\n * @returns APR [bsp] from fees accumulated over last 24h\n */\n async swapFees(pool: Pool): Promise {\n // 365 * dailyFees * (1 - protocolFees) / totalLiquidity\n const last24hFees = await this.last24hFees(pool);\n const totalLiquidity = await this.totalLiquidity(pool);\n // TODO: what to do when we are missing last24hFees or totalLiquidity?\n // eg: stable phantom returns 0\n if (!last24hFees || !totalLiquidity) {\n return 0;\n }\n const dailyFees =\n last24hFees * (1 - (await this.protocolSwapFeePercentage(pool)));\n const feesDailyBsp = 10000 * (dailyFees / parseFloat(totalLiquidity));\n\n return Math.round(365 * feesDailyBsp);\n }\n\n /**\n * Pool revenue from holding yield-bearing wrapped tokens.\n *\n * @returns APR [bsp] from tokens contained in the pool\n */\n async tokenAprs(pool: Pool): Promise {\n if (!pool.tokens) {\n return {\n total: 0,\n breakdown: {},\n };\n }\n\n const totalLiquidity = await this.totalLiquidity(pool);\n\n // Filter out BPT: token with the same address as the pool\n // TODO: move this to data layer\n const bptFreeTokens = pool.tokens.filter((token) => {\n return token.address !== pool.address;\n });\n\n // Get each token APRs\n const aprs = await Promise.all(\n bptFreeTokens.map(async (token) => {\n let apr = 0;\n const tokenYield = await this.tokenYields.find(token.address);\n if (tokenYield) {\n // metastable pools incorrectly apply the swap fee to the yield earned.\n // they don't have the concept of a yield fee like the newer pools do.\n if (\n pool.poolType === 'MetaStable' ||\n pool.poolType.includes('Gyro')\n ) {\n apr =\n tokenYield * (1 - (await this.protocolSwapFeePercentage(pool)));\n } else if (\n pool.poolType === 'ComposableStable' ||\n (pool.poolType === 'Weighted' && pool.poolTypeVersion >= 2)\n ) {\n if (token.isExemptFromYieldProtocolFee) {\n apr = tokenYield;\n } else {\n apr =\n tokenYield *\n (1 - parseFloat(pool.protocolYieldFeeCache || '0.5'));\n }\n } else {\n apr = tokenYield;\n }\n } else {\n // Handle subpool APRs with recursive call to get the subPool APR\n const subPool = await this.pools.findBy('address', token.address);\n\n if (subPool) {\n // INFO: Liquidity mining APR can't cascade to other pools\n const subSwapFees = await this.swapFees(subPool);\n const subtokenAprs = await this.tokenAprs(subPool);\n let subApr = subtokenAprs.total;\n if (\n pool.poolType === 'ComposableStable' ||\n (pool.poolType === 'Weighted' && pool.poolTypeVersion === 2)\n ) {\n if (!token.isExemptFromYieldProtocolFee) {\n subApr =\n subApr *\n (1 - parseFloat(pool.protocolYieldFeeCache || '0.5'));\n }\n }\n apr = subSwapFees + subApr;\n }\n }\n\n return apr;\n })\n );\n\n // Get token weights normalised by usd price\n const getWeight = async (token: PoolToken): Promise => {\n let tokenPrice: string | undefined;\n if (token.weight) {\n return parseFloat(token.weight);\n } else if (token.token?.pool?.poolType) {\n const poolToken = await this.pools.findBy('address', token.address);\n if (poolToken) {\n tokenPrice = (await this.bptPrice(poolToken)).toString();\n }\n } else {\n tokenPrice =\n token.price?.usd ||\n (await this.tokenPrices.find(token.address))?.usd ||\n token.token?.latestUSDPrice;\n }\n if (tokenPrice) {\n // using floats assuming frontend purposes with low precision needs\n const tokenValue = parseFloat(token.balance) * parseFloat(tokenPrice);\n return tokenValue / parseFloat(totalLiquidity);\n } else {\n throw `No price for ${token.address}`;\n }\n };\n\n // Normalise tokenAPRs according to weights\n const weightedAprs = await Promise.all(\n bptFreeTokens.map(async (token, idx) => {\n if (aprs[idx] === 0) {\n return 0;\n }\n\n // Handle missing token weights, usually due to missing token prices\n try {\n const weight = await getWeight(token);\n return Math.round(aprs[idx] * weight);\n } catch (e) {\n const logger = Logger.getInstance();\n logger.error(e as string);\n return 0;\n }\n })\n );\n\n // sum them up to get pool APRs\n const apr = weightedAprs.reduce((sum, apr) => sum + apr, 0);\n const breakdown = pickBy(\n zipObject(\n bptFreeTokens.map((t) => t.address),\n weightedAprs\n ),\n identity\n );\n\n return {\n total: apr,\n breakdown,\n };\n }\n\n /**\n * Calculates staking rewards based on veBal gauges deployed with Curve Finance contracts.\n * https://curve.readthedocs.io/dao-gauges.html\n *\n * Terminology:\n * - LP token of a gauge is a BPT of a pool\n * - Depositing into a gauge is called staking on the frontend\n * - gauge totalSupply - BPT tokens deposited to a gauge\n * - gauge workingSupply - effective BPT tokens participating in reward distribution. sum of 40% deposit + 60% boost from individual user's veBal\n * - gauge relative weight - weight of this gauge in bal inflation distribution [0..1] scaled to 1e18\n *\n * APR sources:\n * - gauge BAL emissions = min: 40% of totalSupply, max: 40% of totalSupply + 60% of totalSupply * gauge LPs voting power\n * https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/liquidity-mining/contracts/gauges/ethereum/LiquidityGaugeV5.vy#L338\n * - gauge reward tokens: Admin or designated depositor has an option to deposit additional reward with a weekly accruing cadence.\n * https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/liquidity-mining/contracts/gauges/ethereum/LiquidityGaugeV5.vy#L641\n * rate: amount of token per second\n *\n * @param pool\n * @param boost range between 1 and 2.5\n * @returns APR [bsp] from protocol rewards.\n */\n async stakingApr(pool: Pool, boost = 1): Promise {\n if (!this.liquidityGauges) {\n return 0;\n }\n\n // Data resolving\n const gauge = await this.liquidityGauges.findBy('poolId', pool.id);\n if (\n !gauge ||\n (pool.chainId == 1 && gauge.workingSupply === 0) ||\n (pool.chainId > 1 && gauge.totalSupply === 0) ||\n (pool.chainId > 1 && gauge.balInflationRate === 0)\n ) {\n return 0;\n }\n\n const bal =\n BALANCER_NETWORK_CONFIG[pool.chainId as Network].addresses.tokens.bal;\n if (!bal) {\n return 0;\n }\n\n const [balPrice, bptPriceUsd] = await Promise.all([\n this.tokenPrices.find(bal), // BAL\n this.bptPrice(pool),\n ]);\n\n if (!balPrice?.usd) {\n throw 'Missing BAL price';\n }\n\n const gaugeSupply = (gauge.workingSupply + 0.4) / 0.4; // Only 40% of LP token staked accrue emissions, totalSupply = workingSupply * 2.5\n const gaugeSupplyUsd = gaugeSupply * bptPriceUsd;\n\n // Handle child chain gauges with inflation_rate\n // balInflationRate - amount of BAL tokens per second as a float\n if (gauge.balInflationRate) {\n const reward =\n gauge.balInflationRate * 86400 * 365 * parseFloat(balPrice.usd);\n return Math.round((boost * 10000 * reward) / gaugeSupplyUsd);\n } else if (pool.chainId > 1) {\n // TODO: remove after all gauges are migrated (around 01-07-2023), Subgraph is returning BAL staking rewards as reward tokens for L2 gauges.\n if (!gauge.rewardTokens) {\n return 0;\n }\n\n const balReward = bal && gauge.rewardTokens[bal];\n if (balReward) {\n let reward: { address: string; value: number };\n try {\n reward = await this.rewardTokenApr(bal, balReward);\n const totalSupplyUsd = gauge.totalSupply * bptPriceUsd;\n const rewardValue = reward.value / totalSupplyUsd;\n return Math.round(10000 * rewardValue);\n } catch (e) {\n return 0;\n }\n } else {\n return 0;\n }\n }\n\n // Handle mainnet gauges\n const balPriceUsd = parseFloat(balPrice.usd);\n const now = Math.round(new Date().getTime() / 1000);\n const totalBalEmissions = (emissions.weekly(now) / 7) * 365;\n const gaugeBalEmissions = totalBalEmissions * gauge.relativeWeight;\n const gaugeBalEmissionsUsd = gaugeBalEmissions * balPriceUsd;\n const gaugeBalAprBps = Math.round(\n (boost * 10000 * gaugeBalEmissionsUsd) / gaugeSupplyUsd\n );\n\n return gaugeBalAprBps;\n }\n\n /**\n * Some gauges are holding tokens distributed as rewards to LPs.\n *\n * @param pool\n * @returns APR [bsp] from token rewards.\n */\n async rewardAprs(pool: Pool): Promise {\n if (!this.liquidityGauges) {\n return { total: 0, breakdown: {} };\n }\n\n // Data resolving\n const gauge = await this.liquidityGauges.findBy('poolId', pool.id);\n if (\n !gauge ||\n !gauge.rewardTokens ||\n Object.keys(gauge.rewardTokens).length < 1\n ) {\n return { total: 0, breakdown: {} };\n }\n\n // BAL rewards already returned as stakingApr, so we can filter them out\n const bal =\n BALANCER_NETWORK_CONFIG[pool.chainId as Network].addresses.tokens.bal;\n const rewardTokenAddresses = Object.keys(gauge.rewardTokens).filter(\n (a) => a != bal\n );\n\n // Gets each tokens rate, extrapolate to a year and convert to USD\n const rewards = rewardTokenAddresses.map(async (tAddress) => {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n const data = gauge!.rewardTokens![tAddress];\n try {\n const reward = await this.rewardTokenApr(tAddress, data);\n return reward;\n } catch (e) {\n return { address: tAddress, value: 0 };\n }\n });\n\n // Get the gauge totalSupplyUsd\n const bptPriceUsd = await this.bptPrice(pool);\n const totalSupplyUsd = gauge.totalSupply * bptPriceUsd;\n\n if (totalSupplyUsd == 0) {\n return { total: 0, breakdown: {} };\n }\n\n const rewardTokensBreakdown: Record = {};\n\n let total = 0;\n for await (const reward of Object.values(rewards)) {\n const rewardValue = reward.value / totalSupplyUsd;\n const rewardValueScaled = Math.round(10000 * rewardValue);\n total += rewardValueScaled;\n rewardTokensBreakdown[reward.address] = rewardValueScaled;\n }\n\n return {\n total,\n breakdown: rewardTokensBreakdown,\n };\n }\n\n /**\n * 80BAL-20WETH pool is accruing protocol revenue.\n *\n * @param pool\n * @returns accrued protocol revenue as APR [bsp]\n */\n async protocolApr(pool: Pool): Promise {\n const veBalPoolId =\n '0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014';\n\n if (pool.id != veBalPoolId || !this.feeDistributor) {\n return 0;\n }\n\n const revenue = new ProtocolRevenue(this.feeDistributor, this.tokenPrices);\n\n const { lastWeekBalRevenue, lastWeekBBAUsdRevenue, veBalSupply } =\n await revenue.data();\n\n const bptPrice = await this.bptPrice(pool);\n if (!bptPrice) {\n throw 'bptPrice for veBal pool missing';\n }\n\n const dailyRevenue = (lastWeekBalRevenue + lastWeekBBAUsdRevenue) / 7;\n const apr = Math.round(\n (10000 * (365 * dailyRevenue)) / (bptPrice * veBalSupply)\n );\n\n return apr;\n }\n\n /**\n * Composes all sources for total pool APR.\n *\n * @returns pool APR split [bsp]\n */\n async apr(pool: Pool): Promise {\n if (POOLS_TO_IGNORE.includes(pool.id)) {\n return {\n swapFees: 0,\n tokenAprs: {\n total: 0,\n breakdown: {},\n },\n stakingApr: {\n min: 0,\n max: 0,\n },\n rewardAprs: {\n total: 0,\n breakdown: {},\n },\n protocolApr: 0,\n min: 0,\n max: 0,\n };\n }\n const [\n swapFees,\n tokenAprs,\n minStakingApr,\n maxStakingApr,\n rewardAprs,\n protocolApr,\n ] = await Promise.all([\n this.swapFees(pool), // pool snapshot for last 24h fees dependency\n this.tokenAprs(pool),\n this.stakingApr(pool),\n this.stakingApr(pool, 2.5),\n this.rewardAprs(pool),\n this.protocolApr(pool),\n ]);\n\n return {\n swapFees,\n tokenAprs,\n stakingApr: {\n min: minStakingApr,\n max: maxStakingApr,\n },\n rewardAprs,\n protocolApr,\n min: swapFees + tokenAprs.total + rewardAprs.total + minStakingApr,\n max:\n swapFees +\n tokenAprs.total +\n rewardAprs.total +\n protocolApr +\n maxStakingApr,\n };\n }\n\n private async last24hFees(pool: Pool): Promise {\n const poolFees = new PoolFees(this.yesterdaysPools);\n return poolFees.last24h(pool);\n }\n\n /**\n * Total Liquidity based on USD token prices taken from external price feed, eg: coingecko.\n *\n * @param pool\n * @returns Pool liquidity in USD\n */\n private async totalLiquidity(pool: Pool): Promise {\n try {\n const liquidityService = new Liquidity(this.pools, this.tokenPrices);\n const liquidity = await liquidityService.getLiquidity(pool);\n return liquidity;\n } catch (err) {\n const logger = Logger.getInstance();\n logger.warn('Liquidity calculcation failed, falling back to subgraph');\n return pool.totalLiquidity;\n }\n }\n\n /**\n * BPT price as pool totalLiquidity / pool total Shares\n * Total Liquidity is calculated based on USD token prices taken from external price feed, eg: coingecko.\n *\n * @param pool\n * @returns BPT price in USD\n */\n private async bptPrice(pool: Pool) {\n return (\n parseFloat(await this.totalLiquidity(pool)) / parseFloat(pool.totalShares)\n );\n }\n\n private async protocolSwapFeePercentage(pool: Pool) {\n let fee = 0.5;\n if (pool.poolType.includes('Gyro') && this.gyroConfigRepository) {\n fee = await this.gyroConfigRepository.getGyroProtocolFee(pool.address);\n } else if (pool.protocolSwapFeeCache) {\n fee = parseFloat(pool.protocolSwapFeeCache);\n } else {\n fee = (await this.feeCollector.find('')) || 0.5;\n }\n return fee;\n }\n\n private async rewardTokenApr(\n tokenAddress: string,\n rewardData: { rate: BigNumber; period_finish: BigNumber; decimals?: number }\n ) {\n if (rewardData.period_finish.toNumber() < Date.now() / 1000) {\n return {\n address: tokenAddress,\n value: 0,\n };\n } else {\n const yearlyReward = rewardData.rate.mul(86400).mul(365);\n const price = await this.tokenPrices.find(tokenAddress);\n if (price && price.usd) {\n let decimals = 18;\n if (rewardData.decimals) {\n decimals = rewardData.decimals;\n } else {\n const meta = await this.tokenMeta.find(tokenAddress);\n decimals = meta?.decimals || 18;\n }\n const yearlyRewardUsd =\n parseFloat(formatUnits(yearlyReward, decimals)) *\n parseFloat(price.usd);\n return {\n address: tokenAddress,\n value: yearlyRewardUsd,\n };\n } else {\n throw `No USD price for ${tokenAddress}`;\n }\n }\n }\n}\n","import { BigNumber, parseFixed } from '@ethersproject/bignumber';\nimport { Zero, WeiPerEther } from '@ethersproject/constants';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { isSameAddress, parsePoolInfo } from '@/lib/utils';\nimport { _downscaleDown } from '@/lib/utils/solidityMaths';\nimport { Pool, PoolAttribute, PoolType } from '@/types';\n\nimport { Findable } from '../data/types';\nimport { PoolTypeConcerns } from '../pools/pool-type-concerns';\n\ntype SpotPrices = { [tokenIn: string]: string };\n\nconst supportedPoolTypes: string[] = Object.values(PoolType);\nexport interface Node {\n address: string;\n id: string;\n joinAction: JoinAction;\n exitAction: ExitAction;\n isProportionalExit: boolean;\n type: string;\n children: Node[];\n marked: boolean;\n index: string;\n proportionOfParent: BigNumber;\n parent: Node | undefined;\n isLeaf: boolean;\n spotPrices: SpotPrices;\n decimals: number;\n balance: string;\n priceRate: string;\n}\n\ntype JoinAction = 'input' | 'batchSwap' | 'wrap' | 'joinPool';\nconst joinActions = new Map();\nsupportedPoolTypes.forEach((type) => {\n if (type.includes('Linear') && supportedPoolTypes.includes(type))\n joinActions.set(type as PoolType, 'batchSwap');\n});\njoinActions.set(PoolType.Element, 'batchSwap');\njoinActions.set(PoolType.Investment, 'joinPool');\njoinActions.set(PoolType.LiquidityBootstrapping, 'joinPool');\njoinActions.set(PoolType.MetaStable, 'joinPool');\njoinActions.set(PoolType.Stable, 'joinPool');\njoinActions.set(PoolType.StablePhantom, 'batchSwap');\njoinActions.set(PoolType.Weighted, 'joinPool');\njoinActions.set(PoolType.ComposableStable, 'joinPool');\n\ntype ExitAction = 'output' | 'batchSwap' | 'unwrap' | 'exitPool';\nconst exitActions = new Map();\nsupportedPoolTypes.forEach((type) => {\n if (type.includes('Linear') && supportedPoolTypes.includes(type))\n exitActions.set(type as PoolType, 'batchSwap');\n});\nexitActions.set(PoolType.Element, 'batchSwap');\nexitActions.set(PoolType.Investment, 'exitPool');\nexitActions.set(PoolType.LiquidityBootstrapping, 'exitPool');\nexitActions.set(PoolType.MetaStable, 'exitPool');\nexitActions.set(PoolType.Stable, 'exitPool');\nexitActions.set(PoolType.StablePhantom, 'batchSwap');\nexitActions.set(PoolType.Weighted, 'exitPool');\nexitActions.set(PoolType.ComposableStable, 'exitPool');\n\nexport class PoolGraph {\n constructor(private pools: Findable) {}\n\n async buildGraphFromRootPool(\n poolId: string,\n tokensToUnwrap: string[]\n ): Promise {\n const rootPool = await this.pools.find(poolId);\n if (!rootPool) throw new BalancerError(BalancerErrorCode.POOL_DOESNT_EXIST);\n const nodeIndex = 0;\n const rootNode = await this.buildGraphFromPool(\n rootPool.address,\n nodeIndex,\n undefined,\n WeiPerEther,\n tokensToUnwrap\n );\n return rootNode[0];\n }\n\n getTokenTotal(pool: Pool): BigNumber {\n const bptIndex = pool.tokensList.indexOf(pool.address);\n let total = Zero;\n const { balancesEvm } = parsePoolInfo(pool);\n balancesEvm.forEach((balance, i) => {\n // Ignore phantomBpt balance\n if (bptIndex !== i) {\n total = total.add(balance);\n }\n });\n return total;\n }\n\n async buildGraphFromPool(\n address: string,\n nodeIndex: number,\n parent: Node | undefined,\n proportionOfParent: BigNumber,\n tokensToUnwrap: string[]\n ): Promise<[Node, number]> {\n const pool = await this.pools.findBy('address', address);\n\n if (!pool) {\n if (!parent) {\n // If pool not found by address and is root pool (without parent), then throw error\n throw new BalancerError(BalancerErrorCode.POOL_DOESNT_EXIST);\n } else {\n // If pool not found by address, but it has parent, assume it's a leaf token and add a leafTokenNode\n const parentPool = (await this.pools.findBy(\n 'address',\n parent.address\n )) as Pool;\n const tokenIndex = parentPool.tokensList.indexOf(address);\n const leafTokenDecimals = parentPool.tokens[tokenIndex].decimals ?? 18;\n const { balancesEvm } = parsePoolInfo(parentPool);\n\n const nodeInfo = PoolGraph.createInputTokenNode(\n nodeIndex,\n address,\n leafTokenDecimals,\n parent,\n proportionOfParent,\n balancesEvm[tokenIndex].toString()\n );\n return nodeInfo;\n }\n }\n\n const joinAction = joinActions.get(pool.poolType);\n const exitAction = exitActions.get(pool.poolType);\n if (!joinAction || !exitAction)\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n\n const tokenTotal = this.getTokenTotal(pool);\n // Spot price service\n const { spotPriceCalculator } = PoolTypeConcerns.from(pool.poolType);\n const spotPrices: SpotPrices = {};\n let decimals = 18;\n // Spot price of a path is product of the sp of each pool in path. We calculate the sp for each pool token here to use as required later.\n pool.tokens.forEach((token) => {\n if (isSameAddress(token.address, pool.address)) {\n // Updated node with BPT token decimal\n decimals = token.decimals ? token.decimals : 18;\n return;\n }\n const sp = spotPriceCalculator.calcPoolSpotPrice(\n token.address,\n pool.address,\n pool\n );\n spotPrices[token.address] = sp;\n });\n\n let poolNode: Node = {\n address: pool.address,\n id: pool.id,\n type: pool.poolType,\n joinAction,\n exitAction,\n isProportionalExit: false,\n children: [],\n marked: false,\n index: nodeIndex.toString(),\n parent,\n proportionOfParent,\n isLeaf: false,\n spotPrices,\n decimals,\n balance: pool.totalShares,\n priceRate: WeiPerEther.toString(),\n };\n this.updateNodeIfProportionalExit(pool, poolNode);\n nodeIndex++;\n if (pool.poolType.toString().includes('Linear')) {\n [poolNode, nodeIndex] = this.createLinearNodeChildren(\n poolNode,\n nodeIndex,\n pool,\n tokensToUnwrap\n );\n } else {\n const { balancesEvm } = parsePoolInfo(pool);\n for (let i = 0; i < pool.tokens.length; i++) {\n // ignore any phantomBpt tokens\n if (isSameAddress(pool.tokens[i].address, pool.address)) continue;\n let proportion: BigNumber;\n // If the pool is a weighted pool we can use the actual tokenWeight as proportion\n if (pool.poolType === 'Weighted') {\n const tokenWeight = pool.tokens[i].weight as string;\n proportion = parseFixed(tokenWeight, 18);\n } else {\n proportion = BigNumber.from(balancesEvm[i])\n .mul((1e18).toString())\n .div(tokenTotal);\n }\n const finalProportion = proportion\n .mul(proportionOfParent)\n .div((1e18).toString());\n const childNode = await this.buildGraphFromPool(\n pool.tokens[i].address,\n nodeIndex,\n poolNode,\n finalProportion,\n tokensToUnwrap\n );\n nodeIndex = childNode[1];\n if (childNode[0]) poolNode.children.push(childNode[0]);\n }\n }\n return [poolNode, nodeIndex];\n }\n\n /**\n * Updates isProportionalExit for Node if the pool supports it\n * @param pool\n * @param node\n */\n updateNodeIfProportionalExit(pool: Pool, node: Node): void {\n if (pool.poolType === PoolType.Weighted) node.isProportionalExit = true;\n else if (\n pool.poolType === PoolType.ComposableStable &&\n pool.poolTypeVersion > 2\n )\n node.isProportionalExit = true;\n }\n\n createLinearNodeChildren(\n linearPoolNode: Node,\n nodeIndex: number,\n linearPool: Pool,\n tokensToUnwrap: string[]\n ): [Node, number] {\n // Main token\n if (linearPool.mainIndex === undefined)\n throw new Error('Issue With Linear Pool');\n\n if (\n tokensToUnwrap\n .map((t) => t.toLowerCase())\n .includes(linearPool.tokensList[linearPool.mainIndex].toLowerCase())\n ) {\n // Linear pool will be joined via wrapped token. This will be the child node.\n const wrappedNodeInfo = this.createWrappedTokenNode(\n linearPool,\n nodeIndex,\n linearPoolNode,\n linearPoolNode.proportionOfParent\n );\n linearPoolNode.children.push(wrappedNodeInfo[0]);\n return [linearPoolNode, wrappedNodeInfo[1]];\n } else {\n const { balancesEvm } = parsePoolInfo(linearPool);\n const mainTokenDecimals =\n linearPool.tokens[linearPool.mainIndex].decimals ?? 18;\n\n const nodeInfo = PoolGraph.createInputTokenNode(\n nodeIndex,\n linearPool.tokensList[linearPool.mainIndex],\n mainTokenDecimals,\n linearPoolNode,\n linearPoolNode.proportionOfParent,\n balancesEvm[linearPool.mainIndex].toString()\n );\n linearPoolNode.children.push(nodeInfo[0]);\n nodeIndex = nodeInfo[1];\n return [linearPoolNode, nodeIndex];\n }\n }\n\n createWrappedTokenNode(\n linearPool: Pool,\n nodeIndex: number,\n parent: Node | undefined,\n proportionOfParent: BigNumber\n ): [Node, number] {\n if (\n linearPool.wrappedIndex === undefined ||\n linearPool.mainIndex === undefined\n )\n throw new Error('Issue With Linear Pool');\n\n const { balancesEvm, upScaledBalances, scalingFactorsRaw, priceRates } =\n parsePoolInfo(linearPool);\n\n const wrappedTokenNode: Node = {\n type: 'WrappedToken',\n address: linearPool.tokensList[linearPool.wrappedIndex],\n id: 'N/A',\n children: [],\n marked: false,\n joinAction: 'wrap',\n exitAction: 'unwrap',\n isProportionalExit: false,\n index: nodeIndex.toString(),\n parent,\n proportionOfParent,\n isLeaf: false,\n spotPrices: {},\n decimals: 18,\n balance: balancesEvm[linearPool.wrappedIndex].toString(),\n priceRate: priceRates[linearPool.wrappedIndex].toString(),\n };\n nodeIndex++;\n\n const mainTokenDecimals =\n linearPool.tokens[linearPool.mainIndex].decimals ?? 18;\n\n /**\n * - upscaledBalances takes price rate into account, which is equivalent to unwrapping tokens\n * - downscaling with scalingFactorsRaw will downscale the unwrapped balance to the main token decimals\n */\n const unwrappedBalance = _downscaleDown(\n upScaledBalances[linearPool.wrappedIndex],\n scalingFactorsRaw[linearPool.mainIndex]\n ).toString();\n\n const inputNode = PoolGraph.createInputTokenNode(\n nodeIndex,\n linearPool.tokensList[linearPool.mainIndex],\n mainTokenDecimals,\n wrappedTokenNode,\n proportionOfParent,\n unwrappedBalance\n );\n wrappedTokenNode.children = [inputNode[0]];\n nodeIndex = inputNode[1];\n return [wrappedTokenNode, nodeIndex];\n }\n\n static createInputTokenNode(\n nodeIndex: number,\n address: string,\n decimals: number,\n parent: Node | undefined,\n proportionOfParent: BigNumber,\n balance: string\n ): [Node, number] {\n return [\n {\n address,\n id: 'N/A',\n type: 'Input',\n children: [],\n marked: false,\n joinAction: 'input',\n exitAction: 'output',\n isProportionalExit: false,\n index: nodeIndex.toString(), // This will be updated with real amounts in join construction.\n parent,\n proportionOfParent,\n isLeaf: true,\n spotPrices: {},\n decimals,\n balance,\n priceRate: WeiPerEther.toString(),\n },\n nodeIndex + 1,\n ];\n }\n\n static orderByBfs(root: Node): Node[] {\n // Breadth first traversal of graph\n const nodes: Node[] = [];\n const orderedNodes: Node[] = [];\n root.marked = true;\n nodes.push(root);\n while (nodes.length > 0) {\n const currentNode = nodes.shift(); // removes first\n if (currentNode) orderedNodes.push(currentNode);\n currentNode?.children.forEach((c) => {\n if (!c.marked) {\n c.marked = true;\n nodes.push(c);\n }\n });\n }\n return orderedNodes;\n }\n\n // Return a list of leaf token addresses\n static getLeafAddresses(nodes: Node[]): string[] {\n return nodes.filter((n) => n.isLeaf).map((n) => n.address);\n }\n\n /**\n * Checks if list of Nodes only contains pools that support proportional exits\n * @param nodes\n * @returns\n */\n static isProportionalPools(nodes: Node[]): boolean {\n return nodes.every((node) => {\n if (node.children.length > 1) return node.isProportionalExit;\n else return true;\n });\n }\n\n // Get full graph from root pool and return ordered nodes\n getGraphNodes = async (\n isJoin: boolean,\n poolId: string,\n tokensToUnwrap: string[]\n ): Promise => {\n const rootPool = await this.pools.find(poolId);\n if (!rootPool) throw new BalancerError(BalancerErrorCode.POOL_DOESNT_EXIST);\n\n const rootNode = await this.buildGraphFromRootPool(poolId, tokensToUnwrap);\n\n if (rootNode.id !== poolId) throw new Error('Error creating graph nodes');\n\n if (isJoin) return PoolGraph.orderByBfs(rootNode).reverse();\n else return PoolGraph.orderByBfs(rootNode);\n };\n}\n","import { defaultAbiCoder, Result } from '@ethersproject/abi';\n\nexport class WeightedPoolDecoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Decodes the userData parameter for providing the initial liquidity to a WeightedPool\n * @param data - encoded data\n */\n static joinInit = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256[]'], data);\n\n /**\n * Decodes the userData parameter for joining a WeightedPool with exact token inputs\n * @param data - encoded data\n */\n static joinExactTokensInForBPTOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256[]', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for joining a WeightedPool with a single token to receive an exact amount of BPT\n * @param data - encoded data\n */\n static joinTokenInForExactBPTOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for joining a WeightedPool proportionally to receive an exact amount of BPT\n * @param data - encoded data\n */\n static joinAllTokensInForExactBPTOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for exiting a WeightedPool by removing a single token in return for an exact amount of BPT\n * @param data - encoded data\n */\n static exitExactBPTInForOneTokenOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for exiting a WeightedPool by removing tokens in return for an exact amount of BPT\n * @param data - encoded data\n *\n */\n static exitExactBPTInForTokensOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for exiting a WeightedPool by removing exact amounts of tokens\n * @param data - encoded data\n */\n static exitBPTInForExactTokensOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256[]', 'uint256'], data);\n}\n","import { parseFixed, BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { defaultAbiCoder } from '@ethersproject/abi';\nimport { Zero } from '@ethersproject/constants';\nimport { bnum } from '@balancer-labs/sor';\n\nimport { PoolDictionary, Pool } from '../poolSource';\nimport { WeightedPoolDecoder } from '@/pool-weighted/decoder';\nimport { WeightedPoolJoinKind } from '@/pool-weighted/encoder';\nimport { isSameAddress } from '@/lib/utils';\nimport { Relayer } from '@/modules/relayer/relayer.module';\nimport { RelayerModel } from '../relayer';\nimport { ActionType } from '../vaultModel.module';\nimport { PoolToken } from '@/types';\n\nexport interface JoinPoolRequest {\n actionType: ActionType.Join;\n poolId: string;\n encodedUserData: string;\n outputReference: string;\n}\n\nexport class JoinModel {\n constructor(private relayerModel: RelayerModel) {}\n\n /**\n * Finds join kind given encoded user data.\n * @param encodedUserData\n * @returns\n */\n joinKind(encodedUserData: string): WeightedPoolJoinKind {\n const decodedUserData = defaultAbiCoder.decode(\n ['uint256'],\n encodedUserData\n );\n const joinKind = decodedUserData[0] as BigNumber;\n if (!joinKind) throw new Error('No exit kind.');\n return joinKind.toNumber() as WeightedPoolJoinKind;\n }\n\n /**\n * Decodes user join data and returns token input amounts\n * @param encodedUserData\n * @param joinKind\n * @returns\n */\n decodeJoinData(\n encodedUserData: string,\n joinKind: WeightedPoolJoinKind\n ): string | string[] {\n // At the moment all pools have same structure so just use WeightedPoolDecoded for all\n if (joinKind === WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT) {\n const bptAmountOut =\n WeightedPoolDecoder.joinAllTokensInForExactBPTOut(encodedUserData);\n return bptAmountOut.toString();\n } else if (joinKind === WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\n const [, amountsIn] =\n WeightedPoolDecoder.joinExactTokensInForBPTOut(encodedUserData);\n return amountsIn;\n } else if (joinKind === WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\n const [, bptAmountOut, tokenIndex] =\n WeightedPoolDecoder.joinTokenInForExactBPTOut(encodedUserData);\n return [bptAmountOut.toString(), tokenIndex];\n } else throw new Error('Non supported join data');\n }\n\n allTokensInForExactBPTOut(): string {\n throw new Error('joinAllTokensInForExactBPTOut not supported');\n /*\n We need maths for _calcAllTokensInGivenExactBptOut\n From SC:\n uint256 bptAmountOut = userData.allTokensInForExactBptOut();\n // Note that there is no maximum amountsIn parameter: this is handled by `IVault.joinPool`.\n \n uint256[] memory amountsIn = WeightedMath._calcAllTokensInGivenExactBptOut(balances, bptAmountOut, totalSupply);\n \n return (bptAmountOut, amountsIn);\n \n const bptAmountOut = this.decodeJoinData(\n encodedUserData,\n PoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT\n );\n */\n }\n\n joinExactTokensInForBPTOut(\n encodedUserData: string,\n pool: Pool\n ): [string, string[], string[]] {\n // This does not include a value for pre-minted BPT\n const amountsInWithRef = this.decodeJoinData(\n encodedUserData,\n WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT\n ) as string[];\n\n const amountsIn =\n this.relayerModel.doChainedRefReplacements(amountsInWithRef);\n // Calculate amount of BPT out given exact amounts in\n const bptAmountOut = pool._calcBptOutGivenExactTokensIn(\n amountsIn.map((a) => BigNumber.from(a))\n );\n\n // Updates BPT/totalShares value for pool\n if (\n pool.SubgraphType == 'StablePhantom' ||\n pool.SubgraphType == 'ComposableStable'\n ) {\n // Update BPT balance\n // totalShares will be updated as a side effect within SOR\n const bptAsPoolToken = pool.tokens.find((t: PoolToken) =>\n isSameAddress(t.address, pool.address)\n );\n if (!bptAsPoolToken)\n throw new Error('Pool does not contain BPT as a token');\n const bptBalanceEVM = parseFixed(\n bptAsPoolToken.balance.toString(),\n bptAsPoolToken.decimals\n );\n // subtract value because joining pool reduces pre-minted BPT being held by the pool\n pool.updateTokenBalanceForPool(\n pool.address,\n bptBalanceEVM.sub(bptAmountOut)\n );\n } else {\n // For pools that do not contain BPT as a token, update totalShares directly\n pool.updateTokenBalanceForPool(\n pool.address,\n pool.totalShares.add(bptAmountOut)\n );\n }\n\n const tokensWithoutBpt = pool.tokens.filter(\n (t: PoolToken) => !isSameAddress(t.address, pool.address)\n );\n // Update each tokens balance\n amountsIn.forEach((amount, i) => {\n const balanceEvm = parseFixed(\n tokensWithoutBpt[i].balance.toString(),\n tokensWithoutBpt[i].decimals\n );\n pool.updateTokenBalanceForPool(\n tokensWithoutBpt[i].address,\n balanceEvm.add(amount)\n );\n });\n return [\n bptAmountOut.toString(),\n tokensWithoutBpt.map((t: PoolToken) => t.address),\n amountsIn,\n ];\n }\n\n joinTokenInForExactBPTOut(\n encodedUserData: string,\n pool: Pool\n ): [string, string, string] {\n const [bptAmountOutWithRef, tokenInIndex] = this.decodeJoinData(\n encodedUserData,\n WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT\n ) as string;\n\n const bptAmountOut =\n this.relayerModel.doChainedRefReplacement(bptAmountOutWithRef);\n // Uses an existing SOR functionality so need to deal with pairData and scaling\n const pairData = pool.parsePoolPairData(\n pool.tokensList[Number(tokenInIndex)],\n pool.address\n );\n\n const bptAmountOutHuman = formatFixed(bptAmountOut, 18);\n // Needs human scale\n const amountInHuman = pool\n ._tokenInForExactTokenOut(\n pairData as never,\n bnum(bptAmountOutHuman.toString())\n )\n .dp(pairData.decimalsIn);\n const amountInEvm = parseFixed(\n amountInHuman.toString(),\n pairData.decimalsIn\n );\n\n // Update balances of tokenIn and tokenOut - use EVM scale\n pool.updateTokenBalanceForPool(\n pairData.tokenIn,\n pairData.balanceIn.add(amountInEvm)\n );\n // For a join we have to add the extra BPT to the balance as this is equivalent to bptTotalSupply\n pool.updateTokenBalanceForPool(\n pairData.tokenOut,\n pairData.balanceOut.add(bptAmountOut)\n );\n\n return [amountInEvm.toString(), pairData.tokenIn, amountInEvm.toString()];\n }\n\n /**\n * Perform the specified exit type.\n * @param joinPoolRequest\n * @returns tokens out\n */\n async doJoinPool(\n joinPoolRequest: JoinPoolRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n const pool = pools[joinPoolRequest.poolId];\n const joinKind = this.joinKind(joinPoolRequest.encodedUserData);\n let bptOut = '0';\n let tokens: string[] = [];\n let amounts: string[] = [];\n if (joinKind === WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT) {\n // Returns amount of tokens in - This isn't currently implemented\n bptOut = this.allTokensInForExactBPTOut();\n } else if (joinKind === WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\n // Returns amount of BPT out\n [bptOut, tokens, amounts] = this.joinExactTokensInForBPTOut(\n joinPoolRequest.encodedUserData,\n pool\n );\n } else if (joinKind === WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\n // Returns amount of tokenIn\n let tokenIn: string, amountIn: string;\n [bptOut, tokenIn, amountIn] = this.joinTokenInForExactBPTOut(\n joinPoolRequest.encodedUserData,\n pool\n );\n tokens.push(tokenIn);\n amounts.push(amountIn);\n } else throw new Error('Exit type not implemented');\n\n tokens.push(pool.address);\n // -ve because coming from Vault\n amounts.push(Zero.sub(bptOut).toString());\n\n if (\n joinPoolRequest.outputReference &&\n Relayer.isChainedReference(joinPoolRequest.outputReference)\n ) {\n this.relayerModel.setChainedReferenceValue(\n joinPoolRequest.outputReference,\n bptOut\n );\n }\n return [tokens, amounts];\n }\n}\n","import { parseFixed, BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { defaultAbiCoder } from '@ethersproject/abi';\nimport { Zero } from '@ethersproject/constants';\nimport { bnum } from '@balancer-labs/sor';\n\nimport { PoolDictionary, Pool } from '../poolSource';\nimport { ComposableStablePoolExitKind } from '@/pool-composable-stable';\nimport { WeightedPoolDecoder } from '@/pool-weighted/decoder';\nimport { WeightedPoolExitKind } from '@/pool-weighted/encoder';\nimport { isSameAddress } from '@/lib/utils';\nimport { RelayerModel } from '../relayer';\nimport { ActionType } from '../vaultModel.module';\nimport { OutputReference } from '@/modules/relayer/types';\nimport { PoolToken } from '@/types';\n\nexport interface ExitPoolRequest {\n actionType: ActionType.Exit;\n poolId: string;\n encodedUserData: string;\n outputReferences: OutputReference[];\n}\n\nfunction getBalancesForTokens(pool: Pool, tokens: string[]): string[] {\n const balances: string[] = [];\n tokens.forEach((t) => {\n const tokenIndex = pool.tokens.findIndex((pt: PoolToken) =>\n isSameAddress(pt.address, t)\n );\n if (tokenIndex < 0) throw 'Pool does not contain tokenIn';\n balances.push(\n parseFixed(\n pool.tokens[tokenIndex].balance,\n pool.tokens[tokenIndex].decimals\n ).toString()\n );\n });\n return balances;\n}\n\nexport class ExitModel {\n constructor(private relayerModel: RelayerModel) {}\n\n /**\n * Finds exit kind given encoded user data and pool type.\n * @param poolType\n * @param encodedUserData\n * @returns\n */\n exitKind(poolType: string, encodedUserData: string): WeightedPoolExitKind {\n const decodedUserData = defaultAbiCoder.decode(\n ['uint256'],\n encodedUserData\n );\n const exitKind = decodedUserData[0] as BigNumber;\n if (!exitKind) throw new Error('No exit kind.');\n if (poolType === 'ComposableStable') {\n if (\n exitKind.toNumber() ===\n ComposableStablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT\n )\n return WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT;\n if (\n exitKind.toNumber() ===\n ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT\n )\n return WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT;\n else {\n return WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT;\n }\n } else {\n return exitKind.toNumber() as WeightedPoolExitKind;\n }\n }\n\n /**\n * Decodes user exit data and returns token input amounts\n * @param encodedUserData\n * @param exitKind\n * @returns\n */\n decodeExitData(\n encodedUserData: string,\n exitKind: WeightedPoolExitKind\n ): string[] {\n // At the moment all pools have same structure so just use WeightedPoolDecoded for all\n if (exitKind === WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT) {\n const [, amountsOut, maxBPTAmountIn] =\n WeightedPoolDecoder.exitBPTInForExactTokensOut(encodedUserData);\n return [amountsOut.toString(), maxBPTAmountIn.toString()];\n } else if (\n exitKind === WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT\n ) {\n const [, bptIn, tokenIndex] =\n WeightedPoolDecoder.exitExactBPTInForOneTokenOut(encodedUserData);\n return [bptIn.toString(), tokenIndex.toString()];\n } else if (exitKind === WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\n const [, bptIn] =\n WeightedPoolDecoder.exitExactBPTInForTokensOut(encodedUserData);\n return [bptIn.toString()];\n } else throw new Error('Non supported exit data');\n }\n\n /**\n * Exit pool, BPT in to tokens out.\n * Updates pool balances.\n * @param encodedUserData\n * @param pool\n * @returns tokensOut\n */\n exactBptInForTokensOut(\n encodedUserData: string,\n pool: Pool\n ): [string, string[], string[]] {\n const [bptInWithRef] = this.decodeExitData(\n encodedUserData,\n WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT\n );\n\n const bptIn = this.relayerModel.doChainedRefReplacement(bptInWithRef);\n // Calculate amount of tokens out given an exact amount of BPT in\n const amountsOut = pool\n ._calcTokensOutGivenExactBptIn(BigNumber.from(bptIn))\n .map((a: BigNumber) => a.toString());\n\n // Updates BPT/totalShares value for pool\n if (\n pool.SubgraphType == 'StablePhantom' ||\n pool.SubgraphType == 'ComposableStable'\n ) {\n // Update BPT balance\n // totalShares will be updated as a side effect within SOR\n const bptAsPoolToken = pool.tokens.find((t: PoolToken) =>\n isSameAddress(t.address, pool.address)\n );\n if (!bptAsPoolToken)\n throw new Error('Pool does not contain BPT as a token');\n const bptBalanceEVM = parseFixed(\n bptAsPoolToken.balance.toString(),\n bptAsPoolToken.decimals\n );\n pool.updateTokenBalanceForPool(\n pool.address,\n bptBalanceEVM.add(bptIn) // add value because exiting pool increases pre-minted BPT being held by the pool\n );\n } else {\n // For pools that do not contain BPT as a token, update totalShares directly\n pool.updateTokenBalanceForPool(pool.address, pool.totalShares.sub(bptIn));\n }\n\n const tokensWithoutBpt = pool.tokens.filter(\n (t: PoolToken) => !isSameAddress(t.address, pool.address)\n );\n // Update each tokens balance\n amountsOut.forEach((amountOut: string, i: number) => {\n const balanceEvm = parseFixed(\n tokensWithoutBpt[i].balance.toString(),\n tokensWithoutBpt[i].decimals\n );\n pool.updateTokenBalanceForPool(\n tokensWithoutBpt[i].address,\n balanceEvm.sub(amountOut)\n );\n });\n return [\n bptIn,\n tokensWithoutBpt.map((t: PoolToken) => t.address),\n amountsOut,\n ];\n }\n\n /**\n * Exit pool, BPT in to single token out.\n * Updates pool balances.\n * @param encodedUserData\n * @param pool\n * @returns tokens out\n */\n exactBptInForOneTokenOut(\n encodedUserData: string,\n pool: Pool\n ): [string, string[], string[]] {\n const [bptInWithRef, tokenIndex] = this.decodeExitData(\n encodedUserData,\n WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT\n );\n const bptIn = this.relayerModel.doChainedRefReplacement(bptInWithRef);\n // Uses an existing SOR functionality so need to deal with pairData and scaling\n const pairData = pool.parsePoolPairData(\n pool.address,\n pool.tokensList[Number(tokenIndex)]\n );\n // Calculation requires floating point number input\n const amountInHuman: string = formatFixed(bptIn, pairData.decimalsIn);\n // Calculate amount of token out given an exact amount of BPT in\n const amountOutHuman = pool\n ._exactTokenInForTokenOut(pairData as never, bnum(amountInHuman))\n .dp(pairData.decimalsOut);\n const amountOutEvm = parseFixed(\n amountOutHuman.toString(),\n pairData.decimalsOut\n );\n\n // Update balances use EVM scaled\n const poolBalances = getBalancesForTokens(pool, [\n pool.address,\n pairData.tokenOut,\n ]);\n // Subtract token out amount from pool\n pool.updateTokenBalanceForPool(\n pairData.tokenOut,\n BigNumber.from(poolBalances[1]).sub(amountOutEvm)\n );\n\n if (\n pool.SubgraphType == 'StablePhantom' ||\n pool.SubgraphType == 'ComposableStable'\n ) {\n // Add value because exiting pool increases pre-minted BPT being held by the pool\n // totalShares is updated as a side effect on SOR\n pool.updateTokenBalanceForPool(\n pool.address,\n BigNumber.from(poolBalances[0]).add(bptIn)\n );\n } else {\n // Exiting a pool is equivalent to removing from totalSupply (totalShares) so must sub here\n pool.updateTokenBalanceForPool(pool.address, pool.totalShares.sub(bptIn));\n }\n\n const tokensWithoutBpt = pool.tokensList.filter(\n (t: string) => !isSameAddress(t, pool.address)\n );\n const amountsOut = new Array(tokensWithoutBpt.length).fill('0');\n amountsOut[Number(tokenIndex)] = amountOutEvm.toString();\n return [bptIn, tokensWithoutBpt, amountsOut];\n }\n\n /**\n * Perform the specified exit type.\n * @param exitPoolRequest\n * @returns tokens out\n */\n async doExitPool(\n exitPoolRequest: ExitPoolRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n const pool = pools[exitPoolRequest.poolId];\n const exitKind = this.exitKind(\n pool.SubgraphType,\n exitPoolRequest.encodedUserData\n );\n let amountsOut: string[] = [];\n let bptIn: string;\n let tokensOut: string[] = [];\n const tokens: string[] = [];\n const deltas: string[] = [];\n if (exitKind === WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\n [bptIn, tokensOut, amountsOut] = this.exactBptInForTokensOut(\n exitPoolRequest.encodedUserData,\n pool\n );\n } else if (\n exitKind === WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT\n ) {\n [bptIn, tokensOut, amountsOut] = this.exactBptInForOneTokenOut(\n exitPoolRequest.encodedUserData,\n pool\n );\n } else throw new Error('Exit type not implemented');\n\n // Save any chained references\n for (let i = 0; i < exitPoolRequest.outputReferences.length; i++) {\n const tokenOut =\n pool.tokensList[exitPoolRequest.outputReferences[i].index];\n const tokenOutIndex = tokensOut.indexOf(tokenOut);\n if (tokenOutIndex === -1) throw new Error('Token out not found');\n this.relayerModel.setChainedReferenceValue(\n exitPoolRequest.outputReferences[i].key.toString(),\n amountsOut[tokenOutIndex]\n );\n }\n tokens.push(pool.address, ...tokensOut);\n deltas.push(bptIn, ...amountsOut.map((a) => Zero.sub(a).toString()));\n return [tokens, deltas];\n }\n}\n","import { parseFixed, BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { Zero } from '@ethersproject/constants';\nimport { bnum } from '@balancer-labs/sor';\n\nimport { PoolDictionary, Pool } from '../poolSource';\nimport { EncodeBatchSwapInput } from '@/modules/relayer/types';\nimport { Swap, SwapType } from '@/modules/swaps/types';\nimport { Relayer } from '@/modules/relayer/relayer.module';\nimport { RelayerModel } from '../relayer';\nimport { ActionType } from '../vaultModel.module';\n\nexport interface SwapRequest\n extends Pick {\n actionType: ActionType.Swap;\n}\n\nexport interface BatchSwapRequest\n extends Pick<\n EncodeBatchSwapInput,\n 'swaps' | 'assets' | 'funds' | 'swapType' | 'outputReferences'\n > {\n actionType: ActionType.BatchSwap;\n}\n\nexport class SwapModel {\n constructor(private relayerModel: RelayerModel) {}\n\n /**\n * Performs a single swap with one pool.\n * @param swapRequest\n * @returns Returns the net Vault asset balance delta. Positive amount represent token (or ETH) sent to the Vault, and negative amount represent token (or ETH) sent by the Vault. Delta corresponds to the asset out.\n */\n async doSingleSwap(\n swapRequest: SwapRequest,\n pools: PoolDictionary\n ): Promise {\n const amountIn = this.relayerModel.doChainedRefReplacement(\n swapRequest.request.amount.toString()\n );\n\n const pool = pools[swapRequest.request.poolId];\n const [, amountOutEvm] = this.doSwap(\n swapRequest.request.assetIn,\n swapRequest.request.assetOut,\n pool,\n swapRequest.request.kind,\n amountIn\n );\n\n const delta = Zero.sub(amountOutEvm);\n if (!swapRequest.outputReference)\n throw new Error('Missing outputReference');\n\n // Swap return values are signed, as they are Vault deltas (positive values correspond to assets sent\n // to the Vault, and negative values are assets received from the Vault). To simplify the chained reference\n // value model, we simply store the absolute value.\n this.relayerModel.setChainedReferenceValue(\n swapRequest.outputReference.toString(),\n delta.abs().toString()\n );\n return [delta.toString(), amountIn];\n }\n\n /**\n * Performs a series of swaps with one or multiple Pools.\n * @param batchSwapRequest\n * @returns Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array.\n */\n async doBatchSwap(\n batchSwapRequest: BatchSwapRequest,\n pools: PoolDictionary\n ): Promise {\n const assets = batchSwapRequest.assets;\n const deltas = new Array(assets.length).fill(Zero);\n // Used for multihop swaps where previous swap return is used as input to next swap\n let previousAmount: string;\n\n for (let i = 0; i < batchSwapRequest.swaps.length; ++i) {\n const amount = batchSwapRequest.swaps[i].amount;\n if (Relayer.isChainedReference(amount)) {\n batchSwapRequest.swaps[i].amount =\n this.relayerModel.getChainedReferenceValue(amount);\n }\n }\n\n // Handle each swap in order\n batchSwapRequest.swaps.forEach((swap) => {\n const tokenIn = assets[swap.assetInIndex];\n const tokenOut = assets[swap.assetOutIndex];\n const pool = pools[swap.poolId];\n let amount = swap.amount;\n if (amount === '0') amount = previousAmount;\n const [amountInEvm, amountOutEvm] = this.doSwap(\n tokenIn,\n tokenOut,\n pool,\n batchSwapRequest.swapType,\n amount\n );\n\n previousAmount =\n batchSwapRequest.swapType === SwapType.SwapExactIn\n ? amountOutEvm.toString()\n : amountInEvm.toString();\n\n deltas[swap.assetInIndex] = deltas[swap.assetInIndex].add(amountInEvm);\n deltas[swap.assetOutIndex] = deltas[swap.assetOutIndex].sub(amountOutEvm);\n });\n\n for (let i = 0; i < batchSwapRequest.outputReferences.length; i++) {\n // Batch swap return values are signed, as they are Vault deltas (positive values correspond to assets sent\n // to the Vault, and negative values are assets received from the Vault). To simplify the chained reference\n // value model, we simply store the absolute value.\n this.relayerModel.setChainedReferenceValue(\n batchSwapRequest.outputReferences[i].key.toString(),\n deltas[batchSwapRequest.outputReferences[i].index].abs().toString()\n );\n }\n return deltas.map((d) => d.toString());\n }\n\n /**\n * Perform swap against a pool (and update balances)\n * @param tokenIn\n * @param tokenOut\n * @param pool\n * @param swapType\n * @param amount (EVM Scale)\n * @returns\n */\n doSwap(\n tokenIn: string,\n tokenOut: string,\n pool: Pool,\n swapType: SwapType,\n amount: string\n ): BigNumber[] {\n const pairData = pool.parsePoolPairData(tokenIn, tokenOut);\n const isExactIn = swapType === SwapType.SwapExactIn;\n let amountInEvm: string | BigNumber = isExactIn\n ? BigNumber.from(amount)\n : Zero;\n let amountOutEvm: string | BigNumber = isExactIn\n ? Zero\n : BigNumber.from(amount);\n const amountInHuman: string | BigNumber = formatFixed(\n amountInEvm,\n pairData.decimalsIn\n );\n const amountOutHuman: string | BigNumber = formatFixed(\n amountOutEvm,\n pairData.decimalsOut\n );\n\n if (isExactIn) {\n // Needs human scale\n const amountOutHuman = pool\n ._exactTokenInForTokenOut(\n pairData as never,\n bnum(amountInHuman.toString())\n )\n .dp(pairData.decimalsOut);\n amountOutEvm = parseFixed(\n amountOutHuman.toString(),\n pairData.decimalsOut\n );\n } else {\n // Needs human scale\n const amountInHuman = pool\n ._tokenInForExactTokenOut(\n pairData as never,\n bnum(amountOutHuman.toString())\n )\n .dp(pairData.decimalsIn);\n amountInEvm = parseFixed(amountInHuman.toString(), pairData.decimalsIn);\n }\n // Update balances of tokenIn and tokenOut - use EVM scale\n pool.updateTokenBalanceForPool(\n pairData.tokenIn,\n pairData.balanceIn.add(amountInEvm)\n );\n pool.updateTokenBalanceForPool(\n pairData.tokenOut,\n pairData.balanceOut.sub(amountOutEvm)\n );\n return [amountInEvm, amountOutEvm];\n }\n}\n","import { LinearPool } from '@balancer-labs/sor';\nimport { parseFixed } from '@ethersproject/bignumber';\n\nimport { EncodeUnwrapAaveStaticTokenInput } from '@/modules/relayer/types';\n\nimport { PoolDictionary } from '../poolSource';\nimport { RelayerModel } from '../relayer';\nimport { ActionType } from '../vaultModel.module';\nimport { WeiPerEther, Zero } from '@ethersproject/constants';\nimport { SolidityMaths } from '@/lib/utils/solidityMaths';\n\nexport interface UnwrapRequest\n extends Pick {\n poolId: string;\n actionType: ActionType.Unwrap;\n}\n\nexport class UnwrapModel {\n constructor(private relayerModel: RelayerModel) {}\n\n /**\n * Perform the specified unwrap type.\n * @param unwrapRequest\n * @param pools\n * @returns tokens out and their respective deltas\n */\n async doUnwrap(\n unwrapRequest: UnwrapRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n const pool = pools[unwrapRequest.poolId] as LinearPool;\n const wrappedToken = pool.tokens[pool.wrappedIndex];\n const underlyingToken = pool.tokens[pool.mainIndex];\n\n const amountIn = this.relayerModel.doChainedRefReplacement(\n unwrapRequest.amount.toString()\n );\n\n // must be negative because is leaving the vault\n const amountOut = SolidityMaths.divDownFixed(\n SolidityMaths.mulDownFixed(\n BigInt(amountIn),\n parseFixed(wrappedToken.priceRate, 18).toBigInt()\n ),\n WeiPerEther.toBigInt()\n ).toString();\n\n // Save chained references\n this.relayerModel.setChainedReferenceValue(\n unwrapRequest.outputReference.toString(),\n amountOut\n );\n\n const tokens = [wrappedToken.address, underlyingToken.address];\n const deltas = [amountIn, Zero.sub(amountOut).toString()];\n return [tokens, deltas];\n }\n}\n","import { PoolDictionary } from '../poolSource';\nimport { RelayerModel } from '../relayer';\nimport { JoinModel, JoinPoolRequest } from './join';\nimport { ExitModel, ExitPoolRequest } from './exit';\nimport { SwapModel, BatchSwapRequest, SwapRequest } from './swap';\nimport { UnwrapModel, UnwrapRequest } from './unwrap';\n\nexport class PoolModel {\n joinModel: JoinModel;\n exitModel: ExitModel;\n swapModel: SwapModel;\n unwrapModel: UnwrapModel;\n\n constructor(private relayerModel: RelayerModel) {\n this.joinModel = new JoinModel(relayerModel);\n this.exitModel = new ExitModel(relayerModel);\n this.swapModel = new SwapModel(relayerModel);\n this.unwrapModel = new UnwrapModel(relayerModel);\n }\n\n async doJoin(\n joinPoolRequest: JoinPoolRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n return this.joinModel.doJoinPool(joinPoolRequest, pools);\n }\n\n async doExit(\n exitPoolRequest: ExitPoolRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n return this.exitModel.doExitPool(exitPoolRequest, pools);\n }\n\n async doBatchSwap(\n batchSwapRequest: BatchSwapRequest,\n pools: PoolDictionary\n ): Promise {\n return this.swapModel.doBatchSwap(batchSwapRequest, pools);\n }\n\n async doSingleSwap(\n swapRequest: SwapRequest,\n pools: PoolDictionary\n ): Promise {\n return this.swapModel.doSingleSwap(swapRequest, pools);\n }\n\n async doUnwrap(\n unwrapRequest: UnwrapRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n return this.unwrapModel.doUnwrap(unwrapRequest, pools);\n }\n}\n","import { Relayer } from '@/modules/relayer/relayer.module';\n\nexport class RelayerModel {\n chainedRefs: Record = {};\n\n /**\n * Stores `value` as the amount referenced by chained reference `ref`.\n * @param ref\n * @param value\n */\n setChainedReferenceValue(ref: string, value: string): void {\n this.chainedRefs[ref] = value;\n }\n\n /**\n * Returns the amount referenced by chained reference `ref`.\n * @param ref\n * @returns\n */\n getChainedReferenceValue(ref: string): string {\n return this.chainedRefs[ref];\n }\n\n doChainedRefReplacement(amount: string): string {\n if (Relayer.isChainedReference(amount.toString())) {\n return this.getChainedReferenceValue(amount.toString());\n } else return amount;\n }\n\n doChainedRefReplacements(amounts: string[]): string[] {\n return amounts.map((amount) =>\n this.doChainedRefReplacement(amount).toString()\n );\n }\n}\n","import { cloneDeep } from 'lodash';\nimport {\n SubgraphPoolBase,\n SubgraphToken,\n PoolDataService,\n WeightedPool,\n StablePool,\n MetaStablePool,\n LinearPool,\n PhantomStablePool,\n ComposableStablePool,\n} from '@balancer-labs/sor';\nimport { Logger } from '@/lib/utils/logger';\n\nexport interface PoolDictionary {\n [poolId: string]: Pool;\n}\n\nexport type Pool =\n | (\n | WeightedPool\n | StablePool\n | LinearPool\n | MetaStablePool\n | PhantomStablePool\n | ComposableStablePool\n ) & { SubgraphType: string };\n\nexport class PoolsSource {\n poolsArray: SubgraphPoolBase[] = [];\n poolsDict: PoolDictionary = {};\n constructor(\n private poolDataService: PoolDataService,\n private wrappedNativeAsset: string\n ) {}\n dataSource(): PoolDataService {\n return this.poolDataService;\n }\n\n async all(refresh = false): Promise {\n if (refresh || this.poolsArray.length === 0) {\n const list = cloneDeep(await this.dataSource().getPools());\n for (const pool of list) {\n // For non pre-minted BPT pools we add the BPT to the token list. This makes the SOR functions work for joins/exits\n if (\n [\n 'Weighted',\n 'Investment',\n 'Stable',\n 'LiquidityBootstrapping',\n ].includes(pool.poolType)\n ) {\n const BptAsToken: SubgraphToken = {\n address: pool.address,\n balance: pool.totalShares,\n decimals: 18,\n priceRate: '1',\n weight: '0',\n };\n pool.tokens.push(BptAsToken);\n pool.tokensList.push(pool.address);\n }\n }\n this.poolsArray = list;\n }\n return this.poolsArray;\n }\n\n parseToPoolsDict(pools: SubgraphPoolBase[]): PoolDictionary {\n return Object.fromEntries(\n cloneDeep(pools)\n .filter(\n (pool) => pool.tokensList.length > 0 && pool.tokens[0].balance !== '0'\n )\n .map((pool) => [pool.id, this.parseNewPool(pool)])\n .filter(([, pool]) => pool !== undefined)\n );\n }\n\n parseNewPool(subgraphPool: SubgraphPoolBase): Pool | undefined {\n // We're not interested in any pools which don't allow swapping\n if (!subgraphPool.swapEnabled) return undefined;\n\n let pool: Pool = {} as Pool;\n\n try {\n if (\n ['Weighted', 'Investment', 'LiquidityBootstrapping'].includes(\n subgraphPool.poolType\n )\n ) {\n const sorPool = WeightedPool.fromPool(subgraphPool, false);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType === 'Stable') {\n const sorPool = StablePool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType === 'MetaStable') {\n const sorPool = MetaStablePool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType.toString().includes('Linear')) {\n const sorPool = LinearPool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType === 'StablePhantom') {\n const sorPool = PhantomStablePool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType === 'ComposableStable') {\n const sorPool = ComposableStablePool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else {\n const logger = Logger.getInstance();\n logger.warn(\n `Unknown pool type or type field missing: ${subgraphPool.poolType} ${subgraphPool.id}`\n );\n return undefined;\n }\n if (!pool) throw new Error('Issue with Pool');\n pool.SubgraphType = subgraphPool.poolType;\n } catch (err) {\n console.error(`Error parseNewPool`);\n return undefined;\n }\n return pool;\n }\n\n /**\n * Converts Subgraph array into PoolDictionary\n * @param refresh\n * @returns\n */\n async poolsDictionary(refresh = false): Promise {\n if (refresh || Object.keys(this.poolsDict).length === 0) {\n const poolsArray = await this.all(refresh);\n this.poolsDict = this.parseToPoolsDict(poolsArray);\n }\n return this.poolsDict;\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { Zero } from '@ethersproject/constants';\nimport { PoolDataService } from '@balancer-labs/sor';\n\nimport { PoolModel } from './poolModel/poolModel';\nimport { JoinPoolRequest } from './poolModel/join';\nimport { ExitPoolRequest } from './poolModel/exit';\nimport { BatchSwapRequest, SwapRequest } from './poolModel/swap';\nimport { UnwrapRequest } from './poolModel/unwrap';\nimport { RelayerModel } from './relayer';\nimport { PoolsSource } from './poolSource';\nimport {\n EncodeBatchSwapInput,\n EncodeJoinPoolInput,\n EncodeExitPoolInput,\n} from '../relayer/types';\nimport { Swap } from '../swaps/types';\n\nexport enum ActionType {\n BatchSwap,\n Join,\n Exit,\n Swap,\n Unwrap,\n}\n\nexport type Requests =\n | BatchSwapRequest\n | JoinPoolRequest\n | ExitPoolRequest\n | SwapRequest\n | UnwrapRequest;\n\n/**\n * Controller / use-case layer for interacting with pools data.\n */\nexport class VaultModel {\n poolsSource: PoolsSource;\n\n constructor(poolDataService: PoolDataService, wrappedNativeAsset: string) {\n this.poolsSource = new PoolsSource(poolDataService, wrappedNativeAsset);\n }\n\n updateDeltas(\n deltas: Record,\n assets: string[],\n amounts: string[]\n ): Record {\n assets.forEach((t, i) => {\n if (!deltas[t]) deltas[t] = Zero;\n deltas[t] = deltas[t].add(amounts[i]);\n });\n return deltas;\n }\n\n async multicall(\n rawCalls: Requests[],\n refresh = false\n ): Promise> {\n const relayerModel = new RelayerModel();\n const poolModel = new PoolModel(relayerModel);\n const pools = await this.poolsSource.poolsDictionary(refresh);\n const deltas: Record = {};\n for (const call of rawCalls) {\n let tokens: string[] = [];\n let amounts: string[] = [];\n switch (call.actionType) {\n case ActionType.Join: {\n [tokens, amounts] = await poolModel.doJoin(call, pools);\n break;\n }\n case ActionType.Exit: {\n [tokens, amounts] = await poolModel.doExit(call, pools);\n break;\n }\n case ActionType.BatchSwap: {\n tokens = call.assets;\n amounts = await poolModel.doBatchSwap(call, pools);\n break;\n }\n case ActionType.Swap: {\n tokens = [call.request.assetOut, call.request.assetIn];\n amounts = await poolModel.doSingleSwap(call, pools);\n break;\n }\n case ActionType.Unwrap: {\n [tokens, amounts] = await poolModel.doUnwrap(call, pools);\n break;\n }\n default:\n break;\n }\n this.updateDeltas(deltas, tokens, amounts);\n }\n return deltas;\n }\n\n static mapSwapRequest(call: Swap): SwapRequest {\n const swapRequest: SwapRequest = {\n actionType: ActionType.Swap,\n request: call.request,\n funds: call.funds,\n outputReference: call.outputReference,\n };\n return swapRequest;\n }\n\n static mapBatchSwapRequest(call: EncodeBatchSwapInput): BatchSwapRequest {\n const batchSwapRequest: BatchSwapRequest = {\n actionType: ActionType.BatchSwap,\n swaps: call.swaps,\n assets: call.assets,\n funds: call.funds,\n swapType: call.swapType,\n outputReferences: call.outputReferences,\n };\n return batchSwapRequest;\n }\n\n static mapJoinPoolRequest(call: EncodeJoinPoolInput): JoinPoolRequest {\n const joinPoolRequest: JoinPoolRequest = {\n actionType: ActionType.Join,\n poolId: call.poolId,\n encodedUserData: call.joinPoolRequest.userData,\n outputReference: call.outputReference,\n };\n return joinPoolRequest;\n }\n\n static mapExitPoolRequest(call: EncodeExitPoolInput): ExitPoolRequest {\n const exitPoolRequest: ExitPoolRequest = {\n actionType: ActionType.Exit,\n poolId: call.poolId,\n encodedUserData: call.exitPoolRequest.userData,\n outputReferences: call.outputReferences,\n };\n return exitPoolRequest;\n }\n\n static mapUnwrapRequest(\n amount: BigNumberish,\n outputReference: BigNumberish,\n poolId: string\n ): UnwrapRequest {\n const unwrapRequest: UnwrapRequest = {\n actionType: ActionType.Unwrap,\n poolId,\n amount,\n outputReference,\n };\n return unwrapRequest;\n }\n}\n","import { cloneDeep } from 'lodash';\nimport { BigNumber, BigNumberish, parseFixed } from '@ethersproject/bignumber';\nimport { AddressZero, WeiPerEther, Zero } from '@ethersproject/constants';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { EncodeJoinPoolInput, Relayer } from '@/modules/relayer/relayer.module';\nimport {\n FundManagement,\n SingleSwap,\n Swap,\n SwapType,\n} from '@/modules/swaps/types';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport { BalancerNetworkConfig, JoinPoolRequest, PoolType } from '@/types';\nimport { PoolGraph, Node } from '../graph/graph';\n\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { networkAddresses } from '@/lib/constants/config';\nimport { AssetHelpers, getEthValue, isSameAddress, replace } from '@/lib/utils';\nimport {\n SolidityMaths,\n _computeScalingFactor,\n _upscale,\n} from '@/lib/utils/solidityMaths';\nimport { calcPriceImpact } from '../pricing/priceImpact';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { getPoolAddress } from '@/pool-utils';\nimport { Simulation, SimulationType } from '../simulation/simulation.module';\nimport { Requests, VaultModel } from '../vaultModel/vaultModel.module';\nimport { SwapRequest } from '../vaultModel/poolModel/swap';\nimport { JoinPoolRequest as JoinPoolModelRequest } from '../vaultModel/poolModel/join';\nimport { JsonRpcSigner } from '@ethersproject/providers';\nimport { BalancerRelayer__factory } from '@/contracts/factories/BalancerRelayer__factory';\nimport { Logger } from '@/lib/utils/logger';\n\nconst balancerRelayerInterface = BalancerRelayer__factory.createInterface();\n\n// Quickly switch useful debug logs on/off\nconst DEBUG = false;\n\nfunction debugLog(log: string) {\n const logger = Logger.getInstance();\n if (DEBUG) logger.info(log);\n}\n\nexport class Join {\n private relayer: string;\n private wrappedNativeAsset;\n constructor(\n private poolGraph: PoolGraph,\n networkConfig: BalancerNetworkConfig,\n private simulationService: Simulation\n ) {\n const { tokens, contracts } = networkAddresses(networkConfig.chainId);\n this.relayer = contracts.balancerRelayer;\n this.wrappedNativeAsset = tokens.wrappedNativeAsset;\n }\n\n private checkInputs(tokensIn: string[], amountsIn: string[]) {\n if (tokensIn.length === 0)\n throw new BalancerError(BalancerErrorCode.MISSING_TOKENS);\n\n if (amountsIn.every((a) => a === '0'))\n throw new BalancerError(BalancerErrorCode.JOIN_WITH_ZERO_AMOUNT);\n\n if (tokensIn.length != amountsIn.length)\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n\n if (\n tokensIn.some((t) => t === AddressZero) &&\n tokensIn.some(\n (t) => t.toLowerCase() === this.wrappedNativeAsset.toLowerCase()\n )\n )\n throw new BalancerError(BalancerErrorCode.INPUT_TOKEN_INVALID);\n }\n\n async joinPool(\n poolId: string,\n tokensIn: string[],\n amountsIn: string[],\n userAddress: string,\n slippage: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType,\n authorisation?: string\n ): Promise<{\n to: string;\n encodedCall: string;\n expectedOut: string;\n minOut: string;\n priceImpact: string;\n value: BigNumberish;\n }> {\n this.checkInputs(tokensIn, amountsIn);\n\n // Create nodes for each pool/token interaction and order by breadth first\n const orderedNodes = await this.poolGraph.getGraphNodes(true, poolId, []);\n\n const nativeAssetIndex = tokensIn.findIndex((t) => t === AddressZero);\n const isNativeAssetJoin = nativeAssetIndex !== -1;\n const tokensInWithoutNativeAsset = replace(\n tokensIn,\n nativeAssetIndex,\n this.wrappedNativeAsset.toLowerCase()\n );\n\n const joinPaths = Join.getJoinPaths(\n orderedNodes,\n tokensInWithoutNativeAsset,\n amountsIn\n );\n\n const totalBptZeroPi = Join.totalBptZeroPriceImpact(joinPaths);\n /*\n - Create calls with 0 min bpt for each root join\n - static call (or V4 special call) to get actual amounts for each root join\n - Apply slippage to amounts\n - Recreate calls with minAmounts === actualAmountsWithSlippage\n - Return minAmoutOut (sum actualAmountsWithSlippage), UI would use this to display to user\n - Return updatedCalls, UI would use this to execute tx\n */\n // Create calls with 0 expected for each root join\n // Peek is enabled here so we can static call the returned amounts and use these to set limits\n debugLog(`\\n--- Simulation Calls ---`);\n const {\n multiRequests,\n encodedCall: queryData,\n outputIndexes,\n } = await this.createCalls(\n joinPaths,\n userAddress,\n isNativeAssetJoin,\n undefined,\n authorisation\n );\n\n // TODO: add this back once relayerV6 is released and we're able to peek while joining with ETH\n // const simulationValue = isNativeAssetJoin\n // ? simulationDeltas[this.wrappedNativeAsset.toLowerCase()]\n // : Zero;\n\n // static call (or V4 special call) to get actual amounts for each root join\n const { amountsOut, totalAmountOut } = await this.amountsOutByJoinPath(\n userAddress,\n multiRequests,\n queryData,\n tokensInWithoutNativeAsset,\n outputIndexes,\n signer,\n simulationType,\n '0' // TODO: change to simulationValue.tosString() once relayerV6 is released\n );\n\n const { minAmountsOut, totalMinAmountOut } = this.minAmountsOutByJoinPath(\n slippage,\n amountsOut,\n totalAmountOut\n );\n const priceImpact = calcPriceImpact(\n BigInt(totalAmountOut),\n totalBptZeroPi.toBigInt(),\n true\n ).toString();\n\n // Create calls with minAmountsOut\n debugLog(`\\n--- Final Calls ---`);\n const { encodedCall, deltas } = await this.createCalls(\n joinPaths,\n userAddress,\n isNativeAssetJoin,\n minAmountsOut,\n authorisation\n );\n\n const value = isNativeAssetJoin\n ? deltas[this.wrappedNativeAsset.toLowerCase()]\n : Zero;\n debugLog(`Total value: ${value.toString()}`);\n\n this.assertDeltas(\n poolId,\n deltas,\n tokensInWithoutNativeAsset,\n amountsIn,\n totalMinAmountOut\n );\n\n return {\n to: this.relayer,\n encodedCall,\n expectedOut: totalAmountOut,\n minOut: totalMinAmountOut,\n priceImpact,\n value,\n };\n }\n\n private assertDeltas(\n poolId: string,\n deltas: Record,\n tokensIn: string[],\n amountsIn: string[],\n minBptOut: string\n ): void {\n const poolAddress = getPoolAddress(poolId);\n const outDiff = deltas[poolAddress.toLowerCase()].add(minBptOut);\n\n if (outDiff.abs().gt(3)) {\n console.error(\n `join assertDeltas, bptOut: `,\n poolAddress,\n minBptOut,\n deltas[poolAddress.toLowerCase()]?.toString()\n );\n throw new BalancerError(BalancerErrorCode.JOIN_DELTA_AMOUNTS);\n }\n delete deltas[poolAddress.toLowerCase()];\n\n tokensIn.forEach((token, i) => {\n if (\n !BigNumber.from(amountsIn[i]).eq(0) &&\n deltas[token.toLowerCase()]?.toString() !== amountsIn[i]\n ) {\n console.error(\n `join assertDeltas, tokenIn: `,\n token,\n amountsIn[i],\n deltas[token.toLowerCase()]?.toString()\n );\n throw new BalancerError(BalancerErrorCode.JOIN_DELTA_AMOUNTS);\n }\n delete deltas[token.toLowerCase()];\n });\n\n for (const token in deltas) {\n if (deltas[token].toString() !== '0') {\n console.error(\n `join assertDeltas, non-input token should be 0: `,\n token,\n deltas[token].toString()\n );\n throw new BalancerError(BalancerErrorCode.JOIN_DELTA_AMOUNTS);\n }\n }\n }\n\n // Create join paths from tokensIn all the way to the root node.\n static getJoinPaths = (\n orderedNodes: Node[],\n tokensIn: string[],\n amountsIn: string[]\n ): Node[][] => {\n const joinPaths: Node[][] = [];\n\n // Filter all nodes that contain a token in the tokensIn array\n const inputNodes = orderedNodes.filter((node) =>\n tokensIn\n .filter((t, i) => BigNumber.from(amountsIn[i]).gt(0)) // Remove input tokens with 0 amounts\n .map((tokenIn) => tokenIn.toLowerCase())\n .includes(node.address.toLowerCase())\n );\n\n // If inputNodes contain at least one leaf token, then add path to join proportionally with all leaf tokens contained in tokensIn\n const containsLeafNode = inputNodes.some((node) => node.isLeaf);\n if (containsLeafNode) {\n joinPaths.push(orderedNodes);\n }\n\n // Add a join path for each non-leaf input node\n const nonLeafInputNodes = inputNodes.filter((node) => !node.isLeaf);\n nonLeafInputNodes.forEach((nonLeafInputNode) => {\n // Get amount in for current node\n const nonLeafAmountIn = amountsIn.find((amountIn, i) =>\n isSameAddress(tokensIn[i], nonLeafInputNode.address)\n ) as string;\n // Split amount in between nodes with same non-leaf input token based on proportionOfParent\n const totalProportions = nonLeafInputNodes\n .filter((node) => isSameAddress(node.address, nonLeafInputNode.address))\n .reduce(\n (total, node) => total.add(node.proportionOfParent),\n BigNumber.from(0)\n );\n const proportionalNonLeafAmountIn = BigNumber.from(nonLeafAmountIn)\n .mul(nonLeafInputNode.proportionOfParent)\n .div(totalProportions)\n .toString();\n // Create input node for current non-leaf input token\n const [inputTokenNode] = PoolGraph.createInputTokenNode(\n 0, // temp value that will be updated after creation\n nonLeafInputNode.address,\n nonLeafInputNode.decimals,\n nonLeafInputNode.parent,\n WeiPerEther,\n nonLeafInputNode.balance\n );\n // Update index to be actual amount in\n inputTokenNode.index = proportionalNonLeafAmountIn;\n inputTokenNode.isLeaf = false;\n // Start join path with input node\n const nonLeafJoinPath = [inputTokenNode];\n // Add each parent to the join path until we reach the root node\n let parent = inputTokenNode.parent;\n let currentChild = inputTokenNode;\n while (parent) {\n const parentCopy = cloneDeep(parent);\n parentCopy.children = parentCopy.children.map((child) => {\n if (child.address === currentChild.address) {\n // Replace original child with current child that was modified to handle the non-leaf join\n return currentChild;\n } else {\n // Update index of siblings that are not within the join path to be 0\n return { ...child, index: '0' };\n }\n });\n nonLeafJoinPath.push(parentCopy);\n currentChild = parentCopy;\n parent = parentCopy.parent;\n }\n // Add join path to list of join paths\n joinPaths.push(nonLeafJoinPath);\n });\n\n // After creating all join paths, update the index of each input node to be the amount in for that node\n // All other node indexes will be used as a reference to store the amounts out for that node\n this.updateInputAmounts(joinPaths, tokensIn, amountsIn);\n\n return joinPaths;\n };\n\n /*\n AmountsIn should be adjusted after being split between tokensIn to fix eventual rounding issues.\n This prevents the transaction to leave out dust amounts.\n */\n private static updateInputAmounts = (\n joinPaths: Node[][],\n tokensIn: string[],\n amountsIn: string[]\n ): void => {\n // Helper function to calculate and adjust amount difference for each token in\n const ajdustAmountInDiff = (\n tokenInInputNodes: Node[],\n amountIn: string\n ): void => {\n if (tokenInInputNodes.length > 1) {\n // Sum of amountsIn from each input node with same tokenIn\n const amountsInSumforTokenIn = tokenInInputNodes.reduce(\n (sum, currentNode) => sum.add(currentNode.index),\n BigNumber.from(0)\n );\n // Compare total amountIn with sum of amountIn split between each input node with same tokenIn\n const diff = BigNumber.from(amountIn).sub(amountsInSumforTokenIn);\n // Apply difference to first input node with same tokenIn\n tokenInInputNodes[0].index = diff\n .add(tokenInInputNodes[0].index)\n .toString();\n }\n };\n\n // Update amountsIn within leaf join path\n const leafJoinPath = joinPaths.find((joinPath) => joinPath[0].isLeaf);\n if (leafJoinPath) {\n // Update input proportions so inputs are shared correctly between leaf nodes with same tokenIn\n const totalProportions = this.updateTotalProportions(leafJoinPath);\n // Update input nodes to have correct input amount\n leafJoinPath.forEach((node) => {\n if (node.joinAction === 'input')\n node = this.updateNodeAmount(\n node,\n tokensIn,\n amountsIn,\n totalProportions\n );\n });\n // Adjust amountIn for each tokenIn to fix eventual rounding issues\n tokensIn.forEach((tokenIn, i) => {\n const tokenInInputNodes = leafJoinPath.filter(\n (inputNode) =>\n inputNode.isLeaf && isSameAddress(inputNode.address, tokenIn)\n );\n ajdustAmountInDiff(tokenInInputNodes, amountsIn[i]);\n });\n }\n\n // Adjust amountsIn shared between non-leaf join paths with same tokenIn\n const nonLeafJoinPaths = joinPaths.filter(\n (joinPath) => !joinPath[0].isLeaf\n );\n if (nonLeafJoinPaths.length > 1) {\n tokensIn.forEach((tokenIn, i) => {\n const tokenInInputNodes = nonLeafJoinPaths\n .map((path) => path[0])\n .filter((node) => isSameAddress(node.address, tokenIn));\n ajdustAmountInDiff(tokenInInputNodes, amountsIn[i]);\n });\n }\n };\n\n private createCalls = async (\n joinPaths: Node[][],\n userAddress: string,\n isNativeAssetJoin: boolean,\n minAmountsOut?: string[], // one for each joinPath\n authorisation?: string\n ): Promise<{\n multiRequests: Requests[][];\n encodedCall: string;\n outputIndexes: number[];\n deltas: Record;\n }> => {\n // Create calls for both leaf and non-leaf inputs\n const { multiRequests, encodedCalls, outputIndexes, deltas } =\n this.createActionCalls(\n joinPaths,\n userAddress,\n isNativeAssetJoin,\n minAmountsOut\n );\n\n if (authorisation) {\n encodedCalls.unshift(this.createSetRelayerApproval(authorisation));\n }\n const encodedCall = balancerRelayerInterface.encodeFunctionData(\n 'multicall',\n [encodedCalls]\n );\n\n return {\n multiRequests,\n encodedCall,\n outputIndexes: authorisation\n ? outputIndexes.map((i) => i + 1)\n : outputIndexes,\n deltas,\n };\n };\n\n /*\n 1. For each input token:\n 1. recursively find the spot price for each pool in the path of the join\n 2. take the product to get the spot price of the path\n 3. multiply the input amount of that token by the path spot price to get the \"zeroPriceImpact\" amount of BPT for that token\n 2. Sum each tokens zeroPriceImpact BPT amount to get total zeroPriceImpact BPT\n */\n static totalBptZeroPriceImpact = (joinPaths: Node[][]): BigNumber => {\n // Add bptZeroPriceImpact for all inputs\n let totalBptZeroPi = BigNumber.from('0');\n joinPaths.forEach((joinPath) => {\n const isLeafJoin = joinPath[0].isLeaf;\n if (isLeafJoin) {\n // Calculate bptZeroPriceImpact for leaf inputs\n const leafNodes = joinPath.filter((node) => node.isLeaf);\n leafNodes.forEach((leafNode) => {\n const bptOut = this.bptOutZeroPiForInputNode(leafNode);\n totalBptZeroPi = totalBptZeroPi.add(bptOut);\n });\n } else {\n // Calculate bptZeroPriceImpact for non-leaf inputs\n const bptOut = this.bptOutZeroPiForInputNode(joinPath[0]);\n totalBptZeroPi = totalBptZeroPi.add(bptOut);\n }\n });\n return totalBptZeroPi;\n };\n\n /*\n 1. recursively find the spot price for each pool in the path of the join\n 2. take the product to get the spot price of the path\n 3. multiply the input amount of that token by the path spot price to get the \"zeroPriceImpact\" amount of BPT for that token \n */\n static bptOutZeroPiForInputNode = (inputNode: Node): bigint => {\n if (inputNode.index === '0' || inputNode.joinAction !== 'input')\n return BigInt(0);\n let spProduct = 1;\n let parentNode: Node | undefined = inputNode.parent;\n let childAddress = inputNode.address;\n // Traverse up graph until we reach root adding each node\n while (parentNode !== undefined) {\n if (\n parentNode.joinAction === 'batchSwap' ||\n parentNode.joinAction === 'joinPool'\n ) {\n const sp = parentNode.spotPrices[childAddress.toLowerCase()];\n spProduct = spProduct * parseFloat(sp);\n childAddress = parentNode.address;\n }\n parentNode = parentNode.parent;\n }\n const spPriceScaled = parseFixed(spProduct.toFixed(18), 18);\n const scalingFactor = _computeScalingFactor(BigInt(inputNode.decimals));\n const inputAmountScaled = _upscale(BigInt(inputNode.index), scalingFactor);\n const bptOut = SolidityMaths.divDownFixed(\n inputAmountScaled,\n spPriceScaled.toBigInt()\n );\n return bptOut;\n };\n\n /*\n Simulate transaction and decodes each output of interest.\n */\n private amountsOutByJoinPath = async (\n userAddress: string,\n multiRequests: Requests[][],\n callData: string,\n tokensIn: string[],\n outputIndexes: number[],\n signer: JsonRpcSigner,\n simulationType: SimulationType,\n value: string\n ): Promise<{ amountsOut: string[]; totalAmountOut: string }> => {\n const amountsOut = await this.simulationService.simulateGeneralisedJoin(\n this.relayer,\n multiRequests,\n callData,\n outputIndexes,\n userAddress,\n tokensIn,\n signer,\n simulationType,\n value\n );\n\n const totalAmountOut = amountsOut\n .reduce((sum, amount) => sum.add(BigNumber.from(amount)), Zero)\n .toString();\n\n return {\n amountsOut,\n totalAmountOut,\n };\n };\n\n /*\n Apply slippage to amounts\n */\n private minAmountsOutByJoinPath = (\n slippage: string,\n amounts: string[],\n totalAmountOut: string\n ): { minAmountsOut: string[]; totalMinAmountOut: string } => {\n const minAmountsOut = amounts.map((amount) =>\n subSlippage(BigNumber.from(amount), BigNumber.from(slippage)).toString()\n );\n const totalMinAmountOut = subSlippage(\n BigNumber.from(totalAmountOut),\n BigNumber.from(slippage)\n ).toString();\n\n return {\n minAmountsOut,\n totalMinAmountOut,\n };\n };\n\n private updateDeltas(\n deltas: Record,\n assets: string[],\n amounts: string[]\n ): Record {\n assets.forEach((t, i) => {\n const asset = t.toLowerCase();\n if (!deltas[asset]) deltas[asset] = Zero;\n deltas[asset] = deltas[asset].add(amounts[i]);\n });\n return deltas;\n }\n\n // Create actions for each Node and return in multicall array\n // Create calls for each path, use value stored in minBptAmounts if available\n private createActionCalls = (\n joinPaths: Node[][],\n userAddress: string,\n isNativeAssetJoin: boolean,\n minAmountsOut?: string[]\n ): {\n multiRequests: Requests[][];\n encodedCalls: string[];\n outputIndexes: number[];\n deltas: Record;\n } => {\n const multiRequests: Requests[][] = [];\n const encodedCalls: string[] = [];\n const outputIndexes: number[] = [];\n const isSimulation = !minAmountsOut;\n const deltas: Record = {};\n\n joinPaths.forEach((joinPath, j) => {\n const isLeafJoin = joinPath[0].isLeaf;\n const modelRequests: Requests[] = [];\n\n joinPath.forEach((node, i) => {\n // Prevent adding action calls with input amounts equal 0\n if (\n node.children.length > 0 &&\n node.children.filter((c) => this.shouldBeConsidered(c)).length === 0\n ) {\n node.index = '0';\n return;\n }\n\n // Sender's rule\n // 1. If any child node is an input node, tokens are coming from the user\n const hasChildInput = node.children\n .filter((c) => this.shouldBeConsidered(c))\n .some((c) => c.joinAction === 'input');\n const sender = hasChildInput ? userAddress : this.relayer;\n\n // Recipient's rule\n // 1. Transactions with sibling input node must be sent to user because it will be the sender of the following transaction (per sender's rule above)\n // e.g. boostedMetaAlt - MAI/bbausd - joining with MAI from user and bbausd from earlier actions. MAI needs to come from user.\n // 2. Last transaction must be sent to the user\n // 3. Otherwise relayer\n // Note: scenario 1 usually happens with joinPool transactions that have both BPT and undelying tokens as tokensIn\n const isLastChainedCall = i === joinPath.length - 1;\n const hasSiblingInput =\n (isLeafJoin && // non-leaf joins don't have siblings that should be considered\n node.parent?.children\n .filter((s) => this.shouldBeConsidered(s))\n .some((s) => s.joinAction === 'input')) ??\n false;\n const recipient =\n isLastChainedCall || hasSiblingInput ? userAddress : this.relayer;\n\n // Last action will use minBptOut to protect user. Middle calls can safely have 0 minimum as tx will revert if last fails.\n const minOut =\n isLastChainedCall && minAmountsOut ? minAmountsOut[j] : '0';\n\n switch (node.joinAction) {\n case 'batchSwap':\n {\n const { modelRequest, encodedCall, assets, amounts } =\n this.createSwap(\n node,\n j,\n minOut,\n sender,\n recipient,\n isNativeAssetJoin,\n isSimulation\n );\n modelRequests.push(modelRequest);\n encodedCalls.push(encodedCall);\n this.updateDeltas(deltas, assets, amounts);\n }\n break;\n case 'joinPool':\n {\n const { modelRequest, encodedCall, assets, amounts, minBptOut } =\n this.createJoinPool(\n node,\n j,\n minOut,\n sender,\n recipient,\n isNativeAssetJoin,\n isSimulation\n );\n modelRequests.push(modelRequest);\n encodedCalls.push(encodedCall);\n this.updateDeltas(\n deltas,\n [node.address, ...assets],\n [minBptOut, ...amounts]\n );\n }\n break;\n default:\n return;\n }\n });\n if (isSimulation) {\n const outputRef = 100 * j;\n const encodedPeekCall = Relayer.encodePeekChainedReferenceValue(\n Relayer.toChainedReference(outputRef, false)\n );\n encodedCalls.push(encodedPeekCall);\n outputIndexes.push(encodedCalls.indexOf(encodedPeekCall));\n }\n multiRequests.push(modelRequests);\n });\n\n return { multiRequests, encodedCalls, outputIndexes, deltas };\n };\n\n /**\n * Creates a map of node address and total proportion. Used for the case where there may be multiple inputs using same token, e.g. DAI input to 2 pools.\n * @param nodes nodes to consider.\n */\n static updateTotalProportions = (\n nodes: Node[]\n ): Record => {\n const totalProportions: Record = {};\n nodes.forEach((node) => {\n if (!totalProportions[node.address])\n totalProportions[node.address] = node.proportionOfParent;\n else {\n totalProportions[node.address] = totalProportions[node.address].add(\n node.proportionOfParent\n );\n }\n });\n return totalProportions;\n };\n\n /**\n * Uses relayer to approve itself to act in behalf of the user\n *\n * @param authorisation Encoded authorisation call.\n * @returns relayer approval call\n */\n private createSetRelayerApproval = (authorisation: string): string => {\n return Relayer.encodeSetRelayerApproval(this.relayer, true, authorisation);\n };\n\n static updateNodeAmount = (\n node: Node,\n tokensIn: string[],\n amountsIn: string[],\n totalProportions: Record\n ): Node => {\n /*\n An input node requires a real amount (not an outputRef) as it is first node in chain.\n This amount will be used when chaining to parent.\n Amounts are split proportionally between all inputs with same token.\n */\n const tokenIndex = tokensIn\n .map((t) => t.toLowerCase())\n .indexOf(node.address.toLowerCase());\n if (tokenIndex === -1) {\n node.index = '0';\n return node;\n }\n\n // Calculate proportional split\n const totalProportion = totalProportions[node.address];\n const inputProportion = node.proportionOfParent\n .mul((1e18).toString())\n .div(totalProportion);\n const inputAmount = inputProportion\n .mul(amountsIn[tokenIndex])\n .div((1e18).toString());\n // Update index with actual value\n node.index = inputAmount.toString();\n // console.log(\n // `${node.type} ${node.address} prop: ${node.proportionOfParent.toString()}\n // ${node.joinAction} (\n // Inputs: ${inputAmount.toString()}\n // OutputRef: ${node.index}\n // )`\n // );\n return node;\n };\n\n private createSwap = (\n node: Node,\n joinPathIndex: number,\n expectedOut: string,\n sender: string,\n recipient: string,\n isNativeAssetJoin: boolean,\n isSimulation: boolean\n ): {\n modelRequest: SwapRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n } => {\n // We only need swaps for main > linearBpt so shouldn't be more than token > token\n if (node.children.length !== 1) throw new Error('Unsupported swap');\n const tokenIn = node.children[0].address;\n const amountIn = this.getOutputRefValue(joinPathIndex, node.children[0]);\n\n // Single swap limits are always positive\n // Swap within generalisedJoin is always exactIn, so use minAmountOut to set limit\n const limit: string = expectedOut;\n\n const assetIn =\n isNativeAssetJoin && !isSimulation\n ? this.replaceWrappedNativeAsset([tokenIn])[0]\n : tokenIn;\n\n const request: SingleSwap = {\n poolId: node.id,\n kind: SwapType.SwapExactIn,\n assetIn,\n assetOut: node.address,\n amount: amountIn.value,\n userData: '0x',\n };\n\n const fromInternalBalance = this.allImmediateChildrenSendToInternal(node);\n const toInternalBalance = this.allSiblingsSendToInternal(node);\n\n const funds: FundManagement = {\n sender,\n recipient,\n fromInternalBalance,\n toInternalBalance,\n };\n\n const outputReference = BigNumber.from(\n this.getOutputRefValue(joinPathIndex, node).value\n );\n\n const value =\n isNativeAssetJoin && !isSimulation\n ? getEthValue([assetIn], [amountIn.value])\n : Zero;\n\n const call: Swap = {\n request,\n funds,\n limit,\n deadline: BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value,\n outputReference,\n };\n\n const encodedCall = Relayer.encodeSwap(call);\n\n debugLog(`\\nSwap:`);\n debugLog(`${JSON.stringify(call)}`);\n debugLog(`Partial value: ${JSON.stringify(call.value?.toString())}`);\n\n const modelRequest = VaultModel.mapSwapRequest(call);\n\n const hasChildInput = node.children.some((c) => c.joinAction === 'input');\n // If node has no child input the swap is part of a chain and token in shouldn't be considered for user deltas\n const userTokenIn = !hasChildInput ? '0' : amountIn.value;\n // If node has parent the swap is part of a chain and BPT out shouldn't be considered for user deltas\n const userBptOut =\n node.parent != undefined\n ? '0'\n : BigNumber.from(expectedOut).mul(-1).toString(); // needs to be negative because it's handled by the vault model as an amount going out of the vault\n\n const assets = [node.address, tokenIn];\n const amounts = [userBptOut, userTokenIn];\n\n return { modelRequest, encodedCall, assets, amounts };\n };\n\n private createJoinPool = (\n node: Node,\n joinPathIndex: number,\n minAmountOut: string,\n sender: string,\n recipient: string,\n isNativeAssetJoin: boolean,\n isSimulation: boolean\n ): {\n modelRequest: JoinPoolModelRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n minBptOut: string;\n } => {\n const inputTokens: string[] = [];\n const inputAmts: string[] = [];\n\n // inputTokens needs to include each asset even if it has 0 amount\n node.children.forEach((child) => {\n inputTokens.push(child.address);\n // non-leaf joins should set input amounts only for children that are in their joinPath\n if (this.shouldBeConsidered(child)) {\n inputAmts.push(this.getOutputRefValue(joinPathIndex, child).value);\n } else {\n inputAmts.push('0');\n }\n });\n\n if (node.type === PoolType.ComposableStable) {\n // assets need to include the phantomPoolToken\n inputTokens.push(node.address);\n // need to add a placeholder so sorting works\n inputAmts.push('0');\n }\n\n // sort inputs\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [sortedTokens, sortedAmounts] = assetHelpers.sortTokens(\n inputTokens,\n inputAmts\n ) as [string[], string[]];\n\n // userData amounts should not include the BPT of the pool being joined\n let userDataAmounts = [];\n const bptIndex = sortedTokens\n .map((t) => t.toLowerCase())\n .indexOf(node.address.toLowerCase());\n if (bptIndex === -1) {\n userDataAmounts = sortedAmounts;\n } else {\n userDataAmounts = [\n ...sortedAmounts.slice(0, bptIndex),\n ...sortedAmounts.slice(bptIndex + 1),\n ];\n }\n\n let userData: string;\n if (node.type === PoolType.Weighted) {\n userData = WeightedPoolEncoder.joinExactTokensInForBPTOut(\n userDataAmounts,\n minAmountOut\n );\n } else {\n userData = StablePoolEncoder.joinExactTokensInForBPTOut(\n userDataAmounts,\n minAmountOut\n );\n }\n\n const value =\n isNativeAssetJoin && !isSimulation\n ? getEthValue(\n this.replaceWrappedNativeAsset(sortedTokens),\n sortedAmounts\n )\n : Zero;\n\n const fromInternalBalance = this.allImmediateChildrenSendToInternal(node);\n\n const call: EncodeJoinPoolInput = Relayer.formatJoinPoolInput({\n poolId: node.id,\n kind: 0,\n sender,\n recipient,\n value,\n outputReference: this.getOutputRefValue(joinPathIndex, node).value,\n joinPoolRequest: {} as JoinPoolRequest,\n assets:\n isNativeAssetJoin && !isSimulation\n ? this.replaceWrappedNativeAsset(sortedTokens)\n : sortedTokens, // Must include BPT token\n maxAmountsIn: sortedAmounts,\n userData,\n fromInternalBalance,\n });\n const encodedCall = Relayer.encodeJoinPool(call);\n\n debugLog(`\\nJoin:`);\n debugLog(JSON.stringify(call));\n debugLog(`Partial value: ${JSON.stringify(call.value?.toString())}`);\n const modelRequest = VaultModel.mapJoinPoolRequest(call);\n\n const userAmountsTokenIn = sortedAmounts.map((a) =>\n Relayer.isChainedReference(a) ? '0' : a\n );\n const userAmountOut = Relayer.isChainedReference(minAmountOut)\n ? '0'\n : minAmountOut;\n\n const hasChildInput = node.children\n .filter((c) => this.shouldBeConsidered(c))\n .some((c) => c.joinAction === 'input');\n // If node has no child input the join is part of a chain and amounts in shouldn't be considered for user deltas\n const assets = !hasChildInput ? [] : sortedTokens;\n const amounts = !hasChildInput ? [] : userAmountsTokenIn;\n // If node has parent the join is part of a chain and shouldn't be considered for user deltas\n const minBptOut =\n node.parent != undefined\n ? Zero.toString()\n : Zero.sub(userAmountOut).toString(); // -ve because coming from Vault\n\n return { modelRequest, encodedCall, assets, amounts, minBptOut };\n };\n\n private getOutputRefValue = (\n joinPathIndex: number,\n node: Node\n ): { value: string; isRef: boolean } => {\n if (node.joinAction === 'input') {\n // Input nodes have their indexes set as the actual input amount, instead of a chained reference\n return { value: node.index, isRef: false };\n } else if (node.index !== '0' || !node.parent) {\n // Root node (parent === undefined) has index zero, but should still pass chained reference as outputRef value\n return {\n value: Relayer.toChainedReference(\n BigNumber.from(node.index).add(joinPathIndex * 100)\n ).toString(),\n isRef: true,\n };\n } else {\n return {\n value: '0',\n isRef: true,\n };\n }\n };\n\n // Nodes with index 0 won't affect transactions so they shouldn't be considered\n private shouldBeConsidered = (node: Node): boolean => {\n return node.index !== '0';\n };\n\n // joinPool transaction always sends to non-internal balance\n // input always behave as sending to non-internal balance\n private sendsToInternalBalance = (node: Node): boolean => {\n return node.joinAction !== 'input' && node.joinAction !== 'joinPool';\n };\n\n private allImmediateChildrenSendToInternal = (node: Node): boolean => {\n const children = node.children.filter((c) => this.shouldBeConsidered(c));\n if (children.length === 0) return false;\n return (\n children.filter((c) => this.sendsToInternalBalance(c)).length ===\n children.length\n );\n };\n\n private allSiblingsSendToInternal = (node: Node): boolean => {\n if (!node.parent) return false;\n const siblings = node.parent.children.filter((s) =>\n this.shouldBeConsidered(s)\n );\n return (\n siblings.filter((s) => this.sendsToInternalBalance(s)).length ===\n siblings.length\n );\n };\n\n private replaceWrappedNativeAsset = (tokens: string[]): string[] => {\n const wrappedNativeAssetIndex = tokens.findIndex(\n (t) => t.toLowerCase() === this.wrappedNativeAsset.toLowerCase()\n );\n return replace(tokens, wrappedNativeAssetIndex, AddressZero);\n };\n}\n","import axios from 'axios';\nimport { AddressZero, MaxInt256 } from '@ethersproject/constants';\nimport { parseFixed } from '@ethersproject/bignumber';\n\nimport { networkAddresses } from '@/lib/constants/config';\nimport { BalancerTenderlyConfig } from '@/types';\n\ntype StateOverrides = {\n [address: string]: { value: { [key: string]: string } };\n};\n\nexport default class TenderlyHelper {\n private vaultAddress;\n private tenderlyUrl;\n private opts?;\n private blockNumber: number | undefined;\n\n constructor(private chainId: number, tenderlyConfig: BalancerTenderlyConfig) {\n const { contracts } = networkAddresses(this.chainId);\n this.vaultAddress = contracts.vault as string;\n this.tenderlyUrl = `https://api.tenderly.co/api/v1/account/${tenderlyConfig.user}/project/${tenderlyConfig.project}/`;\n this.opts = {\n headers: {\n 'X-Access-Key': tenderlyConfig.accessKey,\n },\n };\n\n this.blockNumber = tenderlyConfig.blockNumber;\n }\n\n simulateMulticall = async (\n to: string,\n data: string,\n userAddress: string,\n tokens: string[],\n value = '0'\n ): Promise => {\n const tokensOverrides = await this.encodeBalanceAndAllowanceOverrides(\n userAddress,\n tokens\n );\n const relayerApprovalOverride = await this.encodeRelayerApprovalOverride(\n userAddress,\n to\n );\n const encodedStateOverrides = {\n ...tokensOverrides,\n ...relayerApprovalOverride,\n };\n return this.simulateTransaction(\n to,\n data,\n userAddress,\n encodedStateOverrides,\n value\n );\n };\n\n simulateTransaction = async (\n to: string,\n data: string,\n userAddress: string,\n encodedStateOverrides: StateOverrides,\n value: string\n ): Promise => {\n // Map encoded-state response into simulate request body by replacing property names\n const stateOverrides = Object.fromEntries(\n Object.keys(encodedStateOverrides).map((address) => {\n // Object.fromEntries require format [key, value] instead of {key: value}\n return [address, { storage: encodedStateOverrides[address].value }];\n })\n );\n\n // Set user balance to 1000 ETH to make sure the simulation doesn't fail due to insufficient balance\n const state_objects = {\n ...stateOverrides,\n [userAddress]: {\n balance: parseFixed('100', 18).toHexString(),\n },\n };\n\n const body = {\n // -- Standard TX fields --\n network_id: this.chainId.toString(),\n block_number: this.blockNumber,\n from: userAddress,\n to,\n input: data,\n // gas: 8000000,\n // gas_price: '0',\n value,\n // -- Simulation config (tenderly specific) --\n save_if_fails: true,\n // save: true,\n simulation_type: 'quick', // remove this while developing/debugging\n state_objects,\n };\n\n const SIMULATE_URL = this.tenderlyUrl + 'simulate';\n\n const resp = await axios.post(SIMULATE_URL, body, this.opts);\n\n const simulatedTransactionOutput =\n resp.data.transaction.transaction_info.call_trace.output;\n\n return simulatedTransactionOutput;\n };\n\n // Encode relayer approval state override\n encodeRelayerApprovalOverride = async (\n userAddress: string,\n relayerAddress: string\n ): Promise => {\n const stateOverrides: StateOverrides = {\n [`${this.vaultAddress}`]: {\n value: {\n [`_approvedRelayers[${userAddress}][${relayerAddress}]`]:\n true.toString(),\n },\n },\n };\n\n const encodedStateOverrides = await this.requestStateOverrides(\n stateOverrides\n );\n\n return encodedStateOverrides;\n };\n\n // Encode token balances and allowances overrides to max value\n encodeBalanceAndAllowanceOverrides = async (\n userAddress: string,\n tokens: string[]\n ): Promise => {\n const tokensWithoutNativeAsset = tokens.filter(\n (token) => token !== AddressZero\n );\n\n if (tokensWithoutNativeAsset.length === 0) return {};\n\n // Create balances and allowances overrides for each token address provided\n let stateOverrides: StateOverrides = {};\n tokensWithoutNativeAsset.forEach(\n (token) =>\n (stateOverrides = {\n ...stateOverrides,\n [`${token}`]: {\n value: {\n [`_balances[${userAddress}]`]: MaxInt256.toString(),\n [`_allowances[${userAddress}][${this.vaultAddress}]`]:\n MaxInt256.toString(),\n [`balanceOf[${userAddress}]`]: MaxInt256.toString(),\n [`allowance[${userAddress}][${this.vaultAddress}]`]:\n MaxInt256.toString(),\n [`balances[${userAddress}]`]: MaxInt256.toString(),\n [`allowed[${userAddress}][${this.vaultAddress}]`]:\n MaxInt256.toString(),\n },\n },\n })\n );\n\n const encodedStateOverrides = await this.requestStateOverrides(\n stateOverrides\n );\n\n if (\n Object.keys(encodedStateOverrides).some((k) => {\n return Object.keys(encodedStateOverrides[k].value).length !== 2;\n })\n )\n throw new Error(\n \"Couldn't encode state overrides - states should match the ones in the contracts\"\n );\n\n return encodedStateOverrides;\n };\n\n private requestStateOverrides = async (\n stateOverrides: StateOverrides\n ): Promise => {\n const ENCODE_STATES_URL = this.tenderlyUrl + 'contracts/encode-states';\n const body = {\n networkID: this.chainId.toString(),\n stateOverrides,\n };\n\n const encodedStatesResponse = await axios.post(\n ENCODE_STATES_URL,\n body,\n this.opts\n );\n const encodedStateOverrides = encodedStatesResponse.data\n .stateOverrides as StateOverrides;\n\n if (\n !encodedStateOverrides ||\n Object.keys(encodedStateOverrides).length !==\n Object.keys(stateOverrides).length\n )\n throw new Error(\n \"Couldn't encode state overrides - contracts should be verified and whitelisted on Tenderly\"\n );\n\n return encodedStateOverrides;\n };\n}\n","import { PoolDataService } from '@balancer-labs/sor';\nimport { defaultAbiCoder } from '@ethersproject/abi';\nimport { JsonRpcSigner } from '@ethersproject/providers';\n\nimport TenderlyHelper from '@/lib/utils/tenderlyHelper';\nimport { BalancerNetworkConfig } from '@/types';\n\nimport { VaultModel, Requests } from '../vaultModel/vaultModel.module';\n\nexport enum SimulationType {\n Tenderly,\n VaultModel,\n Static,\n}\n\n/**\n * Simulation module is responsible for simulating the results of a generalised\n * join or exit using different types of simulation, such as:\n * - Tenderly: uses Tenderly Simulation API (third party service)\n * - VaultModel: uses TS math, which may be less accurate (min. 99% accuracy)\n * - Static: uses staticCall, which is 100% accurate but requires vault approval\n *\n * This module allows a user to perform a simulation and check for expected\n * amounts out in order to make an informed decision on whether to proceed with\n * the transaction. These expected amounts out can be used as limits to prevent\n * frontrunning and ensure that the transaction will return minimum amounts out.\n */\n\nexport class Simulation {\n private tenderlyHelper?: TenderlyHelper;\n private vaultModel: VaultModel | undefined;\n constructor(\n networkConfig: BalancerNetworkConfig,\n poolDataService?: PoolDataService\n ) {\n if (networkConfig.tenderly) {\n this.tenderlyHelper = new TenderlyHelper(\n networkConfig.chainId,\n networkConfig.tenderly\n );\n }\n if (!poolDataService) {\n this.vaultModel = undefined;\n } else {\n this.vaultModel = new VaultModel(\n poolDataService,\n networkConfig.addresses.tokens.wrappedNativeAsset\n );\n }\n }\n\n simulateGeneralisedJoin = async (\n to: string,\n multiRequests: Requests[][],\n encodedCall: string,\n outputIndexes: number[],\n userAddress: string,\n tokensIn: string[],\n signer: JsonRpcSigner,\n simulationType: SimulationType,\n value: string\n ): Promise => {\n const amountsOut: string[] = [];\n switch (simulationType) {\n case SimulationType.Tenderly: {\n if (!this.tenderlyHelper) {\n throw new Error('Missing Tenderly config');\n }\n const simulationResult = await this.tenderlyHelper.simulateMulticall(\n to,\n encodedCall,\n userAddress,\n tokensIn,\n value\n );\n amountsOut.push(...this.decodeResult(simulationResult, outputIndexes));\n break;\n }\n\n case SimulationType.VaultModel: {\n const requestResult = await this.simulateRequests(multiRequests);\n amountsOut.push(...requestResult);\n break;\n }\n case SimulationType.Static: {\n const staticResult = await signer.call({\n to,\n data: encodedCall,\n value,\n });\n\n try {\n amountsOut.push(...this.decodeResult(staticResult, outputIndexes));\n } catch (_) {\n // decoding output failed, so we assume the response contains an error message and try to decode it instead\n const decodedResponse = Buffer.from(\n staticResult.split('x')[1],\n 'hex'\n ).toString('utf8');\n throw new Error(\n `Transaction reverted with error: ${decodedResponse}`\n );\n }\n break;\n }\n default:\n throw new Error('Simulation type not supported');\n }\n return amountsOut;\n };\n\n simulateGeneralisedExit = async (\n to: string,\n multiRequests: Requests[][],\n encodedCall: string,\n outputIndexes: number[],\n userAddress: string,\n tokenIn: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType\n ): Promise => {\n const amountsOut: string[] = [];\n switch (simulationType) {\n case SimulationType.Tenderly: {\n if (!this.tenderlyHelper) {\n throw new Error('Missing Tenderly config');\n }\n const simulationResult = await this.tenderlyHelper.simulateMulticall(\n to,\n encodedCall,\n userAddress,\n [tokenIn]\n );\n amountsOut.push(...this.decodeResult(simulationResult, outputIndexes));\n break;\n }\n\n case SimulationType.VaultModel: {\n const requestResult = await this.simulateRequests(multiRequests);\n amountsOut.push(...requestResult);\n break;\n }\n case SimulationType.Static: {\n const staticResult = await signer.call({\n to,\n data: encodedCall,\n });\n try {\n amountsOut.push(...this.decodeResult(staticResult, outputIndexes));\n } catch (_) {\n // decoding output failed, so we assume the response contains an error message and try to decode it instead\n const decodedResponse = Buffer.from(\n staticResult.split('x')[1],\n 'hex'\n ).toString('utf8');\n throw new Error(\n `Transaction reverted with error: ${decodedResponse}`\n );\n }\n break;\n }\n default:\n throw new Error('Simulation type not supported');\n }\n return amountsOut;\n };\n\n private decodeResult = (result: string, outputIndexes: number[]) => {\n const multicallResult = defaultAbiCoder.decode(\n ['bytes[]'],\n result\n )[0] as string[];\n\n // Decode each root output\n const amountsOut = outputIndexes.map((outputIndex) => {\n const result = defaultAbiCoder.decode(\n ['uint256'],\n multicallResult[outputIndex]\n );\n return result.toString();\n });\n\n return amountsOut;\n };\n\n private simulateRequests = async (multiRequests: Requests[][]) => {\n if (this.vaultModel === undefined)\n throw new Error('Missing Vault Model Config.');\n // make one multicall for each exitPath\n // take only bptOut/tokenOut delta into account\n const amountsOut: string[] = [];\n for (const [i, requests] of multiRequests.entries()) {\n const deltas = await this.vaultModel.multicall(requests, i === 0);\n const tokenOutDeltas = Object.values(deltas).filter((d) => d.lt(0));\n if (tokenOutDeltas.length === 0)\n throw new Error('No delta found for token out.');\n amountsOut.push(...tokenOutDeltas.map((d) => d.mul(-1).toString()));\n }\n return amountsOut;\n };\n}\n","import { cloneDeep } from 'lodash';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { WeiPerEther, Zero } from '@ethersproject/constants';\nimport { JsonRpcSigner } from '@ethersproject/providers';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { BalancerRelayer__factory } from '@/contracts/factories/BalancerRelayer__factory';\nimport { networkAddresses } from '@/lib/constants/config';\nimport { AssetHelpers, subSlippage } from '@/lib/utils';\nimport { PoolGraph, Node } from '@/modules/graph/graph';\nimport { Join } from '@/modules/joins/joins.module';\nimport { calcPriceImpact } from '@/modules/pricing/priceImpact';\nimport {\n EncodeUnwrapInput,\n OutputReference,\n Relayer,\n EncodeBatchSwapInput,\n} from '@/modules/relayer/relayer.module';\nimport {\n Simulation,\n SimulationType,\n} from '@/modules/simulation/simulation.module';\nimport {\n FundManagement,\n SingleSwap,\n Swap,\n SwapType,\n BatchSwapStep,\n} from '@/modules/swaps/types';\nimport { ExitPoolRequest as ExitPoolModelRequest } from '@/modules/vaultModel/poolModel/exit';\nimport {\n BatchSwapRequest,\n SwapRequest,\n} from '@/modules/vaultModel/poolModel/swap';\nimport { UnwrapRequest } from '@/modules/vaultModel/poolModel/unwrap';\nimport { Requests, VaultModel } from '@/modules/vaultModel/vaultModel.module';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport { getPoolAddress } from '@/pool-utils';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { BalancerNetworkConfig, ExitPoolRequest, PoolType } from '@/types';\nimport { Logger } from '@/lib/utils/logger';\n\nconst balancerRelayerInterface = BalancerRelayer__factory.createInterface();\n\nexport interface GeneralisedExitOutput {\n to: string;\n encodedCall: string;\n tokensOut: string[];\n expectedAmountsOut: string[];\n minAmountsOut: string[];\n priceImpact: string;\n}\n\nexport interface ExitInfo {\n tokensOut: string[];\n estimatedAmountsOut: string[];\n priceImpact: string;\n tokensToUnwrap: string[];\n}\n\n// Quickly switch useful debug logs on/off\nconst DEBUG = false;\n\nfunction debugLog(log: string) {\n const logger = Logger.getInstance();\n if (DEBUG) logger.info(log);\n}\n\nexport class Exit {\n private wrappedNativeAsset: string;\n private relayer: string;\n\n constructor(\n private poolGraph: PoolGraph,\n networkConfig: BalancerNetworkConfig,\n private simulationService: Simulation\n ) {\n const { tokens, contracts } = networkAddresses(networkConfig.chainId);\n this.wrappedNativeAsset = tokens.wrappedNativeAsset;\n this.relayer = contracts.balancerRelayer;\n }\n\n async getExitInfo(\n poolId: string,\n amountBptIn: string,\n userAddress: string,\n signer: JsonRpcSigner\n ): Promise<{\n tokensOut: string[];\n estimatedAmountsOut: string[];\n priceImpact: string;\n tokensToUnwrap: string[];\n }> {\n debugLog(`\\n--- getExitInfo()`);\n /*\n Overall exit flow description:\n - Create calls with 0 expected min amount for each token out\n - static call (or V4 special call) to get actual amounts for each token out\n - Apply slippage to amountsOut\n - Recreate calls with minAmounts === actualAmountsWithSlippage\n - Return minAmoutsOut, UI would use this to display to user\n - Return updatedCalls, UI would use this to execute tx\n */\n const exit = await this.getExit(\n poolId,\n amountBptIn,\n userAddress,\n signer,\n [],\n SimulationType.VaultModel\n );\n\n return {\n tokensOut: exit.tokensOut,\n estimatedAmountsOut: exit.expectedAmountsOut,\n priceImpact: exit.priceImpact,\n tokensToUnwrap: exit.tokensToUnwrap,\n };\n }\n\n async buildExitCall(\n poolId: string,\n amountBptIn: string,\n userAddress: string,\n slippage: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType.Static | SimulationType.Tenderly,\n authorisation?: string,\n tokensToUnwrap?: string[]\n ): Promise<{\n to: string;\n encodedCall: string;\n tokensOut: string[];\n expectedAmountsOut: string[];\n minAmountsOut: string[];\n priceImpact: string;\n }> {\n debugLog(\n `\\n--- exitPool(): simulationType: ${simulationType} - tokensToUnwrap: ${tokensToUnwrap}`\n );\n /*\n Overall exit flow description:\n - Create calls with 0 expected min amount for each token out\n - static call (or V4 special call) to get actual amounts for each token out\n - Apply slippage to amountsOut\n - Recreate calls with minAmounts === actualAmountsWithSlippage\n - Return minAmoutsOut, UI would use this to display to user\n - Return updatedCalls, UI would use this to execute tx\n */\n\n const exit = await this.getExit(\n poolId,\n amountBptIn,\n userAddress,\n signer,\n tokensToUnwrap ?? [],\n simulationType,\n authorisation\n );\n\n const { minAmountsOutByExitPath, minAmountsOutByTokenOut } =\n this.minAmountsOut(\n exit.expectedAmountsOutByExitPath,\n exit.expectedAmountsOut,\n slippage\n );\n\n debugLog(`------------ Updating limits...`);\n // Create calls with minimum expected amount out for each exit path\n const { encodedCall, deltas } = await this.createCalls(\n exit.exitPaths,\n userAddress,\n exit.isProportional,\n minAmountsOutByExitPath,\n authorisation\n );\n\n this.assertDeltas(\n poolId,\n deltas,\n amountBptIn,\n exit.tokensOut,\n minAmountsOutByTokenOut\n );\n\n return {\n to: this.relayer,\n encodedCall,\n tokensOut: exit.tokensOut,\n expectedAmountsOut: exit.expectedAmountsOut,\n minAmountsOut: minAmountsOutByTokenOut,\n priceImpact: exit.priceImpact,\n };\n }\n\n private async getExit(\n poolId: string,\n amountBptIn: string,\n userAddress: string,\n signer: JsonRpcSigner,\n tokensToUnwrap: string[],\n simulationType: SimulationType,\n authorisation?: string\n ): Promise<{\n tokensToUnwrap: string[];\n tokensOut: string[];\n exitPaths: Node[][];\n isProportional: boolean;\n expectedAmountsOut: string[];\n expectedAmountsOutByExitPath: string[];\n priceImpact: string;\n }> {\n // Create nodes and order by breadth first - initially trys with no unwrapping\n const orderedNodes = await this.poolGraph.getGraphNodes(\n false,\n poolId,\n tokensToUnwrap\n );\n\n const isProportional = PoolGraph.isProportionalPools(orderedNodes);\n debugLog(`\\nisProportional = ${isProportional}`);\n\n let exitPaths: Node[][] = [];\n let tokensOutByExitPath: string[] = [];\n let tokensOut: string[] = [];\n\n const outputNodes = orderedNodes.filter((n) => n.exitAction === 'output');\n tokensOutByExitPath = outputNodes.map((n) => n.address.toLowerCase());\n\n tokensOut = [...new Set(tokensOutByExitPath)].sort();\n\n if (isProportional) {\n // All proportional will have single path from root node, exiting proportionally by ref all the way to leafs\n const path = orderedNodes.map((node, i) => {\n // First node should exit with full BPT amount in\n if (i === 0) node.index = amountBptIn;\n return node;\n });\n exitPaths[0] = path;\n } else {\n // Create exit paths for each output node and splits amount in proportionally between them\n exitPaths = this.getExitPaths(outputNodes, amountBptIn);\n }\n\n // Create calls with minimum expected amount out for each exit path\n const {\n multiRequests,\n encodedCall: queryData,\n outputIndexes,\n } = await this.createCalls(\n exitPaths,\n userAddress,\n isProportional,\n undefined,\n authorisation\n );\n\n const expectedAmountsOutByExitPath = await this.amountsOutByExitPath(\n userAddress,\n multiRequests,\n queryData,\n orderedNodes[0].address,\n outputIndexes,\n signer,\n simulationType\n );\n\n const tokensWithInsufficientBalance = outputNodes\n .filter((outputNode, i) =>\n BigNumber.from(expectedAmountsOutByExitPath[i]).gt(outputNode.balance)\n )\n .map((node) => node.address.toLowerCase());\n\n if (\n tokensToUnwrap.some((t) =>\n tokensWithInsufficientBalance.includes(t.toLowerCase())\n )\n ) {\n /**\n * This means there is not enough balance to exit to main or wrapped tokens only\n */\n throw new Error(\n 'Insufficient pool balance to perform generalised exit - try exitting with smaller amounts'\n );\n } else if (tokensWithInsufficientBalance.length > 0) {\n return await this.getExit(\n poolId,\n amountBptIn,\n userAddress,\n signer,\n [...new Set(tokensWithInsufficientBalance)].sort(),\n simulationType,\n authorisation\n );\n } else {\n const expectedAmountsOut = this.amountsOutByTokenOut(\n tokensOut,\n tokensOutByExitPath,\n expectedAmountsOutByExitPath\n );\n\n const priceImpact = await this.calculatePriceImpact(\n poolId,\n this.poolGraph,\n tokensOut,\n expectedAmountsOut,\n amountBptIn\n );\n\n return {\n tokensToUnwrap,\n tokensOut,\n exitPaths,\n isProportional,\n expectedAmountsOut,\n expectedAmountsOutByExitPath,\n priceImpact,\n };\n }\n }\n\n /*\n (From Fernando)\n 1. Given a bpt amount in find the expect token amounts out (proportionally)\n 2. Uses bptZeroPi = _bptForTokensZeroPriceImpact (the same is used for joins too)\n 3. PI = bptAmountIn / bptZeroPi - 1\n */\n private async calculatePriceImpact(\n poolId: string,\n poolGraph: PoolGraph,\n tokensOut: string[],\n amountsOut: string[],\n amountBptIn: string\n ): Promise {\n // Create nodes for each pool/token interaction and order by breadth first\n const orderedNodesForJoin = await poolGraph.getGraphNodes(true, poolId, []);\n const joinPaths = Join.getJoinPaths(\n orderedNodesForJoin,\n tokensOut,\n amountsOut\n );\n const totalBptZeroPi = Join.totalBptZeroPriceImpact(joinPaths);\n const priceImpact = calcPriceImpact(\n BigInt(amountBptIn),\n totalBptZeroPi.toBigInt(),\n false\n ).toString();\n return priceImpact;\n }\n\n private assertDeltas(\n poolId: string,\n deltas: Record,\n bptIn: string,\n tokensOut: string[],\n amountsOut: string[]\n ): void {\n const poolAddress = getPoolAddress(poolId);\n const outDiff = deltas[poolAddress.toLowerCase()].sub(bptIn);\n\n if (outDiff.abs().gt(3)) {\n console.error(\n `exit assertDeltas, bptIn: `,\n poolAddress,\n bptIn,\n deltas[poolAddress.toLowerCase()]?.toString()\n );\n throw new BalancerError(BalancerErrorCode.EXIT_DELTA_AMOUNTS);\n }\n delete deltas[poolAddress.toLowerCase()];\n\n tokensOut.forEach((token, i) => {\n const diff = deltas[token.toLowerCase()].add(amountsOut[i]);\n if (diff.abs().gt(1)) {\n console.error(\n `exit assertDeltas, tokenOut: `,\n token,\n amountsOut[i],\n deltas[token.toLowerCase()]?.toString()\n );\n throw new BalancerError(BalancerErrorCode.EXIT_DELTA_AMOUNTS);\n }\n delete deltas[token.toLowerCase()];\n });\n\n for (const token in deltas) {\n if (deltas[token].toString() !== '0') {\n console.error(\n `exit assertDeltas, non-input token should be 0: `,\n token,\n deltas[token].toString()\n );\n throw new BalancerError(BalancerErrorCode.EXIT_DELTA_AMOUNTS);\n }\n }\n }\n\n // Query amounts out through static call and return decoded result\n private amountsOutByExitPath = async (\n userAddress: string,\n multiRequests: Requests[][],\n callData: string,\n tokenIn: string,\n outputIndexes: number[],\n signer: JsonRpcSigner,\n simulationType: SimulationType\n ): Promise => {\n const amountsOutByExitPath =\n await this.simulationService.simulateGeneralisedExit(\n this.relayer,\n multiRequests,\n callData,\n outputIndexes,\n userAddress,\n tokenIn,\n signer,\n simulationType\n );\n\n return amountsOutByExitPath;\n };\n\n // Aggregate amounts out by exit path into amounts out by token out\n private amountsOutByTokenOut = (\n tokensOut: string[],\n tokensOutByExitPath: string[],\n expectedAmountsOutByExitPath: string[]\n ) => {\n // Aggregate amountsOutByExitPath into expectedAmountsOut\n const expectedAmountsOutMap: Record = {};\n tokensOutByExitPath.forEach(\n (tokenOut, i) =>\n (expectedAmountsOutMap[tokenOut] = (\n expectedAmountsOutMap[tokenOut] ?? Zero\n ).add(expectedAmountsOutByExitPath[i]))\n );\n const expectedAmountsOut = tokensOut.map((tokenOut) =>\n expectedAmountsOutMap[tokenOut].toString()\n );\n\n return expectedAmountsOut;\n };\n\n // Apply slippage tolerance to expected amounts out\n private minAmountsOut = (\n expectedAmountsOutByExitPath: string[],\n expectedAmountsOutByTokenOut: string[],\n slippage: string\n ) => {\n // Apply slippage tolerance on expected amount out for each exit path\n const minAmountsOutByExitPath = expectedAmountsOutByExitPath.map(\n (expectedAmountOut) =>\n subSlippage(\n BigNumber.from(expectedAmountOut),\n BigNumber.from(slippage)\n ).toString()\n );\n\n // Apply slippage tolerance on expected amount out for each token out\n const minAmountsOutByTokenOut = expectedAmountsOutByTokenOut.map(\n (expectedAmountOut) =>\n subSlippage(\n BigNumber.from(expectedAmountOut),\n BigNumber.from(slippage)\n ).toString()\n );\n\n return { minAmountsOutByExitPath, minAmountsOutByTokenOut };\n };\n\n // Create one exit path for each output node\n private getExitPaths = (outputNodes: Node[], amountIn: string): Node[][] => {\n const exitPaths = outputNodes.map((outputNode) => {\n const exitPath = [outputNode];\n while (exitPath[0].parent) {\n exitPath.unshift(cloneDeep(exitPath[0].parent));\n }\n /*\n The input/root node requires a real amount (not a reference/index) as it is first node in chain.\n This amount will be used when chaining to children.\n */\n exitPath[0].index = exitPath[exitPath.length - 1].proportionOfParent\n .mul(amountIn)\n .div(WeiPerEther)\n .toString();\n return exitPath;\n });\n\n /*\n Amounts in for exit paths should be adjusted after caculated to fix eventual rounding issues\n */\n // Sum amountIn for each exit path\n const amountsInSum = exitPaths.reduce((accumulator, currentExitPath) => {\n const amountInForCurrentExitPath = currentExitPath[0].index;\n return BigNumber.from(amountInForCurrentExitPath).add(accumulator);\n }, Zero);\n // Compare total amountIn with sum of calculated amountIn for each exit path\n const amountsInDiff = BigNumber.from(amountIn).sub(amountsInSum);\n // Add diff to last exit path amountIn\n exitPaths[exitPaths.length - 1][0].index = amountsInDiff\n .add(exitPaths[exitPaths.length - 1][0].index)\n .toString();\n\n return exitPaths;\n };\n\n private async createCalls(\n exitPaths: Node[][],\n userAddress: string,\n isProportional: boolean,\n minAmountsOut?: string[],\n authorisation?: string\n ): Promise<{\n multiRequests: Requests[][];\n encodedCall: string;\n outputIndexes: number[];\n deltas: Record;\n }> {\n const { multiRequests, calls, outputIndexes, deltas } =\n this.createActionCalls(\n cloneDeep(exitPaths),\n userAddress,\n isProportional,\n minAmountsOut\n );\n\n if (authorisation) {\n calls.unshift(\n Relayer.encodeSetRelayerApproval(this.relayer, true, authorisation)\n );\n }\n\n const encodedCall = balancerRelayerInterface.encodeFunctionData(\n 'multicall',\n [calls]\n );\n\n return {\n multiRequests,\n encodedCall,\n outputIndexes: authorisation\n ? outputIndexes.map((i) => i + 1)\n : outputIndexes,\n deltas,\n };\n }\n\n private updateDeltas(\n deltas: Record,\n assets: string[],\n amounts: string[]\n ): Record {\n assets.forEach((t, i) => {\n const asset = t.toLowerCase();\n if (!deltas[asset]) deltas[asset] = Zero;\n deltas[asset] = deltas[asset].add(amounts[i]);\n });\n return deltas;\n }\n\n private createActionCalls(\n exitPaths: Node[][],\n userAddress: string,\n isProportional: boolean,\n minAmountsOut?: string[]\n ): {\n multiRequests: Requests[][];\n calls: string[];\n outputIndexes: number[];\n deltas: Record;\n } {\n const multiRequests: Requests[][] = [];\n const calls: string[] = [];\n const outputIndexes: number[] = [];\n const isPeek = !minAmountsOut;\n const deltas: Record = {};\n\n const getSenderAddress = (exitPath: Node[], node: Node) => {\n // Calls from root node are sent by the user\n if (!node.parent) return userAddress;\n // Otherwise sent by the parent's recipient\n return getRecipientAddress(exitPath, node.parent);\n };\n\n const getRecipientAddress = (exitPath: Node[], node: Node) => {\n // Always send to user on calls that contain outputs, otherwise send to relayer\n const exitChildren = node.children.filter((child) =>\n exitPath.map((n) => n.index).includes(child.index)\n );\n const hasOutputChild = exitChildren.some(\n (c) => c.exitAction === 'output'\n );\n return hasOutputChild ? userAddress : this.relayer;\n };\n\n // Create actions for each Node and return in multicall array\n\n exitPaths.forEach((exitPath, i) => {\n const modelRequests: Requests[] = [];\n const outputNodes = exitPath.filter(\n (node) => node.exitAction === 'output'\n );\n exitPath.forEach((node) => {\n // Find the exit child node\n const exitChild = node.children.find((child) =>\n exitPath.map((n) => n.index).includes(child.index)\n );\n\n const sender = getSenderAddress(exitPath, node);\n const recipient = getRecipientAddress(exitPath, node);\n\n const exitChildren = node.children.filter((child) =>\n exitPath.map((n) => n.index).includes(child.index)\n );\n // An action that has either outputs or unwraps as child actions is the last action where we're able to set limits on expected output amounts\n const isLastActionWithLimits = exitChildren.some(\n (c) => c.exitAction === 'output' || c.exitAction === 'unwrap'\n );\n\n // Last calls will use minAmountsOut to protect user. Middle calls can safely have 0 minimum as tx will revert if last fails.\n let minAmountOut = '0';\n const minAmountsOutProportional = Array(node.children.length).fill('0');\n if (minAmountsOut && isLastActionWithLimits) {\n if (isProportional) {\n // Proportional exits have a minAmountOut for each output node within a single exit path\n\n /**\n * minAmountsOut is related to the whole multicall transaction, while\n * minAmountsOutProportional is related only to the current node/transaction\n * This section is responsible for mapping each minAmountOut to their\n * respective position on the minAmountsOutProportional array\n * TODO: extract to a function so it's easier to understand\n */\n node.children.forEach((child, i) => {\n let outputChildIndex: number;\n if (child.exitAction === 'unwrap') {\n outputChildIndex = outputNodes.indexOf(child.children[0]);\n minAmountOut = WeiPerEther.mul(minAmountsOut[outputChildIndex])\n .div(child.priceRate)\n .toString();\n } else if (child.exitAction === 'output') {\n outputChildIndex = outputNodes.indexOf(child);\n minAmountOut = minAmountsOut[outputChildIndex];\n } else {\n minAmountOut = '0'; // clears minAmountOut if it's not an output or unwrap\n }\n minAmountsOutProportional[i] = minAmountOut;\n });\n } else {\n // Non-proportional exits have a minAmountOut for each exit path\n if (exitChild?.exitAction === 'unwrap') {\n minAmountOut = WeiPerEther.mul(minAmountsOut[i])\n .div(exitChild.priceRate)\n .toString();\n } else {\n minAmountOut = minAmountsOut[i];\n }\n }\n }\n\n switch (node.exitAction) {\n case 'unwrap': {\n const { modelRequest, encodedCall, assets, amounts } =\n this.createUnwrap(\n node,\n exitChild as Node,\n i,\n minAmountOut,\n sender,\n recipient\n );\n modelRequests.push(modelRequest);\n calls.push(encodedCall);\n this.updateDeltas(deltas, assets, amounts);\n break;\n }\n case 'batchSwap': {\n const { modelRequest, encodedCall, assets, amounts } =\n this.createSwap(\n node,\n exitChild as Node,\n i,\n minAmountOut,\n sender,\n recipient\n );\n modelRequests.push(modelRequest);\n calls.push(encodedCall);\n this.updateDeltas(deltas, assets, amounts);\n break;\n }\n case 'exitPool': {\n let exit;\n if (isProportional) {\n exit = this.createExitPoolProportional(\n node,\n minAmountsOutProportional,\n sender,\n recipient\n );\n } else {\n exit = this.createExitPool(\n node,\n exitChild as Node,\n i,\n minAmountOut,\n sender,\n recipient\n );\n }\n const { modelRequest, encodedCall, bptIn, tokensOut, amountsOut } =\n exit;\n modelRequests.push(modelRequest);\n calls.push(encodedCall);\n this.updateDeltas(\n deltas,\n [node.address, ...tokensOut],\n [bptIn, ...amountsOut]\n );\n break;\n }\n case 'output':\n if (isPeek) {\n calls.push(\n Relayer.encodePeekChainedReferenceValue(\n Relayer.toChainedReference(\n this.getOutputRef(i, node.index),\n false\n )\n )\n );\n outputIndexes.push(calls.length - 1);\n }\n break;\n default:\n return;\n }\n });\n multiRequests.push(modelRequests);\n });\n\n return { multiRequests, calls, outputIndexes, deltas };\n }\n\n private createUnwrap = (\n node: Node,\n exitChild: Node,\n exitPathIndex: number,\n minAmountOut: string,\n sender: string,\n recipient: string\n ): {\n modelRequest: UnwrapRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n } => {\n const amount = Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, node.index)\n ).toString();\n const outputReference = Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, exitChild.index)\n );\n\n const linearPoolType = node.parent?.type as string;\n\n const call: EncodeUnwrapInput = {\n wrappedToken: node.address,\n sender,\n recipient,\n amount,\n outputReference,\n };\n\n const encodedCall = Relayer.encodeUnwrap(call, linearPoolType);\n\n debugLog(`linear type: , ${linearPoolType}`);\n debugLog('\\nUwrap:');\n debugLog(JSON.stringify(call));\n\n const modelRequest = VaultModel.mapUnwrapRequest(\n amount,\n outputReference,\n node.parent?.id as string // linear pool id\n );\n\n const assets = [exitChild.address];\n const amounts = [Zero.sub(minAmountOut).toString()]; // needs to be negative because it's handled by the vault model as an amount going out of the vault\n return { modelRequest, encodedCall, assets, amounts };\n };\n\n private createSwap(\n node: Node,\n exitChild: Node,\n exitPathIndex: number,\n minAmountOut: string,\n sender: string,\n recipient: string\n ): {\n modelRequest: SwapRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n } {\n const isRootNode = !node.parent;\n const amountIn = isRootNode\n ? node.index\n : Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, node.index)\n ).toString();\n\n const tokenOut = exitChild.address;\n const assets = [tokenOut, node.address];\n\n // Single swap limits are always positive\n // Swap within generalisedExit is always exactIn, so use minAmountOut to set limit\n const limit: string = minAmountOut;\n\n const request: SingleSwap = {\n poolId: node.id,\n kind: SwapType.SwapExactIn,\n assetIn: node.address,\n assetOut: tokenOut,\n amount: amountIn,\n userData: '0x',\n };\n\n const fromInternalBalance = this.receivesFromInternal(node);\n const toInternalBalance = this.receivesFromInternal(exitChild);\n\n const funds: FundManagement = {\n sender,\n recipient,\n fromInternalBalance,\n toInternalBalance,\n };\n\n const outputReference = Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, exitChild.index)\n );\n\n const call: Swap = {\n request,\n funds,\n limit,\n deadline: BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value: '0', // TODO: check if swap with ETH is possible in this case and handle it\n outputReference,\n };\n debugLog('\\nSwap:');\n debugLog(JSON.stringify(call));\n\n const encodedCall = Relayer.encodeSwap(call);\n\n const modelRequest = VaultModel.mapSwapRequest(call);\n\n // If node isn't rootNode, the swap is part of a chain and shouldn't be considered for user deltas\n const bptIn = !isRootNode ? '0' : amountIn;\n // If child exit action is not output, the swap is part of a chain and shouldn't be considered for user deltas\n const userTokenOutAmount =\n exitChild.exitAction !== 'output'\n ? '0'\n : BigNumber.from(minAmountOut).mul(-1).toString(); // needs to be negative because it's handled by the vault model as an amount going out of the vault\n const amounts = [userTokenOutAmount, bptIn];\n\n return { modelRequest, encodedCall, assets, amounts };\n }\n\n private createBatchSwap(\n node: Node,\n exitChildren: Node[],\n exitPathIndex: number,\n minAmountsOut: string[],\n sender: string,\n recipient: string\n ): {\n modelRequest: BatchSwapRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n } {\n const isRootNode = !node.parent;\n const amountIn = isRootNode\n ? node.index\n : Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, node.index)\n ).toString();\n\n const tokensOut = exitChildren.map((n) => n.address);\n const assets = [...tokensOut, node.address];\n // TODO - setting these right?\n const limits = [...minAmountsOut];\n limits.push(amountIn);\n const batchSwapSteps: BatchSwapStep[] = [];\n const outputReferences: OutputReference[] = [];\n exitChildren.forEach((child, i) => {\n // TODO - Is this correct?\n const amount = child.proportionOfParent\n .mul(amountIn)\n .div(WeiPerEther)\n .toString();\n const swapStep: BatchSwapStep = {\n poolId: node.id,\n assetInIndex: assets.length - 1,\n assetOutIndex: i,\n amount,\n userData: '0x',\n };\n batchSwapSteps.push(swapStep);\n // TODO - Is this right?\n outputReferences.push({\n index: i,\n key: Relayer.toChainedReference(this.getOutputRef(0, child.index)),\n });\n });\n\n const total = batchSwapSteps.reduce((acc, swap) => {\n return acc.add(swap.amount);\n }, BigNumber.from(0));\n const dust = BigNumber.from(amountIn).sub(total);\n batchSwapSteps[0].amount = dust.add(batchSwapSteps[0].amount).toString();\n\n const fromInternalBalance = this.receivesFromInternal(node);\n // TODO - This is assuming that all exit to same, is this right?\n const toInternalBalance = this.receivesFromInternal(exitChildren[0]);\n\n const funds: FundManagement = {\n sender,\n recipient,\n fromInternalBalance,\n toInternalBalance,\n };\n\n const call: EncodeBatchSwapInput = {\n swapType: SwapType.SwapExactIn,\n swaps: batchSwapSteps,\n assets,\n funds,\n limits,\n deadline: BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value: '0', // TODO: check if swap with ETH is possible in this case and handle it\n outputReferences,\n };\n debugLog('\\nBatchSwap:');\n debugLog(JSON.stringify(call));\n\n const encodedCall = Relayer.encodeBatchSwap(call);\n\n const modelRequest = VaultModel.mapBatchSwapRequest(call);\n\n // If node isn't rootNode, the swap is part of a chain and shouldn't be considered for user deltas\n const bptIn = !isRootNode ? '0' : amountIn;\n // If child exit action is not output, the swap is part of a chain and shouldn't be considered for user deltas\n const userTokensOut = exitChildren.map((child, i) => {\n const userTokenOutAmount =\n child.exitAction !== 'output'\n ? '0'\n : BigNumber.from(minAmountsOut[i]).mul(-1).toString(); // needs to be negative because it's handled by the vault model as an amount going out of the vault\n return userTokenOutAmount;\n });\n\n const amounts = [...userTokensOut, bptIn];\n\n return { modelRequest, encodedCall, assets, amounts };\n }\n\n private createExitPool(\n node: Node,\n exitChild: Node,\n exitPathIndex: number,\n minAmountOut: string,\n sender: string,\n recipient: string\n ): {\n modelRequest: ExitPoolModelRequest;\n encodedCall: string;\n bptIn: string;\n tokensOut: string[];\n amountsOut: string[];\n } {\n const tokenOut = exitChild.address;\n const isRootNode = !node.parent;\n const amountIn = isRootNode\n ? node.index\n : Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, node.index)\n ).toString();\n\n const tokensOut: string[] = [];\n const amountsOut: string[] = [];\n\n // tokensOut needs to include each asset even if it has 0 amount\n node.children.forEach((child) => {\n tokensOut.push(child.address);\n amountsOut.push(child.address === tokenOut ? minAmountOut : '0');\n });\n\n if (node.type === PoolType.ComposableStable) {\n // assets need to include the phantomPoolToken\n tokensOut.push(node.address);\n // need to add a placeholder so sorting works\n amountsOut.push('0');\n }\n\n // sort inputs\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [sortedTokens, sortedAmounts] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n // userData amounts should not include the BPT of the pool being joined\n let userDataTokens = [];\n const bptIndex = sortedTokens\n .map((t) => t.toLowerCase())\n .indexOf(node.address.toLowerCase());\n if (bptIndex === -1) {\n userDataTokens = sortedTokens;\n } else {\n userDataTokens = [\n ...sortedTokens.slice(0, bptIndex),\n ...sortedTokens.slice(bptIndex + 1),\n ];\n }\n\n let userData: string;\n if (node.type === PoolType.Weighted) {\n userData = WeightedPoolEncoder.exitExactBPTInForOneTokenOut(\n amountIn,\n userDataTokens.indexOf(tokenOut)\n );\n } else {\n userData = StablePoolEncoder.exitExactBPTInForOneTokenOut(\n amountIn,\n userDataTokens.indexOf(tokenOut)\n );\n }\n\n const outputReferences = [\n {\n index: sortedTokens\n .map((t) => t.toLowerCase())\n .indexOf(tokenOut.toLowerCase()),\n key: Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, exitChild.index)\n ),\n },\n ];\n\n const toInternalBalance = this.receivesFromInternal(exitChild);\n\n const call = Relayer.formatExitPoolInput({\n poolId: node.id,\n poolKind: 0,\n sender,\n recipient,\n outputReferences,\n exitPoolRequest: {} as ExitPoolRequest,\n assets: sortedTokens,\n minAmountsOut: sortedAmounts,\n userData,\n toInternalBalance,\n });\n debugLog('\\nExit:');\n debugLog(JSON.stringify(call));\n\n const encodedCall = Relayer.encodeExitPool(call);\n const modelRequest = VaultModel.mapExitPoolRequest(call);\n\n const userAmountTokensOut = sortedAmounts.map((a) =>\n Relayer.isChainedReference(a) ? '0' : Zero.sub(a).toString()\n );\n const userBptIn = Relayer.isChainedReference(amountIn) ? '0' : amountIn;\n // If node isn't rootNode, the exit is part of a chain and shouldn't be considered for user deltas\n const deltaBptIn = !isRootNode ? Zero.toString() : userBptIn;\n // // If child exit action is not output, the exit is part of a chain and shouldn't be considered for user deltas\n const deltaTokensOut =\n exitChild.exitAction !== 'output' ? [] : sortedTokens;\n const deltaAmountsOut =\n exitChild.exitAction !== 'output' ? [] : userAmountTokensOut;\n\n return {\n modelRequest,\n encodedCall,\n bptIn: deltaBptIn,\n tokensOut: deltaTokensOut,\n amountsOut: deltaAmountsOut,\n };\n }\n\n private createExitPoolProportional(\n node: Node,\n minAmountsOut: string[],\n sender: string,\n recipient: string\n ): {\n modelRequest: ExitPoolModelRequest;\n encodedCall: string;\n bptIn: string;\n tokensOut: string[];\n amountsOut: string[];\n } {\n const isRootNode = !node.parent;\n const amountIn = isRootNode\n ? node.index\n : Relayer.toChainedReference(this.getOutputRef(0, node.index)).toString();\n\n const tokensOut = node.children.map((child) => child.address);\n const amountsOut = [...minAmountsOut];\n\n if (node.type === PoolType.ComposableStable) {\n // assets need to include the phantomPoolToken\n tokensOut.push(node.address);\n // need to add a placeholder so sorting works\n amountsOut.push('0');\n }\n\n // TODO: we shoule consider let the graph handle sorting instead of manipulating\n // token order within actions - specially now that we have different sorting\n // cases and that the subgraph is already handling them properly\n\n // sort inputs\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [sortedTokens, sortedAmounts] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n let userData: string;\n if (node.type === PoolType.Weighted) {\n userData = WeightedPoolEncoder.exitExactBPTInForTokensOut(amountIn);\n } else if (node.type === PoolType.ComposableStable) {\n userData =\n ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut(amountIn);\n } else {\n // TODO: double check if it's ok to set the Stable Pool Encoder as the default/else case\n userData = StablePoolEncoder.exitExactBPTInForTokensOut(amountIn);\n }\n\n const outputReferences = node.children.map((child) => {\n return {\n index: sortedTokens\n .map((t) => t.toLowerCase())\n .indexOf(child.address.toLowerCase()),\n key: Relayer.toChainedReference(this.getOutputRef(0, child.index)),\n };\n });\n // We have to use correct pool type based off following from Relayer:\n // enum PoolKind { WEIGHTED, LEGACY_STABLE, COMPOSABLE_STABLE, COMPOSABLE_STABLE_V2 }\n // (note only Weighted and COMPOSABLE_STABLE_V2 will support proportional exits)\n let kind = 0;\n if (node.type === PoolType.ComposableStable) {\n kind = 3;\n }\n\n const allChildrenReceiveFromInternal = node.children.every((child) =>\n this.receivesFromInternal(child)\n );\n\n const call = Relayer.formatExitPoolInput({\n poolId: node.id,\n poolKind: kind,\n sender,\n recipient,\n outputReferences,\n exitPoolRequest: {} as ExitPoolRequest,\n assets: sortedTokens,\n minAmountsOut: sortedAmounts,\n userData,\n toInternalBalance: allChildrenReceiveFromInternal,\n });\n debugLog('\\nExitProportional:');\n debugLog(JSON.stringify(call));\n const encodedCall = Relayer.encodeExitPool(call);\n const modelRequest = VaultModel.mapExitPoolRequest(call);\n\n const userAmountTokensOut = sortedAmounts.map((a) =>\n Relayer.isChainedReference(a) ? '0' : Zero.sub(a).toString()\n );\n const userBptIn = Relayer.isChainedReference(amountIn) ? '0' : amountIn;\n // If current node is the root node the exit the delta BPT in should be considered for user deltas\n const deltaBptIn = isRootNode ? userBptIn : Zero.toString();\n // If the respective child node is an output, it should be considered for user deltas\n const deltaTokensOut = sortedTokens.filter((t) =>\n node.children\n .filter((c) => c.exitAction === 'output')\n .map((c) => c.address)\n .includes(t)\n );\n const deltaAmountsOut = userAmountTokensOut.filter((_, i) =>\n deltaTokensOut.includes(sortedTokens[i])\n );\n\n return {\n modelRequest,\n encodedCall,\n bptIn: deltaBptIn,\n tokensOut: deltaTokensOut,\n amountsOut: deltaAmountsOut,\n };\n }\n\n private getOutputRef = (exitPathIndex: number, nodeIndex: string): number => {\n return exitPathIndex * 100 + parseInt(nodeIndex);\n };\n\n // node without parent is the root node and it receives from non-internal balance\n // exitPool always expects amounts from non-internal balance\n // output always behave as receiving from non-internal balance\n // others should always receive from internal balance\n private receivesFromInternal = (node: Node): boolean => {\n if (!node.parent) return false;\n return (\n node.exitAction !== 'output' &&\n node.exitAction !== 'unwrap' &&\n node.exitAction !== 'exitPool'\n );\n };\n}\n","/**\n * Calculates pool fees\n *\n * 1. Pool fees in last 24hrs\n */\nimport { isLessThan24Hours } from '@/lib/utils/time';\nimport { Pool, Findable, PoolAttribute } from '@/types';\n\nexport class PoolVolume {\n constructor(\n private yesterdaysPools: Findable | undefined\n ) {}\n\n // 🚨 this is adding 1 call to get yesterday's block height and 2nd call to fetch yesterday's pools data from subgraph\n // TODO: find a better data source for that eg. add blocks to graph, replace with a database, or dune\n async last24h(pool: Pool): Promise {\n let yesterdaysPool;\n if (this.yesterdaysPools) {\n yesterdaysPool = await this.yesterdaysPools.find(pool.id);\n }\n\n if (!pool.totalSwapVolume) {\n return 0;\n }\n\n if (!yesterdaysPool?.totalSwapVolume) {\n // Process edge case when pool creation time is less that 24h\n if (pool.createTime && isLessThan24Hours(pool.createTime)) {\n return parseFloat(pool.totalSwapVolume);\n }\n return 0;\n }\n\n return (\n parseFloat(pool.totalSwapVolume) -\n parseFloat(yesterdaysPool.totalSwapVolume)\n );\n }\n}\n","import { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport {\n ComposableStableCreatePoolParameters,\n InitJoinPoolAttributes,\n InitJoinPoolParameters,\n JoinPoolDecodedAttributes,\n JoinPoolRequestDecodedAttributes,\n} from '@/modules/pools/factory/types';\nimport { balancerVault, networkAddresses } from '@/lib/constants/config';\nimport { AssetHelpers, getRandomBytes32 } from '@/lib/utils';\nimport { PoolFactory } from '@/modules/pools/factory/pool-factory';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { BalancerNetworkConfig } from '@/types';\nimport {\n ComposableStablePool__factory,\n ComposableStablePoolFactory__factory,\n} from '@/contracts';\nimport { JsonRpcProvider, TransactionReceipt } from '@ethersproject/providers';\nimport { LogDescription } from '@ethersproject/abi';\nimport { findEventInReceiptLogs } from '@/lib/utils';\nimport { Contract } from '@ethersproject/contracts';\nimport { ContractInstances } from '@/modules/contracts/contracts.module';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { ComposableStablePoolInterface } from '@/contracts/ComposableStablePool';\n\nexport class ComposableStableFactory implements PoolFactory {\n private wrappedNativeAsset: string;\n private contracts: ContractInstances;\n\n constructor(\n networkConfig: BalancerNetworkConfig,\n contracts: ContractInstances\n ) {\n const { tokens } = networkAddresses(networkConfig.chainId);\n this.wrappedNativeAsset = tokens.wrappedNativeAsset;\n this.contracts = contracts;\n }\n\n /**\n * Builds a transaction for a composable pool create operation.\n * @param name The name of the pool\n * @param symbol The symbol of the pool\n * @param tokenAddresses The token's addresses\n * @param amplificationParameter The amplification parameter(must be greater than 1)\n * @param rateProviders The addresses of the rate providers for each token, ordered\n * @param tokenRateCacheDurations the Token Rate Cache Duration of each token\n * @param exemptFromYieldProtocolFeeFlags Array containing boolean for each token exemption from yield protocol fee flags\n * @param swapFeeEvm The swapFee for the owner of the pool in string format parsed to evm(100% is 1e18, 10% is 1e17, 1% is 1e16)\n * @param owner The address of the owner of the pool\n * @returns A TransactionRequest object, which can be directly inserted in the transaction to create a composable stable pool\n */\n create({\n name,\n symbol,\n tokenAddresses,\n amplificationParameter,\n rateProviders,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n swapFeeEvm,\n owner,\n salt,\n }: ComposableStableCreatePoolParameters): { to?: string; data: BytesLike } {\n this.checkCreateInputs({\n rateProviders,\n tokenAddresses,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n swapFeeEvm,\n });\n const params = this.parseCreateParamsForEncoding({\n name,\n symbol,\n tokenAddresses,\n amplificationParameter,\n rateProviders,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n swapFeeEvm,\n owner,\n salt,\n });\n const encodedFunctionData = this.encodeCreateFunctionData(params);\n return {\n to: this.contracts.composableStablePoolFactory?.address,\n data: encodedFunctionData,\n };\n }\n\n checkCreateInputs = ({\n tokenAddresses,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n rateProviders,\n swapFeeEvm,\n }: Pick<\n ComposableStableCreatePoolParameters,\n | 'rateProviders'\n | 'tokenRateCacheDurations'\n | 'tokenAddresses'\n | 'exemptFromYieldProtocolFeeFlags'\n | 'swapFeeEvm'\n >): void => {\n if (\n tokenAddresses.length !== tokenRateCacheDurations.length ||\n tokenRateCacheDurations.length !==\n exemptFromYieldProtocolFeeFlags.length ||\n exemptFromYieldProtocolFeeFlags.length !== rateProviders.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n if (BigInt(swapFeeEvm) <= BigInt(0) || BigInt(swapFeeEvm) > BigInt(1e17)) {\n throw new BalancerError(BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE);\n }\n };\n parseCreateParamsForEncoding = ({\n name,\n symbol,\n tokenAddresses,\n amplificationParameter,\n rateProviders,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n swapFeeEvm,\n owner,\n salt,\n }: ComposableStableCreatePoolParameters): [\n string,\n string,\n string[],\n string,\n string[],\n string[],\n boolean[],\n string,\n string,\n BytesLike\n ] => {\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [\n sortedTokens,\n sortedRateProviders,\n sortedTokenRateCacheDurations,\n sortedExemptFromYieldProtocols,\n ] = assetHelpers.sortTokens(\n tokenAddresses,\n rateProviders,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags\n ) as [string[], string[], string[], boolean[]];\n const params = [\n name,\n symbol,\n sortedTokens,\n amplificationParameter,\n sortedRateProviders,\n sortedTokenRateCacheDurations,\n sortedExemptFromYieldProtocols,\n swapFeeEvm.toString(),\n owner,\n salt || getRandomBytes32(),\n ] as [\n string,\n string,\n string[],\n string,\n string[],\n string[],\n boolean[],\n string,\n string,\n BytesLike\n ];\n return params;\n };\n\n encodeCreateFunctionData = (\n params: [\n string,\n string,\n string[],\n string,\n string[],\n string[],\n boolean[],\n string,\n string,\n BytesLike\n ]\n ): string => {\n const composablePoolFactoryInterface =\n ComposableStablePoolFactory__factory.createInterface();\n return composablePoolFactoryInterface.encodeFunctionData('create', params);\n };\n\n /**\n * Builds a transaction for a composable pool init join operation.\n * @param joiner The address of the joiner of the pool\n * @param poolId The id of the pool\n * @param poolAddress The address of the pool\n * @param tokensIn Array with the address of the tokens\n * @param amountsIn Array with the amount of each token\n * @returns A InitJoinPoolAttributes object, which can be directly inserted in the transaction to init join a composable stable pool\n */\n buildInitJoin({\n joiner,\n poolId,\n poolAddress,\n tokensIn,\n amountsIn,\n }: InitJoinPoolParameters): InitJoinPoolAttributes {\n this.checkInitJoinInputs({\n tokensIn,\n amountsIn,\n poolId,\n poolAddress,\n });\n const { attributes, params } = this.parseParamsForInitJoin({\n joiner,\n poolId,\n poolAddress,\n tokensIn,\n amountsIn,\n });\n const { functionName, data } = this.encodeInitJoinFunctionData(params);\n\n return {\n to: balancerVault,\n functionName,\n data,\n attributes,\n };\n }\n\n checkInitJoinInputs = ({\n poolId,\n poolAddress,\n tokensIn,\n amountsIn,\n }: Pick<\n InitJoinPoolParameters,\n 'tokensIn' | 'amountsIn' | 'poolId' | 'poolAddress'\n >): void => {\n if (!poolId || !poolAddress) {\n throw new BalancerError(BalancerErrorCode.NO_POOL_DATA);\n }\n if (tokensIn.length !== amountsIn.length) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n };\n\n parseParamsForInitJoin = ({\n joiner,\n poolId,\n poolAddress,\n tokensIn,\n amountsIn,\n }: InitJoinPoolParameters): {\n attributes: JoinPoolDecodedAttributes;\n params: [string, string, string, JoinPoolRequestDecodedAttributes];\n } => {\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n // sort inputs\n const tokensWithBpt = [...tokensIn, poolAddress];\n const amountsWithBpt = [...amountsIn, '0'];\n const maxAmountsWithBpt = [\n ...amountsIn,\n // this max amount needs to be >= PREMINT - bptAmountOut,\n // The vault returns BAL#506 if it's not,\n // PREMINT is around 2^111, but here we set the max amount of BPT as MAX_UINT_256-1 for safety\n BigInt.asUintN(256, BigInt(-1)).toString(),\n ];\n const [sortedTokens, sortedAmounts, sortedMaxAmounts] =\n assetHelpers.sortTokens(\n tokensWithBpt,\n amountsWithBpt,\n maxAmountsWithBpt\n ) as [string[], string[], string[]];\n\n const userData = ComposableStablePoolEncoder.joinInit(sortedAmounts);\n\n const attributes: JoinPoolDecodedAttributes = {\n poolId: poolId,\n sender: joiner,\n recipient: joiner,\n joinPoolRequest: {\n assets: sortedTokens,\n maxAmountsIn: sortedMaxAmounts,\n userData,\n fromInternalBalance: false,\n },\n };\n return {\n attributes,\n params: [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ],\n };\n };\n encodeInitJoinFunctionData = (\n params: [string, string, string, JoinPoolRequestDecodedAttributes]\n ): {\n functionName: string;\n data: string;\n } => {\n const functionName = 'joinPool';\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, params);\n\n return { functionName, data };\n };\n\n getPoolAddressAndIdWithReceipt = async (\n provider: JsonRpcProvider,\n receipt: TransactionReceipt\n ): Promise<{\n poolId: string;\n poolAddress: string;\n }> => {\n const poolCreationEvent: LogDescription = findEventInReceiptLogs({\n receipt,\n to: this.contracts.composableStablePoolFactory?.address || '',\n contractInterface: ComposableStablePoolFactory__factory.createInterface(),\n logName: 'PoolCreated',\n });\n\n const poolAddress = poolCreationEvent.args.pool;\n const composableStablePoolInterface = this.getPoolInterface();\n const pool = new Contract(\n poolAddress,\n composableStablePoolInterface,\n provider\n );\n const poolId = await pool.getPoolId();\n return {\n poolAddress,\n poolId,\n };\n };\n\n getPoolInterface(): ComposableStablePoolInterface {\n return ComposableStablePool__factory.createInterface();\n }\n}\n","import { LogDescription } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\nimport { Contract } from '@ethersproject/contracts';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { JsonRpcProvider, TransactionReceipt } from '@ethersproject/providers';\n\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { WeightedPoolFactory__factory } from '@/contracts/factories/WeightedPoolFactory__factory';\nimport { balancerVault, networkAddresses } from '@/lib/constants/config';\nimport {\n AssetHelpers,\n findEventInReceiptLogs,\n getRandomBytes32,\n} from '@/lib/utils';\nimport { ContractInstances } from '@/modules/contracts/contracts.module';\nimport { PoolFactory } from '@/modules/pools/factory/pool-factory';\nimport {\n InitJoinPoolAttributes,\n InitJoinPoolParameters,\n JoinPoolDecodedAttributes,\n JoinPoolRequestDecodedAttributes,\n WeightedCreatePoolParameters,\n} from '@/modules/pools/factory/types';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { BalancerNetworkConfig } from '@/types';\nimport { WeightedPool__factory } from '@/contracts';\nimport { SolidityMaths } from '@/lib/utils/solidityMaths';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { WeightedPoolInterface } from '@/contracts/WeightedPool';\n\nexport class WeightedFactory implements PoolFactory {\n private wrappedNativeAsset: string;\n private contracts: ContractInstances;\n\n constructor(\n networkConfig: BalancerNetworkConfig,\n contracts: ContractInstances\n ) {\n const { tokens } = networkAddresses(networkConfig.chainId);\n this.wrappedNativeAsset = tokens.wrappedNativeAsset;\n this.contracts = contracts;\n }\n\n /**\n * Builds a transaction for a weighted pool create operation.\n * @param factoryAddress The address of the factory for weighted pool (contract address)\n * @param name The name of the pool\n * @param symbol The symbol of the pool\n * @param tokenAddresses The token's addresses\n * @param normalizedWeights The weights for each token, ordered\n * @param rateProviders The rate providers for each token, ordered\n * @param swapFeeEvm The swapFee for the owner of the pool in string or bigint formatted to evm(100% is 1e18, 10% is 1e17, 1% is 1e16)\n * @param owner The address of the owner of the pool\n * @param salt The salt of the pool (bytes32)\n * @returns TransactionRequest object, which can be directly inserted in the transaction to create a weighted pool\n */\n create({\n name,\n symbol,\n tokenAddresses,\n normalizedWeights,\n rateProviders,\n swapFeeEvm,\n owner,\n salt,\n }: WeightedCreatePoolParameters): {\n to?: string;\n data: BytesLike;\n } {\n this.checkCreateInputs({\n tokenAddresses,\n normalizedWeights,\n swapFeeEvm,\n rateProviders,\n });\n const params = this.parseCreateParamsForEncoding({\n name,\n symbol,\n tokenAddresses,\n normalizedWeights,\n rateProviders,\n swapFeeEvm,\n owner,\n salt,\n });\n const encodedFunctionData = this.encodeCreateFunctionData(params);\n return {\n to: this.contracts.weightedPoolFactory?.address,\n data: encodedFunctionData,\n };\n }\n\n checkCreateInputs({\n tokenAddresses,\n normalizedWeights,\n swapFeeEvm,\n rateProviders,\n }: Pick<\n WeightedCreatePoolParameters,\n 'tokenAddresses' | 'normalizedWeights' | 'swapFeeEvm' | 'rateProviders'\n >): void {\n if (\n tokenAddresses.length !== normalizedWeights.length ||\n normalizedWeights.length !== rateProviders.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n if (tokenAddresses.length < 2) {\n throw new BalancerError(BalancerErrorCode.BELOW_MIN_TOKENS);\n }\n if (tokenAddresses.length > 8) {\n throw new BalancerError(BalancerErrorCode.ABOVE_MAX_TOKENS);\n }\n if (BigInt(swapFeeEvm) <= BigInt(0) || BigInt(swapFeeEvm) > BigInt(1e17)) {\n throw new BalancerError(BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE);\n }\n const normalizedWeightsSum = (normalizedWeights as string[]).reduce(\n (acc, cur) => SolidityMaths.add(acc, BigInt(cur)),\n BigInt(0)\n );\n if (normalizedWeightsSum !== BigInt(1e18)) {\n throw new BalancerError(BalancerErrorCode.INVALID_WEIGHTS);\n }\n }\n\n parseCreateParamsForEncoding = ({\n name,\n symbol,\n tokenAddresses,\n normalizedWeights,\n rateProviders,\n swapFeeEvm,\n owner,\n salt,\n }: WeightedCreatePoolParameters): [\n string,\n string,\n string[],\n BigNumberish[],\n string[],\n string,\n string,\n BytesLike\n ] => {\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [sortedTokens, sortedNormalizedWeights, sortedRateProviders] =\n assetHelpers.sortTokens(\n tokenAddresses,\n normalizedWeights,\n rateProviders\n ) as [string[], BigNumberish[], string[]];\n return [\n name,\n symbol,\n sortedTokens,\n sortedNormalizedWeights,\n sortedRateProviders,\n swapFeeEvm.toString(),\n owner,\n salt || getRandomBytes32(),\n ];\n };\n\n encodeCreateFunctionData = (\n params: [\n string,\n string,\n string[],\n BigNumberish[],\n string[],\n string,\n string,\n BytesLike\n ]\n ): string => {\n const weightedPoolInterface =\n WeightedPoolFactory__factory.createInterface();\n\n return weightedPoolInterface.encodeFunctionData('create', params);\n };\n\n /**\n * Returns a InitJoinPoolAttributes to make a init join transaction\n * @param joiner The address of the joiner of the pool\n * @param poolId The id of the pool\n * @param tokensIn Array with the address of the tokens\n * @param amountsIn Array with the amount of each token\n * @returns InitJoinPoolAttributes object, which can be directly inserted in the transaction to init join a weighted pool\n */\n buildInitJoin({\n joiner,\n poolId,\n tokensIn,\n amountsIn,\n }: InitJoinPoolParameters): InitJoinPoolAttributes {\n this.checkInitJoinInputs({\n poolId,\n tokensIn,\n amountsIn,\n });\n const { attributes, params } = this.parseParamsForInitJoin({\n joiner,\n poolId,\n tokensIn,\n amountsIn,\n });\n const { functionName, data } = this.encodeInitJoinFunctionData(params);\n\n return {\n to: balancerVault,\n functionName,\n data,\n attributes,\n };\n }\n\n parseParamsForInitJoin = ({\n joiner,\n poolId,\n tokensIn,\n amountsIn,\n }: Omit): {\n attributes: JoinPoolDecodedAttributes;\n params: [string, string, string, JoinPoolRequestDecodedAttributes];\n } => {\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n\n const [sortedTokens, sortedAmounts] = assetHelpers.sortTokens(\n tokensIn,\n amountsIn\n ) as [string[], string[]];\n\n const userData = WeightedPoolEncoder.joinInit(sortedAmounts);\n\n const attributes = {\n poolId: poolId,\n sender: joiner,\n recipient: joiner,\n joinPoolRequest: {\n assets: sortedTokens,\n maxAmountsIn: sortedAmounts,\n userData,\n fromInternalBalance: false,\n },\n };\n\n return {\n attributes,\n params: [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ],\n };\n };\n\n encodeInitJoinFunctionData = (\n params: [string, string, string, JoinPoolRequestDecodedAttributes]\n ): {\n functionName: string;\n data: string;\n } => {\n const functionName = 'joinPool';\n\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, params);\n return { functionName, data };\n };\n checkInitJoinInputs = ({\n poolId,\n tokensIn,\n amountsIn,\n }: Pick<\n InitJoinPoolParameters,\n 'tokensIn' | 'amountsIn' | 'poolId'\n >): void => {\n if (!poolId) {\n throw new BalancerError(BalancerErrorCode.NO_POOL_DATA);\n }\n if (tokensIn.length !== amountsIn.length) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n };\n\n async getPoolAddressAndIdWithReceipt(\n provider: JsonRpcProvider,\n receipt: TransactionReceipt\n ): Promise<{ poolId: string; poolAddress: string }> {\n const poolCreationEvent: LogDescription = findEventInReceiptLogs({\n receipt,\n to: this.contracts.weightedPoolFactory?.address || '',\n contractInterface: WeightedPoolFactory__factory.createInterface(),\n logName: 'PoolCreated',\n });\n\n const poolAddress = poolCreationEvent.args.pool;\n const weightedPoolInterface = this.getPoolInterface();\n const pool = new Contract(poolAddress, weightedPoolInterface, provider);\n const poolId = await pool.getPoolId();\n return {\n poolAddress,\n poolId,\n };\n }\n\n getPoolInterface(): WeightedPoolInterface {\n return WeightedPool__factory.createInterface();\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { JoinPool } from '@/modules/pools/pool-types/concerns/types';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { ERC4626LinearPoolInterface } from '@/contracts/ERC4626LinearPool';\nimport { GearboxLinearPoolInterface } from '@/contracts/GearboxLinearPool';\nimport { EulerLinearPoolInterface } from '@/contracts/EulerLinearPool';\nimport { AaveLinearPoolInterface } from '@/contracts/AaveLinearPool';\nimport { YearnLinearPoolInterface } from '@/contracts/YearnLinearPool';\nimport { AaveLinearPoolFactoryInterface } from '@/contracts/AaveLinearPoolFactory';\nimport { ERC4626LinearPoolFactoryInterface } from '@/contracts/ERC4626LinearPoolFactory';\nimport { EulerLinearPoolFactoryInterface } from '@/contracts/EulerLinearPoolFactory';\nimport { GearboxLinearPoolFactoryInterface } from '@/contracts/GearboxLinearPoolFactory';\nimport { YearnLinearPoolFactoryInterface } from '@/contracts/YearnLinearPoolFactory';\n\nexport type CreatePoolParameters = {\n name: string;\n symbol: string;\n tokenAddresses: string[];\n swapFeeEvm: string;\n owner: string;\n salt?: BytesLike;\n};\n\nexport interface ComposableStableCreatePoolParameters\n extends CreatePoolParameters {\n amplificationParameter: string;\n rateProviders: string[];\n tokenRateCacheDurations: string[];\n exemptFromYieldProtocolFeeFlags: boolean[];\n\n salt?: BytesLike;\n}\n\nexport interface WeightedCreatePoolParameters extends CreatePoolParameters {\n rateProviders: string[];\n normalizedWeights: BigNumberish[];\n}\n\nexport type LinearCreatePoolParameters = Pick<\n CreatePoolParameters,\n 'name' | 'symbol' | 'swapFeeEvm' | 'owner' | 'salt'\n> & {\n mainToken: string;\n wrappedToken: string;\n upperTargetEvm: string;\n protocolId: ProtocolId;\n};\n\nexport interface InitJoinPoolParameters {\n joiner: string;\n poolId: string;\n poolAddress: string;\n tokensIn: string[];\n amountsIn: string[];\n}\n\nexport interface InitJoinPoolAttributes {\n to: string;\n functionName: string;\n attributes: JoinPool;\n data: string;\n value?: BigNumber;\n}\n\n// Source of the protocolId's: https://github.com/balancer/balancer-v2-monorepo/blob/647320a4a375c724276af8e1ae26948de8fa411b/pkg/interfaces/contracts/standalone-utils/IProtocolIdRegistry.sol#L54-L72\nexport enum ProtocolId {\n AAVE_V1 = 0,\n AAVE_V2 = 1,\n AAVE_V3 = 2,\n AMPLEFORTH = 3,\n BEEFY = 4,\n EULER = 5,\n GEARBOX = 6,\n IDLE = 7,\n MORPHO = 8,\n RADIANT = 9,\n REAPER = 10,\n SILO = 11,\n STARGATE = 12,\n STURDY = 13,\n TESSERA = 14,\n TETU = 15,\n YEARN = 16,\n MIDAS = 17,\n AGAVE = 18,\n}\n\nexport type JoinPoolDecodedAttributes = {\n poolId: string;\n sender: string;\n recipient: string;\n joinPoolRequest: JoinPoolRequestDecodedAttributes;\n};\n\nexport type JoinPoolRequestDecodedAttributes = {\n assets: string[];\n maxAmountsIn: string[];\n userData: string;\n fromInternalBalance: boolean;\n};\n\nexport type LinearPoolInterface =\n | ERC4626LinearPoolInterface\n | EulerLinearPoolInterface\n | AaveLinearPoolInterface\n | YearnLinearPoolInterface\n | GearboxLinearPoolInterface;\n\nexport type LinearPoolFactoryInterface =\n | AaveLinearPoolFactoryInterface\n | ERC4626LinearPoolFactoryInterface\n | EulerLinearPoolFactoryInterface\n | GearboxLinearPoolFactoryInterface\n | YearnLinearPoolFactoryInterface;\n","import { LogDescription } from '@ethersproject/abi';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { Contract } from '@ethersproject/contracts';\nimport { JsonRpcProvider, TransactionReceipt } from '@ethersproject/providers';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport {\n AaveLinearPool__factory,\n AaveLinearPoolFactory__factory,\n ERC4626LinearPool__factory,\n ERC4626LinearPoolFactory__factory,\n EulerLinearPool__factory,\n EulerLinearPoolFactory__factory,\n GearboxLinearPool__factory,\n GearboxLinearPoolFactory__factory,\n YearnLinearPool__factory,\n YearnLinearPoolFactory__factory,\n} from '@/contracts';\nimport { AaveLinearPoolInterface } from '@/contracts/AaveLinearPool';\nimport { ERC4626LinearPoolInterface } from '@/contracts/ERC4626LinearPool';\nimport { EulerLinearPoolInterface } from '@/contracts/EulerLinearPool';\nimport { EulerLinearPoolFactoryInterface } from '@/contracts/EulerLinearPoolFactory';\nimport { GearboxLinearPoolInterface } from '@/contracts/GearboxLinearPool';\nimport { YearnLinearPoolInterface } from '@/contracts/YearnLinearPool';\nimport { ContractInstances } from '@/modules/contracts/contracts.module';\nimport { PoolFactory } from '@/modules/pools/factory/pool-factory';\nimport {\n InitJoinPoolAttributes,\n LinearCreatePoolParameters,\n LinearPoolFactoryInterface,\n ProtocolId,\n} from '@/modules/pools/factory/types';\nimport { PoolType } from '@/types';\nimport { findEventInReceiptLogs, getRandomBytes32 } from '@/lib/utils';\n\ntype LinearPoolParamsToEncode = [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n BytesLike\n];\n\ntype EulerLinearPoolParamsToEncode = [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string\n];\n\nexport class LinearFactory implements PoolFactory {\n private contracts: ContractInstances;\n private readonly poolType: PoolType;\n\n constructor(contracts: ContractInstances, poolType: PoolType) {\n this.contracts = contracts;\n this.poolType = poolType;\n }\n\n getPoolFactoryInterface = (): LinearPoolFactoryInterface => {\n switch (this.poolType) {\n case PoolType.AaveLinear:\n return AaveLinearPoolFactory__factory.createInterface();\n case PoolType.Linear:\n case PoolType.ERC4626Linear:\n return ERC4626LinearPoolFactory__factory.createInterface();\n case PoolType.EulerLinear:\n return EulerLinearPoolFactory__factory.createInterface();\n case PoolType.GearboxLinear:\n return GearboxLinearPoolFactory__factory.createInterface();\n case PoolType.YearnLinear:\n return YearnLinearPoolFactory__factory.createInterface();\n default:\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n };\n\n getPoolInterface = ():\n | AaveLinearPoolInterface\n | ERC4626LinearPoolInterface\n | EulerLinearPoolInterface\n | GearboxLinearPoolInterface\n | YearnLinearPoolInterface => {\n switch (this.poolType) {\n case PoolType.AaveLinear:\n return AaveLinearPool__factory.createInterface();\n case PoolType.Linear:\n case PoolType.ERC4626Linear:\n return ERC4626LinearPool__factory.createInterface();\n case PoolType.EulerLinear:\n return EulerLinearPool__factory.createInterface();\n case PoolType.GearboxLinear:\n return GearboxLinearPool__factory.createInterface();\n case PoolType.YearnLinear:\n return YearnLinearPool__factory.createInterface();\n default:\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n };\n\n buildInitJoin(): InitJoinPoolAttributes {\n // Linear Pools doesn't need to be initialized, they are initialized on deploy\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n\n /**\n *\n * @param name The name of the pool\n * @param symbol The symbol of the pool (BPT name)\n * @param mainToken The main token\n * @param wrappedToken The wrapped token\n * @param upperTargetEvm The maximum balance of the main token\n * @param swapFeeEvm The swap fee of the pool\n * @param owner The address of the owner of the pool\n * @param protocolId The protocolId, to check the available value\n */\n create({\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId,\n salt,\n }: LinearCreatePoolParameters): {\n to?: string;\n data: BytesLike;\n } {\n this.checkCreateInputs({ swapFeeEvm, protocolId });\n const params = this.parseCreateParamsForEncoding({\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId,\n salt,\n });\n const data = this.encodeCreateFunctionData(params);\n return {\n to: this.getFactoryAddress(),\n data,\n };\n }\n\n checkCreateInputs = ({\n swapFeeEvm,\n protocolId,\n }: {\n swapFeeEvm: string;\n protocolId: ProtocolId;\n }): void => {\n if (!ProtocolId[protocolId]) {\n throw new BalancerError(BalancerErrorCode.INVALID_PROTOCOL_ID);\n }\n if (BigInt(swapFeeEvm) <= BigInt(0) || BigInt(swapFeeEvm) > BigInt(1e17)) {\n throw new BalancerError(BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE);\n }\n this.getFactoryAddress();\n };\n\n parseCreateParamsForEncoding = ({\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId,\n salt,\n }: Omit):\n | LinearPoolParamsToEncode\n | EulerLinearPoolParamsToEncode => {\n if (this.poolType === PoolType.EulerLinear) {\n return [\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId.toString(),\n ] as [string, string, string, string, string, string, string, string];\n }\n return [\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId.toString(),\n salt || getRandomBytes32(),\n ] as [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n BytesLike\n ];\n };\n\n encodeCreateFunctionData = (\n params: LinearPoolParamsToEncode | EulerLinearPoolParamsToEncode\n ): string => {\n const linearPoolInterface: LinearPoolFactoryInterface =\n this.getPoolFactoryInterface();\n const encodedData =\n // YearnLinearPools doesn't have protocolId, the encoding of the params is different\n this.poolType === PoolType.EulerLinear\n ? (\n linearPoolInterface as EulerLinearPoolFactoryInterface\n ).encodeFunctionData(\n 'create',\n params as EulerLinearPoolParamsToEncode\n )\n : (\n linearPoolInterface as Exclude<\n LinearPoolFactoryInterface,\n EulerLinearPoolFactoryInterface\n >\n ).encodeFunctionData('create', params as LinearPoolParamsToEncode);\n return encodedData;\n };\n\n getFactoryAddress = (): string => {\n switch (this.poolType) {\n case PoolType.AaveLinear:\n if (this.contracts.aaveLinearPoolFactory) {\n return this.contracts.aaveLinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n case PoolType.Linear:\n case PoolType.ERC4626Linear:\n if (this.contracts.erc4626LinearPoolFactory) {\n return this.contracts.erc4626LinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n case PoolType.EulerLinear:\n if (this.contracts.eulerLinearPoolFactory) {\n return this.contracts.eulerLinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n case PoolType.GearboxLinear:\n if (this.contracts.gearboxLinearPoolFactory) {\n return this.contracts.gearboxLinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n case PoolType.YearnLinear:\n if (this.contracts.yearnLinearPoolFactory) {\n return this.contracts.yearnLinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n default:\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n };\n\n getPoolAddressAndIdWithReceipt = async (\n provider: JsonRpcProvider,\n receipt: TransactionReceipt\n ): Promise<{ poolId: string; poolAddress: string }> => {\n const poolCreationEvent: LogDescription = findEventInReceiptLogs({\n receipt,\n to: this.getFactoryAddress() || '',\n contractInterface: this.getPoolFactoryInterface(),\n logName: 'PoolCreated',\n });\n\n const poolAddress = poolCreationEvent.args.pool;\n const linearPoolInterface = this.getPoolInterface();\n const pool = new Contract(poolAddress, linearPoolInterface, provider);\n const poolId = await pool.getPoolId();\n return {\n poolAddress,\n poolId,\n };\n };\n}\n","import { BalancerNetworkConfig, PoolType } from '@/types';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { PoolFactory } from '@/modules/pools/factory/pool-factory';\nimport { ComposableStableFactory } from '@/modules/pools/factory/composable-stable/composable-stable.factory';\nimport { WeightedFactory } from '@/modules/pools/factory/weighted/weighted.factory';\nimport {\n ContractInstances,\n Contracts,\n} from '@/modules/contracts/contracts.module';\nimport { LinearFactory } from '@/modules/pools/factory/linear/linear.factory';\n\n/**\n * Wrapper around pool type specific methods.\n *\n * Returns a class instance of a type specific factory.\n */\nexport class PoolFactory__factory {\n networkConfig: BalancerNetworkConfig;\n contracts: ContractInstances;\n\n constructor(\n networkConfig: BalancerNetworkConfig,\n balancerContracts: Contracts\n ) {\n this.networkConfig = networkConfig;\n this.contracts = balancerContracts.contracts;\n }\n\n of(poolType: PoolType): PoolFactory {\n switch (poolType) {\n case 'Weighted':\n return new WeightedFactory(this.networkConfig, this.contracts);\n case 'Investment':\n case 'LiquidityBootstrapping': {\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n case 'Stable': {\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n case 'ComposableStable': {\n return new ComposableStableFactory(this.networkConfig, this.contracts);\n }\n case 'MetaStable': {\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n case 'StablePhantom': {\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n case 'Linear':\n case 'AaveLinear':\n case 'ERC4626Linear':\n case 'EulerLinear':\n case 'GearboxLinear':\n case 'YearnLinear': {\n return new LinearFactory(this.contracts, poolType);\n }\n default:\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n }\n}\n","import * as PoolQueries from './types';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero, Zero, MaxUint256 } from '@ethersproject/constants';\nimport { getEncoder } from './get_encoder';\nimport { removeItem } from '@/lib/utils';\n\n/**\n * Builds parameters quering join / exit liquidity functions in the Balancer Helpers contract.\n */\nexport class ParamsBuilder implements PoolQueries.ParamsBuilder {\n private encoder: PoolQueries.Encoder;\n\n constructor(private pool: PoolQueries.Pool) {\n const encoder = getEncoder(pool.poolType);\n if (encoder) {\n this.encoder = encoder;\n } else {\n throw 'Pool type not supported';\n }\n }\n\n /**\n * Encodes the query to get expected amount of BPT when joining a Pool with exact token inputs\n * @param maxAmountsInByToken - The amounts each of token, mapped by token address, to deposit in the pool as liquidity,\n * doesn't need to have all tokens, only the ones that will be deposited\n * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens (optional)\n */\n buildQueryJoinExactIn({\n maxAmountsInByToken,\n minimumBPT = Zero,\n }: PoolQueries.JoinExactInParams): PoolQueries.queryJoinParams {\n const bptIndex = this.pool.tokensList.findIndex((token) =>\n this.pool.id.includes(token)\n );\n\n const assets = [...this.pool.tokensList];\n\n const maxAmountsIn = this.pool.tokensList.map(\n (tokenAddress) =>\n maxAmountsInByToken.get(tokenAddress) ?? BigNumber.from('0')\n );\n\n let maxInWithoutBpt;\n\n // Remove BPT token from amounts for user data\n if (bptIndex > -1) {\n maxInWithoutBpt = removeItem(maxAmountsIn, bptIndex);\n } else {\n maxInWithoutBpt = maxAmountsIn;\n }\n\n const userData = this.encoder.joinExactTokensInForBPTOut(\n maxInWithoutBpt,\n minimumBPT\n );\n\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets,\n maxAmountsIn,\n userData,\n fromInternalBalance: false, // from internal balance is ignored on query join, can be just false\n },\n ] as PoolQueries.queryJoinParams;\n\n return params;\n }\n\n /**\n * Encodes the query to get expected token amount when joining a Pool specifying fixed BPT out.\n *\n * @param maxAmountIn - The max expected amount for tokenIn (optional)\n * @param bptOut - the expected BPT for providing liquidity\n * @param tokenIn - address of a token joining the pool\n */\n buildQueryJoinExactOut({\n maxAmountIn,\n bptOut,\n tokenIn,\n }: PoolQueries.JoinExactOutParams): PoolQueries.queryJoinParams {\n const bptIndex = this.pool.tokensList.findIndex((token) =>\n this.pool.id.includes(token)\n );\n let tokensWithoutBpt = [...this.pool.tokensList];\n if (bptIndex > -1) {\n tokensWithoutBpt = removeItem(this.pool.tokensList, bptIndex);\n }\n const tokenIndex = tokensWithoutBpt.indexOf(tokenIn);\n\n const userData = this.encoder.joinTokenInForExactBPTOut(bptOut, tokenIndex);\n const maxAmountsIn = maxAmountIn\n ? this.pool.tokensList.map((tokenAddress) =>\n tokenAddress === tokenIn ? maxAmountIn : '0'\n )\n : [];\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets: this.pool.tokensList,\n maxAmountsIn,\n userData,\n fromInternalBalance: false, // from internal balance is ignored on query join, can be just false\n },\n ] as PoolQueries.queryJoinParams;\n\n return params;\n }\n\n /**\n * Encodes the query for exiting the pool to a single token\n *\n * @param minAmountOut - minimum expected amount for token out\n * @param bptIn - BPT, shares of the pool liquidity\n * @param tokenOut - address of an exit liquidity token\n */\n buildQueryExitToSingleToken({\n minAmountOut,\n bptIn,\n tokenOut,\n }: PoolQueries.ExitToSingleTokenParams): PoolQueries.queryExitParams {\n const bptIndex = this.pool.tokensList.findIndex((token) =>\n this.pool.id.includes(token)\n );\n let tokensWithoutBpt = [...this.pool.tokensList];\n if (bptIndex > -1) {\n tokensWithoutBpt = removeItem(this.pool.tokensList, bptIndex);\n }\n const tokenIndex = tokensWithoutBpt.indexOf(tokenOut);\n\n const userData = this.encoder.exitExactBPTInForOneTokenOut(\n bptIn,\n tokenIndex\n );\n const minAmountsOut = minAmountOut\n ? this.pool.tokensList.map((tokenAddress) =>\n tokenAddress === tokenOut ? minAmountOut : '0'\n )\n : [];\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets: this.pool.tokensList,\n minAmountsOut,\n userData,\n toInternalBalance: false, // to internal balance is ignored on query join, can be just false\n },\n ] as PoolQueries.queryExitParams;\n\n return params;\n }\n\n /**\n * Encodes the query for exiting the pool with all underlying tokens proportionally.\n * Not supported by ComposableStable\n *\n * @param minAmountsOut - minimum expected amounts, can be set to zero for a query, ordered same as pool.tokensList\n * @param bptIn - BPT, shares of the pool liquidity\n */\n buildQueryExitProportionally({\n minAmountsOut = [],\n bptIn,\n }: PoolQueries.ExitProportionallyParams): PoolQueries.queryExitParams {\n if (!this.encoder.exitExactBPTInForTokensOut) {\n throw 'Proportional exit not implemented';\n }\n\n const userData = this.encoder.exitExactBPTInForTokensOut(bptIn);\n\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets: this.pool.tokensList,\n minAmountsOut,\n userData,\n toInternalBalance: false,\n },\n ] as PoolQueries.queryExitParams;\n\n return params;\n }\n\n /**\n * Encodes calldata to query expected BPT for known amounts out.\n *\n * @param minAmountsOut - minimum expected amounts, ordered same as pool.tokensList\n * @param maxBptIn - BPT, shares of the pool liquidity, can be set to zero for a query\n */\n buildQueryExitExactOut({\n minAmountsOut,\n maxBptIn = MaxUint256,\n }: PoolQueries.ExitExactOutParams): PoolQueries.queryExitParams {\n const bptIndex = this.pool.tokensList.findIndex((token) =>\n this.pool.id.includes(token)\n );\n\n let minAmountsOutWithoutBpt = [...minAmountsOut];\n // Remove BPT token from amounts\n if (bptIndex > -1) {\n minAmountsOutWithoutBpt = removeItem(minAmountsOut, bptIndex);\n }\n\n const userData = this.encoder.exitBPTInForExactTokensOut(\n minAmountsOutWithoutBpt,\n maxBptIn\n );\n\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets: this.pool.tokensList,\n minAmountsOut,\n userData,\n toInternalBalance: false, // to internal balance is ignored on query join, can be just false\n },\n ] as PoolQueries.queryExitParams;\n\n return params;\n }\n}\n","import { WeightedPoolEncoder } from '@/pool-weighted/encoder';\nimport { StablePoolEncoder } from '@/pool-stable/encoder';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { PoolType } from '@/types';\nimport { isLinearish } from '@/lib/utils';\n\nexport const getEncoder = (\n poolType: PoolType\n):\n | typeof WeightedPoolEncoder\n | typeof StablePoolEncoder\n | typeof ComposableStablePoolEncoder\n | undefined => {\n switch (poolType) {\n case PoolType.Weighted:\n return WeightedPoolEncoder;\n\n case PoolType.Stable:\n case PoolType.MetaStable:\n case PoolType.StablePhantom:\n case PoolType.Element:\n case PoolType.Gyro2:\n case PoolType.Gyro3:\n return StablePoolEncoder;\n\n case PoolType.ComposableStable:\n return ComposableStablePoolEncoder;\n\n default: {\n if (isLinearish(poolType)) return StablePoolEncoder;\n break;\n }\n }\n};\n","import * as emissions from '@/modules/data/bal/emissions';\nimport { Findable, LiquidityGauge } from '@/types';\n\n/**\n * Returns BAL emissions per pool\n */\nexport class EmissionsService {\n constructor(private liquidityGaugesRepository: Findable) {}\n\n async relativeWeight(poolId: string): Promise {\n const gauge = await this.liquidityGaugesRepository.findBy('poolId', poolId);\n\n if (gauge) {\n return gauge.relativeWeight;\n }\n\n return 0;\n }\n\n async weekly(poolId: string): Promise {\n const perWeek = emissions.weekly();\n const relativeWeight = await this.relativeWeight(poolId);\n\n return perWeek * relativeWeight;\n }\n}\n","import { parseUnits } from '@ethersproject/units';\nimport { BigNumber } from '@ethersproject/bignumber';\n\n/**\n * Calculates the proportional amounts of tokens in relation to a given token and amount.\n * Useful for calculating the amounts of tokens to be sent to a pool when joining or swapping.\n * When using proportional amounts to join a pool the price impact will be minimal.\n *\n * @param pool - Pool object\n * @param token - Token address in relation to which the amounts are calculated\n * @param amount - Amount of token\n * @returns Object with tokens and amounts\n * @example\n * const pool = {\n * id: '0x0000',\n * tokens: [\n * { address: '0x1234', balance: '10' },\n * { address: '0x5678', balance: '20' }\n * ]\n * }\n *\n * const { tokens, amounts } = proportionalAmounts(pool, '0x1234', '1000000000000000000')\n */\nexport const proportionalAmounts = (\n pool: {\n id: string;\n tokens: { address: string; balance: string; decimals?: number }[];\n },\n token: string,\n amount: string\n): {\n tokens: string[];\n amounts: string[];\n} => {\n const tokensWithoutBpt = pool.tokens.filter(\n (t) => !pool.id.toLowerCase().includes(t.address.toLowerCase())\n );\n const referenceTokenIndex = tokensWithoutBpt.findIndex(\n (t) => t.address.toLowerCase() === token.toLowerCase()\n );\n\n if (referenceTokenIndex == -1) {\n throw new Error('Token not found in pool');\n }\n\n const balances = tokensWithoutBpt.map((t) =>\n parseUnits(t.balance, t.decimals)\n );\n const amountBn = BigNumber.from(amount);\n const proportionalAmounts = balances.map((b) =>\n b.mul(amountBn).div(balances[referenceTokenIndex])\n );\n\n return {\n tokens: tokensWithoutBpt.map((t) => t.address),\n amounts: proportionalAmounts.map((a) => a.toString()),\n };\n};\n","import { BigNumberish } from '@ethersproject/bignumber';\nimport { JsonRpcSigner } from '@ethersproject/providers';\n\nimport { BalancerError } from '@/balancerErrors';\nimport { Contracts } from '@/modules/contracts/contracts.module';\nimport { ImpermanentLossService } from '@/modules/pools/impermanentLoss/impermanentLossService';\nimport type {\n BalancerNetworkConfig,\n BalancerDataRepositories,\n Findable,\n Searchable,\n Pool,\n PoolWithMethods,\n AprBreakdown,\n PoolAttribute,\n} from '@/types';\nimport { Logger } from '@/lib/utils/logger';\n\nimport {\n ExitExactBPTInAttributes,\n JoinPoolAttributes,\n} from './pool-types/concerns/types';\nimport { PoolTypeConcerns } from './pool-type-concerns';\nimport { PoolApr } from './apr/apr';\nimport { Liquidity } from '../liquidity/liquidity.module';\nimport { Join } from '../joins/joins.module';\nimport { Exit, GeneralisedExitOutput, ExitInfo } from '../exits/exits.module';\nimport { PoolVolume } from './volume/volume';\nimport { PoolFees } from './fees/fees';\nimport { Simulation, SimulationType } from '../simulation/simulation.module';\nimport { PoolGraph } from '../graph/graph';\nimport { PoolFactory__factory } from './pool-factory__factory';\nimport * as Queries from './queries';\nimport { EmissionsService } from './emissions';\nimport { proportionalAmounts } from './proportional-amounts';\n\nconst notImplemented = (poolType: string, name: string) => () => {\n throw `${name} for poolType ${poolType} not implemented`;\n};\n\n/**\n * Controller / use-case layer for interacting with pools data.\n */\nexport class Pools implements Findable {\n aprService;\n liquidityService;\n joinService;\n exitService;\n feesService;\n volumeService;\n simulationService;\n poolFactory;\n impermanentLossService;\n graphService;\n emissionsService;\n proportionalAmounts;\n\n constructor(\n private networkConfig: BalancerNetworkConfig,\n private repositories: BalancerDataRepositories,\n private balancerContracts: Contracts\n ) {\n this.aprService = new PoolApr(\n this.repositories.pools,\n this.repositories.tokenPrices,\n this.repositories.tokenMeta,\n this.repositories.tokenYields,\n this.repositories.feeCollector,\n this.repositories.yesterdaysPools,\n this.repositories.liquidityGauges,\n this.repositories.feeDistributor,\n this.repositories.gyroConfigRepository\n );\n this.liquidityService = new Liquidity(\n repositories.pools,\n repositories.tokenPrices\n );\n this.simulationService = new Simulation(\n networkConfig,\n this.repositories.poolsForSimulations\n );\n this.graphService = new PoolGraph(this.repositories.poolsOnChain);\n this.joinService = new Join(\n this.graphService,\n networkConfig,\n this.simulationService\n );\n this.exitService = new Exit(\n this.graphService,\n networkConfig,\n this.simulationService\n );\n this.feesService = new PoolFees(repositories.yesterdaysPools);\n this.volumeService = new PoolVolume(repositories.yesterdaysPools);\n this.poolFactory = new PoolFactory__factory(\n networkConfig,\n balancerContracts\n );\n this.impermanentLossService = new ImpermanentLossService(\n repositories.tokenPrices,\n repositories.tokenHistoricalPrices\n );\n if (repositories.liquidityGauges) {\n this.emissionsService = new EmissionsService(\n repositories.liquidityGauges\n );\n }\n this.proportionalAmounts = proportionalAmounts;\n }\n\n static wrap(\n pool: Pool,\n networkConfig: BalancerNetworkConfig\n ): PoolWithMethods {\n let concerns: ReturnType;\n let queries: Queries.ParamsBuilder;\n let methods;\n try {\n concerns = PoolTypeConcerns.from(pool.poolType);\n methods = {\n buildJoin: (\n joiner: string,\n tokensIn: string[],\n amountsIn: string[],\n slippage: string\n ): JoinPoolAttributes => {\n return concerns.join.buildJoin({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n });\n },\n calcPriceImpact: async (\n tokenAmounts: string[],\n bptAmount: string,\n isJoin: boolean\n ) =>\n concerns.priceImpactCalculator.calcPriceImpact(\n pool,\n tokenAmounts.map(BigInt),\n BigInt(bptAmount),\n isJoin\n ),\n buildExitExactBPTIn: (\n exiter: string,\n bptIn: string,\n slippage: string,\n shouldUnwrapNativeAsset = false,\n singleTokenOut?: string,\n toInternalBalance = false\n ) => {\n if (concerns.exit.buildExitExactBPTIn) {\n return concerns.exit.buildExitExactBPTIn({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n });\n } else {\n throw 'ExitExactBPTIn not supported';\n }\n },\n buildExitExactTokensOut: (\n exiter: string,\n tokensOut: string[],\n amountsOut: string[],\n slippage: string,\n toInternalBalance = false\n ) =>\n concerns.exit.buildExitExactTokensOut({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }),\n buildRecoveryExit: (\n exiter: string,\n bptIn: string,\n slippage: string,\n toInternalBalance = false\n ) =>\n concerns.exit.buildRecoveryExit({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }),\n\n // TODO: spotPrice fails, because it needs a subgraphType,\n // either we refetch or it needs a type transformation from SDK internal to SOR (subgraph)\n // spotPrice: async (tokenIn: string, tokenOut: string) =>\n // methods.spotPriceCalculator.calcPoolSpotPrice(tokenIn, tokenOut, data),\n calcSpotPrice: (tokenIn: string, tokenOut: string) =>\n concerns.spotPriceCalculator.calcPoolSpotPrice(\n tokenIn,\n tokenOut,\n pool\n ),\n calcProportionalAmounts: (token: string, amount: string) => {\n return proportionalAmounts(pool, token, amount);\n },\n };\n } catch (error) {\n if ((error as BalancerError).code != 'UNSUPPORTED_POOL_TYPE') {\n const logger = Logger.getInstance();\n logger.warn(error as string);\n }\n\n methods = {\n buildJoin: notImplemented(pool.poolType, 'buildJoin'),\n calcPriceImpact: notImplemented(pool.poolType, 'calcPriceImpact'),\n buildExitExactBPTIn: notImplemented(\n pool.poolType,\n 'buildExitExactBPTIn'\n ),\n buildExitExactTokensOut: notImplemented(\n pool.poolType,\n 'buildExitExactTokensOut'\n ),\n calcSpotPrice: notImplemented(pool.poolType, 'calcSpotPrice'),\n buildRecoveryExit: notImplemented(pool.poolType, 'buildRecoveryExit'),\n };\n }\n\n try {\n queries = new Queries.ParamsBuilder(pool);\n methods = {\n ...methods,\n buildQueryJoinExactIn: queries.buildQueryJoinExactIn.bind(queries),\n buildQueryJoinExactOut: queries.buildQueryJoinExactOut.bind(queries),\n buildQueryExitExactOut: queries.buildQueryExitExactOut.bind(queries),\n buildQueryExitToSingleToken:\n queries.buildQueryExitToSingleToken.bind(queries),\n buildQueryExitProportionally:\n queries.buildQueryExitProportionally.bind(queries),\n };\n } catch (error) {\n methods = {\n ...methods,\n buildQueryJoinExactIn: notImplemented(\n pool.poolType,\n 'buildQueryJoinExactIn'\n ),\n buildQueryJoinExactOut: notImplemented(\n pool.poolType,\n 'buildQueryJoinExactOut'\n ),\n buildQueryExitExactOut: notImplemented(\n pool.poolType,\n 'buildQueryExitExactOut'\n ),\n buildQueryExitToSingleToken: notImplemented(\n pool.poolType,\n 'buildQueryExitToSingleToken'\n ),\n buildQueryExitProportionally: notImplemented(\n pool.poolType,\n 'buildQueryExitProportionally'\n ),\n };\n }\n const wrappedNativeAsset =\n networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase();\n const bptIndex = pool.tokensList.indexOf(pool.address);\n return {\n ...pool,\n ...methods,\n bptIndex,\n };\n }\n\n dataSource(): Findable & Searchable {\n // TODO: Add API data repository to data and use liveModelProvider as fallback\n return this.repositories.pools;\n }\n\n /**\n * Calculates APR on any pool data\n *\n * @param pool\n * @returns\n */\n async apr(pool: Pool): Promise {\n return this.aprService.apr(pool);\n }\n\n /**\n * Calculates Impermanent Loss on any pool data\n *\n * @param timestamp\n * @param pool\n * @returns\n */\n async impermanentLoss(timestamp: number, pool: Pool): Promise {\n return this.impermanentLossService.calcImpLoss(timestamp, pool);\n }\n\n /**\n * Calculates total pool liquidity in USD\n *\n * @param pool\n * @returns total pool liquidity in USD\n */\n async liquidity(pool: Pool): Promise {\n return this.liquidityService.getLiquidity(pool);\n }\n\n /**\n * Calculates pool's BPT price in USD\n *\n * @param pool\n * @returns pool's BPT price in USD\n */\n async bptPrice(pool: Pool): Promise {\n return this.liquidityService.getBptPrice(pool);\n }\n\n /**\n * Builds join transaction\n *\n * @param pool Pool\n * @param tokensIn Token addresses\n * @param amountsIn Token amounts in EVM scale\n * @param userAddress User address\n * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%.\n * @returns Transaction object\n * @throws Error if pool type is not implemented\n */\n buildJoin({\n pool,\n tokensIn,\n amountsIn,\n userAddress,\n slippage,\n }: {\n pool: Pool;\n tokensIn: string[];\n amountsIn: string[];\n userAddress: string;\n slippage: string;\n }): JoinPoolAttributes {\n const concerns = PoolTypeConcerns.from(pool.poolType);\n\n if (!concerns)\n throw `buildJoin for poolType ${pool.poolType} not implemented`;\n\n return concerns.join.buildJoin({\n joiner: userAddress,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset:\n this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase(),\n });\n }\n\n buildExitExactBPTIn({\n pool,\n bptAmount,\n userAddress,\n slippage,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n }: {\n pool: Pool;\n bptAmount: string;\n userAddress: string;\n slippage: string;\n shouldUnwrapNativeAsset?: boolean;\n singleTokenOut?: string;\n }): ExitExactBPTInAttributes {\n const concerns = PoolTypeConcerns.from(pool.poolType);\n if (!concerns || !concerns.exit.buildExitExactBPTIn)\n throw `buildExit for poolType ${pool.poolType} not implemented`;\n\n return concerns.exit.buildExitExactBPTIn({\n pool,\n exiter: userAddress,\n bptIn: bptAmount,\n slippage,\n wrappedNativeAsset:\n this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase(),\n shouldUnwrapNativeAsset: shouldUnwrapNativeAsset ?? false,\n singleTokenOut: singleTokenOut ?? undefined,\n toInternalBalance: false,\n });\n }\n\n buildRecoveryExit({\n pool,\n bptAmount,\n userAddress,\n slippage,\n toInternalBalance,\n }: {\n pool: Pool;\n bptAmount: string;\n userAddress: string;\n slippage: string;\n toInternalBalance?: boolean;\n }): ExitExactBPTInAttributes {\n const concerns = PoolTypeConcerns.from(pool.poolType);\n if (!concerns || !concerns.exit.buildRecoveryExit)\n throw `buildRecoveryExit for poolType ${pool.poolType} not implemented`;\n\n return concerns.exit.buildRecoveryExit({\n exiter: userAddress,\n pool,\n bptIn: bptAmount,\n slippage,\n toInternalBalance: !!toInternalBalance,\n });\n }\n\n /**\n * Builds generalised join transaction\n *\n * @param poolId Pool id\n * @param tokens Token addresses\n * @param amounts Token amounts in EVM scale\n * @param userAddress User address\n * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%.\n * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen\n * @param simulationType Simulation type (VaultModel, Tenderly or Static)\n * @param authorisation Optional auhtorisation call to be added to the chained transaction\n * @returns transaction data ready to be sent to the network along with min and expected BPT amounts out.\n */\n async generalisedJoin(\n poolId: string,\n tokens: string[],\n amounts: string[],\n userAddress: string,\n slippage: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType,\n authorisation?: string\n ): Promise<{\n to: string;\n encodedCall: string;\n minOut: string;\n expectedOut: string;\n priceImpact: string;\n value: BigNumberish;\n }> {\n return this.joinService.joinPool(\n poolId,\n tokens,\n amounts,\n userAddress,\n slippage,\n signer,\n simulationType,\n authorisation\n );\n }\n\n /**\n * Builds generalised exit transaction\n *\n * @param poolId Pool id\n * @param amount Token amount in EVM scale\n * @param userAddress User address\n * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%.\n * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen\n * @param simulationType Simulation type (Tenderly or Static) - VaultModel should not be used to build exit transaction\n * @param authorisation Optional auhtorisation call to be added to the chained transaction\n * @param tokensToUnwrap List all tokens that requires exit by unwrapping - info provided by getExitInfo\n * @returns transaction data ready to be sent to the network along with tokens, min and expected amounts out.\n */\n async generalisedExit(\n poolId: string,\n amount: string,\n userAddress: string,\n slippage: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType.Static | SimulationType.Tenderly,\n authorisation?: string,\n tokensToUnwrap?: string[]\n ): Promise {\n return this.exitService.buildExitCall(\n poolId,\n amount,\n userAddress,\n slippage,\n signer,\n simulationType,\n authorisation,\n tokensToUnwrap\n );\n }\n\n /**\n * Calculates price impact for an action on a pool\n *\n * @param pool\n * @returns percentage as a string in EVM scale\n */\n calcPriceImpact({\n pool,\n tokenAmounts,\n bptAmount,\n isJoin,\n }: {\n pool: Pool;\n tokenAmounts: string[];\n bptAmount: string;\n isJoin: boolean;\n }): string {\n const concerns = PoolTypeConcerns.from(pool.poolType);\n return concerns.priceImpactCalculator.calcPriceImpact(\n pool,\n tokenAmounts.map(BigInt),\n BigInt(bptAmount),\n isJoin\n );\n }\n\n /**\n * Gets info required to build generalised exit transaction\n *\n * @param poolId Pool id\n * @param amountBptIn BPT amount in EVM scale\n * @param userAddress User address\n * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen\n * @returns info required to build a generalised exit transaction including whether tokens need to be unwrapped\n */\n async getExitInfo(\n poolId: string,\n amountBptIn: string,\n userAddress: string,\n signer: JsonRpcSigner\n ): Promise {\n return this.exitService.getExitInfo(\n poolId,\n amountBptIn,\n userAddress,\n signer\n );\n }\n\n /**\n * Calculates total fees for the pool in the last 24 hours\n *\n * @param pool\n * @returns\n */\n async fees(pool: Pool): Promise {\n return this.feesService.last24h(pool);\n }\n\n /**\n * Calculates total volume of the pool in the last 24 hours\n *\n * @param pool\n * @returns\n */\n async volume(pool: Pool): Promise {\n return this.volumeService.last24h(pool);\n }\n\n async find(id: string): Promise {\n const data = await this.dataSource().find(id);\n if (!data) return;\n\n return Pools.wrap(data, this.networkConfig);\n }\n\n async findBy(\n param: string,\n value: string\n ): Promise {\n if (param == 'id') {\n return this.find(value);\n } else if (param == 'address') {\n const data = await this.dataSource().findBy('address', value);\n if (!data) return;\n\n return Pools.wrap(data, this.networkConfig);\n } else {\n throw `search by ${param} not implemented`;\n }\n }\n\n async all(): Promise {\n const list = await this.dataSource().all();\n if (!list) return [];\n\n return list\n .map((data: Pool) => Pools.wrap(data, this.networkConfig))\n .filter((p) => p) as PoolWithMethods[];\n }\n\n async where(filter: (pool: Pool) => boolean): Promise {\n const list = await this.dataSource().where(filter);\n if (!list) return [];\n\n const wrapped = list.map((data: Pool) =>\n Pools.wrap(data, this.networkConfig)\n );\n\n return wrapped.filter((p) => p) as PoolWithMethods[];\n }\n}\n","export const version = \"strings/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { arrayify } from \"@ethersproject/bytes\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n///////////////////////////////\nexport var UnicodeNormalizationForm;\n(function (UnicodeNormalizationForm) {\n UnicodeNormalizationForm[\"current\"] = \"\";\n UnicodeNormalizationForm[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm[\"NFKD\"] = \"NFKD\";\n})(UnicodeNormalizationForm || (UnicodeNormalizationForm = {}));\n;\nexport var Utf8ErrorReason;\n(function (Utf8ErrorReason) {\n // A continuation byte was present where there was nothing to continue\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n // An invalid (non-continuation) byte to start a UTF-8 codepoint was found\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n // The string is too short to process the expected codepoint\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"OVERRUN\"] = \"string overrun\";\n // A missing continuation byte was expected but not found\n // - offset = the index the continuation byte was expected at\n Utf8ErrorReason[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\n // The computed code point is outside the range for UTF-8\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; outside the UTF-8 range\n Utf8ErrorReason[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\n // UTF-8 strings may not contain UTF-16 surrogate pairs\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range\n Utf8ErrorReason[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n // The string is an overlong representation\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; already bounds checked\n Utf8ErrorReason[\"OVERLONG\"] = \"overlong representation\";\n})(Utf8ErrorReason || (Utf8ErrorReason = {}));\n;\nfunction errorFunc(reason, offset, bytes, output, badCodepoint) {\n return logger.throwArgumentError(`invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n}\nfunction ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes\n if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {\n let i = 0;\n for (let o = offset + 1; o < bytes.length; o++) {\n if (bytes[o] >> 6 !== 0x02) {\n break;\n }\n i++;\n }\n return i;\n }\n // This byte runs us past the end of the string, so just jump to the end\n // (but the first byte was read already read and therefore skipped)\n if (reason === Utf8ErrorReason.OVERRUN) {\n return bytes.length - offset - 1;\n }\n // Nothing to skip\n return 0;\n}\nfunction replaceFunc(reason, offset, bytes, output, badCodepoint) {\n // Overlong representations are otherwise \"valid\" code points; just non-deistingtished\n if (reason === Utf8ErrorReason.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n // Put the replacement character into the output\n output.push(0xfffd);\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n// Common error handing strategies\nexport const Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(bytes, onError) {\n if (onError == null) {\n onError = Utf8ErrorFuncs.error;\n }\n bytes = arrayify(bytes);\n const result = [];\n let i = 0;\n // Invalid bytes are ignored\n while (i < bytes.length) {\n const c = bytes[i++];\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n // 1110 xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf8) === 0xf0) {\n extraLength = 3;\n overlongMask = 0xffff;\n }\n else {\n if ((c & 0xc0) === 0x80) {\n i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result);\n }\n else {\n i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result);\n }\n continue;\n }\n // Do we have enough bytes in our data?\n if (i - 1 + extraLength >= bytes.length) {\n i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result);\n continue;\n }\n // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\n // Invalid continuation byte\n if ((nextChar & 0xc0) != 0x80) {\n i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result);\n res = null;\n break;\n }\n ;\n res = (res << 6) | (nextChar & 0x3f);\n i++;\n }\n // See above loop for invalid continuation byte\n if (res === null) {\n continue;\n }\n // Maximum code point\n if (res > 0x10ffff) {\n i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Reserved for UTF-16 surrogate halves\n if (res >= 0xd800 && res <= 0xdfff) {\n i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Check for overlong sequences (more bytes than needed)\n if (res <= overlongMask) {\n i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n}\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\nexport function toUtf8Bytes(str, form = UnicodeNormalizationForm.current) {\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\n if (c < 0x80) {\n result.push(c);\n }\n else if (c < 0x800) {\n result.push((c >> 6) | 0xc0);\n result.push((c & 0x3f) | 0x80);\n }\n else if ((c & 0xfc00) == 0xd800) {\n i++;\n const c2 = str.charCodeAt(i);\n if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) {\n throw new Error(\"invalid utf-8 string\");\n }\n // Surrogate Pair\n const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n result.push((pair >> 18) | 0xf0);\n result.push(((pair >> 12) & 0x3f) | 0x80);\n result.push(((pair >> 6) & 0x3f) | 0x80);\n result.push((pair & 0x3f) | 0x80);\n }\n else {\n result.push((c >> 12) | 0xe0);\n result.push(((c >> 6) & 0x3f) | 0x80);\n result.push((c & 0x3f) | 0x80);\n }\n }\n return arrayify(result);\n}\n;\nfunction escapeChar(value) {\n const hex = (\"0000\" + value.toString(16));\n return \"\\\\u\" + hex.substring(hex.length - 4);\n}\nexport function _toEscapedUtf8String(bytes, onError) {\n return '\"' + getUtf8CodePoints(bytes, onError).map((codePoint) => {\n if (codePoint < 256) {\n switch (codePoint) {\n case 8: return \"\\\\b\";\n case 9: return \"\\\\t\";\n case 10: return \"\\\\n\";\n case 13: return \"\\\\r\";\n case 34: return \"\\\\\\\"\";\n case 92: return \"\\\\\\\\\";\n }\n if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n if (codePoint <= 0xffff) {\n return escapeChar(codePoint);\n }\n codePoint -= 0x10000;\n return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00);\n }).join(\"\") + '\"';\n}\nexport function _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00));\n }).join(\"\");\n}\nexport function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\nexport function toUtf8CodePoints(str, form = UnicodeNormalizationForm.current) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n//# sourceMappingURL=utf8.js.map","\"use strict\";\nimport { HashZero } from \"@ethersproject/constants\";\nimport { arrayify, concat, hexlify } from \"@ethersproject/bytes\";\nimport { toUtf8Bytes, toUtf8String } from \"./utf8\";\nexport function formatBytes32String(text) {\n // Get the bytes\n const bytes = toUtf8Bytes(text);\n // Check we have room for null-termination\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n // Zero-pad (implicitly null-terminates)\n return hexlify(concat([bytes, HashZero]).slice(0, 32));\n}\nexport function parseBytes32String(bytes) {\n const data = arrayify(bytes);\n // Must be 32 bytes with a null-termination\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n // Find the null termination\n let length = 31;\n while (data[length - 1] === 0) {\n length--;\n }\n // Determine the string value\n return toUtf8String(data.slice(0, length));\n}\n//# sourceMappingURL=bytes32.js.map","/**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var INPUT_ERROR = 'input is invalid type';\n var FINALIZE_ERROR = 'finalize already called';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,\n 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,\n 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,\n 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,\n 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest'];\n var CSHAKE_BYTEPAD = {\n '128': 168,\n '256': 136\n };\n\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (bits, padding, outputType) {\n return function (message) {\n return new Keccak(bits, padding, bits).update(message)[outputType]();\n };\n };\n\n var createShakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits) {\n return new Keccak(bits, padding, outputBits).update(message)[outputType]();\n };\n };\n\n var createCshakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits, n, s) {\n return methods['cshake' + bits].update(message, outputBits, n, s)[outputType]();\n };\n };\n\n var createKmacOutputMethod = function (bits, padding, outputType) {\n return function (key, message, outputBits, s) {\n return methods['kmac' + bits].update(key, message, outputBits, s)[outputType]();\n };\n };\n\n var createOutputMethods = function (method, createMethod, bits, padding) {\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createMethod(bits, padding, type);\n }\n return method;\n };\n\n var createMethod = function (bits, padding) {\n var method = createOutputMethod(bits, padding, 'hex');\n method.create = function () {\n return new Keccak(bits, padding, bits);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits, padding);\n };\n\n var createShakeMethod = function (bits, padding) {\n var method = createShakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits) {\n return new Keccak(bits, padding, outputBits);\n };\n method.update = function (message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits, padding);\n };\n\n var createCshakeMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createCshakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits, n, s) {\n if (!n && !s) {\n return methods['shake' + bits].create(outputBits);\n } else {\n return new Keccak(bits, padding, outputBits).bytepad([n, s], w);\n }\n };\n method.update = function (message, outputBits, n, s) {\n return method.create(outputBits, n, s).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits, padding);\n };\n\n var createKmacMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createKmacOutputMethod(bits, padding, 'hex');\n method.create = function (key, outputBits, s) {\n return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w);\n };\n method.update = function (key, message, outputBits, s) {\n return method.create(key, outputBits, s).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits, padding);\n };\n\n var algorithms = [\n { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod },\n { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod },\n { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n\n var methods = {}, methodNames = [];\n\n for (var i = 0; i < algorithms.length; ++i) {\n var algorithm = algorithms[i];\n var bits = algorithm.bits;\n for (var j = 0; j < bits.length; ++j) {\n var methodName = algorithm.name + '_' + bits[j];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding);\n if (algorithm.name !== 'sha3') {\n var newMethodName = algorithm.name + bits[j];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n\n function Keccak(bits, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = (1600 - (bits << 1)) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n\n for (var i = 0; i < 50; ++i) {\n this.s[i] = 0;\n }\n }\n\n Keccak.prototype.update = function (message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var blocks = this.blocks, byteCount = this.byteCount, length = message.length,\n blockCount = this.blockCount, index = 0, s = this.s, i, code;\n\n while (index < length) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n if (notString) {\n for (i = this.start; index < length && i < byteCount; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < byteCount; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n this.lastByteIndex = i;\n if (i >= byteCount) {\n this.start = i - byteCount;\n this.block = blocks[blockCount];\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n this.reset = true;\n } else {\n this.start = i;\n }\n }\n return this;\n };\n\n Keccak.prototype.encode = function (x, right) {\n var o = x & 255, n = 1;\n var bytes = [o];\n x = x >> 8;\n o = x & 255;\n while (o > 0) {\n bytes.unshift(o);\n x = x >> 8;\n o = x & 255;\n ++n;\n }\n if (right) {\n bytes.push(n);\n } else {\n bytes.unshift(n);\n }\n this.update(bytes);\n return bytes.length;\n };\n\n Keccak.prototype.encodeString = function (str) {\n var notString, type = typeof str;\n if (type !== 'string') {\n if (type === 'object') {\n if (str === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {\n str = new Uint8Array(str);\n } else if (!Array.isArray(str)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var bytes = 0, length = str.length;\n if (notString) {\n bytes = length;\n } else {\n for (var i = 0; i < str.length; ++i) {\n var code = str.charCodeAt(i);\n if (code < 0x80) {\n bytes += 1;\n } else if (code < 0x800) {\n bytes += 2;\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes += 3;\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));\n bytes += 4;\n }\n }\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n\n Keccak.prototype.bytepad = function (strs, w) {\n var bytes = this.encode(w);\n for (var i = 0; i < strs.length; ++i) {\n bytes += this.encodeString(strs[i]);\n }\n var paddingBytes = w - bytes % w;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n\n Keccak.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;\n blocks[i >> 2] |= this.padding[i & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n blocks[blockCount - 1] |= 0x80000000;\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n };\n\n Keccak.prototype.toString = Keccak.prototype.hex = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var hex = '', block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] +\n HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] +\n HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] +\n HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F];\n }\n if (j % blockCount === 0) {\n f(s);\n i = 0;\n }\n }\n if (extraBytes) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F];\n if (extraBytes > 1) {\n hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F];\n }\n }\n return hex;\n };\n\n Keccak.prototype.arrayBuffer = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var bytes = this.outputBits >> 3;\n var buffer;\n if (extraBytes) {\n buffer = new ArrayBuffer((outputBlocks + 1) << 2);\n } else {\n buffer = new ArrayBuffer(bytes);\n }\n var array = new Uint32Array(buffer);\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n array[j] = s[i];\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n array[i] = s[i];\n buffer = buffer.slice(0, bytes);\n }\n return buffer;\n };\n\n Keccak.prototype.buffer = Keccak.prototype.arrayBuffer;\n\n Keccak.prototype.digest = Keccak.prototype.array = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var array = [], offset, block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n array[offset + 1] = (block >> 8) & 0xFF;\n array[offset + 2] = (block >> 16) & 0xFF;\n array[offset + 3] = (block >> 24) & 0xFF;\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n if (extraBytes > 1) {\n array[offset + 1] = (block >> 8) & 0xFF;\n }\n if (extraBytes > 2) {\n array[offset + 2] = (block >> 16) & 0xFF;\n }\n }\n return array;\n };\n\n function Kmac(bits, padding, outputBits) {\n Keccak.call(this, bits, padding, outputBits);\n }\n\n Kmac.prototype = new Keccak();\n\n Kmac.prototype.finalize = function () {\n this.encode(this.outputBits, true);\n return Keccak.prototype.finalize.call(this);\n };\n\n var f = function (s) {\n var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9,\n b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17,\n b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33,\n b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n = 0; n < 48; n += 2) {\n c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40];\n c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41];\n c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42];\n c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43];\n c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44];\n c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45];\n c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46];\n c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47];\n c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48];\n c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49];\n\n h = c8 ^ ((c2 << 1) | (c3 >>> 31));\n l = c9 ^ ((c3 << 1) | (c2 >>> 31));\n s[0] ^= h;\n s[1] ^= l;\n s[10] ^= h;\n s[11] ^= l;\n s[20] ^= h;\n s[21] ^= l;\n s[30] ^= h;\n s[31] ^= l;\n s[40] ^= h;\n s[41] ^= l;\n h = c0 ^ ((c4 << 1) | (c5 >>> 31));\n l = c1 ^ ((c5 << 1) | (c4 >>> 31));\n s[2] ^= h;\n s[3] ^= l;\n s[12] ^= h;\n s[13] ^= l;\n s[22] ^= h;\n s[23] ^= l;\n s[32] ^= h;\n s[33] ^= l;\n s[42] ^= h;\n s[43] ^= l;\n h = c2 ^ ((c6 << 1) | (c7 >>> 31));\n l = c3 ^ ((c7 << 1) | (c6 >>> 31));\n s[4] ^= h;\n s[5] ^= l;\n s[14] ^= h;\n s[15] ^= l;\n s[24] ^= h;\n s[25] ^= l;\n s[34] ^= h;\n s[35] ^= l;\n s[44] ^= h;\n s[45] ^= l;\n h = c4 ^ ((c8 << 1) | (c9 >>> 31));\n l = c5 ^ ((c9 << 1) | (c8 >>> 31));\n s[6] ^= h;\n s[7] ^= l;\n s[16] ^= h;\n s[17] ^= l;\n s[26] ^= h;\n s[27] ^= l;\n s[36] ^= h;\n s[37] ^= l;\n s[46] ^= h;\n s[47] ^= l;\n h = c6 ^ ((c0 << 1) | (c1 >>> 31));\n l = c7 ^ ((c1 << 1) | (c0 >>> 31));\n s[8] ^= h;\n s[9] ^= l;\n s[18] ^= h;\n s[19] ^= l;\n s[28] ^= h;\n s[29] ^= l;\n s[38] ^= h;\n s[39] ^= l;\n s[48] ^= h;\n s[49] ^= l;\n\n b0 = s[0];\n b1 = s[1];\n b32 = (s[11] << 4) | (s[10] >>> 28);\n b33 = (s[10] << 4) | (s[11] >>> 28);\n b14 = (s[20] << 3) | (s[21] >>> 29);\n b15 = (s[21] << 3) | (s[20] >>> 29);\n b46 = (s[31] << 9) | (s[30] >>> 23);\n b47 = (s[30] << 9) | (s[31] >>> 23);\n b28 = (s[40] << 18) | (s[41] >>> 14);\n b29 = (s[41] << 18) | (s[40] >>> 14);\n b20 = (s[2] << 1) | (s[3] >>> 31);\n b21 = (s[3] << 1) | (s[2] >>> 31);\n b2 = (s[13] << 12) | (s[12] >>> 20);\n b3 = (s[12] << 12) | (s[13] >>> 20);\n b34 = (s[22] << 10) | (s[23] >>> 22);\n b35 = (s[23] << 10) | (s[22] >>> 22);\n b16 = (s[33] << 13) | (s[32] >>> 19);\n b17 = (s[32] << 13) | (s[33] >>> 19);\n b48 = (s[42] << 2) | (s[43] >>> 30);\n b49 = (s[43] << 2) | (s[42] >>> 30);\n b40 = (s[5] << 30) | (s[4] >>> 2);\n b41 = (s[4] << 30) | (s[5] >>> 2);\n b22 = (s[14] << 6) | (s[15] >>> 26);\n b23 = (s[15] << 6) | (s[14] >>> 26);\n b4 = (s[25] << 11) | (s[24] >>> 21);\n b5 = (s[24] << 11) | (s[25] >>> 21);\n b36 = (s[34] << 15) | (s[35] >>> 17);\n b37 = (s[35] << 15) | (s[34] >>> 17);\n b18 = (s[45] << 29) | (s[44] >>> 3);\n b19 = (s[44] << 29) | (s[45] >>> 3);\n b10 = (s[6] << 28) | (s[7] >>> 4);\n b11 = (s[7] << 28) | (s[6] >>> 4);\n b42 = (s[17] << 23) | (s[16] >>> 9);\n b43 = (s[16] << 23) | (s[17] >>> 9);\n b24 = (s[26] << 25) | (s[27] >>> 7);\n b25 = (s[27] << 25) | (s[26] >>> 7);\n b6 = (s[36] << 21) | (s[37] >>> 11);\n b7 = (s[37] << 21) | (s[36] >>> 11);\n b38 = (s[47] << 24) | (s[46] >>> 8);\n b39 = (s[46] << 24) | (s[47] >>> 8);\n b30 = (s[8] << 27) | (s[9] >>> 5);\n b31 = (s[9] << 27) | (s[8] >>> 5);\n b12 = (s[18] << 20) | (s[19] >>> 12);\n b13 = (s[19] << 20) | (s[18] >>> 12);\n b44 = (s[29] << 7) | (s[28] >>> 25);\n b45 = (s[28] << 7) | (s[29] >>> 25);\n b26 = (s[38] << 8) | (s[39] >>> 24);\n b27 = (s[39] << 8) | (s[38] >>> 24);\n b8 = (s[48] << 14) | (s[49] >>> 18);\n b9 = (s[49] << 14) | (s[48] >>> 18);\n\n s[0] = b0 ^ (~b2 & b4);\n s[1] = b1 ^ (~b3 & b5);\n s[10] = b10 ^ (~b12 & b14);\n s[11] = b11 ^ (~b13 & b15);\n s[20] = b20 ^ (~b22 & b24);\n s[21] = b21 ^ (~b23 & b25);\n s[30] = b30 ^ (~b32 & b34);\n s[31] = b31 ^ (~b33 & b35);\n s[40] = b40 ^ (~b42 & b44);\n s[41] = b41 ^ (~b43 & b45);\n s[2] = b2 ^ (~b4 & b6);\n s[3] = b3 ^ (~b5 & b7);\n s[12] = b12 ^ (~b14 & b16);\n s[13] = b13 ^ (~b15 & b17);\n s[22] = b22 ^ (~b24 & b26);\n s[23] = b23 ^ (~b25 & b27);\n s[32] = b32 ^ (~b34 & b36);\n s[33] = b33 ^ (~b35 & b37);\n s[42] = b42 ^ (~b44 & b46);\n s[43] = b43 ^ (~b45 & b47);\n s[4] = b4 ^ (~b6 & b8);\n s[5] = b5 ^ (~b7 & b9);\n s[14] = b14 ^ (~b16 & b18);\n s[15] = b15 ^ (~b17 & b19);\n s[24] = b24 ^ (~b26 & b28);\n s[25] = b25 ^ (~b27 & b29);\n s[34] = b34 ^ (~b36 & b38);\n s[35] = b35 ^ (~b37 & b39);\n s[44] = b44 ^ (~b46 & b48);\n s[45] = b45 ^ (~b47 & b49);\n s[6] = b6 ^ (~b8 & b0);\n s[7] = b7 ^ (~b9 & b1);\n s[16] = b16 ^ (~b18 & b10);\n s[17] = b17 ^ (~b19 & b11);\n s[26] = b26 ^ (~b28 & b20);\n s[27] = b27 ^ (~b29 & b21);\n s[36] = b36 ^ (~b38 & b30);\n s[37] = b37 ^ (~b39 & b31);\n s[46] = b46 ^ (~b48 & b40);\n s[47] = b47 ^ (~b49 & b41);\n s[8] = b8 ^ (~b0 & b2);\n s[9] = b9 ^ (~b1 & b3);\n s[18] = b18 ^ (~b10 & b12);\n s[19] = b19 ^ (~b11 & b13);\n s[28] = b28 ^ (~b20 & b22);\n s[29] = b29 ^ (~b21 & b23);\n s[38] = b38 ^ (~b30 & b32);\n s[39] = b39 ^ (~b31 & b33);\n s[48] = b48 ^ (~b40 & b42);\n s[49] = b49 ^ (~b41 & b43);\n\n s[0] ^= RC[n];\n s[1] ^= RC[n + 1];\n }\n };\n\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i = 0; i < methodNames.length; ++i) {\n root[methodNames[i]] = methods[methodNames[i]];\n }\n if (AMD) {\n define(function () {\n return methods;\n });\n }\n }\n})();\n","export const version = \"solidity/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexlify, zeroPad } from \"@ethersproject/bytes\";\nimport { keccak256 as hashKeccak256 } from \"@ethersproject/keccak256\";\nimport { sha256 as hashSha256 } from \"@ethersproject/sha2\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nconst regexBytes = new RegExp(\"^bytes([0-9]+)$\");\nconst regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\nconst regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\nconst Zeros = \"0000000000000000000000000000000000000000000000000000000000000000\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nfunction _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return zeroPad(value, 32);\n }\n return arrayify(value);\n case \"string\":\n return toUtf8Bytes(value);\n case \"bytes\":\n return arrayify(value);\n case \"bool\":\n value = (value ? \"0x01\" : \"0x00\");\n if (isArray) {\n return zeroPad(value, 32);\n }\n return arrayify(value);\n }\n let match = type.match(regexNumber);\n if (match) {\n //let signed = (match[1] === \"int\")\n let size = parseInt(match[2] || \"256\");\n if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) {\n logger.throwArgumentError(\"invalid number type\", \"type\", type);\n }\n if (isArray) {\n size = 256;\n }\n value = BigNumber.from(value).toTwos(size);\n return zeroPad(value, size / 8);\n }\n match = type.match(regexBytes);\n if (match) {\n const size = parseInt(match[1]);\n if (String(size) !== match[1] || size === 0 || size > 32) {\n logger.throwArgumentError(\"invalid bytes type\", \"type\", type);\n }\n if (arrayify(value).byteLength !== size) {\n logger.throwArgumentError(`invalid value for ${type}`, \"value\", value);\n }\n if (isArray) {\n return arrayify((value + Zeros).substring(0, 66));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n if (count != value.length) {\n logger.throwArgumentError(`invalid array length for ${type}`, \"value\", value);\n }\n const result = [];\n value.forEach(function (value) {\n result.push(_pack(baseType, value, true));\n });\n return concat(result);\n }\n return logger.throwArgumentError(\"invalid type\", \"type\", type);\n}\n// @TODO: Array Enum\nexport function pack(types, values) {\n if (types.length != values.length) {\n logger.throwArgumentError(\"wrong number of values; expected ${ types.length }\", \"values\", values);\n }\n const tight = [];\n types.forEach(function (type, index) {\n tight.push(_pack(type, values[index]));\n });\n return hexlify(concat(tight));\n}\nexport function keccak256(types, values) {\n return hashKeccak256(pack(types, values));\n}\nexport function sha256(types, values) {\n return hashSha256(pack(types, values));\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nimport sha3 from \"js-sha3\";\nimport { arrayify } from \"@ethersproject/bytes\";\nexport function keccak256(data) {\n return '0x' + sha3.keccak_256(arrayify(data));\n}\n//# sourceMappingURL=index.js.map","import { formatBytes32String } from '@ethersproject/strings';\nimport { keccak256 } from '@ethersproject/solidity';\nimport { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { Provider } from '@ethersproject/providers';\nimport { GyroConfig, GyroConfig__factory, Multicall } from '@/contracts';\nimport { GyroConfigInterface } from '@/contracts/GyroConfig';\n\nexport interface GyroConfigRepository {\n getGyroProtocolFee(poolAddress: string): Promise;\n}\n\nconst protocolFeePercKey = formatBytes32String('PROTOCOL_SWAP_FEE_PERC');\nconst gyroPoolTypeKey = formatBytes32String('E-CLP');\nconst encodedPoolTypeKey = keccak256(\n ['bytes'],\n [\n defaultAbiCoder.encode(\n ['bytes32', 'bytes32'],\n [protocolFeePercKey, gyroPoolTypeKey]\n ),\n ]\n);\n\nexport class GyroConfigRepositoryImpl implements GyroConfigRepository {\n gyroConfigInterface: GyroConfigInterface;\n gyroConfig: GyroConfig;\n\n constructor(\n private gyroConfigAddress: string,\n private multicall: Multicall,\n provider: Provider\n ) {\n this.gyroConfigInterface = GyroConfig__factory.createInterface();\n this.gyroConfig = GyroConfig__factory.connect(gyroConfigAddress, provider);\n }\n\n async getGyroProtocolFee(poolAddress: string): Promise {\n let fee;\n const encodedPoolSpecificKey = keccak256(\n ['bytes'],\n [\n defaultAbiCoder.encode(\n ['bytes32', 'uint256'],\n [protocolFeePercKey, poolAddress]\n ),\n ]\n );\n const payload = [\n {\n target: this.gyroConfigAddress,\n callData: this.gyroConfigInterface.encodeFunctionData('hasKey', [\n encodedPoolSpecificKey,\n ]),\n },\n {\n target: this.gyroConfigAddress,\n callData: this.gyroConfigInterface.encodeFunctionData('hasKey', [\n encodedPoolTypeKey,\n ]),\n },\n {\n target: this.gyroConfigAddress,\n callData: this.gyroConfigInterface.encodeFunctionData('hasKey', [\n protocolFeePercKey,\n ]),\n },\n ];\n const [, [hasSpecificKeyHex, hasPoolTypeKeyHex, hasDefaultKeyHex]] =\n await this.multicall.callStatic.aggregate(payload);\n const hasSpecificKey = BigNumber.from(hasSpecificKeyHex).eq(1);\n const hasPoolTypeKey = BigNumber.from(hasPoolTypeKeyHex).eq(1);\n const hasDefaultKey = BigNumber.from(hasDefaultKeyHex).eq(1);\n if (hasSpecificKey) {\n fee = parseFloat(\n formatFixed(await this.gyroConfig.getUint(encodedPoolSpecificKey), 18)\n );\n } else if (hasPoolTypeKey) {\n fee = parseFloat(\n formatFixed(await this.gyroConfig.getUint(encodedPoolTypeKey), 18)\n );\n } else if (hasDefaultKey) {\n fee = parseFloat(\n formatFixed(await this.gyroConfig.getUint(protocolFeePercKey), 18)\n );\n } else {\n fee = 0;\n }\n return fee;\n }\n}\n","import { Interface } from '@ethersproject/abi';\nimport { getAddress } from '@ethersproject/address';\nimport { formatUnits } from '@ethersproject/units';\nimport { Multicall } from '@/contracts';\n\nconst gaugeControllerInterface = new Interface([\n 'function gauge_relative_weight(address gauge, uint timestamp) view returns (uint)',\n]);\n\nconst gaugeControllerCheckpointerInterface = new Interface([\n 'function gauge_relative_weight(address gauge) view returns (uint)',\n]);\n\nexport class GaugeControllerMulticallRepository {\n constructor(\n private multicall: Multicall,\n private gaugeControllerAddress: string,\n private gaugeControllerCheckpointerAddress?: string\n ) {}\n\n async getRelativeWeights(\n gaugeAddresses: string[],\n timestamp?: number\n ): Promise<{ [gaugeAddress: string]: number }> {\n const payload = gaugeAddresses.map((gaugeAddress) => {\n // The checkpointer only exists for mainnet, if the network is a testnet, it'll use the regular gauge controller\n if (this.gaugeControllerCheckpointerAddress && !timestamp) {\n return {\n target: this.gaugeControllerCheckpointerAddress,\n callData: gaugeControllerCheckpointerInterface.encodeFunctionData(\n 'gauge_relative_weight',\n [getAddress(gaugeAddress)]\n ),\n };\n }\n return {\n target: this.gaugeControllerAddress,\n callData: gaugeControllerInterface.encodeFunctionData(\n 'gauge_relative_weight',\n [getAddress(gaugeAddress), timestamp || Math.floor(Date.now() / 1000)]\n ),\n };\n });\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const weights = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseFloat(formatUnits(res[i], 18));\n return p;\n },\n {}\n );\n\n return weights;\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { Findable } from '@/types';\n\nexport abstract class AbstractSubgraphRepository\n implements Findable\n{\n protected abstract mapType(subgraphFragment: any): T;\n\n abstract query(args: any): Promise;\n\n async get(args: any): Promise {\n const result = await this.query(args);\n return result?.length > 0 ? result[0] : undefined;\n }\n\n async find(id: string): Promise {\n return this.get({ where: { id: id } });\n }\n\n async findBy(attribute: A, value: string): Promise {\n return this.get({ where: { [String(attribute)]: value } });\n }\n\n async findAllBy(\n attribute: A,\n value: string,\n first = 1000,\n skip = 0\n ): Promise {\n const args = {\n where: { [String(attribute)]: value },\n first: first,\n skip: skip,\n };\n return this.query(args);\n }\n}\n","import { Network } from '@/lib/constants/network';\nimport { AbstractSubgraphRepository } from './abstract-subgraph-repository';\nimport { createSubgraphClient, SubgraphClient } from '../subgraph';\n\nexport abstract class BalancerSubgraphRepository<\n T,\n A\n> extends AbstractSubgraphRepository {\n protected client: SubgraphClient;\n\n constructor(\n url: string,\n protected chainId: Network,\n protected blockHeight?: () => Promise\n ) {\n super();\n this.client = createSubgraphClient(url);\n }\n}\n","import { Network } from '@/lib/constants/network';\nimport { AbstractSubgraphRepository } from './abstract-subgraph-repository';\nimport { createGaugesClient, GaugesClient } from '../subgraph';\n\nexport abstract class GaugesSubgraphRepository<\n T,\n A\n> extends AbstractSubgraphRepository {\n protected client: GaugesClient;\n\n constructor(\n url: string,\n protected chainId: Network,\n protected blockHeight?: () => Promise\n ) {\n super();\n this.client = createGaugesClient(url);\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { GaugeShare, GaugeShareAttributes } from './types';\nimport { GaugesSubgraphRepository } from '@/modules/subgraph/repository';\nimport {\n SubgraphGaugeShareFragment,\n GaugeShare_OrderBy,\n OrderDirection,\n} from '@/modules/subgraph/generated/balancer-gauges';\n\nexport class GaugeSharesRepository extends GaugesSubgraphRepository<\n GaugeShare,\n GaugeShareAttributes\n> {\n async query(args: any): Promise {\n if (!args.orderBy) args.orderBy = GaugeShare_OrderBy.balance;\n if (!args.orderDirection) args.orderDirection = OrderDirection.desc;\n if (!args.block && this.blockHeight)\n args.block = { number: await this.blockHeight() };\n\n const { gaugeShares } = await this.client.GaugeShares(args);\n return gaugeShares.map(this.mapType);\n }\n\n mapType(subgraphGaugeShare: SubgraphGaugeShareFragment): GaugeShare {\n return {\n id: subgraphGaugeShare.id,\n balance: subgraphGaugeShare.balance,\n userAddress: subgraphGaugeShare.user?.id,\n gauge: {\n id: subgraphGaugeShare.gauge.id,\n poolId: subgraphGaugeShare.gauge.poolId || undefined,\n isKilled: subgraphGaugeShare.gauge.isKilled,\n totalSupply: subgraphGaugeShare.gauge.totalSupply,\n },\n };\n }\n\n async findByUser(\n userAddress: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(\n GaugeShareAttributes.UserAddress,\n userAddress,\n first,\n skip\n );\n }\n\n async findByGauge(\n gaugeId: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(GaugeShareAttributes.GaugeId, gaugeId, first, skip);\n }\n}\n","import { Multicall } from '@/contracts';\nimport { Interface } from '@ethersproject/abi';\nimport { formatUnits } from '@ethersproject/units';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport type { Network } from '@/types';\n\nconst liquidityGaugeV5Interface = new Interface([\n 'function totalSupply() view returns (uint)',\n 'function working_supply() view returns (uint)',\n 'function reward_count() view returns (uint)',\n 'function reward_tokens(uint rewardIndex) view returns (address)',\n 'function reward_data(address rewardToken) view returns (tuple(address token, address distributor, uint period_finish, uint rate, uint last_update, uint integral) data)',\n]);\n\nconst childLiquidityGaugeInterface = new Interface([\n 'function inflation_rate(uint currentWeekTimestamp) view returns (uint)',\n]);\n\nexport interface RewardData {\n token: string; // Always 0x0\n distributor: string;\n period_finish: BigNumber;\n rate: BigNumber; // per second\n last_update: BigNumber;\n integral: BigNumber; // sum accrued to date\n decimals?: number; // Provided by subgraph\n}\n\n/**\n * A lot of code to get liquidity gauge state via RPC multicall.\n * TODO: reseach helper contracts or extend subgraph\n */\nexport class LiquidityGaugesMulticallRepository {\n constructor(private multicall: Multicall, private chainId: Network) {}\n\n async getTotalSupplies(\n gaugeAddresses: string[]\n ): Promise<{ [gaugeAddress: string]: number }> {\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData('totalSupply', []),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n // Handle 0x\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n\n const totalSupplies = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseFloat(formatUnits(res0x[i], 18));\n return p;\n },\n {}\n );\n\n return totalSupplies;\n }\n\n async getWorkingSupplies(\n gaugeAddresses: string[]\n ): Promise<{ [gaugeAddress: string]: number }> {\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'working_supply',\n []\n ),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n // Handle 0x\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n\n const workingSupplies = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseFloat(formatUnits(res0x[i], 18));\n return p;\n },\n {}\n );\n\n return workingSupplies;\n }\n\n async getInflationRates(\n gaugeAddresses: string[]\n ): Promise<{ [gaugeAddress: string]: number }> {\n const currentWeek = Math.floor(Date.now() / 1000 / 604800);\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: childLiquidityGaugeInterface.encodeFunctionData(\n 'inflation_rate',\n [currentWeek]\n ),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n // Handle 0x\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n\n const inflationRates = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseFloat(formatUnits(res0x[i], 18));\n return p;\n },\n {}\n );\n\n return inflationRates;\n }\n\n async getRewardCounts(\n gaugeAddresses: string[]\n ): Promise<{ [gaugeAddress: string]: number }> {\n let rewardCounts;\n if (this.chainId == 1) {\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'reward_count',\n []\n ),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n // Handle 0x return values\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n\n rewardCounts = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseInt(res0x[i]);\n return p;\n },\n {}\n );\n } else {\n rewardCounts = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a) => {\n p[a] ||= 1;\n return p;\n },\n {}\n );\n }\n\n return rewardCounts;\n }\n\n async getRewardTokens(\n gaugeAddresses: string[],\n passingRewardCounts?: { [gaugeAddress: string]: number }\n ): Promise<{ [gaugeAddress: string]: string[] }> {\n const rewardCounts =\n passingRewardCounts || (await this.getRewardCounts(gaugeAddresses));\n const gaugesWithRewards = gaugeAddresses.filter(\n (gaugeAddress) => rewardCounts[gaugeAddress] > 0\n );\n const startIndexes = [0];\n const payload = gaugesWithRewards\n .map((gaugeAddress, gaugeIndex) => {\n const calls = [];\n for (let i = 0; i < rewardCounts[gaugeAddress]; i++) {\n calls.push({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'reward_tokens',\n [i]\n ),\n });\n }\n startIndexes[gaugeIndex + 1] =\n startIndexes[gaugeIndex] + rewardCounts[gaugeAddress];\n return calls;\n })\n .flat();\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const rewardTokens = gaugesWithRewards.reduce(\n (p: { [key: string]: string[] }, a, i) => {\n const start = startIndexes[i];\n const end = startIndexes[i + 1];\n const tokens: string[] = [];\n for (let i = start; i < end; i++) {\n tokens.push(\n liquidityGaugeV5Interface.decodeFunctionResult(\n 'reward_tokens',\n res[i]\n )[0]\n );\n }\n p[a] ||= tokens;\n return p;\n },\n {}\n );\n\n return rewardTokens;\n }\n\n async getRewardData(\n gaugeAddresses: string[],\n passingRewardTokens?: { [gaugeAddress: string]: string[] }\n ): Promise<{\n [gaugeAddress: string]: { [rewardTokenAddress: string]: RewardData };\n }> {\n const rewardTokens =\n passingRewardTokens || (await this.getRewardTokens(gaugeAddresses));\n\n const startIndexes = [0];\n const payload = Object.keys(rewardTokens)\n .map((gaugeAddress, gaugeIndex) => {\n const calls = [];\n for (let i = 0; i < rewardTokens[gaugeAddress].length; i++) {\n calls.push({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'reward_data',\n [rewardTokens[gaugeAddress][i]]\n ),\n });\n }\n startIndexes[gaugeIndex + 1] =\n startIndexes[gaugeIndex] + rewardTokens[gaugeAddress].length;\n return calls;\n })\n .flat();\n const [, res] = (await this.multicall.callStatic.aggregate(payload)) as [\n unknown,\n string[]\n ];\n const decoded = res.map(\n (r) => liquidityGaugeV5Interface.decodeFunctionResult('reward_data', r)[0]\n );\n\n const rewardData = Object.keys(rewardTokens).reduce(\n (p: { [key: string]: { [key: string]: RewardData } }, a, i) => {\n const start = startIndexes[i];\n const data = rewardTokens[a].reduce(\n (d: { [key: string]: RewardData }, t, x) => {\n d[t] ||= decoded[start + x] as RewardData;\n return d;\n },\n {}\n );\n p[a] ||= data;\n return p;\n },\n {}\n );\n\n return rewardData;\n }\n}\n","import { Findable } from '../types';\nimport {\n createGaugesClient,\n GaugesClient,\n SubgraphLiquidityGauge,\n} from '@/modules/subgraph/subgraph';\n\n/**\n * Access liquidity gauges indexed by subgraph.\n * Because we have ~100 gauges to save on repeated http calls we cache all results as `gauges` on an instance.\n * Balancer's subgraph URL: https://thegraph.com/hosted-service/subgraph/balancer-labs/balancer-gauges\n */\nexport class LiquidityGaugesSubgraphRepository\n implements Findable\n{\n private client: GaugesClient;\n public gauges: SubgraphLiquidityGauge[] = [];\n\n constructor(url: string) {\n this.client = createGaugesClient(url);\n }\n\n async fetch(): Promise {\n console.time('fetching liquidity gauges');\n const queryResult = await this.client.Pools({\n first: 1000,\n where: {\n preferentialGauge_not: null,\n },\n });\n const qauges = queryResult.pools.map((pool) => pool.preferentialGauge);\n // TODO: optionally convert subgraph type to sdk internal type\n this.gauges = qauges as SubgraphLiquidityGauge[];\n\n console.timeEnd('fetching liquidity gauges');\n return this.gauges;\n }\n\n async find(id: string): Promise {\n if (this.gauges.length == 0) {\n await this.fetch();\n }\n\n return this.gauges.find((gauge) => gauge.id == id);\n }\n\n async findBy(\n param: string,\n value: string\n ): Promise {\n if (this.gauges.length == 0) {\n await this.fetch();\n }\n\n if (param == 'id') {\n return this.find(value);\n } else if (param == 'poolId') {\n return this.gauges.find((gauge) => gauge.poolId == value);\n } else if (param == 'poolAddress') {\n return this.gauges.find((gauge) => gauge.poolAddress == value);\n } else {\n throw `search by ${param} not implemented`;\n }\n }\n}\n","import { GaugeControllerMulticallRepository } from '../gauge-controller/multicall';\nimport { LiquidityGaugesMulticallRepository, RewardData } from './multicall';\nimport { LiquidityGaugesSubgraphRepository } from './subgraph';\nimport { parseUnits } from '@ethersproject/units';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport type {\n Maybe,\n SubgraphLiquidityGauge,\n} from '@/modules/subgraph/subgraph';\nimport type { Findable } from '../types';\nimport type { Network } from '@/types';\nimport { Multicall } from '@/contracts';\n\nexport interface LiquidityGauge {\n id: string;\n address: string;\n name: string;\n poolId?: Maybe;\n poolAddress: string;\n totalSupply: number;\n workingSupply: number;\n relativeWeight: number;\n rewardTokens?: { [tokenAddress: string]: RewardData };\n claimableTokens?: { [tokenAddress: string]: BigNumber };\n balInflationRate?: number;\n}\n\nexport class LiquidityGaugeSubgraphRPCProvider\n implements Findable\n{\n gaugeController?: GaugeControllerMulticallRepository;\n multicall: LiquidityGaugesMulticallRepository;\n subgraph: LiquidityGaugesSubgraphRepository;\n workingSupplies: { [gaugeAddress: string]: number } = {};\n relativeWeights: { [gaugeAddress: string]: number } = {};\n inflationRates: { [gaugeAddress: string]: number } = {};\n rewardData: {\n [gaugeAddress: string]: { [tokenAddress: string]: RewardData };\n } = {};\n gauges?: Promise;\n\n constructor(\n subgraphUrl: string,\n multicall: Multicall,\n gaugeControllerAddress: string,\n private chainId: Network,\n gaugeControllerCheckpointerAddress?: string\n ) {\n if (gaugeControllerAddress) {\n this.gaugeController = new GaugeControllerMulticallRepository(\n multicall,\n gaugeControllerAddress,\n gaugeControllerCheckpointerAddress\n );\n }\n this.multicall = new LiquidityGaugesMulticallRepository(multicall, chainId);\n this.subgraph = new LiquidityGaugesSubgraphRepository(subgraphUrl);\n }\n\n async fetch(): Promise {\n const gauges: SubgraphLiquidityGauge[] = await this.subgraph.fetch();\n const gaugeAddresses = gauges.map((g) => g.id);\n if (this.chainId == 1) {\n console.time('Fetching multicall.getWorkingSupplies');\n this.workingSupplies = await this.multicall.getWorkingSupplies(\n gaugeAddresses\n );\n console.timeEnd('Fetching multicall.getWorkingSupplies');\n } else {\n // Filter out gauges that are not from the factory supporting inflation rate\n // Safe to remove this once all gauges are migrated to the new factory\n const oldFactories = [\n '0x3b8ca519122cdd8efb272b0d3085453404b25bd0', // Polygon\n '0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2', // Arbitrum\n '0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647', // Optimism\n '0x809b79b53f18e9bc08a961ed4678b901ac93213a', // Gnosis\n ];\n\n const childGaugeAddresses = gauges\n .filter((g) => !oldFactories.includes(g.factory.id.toLowerCase()))\n .map((g) => g.id);\n\n if (childGaugeAddresses.length > 0) {\n console.time('Fetching multicall.inflationRates');\n this.inflationRates = await this.multicall.getInflationRates(\n childGaugeAddresses\n );\n console.timeEnd('Fetching multicall.inflationRates');\n console.time('Fetching multicall.getWorkingSupplies');\n this.workingSupplies = await this.multicall.getWorkingSupplies(\n childGaugeAddresses\n );\n console.timeEnd('Fetching multicall.getWorkingSupplies');\n }\n }\n if (this.gaugeController) {\n console.time('Fetching gaugeController.getRelativeWeights');\n this.relativeWeights = await this.gaugeController.getRelativeWeights(\n gaugeAddresses\n );\n console.timeEnd('Fetching gaugeController.getRelativeWeights');\n }\n\n // Kept as a potential fallback for getting rewardData from RPC\n // this.rewardData = await this.multicall.getRewardData(\n // gaugeAddresses //,\n // // rewardTokens\n // );\n\n // Reward data was made available from subgraph, keeping it separate for potential RPC fallback\n this.rewardData = gauges.reduce(\n (r: { [key: string]: { [key: string]: RewardData } }, g) => {\n r[g.id] ||= g.tokens\n ? Object.fromEntries(\n g.tokens.map((t) => [\n t.id.split('-')[0],\n {\n distributor: '',\n last_update: BigNumber.from(0),\n integral: BigNumber.from(0),\n token: t.id.split('-')[0],\n decimals: t.decimals,\n rate: parseUnits(t.rate || '0', t.decimals),\n period_finish: BigNumber.from(\n (t.periodFinish as unknown as string) || '0'\n ),\n },\n ])\n )\n : {};\n\n return r;\n },\n {}\n );\n\n return gauges.map(this.compose.bind(this));\n }\n\n async find(id: string): Promise {\n if (!this.gauges) {\n this.gauges = this.fetch();\n }\n\n return (await this.gauges).find((g) => g.id == id);\n }\n\n async findBy(\n attribute: string,\n value: string\n ): Promise {\n if (!this.gauges) {\n this.gauges = this.fetch();\n }\n\n let gauge: LiquidityGauge | undefined;\n if (attribute == 'id') {\n return this.find(value);\n } else if (attribute == 'address') {\n return this.find(value);\n } else if (attribute == 'poolId') {\n gauge = (await this.gauges).find((g) => g.poolId == value);\n } else if (attribute == 'poolAddress') {\n gauge = (await this.gauges).find((g) => g.poolAddress == value);\n } else {\n throw `search by ${attribute} not implemented`;\n }\n\n return gauge;\n }\n\n private compose(subgraphGauge: SubgraphLiquidityGauge) {\n return {\n id: subgraphGauge.id,\n address: subgraphGauge.id,\n name: subgraphGauge.symbol,\n poolId: subgraphGauge.poolId,\n poolAddress: subgraphGauge.poolAddress,\n totalSupply: parseFloat(subgraphGauge.totalSupply),\n workingSupply: this.workingSupplies[subgraphGauge.id],\n relativeWeight: this.relativeWeights[subgraphGauge.id],\n rewardTokens: this.rewardData[subgraphGauge.id],\n balInflationRate: this.inflationRates[subgraphGauge.id],\n };\n }\n}\n","import axios from 'axios';\nimport { jsonToGraphQLQuery } from 'json-to-graphql-query';\n\nexport default class BalancerAPIClient {\n constructor(private readonly url: string, private readonly apiKey: string) {}\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public async get(query: unknown): Promise {\n try {\n const payload = this.toPayload(query);\n const { data } = await axios.post(this.url, payload, {\n headers: {\n 'x-api-key': this.apiKey,\n },\n });\n if (data.errors) {\n throw new Error(\n data.errors.map((error: Error) => error.message).join(',')\n );\n }\n return data.data;\n } catch (error) {\n console.error(error);\n throw error;\n }\n\n return [];\n }\n\n public toPayload(query: unknown): unknown {\n return JSON.stringify({ query: jsonToGraphQLQuery({ query }) });\n }\n}\n","import { Findable } from '../types';\nimport { PoolAttribute, PoolsRepositoryFetchOptions } from './types';\nimport { GraphQLQuery, Pool } from '@/types';\nimport BalancerAPIClient from '@/modules/api/balancer-api.client';\nimport {\n GraphQLArgsBuilder,\n BalancerAPIArgsFormatter,\n} from '@/lib/graphql/args-builder';\nimport { GraphQLArgs } from '@/lib/graphql/types';\n\ninterface PoolsBalancerAPIOptions {\n url: string;\n apiKey: string;\n query?: GraphQLQuery;\n}\n\nconst MAX_POOLS_PER_REQUEST = 1000;\nconst DEFAULT_SKIP = 0;\nconst DEFAULT_FIRST = 10;\nconst CHECK_TIMEOUT_SECONDS = 10;\nconst CHECK_INTERVAL_MS = 10;\nconst MAX_CHECKS = (CHECK_TIMEOUT_SECONDS * 1000) / CHECK_INTERVAL_MS;\n\nfunction timeout(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Access pools using the Balancer GraphQL Api.\n *\n * Balancer's API URL: https://api.balancer.fi/query/\n */\nexport class PoolsBalancerAPIRepository\n implements Findable\n{\n private client: BalancerAPIClient;\n public pools: Pool[] = [];\n public skip = 0; // Keep track of how many pools to skip on next fetch, so this functions similar to subgraph repository.\n public nextToken: string | undefined | null; // A token to pass to the next query to retrieve the next page of results. Undefined initially, null when there are no more results.\n private query: GraphQLQuery;\n private hasFetched = false;\n private isFetching = false;\n\n constructor(options: PoolsBalancerAPIOptions) {\n this.client = new BalancerAPIClient(options.url, options.apiKey);\n\n const defaultArgs: GraphQLArgs = {\n chainId: 1,\n orderBy: 'totalLiquidity',\n orderDirection: 'desc',\n where: {\n swapEnabled: {\n eq: true,\n },\n totalShares: {\n gt: 0.05,\n },\n },\n };\n\n const defaultAttributes = {\n id: true,\n address: true,\n };\n\n this.query = {\n args: Object.assign({}, options.query?.args || defaultArgs),\n attrs: Object.assign({}, options.query?.attrs || defaultAttributes),\n };\n\n // skip is not a valid argument for the Balancer API, it uses nextToken\n delete this.query.args.skip;\n }\n\n private fetchFromCache(first: number, skip: number): Pool[] {\n const pools = this.pools.slice(skip, first + skip);\n return pools;\n }\n\n async fetch(options?: PoolsRepositoryFetchOptions): Promise {\n const first = options?.first || DEFAULT_FIRST;\n const skip = options?.skip || DEFAULT_SKIP;\n\n if (!this.hasFetched) {\n this.fetchAll(options);\n }\n await this.awaitEnoughPoolsFetched(first, skip);\n return this.fetchFromCache(first, skip);\n }\n\n // Fetches all pools from the API in a loop and saves them to the cache.\n async fetchAll(options?: PoolsRepositoryFetchOptions): Promise {\n this.isFetching = true;\n this.hasFetched = true;\n\n if (this.nextToken) {\n this.query.args.nextToken = this.nextToken;\n }\n\n this.query.args.first = MAX_POOLS_PER_REQUEST;\n const formattedArgs = new GraphQLArgsBuilder(this.query.args).format(\n new BalancerAPIArgsFormatter()\n );\n\n const attrs = this.query.attrs;\n attrs.nextToken = true;\n\n const formattedQuery = {\n pools: {\n __args: formattedArgs,\n ...attrs,\n },\n };\n\n const apiResponse = await this.client.get(formattedQuery);\n const apiResponseData = apiResponse.pools;\n\n this.nextToken = apiResponseData.nextToken;\n this.pools = this.pools.concat(apiResponseData.pools.map(this.format));\n\n if (this.nextToken) return await this.fetchAll(options);\n\n this.isFetching = false;\n }\n\n // A function that waits until enough pools have been loaded into the cache\n // or fetching has finished. Used so that all pools can be fetched in the\n // background, while fetch returns the first results to the user quickly.\n async awaitEnoughPoolsFetched(first: number, skip: number): Promise {\n for (let totalChecks = 0; totalChecks < MAX_CHECKS; totalChecks++) {\n if (this.pools.length > first + skip) {\n return;\n }\n if (!this.isFetching) {\n return;\n }\n await timeout(CHECK_INTERVAL_MS);\n }\n\n return;\n }\n\n async find(id: string): Promise {\n if (this.pools.length == 0) {\n await this.fetch();\n }\n\n return this.findBy('id', id);\n }\n\n async findBy(param: PoolAttribute, value: string): Promise {\n if (this.pools.length == 0) {\n await this.fetch();\n }\n\n const pool = this.pools.find((pool) => pool[param] == value);\n if (pool) {\n return this.format(pool);\n }\n }\n\n /** Fixes any formatting issues from the subgraph\n * - GraphQL can't store a map so pool.apr.[rewardAprs/tokenAprs].breakdown\n * is JSON data that needs to be parsed so they match the Pool type correctly.\n */\n private format(pool: Pool): Pool {\n if (pool.apr?.rewardAprs.breakdown) {\n // GraphQL can't store this as a map so it's JSON that we must parse\n const rewardsBreakdown = JSON.parse(\n pool.apr?.rewardAprs.breakdown as unknown as string\n );\n pool.apr.rewardAprs.breakdown = rewardsBreakdown;\n }\n if (pool.apr?.tokenAprs.breakdown) {\n // GraphQL can't store this as a map so it's JSON that we must parse\n const tokenAprsBreakdown = JSON.parse(\n pool.apr?.tokenAprs.breakdown as unknown as string\n );\n pool.apr.tokenAprs.breakdown = tokenAprsBreakdown;\n }\n\n return pool;\n }\n}\n","import { Pool, PoolType, PoolToken, SubPool } from '@/.';\nimport {\n SubgraphPool,\n SubgraphPoolTokenFragment,\n SubgraphSubPoolFragment,\n SubgraphSubPoolTokenFragment,\n} from '@/modules/subgraph/subgraph';\n\ninterface SubgraphSubPoolToken extends SubgraphSubPoolTokenFragment {\n token?: SubgraphSubPoolMeta | null;\n}\n\ninterface SubgraphSubPoolMeta {\n latestUSDPrice?: string | null;\n pool?: SubgraphSubPool | null;\n}\n\ninterface SubgraphSubPool extends SubgraphSubPoolFragment {\n tokens: SubgraphSubPoolToken[];\n}\n\nexport const mapType = (subgraphPool: SubgraphPool, chainId: number): Pool => {\n return {\n id: subgraphPool.id,\n name: subgraphPool.name || '',\n address: subgraphPool.address,\n chainId: chainId,\n poolType: subgraphPool.poolType as PoolType,\n poolTypeVersion: subgraphPool.poolTypeVersion || 1,\n swapFee: subgraphPool.swapFee,\n swapEnabled: subgraphPool.swapEnabled,\n protocolYieldFeeCache: subgraphPool.protocolYieldFeeCache || '0.5', // Default protocol yield fee\n protocolSwapFeeCache: subgraphPool.protocolSwapFeeCache || '0.5', // Default protocol swap fee\n amp: subgraphPool.amp ?? undefined,\n owner: subgraphPool.owner ?? undefined,\n factory: subgraphPool.factory ?? undefined,\n symbol: subgraphPool.symbol ?? undefined,\n tokens: (subgraphPool.tokens || []).map(mapToken),\n tokensList: subgraphPool.tokensList,\n tokenAddresses: (subgraphPool.tokens || []).map((t) => t.address),\n totalLiquidity: subgraphPool.totalLiquidity,\n totalShares: subgraphPool.totalShares,\n totalSwapFee: subgraphPool.totalSwapFee,\n totalSwapVolume: subgraphPool.totalSwapVolume,\n priceRateProviders: subgraphPool.priceRateProviders ?? undefined,\n // onchain: subgraphPool.onchain,\n createTime: subgraphPool.createTime,\n mainIndex: subgraphPool.mainIndex ?? undefined,\n wrappedIndex: subgraphPool.wrappedIndex ?? undefined,\n // mainTokens: subgraphPool.mainTokens,\n // wrappedTokens: subgraphPool.wrappedTokens,\n // unwrappedTokens: subgraphPool.unwrappedTokens,\n // isNew: subgraphPool.isNew,\n // volumeSnapshot: subgraphPool.volumeSnapshot,\n // feesSnapshot: subgraphPool.???, // Approximated last 24h fees\n // boost: subgraphPool.boost,\n totalWeight: subgraphPool.totalWeight || '1',\n lowerTarget: subgraphPool.lowerTarget ?? '0',\n upperTarget: subgraphPool.upperTarget ?? '0',\n isInRecoveryMode: subgraphPool.isInRecoveryMode ?? false,\n isPaused: subgraphPool.isPaused ?? false,\n };\n};\n\nconst mapToken = (subgraphToken: SubgraphPoolTokenFragment): PoolToken => {\n const subPoolInfo = mapSubPools(\n // need to typecast as the fragment is 3 layers deep while the type is infinite levels deep\n subgraphToken.token as SubgraphSubPoolMeta\n );\n return {\n ...subgraphToken,\n isExemptFromYieldProtocolFee:\n subgraphToken.isExemptFromYieldProtocolFee || false,\n token: subPoolInfo,\n };\n};\n\nconst mapSubPools = (metadata: SubgraphSubPoolMeta) => {\n let subPool: SubPool | null = null;\n\n if (metadata.pool) {\n subPool = {\n id: metadata.pool.id,\n address: metadata.pool.address,\n totalShares: metadata.pool.totalShares,\n poolType: metadata.pool.poolType as PoolType,\n mainIndex: metadata.pool.mainIndex || 0,\n };\n\n if (metadata?.pool.tokens) {\n subPool.tokens = metadata.pool.tokens.map(mapSubPoolToken);\n }\n }\n\n return {\n pool: subPool,\n latestUSDPrice: metadata.latestUSDPrice || undefined,\n };\n};\n\nconst mapSubPoolToken = (token: SubgraphSubPoolToken) => {\n return {\n address: token.address,\n decimals: token.decimals,\n symbol: token.symbol,\n balance: token.balance,\n priceRate: token.priceRate,\n weight: token.weight,\n isExemptFromYieldProtocolFee:\n token.isExemptFromYieldProtocolFee || undefined,\n token: token.token ? mapSubPools(token.token) : undefined,\n };\n};\n","import { Findable, Searchable } from '../types';\nimport {\n createSubgraphClient,\n SubgraphClient,\n Pool_OrderBy,\n OrderDirection,\n} from '@/modules/subgraph/subgraph';\nimport {\n GraphQLArgsBuilder,\n SubgraphArgsFormatter,\n} from '@/lib/graphql/args-builder';\nimport { GraphQLArgs } from '@/lib/graphql/types';\nimport { PoolAttribute, PoolsRepositoryFetchOptions } from './types';\nimport { GraphQLQuery, Pool } from '@/types';\nimport { Network } from '@/lib/constants/network';\nimport { PoolsQueryVariables } from '../../subgraph/subgraph';\nimport { mapType } from './subgraph-helpers';\nimport { Logger } from '@/lib/utils/logger';\n\ninterface PoolsSubgraphRepositoryOptions {\n url: string;\n chainId: Network;\n blockHeight?: () => Promise;\n query?: GraphQLQuery;\n}\n\n/**\n * Access pools using generated subgraph client.\n *\n * Balancer's subgraph URL: https://thegraph.com/hosted-service/subgraph/balancer-labs/balancer-v2\n */\nexport class PoolsSubgraphRepository\n implements Findable, Searchable\n{\n private client: SubgraphClient;\n private chainId: Network;\n private pools?: Promise;\n public skip = 0;\n private blockHeight: undefined | (() => Promise);\n private query: GraphQLQuery;\n\n /**\n * Repository with optional lazy loaded blockHeight\n *\n * @param url subgraph URL\n * @param chainId current network, needed for L2s logic\n * @param blockHeight lazy loading blockHeigh resolver\n */\n constructor(options: PoolsSubgraphRepositoryOptions) {\n this.client = createSubgraphClient(options.url);\n this.blockHeight = options.blockHeight;\n this.chainId = options.chainId;\n\n const defaultArgs: GraphQLArgs = {\n orderBy: Pool_OrderBy.TotalLiquidity,\n orderDirection: OrderDirection.Desc,\n where: {\n totalShares: {\n gt: 0.000000000001,\n },\n },\n };\n\n const args = Object.assign({}, options.query?.args || defaultArgs);\n const attrs = Object.assign({}, options.query?.attrs || {});\n\n this.query = {\n args,\n attrs,\n };\n }\n\n /**\n * We need a list of all the pools, for calculating APRs (nested pools), and for SOR (path finding).\n * All the pools are fetched on page load and cachced for speedy lookups.\n *\n * @returns Promise resolving to pools list\n */\n private async fetchAllPools(): Promise {\n const logger = Logger.getInstance();\n logger.time('fetching pools');\n\n if (this.blockHeight) {\n this.query.args.block = { number: await this.blockHeight() };\n }\n const formattedQuery = new GraphQLArgsBuilder(this.query.args).format(\n new SubgraphArgsFormatter()\n ) as PoolsQueryVariables;\n\n const { pool0, pool1000, pool2000 } = await this.client.AllPools(\n formattedQuery\n );\n logger.timeEnd('fetching pools');\n\n return [...pool0, ...pool1000, ...pool2000].map((pool) =>\n mapType(pool, this.chainId)\n );\n }\n\n async fetch(options?: PoolsRepositoryFetchOptions): Promise {\n const logger = Logger.getInstance();\n logger.time('fetching pools');\n if (options?.skip) {\n this.query.args.skip = options.skip;\n }\n if (this.blockHeight) {\n this.query.args.block = { number: await this.blockHeight() };\n }\n\n this.query.args.first = options?.first || this.query.args.first || 1000;\n\n const formattedQuery = new GraphQLArgsBuilder(this.query.args).format(\n new SubgraphArgsFormatter()\n ) as PoolsQueryVariables;\n\n const { pools } = await this.client.Pools(formattedQuery);\n\n this.skip = (options?.skip || 0) + pools.length;\n logger.timeEnd('fetching pools');\n\n return pools.map((pool) => mapType(pool, this.chainId));\n }\n\n async find(id: string): Promise {\n return await this.findBy('id', id);\n }\n\n async findBy(param: PoolAttribute, value: string): Promise {\n if (!this.pools) {\n this.pools = this.fetchAllPools();\n }\n\n return (await this.pools).find((pool) => pool[param] == value);\n\n // TODO: @Nma - Fetching pools outside of default query is causing a lot of requests\n // on a frontend, because results aren't cached anywhere.\n // For fetching pools directly from subgraph with custom queries please use the client not this repository.\n // Code below kept for reference, to be removed later.\n //\n // if (this.pools) {\n // return (await this.pools).find((p) => p[param] === value);\n // }\n // const { pools } = await this.client.Pools({\n // where: {\n // [param]: value,\n // swapEnabled: true,\n // totalShares_gt: '0.000000000001',\n // },\n // block: await this.block(),\n // });\n // const poolsTab: Pool[] = pools.map(this.mapType.bind(this));\n // return poolsTab.length > 0 ? poolsTab[0] : undefined;\n }\n\n async all(): Promise {\n if (!this.pools) {\n this.pools = this.fetchAllPools();\n }\n return this.pools;\n }\n\n async block(): Promise<{ number: number | undefined } | undefined> {\n return this.blockHeight ? { number: await this.blockHeight() } : undefined;\n }\n\n async where(filter: (pool: Pool) => boolean): Promise {\n if (!this.pools) {\n this.pools = this.fetchAllPools();\n }\n\n return (await this.pools).filter(filter);\n }\n}\n","import { Cacheable, Findable, Searchable } from '../types';\nimport { Provider } from '@ethersproject/providers';\nimport { PoolAttribute, PoolsRepositoryFetchOptions } from './types';\nimport { Pool } from '@/types';\nimport { getOnChainBalances } from '../../../modules/sor/pool-data/onChainData3';\nimport { PoolsSubgraphRepository } from './subgraph';\nimport { Logger } from '@/lib/utils/logger';\n\ninterface PoolsSubgraphOnChainRepositoryOptions {\n provider: Provider;\n multicall: string;\n vault: string;\n}\n\n/**\n * Access pools using generated subgraph client and multicall.\n */\nexport class PoolsSubgraphOnChainRepository\n implements Findable, Searchable, Cacheable\n{\n private provider: Provider;\n private pools?: Promise;\n private multicall: string;\n private vault: string;\n public skip = 0;\n\n /**\n * Repository using multicall to get onchain data.\n *\n * @param poolsSubgraph subgraph repository\n * @param options options containing provider, multicall and vault addresses\n */\n constructor(\n private poolsSubgraph: PoolsSubgraphRepository,\n options: PoolsSubgraphOnChainRepositoryOptions,\n private readonly poolsToIgnore: string[] | undefined,\n private batchSize?: number\n ) {\n this.provider = options.provider;\n this.multicall = options.multicall;\n this.vault = options.vault;\n }\n\n private filterPools(pools: Pool[]): Pool[] {\n const filteredPools = pools.filter((p) => {\n if (p.swapEnabled === false) return false;\n if (!this.poolsToIgnore) return true;\n const index = this.poolsToIgnore.findIndex(\n (id) => id.toLowerCase() === p.id.toLowerCase()\n );\n return index === -1;\n });\n return filteredPools;\n }\n\n /**\n * We need a list of all the pools, for calculating APRs (nested pools), and for SOR (path finding).\n * All the pools are fetched on page load and cachced for speedy lookups.\n *\n * @returns Promise resolving to pools list\n */\n private async fetchDefault(): Promise {\n const pools = await this.poolsSubgraph.all();\n const filteredPools = this.filterPools(pools);\n\n const logger = Logger.getInstance();\n logger.time(`fetching onchain ${filteredPools.length} pools`);\n\n const onchainPools = await getOnChainBalances(\n filteredPools,\n this.multicall,\n this.vault,\n this.provider,\n this.batchSize\n );\n\n logger.timeEnd(`fetching onchain ${filteredPools.length} pools`);\n\n return onchainPools;\n }\n\n async fetch(options?: PoolsRepositoryFetchOptions): Promise {\n const pools = await this.poolsSubgraph.fetch(options);\n const filteredPools = this.filterPools(pools);\n\n const logger = Logger.getInstance();\n logger.time(`fetching onchain ${filteredPools.length} pools`);\n\n const onchainPools = await getOnChainBalances(\n filteredPools,\n this.multicall,\n this.vault,\n this.provider,\n this.batchSize\n );\n\n logger.timeEnd(`fetching onchain ${filteredPools.length} pools`);\n\n return onchainPools;\n }\n\n async find(id: string, forceRefresh = false): Promise {\n return await this.findBy('id', id, forceRefresh);\n }\n\n async findBy(\n param: PoolAttribute,\n value: string,\n forceRefresh = false\n ): Promise {\n if (!this.pools || forceRefresh) {\n this.pools = this.fetchDefault();\n }\n\n return (await this.pools).find((pool) => pool[param] == value);\n }\n\n async all(): Promise {\n if (!this.pools) {\n this.pools = this.fetchDefault();\n }\n return this.pools;\n }\n\n async where(filter: (pool: Pool) => boolean): Promise {\n if (!this.pools) {\n this.pools = this.fetchDefault();\n }\n\n return (await this.pools).filter(filter);\n }\n\n async refresh(pool: Pool): Promise {\n const onchainPool = await getOnChainBalances(\n [pool],\n this.multicall,\n this.vault,\n this.provider\n );\n\n // If the pool is already cached, replace it with the new one\n if (this.pools) {\n const index = (await this.pools).findIndex(\n (p) => p.address === pool.address\n );\n if (index !== -1) {\n this.pools = Promise.resolve([\n ...(await this.pools).splice(index, 1),\n onchainPool[0],\n ]);\n }\n }\n\n return onchainPool[0];\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { GaugesSubgraphRepository } from '@/modules/subgraph/repository';\nimport { PoolGauges, PoolGaugesAttributes } from './types';\n\nexport class PoolGaugesRepository extends GaugesSubgraphRepository<\n PoolGauges,\n PoolGaugesAttributes\n> {\n async query(args: any): Promise {\n if (!args.block && this.blockHeight)\n args.block = { number: await this.blockHeight() };\n\n const { pools } = await this.client.PoolGauges(args);\n return pools.map(this.mapType);\n }\n\n mapType(fragment: any): PoolGauges {\n return fragment as PoolGauges;\n }\n}\n","export enum PoolJoinExitAttributes {\n Pool = 'pool',\n Sender = 'sender',\n}\n\nexport interface PoolJoinExit {\n id: string;\n userAddress: string;\n poolId: string;\n timestamp: number;\n type: string;\n amounts: string[];\n tokens: string[];\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { PoolJoinExit, PoolJoinExitAttributes } from './types';\nimport { BalancerSubgraphRepository } from '@/modules/subgraph/repository';\nimport {\n JoinExit_OrderBy,\n OrderDirection,\n SubgraphJoinExitFragment,\n} from '@/modules/subgraph/generated/balancer-subgraph-types';\n\nexport class PoolJoinExitRepository extends BalancerSubgraphRepository<\n PoolJoinExit,\n PoolJoinExitAttributes\n> {\n async query(args: any): Promise {\n if (!args.orderBy) args.orderBy = JoinExit_OrderBy.Timestamp;\n if (!args.orderDirection) args.orderDirection = OrderDirection.Asc;\n if (!args.block && this.blockHeight)\n args.block = { number: await this.blockHeight() };\n\n const { joinExits } = await this.client.JoinExits(args);\n return joinExits.map(this.mapType);\n }\n\n mapType(item: SubgraphJoinExitFragment): PoolJoinExit {\n return {\n id: item.id,\n userAddress: item.user.id,\n poolId: item.pool.id,\n timestamp: item.timestamp,\n type: item.type,\n amounts: item.amounts,\n tokens: item.pool.tokensList,\n };\n }\n\n async findByUser(\n sender: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(PoolJoinExitAttributes.Sender, sender, first, skip);\n }\n\n async findJoins(sender: string, pool: string): Promise {\n return this.query({ where: { sender, pool, type: 'Join' } });\n }\n\n async findExits(sender: string, pool: string): Promise {\n return this.query({ where: { sender, pool, type: 'Exit' } });\n }\n\n async findByPool(\n poolId: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(PoolJoinExitAttributes.Pool, poolId, first, skip);\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { PoolShare, PoolShareAttributes } from './types';\nimport { BalancerSubgraphRepository } from '@/modules/subgraph/repository';\nimport {\n SubgraphPoolShareFragment,\n PoolShare_OrderBy,\n OrderDirection,\n} from '@/modules/subgraph/generated/balancer-subgraph-types';\n\nexport class PoolSharesRepository extends BalancerSubgraphRepository<\n PoolShare,\n PoolShareAttributes\n> {\n async query(args: any): Promise {\n if (!args.orderBy) args.orderBy = PoolShare_OrderBy.Balance;\n if (!args.orderDirection) args.orderDirection = OrderDirection.Desc;\n if (!args.block && this.blockHeight)\n args.block = { number: await this.blockHeight() };\n\n const { poolShares } = await this.client.PoolShares(args);\n return poolShares.map(this.mapType);\n }\n\n mapType(subgraphPoolShare: SubgraphPoolShareFragment): PoolShare {\n return {\n id: subgraphPoolShare.id,\n userAddress: subgraphPoolShare.userAddress.id,\n poolId: subgraphPoolShare.poolId.id,\n balance: subgraphPoolShare.balance,\n };\n }\n\n async findByUser(\n userAddress: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(\n PoolShareAttributes.UserAddress,\n userAddress,\n first,\n skip\n );\n }\n\n async findByPool(\n poolId: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(PoolShareAttributes.PoolId, poolId, first, skip);\n }\n}\n","import type { Findable, Token } from '@/types';\nimport type { TokenAttribute } from './types';\n\nexport class StaticTokenProvider implements Findable {\n constructor(private tokens: Token[]) {}\n\n async find(address: string): Promise {\n return this.tokens.find((token) => {\n return token.address.toLowerCase() === address.toLowerCase();\n });\n }\n\n async findBy(\n attribute: TokenAttribute,\n value: string\n ): Promise {\n return this.tokens.find((token) => {\n return token[attribute] === value;\n });\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport {\n CoingeckoConfig,\n Findable,\n Network,\n Price,\n TokenPrices,\n} from '@/types';\nimport axios, { AxiosError } from 'axios';\nimport { TOKENS } from '@/lib/constants/tokens';\nimport { Debouncer, tokenAddressForPricing } from '@/lib/utils';\nimport {\n getCoingeckoApiBaseUrl,\n getCoingeckoApiKeyHeaderName,\n} from '@/lib/utils/coingecko-api';\n\n/**\n * Simple coingecko price source implementation. Configurable by network and token addresses.\n */\nexport class CoingeckoPriceRepository implements Findable {\n prices: { [key: string]: Promise } = {};\n nativePrice?: Promise;\n private readonly url: string;\n private readonly urlNative: string;\n private readonly coingeckoApiKeyHeaderName: string;\n baseTokenAddresses: string[];\n debouncer: Debouncer;\n apiKey?: string;\n\n constructor(\n tokenAddresses: string[],\n private chainId: Network = 1,\n coingecko?: CoingeckoConfig\n ) {\n this.baseTokenAddresses = tokenAddresses.map(tokenAddressForPricing);\n this.url = `${getCoingeckoApiBaseUrl(\n coingecko?.isDemoApiKey\n )}simple/token_price/${this.platform(chainId)}?vs_currencies=usd,eth`;\n this.urlNative = `${getCoingeckoApiBaseUrl(\n coingecko?.isDemoApiKey\n )}simple/price/?vs_currencies=eth,usd&ids=`;\n this.coingeckoApiKeyHeaderName = getCoingeckoApiKeyHeaderName(\n coingecko?.isDemoApiKey\n );\n this.apiKey = coingecko?.coingeckoApiKey;\n this.debouncer = new Debouncer(\n this.fetch.bind(this),\n 200,\n coingecko?.tokensPerPriceRequest ?? 10\n );\n }\n\n private async fetch(\n addresses: string[],\n { signal }: { signal?: AbortSignal } = {}\n ): Promise {\n try {\n const { data } = await axios.get(\n `${this.url}&contract_addresses=${addresses.join(',')}`,\n {\n signal,\n headers: {\n [this.coingeckoApiKeyHeaderName]: this.apiKey ?? '',\n },\n }\n );\n return data;\n } catch (error) {\n const message = ['Error fetching token prices from coingecko'];\n if ((error as AxiosError).isAxiosError) {\n if ((error as AxiosError).response?.status !== undefined) {\n message.push(`with status ${(error as AxiosError).response?.status}`);\n }\n } else {\n message.push(error as string);\n }\n return Promise.reject(message.join(' '));\n }\n }\n\n private fetchNative({\n signal,\n }: { signal?: AbortSignal } = {}): Promise {\n console.time(`fetching coingecko for native token`);\n enum Assets {\n ETH = 'ethereum',\n MATIC = 'matic-network',\n XDAI = 'xdai',\n }\n let assetId: Assets = Assets.ETH;\n if (this.chainId === 137) assetId = Assets.MATIC;\n if (this.chainId === 100) assetId = Assets.XDAI;\n return axios\n .get<{ [key in Assets]: Price }>(`${this.urlNative}${assetId}`, {\n signal,\n headers: {\n [this.coingeckoApiKeyHeaderName]: this.apiKey ?? '',\n },\n })\n .then(({ data }) => {\n return data[assetId];\n })\n .catch((error) => {\n const message = ['Error fetching native token from coingecko'];\n if (error.isAxiosError) {\n if (error.response?.status) {\n message.push(`with status ${error.response.status}`);\n }\n } else {\n message.push(error);\n }\n return Promise.reject(message.join(' '));\n })\n .finally(() => {\n console.timeEnd(`fetching coingecko for native token`);\n });\n }\n\n find(inputAddress: string): Promise {\n const address = tokenAddressForPricing(inputAddress, this.chainId);\n if (!this.prices[address]) {\n // Make initial call with all the tokens we want to preload\n if (Object.keys(this.prices).length === 0) {\n for (const baseAddress of this.baseTokenAddresses) {\n this.prices[baseAddress] = this.debouncer\n .fetch(baseAddress)\n .then((prices) => prices[baseAddress]);\n }\n }\n\n // Handle native asset special case\n if (\n address === TOKENS(this.chainId).Addresses.nativeAsset.toLowerCase()\n ) {\n if (!this.nativePrice) {\n this.prices[address] = this.fetchNative();\n }\n\n return this.prices[address];\n }\n\n this.prices[address] = this.debouncer\n .fetch(address)\n .then((prices) => prices[address]);\n }\n\n return this.prices[address];\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute != 'address') {\n return undefined;\n }\n\n return this.find(value);\n }\n\n private platform(chainId: number): string {\n switch (chainId) {\n case 1:\n case 5:\n case 42:\n case 31337:\n return 'ethereum';\n case 100:\n return 'xdai';\n case 137:\n return 'polygon-pos';\n case 250:\n return 'fantom';\n case 1101:\n return 'polygon-zkevm';\n case 8453:\n return 'base';\n case 42161:\n return 'arbitrum-one';\n case 43114:\n return 'avalanche';\n }\n\n return '2';\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport {\n Price,\n Findable,\n TokenPrices,\n Network,\n HistoricalPrices,\n CoingeckoConfig,\n} from '@/types';\nimport axios, { AxiosError } from 'axios';\nimport { tokenAddressForPricing } from '@/lib/utils';\nimport {\n getCoingeckoApiBaseUrl,\n getCoingeckoApiKeyHeaderName,\n} from '@/lib/utils/coingecko-api';\n\nconst HOUR = 60 * 60;\n\n/**\n * Simple coingecko price source implementation. Configurable by network and token addresses.\n */\nexport class CoingeckoHistoricalPriceRepository implements Findable {\n prices: TokenPrices = {};\n nativePrice?: Promise;\n private readonly urlBase: string;\n private readonly apiKey?: string;\n private readonly coingeckoApiKeyHeaderName: string;\n constructor(private chainId: Network = 1, coingecko?: CoingeckoConfig) {\n this.urlBase = `${getCoingeckoApiBaseUrl(\n coingecko?.isDemoApiKey\n )}coins/${this.platform(\n chainId\n )}/contract/%TOKEN_ADDRESS%/market_chart/range?vs_currency=usd`;\n this.apiKey = coingecko?.coingeckoApiKey;\n this.coingeckoApiKeyHeaderName = getCoingeckoApiKeyHeaderName(\n coingecko?.isDemoApiKey\n );\n }\n\n private async fetch(\n address: string,\n timestamp: number,\n { signal }: { signal?: AbortSignal } = {}\n ): Promise {\n const url = this.urlRange(address, timestamp);\n console.time(`fetching coingecko historical for ${address}`);\n try {\n const { data } = await axios.get(url, {\n signal,\n headers: { [this.coingeckoApiKeyHeaderName]: this.apiKey ?? '' },\n });\n console.timeEnd(`fetching coingecko historical for ${address}`);\n console.log(data);\n return data;\n } catch (error) {\n console.timeEnd(`fetching coingecko historical for ${address}`);\n if ((error as AxiosError).isAxiosError) {\n throw new Error(\n 'Error fetching historical token prices from coingecko - ' +\n (error as AxiosError).message +\n ' - ' +\n (error as AxiosError).response?.statusText\n );\n }\n throw new Error('Unknown Error: ' + error);\n }\n }\n\n /* eslint-disable @typescript-eslint/no-unused-vars */\n async find(address: string): Promise {\n throw `Historic price requires point-in-time timestamp, please use findBy(address, timestamp)`;\n }\n\n async findBy(\n inputAddress: string,\n timestamp: number\n ): Promise {\n const address = tokenAddressForPricing(inputAddress, this.chainId);\n const response = await this.fetch(address, timestamp);\n\n return {\n usd: `${response.prices[0][1]}`,\n };\n }\n\n private platform(chainId: number): string {\n switch (chainId) {\n case 1:\n case 5:\n case 42:\n case 31337:\n return 'ethereum';\n case 137:\n return 'polygon-pos';\n case 42161:\n return 'arbitrum-one';\n case 100:\n return 'xdai';\n }\n\n return '2';\n }\n\n private urlRange(address: string, timestamp: number): string {\n const range: { from: number; to: number } = {\n from: timestamp - HOUR,\n to: timestamp + HOUR,\n };\n return `${this.urlBase.replace('%TOKEN_ADDRESS%', address)}&from=${\n range.from\n }&to=${range.to}`;\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { Price, Findable, TokenPrices, Network } from '@/types';\nimport axios from 'axios';\nimport { Debouncer, tokenAddressForPricing } from '@/lib/utils';\n\ninterface SubgraphPricesResponse {\n data: {\n tokens: [\n {\n address: string;\n latestUSDPrice?: string;\n }\n ];\n };\n}\n\nexport class SubgraphPriceRepository implements Findable {\n prices: { [key: string]: Promise } = {};\n debouncer: Debouncer;\n\n constructor(private subgraphUrl: string, private chainId: Network = 1) {\n this.debouncer = new Debouncer(\n this.fetch.bind(this),\n 200\n );\n }\n\n private async fetch(\n addresses: string[],\n { signal }: { signal?: AbortSignal } = {}\n ): Promise {\n console.time(`fetching subgraph prices for ${addresses.length} tokens`);\n return axios\n .post(\n this.subgraphUrl,\n {\n variables: { addresses },\n query: `query($addresses: [String!]) {\n tokens(\n where: {\n id_in: $addresses\n }\n ) {\n address\n latestUSDPrice\n }\n }`,\n },\n { signal }\n )\n .then((response) => response.data.data)\n .then(({ tokens }) =>\n Object.fromEntries(\n tokens.map((token) => [\n token.address,\n { usd: token.latestUSDPrice || undefined },\n ])\n )\n )\n .finally(() => {\n console.timeEnd(\n `fetching subgraph prices for ${addresses.length} tokens`\n );\n });\n }\n\n async find(inputAddress: string): Promise {\n const address = tokenAddressForPricing(inputAddress, this.chainId);\n if (!this.prices[address]) {\n this.prices[address] = this.debouncer\n .fetch(address)\n .then((prices) => prices[address]);\n }\n\n return this.prices[address];\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute != 'address') {\n return undefined;\n }\n\n return this.find(value);\n }\n}\n","import type { Findable, Price } from '@/types';\nimport { IAaveRates } from './aave-rates';\nimport { Logger } from '@/lib/utils/logger';\n\nexport class TokenPriceProvider implements Findable {\n constructor(\n private coingeckoRepository: Findable,\n private subgraphRepository: Findable,\n private aaveRates: IAaveRates\n ) {}\n\n async find(address: string): Promise {\n let price;\n try {\n price = await this.coingeckoRepository.find(address);\n if (!price?.usd) {\n throw new Error('Price not found');\n }\n } catch (err) {\n const logger = Logger.getInstance();\n logger.warn(err as string);\n price = await this.subgraphRepository.find(address);\n }\n const rate = (await this.aaveRates.getRate(address)) || 1;\n if (price && price.usd) {\n return {\n ...price,\n usd: (parseFloat(price.usd) * rate).toString(),\n };\n } else {\n return price;\n }\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute === 'address') {\n return this.find(value);\n }\n throw `Token price search by ${attribute} not implemented`;\n }\n}\n","import type { Findable, Price } from '@/types';\nimport { IAaveRates } from './aave-rates';\n\nexport class HistoricalPriceProvider implements Findable {\n constructor(\n private coingeckoRepository: Findable,\n private aaveRates: IAaveRates\n ) {}\n\n /**\n * get the historical price at time of call\n *\n * @param address the token address\n */\n async find(address: string): Promise {\n return this.findBy(address, Math.floor(Date.now() / 1000));\n }\n\n /**\n * get the historical price at the given timestamp.\n *\n * @param address the token address\n * @param timestamp the UNIX timestamp\n * @private\n */\n async findBy(address: string, timestamp: number): Promise {\n const price = await this.coingeckoRepository.findBy(address, timestamp);\n const rate = (await this.aaveRates.getRate(address)) || 1;\n if (price && price.usd) {\n return {\n ...price,\n usd: (parseFloat(price.usd) * rate).toString(),\n };\n } else {\n return price;\n }\n }\n}\n","import { Contract } from '@ethersproject/contracts';\nimport { Provider } from '@ethersproject/providers';\n\nconst FeeDistributorAbi = [\n 'function claimTokens(address user, address[] tokens) returns (uint256[])',\n 'function claimToken(address user, address token) returns (uint256)',\n];\n\nexport const FeeDistributor = (address: string, provider: Provider): Contract =>\n new Contract(address, FeeDistributorAbi, provider);\n","import { TokenBalance } from '@/modules/claims/ClaimService';\nimport { FeeDistributor } from '@/modules/contracts/implementations/feeDistributor';\nimport { Multicall } from '@/contracts';\nimport { Interface } from '@ethersproject/abi';\nimport { getAddress } from '@ethersproject/address';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { Contract } from '@ethersproject/contracts';\nimport { Provider } from '@ethersproject/providers';\nimport { formatUnits } from '@ethersproject/units';\n\nexport interface FeeDistributorData {\n balAmount: number;\n bbAUsdAmount: number;\n veBalSupply: number;\n bbAUsdPrice: number;\n balAddress: string;\n}\n\nexport interface BaseFeeDistributor {\n multicallData: (ts: number) => Promise;\n getClaimableBalances(\n userAddress: string,\n claimableTokens: string[]\n ): Promise;\n claimBalances(userAddress: string, claimableTokens: string[]): string;\n}\n\nconst feeDistributorInterface = new Interface([\n 'function getTokensDistributedInWeek(address token, uint timestamp) view returns (uint)',\n 'function claimTokens(address user, address[] tokens) returns (uint256[])',\n 'function claimToken(address user, address token) returns (uint256)',\n]);\n\nconst veBalInterface = new Interface([\n 'function totalSupply() view returns (uint)',\n]);\n\n// const bbAUsdInterface = new Interface([\n// 'function getRate() view returns (uint)',\n// ]);\n\nexport class FeeDistributorRepository implements BaseFeeDistributor {\n feeDistributor: Contract;\n data?: FeeDistributorData;\n\n constructor(\n private multicall: Multicall,\n private feeDistributorAddress: string,\n private balAddress: string,\n private veBalAddress: string,\n private bbAUsdAddress: string,\n provider: Provider\n ) {\n this.feeDistributor = FeeDistributor(feeDistributorAddress, provider);\n }\n\n async fetch(timestamp: number): Promise {\n const previousWeek = this.getPreviousWeek(timestamp);\n const payload = [\n {\n target: this.feeDistributorAddress,\n callData: feeDistributorInterface.encodeFunctionData(\n 'getTokensDistributedInWeek',\n [getAddress(this.balAddress), previousWeek]\n ),\n },\n {\n target: this.feeDistributorAddress,\n callData: feeDistributorInterface.encodeFunctionData(\n 'getTokensDistributedInWeek',\n [getAddress(this.bbAUsdAddress), previousWeek]\n ),\n },\n {\n target: this.veBalAddress,\n callData: veBalInterface.encodeFunctionData('totalSupply', []),\n },\n // Removed while wrappers are broken\n // {\n // target: this.bbAUsdAddress,\n // callData: bbAUsdInterface.encodeFunctionData('getRate', []),\n // },\n ];\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const data = {\n balAmount: parseFloat(formatUnits(res[0], 18)),\n bbAUsdAmount: parseFloat(formatUnits(res[1], 18)),\n veBalSupply: parseFloat(formatUnits(res[2], 18)),\n // bbAUsdPrice: parseFloat(formatUnits(res[3], 18)),\n bbAUsdPrice: parseFloat('1.0'),\n balAddress: this.balAddress,\n };\n\n return data;\n }\n\n async multicallData(timestamp: number): Promise {\n if (!this.data) {\n this.data = await this.fetch(timestamp);\n }\n\n return this.data;\n }\n\n getPreviousWeek(fromTimestamp: number): number {\n const weeksToGoBack = 1;\n const midnight = new Date(fromTimestamp);\n midnight.setUTCHours(0);\n midnight.setUTCMinutes(0);\n midnight.setUTCSeconds(0);\n midnight.setUTCMilliseconds(0);\n\n let daysSinceThursday = midnight.getUTCDay() - 4;\n if (daysSinceThursday < 0) daysSinceThursday += 7;\n\n daysSinceThursday = daysSinceThursday + weeksToGoBack * 7;\n\n return Math.floor(midnight.getTime() / 1000) - daysSinceThursday * 86400;\n }\n\n async getClaimableBalances(\n userAddress: string,\n claimableTokens: string[]\n ): Promise {\n try {\n const amounts: BigNumber[] =\n await this.feeDistributor.callStatic.claimTokens(\n userAddress,\n claimableTokens\n );\n return this.extractTokenBalance(claimableTokens, amounts);\n } catch (e) {\n return {};\n }\n }\n\n claimBalances(userAddress: string, claimableTokens: string[]): string {\n return feeDistributorInterface.encodeFunctionData('claimTokens', [\n userAddress,\n claimableTokens,\n ]);\n }\n\n extractTokenBalance(\n claimableTokens: string[],\n amounts: (BigNumber | undefined | null)[]\n ): TokenBalance {\n return claimableTokens.reduce((tokens: TokenBalance, token, index) => {\n tokens[token] = (amounts[index] as BigNumber) ?? BigNumber.from(0);\n return tokens;\n }, {});\n }\n}\n","import { Interface } from '@ethersproject/abi';\nimport { Provider } from '@ethersproject/providers';\nimport { Contract } from '@ethersproject/contracts';\nimport { formatUnits } from '@ethersproject/units';\nimport { Findable } from '../types';\n\nconst vaultInterface = new Interface([\n 'function getProtocolFeesCollector() view returns (address)',\n]);\n\nconst protocolFeesCollectorInterface = new Interface([\n 'function getSwapFeePercentage() view returns (uint)',\n]);\n\n// Using singleton here, so subsequent calls will return the same promise\nlet swapFeePercentagePromise: Promise;\n\nexport class FeeCollectorRepository implements Findable {\n vault: Contract;\n swapFeePercentage?: number;\n\n constructor(vaultAddress: string, private provider: Provider) {\n this.vault = new Contract(vaultAddress, vaultInterface, this.provider);\n }\n\n async fetch(): Promise {\n const address = (await this.vault.getProtocolFeesCollector()) as string;\n\n const collector = new Contract(\n address,\n protocolFeesCollectorInterface,\n this.provider\n );\n const fees = (await collector.getSwapFeePercentage()) as string;\n\n return parseFloat(formatUnits(fees, 18));\n }\n\n async find(): Promise {\n if (!swapFeePercentagePromise) {\n swapFeePercentagePromise = this.fetch();\n }\n this.swapFeePercentage = await swapFeePercentagePromise;\n\n return this.swapFeePercentage;\n }\n\n async findBy(): Promise {\n return this.find();\n }\n}\n","// 0x97207B095e4D5C9a6e4cfbfcd2C3358E03B90c4A\n\nimport { Interface } from '@ethersproject/abi';\nimport { formatUnits } from '@ethersproject/units';\nimport { Multicall } from '@/contracts';\n\nconst iProtocolFeePercentagesProvider = new Interface([\n 'function getSwapFeePercentage() view returns (uint)',\n]);\n\nexport interface ProtocolFees {\n swapFee: number;\n yieldFee: number;\n}\n\n// Using singleton here, so subsequent calls will return the same promise\nlet feesPromise: Promise;\n\nexport class ProtocolFeesProvider {\n protocolFees?: ProtocolFees;\n\n constructor(\n private multicall: Multicall,\n private protocolFeePercentagesProviderAddress: string\n ) {}\n\n private async fetch(): Promise {\n const payload = [\n {\n target: this.protocolFeePercentagesProviderAddress,\n callData: iProtocolFeePercentagesProvider.encodeFunctionData(\n 'getFeeTypePercentage',\n [0]\n ),\n },\n {\n target: this.protocolFeePercentagesProviderAddress,\n callData: iProtocolFeePercentagesProvider.encodeFunctionData(\n 'getFeeTypePercentage',\n [2]\n ),\n },\n ];\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const fees = {\n swapFee: parseFloat(formatUnits(res[0], 18)),\n yieldFee: parseFloat(formatUnits(res[2], 18)),\n };\n\n return fees;\n }\n\n async getFees(): Promise {\n if (!feesPromise) {\n feesPromise = this.fetch();\n }\n this.protocolFees = await feesPromise;\n\n return this.protocolFees;\n }\n}\n","import axios from 'axios';\nimport { Findable } from '@/types';\nimport { Logger } from '@/lib/utils/logger';\n\nexport class TokenYieldsRepository implements Findable {\n private yields?: Promise<{ [address: string]: number }>;\n\n constructor(private url = 'https://yield-tokens.balancer.workers.dev/') {}\n\n async fetch(): Promise<{ [address: string]: number }> {\n let aprs = {};\n\n try {\n console.time(`fetching token yields`);\n const response = await axios.get(this.url);\n console.timeEnd(`fetching token yields`);\n\n aprs = response.data as {\n [key: string]: number;\n };\n } catch (error) {\n const logger = Logger.getInstance();\n logger.warn(`Failed to fetch yield tokens: ${error}`);\n }\n\n return aprs;\n }\n\n async find(address: string): Promise {\n const lc = address.toLocaleLowerCase();\n if (!this.yields) {\n this.yields = this.fetch();\n }\n\n return this.yields.then((r) => (r[lc] && r[lc] > 0 ? r[lc] : 0));\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute != 'address') {\n return 0;\n }\n\n return this.find(value);\n }\n}\n","import { Findable } from '../types';\nimport axios from 'axios';\n\nconst query = (timestamp: string) => `{\n blocks(first: 1, orderBy: timestamp, orderDirection: asc, where: { timestamp_gt: ${timestamp} }) {\n number\n }\n}`;\n\ninterface BlockNumberResponse {\n data: {\n blocks: [\n {\n number: string;\n }\n ];\n };\n}\n\nconst fetchBlockByTime = async (\n endpoint: string,\n timestamp: string\n): Promise => {\n const payload = {\n query: query(timestamp),\n };\n\n const response = await axios.post(endpoint, payload);\n\n const {\n data: { blocks },\n } = response.data as BlockNumberResponse;\n\n return parseInt(blocks[0].number);\n};\n\nexport class BlockNumberRepository implements Findable {\n blocks: { [ts: string]: Promise } = {};\n\n constructor(private endpoint: string) {}\n\n async find(from: string): Promise {\n if (from == 'dayAgo') {\n const dayAgo = `${Math.floor(Date.now() / 1000) - 86400}`;\n if (!this.blocks[dayAgo]) {\n this.blocks = {\n ...this.blocks,\n [dayAgo]: fetchBlockByTime(this.endpoint, dayAgo),\n };\n }\n return this.blocks[dayAgo];\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async findBy(attribute = '', value = ''): Promise {\n return;\n }\n}\n","import { GyroConfigRepositoryImpl } from '@/modules/data/gyro-config/repository';\n\nexport * as balEmissions from './bal/emissions';\nexport * from './gauge-controller/multicall';\nexport * from './gauge-shares';\nexport * from './liquidity-gauges';\nexport * from './pool';\nexport * from './pool-gauges';\nexport * from './pool-joinExit';\nexport * from './pool-shares';\nexport * from './token';\nexport * from './token-prices';\nexport * from './fee-distributor/repository';\nexport * from './fee-collector/repository';\nexport * from './protocol-fees/provider';\nexport * from './token-yields/repository';\nexport * from './block-number';\n\nimport {\n BalancerNetworkConfig,\n BalancerDataRepositories,\n GraphQLQuery,\n CoingeckoConfig,\n} from '@/types';\nimport { PoolsSubgraphRepository } from './pool/subgraph';\nimport { SubgraphPoolDataService } from '../sor/pool-data/subgraphPoolDataService';\nimport { PoolsSubgraphOnChainRepository } from './pool/subgraphOnChain';\nimport { PoolSharesRepository } from './pool-shares/repository';\nimport { PoolJoinExitRepository } from './pool-joinExit/repository';\nimport { PoolGaugesRepository } from './pool-gauges/repository';\nimport { GaugeSharesRepository } from './gauge-shares/repository';\nimport { BlockNumberRepository } from './block-number';\nimport {\n CoingeckoPriceRepository,\n AaveRates,\n TokenPriceProvider,\n HistoricalPriceProvider,\n CoingeckoHistoricalPriceRepository,\n} from './token-prices';\nimport { StaticTokenProvider } from './token/static';\nimport { LiquidityGaugeSubgraphRPCProvider } from './liquidity-gauges/provider';\nimport { FeeDistributorRepository } from './fee-distributor/repository';\nimport { FeeCollectorRepository } from './fee-collector/repository';\nimport { TokenYieldsRepository } from './token-yields/repository';\nimport { ProtocolFeesProvider } from './protocol-fees/provider';\nimport { Provider } from '@ethersproject/providers';\n\n// initialCoingeckoList are used to get the initial token list for coingecko\n// TODO: we might want to replace that with what frontend is using\nimport initialCoingeckoList from '@/modules/data/token-prices/initial-list.json';\nimport { SubgraphPriceRepository } from './token-prices/subgraph';\nimport { createSubgraphClient } from '../subgraph/subgraph';\nimport { Contracts } from '../contracts/contracts.module';\n\nexport class Data implements BalancerDataRepositories {\n pools;\n poolsForSimulations;\n poolsOnChain;\n yesterdaysPools;\n poolShares;\n poolGauges;\n gaugeShares;\n tokenPrices;\n tokenHistoricalPrices;\n tokenMeta;\n liquidityGauges;\n feeDistributor;\n feeCollector;\n protocolFees;\n tokenYields;\n blockNumbers;\n poolJoinExits;\n gyroConfigRepository;\n\n constructor(\n networkConfig: BalancerNetworkConfig,\n provider: Provider,\n contracts: Contracts,\n subgraphQuery?: GraphQLQuery,\n coingecko?: CoingeckoConfig\n ) {\n this.pools = new PoolsSubgraphRepository({\n url: networkConfig.urls.subgraph,\n chainId: networkConfig.chainId,\n query: subgraphQuery,\n });\n\n // Used for VaultModel and Simulations\n this.poolsForSimulations = new SubgraphPoolDataService(\n createSubgraphClient(networkConfig.urls.subgraph),\n provider,\n networkConfig,\n undefined,\n subgraphQuery\n );\n\n this.poolsOnChain = new PoolsSubgraphOnChainRepository(\n this.pools,\n {\n provider: provider,\n multicall: networkConfig.addresses.contracts.multicall,\n vault: networkConfig.addresses.contracts.vault,\n },\n networkConfig.poolsToIgnore,\n networkConfig.multicallBatchSize\n );\n\n this.poolShares = new PoolSharesRepository(\n networkConfig.urls.subgraph,\n networkConfig.chainId\n );\n\n this.poolJoinExits = new PoolJoinExitRepository(\n networkConfig.urls.subgraph,\n networkConfig.chainId\n );\n\n if (networkConfig.urls.gaugesSubgraph) {\n this.poolGauges = new PoolGaugesRepository(\n networkConfig.urls.gaugesSubgraph,\n networkConfig.chainId\n );\n\n this.gaugeShares = new GaugeSharesRepository(\n networkConfig.urls.gaugesSubgraph,\n networkConfig.chainId\n );\n }\n\n // 🚨 yesterdaysPools is used to calculate swapFees accumulated over last 24 hours\n // TODO: find a better data source for that, eg: maybe DUNE once API is available\n if (networkConfig.urls.blockNumberSubgraph) {\n this.blockNumbers = new BlockNumberRepository(\n networkConfig.urls.blockNumberSubgraph\n );\n\n const blockDayAgo = async () => {\n if (this.blockNumbers) {\n return await this.blockNumbers.find('dayAgo');\n }\n };\n\n this.yesterdaysPools = new PoolsSubgraphRepository({\n url: networkConfig.urls.subgraph,\n chainId: networkConfig.chainId,\n blockHeight: blockDayAgo,\n query: subgraphQuery,\n });\n } else if (networkConfig.averageBlockTime) {\n const blockDayAgo = async () => {\n const blockNumber = await provider.getBlockNumber();\n const blocksPerDay = Math.round(\n 86400 / (networkConfig.averageBlockTime || 2)\n );\n return blockNumber - blocksPerDay;\n };\n\n this.yesterdaysPools = new PoolsSubgraphRepository({\n url: networkConfig.urls.subgraph,\n chainId: networkConfig.chainId,\n blockHeight: blockDayAgo,\n query: subgraphQuery,\n });\n }\n\n const tokenAddresses = initialCoingeckoList\n .filter((t) => t.chainId == networkConfig.chainId)\n .map((t) => t.address);\n\n const coingeckoRepository = new CoingeckoPriceRepository(\n tokenAddresses,\n networkConfig.chainId,\n coingecko\n );\n\n const subgraphPriceRepository = new SubgraphPriceRepository(\n networkConfig.urls.subgraph,\n networkConfig.chainId\n );\n\n const aaveRates = new AaveRates(\n contracts.contracts.multicall,\n networkConfig.chainId\n );\n\n this.tokenPrices = new TokenPriceProvider(\n coingeckoRepository,\n subgraphPriceRepository,\n aaveRates\n );\n\n const coingeckoHistoricalRepository =\n new CoingeckoHistoricalPriceRepository(networkConfig.chainId, coingecko);\n\n this.tokenHistoricalPrices = new HistoricalPriceProvider(\n coingeckoHistoricalRepository,\n aaveRates\n );\n\n this.tokenMeta = new StaticTokenProvider([]);\n\n if (networkConfig.urls.gaugesSubgraph) {\n this.liquidityGauges = new LiquidityGaugeSubgraphRPCProvider(\n networkConfig.urls.gaugesSubgraph,\n contracts.contracts.multicall,\n networkConfig.addresses.contracts.gaugeController || '',\n networkConfig.chainId,\n networkConfig.addresses.contracts.gaugeControllerCheckpointer\n );\n }\n\n if (\n networkConfig.addresses.contracts.feeDistributor &&\n networkConfig.addresses.tokens.bal &&\n networkConfig.addresses.tokens.veBal &&\n networkConfig.addresses.tokens.bbaUsd\n ) {\n this.feeDistributor = new FeeDistributorRepository(\n contracts.contracts.multicall,\n networkConfig.addresses.contracts.feeDistributor,\n networkConfig.addresses.tokens.bal,\n networkConfig.addresses.tokens.veBal,\n networkConfig.addresses.tokens.bbaUsd,\n provider\n );\n }\n\n this.feeCollector = new FeeCollectorRepository(\n networkConfig.addresses.contracts.vault,\n provider\n );\n\n if (networkConfig.addresses.contracts.protocolFeePercentagesProvider) {\n this.protocolFees = new ProtocolFeesProvider(\n contracts.contracts.multicall,\n networkConfig.addresses.contracts.protocolFeePercentagesProvider\n );\n }\n\n this.tokenYields = new TokenYieldsRepository();\n\n if (networkConfig.addresses.contracts.gyroConfigProxy) {\n this.gyroConfigRepository = new GyroConfigRepositoryImpl(\n networkConfig.addresses.contracts.gyroConfigProxy,\n contracts.contracts.multicall,\n provider\n );\n }\n }\n}\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { MaxInt256 } from '@ethersproject/constants';\nimport { BatchSwapStep, SwapType } from '../swaps/types';\nimport { Relayer } from './relayer.module';\nimport { OutputReference, PoolKind } from './types';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\n\n/**\n * Converts poolType and poolTypeVersion to PoolKind used by Relayer V5 defined in:\n * https://github.com/balancer/balancer-v2-monorepo/blob/9b78879ee3a0dcae57094bdfdae973873e4262cf/pkg/standalone-utils/contracts/relayer/VaultActions.sol#L105\n *\n * @internal\n * @param poolType\n * @param poolTypeVersion\n * @returns PoolKind\n */\nconst poolType2PoolKind = (\n poolType: string,\n poolTypeVersion: number\n): PoolKind => {\n if (poolType === 'Stable') {\n return PoolKind.LEGACY_STABLE;\n } else if (poolType === 'ComposableStable' && poolTypeVersion === 1) {\n return PoolKind.COMPOSABLE_STABLE;\n } else if (poolType === 'ComposableStable') {\n return PoolKind.COMPOSABLE_STABLE_V2;\n } else {\n return PoolKind.WEIGHTED;\n }\n};\n\nexport const setRelayerApproval = Relayer.encodeSetRelayerApproval;\nexport const gaugeWithdrawal = Relayer.encodeGaugeWithdraw;\nexport const gaugeDeposit = Relayer.encodeGaugeDeposit;\nexport const peekChainedReferenceValue =\n Relayer.encodePeekChainedReferenceValue;\n\n/**\n * Encodes exitPool callData.\n * Exit pool to underlying tokens and assigns output references to the exit amounts.\n *\n * @param poolId Pool ID.\n * @param poolType Pool type.\n * @param poolTypeVersion Pool type version.\n * @param assets Ordered pool tokens.\n * @param singleTokenExit When\n * @param outputReferences reference to exit amounts for the next transaction\n * @param amount Amount of BPT to exit with as a number with 18 digits of precision passed as a string.\n * @param sender Sender address.\n * @param recipient Recipient address.\n * @param isComposable Whether the poolType is ComposableStable or not.\n * @param toInternalBalance Use internal balance or not.\n * @returns Encoded exitPool call.\n */\nexport const exit = (\n poolId: string,\n poolType: string,\n poolTypeVersion: number,\n assets: string[],\n exitTokenIndex = -1,\n outputReferences: OutputReference[],\n amount: string,\n sender: string,\n recipient: string,\n toInternalBalance = true\n): string => {\n let userData: string;\n const isComposable = poolType === 'ComposableStable' && poolTypeVersion === 1;\n\n // Exit pool proportionally or to a singleToken\n if (exitTokenIndex > -1) {\n userData = StablePoolEncoder.exitExactBPTInForOneTokenOut(\n amount,\n exitTokenIndex\n );\n } else {\n const encoder = isComposable\n ? ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut\n : StablePoolEncoder.exitExactBPTInForTokensOut;\n userData = encoder(amount);\n }\n\n // Relayer V5 introduces PoolKind\n const poolKind = poolType2PoolKind(poolType, poolTypeVersion);\n\n // Encode exit pool data\n const callData = Relayer.encodeExitPool({\n poolId,\n poolKind,\n sender,\n recipient,\n outputReferences,\n exitPoolRequest: {\n assets,\n minAmountsOut: new Array(assets.length).fill('0'),\n userData,\n toInternalBalance,\n },\n });\n\n return callData;\n};\n\n/**\n * Encodes joinPool callData.\n * Joins pool with underlying tokens and assigns output reference to the BPT amount.\n *\n * @param poolId Pool ID.\n * @param poolType Pool type.\n * @param poolTypeVersion Pool type version.\n * @param assets Ordered pool tokens.\n * @param amountsIn Amounts of tokens to join with as a number with 18 digits of precision passed as a string.\n * @param minimumBPT Minimum BPT amount to receive as a number with 18 digits of precision passed as a string.\n * @param outputReference reference to BPT amount for the next transaction\n * @param sender Sender address.\n * @param recipient Recipient address.\n * @param fromInternalBalance Use internal balance or not.\n * @returns Encoded joinPool call.\n */\nexport const join = (\n poolId: string,\n poolType: string,\n poolTypeVersion: number,\n assets: string[],\n amountsIn: string[],\n minimumBPT: string,\n outputReference: string,\n sender: string,\n recipient: string,\n fromInternalBalance = true\n): string => {\n const maxAmountsIn = assets.map(() => MaxInt256);\n\n // Encoding join pool data with the type exactTokensIn (1)\n // StablePoolEncoder.joinExactTokensInForBPTOut is the same for all pool types\n const userData = StablePoolEncoder.joinExactTokensInForBPTOut(\n amountsIn,\n minimumBPT\n );\n\n const kind = poolType2PoolKind(poolType, poolTypeVersion);\n\n const callData = Relayer.encodeJoinPool({\n poolId,\n kind,\n sender,\n recipient,\n joinPoolRequest: {\n assets,\n maxAmountsIn,\n userData,\n fromInternalBalance,\n },\n value: '0',\n outputReference,\n });\n\n return callData;\n};\n\n/**\n * Creates encoded batchSwap callData\n * outputReferences contain the output amount for swap's last token\n *\n * @param sender Sender address.\n * @param recipient Recipient address.\n * @param swaps List of swaps to execute.\n * @param deadline Deadline for the transaction.\n * @param toInternalBalance Use internal balance or not.\n * @returns Encoded batchSwap call\n */\nexport const swaps = (\n sender: string,\n recipient: string,\n swaps: {\n path: {\n poolId: string;\n assetIn: string;\n assetOut: string;\n }[];\n inputAmount: string;\n outputReference: BigNumber;\n }[],\n deadline?: string,\n toInternalBalance = true\n): string => {\n const assets: string[] = [];\n const limits: string[] = [];\n const outputReferences: { index: number; key: BigNumber }[] = [];\n const batchSwaps: BatchSwapStep[] = [];\n\n // Convert paths into batchSwap steps\n swaps.forEach((swap) => {\n const { path, inputAmount, outputReference } = swap;\n\n for (let i = 0; i < path.length; i++) {\n const { poolId, assetIn, assetOut } = path[i];\n\n assets.push(assetIn);\n assets.push(assetOut);\n\n limits.push(MaxInt256.toString());\n limits.push('0');\n\n const assetInIndex = i * 2;\n const assetOutIndex = i * 2 + 1;\n\n const swap: BatchSwapStep = {\n poolId,\n assetInIndex,\n assetOutIndex,\n amount: i === 0 ? inputAmount : '0',\n userData: '0x',\n };\n\n batchSwaps.push(swap);\n }\n\n // Add output reference for the last swap\n outputReferences.push({ index: path.length * 2 - 1, key: outputReference });\n });\n\n const funds = {\n sender,\n recipient,\n fromInternalBalance: true,\n toInternalBalance,\n };\n\n const encodedBatchSwap = Relayer.encodeBatchSwap({\n swapType: SwapType.SwapExactIn,\n swaps: batchSwaps,\n assets,\n funds,\n limits,\n deadline: deadline || BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value: '0',\n outputReferences,\n });\n\n return encodedBatchSwap;\n};\n","import { Findable, Pool, PoolAttribute } from '@/types';\nimport { BalancerRelayer__factory } from '@/contracts';\n\nexport const balancerRelayerInterface =\n BalancerRelayer__factory.createInterface();\n\n/**\n * Using array of objects to preserve the tokens order\n */\nexport interface MigrationPool {\n address: string;\n id?: string;\n poolType?: string;\n poolTypeVersion?: number;\n tokens?: MigrationPool[];\n mainIndex?: number;\n}\n\n/**\n * Foreach AaveLinear: AaveLinear > mainTokens > newAaveLinear\n *\n * @param fromTokens\n * @param toTokens\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const buildPaths = (\n fromTokens: MigrationPool[],\n toTokens: MigrationPool[],\n exitTokenIndex: number\n) => {\n // Get the main token address for each pool\n const getMainToken = ({ tokens, mainIndex }: MigrationPool) =>\n (tokens && mainIndex && tokens[mainIndex].address) || '';\n const mainFromTokens = fromTokens.flatMap(getMainToken);\n const mainToTokens = toTokens.flatMap(getMainToken);\n\n // Find the index of the main token in both from and to pools\n const pathIndexes = mainFromTokens.map(\n (token, idx) => (token && [idx, mainToTokens.indexOf(token)]) || [-1, -1]\n );\n\n // Build the paths from the indexes\n const exitSwaps = pathIndexes.map(([fromIdx, toIdx]) => {\n if (fromIdx === -1 || toIdx === -1) {\n return [];\n }\n const fromPool = fromTokens[fromIdx];\n const toPool = toTokens[toIdx];\n return buildPath(fromPool, toPool);\n });\n\n // If we want to exit a specific token, return only that path\n if (exitTokenIndex > -1) {\n return [exitSwaps[exitTokenIndex]];\n }\n\n return exitSwaps;\n};\n\nconst buildPath = (from: MigrationPool, to: MigrationPool) => {\n if (from.poolType?.match(/.*Linear.*/)) {\n return buildLinearPath(from, to);\n }\n\n return [];\n};\n\nconst buildLinearPath = (from: MigrationPool, to: MigrationPool) => {\n if (\n !from.id ||\n !to.id ||\n !from.tokens ||\n !to.tokens ||\n !from.mainIndex ||\n !to.mainIndex\n ) {\n throw 'Missing tokens';\n }\n const mainToken = from.tokens[from.mainIndex];\n\n const path = [\n {\n poolId: from.id,\n assetIn: from.address,\n assetOut: mainToken.address,\n },\n {\n poolId: to.id,\n assetIn: mainToken.address,\n assetOut: to.address,\n },\n ];\n\n return path;\n};\n\n/**\n * Converts Subgraph Pool to MigrationPool\n * Recursively builds tokens\n *\n * @param id\n * @param repository\n * @returns\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const buildMigrationPool = async (\n id: string,\n repository: Findable\n) => {\n const pool = await repository.find(id);\n if (!pool) throw `Pool ${id} not found`;\n\n const findTokens = async (token: string, parentPool: string) => {\n let tokens: Array = [{ address: token }];\n const pool = await repository.findBy('address', token);\n if (pool && token != parentPool) {\n const sortedTokens = pool.tokens.sort(cmpTokens);\n const nestedTokens = await Promise.all(\n sortedTokens.map(({ address }) => findTokens(address, pool.address))\n );\n tokens = [\n {\n address: token,\n id: pool.id,\n poolType: pool.poolType,\n poolTypeVersion: pool.poolTypeVersion,\n mainIndex: pool.mainIndex,\n tokens: nestedTokens.flat(),\n },\n ];\n }\n return tokens;\n };\n\n // Sorts amounts out into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const sortedTokens = pool.tokens.sort(cmpTokens);\n\n return {\n id,\n address: pool.address,\n tokens: (\n await Promise.all(\n sortedTokens.map(({ address }) => findTokens(address, pool.address))\n )\n ).flat(),\n poolType: pool.poolType,\n poolTypeVersion: pool.poolTypeVersion,\n mainIndex: pool.mainIndex,\n };\n};\n\nconst cmpTokens = (tokenA: MigrationPool, tokenB: MigrationPool): number =>\n tokenA.address.toLowerCase() > tokenB.address.toLowerCase() ? 1 : -1;\n","import { OutputReference, Relayer } from '@/modules/relayer/relayer.module';\nimport * as actions from '@/modules/relayer/actions';\nimport { buildPaths, MigrationPool, balancerRelayerInterface } from './helpers';\nimport { BigNumber } from '@ethersproject/bignumber';\n\n/**\n * Builds migration call data.\n *\n * @param account Address of the migrating account\n * @param relayer Address of the relayer\n * @param bptAmount Amount of BPT to migrate\n * @param minBptOut Minimal amount of BPT to receive\n * @param from Pool to migrate from\n * @param to Pool to migrate to\n * @param peek Add a peek call for the expected BPT amount, decodable by the `decodePeak` function\n * @param fromGauge Unstake from gauge before migrating\n * @param toGauge Restake to gauge after migrating\n * @param authorisation User's authorisation to approve relayer in the vault\n * @returns call data\n */\nexport const migrationBuilder = (\n account: string,\n relayer: string,\n bptAmount: string,\n minBptOut: string,\n from: MigrationPool,\n to: MigrationPool,\n peek = false,\n fromGauge?: string,\n toGauge?: string,\n authorisation?: string\n): string => {\n if (\n !from.id ||\n !to.id ||\n !from.tokens ||\n !to.tokens ||\n !from.poolType ||\n !to.poolType\n ) {\n throw 'Pool data is missing';\n }\n\n // Define tokens\n const fromTokens = from.tokens.flatMap(({ address }) => address);\n const toTokens = to.tokens.flatMap(({ address }) => address);\n\n // Prefer proportional exit, except for ComposableStableV1\n // Choose 0 as the exit token index\n // TODO: make default exit token dynamic\n const exitTokenIndex =\n from.poolType == 'ComposableStable' && from.poolTypeVersion == 1 ? 0 : -1;\n\n // Define output references\n let exitOutputReferences: OutputReference[];\n let swapOutputReferences: BigNumber[] = [];\n if (exitTokenIndex > -1) {\n exitOutputReferences = [\n {\n index: exitTokenIndex,\n key: Relayer.toChainedReference(`10${exitTokenIndex}`),\n },\n ];\n swapOutputReferences = [Relayer.toChainedReference(`20${exitTokenIndex}`)];\n } else {\n exitOutputReferences = fromTokens.map((_, idx) => ({\n index: idx,\n key: Relayer.toChainedReference(`10${idx}`),\n }));\n swapOutputReferences = fromTokens.map((_, idx) =>\n Relayer.toChainedReference(`20${idx}`)\n );\n }\n\n const joinAmount = Relayer.toChainedReference('999');\n\n // Configure migration steps\n const migrationSteps = [];\n let needsSwap = false; // only if from is ComposableStable\n\n if (from.poolType === 'ComposableStable') {\n needsSwap = true;\n }\n\n // 0. Set relayer approval\n if (authorisation) {\n migrationSteps.push(\n actions.setRelayerApproval(relayer, true, authorisation)\n );\n }\n\n // 1. Withdraw from old gauge\n if (fromGauge) {\n migrationSteps.push(\n actions.gaugeWithdrawal(fromGauge, account, relayer, bptAmount)\n );\n }\n\n // 2. Exit old pool\n migrationSteps.push(\n actions.exit(\n from.id,\n from.poolType,\n from.poolTypeVersion || 1,\n fromTokens,\n exitTokenIndex,\n exitOutputReferences,\n bptAmount,\n fromGauge ? relayer : account,\n relayer\n )\n );\n\n // 3. Swap\n const swapPaths = buildPaths(from.tokens, to.tokens, exitTokenIndex);\n if (swapPaths.flat().length > 0) {\n // Match exit to swap amounts\n const swaps = swapPaths\n .map((path, idx) => ({\n path,\n inputAmount: String(exitOutputReferences[idx].key),\n outputReference: swapOutputReferences[idx],\n }))\n .filter(({ path }) => path.length > 0);\n\n migrationSteps.push(actions.swaps(relayer, relayer, swaps));\n }\n\n // 3. Join\n // Match swap or exit references to the positions of join tokens\n // In case no reference is defined, the default is 0\n const references = toTokens\n .filter((address) => to.address != address)\n .map((to) => {\n const fromIdx = fromTokens.indexOf(to);\n return String(\n (needsSwap && swapOutputReferences[fromIdx]) ||\n exitOutputReferences[fromIdx]?.key ||\n 0\n );\n });\n\n migrationSteps.push(\n actions.join(\n to.id,\n to.poolType,\n to.poolTypeVersion || 1,\n toTokens,\n references,\n minBptOut,\n String(joinAmount),\n relayer,\n toGauge ? relayer : account,\n true\n )\n );\n\n // Peek the last join amount\n if (peek === true) {\n migrationSteps.push(actions.peekChainedReferenceValue(String(joinAmount)));\n }\n\n // 4. Deposit to the new gauge\n if (toGauge) {\n migrationSteps.push(\n actions.gaugeDeposit(toGauge, relayer, account, String(joinAmount))\n );\n }\n\n const callData = balancerRelayerInterface.encodeFunctionData('multicall', [\n migrationSteps,\n ]);\n\n return callData;\n};\n","import { Findable, Pool, PoolAttribute } from '@/types';\nimport { JsonRpcProvider } from '@ethersproject/providers';\nimport { SubgraphLiquidityGauge } from '../subgraph/subgraph';\nimport { migrationBuilder } from './migrations/builder';\nimport {\n balancerRelayerInterface,\n buildMigrationPool,\n} from './migrations/helpers';\nimport * as actions from '@/modules/relayer/actions';\n\n/**\n * @param user - user address\n * @param from - pool ID\n * @param to - pool ID\n * @param balance - amount of liquidity to migrate in WAL (wei-ether)\n * @param minBptOut - minimum amount of BPT to receive, when 0 it will include a peek for the amount\n * @param authorisation - signed user's authorisation to approve relayer in the vault\n */\ninterface MigrationParams {\n user: string;\n from: string;\n to: string;\n balance: string;\n minBptOut?: string;\n authorisation?: string;\n}\n\n/**\n * Class responsible for building liquidity migration transactions.\n */\nexport class Migrations {\n public relayerAddress: string;\n public poolsRepository: Findable;\n public gaugesRepository: Findable;\n public provider: JsonRpcProvider;\n\n /**\n * Instance of a class responsible for building liquidity migration transactions.\n *\n * @param relayerAddress Address of the relayer contract.\n * @param poolsRepository Repository of pools.\n * @param liquidityGaugesRepository Repository of liquidity gauges.\n * @param provider Provider to use for RPC data fetching.\n *\n * Available methods:\n * - `pool2pool` - Migrates liquidity from one pool to another.\n * - `pool2poolWithGauges` - Migrates liquidity from a pool's gauge to another gauge.\n * - `gauge2gauge` - Migrates liquidity from one gauge to another of the same pool.\n *\n * @example\n * ```typescript\n * const sdk = new BalancerSDK({\n * network: 1,\n * rpcUrl: 'https://rpc.ankr.com/eth',\n * })\n *\n * const migrations = new Migrations({\n * relayerAddress: sdk.networkConfig.addresses.contracts.relayerV4 as string,\n * poolsRepository: sdk.data.pools,\n * gaugesRepository: sdk.data.liquidityGauges.subgraph,\n * provider: sdk.provider\n * })\n *\n * const user = '0xfacec29Ae158B26e234B1a81Db2431F6Bd8F8cE8'\n * const from = '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080'\n * const to = '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080'\n * const balance = '1000000000000000000'\n * const { to, data } = await migrations.pool2pool({ user, from, to, balance })\n *\n * const tx = await sdk.provider.sendTransaction({ to, data })\n * ```\n */\n constructor({\n relayerAddress,\n poolsRepository,\n gaugesRepository,\n provider,\n }: {\n relayerAddress: string;\n poolsRepository: Findable;\n gaugesRepository: Findable;\n provider: JsonRpcProvider;\n }) {\n this.relayerAddress = relayerAddress;\n this.poolsRepository = poolsRepository;\n this.gaugesRepository = gaugesRepository;\n this.provider = provider;\n }\n\n /**\n * Takes user, from and to pool IDs as strings and returns the transaction data\n *\n * @returns transaction data\n */\n async pool2pool({\n user,\n from,\n to,\n balance,\n minBptOut = '0',\n authorisation,\n }: MigrationParams): Promise<{ to: string; data: string }> {\n const fromPool = await buildMigrationPool(from, this.poolsRepository);\n const toPool = await buildMigrationPool(to, this.poolsRepository);\n\n const data = migrationBuilder(\n user,\n this.relayerAddress,\n String(balance),\n minBptOut,\n fromPool,\n toPool,\n minBptOut == '0', // if minBptOut is 0, we peek for the join amount\n undefined,\n undefined,\n authorisation\n );\n\n return {\n to: this.relayerAddress,\n data,\n };\n }\n\n /**\n * Takes user, from and to pool IDs as strings and returns the transaction data\n * for a migration including unstaking and restaking\n *\n * @returns transaction data\n */\n async pool2poolWithGauges({\n user,\n from,\n to,\n balance,\n minBptOut = '0',\n authorisation,\n }: MigrationParams): Promise<{ to: string; data: string }> {\n const fromGauge = await this.gaugesRepository.findBy('poolId', from);\n const toGauge = await this.gaugesRepository.findBy('poolId', to);\n if (!fromGauge || !fromGauge.poolId || !toGauge || !toGauge.poolId) {\n throw new Error('Gauge not found');\n }\n const fromPool = await buildMigrationPool(\n fromGauge.poolId,\n this.poolsRepository\n );\n const toPool = await buildMigrationPool(\n toGauge.poolId,\n this.poolsRepository\n );\n\n const data = migrationBuilder(\n user,\n this.relayerAddress,\n String(balance),\n minBptOut,\n fromPool,\n toPool,\n minBptOut == '0', // if minBptOut is 0, we peek for the join amount\n fromGauge.id,\n toGauge.id,\n authorisation\n );\n\n return {\n to: this.relayerAddress,\n data,\n };\n }\n\n /**\n * Migrates staked liquidity for the same pool from one gauge to another.\n *\n * @returns transaction data\n */\n async gauge2gauge({\n user,\n from,\n to,\n balance,\n authorisation,\n }: MigrationParams): Promise<{ to: string; data: string }> {\n const steps = [\n actions.gaugeWithdrawal(from, user, this.relayerAddress, balance),\n actions.gaugeDeposit(to, this.relayerAddress, user, balance),\n ];\n\n if (authorisation) {\n steps.unshift(\n actions.setRelayerApproval(this.relayerAddress, true, authorisation)\n );\n }\n\n const data = balancerRelayerInterface.encodeFunctionData('multicall', [\n steps,\n ]);\n\n return {\n to: this.relayerAddress,\n data,\n };\n }\n\n /**\n * Decodes the relayer return value to get the expected BPT out.\n *\n * @param relayerReturnValue\n * @returns\n */\n static getExpectedBptOut = (relayerReturnValue: string): string => {\n // Get last two positions of the return value, bptOut is the last one or the second to last one in case there is a gauge deposit\n // join and gauge deposit are always 0x, so any other value means that's the bptOut\n const multicallResult = balancerRelayerInterface.decodeFunctionResult(\n 'multicall',\n relayerReturnValue\n );\n\n const expectedBptOut = multicallResult[0]\n .slice(-2)\n .filter((v: string) => v !== '0x');\n\n return String(BigInt(expectedBptOut));\n };\n\n getExpectedBptOut = Migrations.getExpectedBptOut;\n}\n","import { SubgraphPoolBase } from '@balancer-labs/sor';\nimport {\n EncodeJoinPoolInput,\n ExitPoolData,\n EncodeBatchSwapInput,\n} from '@/modules/relayer/relayer.module';\nimport { Join } from './join';\nimport { Exit } from './exit';\nimport { Swap } from './swap';\n\nexport enum ActionStep {\n Direct,\n TokenIn,\n TokenOut,\n Middle,\n}\n\nexport enum ActionType {\n BatchSwap,\n Join,\n Exit,\n}\n\nexport type Actions = Exit | Swap | Join;\n\nexport interface Action {\n type: ActionType.Join | ActionType.Exit | ActionType.BatchSwap;\n callData(pool: SubgraphPoolBase, wrappedNativeAsset: string): CallData;\n getAmountIn(): string;\n getAmountOut(): string;\n}\n\nexport interface CallData {\n params: EncodeJoinPoolInput | ExitPoolData | EncodeBatchSwapInput;\n encoded: string | string[];\n}\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { ActionStep, ActionType } from './types';\nimport { Relayer, OutputReference } from '@/modules/relayer/relayer.module';\n\nexport class BaseAction {\n nextOpRefKey;\n hasTokenOut;\n hasTokenIn;\n sender;\n receiver;\n opRefStart;\n minOut;\n amountIn;\n\n constructor(\n mainTokenInIndex: number,\n mainTokenOutIndex: number,\n swapAssetInIndex: number,\n swapAssetOutIndex: number,\n swapAmount: string,\n swapReturn: string,\n opRefKey: number,\n slippage: string,\n user: string,\n relayer: string\n ) {\n const actionStep = this.getActionStep(\n mainTokenInIndex,\n mainTokenOutIndex,\n swapAssetInIndex,\n swapAssetOutIndex\n );\n // Will get actual amount if input or chain amount if part of chain\n this.amountIn = this.getActionAmount(\n swapAmount,\n ActionType.BatchSwap,\n actionStep,\n opRefKey\n );\n this.hasTokenIn = this.actionHasTokenIn(actionStep);\n this.hasTokenOut = this.actionHasTokenOut(actionStep);\n // This will be 0 if not a mainTokenOut action otherwise amount using slippage\n const amountOut = this.hasTokenOut ? swapReturn : '0';\n this.minOut = this.getActionMinOut(amountOut, slippage);\n // This will set opRef for next chained action if required\n const [opRef, nextOpRefKey] = this.getActionOutputRef(\n actionStep,\n swapAssetOutIndex,\n opRefKey\n );\n this.nextOpRefKey = nextOpRefKey;\n this.opRefStart = opRef;\n this.sender = this.getSender(this.hasTokenIn, user, relayer);\n this.receiver = this.getReceiver(this.hasTokenOut, user, relayer);\n }\n\n /**\n * If its not the first action then the amount will come from the previous output ref\n * @param amount\n * @param actionType\n * @param actionStep\n * @param opRefKey\n * @returns\n */\n getActionAmount(\n amount: string,\n actionType: ActionType,\n actionStep: ActionStep,\n opRefKey: number\n ): string {\n let amountIn = amount;\n if (\n actionStep === ActionStep.TokenOut ||\n (actionStep === ActionStep.Middle && actionType === ActionType.Join) ||\n (actionStep === ActionStep.Middle && actionType === ActionType.Exit)\n ) {\n amountIn = Relayer.toChainedReference(opRefKey - 1).toString();\n }\n return amountIn;\n }\n\n /**\n * If its not the final action then we need an outputReferece to chain to next action as input\n * @param actionStep\n * @param tokenOutIndex\n * @param opRefKey\n * @returns\n */\n getActionOutputRef(\n actionStep: ActionStep,\n tokenOutIndex: number,\n opRefKey: number\n ): [OutputReference, number] {\n let opRef: OutputReference = {} as OutputReference;\n if (actionStep === ActionStep.TokenIn || actionStep === ActionStep.Middle) {\n opRef = this.getOutputRef(opRefKey, tokenOutIndex);\n opRefKey++;\n }\n return [opRef, opRefKey];\n }\n\n /**\n * Use slippage to set min amount out\n * @param amountOut\n * @param slippage\n * @returns\n */\n getActionMinOut(amountOut: string, slippage: string): string {\n // Currently only handle ExactIn swap. ExactOut would add slippage\n // We should apply slippage to each swaps amountOut\n return subSlippage(\n BigNumber.from(amountOut),\n BigNumber.from(slippage)\n ).toString();\n }\n\n /**\n * Find if the Action is:\n * Direct: tokenIn > tokenOut\n * TokenIn: tokenIn > chain...\n * TokenOut: ...chain > tokenOut\n * Middle: ...chain > action > chain...\n * @param tokenInIndex\n * @param tokenOutIndex\n * @param tokenInIndexAction\n * @param tokenOutIndexAction\n * @returns\n */\n getActionStep(\n tokenInIndex: number,\n tokenOutIndex: number,\n tokenInIndexAction: number,\n tokenOutIndexAction: number\n ): ActionStep {\n let actionStep: ActionStep;\n if (\n tokenInIndexAction === tokenInIndex &&\n tokenOutIndexAction === tokenOutIndex\n ) {\n actionStep = ActionStep.Direct;\n } else if (tokenInIndexAction === tokenInIndex) {\n actionStep = ActionStep.TokenIn;\n } else if (tokenOutIndexAction === tokenOutIndex) {\n actionStep = ActionStep.TokenOut;\n } else {\n actionStep = ActionStep.Middle;\n }\n return actionStep;\n }\n\n getOutputRef(key: number, index: number): OutputReference {\n const keyRef = Relayer.toChainedReference(key);\n return { index: index, key: keyRef };\n }\n\n getFromInternal(hasTokenIn: boolean, isBptIn?: boolean): boolean {\n if (hasTokenIn || isBptIn) return false;\n else return true;\n }\n\n getToInternal(hasTokenOut: boolean, isBptOut?: boolean): boolean {\n // exits - can't exit using BPT from internal balances\n // Because of ^ we can assume that any tokenOut BPT is going to external (either to user or exit)\n if (hasTokenOut || isBptOut) return false;\n else return true;\n }\n\n actionHasTokenIn(actionStep: ActionStep): boolean {\n return actionStep === ActionStep.Direct || actionStep === ActionStep.TokenIn\n ? true\n : false;\n }\n\n actionHasTokenOut(actionStep: ActionStep): boolean {\n return actionStep === ActionStep.Direct ||\n actionStep === ActionStep.TokenOut\n ? true\n : false;\n }\n\n getSender(hasTokenIn: boolean, user: string, relayer: string): string {\n // tokenIn/Out will come from/go to the user. Any other tokens are intermediate and will be from/to Relayer\n if (hasTokenIn) return user;\n else return relayer;\n }\n\n getReceiver(hasTokenOut: boolean, user: string, relayer: string): string {\n // tokenIn/Out will come from/go to the user. Any other tokens are intermediate and will be from/to Relayer\n if (hasTokenOut) return user;\n else return relayer;\n }\n\n getPoolKind(poolType: string): number {\n // We have to use correct pool type based off following from Relayer:\n // enum PoolKind { WEIGHTED, LEGACY_STABLE, COMPOSABLE_STABLE, COMPOSABLE_STABLE_V2 }\n // (note only Weighted and COMPOSABLE_STABLE_V2 will support proportional exits)\n let kind = 0;\n if ([`MetaStable`, `Stable`, `StablePhantom`].includes(poolType)) {\n kind = 1;\n } else if (poolType === `ComposableStable`) {\n // In this case we are only doing BPT <> singleToken, not BPT <> tokens, so encoding matches and avoids need to check version so default to 3\n kind = 3;\n }\n return kind;\n }\n}\n","import { SubgraphPoolBase, SwapV2 } from '@balancer-labs/sor';\nimport {\n Relayer,\n ExitPoolData,\n OutputReference,\n} from '@/modules/relayer/relayer.module';\nimport { ExitPoolRequest } from '@/types';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { AssetHelpers } from '@/lib/utils';\nimport { ActionType, Action, CallData } from './types';\nimport { BaseAction } from './baseAction';\n\nexport class Exit extends BaseAction implements Action {\n type: ActionType.Exit;\n poolId: string;\n tokenOut: string;\n toInternalBalance: boolean;\n opRef: OutputReference;\n\n constructor(\n swap: SwapV2,\n mainTokenInIndex: number,\n mainTokenOutIndex: number,\n public opRefKey: number,\n assets: string[],\n slippage: string,\n user: string,\n relayerAddress: string\n ) {\n super(\n mainTokenInIndex,\n mainTokenOutIndex,\n swap.assetInIndex,\n swap.assetOutIndex,\n swap.amount,\n swap.returnAmount ?? '0',\n opRefKey,\n slippage,\n user,\n relayerAddress\n );\n this.type = ActionType.Exit;\n this.poolId = swap.poolId;\n this.tokenOut = assets[swap.assetOutIndex];\n this.toInternalBalance = this.getToInternal(this.hasTokenOut);\n this.opRef = this.opRefStart;\n }\n\n public callData(\n pool: SubgraphPoolBase,\n wrappedNativeAsset: string\n ): CallData {\n const assets = pool.tokensList;\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // tokens must have same order as pool getTokens\n const [sortedTokens] = assetHelpers.sortTokens(assets) as [string[]];\n const exitToken = this.tokenOut;\n const exitTokenIndex = sortedTokens.findIndex(\n (t) => t.toLowerCase() === exitToken.toLowerCase()\n );\n const minAmountsOut = Array(assets.length).fill('0');\n // Variable amount of token out (this has slippage applied)\n minAmountsOut[exitTokenIndex] = this.minOut;\n // Uses exact amount in\n const bptAmtIn = this.amountIn;\n const userData = WeightedPoolEncoder.exitExactBPTInForOneTokenOut(\n bptAmtIn,\n exitTokenIndex\n );\n const params: ExitPoolData = {\n assets: sortedTokens,\n minAmountsOut,\n userData,\n toInternalBalance: this.toInternalBalance,\n poolId: this.poolId,\n poolKind: this.getPoolKind(pool.poolType),\n sender: this.sender,\n recipient: this.receiver,\n outputReferences: this.opRef.key ? [this.opRef] : [],\n exitPoolRequest: {} as ExitPoolRequest,\n };\n const exitPoolInput = Relayer.formatExitPoolInput(params);\n const callData = Relayer.encodeExitPool(exitPoolInput);\n return {\n params,\n encoded: callData,\n };\n }\n\n public getAmountIn(): string {\n return this.hasTokenIn ? this.amountIn : '0';\n }\n\n public getAmountOut(): string {\n return this.hasTokenOut ? this.minOut : '0';\n }\n}\n","import { SubgraphPoolBase, SwapV2 } from '@balancer-labs/sor';\nimport {\n Relayer,\n EncodeJoinPoolInput,\n OutputReference,\n} from '@/modules/relayer/relayer.module';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { AssetHelpers } from '@/lib/utils';\nimport { ActionType, Action, CallData } from './types';\nimport { BaseAction } from './baseAction';\n\nexport class Join extends BaseAction implements Action {\n type: ActionType.Join;\n poolId: string;\n tokenIn: string;\n opRef: OutputReference;\n fromInternal;\n\n constructor(\n swap: SwapV2,\n mainTokenInIndex: number,\n mainTokenOutIndex: number,\n public opRefKey: number,\n assets: string[],\n slippage: string,\n user: string,\n relayerAddress: string\n ) {\n super(\n mainTokenInIndex,\n mainTokenOutIndex,\n swap.assetInIndex,\n swap.assetOutIndex,\n swap.amount,\n swap.returnAmount ?? '0',\n opRefKey,\n slippage,\n user,\n relayerAddress\n );\n this.type = ActionType.Join;\n this.poolId = swap.poolId;\n this.tokenIn = assets[swap.assetInIndex];\n this.fromInternal = this.getFromInternal(this.hasTokenIn);\n this.opRef = this.opRefStart;\n }\n\n public callData(\n pool: SubgraphPoolBase,\n wrappedNativeAsset: string\n ): CallData {\n const assets = pool.tokensList;\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // tokens must have same order as pool getTokens\n const [sortedTokens] = assetHelpers.sortTokens(assets) as [string[]];\n const joinToken = this.tokenIn;\n const joinTokenIndex = sortedTokens.findIndex(\n (t) => t.toLowerCase() === joinToken.toLowerCase()\n );\n const maxAmountsIn = Array(assets.length).fill('0');\n // Uses exact amounts of tokens in\n maxAmountsIn[joinTokenIndex] = this.amountIn;\n // Variable amount of BPT out (this has slippage applied)\n const bptAmountOut = this.minOut;\n const userData = WeightedPoolEncoder.joinExactTokensInForBPTOut(\n maxAmountsIn,\n bptAmountOut\n );\n const params: EncodeJoinPoolInput = {\n poolId: this.poolId,\n sender: this.sender,\n recipient: this.receiver,\n kind: this.getPoolKind(pool.poolType),\n joinPoolRequest: {\n assets: sortedTokens,\n maxAmountsIn,\n userData,\n fromInternalBalance: this.fromInternal,\n },\n value: '0',\n outputReference: this.opRef.key ? this.opRef.key.toString() : '0',\n };\n const callData = Relayer.encodeJoinPool(params);\n\n return {\n params,\n encoded: callData,\n };\n }\n\n public getAmountIn(): string {\n return this.hasTokenIn ? this.amountIn : '0';\n }\n\n public getAmountOut(): string {\n return this.hasTokenOut ? this.minOut : '0';\n }\n}\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { MaxUint256, MaxInt256 } from '@ethersproject/constants';\nimport { SubgraphPoolBase, SwapV2 } from '@balancer-labs/sor';\nimport {\n Relayer,\n EncodeBatchSwapInput,\n OutputReference,\n} from '@/modules/relayer/relayer.module';\nimport { FundManagement, SwapType } from '../../types';\nimport { ActionType, Action, CallData } from './types';\nimport { BaseAction } from './baseAction';\n\nexport class Swap extends BaseAction implements Action {\n type: ActionType.BatchSwap;\n swaps: SwapV2[];\n limits: BigNumber[];\n private approveTokens: string[] = [];\n opRef: OutputReference[] = [];\n fromInternal;\n toInternal;\n\n constructor(\n swap: SwapV2,\n private mainTokenInIndex: number,\n private mainTokenOutIndex: number,\n public opRefKey: number,\n private assets: string[],\n private slippage: string,\n private pools: SubgraphPoolBase[],\n private user: string,\n private relayer: string\n ) {\n super(\n mainTokenInIndex,\n mainTokenOutIndex,\n swap.assetInIndex,\n swap.assetOutIndex,\n swap.amount,\n swap.returnAmount ?? '0',\n opRefKey,\n slippage,\n user,\n relayer\n );\n this.type = ActionType.BatchSwap;\n // Updates swap data to use chainedRef if required\n this.swaps = [{ ...swap, amount: this.amountIn }];\n const isBptIn = this.isBpt(pools, assets[swap.assetInIndex]);\n if (isBptIn) {\n // Older pools don't have pre-approval so need to add this as a step\n this.approveTokens.push(assets[swap.assetInIndex]);\n }\n this.fromInternal = this.getFromInternal(this.hasTokenIn, isBptIn);\n const isBptOut = this.isBpt(pools, assets[swap.assetOutIndex]);\n this.toInternal = this.getToInternal(this.hasTokenOut, isBptOut);\n this.limits = this.getLimits(\n assets,\n swap.assetInIndex,\n swap.assetOutIndex,\n swap.amount,\n this.hasTokenIn,\n this.hasTokenOut,\n this.minOut\n );\n if (this.opRefStart.index) {\n this.opRef.push(this.opRefStart);\n }\n }\n\n private getLimits(\n assets: string[],\n assetInIndex: number,\n assetOutIndex: number,\n swapAmount: string,\n hasTokenIn: boolean,\n hasTokenOut: boolean,\n minOut: string\n ): BigNumber[] {\n const limits = assets.map(() => BigNumber.from(0));\n // tokenIn/Out will come from/go to the user. Any other tokens are intermediate and will be from/to Relayer\n if (hasTokenIn) {\n limits[assetInIndex] = BigNumber.from(swapAmount);\n } else {\n // This will be a chained swap/input amount\n limits[assetInIndex] = MaxInt256;\n }\n if (hasTokenOut) {\n limits[assetOutIndex] = BigNumber.from(minOut).mul(-1);\n }\n return limits;\n }\n\n private updateLimits(limits: BigNumber[], newSwap: Swap): void {\n if (newSwap.hasTokenIn) {\n // We need to add amount for each swap that uses tokenIn to get correct total\n limits[newSwap.swaps[0].assetInIndex] = limits[\n newSwap.swaps[0].assetInIndex\n ].add(newSwap.amountIn);\n }\n if (newSwap.hasTokenOut) {\n // We need to add amount for each swap that uses tokenOut to get correct total (should be negative)\n limits[newSwap.swaps[0].assetOutIndex] = limits[\n newSwap.swaps[0].assetOutIndex\n ].sub(newSwap.minOut);\n }\n }\n\n isChainedSwap(swap: Swap): boolean {\n return (\n this.opRef[this.swaps.length - 1] &&\n this.toInternal === swap.fromInternal &&\n this.receiver === swap.sender &&\n this.opRef[this.swaps.length - 1].key.toString() === swap.amountIn\n );\n }\n\n // If swap has different send/receive params than previous then it will need to be done separately\n canAddSwap(newSwap: Swap): boolean {\n if (this.isChainedSwap(newSwap)) return true;\n return (\n newSwap.fromInternal === this.fromInternal &&\n newSwap.toInternal === this.toInternal &&\n newSwap.receiver === this.receiver &&\n newSwap.sender === this.sender\n );\n }\n\n callData(): CallData {\n const calls: string[] = [];\n\n for (const token of this.approveTokens) {\n // If swap tokenIn is a BPT then:\n // new pools have automatic infinite vault allowance, but not old ones\n // const key = Relayer.fromChainedReference(action.swaps[0].amount);\n // const readOnlyRef = Relayer.toChainedReference(key, false);\n // const approval = Relayer.encodeApproveVault(token, readOnlyRef.toString());\n // TODO fix approval amount\n // TODO only approve once\n const approval = Relayer.encodeApproveVault(token, MaxUint256.toString());\n calls.push(approval);\n }\n\n const funds: FundManagement = {\n sender: this.sender,\n recipient: this.receiver,\n fromInternalBalance: this.fromInternal,\n toInternalBalance: this.toInternal,\n };\n const batchSwapInput: EncodeBatchSwapInput = {\n swapType: SwapType.SwapExactIn,\n swaps: this.swaps,\n assets: this.assets,\n funds,\n limits: this.limits.map((l) => l.toString()),\n deadline: BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value: '0',\n outputReferences: this.opRef,\n };\n\n const encodedBatchSwap = Relayer.encodeBatchSwap(batchSwapInput);\n calls.push(encodedBatchSwap);\n return {\n params: batchSwapInput,\n encoded: calls,\n };\n }\n getAmountIn(): string {\n return this.limits[this.mainTokenInIndex].toString();\n }\n getAmountOut(): string {\n return this.limits[this.mainTokenOutIndex].abs().toString();\n }\n\n copy(): Swap {\n return new Swap(\n this.swaps[0],\n this.mainTokenInIndex,\n this.mainTokenOutIndex,\n this.opRefKey,\n this.assets,\n this.slippage,\n this.pools,\n this.user,\n this.relayer\n );\n }\n\n addSwap(swap: Swap): void {\n const isChainedSwap = this.isChainedSwap(swap);\n this.swaps.push(swap.swaps[0]);\n // Merge approveTokens without any duplicates\n this.approveTokens = [\n ...new Set([...this.approveTokens, ...swap.approveTokens]),\n ];\n this.toInternal = swap.toInternal;\n this.receiver = swap.receiver;\n this.hasTokenOut = swap.hasTokenOut;\n this.minOut = swap.minOut;\n this.opRef = [...this.opRef, ...swap.opRef];\n if (!isChainedSwap) {\n this.amountIn = BigNumber.from(this.amountIn)\n .add(swap.amountIn)\n .toString();\n }\n this.updateLimits(this.limits, swap);\n }\n\n isBpt(pools: SubgraphPoolBase[], token: string): boolean {\n return pools.some((p) => p.address.toLowerCase() === token.toLowerCase());\n }\n}\n","import { ActionType, Actions } from './types';\nimport { Swap } from './swap';\n\n/**\n * Categorize each action into a Join, Middle or Exit.\n * @param actions\n * @returns\n */\nexport function categorizeActions(actions: Actions[]): Actions[] {\n const enterActions: Actions[] = [];\n const exitActions: Actions[] = [];\n const middleActions: Actions[] = [];\n for (const a of actions) {\n if (a.type === ActionType.Exit || a.type === ActionType.Join) {\n // joins/exits with tokenIn can always be done first\n if (a.hasTokenIn) enterActions.push(a);\n // joins/exits with tokenOut (and not tokenIn) can always be done last\n else if (a.hasTokenOut) exitActions.push(a);\n else middleActions.push(a);\n }\n // All other actions will be chained inbetween\n else middleActions.push(a);\n }\n const allActions: Actions[] = [\n ...enterActions,\n ...middleActions,\n ...exitActions,\n ];\n return allActions;\n}\n\n/**\n * This aims to minimise the number of Actions the Relayer multicall needs to call by batching sequential swaps together.\n * @param actions\n * @param assets\n * @returns\n */\nexport function batchSwapActions(allActions: Actions[]): Actions[] {\n /*\n batchSwaps are a collection of swaps that can all be called in a single batchSwap\n Can batch all swaps with same source\n Any swap without tokenIn && not BPT should be coming from internal balances\n Any swap with tokenIn or BPT should be coming from external balances\n */\n const orderedActions: Actions[] = [];\n let batchedSwaps: Swap | undefined = undefined;\n\n for (const a of allActions) {\n if (a.type === ActionType.BatchSwap) {\n if (!batchedSwaps) {\n batchedSwaps = a.copy();\n } else {\n if (batchedSwaps.canAddSwap(a)) {\n batchedSwaps.addSwap(a);\n } else {\n orderedActions.push(batchedSwaps);\n batchedSwaps = a.copy();\n }\n }\n } else {\n // Non swap action\n if (batchedSwaps) {\n orderedActions.push(batchedSwaps);\n // new batchSwap collection as there is a chained join/exit inbetween\n batchedSwaps = undefined;\n }\n orderedActions.push(a);\n }\n }\n if (batchedSwaps) orderedActions.push(batchedSwaps);\n\n return orderedActions;\n}\n\n/**\n * Organise Actions into order with least amount of calls.\n * @param actions\n * @param assets\n * @returns\n */\nexport function orderActions(actions: Actions[]): Actions[] {\n const categorizedActions = categorizeActions(actions);\n const orderedActions = batchSwapActions(categorizedActions);\n return orderedActions;\n}\n","import { Interface } from '@ethersproject/abi';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport {\n SubgraphPoolBase,\n SwapInfo,\n SwapTypes,\n SwapV2,\n} from '@balancer-labs/sor';\nimport {\n Relayer,\n EncodeJoinPoolInput,\n EncodeBatchSwapInput,\n ExitPoolData,\n} from '@/modules/relayer/relayer.module';\nimport { getPoolAddress } from '@/pool-utils';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { orderActions, ActionType, Actions } from './actions';\n\nimport balancerRelayerAbi from '@/lib/abi/BalancerRelayer.json';\nimport { Join } from './actions/join';\nimport { Exit } from './actions/exit';\nimport { Swap } from './actions/swap';\nimport { Logger } from '@/lib/utils/logger';\n\nconst balancerRelayerInterface = new Interface(balancerRelayerAbi);\n\n// Quickly switch useful debug logs on/off\nconst DEBUG = false;\n\nfunction debugLog(log: string) {\n const logger = Logger.getInstance();\n if (DEBUG) logger.info(log);\n}\n\nexport function canUseJoinExit(\n swapType: SwapTypes,\n tokenIn: string,\n tokenOut: string\n): boolean {\n if (\n swapType === SwapTypes.SwapExactOut ||\n tokenIn.toLowerCase() === AddressZero.toLowerCase() ||\n tokenOut.toLowerCase() === AddressZero.toLowerCase()\n )\n return false;\n else return true;\n}\n\n/**\n * Currently SOR only supports join/exit paths through Weighted pools.\n * Weighted pools should not have preminted BPT so can assume if a swap token is pool address it is a join or exit.\n * @param pools\n * @param swap\n * @param assets\n * @returns\n */\nexport function hasJoinExit(\n pools: SubgraphPoolBase[],\n swap: SwapV2,\n assets: string[]\n): boolean {\n const pool = pools.find((p) => p.id === swap.poolId);\n if (pool?.poolType !== 'Weighted') return false;\n const tokenIn = assets[swap.assetInIndex];\n const tokenOut = assets[swap.assetOutIndex];\n return [tokenIn, tokenOut].includes(pool.address);\n}\n\n/**\n * Finds if a swap returned by SOR is a join by checking if tokenOut === poolAddress\n * @param swap\n * @param assets\n * @returns\n */\nexport function isJoin(\n swap: SwapV2,\n assets: string[],\n poolType: string | undefined\n): boolean {\n if (poolType !== 'Weighted') return false;\n // token[join]bpt\n const tokenOut = assets[swap.assetOutIndex];\n const poolAddress = getPoolAddress(swap.poolId);\n return tokenOut.toLowerCase() === poolAddress.toLowerCase();\n}\n\n/**\n * Finds if a swap returned by SOR is an exit by checking if tokenIn === poolAddress\n * @param swap\n * @param assets\n * @returns\n */\nexport function isExit(\n swap: SwapV2,\n assets: string[],\n poolType: string | undefined\n): boolean {\n if (poolType !== 'Weighted') return false;\n // bpt[exit]token\n const tokenIn = assets[swap.assetInIndex];\n const poolAddress = getPoolAddress(swap.poolId);\n return tokenIn.toLowerCase() === poolAddress.toLowerCase();\n}\n\n/**\n * Find if any of the swaps are join/exits. If yes these swaps should be routed via Relayer.\n * @param pools\n * @param swaps\n * @param assets\n * @returns\n */\nexport function someJoinExit(\n pools: SubgraphPoolBase[],\n swaps: SwapV2[],\n assets: string[]\n): boolean {\n return swaps.some((swap) => {\n return hasJoinExit(pools, swap, assets);\n });\n}\n\n/**\n * Translate each swap into an Action. An Action is a join/exit/swap with the chained output refs.\n * @param swapType\n * @param tokenIn\n * @param tokenOut\n * @param swaps\n * @param assets\n * @param slippage\n * @param pools\n * @param user\n * @param relayer\n * @returns\n */\nexport function getActions(\n tokenIn: string,\n tokenOut: string,\n swaps: SwapV2[],\n assets: string[],\n slippage: string,\n pools: SubgraphPoolBase[],\n user: string,\n relayer: string\n): Actions[] {\n const tokenInIndex = assets.findIndex(\n (t) => t.toLowerCase() === tokenIn.toLowerCase()\n );\n const tokenOutIndex = assets.findIndex(\n (t) => t.toLowerCase() === tokenOut.toLowerCase()\n );\n const actions: Actions[] = [];\n let opRefKey = 0;\n for (const swap of swaps) {\n const poolType = pools.find((p) => p.id === swap.poolId)?.poolType;\n if (isJoin(swap, assets, poolType)) {\n const newJoin = new Join(\n swap,\n tokenInIndex,\n tokenOutIndex,\n opRefKey,\n assets,\n slippage,\n user,\n relayer\n );\n opRefKey = newJoin.nextOpRefKey;\n actions.push(newJoin);\n continue;\n } else if (isExit(swap, assets, poolType)) {\n const newExit = new Exit(\n swap,\n tokenInIndex,\n tokenOutIndex,\n opRefKey,\n assets,\n slippage,\n user,\n relayer\n );\n opRefKey = newExit.nextOpRefKey;\n actions.push(newExit);\n continue;\n } else {\n const newSwap = new Swap(\n swap,\n tokenInIndex,\n tokenOutIndex,\n opRefKey,\n assets,\n slippage,\n pools,\n user,\n relayer\n );\n opRefKey = newSwap.nextOpRefKey;\n actions.push(newSwap);\n continue;\n }\n }\n return actions;\n}\n\n/**\n * Given swapInfo from the SOR construct the Relayer multicall to execture swaps/joins/exits.\n * @param swapInfo Returned from SOR\n * @param swapType Only supports ExactIn\n * @param pools Pool info from SOR\n * @param user Address of user\n * @param relayerAddress Address of Relayer (>=V4)\n * @param wrappedNativeAsset Address of Native asset\n * @param slippage [bps], eg: 1 === 0.01%, 100 === 1%\n * @param authorisation Encoded authorisation call.\n * @returns\n */\nexport function buildRelayerCalls(\n swapInfo: SwapInfo,\n pools: SubgraphPoolBase[],\n user: string,\n relayerAddress: string,\n wrappedNativeAsset: string,\n slippage: string,\n authorisation: string | undefined\n): {\n to: string;\n data: string;\n rawCalls: string[];\n inputs: (EncodeBatchSwapInput | ExitPoolData | EncodeJoinPoolInput)[];\n} {\n // For each 'swap' create a swap/join/exit action\n const actions = getActions(\n swapInfo.tokenIn,\n swapInfo.tokenOut,\n swapInfo.swaps,\n swapInfo.tokenAddresses,\n slippage,\n pools,\n user,\n relayerAddress\n );\n // Arrange action into order that will create minimal amount of calls\n const orderedActions = orderActions(actions);\n\n const calls: string[] = [];\n const inputs: (EncodeBatchSwapInput | ExitPoolData | EncodeJoinPoolInput)[] =\n [];\n if (authorisation)\n // Uses relayer to approve itself to act in behalf of the user\n calls.push(\n Relayer.encodeSetRelayerApproval(relayerAddress, true, authorisation)\n );\n\n // Create encoded call for each action\n for (const action of orderedActions) {\n if (action.type === ActionType.Exit || action.type === ActionType.Join) {\n const pool = pools.find((p) => p.id === action.poolId);\n if (pool === undefined)\n throw new BalancerError(BalancerErrorCode.NO_POOL_DATA);\n const { params, encoded } = action.callData(pool, wrappedNativeAsset);\n calls.push(encoded as string);\n inputs.push(params);\n }\n if (action.type === ActionType.BatchSwap) {\n const { params, encoded } = action.callData();\n calls.push(...encoded);\n inputs.push(params);\n }\n }\n\n // Safety check to make sure amounts/limits from calls match expected\n checkAmounts(\n orderedActions.map((a) => BigNumber.from(a.getAmountIn())),\n orderedActions.map((a) => BigNumber.from(a.getAmountOut())),\n swapInfo,\n slippage\n );\n // encode relayer multicall\n const callData = balancerRelayerInterface.encodeFunctionData('multicall', [\n calls,\n ]);\n\n return {\n to: relayerAddress,\n data: callData,\n rawCalls: calls,\n inputs,\n };\n}\n\nfunction checkAmounts(\n amountsIn: BigNumber[],\n amountsOut: BigNumber[],\n swapInfo: SwapInfo,\n slippage: string\n): void {\n const totalIn = amountsIn.reduce(\n (total = BigNumber.from(0), amount) => (total = total.add(amount))\n );\n const totalOut = amountsOut.reduce(\n (total = BigNumber.from(0), amount) => (total = total.add(amount))\n );\n // totalIn should equal the original input swap amount\n // totalOut should equal the return amount from SOR minus any slippage allowance\n debugLog(`${totalIn.toString()} totalIn`);\n debugLog(`${swapInfo.swapAmount.toString()} swapInfo.swapAmount`);\n debugLog(`${totalOut.toString()} totalOut`);\n debugLog(\n `${subSlippage(\n swapInfo.returnAmount,\n BigNumber.from(slippage)\n ).toString()} slippage`\n );\n debugLog(`${swapInfo.returnAmount.toString()} swapInfo.returnAmount`);\n const diffOut = totalOut.sub(\n subSlippage(swapInfo.returnAmount, BigNumber.from(slippage))\n );\n if (!totalIn.eq(swapInfo.swapAmount) || !diffOut.lt(`3`))\n throw new BalancerError(BalancerErrorCode.RELAY_SWAP_AMOUNTS);\n /* ExactOut case\n // totalIn should equal the return amount from SOR (this is the amount in) plus any slippage allowance\n // totalOut should equal the original input swap amount (the exact amount out)\n if (\n !totalIn.eq(\n addSlippage(swapInfo.returnAmount, BigNumber.from(slippage))\n ) ||\n !totalOut.eq(swapInfo.swapAmount)\n )\n throw new BalancerError(BalancerErrorCode.RELAY_SWAP_AMOUNTS);\n */\n}\n","import { ClaimService, IClaimService } from '@/modules/claims/ClaimService';\nimport { BalancerSdkConfig, BalancerNetworkConfig } from '@/types';\nimport { Swaps } from './swaps/swaps.module';\nimport { Relayer } from './relayer/relayer.module';\nimport { Subgraph } from './subgraph/subgraph.module';\nimport { Sor } from './sor/sor.module';\nimport { getNetworkConfig } from './sdk.helpers';\nimport { Pricing } from './pricing/pricing.module';\nimport { ContractInstances, Contracts } from './contracts/contracts.module';\nimport { Pools } from './pools';\nimport { Data } from './data';\nimport { VaultModel } from './vaultModel/vaultModel.module';\nimport { JsonRpcProvider } from '@ethersproject/providers';\nimport { Migrations } from './liquidity-managment/migrations';\nimport { Logger } from '@/lib/utils/logger';\n\nexport interface BalancerSDKRoot {\n config: BalancerSdkConfig;\n sor: Sor;\n subgraph: Subgraph;\n pools: Pools;\n data: Data;\n swaps: Swaps;\n relayer: Relayer;\n networkConfig: BalancerNetworkConfig;\n provider: JsonRpcProvider;\n claimService?: IClaimService;\n}\n\nexport class BalancerSDK implements BalancerSDKRoot {\n readonly swaps: Swaps;\n readonly relayer: Relayer;\n readonly pricing: Pricing;\n readonly pools: Pools;\n readonly data: Data;\n balancerContracts: Contracts;\n vaultModel: VaultModel;\n readonly networkConfig: BalancerNetworkConfig;\n readonly provider: JsonRpcProvider;\n readonly claimService?: IClaimService;\n readonly migrationService?: Migrations;\n\n constructor(\n public config: BalancerSdkConfig,\n public sor = new Sor(config),\n public subgraph = new Subgraph(config)\n ) {\n const logger = Logger.getInstance();\n logger.setLoggingEnabled(!!config.enableLogging);\n this.networkConfig = getNetworkConfig(config);\n this.provider = sor.provider as JsonRpcProvider;\n\n this.balancerContracts = new Contracts(\n this.networkConfig.addresses.contracts,\n sor.provider\n );\n\n this.data = new Data(\n this.networkConfig,\n sor.provider,\n this.balancerContracts,\n config.subgraphQuery,\n config.coingecko\n );\n\n this.swaps = new Swaps(this.config);\n this.relayer = new Relayer();\n this.pricing = new Pricing(config, this.swaps);\n\n this.pools = new Pools(\n this.networkConfig,\n this.data,\n this.balancerContracts\n );\n\n if (this.data.liquidityGauges) {\n this.claimService = new ClaimService(\n this.data.liquidityGauges,\n this.data.feeDistributor,\n this.networkConfig.chainId,\n this.contracts.multicall,\n this.networkConfig.addresses.contracts.gaugeClaimHelper,\n this.networkConfig.addresses.contracts.balancerMinter\n );\n this.migrationService = new Migrations({\n relayerAddress: this.networkConfig.addresses.contracts.balancerRelayer,\n poolsRepository: this.data.pools,\n gaugesRepository: this.data.liquidityGauges.subgraph,\n provider: this.provider,\n });\n }\n this.vaultModel = new VaultModel(\n this.data.poolsForSimulations,\n this.networkConfig.addresses.tokens.wrappedNativeAsset\n );\n }\n\n /**\n * Expose balancer contracts, e.g. Vault, LidoRelayer.\n */\n get contracts(): ContractInstances {\n return this.balancerContracts.contracts;\n }\n}\n","import { Findable } from '../types';\nimport { Pool } from '@/types';\nimport {\n PoolAttribute,\n PoolRepository,\n PoolsFallbackRepositoryOptions,\n PoolsRepositoryFetchOptions,\n} from './types';\nimport { Logger } from '@/lib/utils/logger';\n\n/**\n * The fallback provider takes multiple PoolRepository's in an array and uses them in order\n * falling back to the next one if a request times out.\n *\n * This is useful for using the Balancer API while being able to fall back to the graph if it is down\n * to ensure Balancer is maximally decentralized.\n **/\nexport class PoolsFallbackRepository implements Findable {\n currentProviderIdx: number;\n timeout: number;\n\n constructor(\n private readonly providers: PoolRepository[],\n options: PoolsFallbackRepositoryOptions = {}\n ) {\n this.currentProviderIdx = 0;\n this.timeout = options.timeout || 10000;\n }\n\n async fetch(options?: PoolsRepositoryFetchOptions): Promise {\n return this.fallbackQuery('fetch', [options]);\n }\n\n get currentProvider(): PoolRepository | undefined {\n if (\n !this.providers.length ||\n this.currentProviderIdx >= this.providers.length\n ) {\n return;\n }\n\n return this.providers[this.currentProviderIdx];\n }\n\n async find(id: string): Promise {\n return this.fallbackQuery('find', [id]);\n }\n\n async findBy(\n attribute: PoolAttribute,\n value: string\n ): Promise {\n return this.fallbackQuery('findBy', [attribute, value]);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n async fallbackQuery(func: string, args: unknown[]): Promise {\n if (this.currentProviderIdx >= this.providers.length) {\n throw new Error('No working providers found');\n }\n\n let result;\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const currentProvider = this.providers[this.currentProviderIdx] as any;\n result = await Promise.race([\n // eslint-disable-next-line prefer-spread\n currentProvider[func].apply(currentProvider, args),\n new Promise((_, reject) =>\n setTimeout(() => reject(new Error('timeout')), this.timeout)\n ),\n ]);\n } catch (e: unknown) {\n const message = (e as Error).message;\n if (message === 'timeout') {\n const logger = Logger.getInstance();\n logger.warn(\n 'Provider ' +\n this.currentProviderIdx +\n ' timed out, falling back to next provider'\n );\n } else {\n const logger = Logger.getInstance();\n logger.warn(\n `Provider ${this.currentProviderIdx} failed with error, falling back to next provider.`\n );\n logger.warn(message);\n }\n this.currentProviderIdx++;\n result = await this.fallbackQuery.call(this, func, args);\n }\n\n return result;\n }\n}\n","import { Findable, Pool, Searchable } from '@/types';\nimport { PoolAttribute } from './types';\n\nexport class PoolsStaticRepository\n implements Findable, Searchable\n{\n constructor(private pools: Pool[]) {}\n\n async find(id: string): Promise {\n return this.pools.find((pool) => {\n return pool.id.toLowerCase() === id.toLowerCase();\n });\n }\n\n async findBy(\n attribute: PoolAttribute,\n value: string\n ): Promise {\n return this.pools.find((pool) => {\n return pool[attribute] === value;\n });\n }\n\n async all(): Promise {\n return this.pools;\n }\n\n async where(filter: (pool: Pool) => boolean): Promise {\n return (await this.all()).filter(filter);\n }\n}\n","import { Findable, Price, TokenPrices } from '@/types';\n\nexport class StaticTokenPriceProvider implements Findable {\n tokenPrices: TokenPrices;\n constructor(tokenPrices: TokenPrices) {\n this.tokenPrices = Object.fromEntries(\n Object.entries(tokenPrices).map(([address, price]) => {\n return [address.toLowerCase(), price];\n })\n );\n }\n\n async find(address: string): Promise {\n const lowercaseAddress = address.toLowerCase();\n const price = this.tokenPrices[lowercaseAddress];\n if (!price) return;\n return price;\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute != 'address') {\n return undefined;\n }\n\n return this.find(value);\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { Zero, WeiPerEther as ONE } from '@ethersproject/constants';\n\n// Should match MAX_WEIGHTED_TOKENS from v2-helpers/constants\n// Including would introduce a dependency\nconst MaxWeightedTokens = 100;\n\n/**\n * Normalize an array of token weights to ensure they sum to `1e18`\n * @param weights - an array of token weights to be normalized\n * @returns an equivalent set of normalized weights\n */\nexport function toNormalizedWeights(weights: BigNumber[]): BigNumber[] {\n // When the number is exactly equal to the max, normalizing with common inputs\n // leads to a value < 0.01, which reverts. In this case fill in the weights exactly.\n if (weights.length == MaxWeightedTokens) {\n return Array(MaxWeightedTokens).fill(ONE.div(MaxWeightedTokens));\n }\n\n const sum = weights.reduce((total, weight) => total.add(weight), Zero);\n if (sum.eq(ONE)) return weights;\n\n const normalizedWeights = [];\n let normalizedSum = Zero;\n for (let index = 0; index < weights.length; index++) {\n if (index < weights.length - 1) {\n normalizedWeights[index] = weights[index].mul(ONE).div(sum);\n normalizedSum = normalizedSum.add(normalizedWeights[index]);\n } else {\n normalizedWeights[index] = ONE.sub(normalizedSum);\n }\n }\n\n return normalizedWeights;\n}\n\n/**\n * Check whether a set of weights are normalized\n * @param weights - an array of potentially unnormalized weights\n * @returns a boolean of whether the weights are normalized\n */\nexport const isNormalizedWeights = (weights: BigNumberish[]): boolean => {\n const totalWeight = weights.reduce(\n (total: BigNumber, weight) => total.add(weight),\n Zero\n );\n return totalWeight.eq(ONE);\n};\n"],"names":["BasePoolExitKind","StablePoolJoinKind","StablePhantomPoolJoinKind","StablePoolExitKind","WeightedPoolJoinKind","WeightedPoolExitKind","BasePoolEncoder","recoveryModeExit","bptAmountIn","defaultAbiCoder","encode","RECOVERY_MODE","StablePoolEncoder","constructor","joinInit","amountsIn","INIT","joinCollectProtocolFees","COLLECT_PROTOCOL_FEES","joinExactTokensInForBPTOut","minimumBPT","EXACT_TOKENS_IN_FOR_BPT_OUT","joinTokenInForExactBPTOut","bptAmountOut","enterTokenIndex","TOKEN_IN_FOR_EXACT_BPT_OUT","exitExactBPTInForOneTokenOut","exitTokenIndex","EXACT_BPT_IN_FOR_ONE_TOKEN_OUT","exitExactBPTInForTokensOut","EXACT_BPT_IN_FOR_TOKENS_OUT","exitBPTInForExactTokensOut","amountsOut","maxBPTAmountIn","BPT_IN_FOR_EXACT_TOKENS_OUT","WeightedPoolEncoder","joinAllTokensInForExactBPTOut","ALL_TOKENS_IN_FOR_EXACT_BPT_OUT","ManagedPoolEncoder","exitForManagementFees","MANAGEMENT_FEE_TOKENS_OUT","ComposableStablePoolJoinKind","ComposableStablePoolExitKind","ComposableStablePoolEncoder","exitExactBPTInForAllTokensOut","EXACT_BPT_IN_FOR_ALL_TOKENS_OUT","isProduction","process","env","NODE_ENV","prefix","invariant","condition","message","Error","provided","value","concat","getPoolAddress","poolId","length","slice","getPoolSpecialization","specializationCode","parseInt","getPoolNonce","BigNumber","from","Network","POOLS_GENERIC","IdsMap","Pagination","PerPage","PerPool","PerPoolInitial","DelegateOwner","ZeroAddress","DynamicFees","Gauntlet","BlockList","ExcludedPoolTypes","Stable","AllowList","Investment","Factories","Stakable","Metadata","name","hasIcon","POOLS_MAP","GOERLI","staBAL","bbAaveUSD","v1","v2","veBAL","MAINNET","POLYGON","xMatic","stMatic","mai4","maiBbaUsd","ARBITRUM","GNOSIS","PoolGaugesAttributes","PoolShareAttributes","GaugeShareAttributes","PoolSpecialization","UserBalanceOpKind","PoolBalanceOpKind","PoolType","Logger","this","enableLogging","static","instance","setLoggingEnabled","enabled","info","warn","console","error","time","timeEnd","transposeMatrix","matrix","map","_","columnIndex","row","AssetHelpers","wethAddress","ETH","AddressZero","isETH","token","isEqual","isWETH","WETH","translateToERC20","getAddress","sortTokens","tokens","others","forEach","array","erc20Tokens","sortedTranspose","sort","tokenA","tokenB","toLowerCase","cmpTokens","sortedErc20s","sortedOthers","includes","addressA","addressB","balancerErrorCodes","BalancerErrors","async","accountToAddress","account","Signer","isSigner","address","RelayerAction","isErrorCode","errorCode","replace","Object","keys","parseErrorCode","actualError","tryParseErrorCode","isBalancerError","values","encodeError","encodedError","entries","find","RelayerAuthorization","encodeCalldataAuthorization","calldata","deadline","signature","encodedDeadline","hexZeroPad","hexValue","v","r","s","splitSignature","signJoinAuthorization","validator","user","allowedSender","allowedCalldata","nonce","signAuthorizationFor","JoinPool","signExitAuthorization","ExitPool","signSwapAuthorization","Swap","signBatchSwapAuthorization","BatchSwap","signSetRelayerApprovalAuthorization","SetRelayerApproval","type","MAX_DEADLINE","MaxUint256","chainId","provider","getNetwork","userAddress","getNextNonce","domain","version","verifyingContract","types","sender","toString","_signTypedData","BalancerMinterAuthorization","signSetMinterApproval","minterContract","minter","approval","SetMinterApproval","BZERO","BigInt","BONE","ONE","_require","b","_computeScalingFactor","tokenDecimals","decimalsDifference","_upscale","amount","scalingFactor","SolidityMaths","mulDownFixed","_upscaleArray","amounts","scalingFactors","upscaledAmounts","Array","i","_downscaleDown","divDownFixed","_downscaleDownArray","downscaledAmounts","a","c","args","reduce","previous","current","roundUp","divUp","divDown","product","aInflated","x","y","raw","LogExpMath","pow","maxError","add","mulUpFixed","MAX_POW_RELATIVE_ERROR","ONE_18","x_int256","MILD_EXPONENT_BOUND","y_int256","logx_times_y","LN_36_LOWER_BOUND","LN_36_UPPER_BOUND","ln_36_x","_ln_36","_ln","MIN_NATURAL_EXPONENT","MAX_NATURAL_EXPONENT","exp","firstAN","x0","a0","x1","a1","ONE_20","x2","a2","x3","a3","x4","a4","x5","a5","x6","a6","x7","a7","x8","a8","x9","a9","term","seriesSum","z","ONE_36","z_squared","num","sum","a10","x10","a11","x11","parsePoolInfo","pool","wrappedNativeAsset","unwrapNativeAsset","poolTokens","decimals","_a","balancesEvm","parseFixed","balance","toBigInt","weights","weight","priceRates","priceRate","scalingFactorsRaw","d","sf","upScaledBalances","assetHelpers","ampWithPrecision","amp","higherBalanceTokenIndex","indexOf","max","scalingFactorsWithoutBpt","scalingFactorsRawWithoutBpt","poolTokensWithoutBpt","balancesEvmWithoutBpt","priceRatesWithoutBpt","upScaledBalancesWithoutBpt","bptIndex","splice","swapFeeEvm","swapFee","totalSharesEvm","totalShares","TOKENS_GENERIC","Popular","Symbols","Addresses","nativeAsset","wNativeAsset","BAL","TOKENS_MAP","bbaUSD","PriceChainMap","bbaUSDv2","TOKENS","networkId","_permanentCensorErrors","_censorErrors","LogLevels","debug","default","warning","off","_logLevel","_globalLogger","_normalizeError","missing","form","normalize","push","join","String","fromCharCode","_checkNormalize","LogLevel","ErrorCode","HEX","defineProperty","enumerable","writable","_log","logLevel","level","throwArgumentError","log","apply","levels","DEBUG","INFO","WARNING","makeError","code","params","errors","UNKNOWN_ERROR","messageDetails","key","Uint8Array","hex","JSON","stringify","reason","url","NUMERIC_FAULT","fault","CALL_EXCEPTION","INSUFFICIENT_FUNDS","MISSING_NEW","NONCE_EXPIRED","REPLACEMENT_UNDERPRICED","TRANSACTION_REPLACED","UNPREDICTABLE_GAS_LIMIT","throwError","INVALID_ARGUMENT","argument","assert","assertArgument","checkNormalize","UNSUPPORTED_OPERATION","operation","checkSafeUint53","checkArgumentCount","count","expectedCount","MISSING_ARGUMENT","UNEXPECTED_ARGUMENT","checkNew","target","kind","checkAbstract","censorship","permanent","globalLogger","logger","names","formatUnits","unitName","index","formatFixed","parseUnits","yieldTokens","waUSDT","waUSDC","waDAI","wamDAI","wamUSDC","wamUSDT","wrappedTokensMap","aToken","underlying","wrappedATokenInterface","Interface","AaveRates","multicall","network","addresses","payload","wrappedATokenAddress","callData","encodeFunctionData","res","callStatic","aggregate","p","parseFloat","wrappedAToken","tokenAddressForPricing","addressMapIn","unwrapToken","addressMap","wrappedAddress","lowercase","toLocaleLowerCase","aaveChain","undefined","aaveWrappedMap","getEthValue","filter","Debouncer","fn","wait","limit","requestSets","promisedCalls","promisedCount","debounceCancel","fetch","attr","_b","Set","size","execute","promise","timeout","resolve","reject","Promise","rej","makePromise","clearTimeout","call","requestAttrs","then","results","catch","response","data","setTimeout","bind","valueWithTrimmedDecimals","RegExp","result","match","parsedValue","_parseFixed","_formatFixed","bpsPerOne","mulSlippage","slippage","mul","div","subSlippage","delta","sub","addSlippage","isSameAddress","address1","address2","insert","arr","newItem","removeItem","newArray","reorderArrays","reference","original","some","indexesOfOriginal","othersResorted","indexOfOriginal","arrIndex","isLinearish","poolType","supportedPoolTypes","findEventInReceiptLogs","receipt","to","contractInterface","logName","event","logs","parseLog","getInstance","parsedLog","getRandomBytes32","fill","Math","random","BalancerAPIArgsFormatter","format","SubgraphArgsFormatter","operatorMap","gt","lt","eq","in","not_in","contains","whereQuery","where","operator","GraphQLArgsBuilder","merge","other","mergedArgs","mergeWith","objValue","srcValue","isArray","formatter","_abi","inputs","components","internalType","stateMutability","anonymous","indexed","outputs","AaveLinearPool__factory","utils","signerOrProvider","Contract","abi","AaveLinearPoolFactory__factory","AaveWrapping__factory","Authoriser__factory","BalancerHelpers__factory","BalancerMinter__factory","BalancerPoolDataQueries__factory","BalancerRelayer__factory","BatchRelayerLibrary__factory","ComposableStablePool__factory","ComposableStablePoolFactory__factory","ConvergentCurvePool__factory","constant","payable","ERC20__factory","ERC4626LinearPool__factory","ERC4626LinearPoolFactory__factory","EulerLinearPool__factory","EulerLinearPoolFactory__factory","FXPool__factory","GaugeClaimHelper__factory","GearboxLinearPool__factory","GearboxLinearPoolFactory__factory","GyroConfig__factory","LidoRelayer__factory","LinearPool__factory","LiquidityGaugeV5__factory","Multicall__factory","Multicall3__factory","StablePool__factory","StaticATokenRateProvider__factory","Vault__factory","WeightedPool__factory","WeightedPoolFactory__factory","YearnLinearPool__factory","YearnLinearPoolFactory__factory","GyroEV2__factory","VeBal__factory","VeDelegationProxy__factory","SwapType","getLimitsForSlippage","tokensIn","tokensOut","swapType","deltas","assets","limits","Zero","tokenIn","slippageAmount","WeiPerEther","SwapExactOut","tokenOut","SwapExactIn","balancerVault","BALANCER_NETWORK_CONFIG","contracts","poolDataQueries","lidoRelayer","veBal","gaugeControllerCheckpointer","veBalProxy","gyroConfigProxy","addressesByNetwork","bal","weth","bbaUsd","bb_a_usd","lbpRaisingTokens","stETH","wstETH","urls","subgraph","gaugesSubgraph","blockNumberSubgraph","thirdParty","coingecko","nativeAssetId","platformId","pools","wETHwstETH","id","poolsToIgnore","sorConnectingTokens","symbol","sorTriPathMidPoolIds","gaugeClaimHelper","erc4626LinearPoolFactory","aaveLinearPoolFactory","OPTIMISM","averageBlockTime","FANTOM","vault","balancerRelayer","balancerHelpers","weightedPoolFactory","composableStablePoolFactory","yearnLinearPoolFactory","SEPOLIA","ZKEVM","balancerMinter","multicallBatchSize","AVALANCHE","BASE","networkAddresses","BalancerErrorCode","BalancerError","super","getMessage","ABOVE_MAX_TOKENS","BELOW_MIN_TOKENS","EXIT_DELTA_AMOUNTS","FEE_PROVIDER_NOT_PROVIDED","GAUGES_HELPER_ADDRESS_NOT_PROVIDED","GAUGES_NOT_FOUND","GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED","GAUGES_REWARD_TOKEN_EMPTY","INPUT_LENGTH_MISMATCH","INPUT_OUT_OF_BOUNDS","INPUT_TOKEN_INVALID","INVALID_PROTOCOL_ID","INVALID_SWAP_FEE_PERCENTAGE","INVALID_WEIGHTS","JOIN_DELTA_AMOUNTS","JOIN_WITH_ZERO_AMOUNT","MISSING_AMP","MISSING_DECIMALS","MISSING_PRICE_RATE","MISSING_TOKENS","MISSING_WEIGHT","NO_POOL_DATA","NO_VALUE_PARAMETER","POOL_DOESNT_EXIST","RELAY_SWAP_AMOUNTS","REWARD_TOKEN_ZERO","TIMESTAMP_IN_THE_FUTURE","TOKEN_MISMATCH","UNSUPPORTED_PAIR","UNSUPPORTED_POOL_TYPE","calcPriceImpact","bptAmount","bptZeroPriceImpact","isJoin","pi","calcPriceImpactJoin","calcPriceImpactExit","AMP_PRECISION","bptSpotPrice","balances","bptSupply","tokenIndexIn","totalCoins","D","numTokens","prevInvariant","ampTimesTotal","P_D","j","_calculateInvariant","S","D_P","alpha","beta","gamma","partial_x","minus_partial_D","divUpFixed","StablePoolPriceImpact","tokenAmounts","StablePoolExit","buildExitExactBPTIn","exiter","bptIn","shouldUnwrapNativeAsset","singleTokenOut","toInternalBalance","checkInputsExactBPTIn","sortedValues","sortValuesExitExactBptIn","minAmountsOut","expectedAmountsOut","singleTokenOutIndex","calcTokenOutGivenExactBptIn","calcTokensOutGivenExactBptIn","userData","encodedData","encodeExitPool","priceImpact","buildExitExactTokensOut","checkInputsExactTokensOut","sortValuesExitExactTokensOut","expectedBPTIn","maxBPTIn","calcBptInGivenExactTokensOut","downScaledAmountsOut","buildRecoveryExit","isNegative","t","tokensList","parsedPoolInfo","upScaledAmountsOut","amountOut","SOR","StableMathBigInt","_calcTokenOutGivenExactBptIn","downscaledAmountOut","amountsOutScaledDown","_calcTokensOutGivenExactBptIn","_calcBptInGivenExactTokensOut","functionName","attributes","recipient","exitPoolRequest","createInterface","StablePoolJoin","buildJoin","joiner","checkInputs","sortValues","expectedBPTOut","minBPTOut","calcBptOutGivenExactTokensIn","encodeJoinPool","sortedAmountsIn","upScaledAmountsIn","_calcBptOutGivenExactTokensIn","joinPoolRequest","maxAmountsIn","fromInternalBalance","StablePoolLiquidity","calcTotal","sumBalance","sumValue","price","usd","avgPrice","SCALING_FACTOR","StablePoolSpotPrice","calcPoolSpotPrice","stablePool","StablePool","fromPool","poolPairData","parsePoolPairData","_spotPriceAfterSwapExactTokenInForTokenOut","ZERO","exit","liquidity","spotPriceCalculator","priceImpactCalculator","PhantomStablePoolSpotPrice","metaStablePool","PhantomStablePool","ComposableStablePoolJoin","sortValuesBasedOnPoolVersion","buildExactTokensInForBPTOut","sortV1","encodeUserDataExactTokensInForBPTOut","assetsWithBpt","encodedUserData","maxAmountsInWithBpt","sortV4","ComposableStablePoolExit","singleTokenOutIndexWithoutBpt","minAmountsOutWithBpt","downscaledAmountsOutWithoutBpt","downscaledAmountsOutWithBpt","checkInputsRecoveryExit","lte","poolTypeVersion","isInRecoveryMode","parsedValues","downscaledAmountsOutWithBptWithRounding","isZero","upScaledAmountsOutWithoutBpt","ComposableStable","WeightedPoolPriceImpact","WeightedPoolExit","WeightedMaths","WeightedPoolJoin","WeightedPoolLiquidity","sumWeight","toFixed","totalWeight","total","WeightedPoolSpotPrice","isBPTAsToken","bptAsToken","weightedPool","WeightedPool","spotPrice","pop","Weighted","MetaStablePoolLiquidity","MetaStablePoolSpotPrice","MetaStablePool","MetaStable","StablePhantomPoolExit","StablePhantomPoolJoin","StablePhantom","LinearPriceImpact","LinearPoolExit","LinearMaths","LinearPoolJoin","LinearPoolLiquidity","LinearPoolSpotPrice","linearPool","LinearPool","Linear","FXExitConcern","FXLiquidityConcern","FXSpotPriceConcern","FXPriceImpactConcern","FXJoinConcern","FX","GyroExitConcern","GyroLiquidityConcern","GyroSpotPriceConcern","GyroPriceImpactConcern","GyroJoinConcern","Gyro","PoolTypeConcerns","config","weighted","stable","composableStable","metaStable","stablePhantom","linear","Liquidity","tokenPrices","parsedTokens","subPoolLiquidity","all","findBy","getLiquidity","totalBPT","bptInParentPool","liquidityInParentPool","totalSubPoolLiquidity","totalLiquidity","subPool","nonPoolTokens","nonPoolTokensWithUpdatedPrice","tokenPrice","latestUSDPrice","parsedTokenLiquidity","filterTokens","obj","populateGauges","gauges","claimableRewards","claimableTokens","gauge","rewards","populateGauge","it","reduceRewardTokens","rewardTokens","liquidityGaugeV5Interface","balancerMinterInterface","gaugeClaimHelperInterface","ClaimService","liquidityGauges","feeDistributor","gaugeClaimHelperAddress","balancerMinterAddress","getGauges","gaugeAddresses","getRewardTokens","retrieveClaimableTokens","retrieveClaimableRewards","getClaimableRewardTokens","flatMap","expectedValues","tokenAddress","every","expectedTokensValue","getClaimableBalances","tokenBalance","claimBalances","paths","getPayload","res0x","path","reduceClaimableRewards","gaugeAddress","getArguments","balAddress","reduceClaimableTokens","queryBatchSwap","vaultContract","swaps","funds","err","__assign","assign","n","arguments","prototype","hasOwnProperty","docCache","Map","fragmentSourceMap","printFragmentWarnings","experimentalFragmentVariables","string","trim","processFragments","ast","seenKeys","definitions","fragmentDefinition","fragmentName","sourceKey","loc","source","body","substring","start","end","sourceKeySet","get","has","set","parseDocument","cacheKey","parsed","parse","allowLegacyFragmentVariables","doc","workSet","node","startToken","endToken","stripLoc","gql","literals","_i","arg","gql_1","extras","clear","resetCaches","disableFragmentWarnings","enableExperimentalFragmentVariables","disableExperimentalFragmentVariables","AmpUpdate_OrderBy","BalancerSnapshot_OrderBy","Balancer_OrderBy","CircuitBreaker_OrderBy","GradualWeightUpdate_OrderBy","InvestType","JoinExit_OrderBy","LatestPrice_OrderBy","ManagementOperation_OrderBy","OperationType","OrderDirection","PoolContract_OrderBy","PoolHistoricalLiquidity_OrderBy","PoolShare_OrderBy","PoolSnapshot_OrderBy","PoolToken_OrderBy","Pool_OrderBy","PriceRateProvider_OrderBy","ProtocolIdData_OrderBy","SwapFeeUpdate_OrderBy","Swap_OrderBy","TokenPrice_OrderBy","TokenSnapshot_OrderBy","Token_OrderBy","TradePairSnapshot_OrderBy","TradePair_OrderBy","UserInternalBalance_OrderBy","User_OrderBy","_SubgraphErrorPolicy_","gql$1","SubgraphPoolShareFragmentDoc","SubgraphPoolFragmentDoc","SubgraphPoolSnapshotFragmentDoc","SubgraphJoinExitFragmentDoc","SubgraphBalancerFragmentDoc","SubgraphTokenPriceFragmentDoc","SubgraphTokenLatestPriceFragmentDoc","SubgraphUserFragmentDoc","PoolShareDocument","PoolSharesDocument","PoolsDocument","AllPoolsDocument","PoolDocument","PoolHistoricalLiquiditiesDocument","PoolSnapshotsDocument","JoinExitsDocument","BalancersDocument","TokenPricesDocument","TokenLatestPricesDocument","TokenLatestPriceDocument","UserDocument","UsersDocument","defaultWrapper","action","_operationName","_operationType","getSdk","client","withWrapper","PoolShare","variables","requestHeaders","wrappedRequestHeaders","request","PoolShares","Pools","AllPools","Pool","PoolHistoricalLiquidities","PoolSnapshots","JoinExits","Balancers","TokenPrices","TokenLatestPrices","TokenLatestPrice","User","Users","Chain","GaugeFactory_OrderBy","GaugeShare_OrderBy","GaugeType_OrderBy","GaugeVote_OrderBy","Gauge_OrderBy","LiquidityGauge_OrderBy","LockSnapshot_OrderBy","OmniVotingEscrowLock_OrderBy","RewardToken_OrderBy","RootGauge_OrderBy","SingleRecipientGauge_OrderBy","VotingEscrowLock_OrderBy","VotingEscrow_OrderBy","SubgraphGaugeShareFragmentDoc","SubgraphLiquidityGaugeFragmentDoc","SubgraphPoolWithPreferentialGaugeFragmentDoc","GaugeShareDocument","GaugeSharesDocument","LiquidityGaugesDocument","PoolGaugesDocument","createSubgraphClient","subgraphUrl","GraphQLClient","createGaugesClient","GaugeShare","GaugeShares","LiquidityGauges","PoolGauges","Gauges.getSdk","Multicaller3","options","calls","interface","connect","batchSize","executeMulticall","numBatches","ceil","batchPromises","batchIndex","batchRequests","allowFailure","aggregate3","offset","callIndex","success","returnData","decodeFunctionResult","e","weightedCalls","multicaller","linearCalls","stableCalls","gyroECalls","fetchOnChainPoolData","vaultAddress","getTotalSupplyFn","getSwapFeeFn","defaultCalls","do_nothing","poolTypeCalls","getOnChainBalances","subgraphPoolsOriginal","_multiAddress","poolsWithOnchainData","onchainData","idx","wrappedToken","wrappedIndex","wrappedTokenRate","lowerTarget","targets","upperTarget","tokenRates","rate","SubgraphPoolDataService","sorConfig","query","defaultArgs","orderBy","TotalLiquidity","orderDirection","Desc","swapEnabled","queryArgs","mapped","expiryTime","unitSeconds","principalToken","baseToken","mapPools","getSubgraphPools","findIndex","fetchOnChainBalances","onChainBalances","formattedQuery","first","pool0","pool1000","pool2000","SubgraphTokenPriceService","ethPerToken","getLatestPriceInEthFromSubgraph","latestPrices","asset_in","pricesKeyedOnId","keyBy","matchingLatestPrices","asset","pricingAssetPricedInEth","pricingAsset","getNetworkConfig","networkConfig","customSubgraphUrl","tenderly","POOLS_TO_IGNORE","ApiTokenPriceService","balancerApiUrl","tokenPriceQuery","chainKey","tokenGetCurrentPrices","tokenPriceUsd","nativeAssetPriceUsd","NativeAssetAddress","tokenPriceInNativeAsset","getCoingeckoApiBaseUrl","isDemoApi","getCoingeckoApiKeyHeaderName","CoingeckoTokenPriceService","urlBase","isDemoApiKey","coingeckoApiKeyHeaderName","apiKey","coingeckoApiKey","getTokenPriceInNativeAsset","endpoint","axios","headers","Accept","Sor","sdkConfig","getSorConfig","sorNetworkConfig","getSorNetworkConfig","JsonRpcProvider","rpcUrl","subgraphClient","getPoolDataService","getTokenPriceService","tokenPriceService","poolDataService","sor","connectingTokens","triPathMidPoolIds","allPoolsToIgnore","coingeckoConfig","checkSimpleFlashSwapParams","poolIds","createSwaps","assetInIndex","assetOutIndex","deltaToExpectedProfit","Number","calcProfit","profits","underlyingToWrappedMap","tokenForSwaps","wrapped","Relayers","relayerResolver","assetIn","assetOut","lido","swapFragment","relayer","f","amountForLimit","maxSlippage","min","decorateSorSwapInfo","swapInfo","amountIn","swapAmount","returnAmount","amountInForLimits","swapAmountForSwaps","returnAmountFromSwaps","amountOutForLimits","tokenInForSwaps","tokenOutFromSwaps","SingleSwapBuilder","setFunds","setDeadline","setLimits","singleSwap","attrs","fragment","outputReference","BatchSwapBuilder","minAmountOut","maxAmountIn","tokenAddresses","split","outputReferences","buildRouteDefaultOptions","maxPools","gasPrice","Swaps","sorOrConfig","l","getSwaps","SwapTypes","buildSwap","builder","opts","findRouteGivenIn","batchSwap","encodeBatchSwap","flashLoanAmount","walletAddress","convertSimpleFlashSwapToBatchSwapParameters","fetchPools","getPools","tokenAddress0","tokenAddress1","isProfitable","querySimpleFlashSwap","swapInput","swapTypeSOR","getSorSwapInfo","swap","assetDeltas","fromEntries","PoolKind","relayerLibrary","Relayer","maxAmount","relayerAdress","approved","authorisation","poolKind","staticToken","fromUnderlying","toUnderlying","linearPoolType","unwrapType","encodeUnwrapAaveStaticToken","isTemporary","CHAINED_REFERENCE_TEMP_PREFIX","CHAINED_REFERENCE_READONLY_PREFIX","paddedPrefix","repeat","ref","amountBn","mask","check","_hex","signRelayerApproval","relayerAddress","signerAddress","signer","Subgraph","initClient","Pricing","poolsDict","parseToPoolsDict","routeProposer","getCandidatePathsFromDict","getSpotPriceAfterSwapForPath","Multicaller","isLessThan24Hours","incomingDateInSec","round","Date","now","VeBal","veBalAddress","formatLockInfo","lockInfo","lockedAmount","lockedEndDate","locked","hasExistingLock","lockedEndDateNormalised","toNumber","isExpired","totalSupply","epoch","VeBalProxy","adjustedBalanceOf","Contracts","networkOrAddresses","getLiquidityGauge","contractAddresses","eulerLinearPoolFactory","gearboxLinearPoolFactory","gyroConfig","instances","BasePool","getBasePool","ERC20","getErc20","liquidityGauge","ImpermanentLossService","tokenHistoricalPrices","timestamp","prepareData","poolValueDelta","getPoolValueDelta","holdValueDelta","getHoldValueDelta","calculateImpermanentLoss","floor","abs","priceDelta","entryTimestamp","getWeights","entryPrices","getEntryPrices","exitPrices","getExitPrices","getAssets","getDelta","entryPrice","exitPrice","ILLEGAL_PARAMETER","noWeights","uniformWeight","w","prices","tokensWithPrice","INITIAL_RATE","START_EPOCH_TIME","RATE_REDUCTION_TIME","RATE_REDUCTION_COEFFICIENT","weekly","currentTimestamp","getTime","miningEpoch","totalEmissions","startingEpoch","endingEpoch","currentEpoch","secondsInStartingEpoch","secondsInEndingEpoch","ProtocolRevenue","repository","multicallData","balPrice","lastWeekBalRevenue","balAmount","lastWeekBBAUsdRevenue","bbAUsdAmount","bbAUsdPrice","veBalSupply","PoolFees","yesterdaysPools","yesterdaysPool","totalSwapFee","createTime","PoolApr","tokenMeta","tokenYields","feeCollector","gyroConfigRepository","last24hFees","feesDailyBsp","protocolSwapFeePercentage","breakdown","bptFreeTokens","aprs","apr","tokenYield","isExemptFromYieldProtocolFee","protocolYieldFeeCache","subSwapFees","swapFees","subApr","tokenAprs","getWeight","poolToken","bptPrice","_c","_d","_e","weightedAprs","pickBy","zipObject","identity","boost","workingSupply","balInflationRate","bptPriceUsd","gaugeSupplyUsd","reward","balReward","rewardTokenApr","totalSupplyUsd","rewardValue","balPriceUsd","gaugeBalEmissionsUsd","emissions.weekly","relativeWeight","tAddress","rewardTokensBreakdown","rewardValueScaled","revenue","dailyRevenue","stakingApr","rewardAprs","protocolApr","minStakingApr","maxStakingApr","last24h","liquidityService","fee","getGyroProtocolFee","protocolSwapFeeCache","rewardData","period_finish","yearlyReward","meta","joinActions","Element","LiquidityBootstrapping","exitActions","PoolGraph","getGraphNodes","tokensToUnwrap","rootNode","buildGraphFromRootPool","orderByBfs","reverse","rootPool","buildGraphFromPool","getTokenTotal","nodeIndex","parent","proportionOfParent","parentPool","tokenIndex","leafTokenDecimals","createInputTokenNode","joinAction","exitAction","tokenTotal","spotPrices","sp","poolNode","isProportionalExit","children","marked","isLeaf","updateNodeIfProportionalExit","createLinearNodeChildren","proportion","tokenWeight","finalProportion","childNode","linearPoolNode","mainIndex","wrappedNodeInfo","createWrappedTokenNode","mainTokenDecimals","nodeInfo","wrappedTokenNode","unwrappedBalance","inputNode","root","nodes","orderedNodes","currentNode","shift","WeightedPoolDecoder","decode","JoinModel","relayerModel","joinKind","decodeJoinData","allTokensInForExactBPTOut","amountsInWithRef","doChainedRefReplacements","SubgraphType","bptAsPoolToken","bptBalanceEVM","updateTokenBalanceForPool","tokensWithoutBpt","balanceEvm","bptAmountOutWithRef","tokenInIndex","doChainedRefReplacement","pairData","bptAmountOutHuman","amountInHuman","_tokenInForExactTokenOut","bnum","dp","decimalsIn","amountInEvm","balanceIn","balanceOut","bptOut","isChainedReference","setChainedReferenceValue","ExitModel","exitKind","decodeExitData","exactBptInForTokensOut","bptInWithRef","exactBptInForOneTokenOut","amountOutHuman","_exactTokenInForTokenOut","decimalsOut","amountOutEvm","poolBalances","pt","getBalancesForTokens","tokenOutIndex","SwapModel","swapRequest","doSwap","batchSwapRequest","previousAmount","getChainedReferenceValue","isExactIn","UnwrapModel","unwrapRequest","underlyingToken","PoolModel","joinModel","exitModel","swapModel","unwrapModel","doJoinPool","doExitPool","doBatchSwap","doSingleSwap","doUnwrap","RelayerModel","chainedRefs","PoolsSource","poolsArray","dataSource","refresh","list","cloneDeep","BptAsToken","parseNewPool","subgraphPool","ComposableStablePool","ActionType","VaultModel","poolsSource","updateDeltas","rawCalls","poolModel","poolsDictionary","actionType","Join","doJoin","Exit","doExit","Unwrap","balancerRelayerInterface","debugLog","poolGraph","simulationService","createCalls","joinPaths","isNativeAssetJoin","multiRequests","encodedCalls","outputIndexes","createActionCalls","unshift","createSetRelayerApproval","encodedCall","amountsOutByJoinPath","simulationType","simulateGeneralisedJoin","totalAmountOut","minAmountsOutByJoinPath","totalMinAmountOut","isSimulation","joinPath","isLeafJoin","modelRequests","shouldBeConsidered","isLastChainedCall","hasSiblingInput","minOut","modelRequest","createSwap","minBptOut","createJoinPool","outputRef","encodedPeekCall","encodePeekChainedReferenceValue","toChainedReference","encodeSetRelayerApproval","joinPathIndex","expectedOut","getOutputRefValue","replaceWrappedNativeAsset","allImmediateChildrenSendToInternal","allSiblingsSendToInternal","encodeSwap","mapSwapRequest","userTokenIn","userBptOut","inputTokens","inputAmts","child","sortedTokens","sortedAmounts","userDataAmounts","formatJoinPoolInput","mapJoinPoolRequest","userAmountsTokenIn","userAmountOut","hasChildInput","isRef","sendsToInternalBalance","siblings","wrappedNativeAssetIndex","nativeAssetIndex","tokensInWithoutNativeAsset","getJoinPaths","totalBptZeroPi","totalBptZeroPriceImpact","queryData","assertDeltas","poolAddress","inputNodes","nonLeafInputNodes","nonLeafInputNode","nonLeafAmountIn","totalProportions","proportionalNonLeafAmountIn","inputTokenNode","nonLeafJoinPath","currentChild","parentCopy","updateInputAmounts","ajdustAmountInDiff","tokenInInputNodes","amountsInSumforTokenIn","diff","leafJoinPath","updateTotalProportions","updateNodeAmount","nonLeafJoinPaths","leafNode","bptOutZeroPiForInputNode","spProduct","parentNode","childAddress","spPriceScaled","inputAmountScaled","totalProportion","inputAmount","TenderlyHelper","tenderlyConfig","simulateMulticall","encodedStateOverrides","encodeBalanceAndAllowanceOverrides","encodeRelayerApprovalOverride","simulateTransaction","stateOverrides","storage","state_objects","toHexString","network_id","block_number","blockNumber","input","save_if_fails","simulation_type","SIMULATE_URL","tenderlyUrl","post","transaction","transaction_info","call_trace","output","requestStateOverrides","tokensWithoutNativeAsset","MaxInt256","k","ENCODE_STATES_URL","networkID","project","accessKey","SimulationType","Simulation","Tenderly","tenderlyHelper","simulationResult","decodeResult","requestResult","simulateRequests","Static","staticResult","decodedResponse","Buffer","simulateGeneralisedExit","multicallResult","outputIndex","vaultModel","requests","tokenOutDeltas","amountsOutByExitPath","amountsOutByTokenOut","tokensOutByExitPath","expectedAmountsOutByExitPath","expectedAmountsOutMap","expectedAmountsOutByTokenOut","minAmountsOutByExitPath","expectedAmountOut","minAmountsOutByTokenOut","getExitPaths","outputNodes","exitPaths","outputNode","exitPath","amountsInSum","accumulator","currentExitPath","amountInForCurrentExitPath","amountsInDiff","createUnwrap","exitChild","exitPathIndex","getOutputRef","encodeUnwrap","mapUnwrapRequest","receivesFromInternal","amountBptIn","getExit","estimatedAmountsOut","isProportional","isProportionalPools","tokensWithInsufficientBalance","calculatePriceImpact","orderedNodesForJoin","isPeek","getRecipientAddress","getSenderAddress","isLastActionWithLimits","minAmountsOutProportional","outputChildIndex","createExitPoolProportional","createExitPool","isRootNode","createBatchSwap","exitChildren","batchSwapSteps","swapStep","acc","dust","mapBatchSwapRequest","userDataTokens","formatExitPoolInput","mapExitPoolRequest","userAmountTokensOut","userBptIn","allChildrenReceiveFromInternal","deltaBptIn","deltaTokensOut","deltaAmountsOut","PoolVolume","totalSwapVolume","ComposableStableFactory","checkCreateInputs","tokenRateCacheDurations","exemptFromYieldProtocolFeeFlags","rateProviders","parseCreateParamsForEncoding","amplificationParameter","owner","salt","sortedRateProviders","sortedTokenRateCacheDurations","sortedExemptFromYieldProtocols","encodeCreateFunctionData","checkInitJoinInputs","parseParamsForInitJoin","tokensWithBpt","amountsWithBpt","maxAmountsWithBpt","asUintN","sortedMaxAmounts","encodeInitJoinFunctionData","getPoolAddressAndIdWithReceipt","composableStablePoolInterface","getPoolInterface","getPoolId","create","encodedFunctionData","buildInitJoin","WeightedFactory","normalizedWeights","sortedNormalizedWeights","cur","weightedPoolInterface","ProtocolId","LinearFactory","getPoolFactoryInterface","AaveLinear","ERC4626Linear","EulerLinear","GearboxLinear","YearnLinear","protocolId","getFactoryAddress","mainToken","upperTargetEvm","linearPoolInterface","PoolFactory__factory","balancerContracts","of","ParamsBuilder","encoder","Gyro2","Gyro3","getEncoder","buildQueryJoinExactIn","maxAmountsInByToken","maxInWithoutBpt","buildQueryJoinExactOut","buildQueryExitToSingleToken","buildQueryExitProportionally","buildQueryExitExactOut","maxBptIn","minAmountsOutWithoutBpt","EmissionsService","liquidityGaugesRepository","proportionalAmounts","referenceTokenIndex","notImplemented","repositories","aprService","poolsForSimulations","graphService","poolsOnChain","joinService","exitService","feesService","volumeService","poolFactory","impermanentLossService","emissionsService","concerns","queries","methods","calcSpotPrice","calcProportionalAmounts","Queries.ParamsBuilder","calcImpLoss","getBptPrice","joinPool","buildExitCall","getExitInfo","wrap","param","UnicodeNormalizationForm","Utf8ErrorReason","ignoreFunc","bytes","badCodepoint","BAD_PREFIX","UNEXPECTED_CONTINUE","o","OVERRUN","toUtf8Bytes","str","charCodeAt","c2","pair","arrayify","formatBytes32String","text","hexlify","HashZero","freeze","ignore","OVERLONG","INPUT_ERROR","WINDOW","window","JS_SHA3_NO_WINDOW","WEB_WORKER","self","JS_SHA3_NO_NODE_JS","versions","global","COMMON_JS","JS_SHA3_NO_COMMON_JS","module","exports","ARRAY_BUFFER","JS_SHA3_NO_ARRAY_BUFFER","ArrayBuffer","HEX_CHARS","CSHAKE_PADDING","SHIFT","RC","BITS","SHAKE_BITS","OUTPUT_TYPES","CSHAKE_BYTEPAD","JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW","isView","buffer","createOutputMethod","bits","padding","outputType","Keccak","update","createShakeOutputMethod","outputBits","createCshakeOutputMethod","createKmacOutputMethod","createOutputMethods","method","createMethod","algorithms","bytepad","Kmac","methodNames","algorithm","methodName","newMethodName","blocks","reset","finalized","block","blockCount","byteCount","outputBlocks","extraBytes","notString","lastByteIndex","right","encodeString","strs","paddingBytes","zeros","finalize","arrayBuffer","Uint32Array","digest","h","c0","c1","c3","c4","c5","c6","c7","c8","c9","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","b10","b11","b12","b13","b14","b15","b16","b17","b18","b19","b20","b21","b22","b23","b24","b25","b26","b27","b28","b29","b30","b31","b32","b33","b34","b35","b36","b37","b38","b39","b40","b41","b42","b43","b44","b45","b46","b47","b48","b49","regexBytes","regexNumber","regexArray","_pack","zeroPad","toTwos","byteLength","baseType","pack","tight","keccak256","sha3","keccak_256","protocolFeePercKey","gyroPoolTypeKey","encodedPoolTypeKey","GyroConfigRepositoryImpl","gyroConfigAddress","gyroConfigInterface","encodedPoolSpecificKey","hasSpecificKeyHex","hasPoolTypeKeyHex","hasDefaultKeyHex","hasSpecificKey","hasPoolTypeKey","hasDefaultKey","getUint","gaugeControllerInterface","gaugeControllerCheckpointerInterface","GaugeControllerMulticallRepository","gaugeControllerAddress","gaugeControllerCheckpointerAddress","AbstractSubgraphRepository","attribute","skip","BalancerSubgraphRepository","blockHeight","GaugesSubgraphRepository","GaugeSharesRepository","desc","number","gaugeShares","mapType","subgraphGaugeShare","isKilled","findAllBy","UserAddress","gaugeId","GaugeId","childLiquidityGaugeInterface","LiquidityGaugesMulticallRepository","currentWeek","rewardCounts","passingRewardCounts","getRewardCounts","gaugesWithRewards","startIndexes","gaugeIndex","flat","passingRewardTokens","decoded","LiquidityGaugesSubgraphRepository","qauges","preferentialGauge_not","preferentialGauge","LiquidityGaugeSubgraphRPCProvider","workingSupplies","relativeWeights","inflationRates","gaugeController","g","getWorkingSupplies","oldFactories","childGaugeAddresses","factory","getInflationRates","getRelativeWeights","distributor","last_update","integral","periodFinish","compose","subgraphGauge","BalancerAPIClient","toPayload","jsonToGraphQLQuery","ms","mapToken","priceRateProviders","_f","_g","_h","_j","_k","isPaused","_l","subgraphToken","subPoolInfo","mapSubPools","metadata","mapSubPoolToken","PoolsSubgraphRepository","fetchAllPools","PoolsSubgraphOnChainRepository","poolsSubgraph","filterPools","filteredPools","onchainPools","forceRefresh","fetchDefault","onchainPool","PoolGaugesRepository","PoolJoinExitAttributes","PoolJoinExitRepository","Timestamp","Asc","joinExits","item","Sender","PoolSharesRepository","Balance","poolShares","subgraphPoolShare","PoolId","StaticTokenProvider","CoingeckoPriceRepository","baseTokenAddresses","platform","urlNative","debouncer","tokensPerPriceRequest","signal","isAxiosError","status","fetchNative","Assets","assetId","MATIC","XDAI","finally","inputAddress","baseAddress","nativePrice","CoingeckoHistoricalPriceRepository","urlRange","statusText","range","SubgraphPriceRepository","TokenPriceProvider","coingeckoRepository","subgraphRepository","aaveRates","getRate","HistoricalPriceProvider","FeeDistributorAbi","feeDistributorInterface","veBalInterface","FeeDistributorRepository","feeDistributorAddress","bbAUsdAddress","FeeDistributor","previousWeek","getPreviousWeek","fromTimestamp","midnight","setUTCHours","setUTCMinutes","setUTCSeconds","setUTCMilliseconds","daysSinceThursday","getUTCDay","weeksToGoBack","claimTokens","extractTokenBalance","vaultInterface","protocolFeesCollectorInterface","swapFeePercentagePromise","FeeCollectorRepository","getProtocolFeesCollector","collector","fees","getSwapFeePercentage","swapFeePercentage","iProtocolFeePercentagesProvider","feesPromise","ProtocolFeesProvider","protocolFeePercentagesProviderAddress","yieldFee","protocolFees","TokenYieldsRepository","lc","yields","fetchBlockByTime","BlockNumberRepository","dayAgo","Data","subgraphQuery","poolJoinExits","poolGauges","blockNumbers","blockDayAgo","getBlockNumber","initialCoingeckoList","subgraphPriceRepository","coingeckoHistoricalRepository","protocolFeePercentagesProvider","poolType2PoolKind","LEGACY_STABLE","COMPOSABLE_STABLE","COMPOSABLE_STABLE_V2","WEIGHTED","setRelayerApproval","gaugeWithdrawal","encodeGaugeWithdraw","gaugeDeposit","encodeGaugeDeposit","peekChainedReferenceValue","buildPath","buildLinearPath","buildMigrationPool","findTokens","nestedTokens","migrationBuilder","peek","fromGauge","toGauge","fromTokens","toTokens","exitOutputReferences","swapOutputReferences","joinAmount","migrationSteps","needsSwap","actions.setRelayerApproval","actions.gaugeWithdrawal","isComposable","actions.exit","swapPaths","getMainToken","mainFromTokens","mainToTokens","exitSwaps","fromIdx","toIdx","toPool","buildPaths","batchSwaps","actions.swaps","references","actions.join","actions.peekChainedReferenceValue","actions.gaugeDeposit","Migrations","poolsRepository","gaugesRepository","getExpectedBptOut","steps","relayerReturnValue","expectedBptOut","ActionStep","BaseAction","mainTokenInIndex","mainTokenOutIndex","swapAssetInIndex","swapAssetOutIndex","swapReturn","opRefKey","actionStep","getActionStep","getActionAmount","hasTokenIn","actionHasTokenIn","hasTokenOut","actionHasTokenOut","getActionMinOut","opRef","nextOpRefKey","getActionOutputRef","opRefStart","getSender","receiver","getReceiver","TokenOut","Middle","TokenIn","tokenInIndexAction","tokenOutIndexAction","Direct","getFromInternal","isBptIn","getToInternal","isBptOut","getPoolKind","exitToken","bptAmtIn","exitPoolInput","encoded","getAmountIn","getAmountOut","fromInternal","joinToken","joinTokenIndex","approveTokens","isBpt","toInternal","getLimits","updateLimits","newSwap","isChainedSwap","canAddSwap","encodeApproveVault","batchSwapInput","encodedBatchSwap","copy","addSwap","orderActions","actions","categorizedActions","enterActions","middleActions","categorizeActions","allActions","orderedActions","batchedSwaps","batchSwapActions","isExit","pricing","claimService","migrationService","hasFetched","isFetching","fetchFromCache","fetchAll","awaitEnoughPoolsFetched","nextToken","formattedArgs","__args","apiResponseData","totalChecks","rewardsBreakdown","tokenAprsBreakdown","providers","currentProviderIdx","fallbackQuery","currentProvider","func","race","lowercaseAddress","newJoin","newExit","getActions","totalIn","totalOut","diffOut","checkAmounts","spender","ownerAddress","nonces","Permit","hasJoinExit","specialization","normalizedSum"],"mappings":"64BAIKA,ECDOC,EAMAC,EAKAC,ECXAC,EAOAC,iBFNZ,SAAKL,GACHA,EAAAA,EAAA,cAAA,KAAA,eACD,CAFD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ACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,uEAGJI,SAAU,CACR,qEAAsE,CACpEC,KAAM,4BACNC,SAAS,GAEX,qEAAsE,CACpED,KAAM,4BACNC,SAAS,GAEX,qEAAsE,CACpED,KAAM,sBACNC,SAAS,GAEX,qEAAsE,CACpED,KAAM,sBACNC,SAAS,KAkTb,CAACpB,QAAAA,QAAQ6B,SA7SkB,CAC3B3B,OAAQ,CACN4B,OAAQ,CACNL,GAAI,qEACJC,GAAI,sEAENK,QAAS,CACPN,GAAI,qEACJC,GAAI,sEAENM,KAAM,CACJA,KAAM,qEACNC,UACE,uEAGN9B,WAAY,CACVC,QAAS,GACTC,QAAS,GACTC,eAAgB,GAElBC,cAAe,6CACfC,YAAa,6CACbC,YAAa,CACXC,SAAU,IAEZC,UAAW,CAAC,IACZC,kBAAmB,CACjB,UACA,aACA,SACA,gBACA,QACA,QACA,QACA,MAEFC,OAAQ,CACNC,UAAW,CACT,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,uEAGJC,WAAY,CACVD,UAAW,CAAC,KAEdE,UAAW,CACT,6CAA8C,qBAC9C,6CAA8C,eAC9C,6CAA8C,aAC9C,6CAA8C,aAC9C,6CAA8C,6BAC9C,6CAA8C,6BAC9C,6CAA8C,cAC9C,6CAA8C,cAC9C,6CAA8C,aAC9C,6CAA8C,uBAC9C,6CAA8C,gBAEhDC,SAAU,CACRH,UAAW,CACT,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,uEAGJI,SAAU,CAAE,GAoMZ,CAAClB,QAAA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AM,WAER,CACEoY,aAAc,SACd9f,KAAM,OACN0H,KAAM,UAER,CACEoY,aAAc,SACd9f,KAAM,SACN0H,KAAM,UAER,CACEoY,aAAc,kBACd9f,KAAM,SACN0H,KAAM,WAER,CACEoY,aAAc,kBACd9f,KAAM,SACN0H,KAAM,WAER,CACEoY,aAAc,UACd9f,KAAM,oBACN0H,KAAM,WAER,CACEoY,aAAc,UACd9f,KAAM,sBACN0H,KAAM,WAER,CACEoY,aAAc,UACd9f,KAAM,uBACN0H,KAAM,WAER,CACEoY,aAAc,OACd9f,KAAM,gBACN0H,KAAM,QAER,CACEoY,aAAc,UACd9f,KAAM,QACN0H,KAAM,YAGVoY,aAAc,qDACd9f,KAAM,aACN0H,KAAM,SAER,CACEmY,WAAY,CACV,CACEC,aAAc,SACd9f,KAAM,QACN0H,KAAM,UAER,CACEoY,aAAc,SACd9f,KAAM,OACN0H,KAAM,UAER,CACEoY,aAAc,SACd9f,KAAM,IACN0H,KAAM,UAER,CACEoY,aAAc,SACd9f,KAAM,IACN0H,KAAM,UAER,CACEoY,aAAc,SACd9f,KAAM,SACN0H,KAAM,WAGVoY,aAAc,6BACd9f,KAAM,aACN0H,KAAM,SAER,CACEmY,WAAY,CACV,CACEA,WAAY,CACV,CACEC,aAAc,SACd9f,KAAM,IACN0H,KAAM,UAER,CACEoY,aAAc,SACd9f,KAAM,IACN0H,KAAM,WAGVoY,aAAc,8BACd9f,KAAM,WACN0H,KAAM,SAER,CACEmY,WAAY,CACV,CACEC,aAAc,SACd9f,KAAM,IACN0H,KAAM,UAER,CACEoY,aAAc,SACd9f,KAAM,IACN0H,KAAM,WAGVoY,aAAc,8BACd9f,KAAM,UACN0H,KAAM,SAER,CACEoY,aAAc,SACd9f,KAAM,IACN0H,KAAM,UAER,CACEoY,aAAc,SACd9f,KAAM,IACN0H,KAAM,UAER,CACEoY,aAAc,SACd9f,KAAM,IACN0H,KAAM,UAER,CACEoY,aAAc,SACd9f,KAAM,IACN0H,KAAM,UAER,C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AAgBtkB,GAAwB2Q,EAAO5c,SAErD,MAAO,IACFuwB,EACHtjB,KAAM,IACDsjB,EAActjB,KACjBC,iBAAUhW,EAAA0lB,EAAO4T,iCAAqBD,EAActjB,KAAKC,UAE3DujB,SAAU7T,EAAO6T,SAEpB,CAED,MAAO,IACF7T,EAAO5c,QACViN,KAAM,IACD2P,EAAO5c,QAAQiN,KAClBC,SAAkC,QAAxBhL,EAAA0a,EAAO4T,yBAAiB,IAAAtuB,EAAAA,EAAI0a,EAAO5c,QAAQiN,KAAKC,UAE5DujB,SAAU7T,EAAO5c,QAAQywB,SAE7B,CC1BO,MAAMC,GAAkB,CAC7B,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,4ECzUWC,GAcXltC,YAA6BuM,GAAApG,KAAOoG,QAAPA,EAXrBpG,KA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,EAAgB5zD,EAAAA,KACpB,IAAK,IAAI1M,EAAQ,EAAGA,EAAQxH,EAAQ/Q,OAAQuY,IACtCA,EAAQxH,EAAQ/Q,OAAS,GAC3Bg1D,EAAkBz8C,GAASxH,EAAQwH,GAAOkF,IAAI5S,eAAK6S,IAAI3N,GACvD8oE,EAAgBA,EAAc1rE,IAAI6nD,EAAkBz8C,KAEpDy8C,EAAkBz8C,GAAS1N,EAAGua,YAACvH,IAAIg7D,GAIvC,OAAO7jB,CACT,gElN5BM,SAA8B9vD,GAClC,MAAM0xB,EAA2B,CAAA,EAOjC,OANA1xB,EAAOE,SAAST,IACVA,EAAMgsB,QACRiG,EAAYjyB,EAAM8B,SAAW9B,EAAMgsB,MACpC,IAGIiG,CACT,4BIkGM,SAA4Bnd,GAChC,OAAOA,EAAUvV,KAAKqqB,GAAM,GAAGA,EAAEtuB,MAAM,EAAG,QAAQsuB,EAAEtuB,MAAM,GAAI,OAChE"} \ No newline at end of file diff --git a/package/dist/index.umd.js b/package/dist/index.umd.js new file mode 100644 index 000000000..6793b319b --- /dev/null +++ b/package/dist/index.umd.js @@ -0,0 +1,515 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@ethersproject/abi"),require("@ethersproject/constants"),require("@ethersproject/bignumber"),require("@ethersproject/address"),require("@ethersproject/bytes"),require("@ethersproject/abstract-signer"),require("lodash"),require("ethers"),require("@balancer-labs/sor"),require("@ethersproject/providers"),require("graphql-request"),require("graphql"),require("axios"),require("@ethersproject/contracts"),require("json-to-graphql-query")):"function"==typeof define&&define.amd?define(["exports","@ethersproject/abi","@ethersproject/constants","@ethersproject/bignumber","@ethersproject/address","@ethersproject/bytes","@ethersproject/abstract-signer","lodash","ethers","@balancer-labs/sor","@ethersproject/providers","graphql-request","graphql","axios","@ethersproject/contracts","json-to-graphql-query"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["balancer-js"]={},e.abi,e.constants,e.bignumber,e.address,e.bytes,e.abstractSigner,e.lodash,e.ethers,e.sor,e.providers,e.graphqlRequest,e.graphql,e.axios,e.contracts,e.jsonToGraphqlQuery)}(this,(function(e,t,a,n,o,i,s,r,l,d,p,u,c,y,b,m){"use strict";function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function T(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var h,I,g,_,P,w,x=T(d),E=f(y);!function(e){e[e.RECOVERY_MODE=255]="RECOVERY_MODE"}(h||(h={}));class A{}A.recoveryModeExit=e=>t.defaultAbiCoder.encode(["uint256","uint256"],[h.RECOVERY_MODE,e]),e.StablePoolJoinKind=void 0,(I=e.StablePoolJoinKind||(e.StablePoolJoinKind={}))[I.INIT=0]="INIT",I[I.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",I[I.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT",e.StablePhantomPoolJoinKind=void 0,(g=e.StablePhantomPoolJoinKind||(e.StablePhantomPoolJoinKind={}))[g.INIT=0]="INIT",g[g.COLLECT_PROTOCOL_FEES=1]="COLLECT_PROTOCOL_FEES",e.StablePoolExitKind=void 0,(_=e.StablePoolExitKind||(e.StablePoolExitKind={}))[_.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",_[_.EXACT_BPT_IN_FOR_TOKENS_OUT=1]="EXACT_BPT_IN_FOR_TOKENS_OUT",_[_.BPT_IN_FOR_EXACT_TOKENS_OUT=2]="BPT_IN_FOR_EXACT_TOKENS_OUT";class S{constructor(){}}S.joinInit=a=>t.defaultAbiCoder.encode(["uint256","uint256[]"],[e.StablePoolJoinKind.INIT,a]),S.joinCollectProtocolFees=()=>t.defaultAbiCoder.encode(["uint256"],[e.StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]),S.joinExactTokensInForBPTOut=(a,n)=>t.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[e.StablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,a,n]),S.joinTokenInForExactBPTOut=(a,n)=>t.defaultAbiCoder.encode(["uint256","uint256","uint256"],[e.StablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,a,n]),S.exitExactBPTInForOneTokenOut=(a,n)=>t.defaultAbiCoder.encode(["uint256","uint256","uint256"],[e.StablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,a,n]),S.exitExactBPTInForTokensOut=a=>t.defaultAbiCoder.encode(["uint256","uint256"],[e.StablePoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT,a]),S.exitBPTInForExactTokensOut=(a,n)=>t.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[e.StablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,a,n]),e.WeightedPoolJoinKind=void 0,(P=e.WeightedPoolJoinKind||(e.WeightedPoolJoinKind={}))[P.INIT=0]="INIT",P[P.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",P[P.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT",P[P.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT=3]="ALL_TOKENS_IN_FOR_EXACT_BPT_OUT",e.WeightedPoolExitKind=void 0,(w=e.WeightedPoolExitKind||(e.WeightedPoolExitKind={}))[w.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",w[w.EXACT_BPT_IN_FOR_TOKENS_OUT=1]="EXACT_BPT_IN_FOR_TOKENS_OUT",w[w.BPT_IN_FOR_EXACT_TOKENS_OUT=2]="BPT_IN_FOR_EXACT_TOKENS_OUT",w[w.MANAGEMENT_FEE_TOKENS_OUT=3]="MANAGEMENT_FEE_TOKENS_OUT";class v{constructor(){}}v.joinInit=a=>t.defaultAbiCoder.encode(["uint256","uint256[]"],[e.WeightedPoolJoinKind.INIT,a]),v.joinExactTokensInForBPTOut=(a,n)=>t.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[e.WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,a,n]),v.joinTokenInForExactBPTOut=(a,n)=>t.defaultAbiCoder.encode(["uint256","uint256","uint256"],[e.WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,a,n]),v.joinAllTokensInForExactBPTOut=a=>t.defaultAbiCoder.encode(["uint256","uint256"],[e.WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT,a]),v.exitExactBPTInForOneTokenOut=(a,n)=>t.defaultAbiCoder.encode(["uint256","uint256","uint256"],[e.WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,a,n]),v.exitExactBPTInForTokensOut=a=>t.defaultAbiCoder.encode(["uint256","uint256"],[e.WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT,a]),v.exitBPTInForExactTokensOut=(a,n)=>t.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[e.WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,a,n]);class k{constructor(){}}k.exitForManagementFees=()=>t.defaultAbiCoder.encode(["uint256"],[e.WeightedPoolExitKind.MANAGEMENT_FEE_TOKENS_OUT]);var B,C;e.ComposableStablePoolJoinKind=void 0,(B=e.ComposableStablePoolJoinKind||(e.ComposableStablePoolJoinKind={}))[B.INIT=0]="INIT",B[B.EXACT_TOKENS_IN_FOR_BPT_OUT=1]="EXACT_TOKENS_IN_FOR_BPT_OUT",B[B.TOKEN_IN_FOR_EXACT_BPT_OUT=2]="TOKEN_IN_FOR_EXACT_BPT_OUT",e.ComposableStablePoolExitKind=void 0,(C=e.ComposableStablePoolExitKind||(e.ComposableStablePoolExitKind={}))[C.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT=0]="EXACT_BPT_IN_FOR_ONE_TOKEN_OUT",C[C.BPT_IN_FOR_EXACT_TOKENS_OUT=1]="BPT_IN_FOR_EXACT_TOKENS_OUT",C[C.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT=2]="EXACT_BPT_IN_FOR_ALL_TOKENS_OUT";class O{constructor(){}}O.joinInit=a=>t.defaultAbiCoder.encode(["uint256","uint256[]"],[e.ComposableStablePoolJoinKind.INIT,a]),O.joinCollectProtocolFees=()=>t.defaultAbiCoder.encode(["uint256"],[e.StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]),O.joinExactTokensInForBPTOut=(a,n)=>t.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[e.ComposableStablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,a,n]),O.joinTokenInForExactBPTOut=(a,n)=>t.defaultAbiCoder.encode(["uint256","uint256","uint256"],[e.ComposableStablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,a,n]),O.exitExactBPTInForOneTokenOut=(a,n)=>t.defaultAbiCoder.encode(["uint256","uint256","uint256"],[e.ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,a,n]),O.exitExactBPTInForAllTokensOut=a=>t.defaultAbiCoder.encode(["uint256","uint256"],[e.ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT,a]),O.exitBPTInForExactTokensOut=(a,n)=>t.defaultAbiCoder.encode(["uint256","uint256[]","uint256"],[e.ComposableStablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,a,n]);var M="production"===process.env.NODE_ENV,F="Invariant failed";function R(e,t){if(!e){if(M)throw new Error(F);var a="function"==typeof t?t():t,n=a?"".concat(F,": ").concat(a):F;throw new Error(n)}}const N=e=>(R(66===e.length,"Invalid poolId length"),e.slice(0,42)),L=e=>{R(66===e.length,"Invalid poolId length");const t=parseInt(e[45]);return R(t<3,"Invalid pool specialization"),t},D=e=>(R(66===e.length,"Invalid poolId length"),n.BigNumber.from(`0x${e.slice(46)}`));var U;e.Network=void 0,(U=e.Network||(e.Network={}))[U.MAINNET=1]="MAINNET",U[U.GOERLI=5]="GOERLI",U[U["GÖRLI"]=5]="GÖRLI",U[U.OPTIMISM=10]="OPTIMISM",U[U.GNOSIS=100]="GNOSIS",U[U.POLYGON=137]="POLYGON",U[U.FANTOM=250]="FANTOM",U[U.BASE=8453]="BASE",U[U.ZKEVM=1101]="ZKEVM",U[U.ARBITRUM=42161]="ARBITRUM",U[U.AVALANCHE=43114]="AVALANCHE",U[U.SEPOLIA=11155111]="SEPOLIA";const V={IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012","0x9f19a375709baf0e8e35c2c5c65aca676c4c7191000200000000000000000022","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020","0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366"]},Investment:{AllowList:["0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af","0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a","0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2"]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0x67d27634e44793fe63c467035e31ea8635117cd4":"stablePool","0x7dfdef5f355096603419239ce743bfaf1120312b":"weightedPool","0xcf0a32bbef8f064969f21f7e02328fb577382018":"weightedPool","0x2433477a10fc5d31b9513c638f19ee85caed53fd":"stablePool","0xebfd5681977e38af65a7487dc70b8221d089ccad":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e":"liquidityBootstrappingPool","0x142b9666a0a3a30477b052962dda81547e7029ab":"liquidityBootstrappingPool","0x1802953277fd955f9a254b80aa0582f193cf1d77":"liquidityBootstrappingPool","0x48767f9f868a4a7b86a90736632f6e44c2df7fa9":"managedPool","0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193":"managedPool","0xacd615b3705b9c880e4e7293f1030b34e57b4c1c":"managedPool","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2":"boostedPool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"boostedPool","0xc128a9954e6c874ea3d62ce62b468ba073093f25":"boostedPool"},Stakable:{AllowList:[]},Metadata:{"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e":{name:"Balancer Stable USD",hasIcon:!0}}},q={[e.Network.GOERLI]:{IdsMap:{staBAL:"0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062",bbAaveUSD:{v1:"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f",v2:"0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7"},veBAL:"0xf8a0623ab66f985effc1c69d05f1af4badb01b00000200000000000000000060"},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:["0x22d398c68030ef6b1c55321cca6e0cecc5c93b2f000200000000000000000678"],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX"],Stable:{AllowList:["0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f","0xb60e46d90f2de35f7062a27d3a98749414036d5d000200000000000000000061","0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062","0xc957b1acceb21707b782eb8eee2ed8e20088463d000200000000000000000076","0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7","0x14f93df8a4e37bfdb49d2cec4789df7a010603d700000000000000000000011d","0x00a62d31b6c776b6813543bc99ff265f7222dbe100000000000000000000011e","0x0c925fce89a22e36ebd9b3c6e0262234e853d2f600000000000000000000019c"]},Investment:{AllowList:[]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0x44afeb87c871d8fea9398a026dea2bd3a13f5769":"stablePool","0xa55f73e2281c60206ba43a3590db07b8955832be":"stablePool","0xb48cc42c45d262534e46d5965a9ac496f1b7a830":"liquidityBootstrappingPool","0xb0c726778c3ae4b3454d85557a48e8fa502bdd6a":"liquidityBootstrappingPool","0x41e9036ae350baedcc7107760a020dca3c0731ec":"boostedPool","0xb848f50141f3d4255b37ac288c25c109104f2158":"composableStablePool","0x94f68b54191f62f781fe8298a8a5fa3ed772d227":"weightedPool"},Stakable:{AllowList:["0x16faf9f73748013155b7bc116a3008b57332d1e600020000000000000000005b","0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f","0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062","0x67f8fcb9d3c463da05de1392efdbb2a87f8599ea000200000000000000000059"]},Metadata:{"0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f":{name:"Balancer Boosted Aave USD",hasIcon:!1}}},[e.Network.MAINNET]:{IdsMap:{staBAL:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063",bbAaveUSD:{v1:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe",v2:"0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d"},veBAL:"0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014"},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","Gyro2","Gyro3","GyroE","FX"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed","0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249","0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d","0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d","0xf93579002dbe8046c43fefe86ec78b1112247bb80000000000000000000002bc","0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351","0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d","0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b"]},Investment:{AllowList:["0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af","0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a","0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2"]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0x67d27634e44793fe63c467035e31ea8635117cd4":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e":"liquidityBootstrappingPool","0x48767f9f868a4a7b86a90736632f6e44c2df7fa9":"managedPool","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2":"boostedPool","0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c":"stablePool","0xf9ac7b9df2b3454e841110cce5550bd5ac6f875f":"composableStablePool","0xcc508a455f5b0073973107db6a878ddbdab957bc":"weightedPool"},Stakable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063","0x072f14b85add63488ddad88f855fda4a99d6ac9b000200000000000000000027","0x0b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a","0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000013","0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112","0x27c9f71cc31464b906e0006d4fcbc8900f48f15f00020000000000000000010f","0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080","0x350196326aeaa9b98f1903fb5e8fc2686f85318c000200000000000000000084","0x3e5fa9518ea95c3e533eb377c001702a9aacaa32000200000000000000000052","0x51735bdfbfe3fc13dea8dc6502e2e958989429610002000000000000000000a0","0x5d66fff62c17d841935b60df5f07f6cf79bd0f4700020000000000000000014c","0x5f7fa48d765053f8dd85e052843e12d23e3d7bc50002000000000000000000c0","0x702605f43471183158938c1a3e5f5a359d7b31ba00020000000000000000009f","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x7edde0cb05ed19e03a9a47cd5e53fc57fde1c80c0002000000000000000000c8","0x8f4205e1604133d1875a3e771ae7e4f2b086563900020000000000000000010e","0x90291319f1d4ea3ad4db0dd8fe9e12baf749e84500020000000000000000013c","0x96646936b91d6b9d7d0c47c496afbf3d6ec7b6f8000200000000000000000019","0x96ba9025311e2f47b840a1f68ed57a3df1ea8747000200000000000000000160","0xa02e4b3d18d4e6b8d18ac421fbc3dfff8933c40a00020000000000000000004b","0xa6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e","0xbaeec99c90e3420ec6c1e7a769d2a856d2898e4d00020000000000000000008a","0xbf96189eee9357a95c7719f4f5047f76bde804e5000200000000000000000087","0xe2469f47ab58cf9cf59f9822e3c5de4950a41c49000200000000000000000089","0xe99481dc77691d8e2456e5f3f61c1810adfc1503000200000000000000000018","0xec60a5fef79a92c741cb74fdd6bfc340c0279b01000200000000000000000015","0xedf085f65b4f6c155e13155502ef925c9a756003000200000000000000000123","0xefaa1604e82e1b3af8430b90192c1b9e8197e377000200000000000000000021","0xf4c0dd9b82da36c07605df83c8a416f11724d88b000200000000000000000026","0xf5aaf7ee8c39b651cebf5f1f50c10631e78e0ef9000200000000000000000069","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066","0x92762b42a06dcdddc5b7362cfb01e631c4d44b40000200000000000000000182","0xde8c195aa41c11a0c4787372defbbddaa31306d2000200000000000000000181","0x17ddd9646a69c9445cd8a9f921d4cd93bf50d108000200000000000000000159","0xc45d42f801105e861e86658648e3678ad7aa70f900010000000000000000011e","0x2d344a84bac123660b021eebe4eb6f12ba25fe8600020000000000000000018a","0xb460daa847c45f1c4a41cb05bfb3b51c92e41b36000200000000000000000194","0x5122e01d819e58bb2e22528c0d68d310f0aa6fd7000200000000000000000163","0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed","0xe8cc7e765647625b95f59c15848379d10b9ab4af0002000000000000000001de","0x85370d9e3bb111391cc89f6de344e801760461830002000000000000000001ef","0xa7ff759dbef9f3efdd1d59beee44b966acafe214000200000000000000000180","0x3f7c10701b14197e2695dec6428a2ca4cf7fc3b800020000000000000000023c","0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d","0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d","0xcfca23ca9ca720b6e98e3eb9b6aa0ffc4a5c08b9000200000000000000000274","0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249","0x0578292cb20a443ba1cde459c985ce14ca2bdee5000100000000000000000269","0x8eb6c82c3081bbbd45dcac5afa631aac53478b7c000100000000000000000270","0x1b65fe4881800b91d4277ba738b567cbb200a60d0002000000000000000002cc","0x99a14324cfd525a34bbc93ac7e348929909d57fd00020000000000000000030e","0x9b532ab955417afd0d012eb9f7389457cd0ea712000000000000000000000338","0x48607651416a943bf5ac71c41be1420538e78f87000200000000000000000327","0x6a5ead5433a50472642cd268e584dafa5a394490000200000000000000000366","0x0fd5663d4893ae0d579d580584806aadd2dd0b8b000200000000000000000367","0x441b8a1980f2f2e43a9397099d15cc2fe6d3625000020000000000000000035f","0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351","0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d"]},Metadata:{"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d":{name:"Balancer Boosted Aave USD",hasIcon:!0},"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063":{name:"Balancer Stable USD",hasIcon:!0},"0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249":{name:"AuraBAL Stable Pool",hasIcon:!1}}},[e.Network.POLYGON]:{IdsMap:{xMatic:{v1:"0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4",v2:"0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c"},stMatic:{v1:"0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366",v2:"0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d"},mai4:{mai4:"0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012",maiBbaUsd:"0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e"}},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","Gyro2","Gyro3","GyroE","FX"],Stable:{AllowList:["0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0xb4670d1389c758e4380c4211bcbc85342688b9c50002000000000000000003d8","0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455","0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4","0xb4b22bd6cdad0ab828be6f8a4086dfa54e9b373600020000000000000000058f","0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba","0x0b8319061732b34cab22445fa83b81f950e4b7ed000000000000000000000709","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d","0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c","0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e","0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b","0xa48d164f6eb0edc68bd03b56fa59e12f24499ad10000000000000000000007c4"]},Investment:{AllowList:[""]},Factories:{"0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0":"oracleWeightedPool","0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9":"weightedPool","0xc66ba2b6595d3613ccab350c886ace23866ede24":"stablePool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"stablePool","0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de":"liquidityBootstrappingPool","0x41b953164995c11c81da73d212ed8af25741b7ac":"liquidityBootstrappingPool","0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193":"managedPool","0xc128a9954e6c874ea3d62ce62b468ba073093f25":"boostedPool","0xca96c4f198d343e251b1a01f3eba061ef3da73c1":"stablePool","0x136fd06fa01ecf624c7f2b3cb15742c1339dc2c4":"composableStablePool","0x0e39c3d9b2ec765efd9c5c70bb290b1fcd8536e3":"weightedPool"},Stakable:{AllowList:["0x0297e37f1873d2dab4487aa67cd56b58e2f27875000100000000000000000002","0x03cd191f589d12b0582a99808cf19851e468e6b500010000000000000000000a","0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012","0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068","0x10f21c9bd8128a29aa785ab2de0d044dcdd79436000200000000000000000059","0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000032","0x36128d5436d2d70cab39c9af9cce146c38554ff0000100000000000000000008","0x5a6ae1fd70d04ba4a279fc219dfabc53825cb01d00020000000000000000020e","0x614b5038611729ed49e0ded154d8a5d3af9d1d9e00010000000000000000001d","0x7c9cf12d783821d5c63d8e9427af5c44bad92445000100000000000000000051","0x805ca3ccc61cc231851dee2da6aabff0a7714aa7000200000000000000000361","0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366","0xb204bf10bc3a5435017d3db247f56da601dfe08a0002000000000000000000fe","0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455","0xce66904b68f1f070332cbc631de7ee98b650b499000100000000000000000009","0xcf354603a9aebd2ff9f33e1b04246d8ea204ae9500020000000000000000005a","0xdb1db6e248d7bb4175f6e5a382d0a03fe3dcc813000100000000000000000035","0xea4e073c8ac859f2994c07e627178719c8002dc00002000000000000000003dc","0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e","0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4","0x2dbc9ab0160087ae59474fb7bed95b9e808fa6bc0001000000000000000003db","0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba","0x8f9dd2064eb38e8e40f2ab67bde27c0e16ea9b080002000000000000000004ca","0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b","0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e","0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d","0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c"]},Metadata:{}},[e.Network.ARBITRUM]:{IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX"],Stable:{AllowList:["0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020","0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d","0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f","0xd89746affa5483627a87e55713ec1905114394950002000000000000000000bf","0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102","0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159"]},Investment:{AllowList:[""]},Factories:{"0x7dfdef5f355096603419239ce743bfaf1120312b":"weightedPool","0xcf0a32bbef8f064969f21f7e02328fb577382018":"weightedPool","0x2433477a10fc5d31b9513c638f19ee85caed53fd":"stablePool","0xebfd5681977e38af65a7487dc70b8221d089ccad":"stablePool","0x142b9666a0a3a30477b052962dda81547e7029ab":"liquidityBootstrappingPool","0x1802953277fd955f9a254b80aa0582f193cf1d77":"liquidityBootstrappingPool","0xacd615b3705b9c880e4e7293f1030b34e57b4c1c":"managedPool","0xdae7e32adc5d490a43ccba1f0c736033f2b4efca":"boostedPool","0xef44d6786b2b4d544b7850fe67ce6381626bf2d6":"stablePool","0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33":"composableStablePool","0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c":"weightedPool"},Stakable:{AllowList:["0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d","0x0adeb25cb5920d4f7447af4a0428072edc2cee2200020000000000000000004a","0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016","0x1779900c7707885720d39aa741f4086886307e9e00020000000000000000004b","0x4a3a22a3e7fee0ffbb66f1c28bfac50f75546fc7000200000000000000000008","0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f","0x64541216bafffeec8ea535bb71fbc927831d0595000100000000000000000002","0x651e00ffd5ecfa7f3d4f33d62ede0a97cf62ede2000200000000000000000006","0xb28670b3e7ad27bd41fb5938136bf9e9cba90d6500020000000000000000001e","0xb340b6b1a34019853cb05b2de6ee8ffd0b89a008000100000000000000000036","0xb5b77f1ad2b520df01612399258e7787af63025d000200000000000000000010","0xc2f082d33b5b8ef3a7e3de30da54efd3114512ac000200000000000000000017","0xc61ff48f94d801c1ceface0289085197b5ec44f000020000000000000000004d","0xcc65a812ce382ab909a11e434dbf75b34f1cc59d000200000000000000000001","0xe1b40094f1446722c424c598ac412d590e0b3ffb000200000000000000000076","0xb3028ca124b80cfe6e9ca57b70ef2f0ccc41ebd40002000000000000000000ba","0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102","0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159","0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158"]},Metadata:{}},[e.Network.GNOSIS]:{IdsMap:{},Pagination:{PerPage:10,PerPool:10,PerPoolInitial:5},DelegateOwner:"0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b",ZeroAddress:"0x0000000000000000000000000000000000000000",DynamicFees:{Gauntlet:[]},BlockList:[""],ExcludedPoolTypes:["Element","AaveLinear","Linear","ERC4626Linear","FX","Gyro2","Gyro3","GyroE","HighAmpComposableStable","FX"],Stable:{AllowList:["0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000004","0x707b7d4a1bae449d546dcab869256591bbb3d70b000000000000000000000000"]},Investment:{AllowList:[]},Factories:{},Stakable:{AllowList:[]},Metadata:{}}};var G,W,H,K,$,J,j;e.PoolGaugesAttributes=void 0,(G=e.PoolGaugesAttributes||(e.PoolGaugesAttributes={})).Id="id",G.Address="address",G.PoolId="poolId",e.PoolShareAttributes=void 0,(W=e.PoolShareAttributes||(e.PoolShareAttributes={})).Balance="balance",W.Id="id",W.PoolId="poolId",W.UserAddress="userAddress",e.GaugeShareAttributes=void 0,(H=e.GaugeShareAttributes||(e.GaugeShareAttributes={})).Id="id",H.UserAddress="user",H.GaugeId="gauge",H.Balance="balance",e.PoolSpecialization=void 0,(K=e.PoolSpecialization||(e.PoolSpecialization={}))[K.GeneralPool=0]="GeneralPool",K[K.MinimalSwapInfoPool=1]="MinimalSwapInfoPool",K[K.TwoTokenPool=2]="TwoTokenPool",e.UserBalanceOpKind=void 0,($=e.UserBalanceOpKind||(e.UserBalanceOpKind={}))[$.DepositInternal=0]="DepositInternal",$[$.WithdrawInternal=1]="WithdrawInternal",$[$.TransferInternal=2]="TransferInternal",$[$.TransferExternal=3]="TransferExternal",e.PoolBalanceOpKind=void 0,(J=e.PoolBalanceOpKind||(e.PoolBalanceOpKind={}))[J.Withdraw=0]="Withdraw",J[J.Deposit=1]="Deposit",J[J.Update=2]="Update",e.PoolType=void 0,(j=e.PoolType||(e.PoolType={})).Weighted="Weighted",j.Investment="Investment",j.Stable="Stable",j.ComposableStable="ComposableStable",j.MetaStable="MetaStable",j.StablePhantom="StablePhantom",j.LiquidityBootstrapping="LiquidityBootstrapping",j.Element="Element",j.Gyro2="Gyro2",j.Gyro3="Gyro3",j.GyroE="GyroE",j.Managed="Managed",j.AaveLinear="AaveLinear",j.Linear="Linear",j.EulerLinear="EulerLinear",j.ERC4626Linear="ERC4626Linear",j.BeefyLinear="BeefyLinear",j.GearboxLinear="GearboxLinear",j.MidasLinear="MidasLinear",j.ReaperLinear="ReaperLinear",j.SiloLinear="SiloLinear",j.TetuLinear="TetuLinear",j.YearnLinear="YearnLinear",j.FX="FX";class X{constructor(){this.enableLogging=!0}static getInstance(){return X.instance||(X.instance=new X),X.instance}setLoggingEnabled(e){this.enableLogging=e}info(e){this.enableLogging}warn(e){this.enableLogging&&console.warn(`[WARN] ${e}`)}error(e){this.enableLogging&&console.error(`[ERROR] ${e}`)}time(e){this.enableLogging}timeEnd(e){this.enableLogging}}const Y=e=>e[0].map(((t,a)=>e.map((e=>e[a]))));class z{constructor(e){this.ETH=a.AddressZero,this.isETH=e=>z.isEqual(e,this.ETH),this.isWETH=e=>z.isEqual(e,this.WETH),this.translateToERC20=e=>this.isETH(e)?this.WETH:e,this.WETH=o.getAddress(e)}sortTokens(e,...t){t.forEach((t=>R(e.length===t.length,"array length mismatch")));const a=e.map(this.translateToERC20),n=Y([a,...t]).sort((([e],[t])=>((e,t)=>e.toLowerCase()>t.toLowerCase()?1:-1)(e,t))),[o,...i]=Y(n);return[e.includes(this.ETH)?o.map((e=>this.isWETH(e)?this.ETH:e)):o,...i]}}z.isEqual=(e,t)=>o.getAddress(e)===o.getAddress(t);const Z={"000":"ADD_OVERFLOW","001":"SUB_OVERFLOW","002":"SUB_UNDERFLOW","003":"MUL_OVERFLOW","004":"ZERO_DIVISION","005":"DIV_INTERNAL","006":"X_OUT_OF_BOUNDS","007":"Y_OUT_OF_BOUNDS","008":"PRODUCT_OUT_OF_BOUNDS","009":"INVALID_EXPONENT",100:"OUT_OF_BOUNDS",101:"UNSORTED_ARRAY",102:"UNSORTED_TOKENS",103:"INPUT_LENGTH_MISMATCH",104:"ZERO_TOKEN",200:"MIN_TOKENS",201:"MAX_TOKENS",202:"MAX_SWAP_FEE_PERCENTAGE",203:"MIN_SWAP_FEE_PERCENTAGE",204:"MINIMUM_BPT",205:"CALLER_NOT_VAULT",206:"UNINITIALIZED",207:"BPT_IN_MAX_AMOUNT",208:"BPT_OUT_MIN_AMOUNT",209:"EXPIRED_PERMIT",210:"NOT_TWO_TOKENS",211:"DISABLED",300:"MIN_AMP",301:"MAX_AMP",302:"MIN_WEIGHT",303:"MAX_STABLE_TOKENS",304:"MAX_IN_RATIO",305:"MAX_OUT_RATIO",306:"MIN_BPT_IN_FOR_TOKEN_OUT",307:"MAX_OUT_BPT_FOR_TOKEN_IN",308:"NORMALIZED_WEIGHT_INVARIANT",309:"INVALID_TOKEN",310:"UNHANDLED_JOIN_KIND",311:"ZERO_INVARIANT",312:"ORACLE_INVALID_SECONDS_QUERY",313:"ORACLE_NOT_INITIALIZED",314:"ORACLE_QUERY_TOO_OLD",315:"ORACLE_INVALID_INDEX",316:"ORACLE_BAD_SECS",317:"AMP_END_TIME_TOO_CLOSE",318:"AMP_ONGOING_UPDATE",319:"AMP_RATE_TOO_HIGH",320:"AMP_NO_ONGOING_UPDATE",321:"STABLE_INVARIANT_DIDNT_CONVERGE",322:"STABLE_GET_BALANCE_DIDNT_CONVERGE",323:"RELAYER_NOT_CONTRACT",324:"BASE_POOL_RELAYER_NOT_CALLED",325:"REBALANCING_RELAYER_REENTERED",326:"GRADUAL_UPDATE_TIME_TRAVEL",327:"SWAPS_DISABLED",328:"CALLER_IS_NOT_LBP_OWNER",329:"PRICE_RATE_OVERFLOW",330:"INVALID_JOIN_EXIT_KIND_WHILE_SWAPS_DISABLED",331:"WEIGHT_CHANGE_TOO_FAST",332:"LOWER_GREATER_THAN_UPPER_TARGET",333:"UPPER_TARGET_TOO_HIGH",334:"UNHANDLED_BY_LINEAR_POOL",335:"OUT_OF_TARGET_RANGE",336:"UNHANDLED_EXIT_KIND ",337:"UNAUTHORIZED_EXIT",338:"MAX_MANAGEMENT_SWAP_FEE_PERCENTAGE",339:"UNHANDLED_BY_MANAGED_POOL",340:"UNHANDLED_BY_PHANTOM_POOL",341:"TOKEN_DOES_NOT_HAVE_RATE_PROVIDER",342:"INVALID_INITIALIZATION",343:"OUT_OF_NEW_TARGET_RANGE",344:"UNAUTHORIZED_OPERATION",345:"UNINITIALIZED_POOL_CONTROLLER",400:"REENTRANCY",401:"SENDER_NOT_ALLOWED",402:"PAUSED",403:"PAUSE_WINDOW_EXPIRED",404:"MAX_PAUSE_WINDOW_DURATION",405:"MAX_BUFFER_PERIOD_DURATION",406:"INSUFFICIENT_BALANCE",407:"INSUFFICIENT_ALLOWANCE",408:"ERC20_TRANSFER_FROM_ZERO_ADDRESS",409:"ERC20_TRANSFER_TO_ZERO_ADDRESS",410:"ERC20_MINT_TO_ZERO_ADDRESS",411:"ERC20_BURN_FROM_ZERO_ADDRESS",412:"ERC20_APPROVE_FROM_ZERO_ADDRESS",413:"ERC20_APPROVE_TO_ZERO_ADDRESS",414:"ERC20_TRANSFER_EXCEEDS_ALLOWANCE",415:"ERC20_DECREASED_ALLOWANCE_BELOW_ZERO",416:"ERC20_TRANSFER_EXCEEDS_BALANCE",417:"ERC20_BURN_EXCEEDS_ALLOWANCE",418:"SAFE_ERC20_CALL_FAILED",419:"ADDRESS_INSUFFICIENT_BALANCE",420:"ADDRESS_CANNOT_SEND_VALUE",421:"SAFE_CAST_VALUE_CANT_FIT_INT256",422:"GRANT_SENDER_NOT_ADMIN",423:"REVOKE_SENDER_NOT_ADMIN",424:"RENOUNCE_SENDER_NOT_ALLOWED",425:"BUFFER_PERIOD_EXPIRED",426:"CALLER_IS_NOT_OWNER",427:"NEW_OWNER_IS_ZERO",428:"CODE_DEPLOYMENT_FAILED",429:"CALL_TO_NON_CONTRACT",430:"LOW_LEVEL_CALL_FAILED",431:"NOT_PAUSED",432:"ADDRESS_ALREADY_ALLOWLISTED",433:"ADDRESS_NOT_ALLOWLISTED",434:"ERC20_BURN_EXCEEDS_BALANCE",500:"INVALID_POOL_ID",501:"CALLER_NOT_POOL",502:"SENDER_NOT_ASSET_MANAGER",503:"USER_DOESNT_ALLOW_RELAYER",504:"INVALID_SIGNATURE",505:"EXIT_BELOW_MIN",506:"JOIN_ABOVE_MAX",507:"SWAP_LIMIT",508:"SWAP_DEADLINE",509:"CANNOT_SWAP_SAME_TOKEN",510:"UNKNOWN_AMOUNT_IN_FIRST_SWAP",511:"MALCONSTRUCTED_MULTIHOP_SWAP",512:"INTERNAL_BALANCE_OVERFLOW",513:"INSUFFICIENT_INTERNAL_BALANCE",514:"INVALID_ETH_INTERNAL_BALANCE",515:"INVALID_POST_LOAN_BALANCE",516:"INSUFFICIENT_ETH",517:"UNALLOCATED_ETH",518:"ETH_TRANSFER",519:"CANNOT_USE_ETH_SENTINEL",520:"TOKENS_MISMATCH",521:"TOKEN_NOT_REGISTERED",522:"TOKEN_ALREADY_REGISTERED",523:"TOKENS_ALREADY_SET",524:"TOKENS_LENGTH_MUST_BE_2",525:"NONZERO_TOKEN_BALANCE",526:"BALANCE_TOTAL_OVERFLOW",527:"POOL_NO_TOKENS",528:"INSUFFICIENT_FLASH_LOAN_BALANCE",600:"SWAP_FEE_PERCENTAGE_TOO_HIGH",601:"FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH",602:"INSUFFICIENT_FLASH_LOAN_FEE_AMOUNT"};class Q{constructor(){}}async function ee(e){if("string"==typeof e)return e;if(s.Signer.isSigner(e))return e.getAddress();if(e.address)return e.address;throw new Error("Could not read account address")}var te;Q.isErrorCode=e=>{if(!e.includes("BAL#"))return!1;const t=e.replace("BAL#","");return Object.keys(Z).includes(t)},Q.parseErrorCode=e=>{if(!e.includes("BAL#"))throw new Error("Error code not found");const t=e.replace("BAL#",""),a=Z[t];if(!a)throw new Error("Error code not found");return a},Q.tryParseErrorCode=e=>{try{return Q.parseErrorCode(e)}catch{return e}},Q.isBalancerError=e=>Object.values(Z).includes(e),Q.encodeError=e=>{const t=Object.entries(Z).find((([,t])=>t===e));if(!t)throw Error("Error message not found");return`BAL#${t[0]}`},e.RelayerAction=void 0,(te=e.RelayerAction||(e.RelayerAction={})).JoinPool="JoinPool",te.ExitPool="ExitPool",te.Swap="Swap",te.BatchSwap="BatchSwap",te.SetRelayerApproval="SetRelayerApproval";class ae{constructor(){}}ae.encodeCalldataAuthorization=(e,t,a)=>{const n=i.hexZeroPad(i.hexValue(t),32).slice(2),{v:o,r:s,s:r}=i.splitSignature(a);return`${e}${n}${i.hexZeroPad(i.hexValue(o),32).slice(2)}${s.slice(2)}${r.slice(2)}`},ae.signJoinAuthorization=(t,a,n,o,i,s)=>ae.signAuthorizationFor(e.RelayerAction.JoinPool,t,a,n,o,i,s),ae.signExitAuthorization=(t,a,n,o,i,s)=>ae.signAuthorizationFor(e.RelayerAction.ExitPool,t,a,n,o,i,s),ae.signSwapAuthorization=(t,a,n,o,i,s)=>ae.signAuthorizationFor(e.RelayerAction.Swap,t,a,n,o,i,s),ae.signBatchSwapAuthorization=(t,a,n,o,i,s)=>ae.signAuthorizationFor(e.RelayerAction.BatchSwap,t,a,n,o,i,s),ae.signSetRelayerApprovalAuthorization=(t,a,n,o,i,s)=>ae.signAuthorizationFor(e.RelayerAction.SetRelayerApproval,t,a,n,o,i,s),ae.signAuthorizationFor=async(e,t,n,o,i,s=a.MaxUint256,r)=>{const{chainId:l}=await t.provider.getNetwork();if(!r){const e=await n.getAddress();r=await t.getNextNonce(e)}const d={name:"Balancer V2 Vault",version:"1",chainId:l,verifyingContract:t.address},p={[e]:[{name:"calldata",type:"bytes"},{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},u={calldata:i,sender:await ee(o),nonce:r.toString(),deadline:s.toString()};return n._signTypedData(d,p,u)};class ne{constructor(){}}ne.signSetMinterApproval=async(e,t,o,s,r=a.MaxUint256,l)=>{const{chainId:d}=await e.provider.getNetwork();if(!l){const t=await s.getAddress();l=await e.getNextNonce(t)}const p={name:"Balancer Minter",version:"1",chainId:d,verifyingContract:e.address},u={minter:await ee(t),approval:o,nonce:l.toString(),deadline:r.toString()},c=await s._signTypedData(p,{SetMinterApproval:[{name:"minter",type:"address"},{name:"approval",type:"bool"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},u);return{...i.splitSignature(c),deadline:n.BigNumber.from(r)}};const oe=BigInt(0),ie=BigInt(1),se=BigInt("1000000000000000000"),re=(e,t)=>{if(!e)throw new Error(t)};function le(e){const t=BigInt(18)-e;return se*BigInt(10)**t}function de(e,t){return ye.mulDownFixed(e,t)}function pe(e,t){const a=new Array(e.length);for(let n=0;n=0&&a>=e||t<0&&at>e?t:e))}static min(e,t){return e=this.MIN_NATURAL_EXPONENT&&e<=this.MAX_NATURAL_EXPONENT,"Errors.INVALID_EXPONENT"),e<0)return this.ONE_18*this.ONE_18/this.exp(BigInt(-1)*e);let t;e>=this.x0?(e-=this.x0,t=this.a0):e>=this.x1?(e-=this.x1,t=this.a1):t=BigInt(1),e*=BigInt(100);let a=this.ONE_20;e>=this.x2&&(e-=this.x2,a=a*this.a2/this.ONE_20),e>=this.x3&&(e-=this.x3,a=a*this.a3/this.ONE_20),e>=this.x4&&(e-=this.x4,a=a*this.a4/this.ONE_20),e>=this.x5&&(e-=this.x5,a=a*this.a5/this.ONE_20),e>=this.x6&&(e-=this.x6,a=a*this.a6/this.ONE_20),e>=this.x7&&(e-=this.x7,a=a*this.a7/this.ONE_20),e>=this.x8&&(e-=this.x8,a=a*this.a8/this.ONE_20),e>=this.x9&&(e-=this.x9,a=a*this.a9/this.ONE_20);let n,o=this.ONE_20;return n=e,o+=n,n=n*e/this.ONE_20/BigInt(2),o+=n,n=n*e/this.ONE_20/BigInt(3),o+=n,n=n*e/this.ONE_20/BigInt(4),o+=n,n=n*e/this.ONE_20/BigInt(5),o+=n,n=n*e/this.ONE_20/BigInt(6),o+=n,n=n*e/this.ONE_20/BigInt(7),o+=n,n=n*e/this.ONE_20/BigInt(8),o+=n,n=n*e/this.ONE_20/BigInt(9),o+=n,n=n*e/this.ONE_20/BigInt(10),o+=n,n=n*e/this.ONE_20/BigInt(11),o+=n,n=n*e/this.ONE_20/BigInt(12),o+=n,a*o/this.ONE_20*t/BigInt(100)}static _ln_36(e){const t=((e*=this.ONE_18)-this.ONE_36)*this.ONE_36/(e+this.ONE_36),a=t*t/this.ONE_36;let n=t,o=n;return n=n*a/this.ONE_36,o+=n/BigInt(3),n=n*a/this.ONE_36,o+=n/BigInt(5),n=n*a/this.ONE_36,o+=n/BigInt(7),n=n*a/this.ONE_36,o+=n/BigInt(9),n=n*a/this.ONE_36,o+=n/BigInt(11),n=n*a/this.ONE_36,o+=n/BigInt(13),n=n*a/this.ONE_36,o+=n/BigInt(15),o*BigInt(2)}static _ln(e){if(e=this.a0*this.ONE_18&&(e/=this.a0,t+=this.x0),e>=this.a1*this.ONE_18&&(e/=this.a1,t+=this.x1),t*=BigInt(100),(e*=BigInt(100))>=this.a2&&(e=e*this.ONE_20/this.a2,t+=this.x2),e>=this.a3&&(e=e*this.ONE_20/this.a3,t+=this.x3),e>=this.a4&&(e=e*this.ONE_20/this.a4,t+=this.x4),e>=this.a5&&(e=e*this.ONE_20/this.a5,t+=this.x5),e>=this.a6&&(e=e*this.ONE_20/this.a6,t+=this.x6),e>=this.a7&&(e=e*this.ONE_20/this.a7,t+=this.x7),e>=this.a8&&(e=e*this.ONE_20/this.a8,t+=this.x8),e>=this.a9&&(e=e*this.ONE_20/this.a9,t+=this.x9),e>=this.a10&&(e=e*this.ONE_20/this.a10,t+=this.x10),e>=this.a11&&(e=e*this.ONE_20/this.a11,t+=this.x11);const a=(e-this.ONE_20)*this.ONE_20/(e+this.ONE_20),n=a*a/this.ONE_20;let o=a,i=o;return o=o*n/this.ONE_20,i+=o/BigInt(3),o=o*n/this.ONE_20,i+=o/BigInt(5),o=o*n/this.ONE_20,i+=o/BigInt(7),o=o*n/this.ONE_20,i+=o/BigInt(9),o=o*n/this.ONE_20,i+=o/BigInt(11),i*=BigInt(2),(t+i)/BigInt(100)}}be.ONE_18=BigInt("1000000000000000000"),be.ONE_20=BigInt("100000000000000000000"),be.ONE_36=BigInt("1000000000000000000000000000000000000"),be.MAX_NATURAL_EXPONENT=BigInt("130000000000000000000"),be.MIN_NATURAL_EXPONENT=BigInt("-41000000000000000000"),be.LN_36_LOWER_BOUND=BigInt(be.ONE_18)-BigInt("100000000000000000"),be.LN_36_UPPER_BOUND=BigInt(be.ONE_18)+BigInt("100000000000000000"),be.MILD_EXPONENT_BOUND=BigInt(2)**BigInt(254)/be.ONE_20,be.x0=BigInt("128000000000000000000"),be.a0=BigInt("38877084059945950922200000000000000000000000000000000000"),be.x1=BigInt("64000000000000000000"),be.a1=BigInt("6235149080811616882910000000"),be.x2=BigInt("3200000000000000000000"),be.a2=BigInt("7896296018268069516100000000000000"),be.x3=BigInt("1600000000000000000000"),be.a3=BigInt("888611052050787263676000000"),be.x4=BigInt("800000000000000000000"),be.a4=BigInt("298095798704172827474000"),be.x5=BigInt("400000000000000000000"),be.a5=BigInt("5459815003314423907810"),be.x6=BigInt("200000000000000000000"),be.a6=BigInt("738905609893065022723"),be.x7=BigInt("100000000000000000000"),be.a7=BigInt("271828182845904523536"),be.x8=BigInt("50000000000000000000"),be.a8=BigInt("164872127070012814685"),be.x9=BigInt("25000000000000000000"),be.a9=BigInt("128402541668774148407"),be.x10=BigInt("12500000000000000000"),be.a10=BigInt("113314845306682631683"),be.x11=BigInt("6250000000000000000"),be.a11=BigInt("106449445891785942956");const me=(e,t,o)=>{var i;let s=o?e.tokens.map((e=>e.address===t?a.AddressZero:e.address)):e.tokens.map((e=>e.address)),r=e.tokens.map((e=>{var t;return null!==(t=e.decimals)&&void 0!==t?t:18})),l=e.tokens.map((e=>n.parseFixed(e.balance,e.decimals).toBigInt())),d=e.tokens.map((e=>{var t;return n.parseFixed(null!==(t=e.weight)&&void 0!==t?t:"1",18).toBigInt()})),p=e.tokens.map((e=>{var t;return n.parseFixed(null!==(t=e.priceRate)&&void 0!==t?t:"1",18).toBigInt()})),u=r.map((e=>le(BigInt(e)))),c=u.map(((e,t)=>ye.mulDownFixed(e,p[t]))),y=pe(l,c);if(t){const e=new z(t);[s,r,c,u,l,y,d,p]=e.sortTokens(s,r,c,u,l,y,d,p)}const b=n.parseFixed(null!==(i=e.amp)&&void 0!==i?i:"1",3).toBigInt(),m=y.indexOf(ye.max(y)),f=[...c],T=[...u],h=[...s],I=[...l],g=[...p],_=[...y],P=s.indexOf(e.address);return-1!==P&&(f.splice(P,1),T.splice(P,1),h.splice(P,1),I.splice(P,1),g.splice(P,1),_.splice(P,1)),{bptIndex:P,higherBalanceTokenIndex:m,ampWithPrecision:b,balancesEvm:l,balancesEvmWithoutBpt:I,priceRates:p,priceRatesWithoutBpt:g,swapFeeEvm:n.parseFixed(e.swapFee,18).toBigInt(),poolTokens:s,poolTokensWithoutBpt:h,weights:d,scalingFactors:c,scalingFactorsWithoutBpt:f,scalingFactorsRaw:u,scalingFactorsRawWithoutBpt:T,upScaledBalances:y,upScaledBalancesWithoutBpt:_,totalSharesEvm:n.parseFixed(e.totalShares||"0",18).toBigInt()}},fe={Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",WETH:"0x0000000000000000000000000000000000000000",BAL:"0x0000000000000000000000000000000000000000"}},Te={[e.Network.GOERLI]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","USDT","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",WETH:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1",BAL:"0xfA8449189744799aD2AcE7e0EBAC8BB7575eff47",bbaUSD:"0x13ACD41C585d7EbB4a9460f7C8f50BE60DC080Cd"},PriceChainMap:{"0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","0x37f03a12241e9fd3658ad6777d289c3fb8512bc9":"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599","0xfa8449189744799ad2ace7e0ebac8bb7575eff47":"0xba100000625a3754423978a60c9317c58a424e3d","0xe0c9275e44ea80ef17579d33c55136b7da269aeb":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","0x8c9e6c40d3402480ace624730524facc5482798c":"0x6b175474e89094c44da98b954eedeac495271d0f","0x1f1f156e0317167c11aa412e3d1435ea29dc3cce":"0xdac17f958d2ee523a2206206994597c13d831ec7","0x4cb1892fddf14f772b2e39e299f44b2e5da90d04":"0x3ed3b47dd13ec9a98b44e6204a523e766b225811","0x811151066392fd641fe74a9b55a712670572d161":"0xbcca60bb61934080951369a648fb03df4f96263c","0x89534a24450081aa267c79b07411e9617d984052":"0x028171bca77440897b824ca71d1c56cac55b68a3","0x829f35cebbcd47d3c120793c12f7a232c903138b":"0x956f47f50a910163d8bf957cf5846d573e7f87ca","0xff386a3d08f80ac38c77930d173fa56c6286dc8b":"0x6810e776880c02933d47db1b9fc05908e5386b96"}},[e.Network.MAINNET]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",WETH:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",BAL:"0xba100000625a3754423978a60c9317c58a424e3d",bbaUSD:"0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2",bbaUSDv2:"0xA13a9247ea42D743238089903570127DdA72fE44"}},[e.Network.POLYGON]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",WETH:"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",BAL:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3"}},[e.Network.ARBITRUM]:{Popular:{Symbols:["WBTC","DAI","USDC","BAL","AAVE","WETH"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",WETH:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",BAL:"0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8"}},[e.Network.GNOSIS]:{Popular:{Symbols:["xDAI","WXDAI","WETH","BAL"]},Addresses:{nativeAsset:"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",wNativeAsset:"0xe91d153e0b41518a2ce8dd3d7944fa863463a97d",WETH:"0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1",BAL:"0x7eF541E2a22058048904fE5744f9c7E4C57AF717"}}};function he(e){return Te[e]?Te[e]:fe}let Ie=!1,ge=!1;const _e={debug:1,default:2,info:2,warning:3,error:4,off:5};let Pe=_e.default,we=null;const xe=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(a){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var Ee,Ae;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(Ee||(Ee={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(Ae||(Ae={}));const Se="0123456789abcdef";class ve{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const a=e.toLowerCase();null==_e[a]&&this.throwArgumentError("invalid log level name","logLevel",e),Pe>_e[a]||console.log.apply(console,t)}debug(...e){this._log(ve.levels.DEBUG,e)}info(...e){this._log(ve.levels.INFO,e)}warn(...e){this._log(ve.levels.WARNING,e)}makeError(e,t,a){if(ge)return this.makeError("censored error",t,{});t||(t=ve.errors.UNKNOWN_ERROR),a||(a={});const n=[];Object.keys(a).forEach((e=>{const t=a[e];try{if(t instanceof Uint8Array){let a="";for(let e=0;e>4],a+=Se[15&t[e]];n.push(e+"=Uint8Array(0x"+a+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(a[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const o=e;let i="";switch(t){case Ae.NUMERIC_FAULT:{i="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":i+="-"+t;break;case"negative-power":case"negative-width":i+="-unsupported";break;case"unbound-bitwise-result":i+="-unbound-result"}break}case Ae.CALL_EXCEPTION:case Ae.INSUFFICIENT_FUNDS:case Ae.MISSING_NEW:case Ae.NONCE_EXPIRED:case Ae.REPLACEMENT_UNDERPRICED:case Ae.TRANSACTION_REPLACED:case Ae.UNPREDICTABLE_GAS_LIMIT:i=t}i&&(e+=" [ See: https://links.ethers.org/v5-errors-"+i+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(a).forEach((function(e){s[e]=a[e]})),s}throwError(e,t,a){throw this.makeError(e,t,a)}throwArgumentError(e,t,a){return this.throwError(e,ve.errors.INVALID_ARGUMENT,{argument:t,value:a})}assert(e,t,a,n){e||this.throwError(t,a,n)}assertArgument(e,t,a,n){e||this.throwArgumentError(t,a,n)}checkNormalize(e){xe&&this.throwError("platform missing String.prototype.normalize",ve.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:xe})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,ve.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,ve.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,a){a=a?": "+a:"",et&&this.throwError("too many arguments"+a,ve.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",ve.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",ve.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",ve.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return we||(we=new ve("logger/5.7.0")),we}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",ve.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Ie){if(!e)return;this.globalLogger().throwError("error censorship permanent",ve.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}ge=!!e,Ie=!!t}static setLogLevel(e){const t=_e[e.toLowerCase()];null!=t?Pe=t:ve.globalLogger().warn("invalid log level - "+e)}static from(e){return new ve(e)}}ve.errors=Ae,ve.levels=Ee;const ke=new ve("units/5.7.0"),Be=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Ce(e,t){if("string"==typeof t){const e=Be.indexOf(t);-1!==e&&(t=3*e)}return n.formatFixed(e,null!=t?t:18)}function Oe(e,t){if("string"!=typeof e&&ke.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=Be.indexOf(t);-1!==e&&(t=3*e)}return n.parseFixed(e,null!=t?t:18)}const Me={[e.Network.MAINNET]:{waUSDT:"0xf8fd466f12e236f4c96f7cce6c79eadb819abf58",waUSDC:"0xd093fa4fb80d09bb30817fdcd442d4d02ed3e5de",waDAI:"0x02d60b84491589974263d922d9cc7a3152618ef6"},[e.Network.POLYGON]:{wamDAI:"0xee029120c72b0607344f35b17cdd90025e647b00",wamUSDC:"0x221836a597948dce8f3568e044ff123108acc42a",wamUSDT:"0x19c60a251e525fa88cd6f3768416a8024e98fc19"}},Fe={[e.Network.MAINNET]:{[Me[e.Network.MAINNET].waUSDT]:{aToken:"0x3ed3b47dd13ec9a98b44e6204a523e766b225811",underlying:"0xdac17f958d2ee523a2206206994597c13d831ec7"},[Me[e.Network.MAINNET].waUSDC]:{aToken:"0xbcca60bb61934080951369a648fb03df4f96263c",underlying:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"},[Me[e.Network.MAINNET].waDAI]:{aToken:"0x028171bca77440897b824ca71d1c56cac55b68a3",underlying:"0x6b175474e89094c44da98b954eedeac495271d0f"}},[e.Network.POLYGON]:{[Me[e.Network.POLYGON].wamUSDT]:{aToken:"0x60d55f02a771d515e077c9c2403a1ef324885cec",underlying:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f"},[Me[e.Network.POLYGON].wamUSDC]:{aToken:"0x1a13f4ca1d028320a707d99520abfefca3998b7f",underlying:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174"},[Me[e.Network.POLYGON].wamDAI]:{aToken:"0x27f8d03b3a2196956ed754badc28d73be8830a6e",underlying:"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063"}}},Re=new t.Interface(["function rate() view returns (uint256)"]);class Ne{constructor(e,t){this.multicall=e,this.network=t}async fetch(e){const t=Object.values(Me[e]),a=t.map((e=>({target:e,callData:Re.encodeFunctionData("rate",[])}))),[,n]=await this.multicall.callStatic.aggregate(a);return t.reduce(((e,t,a)=>(e[t]||(e[t]="0x"==n[a]?0:parseFloat(Ce(n[a],27))),e)),{})}async getRate(e){return 1}}function Le(e,t){let a=e.toLowerCase();return a=De(a,t),a=Ue(a,t),a}const De=(e,t)=>{const a=he(t).PriceChainMap;return a&&a[e.toLowerCase()]||e},Ue=(e,t)=>{const a=e.toLocaleLowerCase(),n=t;return null!=Fe[n]&&null!=Fe[n]&&Object.keys(Fe[n]).includes(a)?Fe[n][a].aToken:a},Ve=(e,t)=>{const o=t.filter(((t,n)=>e[n]===a.AddressZero));return o[0]?n.BigNumber.from(o[0]):n.BigNumber.from(0)};class qe{constructor(e,t=200,a=100){this.fn=e,this.wait=t,this.limit=a,this.requestSets=[],this.promisedCalls=[],this.promisedCount=0,this.debounceCancel=()=>{}}fetch(e){var t,a;return(t=this.requestSets)[a=this.promisedCount]||(t[a]=new Set),e&&this.requestSets[this.promisedCount].add(e),this.requestSets[this.promisedCount].size>=this.limit?this.execute(0):this.promisedCalls[this.promisedCount]?this.promisedCalls[this.promisedCount].promise:this.execute(this.wait)}execute(e=0){this.promisedCalls[this.promisedCount]||(this.promisedCalls[this.promisedCount]=(()=>{let e=()=>{},t=()=>{};return{promise:new Promise(((a,n)=>{[e,t]=[a,n]})),reject:t,resolve:e}})());const{promise:t,resolve:a,reject:n}=this.promisedCalls[this.promisedCount];this.timeout&&clearTimeout(this.timeout);const o=()=>{const e=[...this.requestSets[this.promisedCount]];this.promisedCount++,this.fn(e).then((e=>{a(e),this.debounceCancel=()=>{}})).catch((e=>{e.response&&e.response.data&&e.response.data.error&&(e=e.response.data.error),n(e)}))};return e>0?this.timeout=setTimeout(o.bind(this),e):o(),this.debounceCancel=()=>{this.timeout&&clearTimeout(this.timeout),n("Cancelled"),delete this.promisedCalls[this.promisedCount]},t}}function Ge(e,t){const a=new RegExp(`[0-9]+\\.?[0-9]{0,${t}}`),o=e.match(a);let i=e;return o&&(i=o[0]),n.parseFixed(i,t)}function We(e,t){return n.formatFixed(e,t).replace(/(.0$)/,"")}const He=n.BigNumber.from("10000"),Ke=(e,t)=>e.mul(t).div(He),$e=(e,t)=>{const a=Ke(e,t);return e.sub(a)},Je=(e,t)=>{const a=Ke(e,t);return e.add(a)},je=(e,t)=>o.getAddress(e)===o.getAddress(t);function Xe(e,t,a){return t<0||t>e.length?e:[...e.slice(0,t),a,...e.slice(t)]}function Ye(e,t,a){return t<0||t>=e.length?e:[...e.slice(0,t),a,...e.slice(t+1)]}function ze(e,t){const a=[...e];return t<0||t>=e.length||a.splice(t,1),a}function Ze(e,t,...a){if(e.length!==t.length||a.some((e=>e.length!==t.length)))throw new Error("Array length mismatch");const n=e.map((e=>t.indexOf(e)));if(n.indexOf(-1)>=0)throw new Error("Invalid reference or original array");const o=[];return n.forEach(((e,t)=>{a.forEach(((a,n)=>{o[n]||(o[n]=[]),o[n][t]=a[e]}))})),o}function Qe(t){const a=Object.values(e.PoolType);return!(!t.includes("Linear")||!a.includes(t))}const et=({receipt:e,to:t,contractInterface:a,logName:n})=>{const o=e.logs.filter((e=>je(e.address,t))).map((e=>{try{return a.parseLog(e)}catch(e){return X.getInstance().warn(e),null}})).find((e=>(null==e?void 0:e.name)===n));if(!o)throw new Error("Event not found in logs");return o},tt=()=>`0x${Array(8).fill(null).map((()=>Math.random().toString(16).slice(2,10))).join("")}`;class at{format(e){return e}}class nt{constructor(){this.operatorMap={gt:"_gt",lt:"_lt",eq:"",in:"_in",not_in:"_not_in",contains:"_contains"}}format(e){const t={};return e.where&&Object.entries(e.where).forEach((([e,a])=>{Object.entries(a).forEach((([a,n])=>{t[`${e}${this.operatorMap[a]}`]=n}))})),{...e,where:t}}}class ot{constructor(e){this.args=e}merge(e){const t=r.mergeWith(this.args,e.args,((e,t)=>{if(Array.isArray(e))return e.concat(t)}));return new ot(t)}format(e){return e.format(this.args)}}const it=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct AaveLinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class st{static createInterface(){return new l.utils.Interface(it)}static connect(e,t){return new l.Contract(e,it,t)}}st.abi=it;const rt=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"AaveLinearPoolCreated",type:"event"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract AaveLinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class lt{static createInterface(){return new l.utils.Interface(rt)}static connect(e,t){return new l.Contract(e,rt,t)}}lt.abi=rt;const dt=[{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approveVault",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"toUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapAaveStaticToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"fromUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapAaveDynamicToken",outputs:[],stateMutability:"payable",type:"function"}];class pt{static createInterface(){return new l.utils.Interface(dt)}static connect(e,t){return new l.Contract(e,dt,t)}}pt.abi=dt;const ut=[{inputs:[{internalType:"address",name:"admin",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"previousAdminRole",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"newAdminRole",type:"bytes32"}],name:"RoleAdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"role",type:"bytes32"},{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"}],name:"RoleRevoked",type:"event"},{inputs:[],name:"DEFAULT_ADMIN_ROLE",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"actionId",type:"bytes32"},{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"",type:"address"}],name:"canPerform",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleAdmin",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"uint256",name:"index",type:"uint256"}],name:"getRoleMember",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"}],name:"getRoleMemberCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"grantRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address",name:"account",type:"address"}],name:"grantRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address[]",name:"accounts",type:"address[]"}],name:"grantRolesToMany",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"hasRole",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"renounceRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"role",type:"bytes32"},{internalType:"address",name:"account",type:"address"}],name:"revokeRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address",name:"account",type:"address"}],name:"revokeRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"roles",type:"bytes32[]"},{internalType:"address[]",name:"accounts",type:"address[]"}],name:"revokeRolesFromMany",outputs:[],stateMutability:"nonpayable",type:"function"}];class ct{static createInterface(){return new l.utils.Interface(ut)}static connect(e,t){return new l.Contract(e,ut,t)}}ct.abi=ut;const yt=[{inputs:[{internalType:"contract IVault",name:"_vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"vault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"}];class bt{static createInterface(){return new l.utils.Interface(yt)}static connect(e,t){return new l.Contract(e,yt,t)}}bt.abi=yt;const mt=[{inputs:[{internalType:"contract IBalancerTokenAdmin",name:"tokenAdmin",type:"address"},{internalType:"contract IGaugeController",name:"gaugeController",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"address",name:"gauge",type:"address"},{indexed:!1,internalType:"uint256",name:"minted",type:"uint256"}],name:"Minted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"minter",type:"address"},{indexed:!1,internalType:"bool",name:"approval",type:"bool"}],name:"MinterApprovalSet",type:"event"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"allowed_to_mint_for",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBalancerToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBalancerTokenAdmin",outputs:[{internalType:"contract IBalancerTokenAdmin",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getGaugeController",outputs:[{internalType:"contract IGaugeController",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"getMinterApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"gauge",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"gauge",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"mintFor",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"gauges",type:"address[]"}],name:"mintMany",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"gauges",type:"address[]"},{internalType:"address",name:"user",type:"address"}],name:"mintManyFor",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"gauge",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"mint_for",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[8]",name:"gauges",type:"address[8]"}],name:"mint_many",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"gauge",type:"address"}],name:"minted",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"bool",name:"approval",type:"bool"}],name:"setMinterApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"},{internalType:"bool",name:"approval",type:"bool"},{internalType:"address",name:"user",type:"address"},{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:"setMinterApprovalWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"minter",type:"address"}],name:"toggle_approve_mint",outputs:[],stateMutability:"nonpayable",type:"function"}];class ft{static createInterface(){return new l.utils.Interface(mt)}static connect(e,t){return new l.Contract(e,mt,t)}}ft.abi=mt;const Tt=[{inputs:[{internalType:"contract IVault",name:"_vault",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getAmpForPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getInRecoveryModeForPools",outputs:[{internalType:"bool[]",name:"",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getIsPausedForPools",outputs:[{internalType:"bool[]",name:"",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getLinearTargetsForPools",outputs:[{internalType:"uint256[][]",name:"",type:"uint256[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getNormalizedWeightsForPools",outputs:[{internalType:"uint256[][]",name:"",type:"uint256[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"poolIds",type:"bytes32[]"},{components:[{internalType:"bool",name:"loadTokenBalanceUpdatesAfterBlock",type:"bool"},{internalType:"bool",name:"loadTotalSupply",type:"bool"},{internalType:"bool",name:"loadSwapFees",type:"bool"},{internalType:"bool",name:"loadLinearWrappedTokenRates",type:"bool"},{internalType:"bool",name:"loadLinearTargets",type:"bool"},{internalType:"bool",name:"loadNormalizedWeights",type:"bool"},{internalType:"bool",name:"loadScalingFactors",type:"bool"},{internalType:"bool",name:"loadAmps",type:"bool"},{internalType:"bool",name:"loadRates",type:"bool"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"enum TotalSupplyType[]",name:"totalSupplyTypes",type:"uint8[]"},{internalType:"enum SwapFeeType[]",name:"swapFeeTypes",type:"uint8[]"},{internalType:"uint256[]",name:"linearPoolIdxs",type:"uint256[]"},{internalType:"uint256[]",name:"weightedPoolIdxs",type:"uint256[]"},{internalType:"uint256[]",name:"scalingFactorPoolIdxs",type:"uint256[]"},{internalType:"uint256[]",name:"ampPoolIdxs",type:"uint256[]"},{internalType:"uint256[]",name:"ratePoolIdxs",type:"uint256[]"}],internalType:"struct PoolDataQueryConfig",name:"config",type:"tuple"}],name:"getPoolData",outputs:[{internalType:"uint256[][]",name:"balances",type:"uint256[][]"},{internalType:"uint256[]",name:"totalSupplies",type:"uint256[]"},{internalType:"uint256[]",name:"swapFees",type:"uint256[]"},{internalType:"uint256[]",name:"linearWrappedTokenRates",type:"uint256[]"},{internalType:"uint256[][]",name:"linearTargets",type:"uint256[][]"},{internalType:"uint256[][]",name:"weights",type:"uint256[][]"},{internalType:"uint256[][]",name:"scalingFactors",type:"uint256[][]"},{internalType:"uint256[]",name:"amps",type:"uint256[]"},{internalType:"uint256[]",name:"rates",type:"uint256[]"},{internalType:"uint256[]",name:"ignoreIdxs",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"poolIds",type:"bytes32[]"},{components:[{internalType:"bool",name:"loadInRecoveryMode",type:"bool"},{internalType:"bool",name:"loadIsPaused",type:"bool"}],internalType:"struct PoolStatusQueryConfig",name:"config",type:"tuple"}],name:"getPoolStatus",outputs:[{internalType:"bool[]",name:"isPaused",type:"bool[]"},{internalType:"bool[]",name:"inRecoveryMode",type:"bool[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32[]",name:"poolIds",type:"bytes32[]"},{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getPoolTokenBalancesWithUpdatesAfterBlock",outputs:[{internalType:"uint256[][]",name:"",type:"uint256[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getRateForPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getScalingFactorsForPools",outputs:[{internalType:"uint256[][]",name:"",type:"uint256[][]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"},{internalType:"enum SwapFeeType[]",name:"swapFeeTypes",type:"uint8[]"}],name:"getSwapFeePercentageForPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"},{internalType:"enum TotalSupplyType[]",name:"totalSupplyTypes",type:"uint8[]"}],name:"getTotalSupplyForPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"poolAddresses",type:"address[]"}],name:"getWrappedTokenRateForLinearPools",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"vault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"}];class ht{static createInterface(){return new l.utils.Interface(Tt)}static connect(e,t){return new l.Contract(e,Tt,t)}}ht.abi=Tt;const It=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"address",name:"libraryAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getLibrary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];class gt{static createInterface(){return new l.utils.Interface(It)}static connect(e,t){return new l.Contract(e,It,t)}}gt.abi=It;const _t=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IERC20",name:"wstETH",type:"address"},{internalType:"contract IBalancerMinter",name:"minter",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approveVault",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{components:[{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"key",type:"uint256"}],internalType:"struct VaultActions.OutputReference[]",name:"outputReferences",type:"tuple[]"}],name:"batchSwap",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum VaultActions.PoolKind",name:"kind",type:"uint8"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"},{components:[{internalType:"uint256",name:"index",type:"uint256"},{internalType:"uint256",name:"key",type:"uint256"}],internalType:"struct VaultActions.OutputReference[]",name:"outputReferences",type:"tuple[]"}],name:"exitPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge[]",name:"gauges",type:"address[]"}],name:"gaugeClaimRewards",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge",name:"gauge",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"gaugeDeposit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"gauges",type:"address[]"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"gaugeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"approval",type:"bool"},{internalType:"address",name:"user",type:"address"},{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:"gaugeSetMinterApproval",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStakingLiquidityGauge",name:"gauge",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"gaugeWithdraw",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"getEntrypoint",outputs:[{internalType:"contract IBalancerRelayer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum VaultActions.PoolKind",name:"kind",type:"uint8"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.UserBalanceOpKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct IVault.UserBalanceOp[]",name:"ops",type:"tuple[]"},{internalType:"uint256",name:"value",type:"uint256"}],name:"manageUserBalance",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"ref",type:"uint256"}],name:"peekChainedReferenceValue",outputs:[{internalType:"uint256",name:"value",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"relayer",type:"address"},{internalType:"bool",name:"approved",type:"bool"},{internalType:"bytes",name:"authorisation",type:"bytes"}],name:"setRelayerApproval",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"stakeETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"stakeETHAndWrap",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"swap",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"toUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapAaveStaticToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ICToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapCompoundV2",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC4626",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapERC4626",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IEulerToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapEuler",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IGearboxDieselToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"dieselAmount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapGearbox",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IReaperTokenVault",name:"vaultToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapReaperVaultToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IShareToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapShareToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ITetuSmartVault",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapTetu",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IUnbuttonToken",name:"wrapperToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapUnbuttonToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapWstETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IYearnTokenVault",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"unwrapYearn",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20Permit",name:"token",type:"address"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"vaultPermit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20PermitDAI",name:"token",type:"address"},{internalType:"address",name:"holder",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"bool",name:"allowed",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"vaultPermitDAI",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IStaticATokenLM",name:"staticToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bool",name:"fromUnderlying",type:"bool"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapAaveDynamicToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ICToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapCompoundV2",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC4626",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapERC4626",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IEulerToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"eulerProtocol",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapEuler",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IGearboxDieselToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"mainAmount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapGearbox",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IReaperTokenVault",name:"vaultToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapReaperVaultToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IShareToken",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapShareToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapStETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract ITetuSmartVault",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapTetu",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IUnbuttonToken",name:"wrapperToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"uAmount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapUnbuttonToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IYearnTokenVault",name:"wrappedToken",type:"address"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"outputReference",type:"uint256"}],name:"wrapYearn",outputs:[],stateMutability:"payable",type:"function"}];class Pt{static createInterface(){return new l.utils.Interface(_t)}static connect(e,t){return new l.Contract(e,_t,t)}}Pt.abi=_t;const wt=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"tokenRateCacheDurations",type:"uint256[]"},{internalType:"bool[]",name:"exemptFromYieldProtocolFeeFlags",type:"bool[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],internalType:"struct ComposableStablePool.NewPoolParams",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"feeType",type:"uint256"},{indexed:!1,internalType:"uint256",name:"protocolFeePercentage",type:"uint256"}],name:"ProtocolFeePercentageCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenIndex",type:"uint256"},{indexed:!1,internalType:"uint256",name:"rate",type:"uint256"}],name:"TokenRateCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"tokenIndex",type:"uint256"},{indexed:!0,internalType:"contract IRateProvider",name:"provider",type:"address"},{indexed:!1,internalType:"uint256",name:"cacheDuration",type:"uint256"}],name:"TokenRateProviderSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getActualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastJoinExitData",outputs:[{internalType:"uint256",name:"lastJoinExitAmplification",type:"uint256"},{internalType:"uint256",name:"lastPostJoinExitInvariant",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMinimumBpt",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"feeType",type:"uint256"}],name:"getProtocolFeePercentageCache",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolSwapFeeDelegation",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRateProviders",outputs:[{internalType:"contract IRateProvider[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"getTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"getTokenRateCache",outputs:[{internalType:"uint256",name:"rate",type:"uint256"},{internalType:"uint256",name:"oldRate",type:"uint256"},{internalType:"uint256",name:"duration",type:"uint256"},{internalType:"uint256",name:"expires",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"isTokenExemptFromYieldProtocolFee",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"duration",type:"uint256"}],name:"setTokenRateCacheDuration",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"updateProtocolFeePercentageCache",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"updateTokenRateCache",outputs:[],stateMutability:"nonpayable",type:"function"}];class xt{static createInterface(){return new l.utils.Interface(wt)}static connect(e,t){return new l.Contract(e,wt,t)}}xt.abi=wt;const Et=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256[]",name:"tokenRateCacheDurations",type:"uint256[]"},{internalType:"bool[]",name:"exemptFromYieldProtocolFeeFlags",type:"bool[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract ComposableStablePool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class At{static createInterface(){return new l.utils.Interface(Et)}static connect(e,t){return new l.Contract(e,Et,t)}}At.abi=Et;const St=[{inputs:[{internalType:"contract IERC20",name:"_underlying",type:"address"},{internalType:"contract IERC20",name:"_bond",type:"address"},{internalType:"uint256",name:"_expiration",type:"uint256"},{internalType:"uint256",name:"_unitSeconds",type:"uint256"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"uint256",name:"_percentFee",type:"uint256"},{internalType:"uint256",name:"_percentFeeGov",type:"uint256"},{internalType:"address",name:"_governance",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"collectedBase",type:"uint256"},{indexed:!1,internalType:"uint256",name:"collectedBond",type:"uint256"},{indexed:!1,internalType:"uint256",name:"remainingBase",type:"uint256"},{indexed:!1,internalType:"uint256",name:"remainingBond",type:"uint256"}],name:"FeeCollection",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,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:"FEE_BOUND",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"bond",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"bondDecimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"expiration",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feesBond",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"feesUnderlying",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"governance",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"increaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"currentBalances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"protocolSwapFee",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"currentBalances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"protocolSwapFee",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256",name:"currentBalanceTokenIn",type:"uint256"},{internalType:"uint256",name:"currentBalanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"percentFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"percentFeeGov",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"reserveX",type:"uint256"},{internalType:"uint256",name:"reserveY",type:"uint256"},{internalType:"bool",name:"out",type:"bool"}],name:"solveTradeInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"underlying",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"underlyingDecimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"unitSeconds",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}];class vt{static createInterface(){return new l.utils.Interface(St)}static connect(e,t){return new l.Contract(e,St,t)}}vt.abi=St;const kt=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"}];class Bt{static createInterface(){return new l.utils.Interface(kt)}static connect(e,t){return new l.Contract(e,kt,t)}}Bt.abi=kt;const Ct=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct ERC4626LinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Ot{static createInterface(){return new l.utils.Interface(Ct)}static connect(e,t){return new l.Contract(e,Ct,t)}}Ot.abi=Ct;const Mt=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"Erc4626LinearPoolCreated",type:"event"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract LinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Ft{static createInterface(){return new l.utils.Interface(Mt)}static connect(e,t){return new l.Contract(e,Mt,t)}}Ft.abi=Mt;const Rt=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct EulerLinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Nt{static createInterface(){return new l.utils.Interface(Rt)}static connect(e,t){return new l.Contract(e,Rt,t)}}Nt.abi=Rt;const Lt=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"_eulerProtocol",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"EulerLinearPoolCreated",type:"event"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"}],name:"create",outputs:[{internalType:"contract LinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eulerProtocol",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Dt{static createInterface(){return new l.utils.Interface(Lt)}static connect(e,t){return new l.Contract(e,Lt,t)}}Dt.abi=Lt;const Ut=[{inputs:[{internalType:"address[]",name:"_assetsToRegister",type:"address[]"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"uint256",name:"_protocolPercentFee",type:"uint256"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_symbol",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"numeraire",type:"address"},{indexed:!0,internalType:"address",name:"reserve",type:"address"},{indexed:!1,internalType:"uint256",name:"weight",type:"uint256"}],name:"AssetIncluded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"derivative",type:"address"},{indexed:!0,internalType:"address",name:"numeraire",type:"address"},{indexed:!0,internalType:"address",name:"reserve",type:"address"},{indexed:!1,internalType:"address",name:"assimilator",type:"address"}],name:"AssimilatorIncluded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"newCollector",type:"address"}],name:"ChangeCollectorAddress",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"isEmergency",type:"bool"}],name:"EmergencyAlarm",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"lptAmountBurned",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"amountsWithdrawn",type:"uint256[]"}],name:"EmergencyWithdraw",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"feesCollected",type:"uint256"}],name:"FeesAccrued",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"feesCollected",type:"uint256"}],name:"FeesCollected",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"lptAmountBurned",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"amountsWithdrawn",type:"uint256[]"}],name:"OnExitPool",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"lptAmountMinted",type:"uint256"},{indexed:!1,internalType:"uint256[]",name:"amountsDeposited",type:"uint256[]"}],name:"OnJoinPool",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"alpha",type:"uint256"},{indexed:!1,internalType:"uint256",name:"beta",type:"uint256"},{indexed:!1,internalType:"uint256",name:"delta",type:"uint256"},{indexed:!1,internalType:"uint256",name:"epsilon",type:"uint256"},{indexed:!1,internalType:"uint256",name:"lambda",type:"uint256"}],name:"ParametersSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Paused",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"updater",type:"address"},{indexed:!1,internalType:"uint256",name:"newProtocolPercentage",type:"uint256"}],name:"ProtocolFeeShareUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"trader",type:"address"},{indexed:!0,internalType:"address",name:"origin",type:"address"},{indexed:!0,internalType:"address",name:"target",type:"address"},{indexed:!1,internalType:"uint256",name:"originAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"targetAmount",type:"uint256"}],name:"Trade",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"account",type:"address"}],name:"Unpaused",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_derivative",type:"address"}],name:"assimilator",outputs:[{internalType:"address",name:"assimilator_",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"collectorAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"curve",outputs:[{internalType:"int128",name:"alpha",type:"int128"},{internalType:"int128",name:"beta",type:"int128"},{internalType:"int128",name:"delta",type:"int128"},{internalType:"int128",name:"epsilon",type:"int128"},{internalType:"int128",name:"lambda",type:"int128"},{internalType:"uint256",name:"cap",type:"uint256"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"address",name:"fxPoolAddress",type:"address"},{internalType:"bytes32",name:"poolId",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"derivatives",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"emergency",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[]",name:"_assets",type:"address[]"},{internalType:"uint256[]",name:"_assetWeights",type:"uint256[]"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint256",name:"total_",type:"uint256"},{internalType:"uint256[]",name:"individual_",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"numeraires",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"paused",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"protocolPercentFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"reserves",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_cap",type:"uint256"}],name:"setCap",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_collectorAddress",type:"address"}],name:"setCollectorAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"_emergency",type:"bool"}],name:"setEmergency",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_alpha",type:"uint256"},{internalType:"uint256",name:"_beta",type:"uint256"},{internalType:"uint256",name:"_feeAtHalt",type:"uint256"},{internalType:"uint256",name:"_epsilon",type:"uint256"},{internalType:"uint256",name:"_lambda",type:"uint256"}],name:"setParams",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_protocolPercentFee",type:"uint256"}],name:"setProtocolPercentFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalUnclaimedFeesInNumeraire",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"totalDepositNumeraire",type:"uint256"}],name:"viewDeposit",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"viewParameters",outputs:[{internalType:"uint256",name:"alpha_",type:"uint256"},{internalType:"uint256",name:"beta_",type:"uint256"},{internalType:"uint256",name:"delta_",type:"uint256"},{internalType:"uint256",name:"epsilon_",type:"uint256"},{internalType:"uint256",name:"lambda_",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_curvesToBurn",type:"uint256"}],name:"viewWithdraw",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"}];class Vt{static createInterface(){return new l.utils.Interface(Ut)}static connect(e,t){return new l.Contract(e,Ut,t)}}Vt.abi=Ut;const qt=[{inputs:[],name:"CLAIM_FREQUENCY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IRewardsOnlyGauge",name:"gauge",type:"address"},{internalType:"address",name:"user",type:"address"}],name:"claimRewardsFromGauge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IRewardsOnlyGauge[]",name:"gauges",type:"address[]"},{internalType:"address",name:"user",type:"address"}],name:"claimRewardsFromGauges",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IRewardsOnlyGauge",name:"gauge",type:"address"},{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"token",type:"address"}],name:"getPendingRewards",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"}];class Gt{static createInterface(){return new l.utils.Interface(qt)}static connect(e,t){return new l.Contract(e,qt,t)}}Gt.abi=qt;const Wt=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct GearboxLinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class Ht{static createInterface(){return new l.utils.Interface(Wt)}static connect(e,t){return new l.Contract(e,Wt,t)}}Ht.abi=Wt;const Kt=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"GearboxLinearPoolCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract GearboxLinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class $t{static createInterface(){return new l.utils.Interface(Kt)}static connect(e,t){return new l.Contract(e,Kt,t)}}$t.abi=Kt;const Jt=[{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"key",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"previousValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newValue",type:"uint256"}],name:"ConfigChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"key",type:"bytes32"}],name:"ConfigFrozen",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"key",type:"bytes32"}],name:"ConfigUnset",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"newGovernor",type:"address"}],name:"GovernorChangeRequested",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldGovernor",type:"address"},{indexed:!1,internalType:"address",name:"newGovernor",type:"address"}],name:"GovernorChanged",type:"event"},{inputs:[],name:"acceptGovernance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newGovernor",type:"address"}],name:"changeGovernor",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"freeze",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"},{internalType:"address",name:"defaultValue",type:"address"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"getAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"getConfigMeta",outputs:[{internalType:"uint8",name:"",type:"uint8"},{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"getUint",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"governor",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"hasKey",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_governor",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"listKeys",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"pendingGovernor",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"},{internalType:"address",name:"newValue",type:"address"}],name:"setAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"},{internalType:"uint256",name:"newValue",type:"uint256"}],name:"setUint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"key",type:"bytes32"}],name:"unset",outputs:[],stateMutability:"nonpayable",type:"function"}];class jt{static createInterface(){return new l.utils.Interface(Jt)}static connect(e,t){return new l.Contract(e,Jt,t)}}jt.abi=Jt;const Xt=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IwstETH",name:"wstETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"swapAmounts",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getStETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWstETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"swapAmount",type:"uint256"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];class Yt{static createInterface(){return new l.utils.Interface(Xt)}static connect(e,t){return new l.Contract(e,Xt,t)}}Yt.abi=Xt;const zt=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],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:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class Zt{static createInterface(){return new l.utils.Interface(zt)}static connect(e,t){return new l.Contract(e,zt,t)}}Zt.abi=zt;const Qt=[{name:"Deposit",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Withdraw",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"UpdateLiquidityLimit",inputs:[{name:"user",type:"address",indexed:!0},{name:"original_balance",type:"uint256",indexed:!1},{name:"original_supply",type:"uint256",indexed:!1},{name:"working_balance",type:"uint256",indexed:!1},{name:"working_supply",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Transfer",inputs:[{name:"_from",type:"address",indexed:!0},{name:"_to",type:"address",indexed:!0},{name:"_value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Approval",inputs:[{name:"_owner",type:"address",indexed:!0},{name:"_spender",type:"address",indexed:!0},{name:"_value",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{stateMutability:"nonpayable",type:"constructor",inputs:[{name:"minter",type:"address"},{name:"veBoostProxy",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"},{name:"_addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit",inputs:[{name:"_value",type:"uint256"},{name:"_addr",type:"address"},{name:"_claim_rewards",type:"bool"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[{name:"_value",type:"uint256"},{name:"_claim_rewards",type:"bool"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[{name:"_addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"claim_rewards",inputs:[{name:"_addr",type:"address"},{name:"_receiver",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"transferFrom",inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"transfer",inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"approve",inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"permit",inputs:[{name:"_owner",type:"address"},{name:"_spender",type:"address"},{name:"_value",type:"uint256"},{name:"_deadline",type:"uint256"},{name:"_v",type:"uint8"},{name:"_r",type:"bytes32"},{name:"_s",type:"bytes32"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"increaseAllowance",inputs:[{name:"_spender",type:"address"},{name:"_added_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"decreaseAllowance",inputs:[{name:"_spender",type:"address"},{name:"_subtracted_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"user_checkpoint",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"bool"}]},{stateMutability:"nonpayable",type:"function",name:"set_rewards_receiver",inputs:[{name:"_receiver",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"kick",inputs:[{name:"addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit_reward_token",inputs:[{name:"_reward_token",type:"address"},{name:"_amount",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"add_reward",inputs:[{name:"_reward_token",type:"address"},{name:"_distributor",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"set_reward_distributor",inputs:[{name:"_reward_token",type:"address"},{name:"_distributor",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"set_killed",inputs:[{name:"_is_killed",type:"bool"}],outputs:[]},{stateMutability:"view",type:"function",name:"claimed_reward",inputs:[{name:"_addr",type:"address"},{name:"_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_reward",inputs:[{name:"_user",type:"address"},{name:"_reward_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_reward_write",inputs:[{name:"_addr",type:"address"},{name:"_token",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"claimable_tokens",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_checkpoint",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"future_epoch_time",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"inflation_rate",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"decimals",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"version",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"allowance",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"nonpayable",type:"function",name:"initialize",inputs:[{name:"_lp_token",type:"address"}],outputs:[]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"symbol",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"DOMAIN_SEPARATOR",inputs:[],outputs:[{name:"",type:"bytes32"}]},{stateMutability:"view",type:"function",name:"nonces",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"factory",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"lp_token",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"is_killed",inputs:[],outputs:[{name:"",type:"bool"}]},{stateMutability:"view",type:"function",name:"reward_count",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"reward_data",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"tuple",components:[{name:"token",type:"address"},{name:"distributor",type:"address"},{name:"period_finish",type:"uint256"},{name:"rate",type:"uint256"},{name:"last_update",type:"uint256"},{name:"integral",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"rewards_receiver",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"reward_integral_for",inputs:[{name:"arg0",type:"address"},{name:"arg1",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"working_balances",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"working_supply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_inv_supply_of",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_checkpoint_of",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_fraction",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"period",inputs:[],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"reward_tokens",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"period_timestamp",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"integrate_inv_supply",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"uint256"}]}];class ea{static createInterface(){return new l.utils.Interface(Qt)}static connect(e,t){return new l.Contract(e,Qt,t)}}ea.abi=Qt;const ta=[{constant:!1,inputs:[{components:[{name:"target",type:"address"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{name:"blockNumber",type:"uint256"},{name:"returnData",type:"bytes[]"}],payable:!1,stateMutability:"nonpayable",type:"function"}];class aa{static createInterface(){return new l.utils.Interface(ta)}static connect(e,t){return new l.Contract(e,ta,t)}}aa.abi=ta;const na=[{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes[]",name:"returnData",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3[]",name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3Value[]",name:"calls",type:"tuple[]"}],name:"aggregate3Value",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"blockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getBasefee",outputs:[{internalType:"uint256",name:"basefee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBlockNumber",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"chainid",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockCoinbase",outputs:[{internalType:"address",name:"coinbase",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockDifficulty",outputs:[{internalType:"uint256",name:"difficulty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockGasLimit",outputs:[{internalType:"uint256",name:"gaslimit",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"addr",type:"address"}],name:"getEthBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryAggregate",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryBlockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"}];class oa{static createInterface(){return new l.utils.Interface(na)}static connect(e,t){return new l.Contract(e,na,t)}}oa.abi=na;const ia=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256",name:"amplificationParameter",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"startValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endValue",type:"uint256"},{indexed:!1,internalType:"uint256",name:"startTime",type:"uint256"},{indexed:!1,internalType:"uint256",name:"endTime",type:"uint256"}],name:"AmpUpdateStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"currentValue",type:"uint256"}],name:"AmpUpdateStopped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAmplificationParameter",outputs:[{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bool",name:"isUpdating",type:"bool"},{internalType:"uint256",name:"precision",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"swapRequest",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],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:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"rawEndValue",type:"uint256"},{internalType:"uint256",name:"endTime",type:"uint256"}],name:"startAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopAmplificationParameterUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];class sa{static createInterface(){return new l.utils.Interface(ia)}static connect(e,t){return new l.Contract(e,ia,t)}}sa.abi=ia;const ra=[{inputs:[{internalType:"contract IStaticAToken",name:"_waToken",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"waToken",outputs:[{internalType:"contract IStaticAToken",name:"",type:"address"}],stateMutability:"view",type:"function"}];class la{static createInterface(){return new l.utils.Interface(ra)}static connect(e,t){return new l.Contract(e,ra,t)}}la.abi=ra;const da=[{inputs:[{internalType:"contract IAuthorizer",name:"authorizer",type:"address"},{internalType:"contract IWETH",name:"weth",type:"address"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"AuthorizerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"ExternalBalanceTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"feeAmount",type:"uint256"}],name:"FlashLoan",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"delta",type:"int256"}],name:"InternalBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"liquidityProvider",type:"address"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"int256[]",name:"deltas",type:"int256[]"},{indexed:!1,internalType:"uint256[]",name:"protocolFeeAmounts",type:"uint256[]"}],name:"PoolBalanceChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"assetManager",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"int256",name:"cashDelta",type:"int256"},{indexed:!1,internalType:"int256",name:"managedDelta",type:"int256"}],name:"PoolBalanceManaged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"address",name:"poolAddress",type:"address"},{indexed:!1,internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"PoolRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"relayer",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"RelayerApprovalChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!0,internalType:"contract IERC20",name:"tokenIn",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"tokenOut",type:"address"},{indexed:!1,internalType:"uint256",name:"amountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amountOut",type:"uint256"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"TokensDeregistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"poolId",type:"bytes32"},{indexed:!1,internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{indexed:!1,internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"TokensRegistered",type:"event"},{inputs:[],name:"WETH",outputs:[{internalType:"contract IWETH",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"int256[]",name:"limits",type:"int256[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"batchSwap",outputs:[{internalType:"int256[]",name:"assetDeltas",type:"int256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"deregisterTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.ExitPoolRequest",name:"request",type:"tuple"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IFlashLoanRecipient",name:"recipient",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"flashLoan",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"}],name:"getInternalBalance",outputs:[{internalType:"uint256[]",name:"balances",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"enum IVault.PoolSpecialization",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"}],name:"getPoolTokenInfo",outputs:[{internalType:"uint256",name:"cash",type:"uint256"},{internalType:"uint256",name:"managed",type:"uint256"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"assetManager",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"}],name:"getPoolTokens",outputs:[{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract ProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"address",name:"relayer",type:"address"}],name:"hasApprovedRelayer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{components:[{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"},{internalType:"bytes",name:"userData",type:"bytes"},{internalType:"bool",name:"fromInternalBalance",type:"bool"}],internalType:"struct IVault.JoinPoolRequest",name:"request",type:"tuple"}],name:"joinPool",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.PoolBalanceOpKind",name:"kind",type:"uint8"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct IVault.PoolBalanceOp[]",name:"ops",type:"tuple[]"}],name:"managePoolBalance",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.UserBalanceOpKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"asset",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"sender",type:"address"},{internalType:"address payable",name:"recipient",type:"address"}],internalType:"struct IVault.UserBalanceOp[]",name:"ops",type:"tuple[]"}],name:"manageUserBalance",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"assetInIndex",type:"uint256"},{internalType:"uint256",name:"assetOutIndex",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.BatchSwapStep[]",name:"swaps",type:"tuple[]"},{internalType:"contract IAsset[]",name:"assets",type:"address[]"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"}],name:"queryBatchSwap",outputs:[{internalType:"int256[]",name:"",type:"int256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"enum IVault.PoolSpecialization",name:"specialization",type:"uint8"}],name:"registerPool",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"address[]",name:"assetManagers",type:"address[]"}],name:"registerTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IAuthorizer",name:"newAuthorizer",type:"address"}],name:"setAuthorizer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"relayer",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setRelayerApproval",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IAsset",name:"assetIn",type:"address"},{internalType:"contract IAsset",name:"assetOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IVault.SingleSwap",name:"singleSwap",type:"tuple"},{components:[{internalType:"address",name:"sender",type:"address"},{internalType:"bool",name:"fromInternalBalance",type:"bool"},{internalType:"address payable",name:"recipient",type:"address"},{internalType:"bool",name:"toInternalBalance",type:"bool"}],internalType:"struct IVault.FundManagement",name:"funds",type:"tuple"},{internalType:"uint256",name:"limit",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swap",outputs:[{internalType:"uint256",name:"amountCalculated",type:"uint256"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];class pa{static createInterface(){return new l.utils.Interface(da)}static connect(e,t){return new l.Contract(e,da,t)}}pa.abi=da;const ua=[{inputs:[{components:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"address[]",name:"assetManagers",type:"address[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],internalType:"struct WeightedPool.NewPoolParams",name:"params",type:"tuple"},{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"feeType",type:"uint256"},{indexed:!1,internalType:"uint256",name:"protocolFeePercentage",type:"uint256"}],name:"ProtocolFeePercentageCacheUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getATHRateProduct",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getActualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastPostJoinExitInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"feeType",type:"uint256"}],name:"getProtocolFeePercentageCache",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolSwapFeeDelegation",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRateProviders",outputs:[{internalType:"contract IRateProvider[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"bytes",name:"poolConfig",type:"bytes"}],name:"setAssetManagerPoolConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"updateProtocolFeePercentageCache",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class ca{static createInterface(){return new l.utils.Interface(ua)}static connect(e,t){return new l.Contract(e,ua,t)}}ca.abi=ua;const ya=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20[]",name:"tokens",type:"address[]"},{internalType:"uint256[]",name:"normalizedWeights",type:"uint256[]"},{internalType:"contract IRateProvider[]",name:"rateProviders",type:"address[]"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class ba{static createInterface(){return new l.utils.Interface(ya)}static connect(e,t){return new l.Contract(e,ya,t)}}ba.abi=ya;const ma=[{inputs:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"address",name:"assetManager",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"version",type:"string"}],internalType:"struct YearnLinearPool.ConstructorArgs",name:"args",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"RecoveryModeStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"lowerTarget",type:"uint256"},{indexed:!1,internalType:"uint256",name:"upperTarget",type:"uint256"}],name:"TargetsSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBptIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMainToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNextNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeesCollector",outputs:[{internalType:"contract IProtocolFeesCollector",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getScalingFactors",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTargets",outputs:[{internalType:"uint256",name:"lowerTarget",type:"uint256"},{internalType:"uint256",name:"upperTarget",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVirtualSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedToken",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWrappedTokenRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"inRecoveryMode",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFees",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"indexIn",type:"uint256"},{internalType:"uint256",name:"indexOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newLowerTarget",type:"uint256"},{internalType:"uint256",name:"newUpperTarget",type:"uint256"}],name:"setTargets",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class fa{static createInterface(){return new l.utils.Interface(ma)}static connect(e,t){return new l.Contract(e,ma,t)}}fa.abi=ma;const Ta=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IProtocolFeePercentagesProvider",name:"protocolFeeProvider",type:"address"},{internalType:"contract IBalancerQueries",name:"queries",type:"address"},{internalType:"string",name:"factoryVersion",type:"string"},{internalType:"string",name:"poolVersion",type:"string"},{internalType:"uint256",name:"initialPauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[],name:"FactoryDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pool",type:"address"},{indexed:!0,internalType:"uint256",name:"protocolId",type:"uint256"}],name:"YearnLinearPoolCreated",type:"event"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"mainToken",type:"address"},{internalType:"contract IERC20",name:"wrappedToken",type:"address"},{internalType:"uint256",name:"upperTarget",type:"uint256"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"protocolId",type:"uint256"},{internalType:"bytes32",name:"salt",type:"bytes32"}],name:"create",outputs:[{internalType:"contract LinearPool",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"disable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCode",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCreationCodeContracts",outputs:[{internalType:"address",name:"contractA",type:"address"},{internalType:"address",name:"contractB",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastCreatedPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPauseConfiguration",outputs:[{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolVersion",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getProtocolFeePercentagesProvider",outputs:[{internalType:"contract IProtocolFeePercentagesProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"isDisabled",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"}],name:"isPoolFromFactory",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];class ha{static createInterface(){return new l.utils.Interface(Ta)}static connect(e,t){return new l.Contract(e,Ta,t)}}ha.abi=Ta;const Ia=[{inputs:[{components:[{components:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"contract IERC20",name:"token0",type:"address"},{internalType:"contract IERC20",name:"token1",type:"address"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"},{internalType:"uint256",name:"pauseWindowDuration",type:"uint256"},{internalType:"uint256",name:"bufferPeriodDuration",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"address",name:"owner",type:"address"}],internalType:"struct ExtensibleWeightedPool2Tokens.NewPoolParams",name:"baseParams",type:"tuple"},{components:[{internalType:"int256",name:"alpha",type:"int256"},{internalType:"int256",name:"beta",type:"int256"},{internalType:"int256",name:"c",type:"int256"},{internalType:"int256",name:"s",type:"int256"},{internalType:"int256",name:"lambda",type:"int256"}],internalType:"struct GyroECLPMath.Params",name:"eclpParams",type:"tuple"},{components:[{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],internalType:"struct GyroECLPMath.Vector2",name:"tauAlpha",type:"tuple"},{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],internalType:"struct GyroECLPMath.Vector2",name:"tauBeta",type:"tuple"},{internalType:"int256",name:"u",type:"int256"},{internalType:"int256",name:"v",type:"int256"},{internalType:"int256",name:"w",type:"int256"},{internalType:"int256",name:"z",type:"int256"},{internalType:"int256",name:"dSq",type:"int256"}],internalType:"struct GyroECLPMath.DerivedParams",name:"derivedEclpParams",type:"tuple"},{internalType:"address",name:"rateProvider0",type:"address"},{internalType:"address",name:"rateProvider1",type:"address"},{internalType:"address",name:"capManager",type:"address"},{components:[{internalType:"bool",name:"capEnabled",type:"bool"},{internalType:"uint120",name:"perAddressCap",type:"uint120"},{internalType:"uint128",name:"globalCap",type:"uint128"}],internalType:"struct ICappedLiquidity.CapParams",name:"capParams",type:"tuple"},{internalType:"address",name:"pauseManager",type:"address"}],internalType:"struct GyroECLPPool.GyroParams",name:"params",type:"tuple"},{internalType:"address",name:"configAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"capManager",type:"address"}],name:"CapManagerUpdated",type:"event"},{anonymous:!1,inputs:[{components:[{internalType:"bool",name:"capEnabled",type:"bool"},{internalType:"uint120",name:"perAddressCap",type:"uint120"},{internalType:"uint128",name:"globalCap",type:"uint128"}],indexed:!1,internalType:"struct ICappedLiquidity.CapParams",name:"params",type:"tuple"}],name:"CapParamsUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"derivedParamsValidated",type:"bool"}],name:"ECLPDerivedParamsValidated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paramsValidated",type:"bool"}],name:"ECLPParamsValidated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"invariantAfterJoin",type:"uint256"}],name:"InvariantAterInitializeJoin",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"oldInvariant",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newInvariant",type:"uint256"}],name:"InvariantOldAndNew",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"OracleEnabledChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"oracleUpdatedIndex",type:"uint256"}],name:"OracleIndexUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldPauseManager",type:"address"},{indexed:!1,internalType:"address",name:"newPauseManager",type:"address"}],name:"PauseManagerChanged",type:"event"},{anonymous:!1,inputs:[],name:"PausedLocally",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bool",name:"paused",type:"bool"}],name:"PausedStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"SwapFeePercentageChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256[]",name:"balances",type:"uint256[]"},{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],indexed:!1,internalType:"struct GyroECLPMath.Vector2",name:"invariant",type:"tuple"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"SwapParams",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[],name:"UnpausedLocally",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"_dSq",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsAlpha",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsBeta",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsC",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsLambda",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_paramsS",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_tauAlphaX",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_tauAlphaY",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_tauBetaX",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_tauBetaY",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_u",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_v",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_w",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_z",outputs:[{internalType:"int256",name:"",type:"int256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"capManager",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"capParams",outputs:[{components:[{internalType:"bool",name:"capEnabled",type:"bool"},{internalType:"uint120",name:"perAddressCap",type:"uint120"},{internalType:"uint128",name:"globalCap",type:"uint128"}],internalType:"struct ICappedLiquidity.CapParams",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_pauseManager",type:"address"}],name:"changePauseManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"startIndex",type:"uint256"},{internalType:"uint256",name:"endIndex",type:"uint256"}],name:"dirtyUninitializedOracleSamples",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"enableOracle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getECLPParams",outputs:[{components:[{internalType:"int256",name:"alpha",type:"int256"},{internalType:"int256",name:"beta",type:"int256"},{internalType:"int256",name:"c",type:"int256"},{internalType:"int256",name:"s",type:"int256"},{internalType:"int256",name:"lambda",type:"int256"}],internalType:"struct GyroECLPMath.Params",name:"params",type:"tuple"},{components:[{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],internalType:"struct GyroECLPMath.Vector2",name:"tauAlpha",type:"tuple"},{components:[{internalType:"int256",name:"x",type:"int256"},{internalType:"int256",name:"y",type:"int256"}],internalType:"struct GyroECLPMath.Vector2",name:"tauBeta",type:"tuple"},{internalType:"int256",name:"u",type:"int256"},{internalType:"int256",name:"v",type:"int256"},{internalType:"int256",name:"w",type:"int256"},{internalType:"int256",name:"z",type:"int256"},{internalType:"int256",name:"dSq",type:"int256"}],internalType:"struct GyroECLPMath.DerivedParams",name:"d",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLargestSafeQueryWindow",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getLastInvariant",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"}],name:"getLatest",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiscData",outputs:[{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"logTotalSupply",type:"int256"},{internalType:"uint256",name:"oracleSampleCreationTimestamp",type:"uint256"},{internalType:"uint256",name:"oracleIndex",type:"uint256"},{internalType:"bool",name:"oracleEnabled",type:"bool"},{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNormalizedWeights",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAccumulatorQuery[]",name:"queries",type:"tuple[]"}],name:"getPastAccumulators",outputs:[{internalType:"int256[]",name:"results",type:"int256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPausedState",outputs:[{internalType:"bool",name:"paused",type:"bool"},{internalType:"uint256",name:"pauseWindowEndTime",type:"uint256"},{internalType:"uint256",name:"bufferPeriodEndTime",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPoolId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPrice",outputs:[{internalType:"uint256",name:"spotPrice",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getSample",outputs:[{internalType:"int256",name:"logPairPrice",type:"int256"},{internalType:"int256",name:"accLogPairPrice",type:"int256"},{internalType:"int256",name:"logBptPrice",type:"int256"},{internalType:"int256",name:"accLogBptPrice",type:"int256"},{internalType:"int256",name:"logInvariant",type:"int256"},{internalType:"int256",name:"accLogInvariant",type:"int256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFeePercentage",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"enum IPriceOracle.Variable",name:"variable",type:"uint8"},{internalType:"uint256",name:"secs",type:"uint256"},{internalType:"uint256",name:"ago",type:"uint256"}],internalType:"struct IPriceOracle.OracleAverageQuery[]",name:"queries",type:"tuple[]"}],name:"getTimeWeightedAverage",outputs:[{internalType:"uint256[]",name:"results",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenRates",outputs:[{internalType:"uint256",name:"rate0",type:"uint256"},{internalType:"uint256",name:"rate1",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalSamples",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"gyroConfig",outputs:[{internalType:"contract IGyroConfig",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onExitPool",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"onJoinPool",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"},{internalType:"uint256[]",name:"dueProtocolFeeAmounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"enum IVault.SwapKind",name:"kind",type:"uint8"},{internalType:"contract IERC20",name:"tokenIn",type:"address"},{internalType:"contract IERC20",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"userData",type:"bytes"}],internalType:"struct IPoolSwapStructs.SwapRequest",name:"request",type:"tuple"},{internalType:"uint256",name:"balanceTokenIn",type:"uint256"},{internalType:"uint256",name:"balanceTokenOut",type:"uint256"}],name:"onSwap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pause",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"pauseManager",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryExit",outputs:[{internalType:"uint256",name:"bptIn",type:"uint256"},{internalType:"uint256[]",name:"amountsOut",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"poolId",type:"bytes32"},{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256[]",name:"balances",type:"uint256[]"},{internalType:"uint256",name:"lastChangeBlock",type:"uint256"},{internalType:"uint256",name:"protocolSwapFeePercentage",type:"uint256"},{internalType:"bytes",name:"userData",type:"bytes"}],name:"queryJoin",outputs:[{internalType:"uint256",name:"bptOut",type:"uint256"},{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"rateProvider0",outputs:[{internalType:"contract IRateProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"rateProvider1",outputs:[{internalType:"contract IRateProvider",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_capManager",type:"address"}],name:"setCapManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bool",name:"capEnabled",type:"bool"},{internalType:"uint120",name:"perAddressCap",type:"uint120"},{internalType:"uint128",name:"globalCap",type:"uint128"}],internalType:"struct ICappedLiquidity.CapParams",name:"params",type:"tuple"}],name:"setCapParams",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"paused",type:"bool"}],name:"setPaused",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"swapFeePercentage",type:"uint256"}],name:"setSwapFeePercentage",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unpause",outputs:[],stateMutability:"nonpayable",type:"function"}];class ga{static createInterface(){return new l.utils.Interface(Ia)}static connect(e,t){return new l.Contract(e,Ia,t)}}ga.abi=Ia;const _a=[{name:"Deposit",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1},{name:"locktime",type:"uint256",indexed:!0},{name:"type",type:"int128",indexed:!1},{name:"ts",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Withdraw",inputs:[{name:"provider",type:"address",indexed:!0},{name:"value",type:"uint256",indexed:!1},{name:"ts",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{name:"Supply",inputs:[{name:"prevSupply",type:"uint256",indexed:!1},{name:"supply",type:"uint256",indexed:!1}],anonymous:!1,type:"event"},{stateMutability:"nonpayable",type:"constructor",inputs:[{name:"token_addr",type:"address"},{name:"_name",type:"string"},{name:"_symbol",type:"string"},{name:"_authorizer_adaptor",type:"address"}],outputs:[]},{stateMutability:"view",type:"function",name:"token",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"name",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"symbol",inputs:[],outputs:[{name:"",type:"string"}]},{stateMutability:"view",type:"function",name:"decimals",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"admin",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"nonpayable",type:"function",name:"commit_smart_wallet_checker",inputs:[{name:"addr",type:"address"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"apply_smart_wallet_checker",inputs:[],outputs:[]},{stateMutability:"view",type:"function",name:"get_last_user_slope",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"user_point_history__ts",inputs:[{name:"_addr",type:"address"},{name:"_idx",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"locked__end",inputs:[{name:"_addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"nonpayable",type:"function",name:"checkpoint",inputs:[],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"deposit_for",inputs:[{name:"_addr",type:"address"},{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"create_lock",inputs:[{name:"_value",type:"uint256"},{name:"_unlock_time",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"increase_amount",inputs:[{name:"_value",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"increase_unlock_time",inputs:[{name:"_unlock_time",type:"uint256"}],outputs:[]},{stateMutability:"nonpayable",type:"function",name:"withdraw",inputs:[],outputs:[]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"addr",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"balanceOf",inputs:[{name:"addr",type:"address"},{name:"_t",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"balanceOfAt",inputs:[{name:"addr",type:"address"},{name:"_block",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupply",inputs:[{name:"t",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"totalSupplyAt",inputs:[{name:"_block",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"supply",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"locked",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"tuple",components:[{name:"amount",type:"int128"},{name:"end",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"epoch",inputs:[],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"point_history",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"tuple",components:[{name:"bias",type:"int128"},{name:"slope",type:"int128"},{name:"ts",type:"uint256"},{name:"blk",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"user_point_history",inputs:[{name:"arg0",type:"address"},{name:"arg1",type:"uint256"}],outputs:[{name:"",type:"tuple",components:[{name:"bias",type:"int128"},{name:"slope",type:"int128"},{name:"ts",type:"uint256"},{name:"blk",type:"uint256"}]}]},{stateMutability:"view",type:"function",name:"user_point_epoch",inputs:[{name:"arg0",type:"address"}],outputs:[{name:"",type:"uint256"}]},{stateMutability:"view",type:"function",name:"slope_changes",inputs:[{name:"arg0",type:"uint256"}],outputs:[{name:"",type:"int128"}]},{stateMutability:"view",type:"function",name:"future_smart_wallet_checker",inputs:[],outputs:[{name:"",type:"address"}]},{stateMutability:"view",type:"function",name:"smart_wallet_checker",inputs:[],outputs:[{name:"",type:"address"}]}];class Pa{static createInterface(){return new l.utils.Interface(_a)}static connect(e,t){return new l.Contract(e,_a,t)}}Pa.abi=_a;const wa=[{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"contract IERC20",name:"votingEscrow",type:"address"},{internalType:"contract IVeDelegation",name:"delegation",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newImplementation",type:"address"}],name:"DelegationImplementationUpdated",type:"event"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"adjustedBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"adjusted_balance_of",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"getActionId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getAuthorizer",outputs:[{internalType:"contract IAuthorizer",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDelegationImplementation",outputs:[{internalType:"contract IVeDelegation",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVotingEscrow",outputs:[{internalType:"contract IERC20",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"killDelegation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IVeDelegation",name:"delegation",type:"address"}],name:"setDelegation",outputs:[],stateMutability:"nonpayable",type:"function"}];class xa{static createInterface(){return new l.utils.Interface(wa)}static connect(e,t){return new l.Contract(e,wa,t)}}xa.abi=wa;var Ea,Aa=Object.freeze({__proto__:null,AaveLinearPool__factory:st,AaveLinearPoolFactory__factory:lt,AaveWrapping__factory:pt,Authoriser__factory:ct,BalancerHelpers__factory:bt,BalancerMinter__factory:ft,BalancerPoolDataQueries__factory:ht,BalancerRelayer__factory:gt,BatchRelayerLibrary__factory:Pt,ComposableStablePool__factory:xt,ComposableStablePoolFactory__factory:At,ConvergentCurvePool__factory:vt,ERC20__factory:Bt,ERC4626LinearPool__factory:Ot,ERC4626LinearPoolFactory__factory:Ft,EulerLinearPool__factory:Nt,EulerLinearPoolFactory__factory:Dt,FXPool__factory:Vt,GaugeClaimHelper__factory:Gt,GearboxLinearPool__factory:Ht,GearboxLinearPoolFactory__factory:$t,GyroConfig__factory:jt,LidoRelayer__factory:Yt,LinearPool__factory:Zt,LiquidityGaugeV5__factory:ea,Multicall__factory:aa,Multicall3__factory:oa,StablePool__factory:sa,StaticATokenRateProvider__factory:la,Vault__factory:pa,WeightedPool__factory:ca,WeightedPoolFactory__factory:ba,YearnLinearPool__factory:fa,YearnLinearPoolFactory__factory:ha,GyroEV2__factory:ga,VeBal__factory:Pa,VeDelegationProxy__factory:xa});function Sa(t,o,i,s,r,l){const d=new Array(r.length).fill(a.Zero);return r.forEach(((r,p)=>{if(t.some((e=>je(r,e)))){const t=n.BigNumber.from(l).add(a.WeiPerEther);d[p]=i===e.SwapType.SwapExactOut?d[p].add(n.BigNumber.from(s[p]).mul(t).div(a.WeiPerEther)):d[p].add(s[p])}if(o.some((e=>je(r,e)))){const t=a.WeiPerEther.sub(n.BigNumber.from(l));d[p]=i===e.SwapType.SwapExactIn?d[p].add(n.BigNumber.from(s[p]).mul(t).div(a.WeiPerEther)):d[p].add(s[p])}})),d}e.SwapType=void 0,(Ea=e.SwapType||(e.SwapType={}))[Ea.SwapExactIn=0]="SwapExactIn",Ea[Ea.SwapExactOut=1]="SwapExactOut";var va={1:{contracts:{aaveLinearPoolFactory:"0x0b576c1245f479506e7c8bbc4db4db07c1cd31f9",arbitrumRootGauge:"0x6337949cbc4825bbd09242c811770f6f6fee9ffc",arbitrumRootGaugeFactory:"0x1c99324edc771c82a0dccb780cc7dda0045e50e7",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x8f42adbba1b16eaae3bb5754915e0d06059add75",authorizerAdaptorEntrypoint:"0xf5decdb1f3d1ee384908fbe16d2f0348ae43a9ea",authorizerWithAdaptorValidation:"0x6048a8c631fb7e77eca533cf9c29784e482391e7",avalancheRootGauge:"0xc57b4be50bf6bbe5f6a4fe379da342b32b37bf2f",avalancheRootGaugeFactory:"0x10f3e79911a490aa5b5d5cda6f111029c4eab5ac",bal:"0xba100000625a3754423978a60c9317c58a424e3d",balancerHelpers:"0x5addcca35b7a0d07c74063c48700c8590e87864e",balancerMinter:"0x239e55f427d44c3cc793f49bfb507ebe76638a2b",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0xfea793aa415061c483d2390414275ad314b3f621",balancerTokenAdmin:"0xf302f9f50958c5593770fdf4d4812309ff77414f",balTokenHolderFactory:"0xb848f50141f3d4255b37ac288c25c109104f2158",batchRelayerLibrary:"0xf77018c0d817da22cadbdf504c00c0d32ce1e5c2",circuitBreakerLib:"0x4967b3353cdf9e5c67421a3890d35f2f3bb50527",composableStablePoolFactory:"0xfada0f4547ab2de89d1304a668c39b3e09aa7c76",distributionScheduler:"0xbd35248f8325dd1cb2bbf9d01e80a6bb99a792dd",doubleEntrypointFixRelayer:"0xca96c4f198d343e251b1a01f3eba061ef3da73c1",erc4626LinearPoolFactory:"0x813ee7a840ce909e7fea2117a44a90b8063bd4fd",eulerLinearPoolFactory:"0x5f43fba61f63fa6bff101a0a0458cea917f6b347",externalWeightedMath:"0x3db89f0ca3b388f2bcdbccd2ff8e13c22459cf75",feeDistributor:"0xd3cf852898b21fc233251427c2dc93d3d604f3bb",gaugeAdder:"0x5dbad78818d4c8958eff2d5b95b28385a22113cd",gaugeController:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",gaugeWorkingBalanceHelper:"0xdab2583911e872a00a851fb80dcc78a4b46ba57c",gearboxLinearPoolFactory:"0x39a79eb449fc05c92c39aa6f0e9bfac03be8de5b",gnosisRootGauge:"0x05277ce7d1e365d660624612d8b8b9b55bfd4518",gnosisRootGaugeFactory:"0x2a18b396829bc29f66a1e59fadd7a0269a6605e8",l2GaugeCheckpointer:"0x343688c5cb92115a52ca485af7f62b4b7a2e9ccc",liquidityGaugeFactory:"0xf1665e19bc105be4edd3739f88315cc699cc5b65",liquidityGaugeV5:"0xe5f96070ca00cd54795416b1a4b4c2403231c548",managedPoolAddRemoveTokenLib:"0x4148bf5b0688ed0a87f317c6534cb841f503349e",managedPoolAmmLib:"0xb37646acbb1a91287721b2cdbe01ba0dba5e57a2",managedPoolFactory:"0xbf904f9f340745b4f0c4702c7b6ab1e808ea6b93",merkleOrchard:"0xe3881627b8deebccf9c23b291430a549fc0be5f7",mockAaveLendingPool:"0x28fa1e40011adf98898e8243b2a48bb21ebf0c29",mockAaveLinearPool:"0x4ce277df0feb5b4d07a0ca2adcf5326e4005239d",mockComposableStablePool:"0x5537f945d8c3fcfdc1b8deceebd220fad26afda8",mockErc4626LinearPool:"0x9516a2d25958edb8da246a320f2c7d94a0dbe25d",mockErc4626Token:"0xb99edc4b289b0f2284fcf3f66884191bdce29624",mockEulerLinearPool:"0xdec02e6642e2c999af429f5ce944653cad15e093",mockEulerToken:"0xc101dca301a4011c1f925e9622e749e550a1b667",mockGearboxDieselToken:"0xb7a32b67aadb3866cc5c2fabc6c6ab8a9027c3c1",mockGearboxLinearPool:"0x0d05aac44ac7dd3c7ba5d50be93eb884a057d234",mockGearboxVault:"0xc7b779ab638b7a59f490ac95199502343a81e006",mockManagedPool:"0xd0cbf6765997b7ca7be6440f5e305b2ec7b96065",mockShareToken:"0x192e67544694a7baa2dea94f9b1df58bb3395a12",mockSilo:"0x66c94ae8d795e98f69ca65ffac87b38b17be3ca2",mockSiloLinearPool:"0x74cbfaf94a3577c539a9dcee9870a6349a33b34f",mockSiloRepository:"0x8e2dfc5e111dbe14e9d725210b9342688dd51c6c",mockStaticAToken:"0x1f3c910c416ed2340150281c5eb93325c38817a1",mockWeightedPool:"0x8055b8c947de30130bc1ec750c8f345a50006b23",mockYearnLinearPool:"0xac5b4ef7ede2f2843a704e96dcaa637f4ba3dc3f",mockYearnTokenVault:"0x806e02dea8d4a0882cad9fa3fa75b212328692de",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",omniVotingEscrowAdaptor:"0x96484f2abf5e58b15176dbf1a799627b53f13b6d",optimismRootGauge:"0xbc230b1a66a138cd9cfc7b352390025978dfadde",optimismRootGaugeFactory:"0x866d4b65694c66fbfd15dd6fa933d0a6b3940a36",polygonRootGauge:"0xfeb1a24c2752e53576133cdb718f25bc64ebdd52",polygonRootGaugeFactory:"0xa98bce70c92ad2ef3288dbcd659bc0d6b62f8f13",polygonZkEvmRootGauge:"0x45bf48d996d22afc9bc150df7fb4d13a49088602",polygonZkEvmRootGaugeFactory:"0x9bf951848288ccd87d06fac426150262cd3447de",poolRecoveryHelper:"0x1b300c86980a5195bcf49bd419a068d98dc133db",preseededVotingEscrowDelegation:"0xb496ff44746a8693a060fafd984da41b253f6790",protocolFeePercentagesProvider:"0x97207b095e4d5c9a6e4cfbfcd2c3358e03b90c4a",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x5ef4c5352882b10893b70dbcaa0c000965bd23c5",protocolIdRegistry:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",recoveryModeHelper:"0x7827108af2fd9910ea7cf361d9b827941fa7d809",siloLinearPoolFactory:"0x4e11aeec21baf1660b1a46472963cb3da7811c89",singleRecipientGauge:"0xb2007b8b7e0260042517f635cfd8e6dd2dd7f007",singleRecipientGaugeFactory:"0x4fb47126fa83a8734991e41b942ac29a3266c968",smartWalletChecker:"0x7869296efd0a76872fee62a058c8fbca5c1c826c",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x67f8df125b796b05895a6dc8ecf944b9556ecb0b",votingEscrow:"0xc128a9954e6c874ea3d62ce62b468ba073093f25",votingEscrowDelegation:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",votingEscrowDelegationProxy:"0x6f5a2ee11e7a772aeb5114a20d0d7c0ff61eb8a0",votingEscrowRemapper:"0x83e443ef4f9963c77bd860f94500075556668cb8",weightedPoolFactory:"0x897888115ada5773e02aa29f775430bfb5f34c51",weth:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",wstEthRateProvider:"0x72d07d7dca67b8a406ad1ec34ce969c90bfee768",yearnLinearPoolFactory:"0x5f5222ffa40f2aed6380d022184d6ea67c776ee0"},tokens:{AAVE:"0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",aFEI:"0x683923db55fead99a79fa01a27eec3cb19679cc3",aFRAX:"0xd4937682df3c8aef4fe912a96a74121c0829e664",ALCX:"0xdbdb4d16eda451d0503b854cf79d55697f90c8df",alUSD:"0xbc6da0fe9ad5f3b0d58160288917aa56653660e9",ANGLE:"0x31429d1856ad1377a8a0079410b297e1a9e214c2",AURA:"0xc0c293ce456ff0ed870add98a0828dd4d2903dbf",AURABAL:"0x616e8bfa43f920657b3497dbf40d6b1a02d4608d",aUSDC:"0xbcca60bb61934080951369a648fb03df4f96263c",aUSDT:"0x3ed3b47dd13ec9a98b44e6204a523e766b225811",aWBTC:"0x9ff58f4ffb29fa2266ab25e75e2a8b3503311656",BADGER:"0x3472a5a71965499acd81997a54bba8d852c6e53d",BAL:"0xba100000625a3754423978a60c9317c58a424e3d",BalWeth8020:"0x5c6ee304399dbdb9c8ef030ab642b10820db8f56",bb_a_usd:"0xa13a9247ea42d743238089903570127dda72fe44",cDAI:"0x5d3a536e4d6dbd6114cc1ead35777bab948e3643",cETH:"0x4ddc2d193948926d02f9b1fe9e1daa0718270ed5",COMP:"0xc00e94cb662c3520282e6f5717214004a7f26888",CRV:"0xd533a949740bb3306d119cc777fa900ba034cd52",cUSDC:"0x39aa39c021dfbae8fac545936693ac917d5e7563",CVX:"0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b",cvxCRV:"0x62b9c7356a2dc64a1969e19c23e4f579f9810aa7",DAI:"0x6b175474e89094c44da98b954eedeac495271d0f",DIGG:"0x798d1be841a82a273720ce31c822c61a67a601c3",DUSD:"0x5bc25f649fc4e26069ddf4cf4010f9f706c23831",ENS:"0xc18360217d8f7ab5e7c516566761ea12ce7f9d72",EURS:"0xdb25f211ab05b1c97d595516f45794528a807ad8",FARM:"0xa0246c9032bc3a600820415ae600c6388619a14d",FEI:"0x956f47f50a910163d8bf957cf5846d573e7f87ca",FRAX:"0x853d955acef822db058eb8505911ed77f175b99e",FTM:"0x4e15361fd6b4bb609fa63c81a2be19d873717870",FXS:"0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0",GEAR:"0xba3335588d9403515223f109edc4eb7269a9ab5d",GTC:"0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",LINK:"0x514910771af9ca656af840dff83e8264ecf986ca",MIM:"0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3",renBTC:"0xeb4c2781e4eba804ce9a9803c67d0893436bb27d",RETH:"0xae78736cd615f374d3085123a210448e74fc6393",sBTC:"0xfe18be6b3bd88a2d2a7f928d00292e7a9963cfc6",SPELL:"0x090185f2135308bad17527004364ebcc2d37e5f6",stkAAVE:"0x4da27a545c0c5b758a6ba100e3a049001de870f5",SUSHI:"0x6b3595068778dd592e39a122f4f5a5cf09c90fe2",USDC:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",USDT:"0xdac17f958d2ee523a2206206994597c13d831ec7",WBTC:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",WETH:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",xSUSHI:"0x8798249c2e607446efb7ad49ec89dd1865ff4272"}},4:{contracts:{authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",balancerHelpers:"0x5addcca35b7a0d07c74063c48700c8590e87864e",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x41b953164995c11c81da73d212ed8af25741b7ac",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8"},tokens:{}},5:{contracts:{authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x5d90225de345ee24d1d2b6f45de90b056f5265a1",authorizerAdaptorEntrypoint:"0xacaac3e6d6df918bf3c809dfc7d42de0e4a72d4c",authorizerWithAdaptorValidation:"0x8ea89804145c007e7d226001a96955ad53836087",bal:"0xfa8449189744799ad2ace7e0ebac8bb7575eff47",balancerHelpers:"0x5addcca35b7a0d07c74063c48700c8590e87864e",balancerMinter:"0xdf0399539a72e2689b8b2dd53c3c2a0883879fdd",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0x03f1ab8b19bce21eb06c364aec9e40322572a1e9",balancerTokenAdmin:"0x0f32d7d830e20809bcb9071581a696135dd472b7",balTokenHolderFactory:"0x45e617b07021b97407367624648d1a0a358a751a",batchRelayerLibrary:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",childChainGauge:"0x6b5da774890db7b7b96c6f44e6a4b0f657399e2e",childChainGaugeFactory:"0x7ba29fe8e83dd6097a7298075c4affdbda3121cc",childChainGaugeRewardHelper:"0xc128a9954e6c874ea3d62ce62b468ba073093f25",childChainGaugeTokenAdder:"0x55b18f514d7f0c6c886d0c23ac72df5d3b5f8850",childChainLiquidityGaugeFactory:"0x393b918cc2ffa238732e83dd4ee52343f57d767b",childChainStreamer:"0x5b5b72d76b68f4bb1d2a10ef0fc77711f8ec7ed0",circuitBreakerLib:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",composableStablePoolFactory:"0x1802953277fd955f9a254b80aa0582f193cf1d77",distributionScheduler:"0x05a0bf0540f346b6dac25550738343beb51c0f65",doubleEntrypointFixRelayer:"0xbe9458ab5b6f289e524410141c8d5e20a6b035fe",eulerLinearPoolFactory:"0x813ee7a840ce909e7fea2117a44a90b8063bd4fd",externalWeightedMath:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",feeDistributor:"0x42b67611b208e2e9b4cc975f6d74c87b865ae066",gaugeAdder:"0x3f170631ed9821ca51a59d996ab095162438dc10",gaugeController:"0xbb1ce49b16d55a1f2c6e88102f32144c7334b116",gaugeWorkingBalanceHelper:"0xa7d524046ef89de9f8e4f2d7b029f66ccb738d48",l2BalancerPseudoMinter:"0x81cfae226343b24ba12ec6521db2c79e7aeeb310",l2LayerZeroBridgeForwarder:"0xef44d6786b2b4d544b7850fe67ce6381626bf2d6",liquidityGaugeFactory:"0x3b8ca519122cdd8efb272b0d3085453404b25bd0",liquidityGaugeV5:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",managedPoolAddRemoveTokenLib:"0xacf05be5134d64d150d153818f8c67ee36996650",managedPoolAmmLib:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",managedPoolFactory:"0x03f3fb107e74f2eac9358862e91ad3c692712054",merkleOrchard:"0x5cf4928a3205728bd12830e1840f7db85c62a4b9",mockComposableStablePool:"0x5d343d374a769d1ab102e0418a516dadb08a86e4",mockEulerLinearPool:"0x43fa2c00419f60e18966aa043debd4701cb91b6d",mockEulerToken:"0xb99edc4b289b0f2284fcf3f66884191bdce29624",mockManagedPool:"0xff79b51ec2934dd1810a8e0325e3b08708720b26",mockShareToken:"0xb8bdcbf8ccf443d055d5ffe1d8154fac8187fc94",mockSilo:"0xa7a7e22398622bf71ff31dae5355ec7843b13806",mockSiloLinearPool:"0xbbb66a4fff47701ec6c528db615f5e7bf1abdaaf",mockSiloRepository:"0x7153de1a6d71360f07017838c28deca0d6c03e2a",mockWeightedPool:"0x072ed560cc042d7ab1c080a9e4fa8c6f4858deb3",noProtocolFeeLiquidityBootstrappingPoolFactory:"0xb0c726778c3ae4b3454d85557a48e8fa502bdd6a",nullVotingEscrow:"0xa523f47a933d5020b23629ddf689695aa94612dc",omniVotingEscrowAdaptor:"0x83e443ef4f9963c77bd860f94500075556668cb8",poolRecoveryHelper:"0x1cbbe6cea5e4fe7d69c586b4e362a646deef105d",preseededVotingEscrowDelegation:"0x7af980bdbc36d21ce228efabcca35707566a2be5",protocolFeePercentagesProvider:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x85153b639a35d6e6cf8b291aca237fbe67377154",protocolIdRegistry:"0x4fb47126fa83a8734991e41b942ac29a3266c968",recoveryModeHelper:"0x300ab2038eac391f26d9f895dc61f8f66a548833",rewardsOnlyGauge:"0x40bd3faef4268ea40f4c372d7f0a44c3efaaa6b1",siloLinearPoolFactory:"0x30fd8a0f7009f50616afdab4af91a0a2ef4eae49",singleRecipientGauge:"0x0e9addc34f93bccb45d1f744b9f9301285c5b48f",singleRecipientGaugeFactory:"0xe3881627b8deebccf9c23b291430a549fc0be5f7",smartWalletChecker:"0x1b6df1ff5db99f8a8a04d38f7478bab056fa35a7",testBalancerToken:"0xfa8449189744799ad2ace7e0ebac8bb7575eff47",timelockAuthorizer:"0x70e26f740bad6a2cdd762e2478496268882c21d4",timelockAuthorizerMigrator:"0x7159c4b96bfcfca232355b55778e85cf9e245192",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0xd13afc362f619b840c8f4aac1d957ce219ef37ca",votingEscrow:"0x33a99dcc4c85c014cf12626959111d5898bbcabf",votingEscrowDelegation:"0xcff73979321788d59a6170ff012730db2087f31c",votingEscrowDelegationProxy:"0x6817149cb753bf529565b4d023d7507ed2ff4bc0",votingEscrowRemapper:"0x5dbad78818d4c8958eff2d5b95b28385a22113cd",weightedPoolFactory:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",weth:"0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1",wstEthRateProvider:"0x80a94f458491ca88f09767e58a92fd23cbf1196f"},tokens:{}},10:{contracts:{aaveLinearPoolFactory:"0x7396f99b48e7436b152427bfa3dd6aa8c7c6d05b",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x8f42adbba1b16eaae3bb5754915e0d06059add75",authorizerAdaptorEntrypoint:"0xed86ff0c507d3af5f35d3523b77c17415fcffacb",authorizerWithAdaptorValidation:"0xacf05be5134d64d150d153818f8c67ee36996650",bal:"0xfe8b128ba8c78aabc59d4c64cee7ff28e9379921",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0x03f1ab8b19bce21eb06c364aec9e40322572a1e9",batchRelayerLibrary:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",childChainGauge:"0x81cfae226343b24ba12ec6521db2c79e7aeeb310",childChainGaugeFactory:"0xa523f47a933d5020b23629ddf689695aa94612dc",childChainGaugeRewardHelper:"0x8ab784368a1883da90d8513b48801e2db1cb2d5d",childChainGaugeTokenAdder:"0x6f5a2ee11e7a772aeb5114a20d0d7c0ff61eb8a0",childChainLiquidityGaugeFactory:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",childChainStreamer:"0x239e55f427d44c3cc793f49bfb507ebe76638a2b",circuitBreakerLib:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",composableStablePoolFactory:"0x1802953277fd955f9a254b80aa0582f193cf1d77",doubleEntrypointFixRelayer:"0x3b8ca519122cdd8efb272b0d3085453404b25bd0",erc4626LinearPoolFactory:"0x7adbdabaa80f654568421887c12f09e0c7bd9629",externalWeightedMath:"0x8df317a729fcaa260306d7de28888932cb579b88",gaugeWorkingBalanceHelper:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",l2BalancerPseudoMinter:"0x4fb47126fa83a8734991e41b942ac29a3266c968",l2LayerZeroBridgeForwarder:"0xbef13d1e54d0c79da8b0ad704883e1cea7eb2100",managedPoolAddRemoveTokenLib:"0x59562f93c447656f6e4799fc1fc7c3d977c3324f",managedPoolAmmLib:"0xded7fef7d8ecdcb74f22f0169e1a9ec696e6695d",managedPoolFactory:"0x4c32a8a8fda4e24139b51b456b42290f51d6a1c4",mockAaveLendingPool:"0x533a16f90e7d3ca31dbc608e5ec54967710f0d2a",mockAaveLinearPool:"0x45d37982784f022a9864748b4e8750e1e7019604",mockComposableStablePool:"0x11a4cf51bb0bb4d925cadfda61fcda952d64889c",mockErc4626LinearPool:"0x2da61ef3cdcb97efb0f7099c02527fabfe94dee5",mockErc4626Token:"0x4be0e4d6184348c5ba845a4010528cfc779610b8",mockManagedPool:"0xb4af4fdd49da2a2ba9522eadcf86d407a69f19c8",mockStaticAToken:"0x8b7854708c0c54f9d7d1ff351d4f84e6de0e134c",mockWeightedPool:"0x62f5f9a446d198e8e4c84ee56e5217416720edaf",mockYearnLinearPool:"0x34557ef500bfc060b8e3f2da58ef725bb7d32202",mockYearnTokenVault:"0xb15608d28eb43378a7e7780add3fe9bc132baf40",noProtocolFeeLiquidityBootstrappingPoolFactory:"0xf302f9f50958c5593770fdf4d4812309ff77414f",nullVotingEscrow:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",poolRecoveryHelper:"0x26743984e3357efc59f2fd6c1afdc310335a61c9",protocolFeePercentagesProvider:"0xacaac3e6d6df918bf3c809dfc7d42de0e4a72d4c",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0xc128a9954e6c874ea3d62ce62b468ba073093f25",protocolIdRegistry:"0x9805dcfd25e6de36bad8fe9d3fe2c9b44b764102",recoveryModeHelper:"0x3b1eb8eb7b43882b385ab30533d9a2bef9052a98",rewardsOnlyGauge:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x6817149cb753bf529565b4d023d7507ed2ff4bc0",votingEscrowDelegationProxy:"0x9da18982a33fd0c7051b19f0d7c76f2d5e7e017c",weightedPoolFactory:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",weth:"0x4200000000000000000000000000000000000006",yearnLinearPoolFactory:"0x19dfef0a828eec0c85fbb335aa65437417390b85"},tokens:{}},42:{contracts:{authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x97207b095e4d5c9a6e4cfbfcd2c3358e03b90c4a",balancerHelpers:"0x94905e703fead7f0fd0eee355d267ee909784e6d",balancerMinter:"0x1bbfa323155526f54eec458571bb5a75e0c41507",balancerTokenAdmin:"0xab093cd16e765b5b23d34030aafaf026558e0a19",balTokenHolderFactory:"0xa98bce70c92ad2ef3288dbcd659bc0d6b62f8f13",childChainLiquidityGaugeFactory:"0xf9ac7b9df2b3454e841110cce5550bd5ac6f875f",childChainStreamer:"0x4de578134995bea8480d7696946217f356339ab8",gaugeController:"0x35c425234dc42e7402f54cc54573f77842963a56",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x1b57f637ce3408f1f834b0b70f9a595b062daea7",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",rewardsOnlyGauge:"0x868543bb787317632f94fcfe8eb85406b123590c",testBalancerToken:"0xa2d801064652a269d92ee2a59f3261155ec66830",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",votingEscrow:"0x16ba924752ef283c7946db8a122a6742aa35c1dc",votingEscrowDelegation:"0xdc6d62ae091ea77331542042a72e5e38b188837c",votingEscrowDelegationProxy:"0x98d0d0a65cbeccaa647a5a95cf27cf2f00e1231c",wstEthRateProvider:"0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f8"},tokens:{}},100:{contracts:{aaveLinearPoolFactory:"0x62aab12865d7281048c337d53a4dde9d770321e6",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x5addcca35b7a0d07c74063c48700c8590e87864e",authorizerAdaptorEntrypoint:"0x8f42adbba1b16eaae3bb5754915e0d06059add75",authorizerWithAdaptorValidation:"0x03f3fb107e74f2eac9358862e91ad3c692712054",bal:"0x7ef541e2a22058048904fe5744f9c7e4c57af717",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",balancerRelayer:"0x3536fd480ca495ac91e698a703248a8915c137a3",batchRelayerLibrary:"0xb9ad3466cdd42015cc05d4804dc68d562b6a2065",childChainGauge:"0x96484f2abf5e58b15176dbf1a799627b53f13b6d",childChainGaugeFactory:"0x83e443ef4f9963c77bd860f94500075556668cb8",childChainGaugeRewardHelper:"0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd",childChainGaugeTokenAdder:"0x1802953277fd955f9a254b80aa0582f193cf1d77",childChainLiquidityGaugeFactory:"0x809b79b53f18e9bc08a961ed4678b901ac93213a",childChainStreamer:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",circuitBreakerLib:"0x54f8f9d28e26fa5864cfa80f50a5df95fd85f46a",composableStablePoolFactory:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",externalWeightedMath:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",gaugeWorkingBalanceHelper:"0x682f0ddbfd41d1272982f64a499fb62d80e27589",l2BalancerPseudoMinter:"0xa8920455934da4d853faac1f94fe7bef72943ef1",l2LayerZeroBridgeForwarder:"0xeb151668006cd04dadd098afd0a82e78f77076c3",managedPoolAddRemoveTokenLib:"0x4c32a8a8fda4e24139b51b456b42290f51d6a1c4",managedPoolAmmLib:"0xacf05be5134d64d150d153818f8c67ee36996650",managedPoolFactory:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",mockAaveLendingPool:"0x040dba12bb3d5c0a73ddfe84c220be3ddba06966",mockAaveLinearPool:"0x1ac55c31dac78ca943cb8ebfca5945ce09e036e2",mockComposableStablePool:"0xf3678a0b54c61ccd88ce321c2e07f87ac75f08b9",mockManagedPool:"0xc061361fda32ff5b65f7d98acc9a87349d3f0768",mockStaticAToken:"0x35d8f4a4c0e95f3d925cb4cbbbf513a0172ed8a4",mockWeightedPool:"0xd8752f9b0a2c2813796abd2be212a32ffd656ef1",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x85a80afee867adf27b50bdb7b76da70f1e853062",nullVotingEscrow:"0x013d4382f291be5688afbcc741ee8a24c66b2c92",poolRecoveryHelper:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",protocolFeePercentagesProvider:"0x41b953164995c11c81da73d212ed8af25741b7ac",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0xdae7e32adc5d490a43ccba1f0c736033f2b4efca",protocolIdRegistry:"0x6b5da774890db7b7b96c6f44e6a4b0f657399e2e",recoveryModeHelper:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",rewardsOnlyGauge:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x5dbad78818d4c8958eff2d5b95b28385a22113cd",votingEscrowDelegationProxy:"0x7a2535f5fb47b8e44c02ef5d9990588313fe8f05",weightedPoolFactory:"0x6cad2ea22bfa7f4c14aae92e47f510cd5c509bc7",weth:"0xe91d153e0b41518a2ce8dd3d7944fa863463a97d"},tokens:{}},137:{contracts:{aaveLinearPoolFactory:"0xab2372275809e15198a7968c7f324053867cdb0c",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",authorizerAdaptorEntrypoint:"0xab093cd16e765b5b23d34030aafaf026558e0a19",authorizerWithAdaptorValidation:"0x020301b0a99efb6816b41007765fb577259ec418",bal:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",balancerHelpers:"0x239e55f427d44c3cc793f49bfb507ebe76638a2b",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0xd18d5d377eb23362e54fa496597d7e962d56c554",batchRelayerLibrary:"0x4271de2595c3d85d2d455c5778adf2d7ad54322c",childChainGauge:"0xc9b36096f5201ea332db35d6d195774ea0d5988f",childChainGaugeFactory:"0x22625eedd92c81a219a83e1dc48f88d54786b017",childChainGaugeRewardHelper:"0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33",childChainGaugeTokenAdder:"0x1554ee754707d5c93b7934af404747aba521aaf2",childChainLiquidityGaugeFactory:"0x3b8ca519122cdd8efb272b0d3085453404b25bd0",childChainStreamer:"0x6f5a2ee11e7a772aeb5114a20d0d7c0ff61eb8a0",circuitBreakerLib:"0xedfd0a7005a7c72c44ff13bea370c86a9d11bee1",composableStablePoolFactory:"0x6ab5549bbd766a43afb687776ad8466f8b42f777",doubleEntrypointFixRelayer:"0x79d0011892fe558fc5a4ec7d4ca5db59069f460f",erc4626LinearPoolFactory:"0x5c5fcf8fbd4cd563ced27e7d066b88ee20e1867a",externalWeightedMath:"0x72ebafddc4c7d3eb702c81295d90a8b29f008a03",gaugeWorkingBalanceHelper:"0x08fd003d8f1892d4ec684e6c3ee0128081be461b",l2BalancerPseudoMinter:"0x47b489bf5836f83abd928c316f8e39bc0587b020",l2LayerZeroBridgeForwarder:"0xb98f54a74590a6e681ff664b2fa22ebffe1a929e",managedPoolAddRemoveTokenLib:"0xf553bf40db86c35f3058434039d51aad29c6180b",managedPoolAmmLib:"0xcefd59eedafa9ee8ccda1aaf944088e68b5bd890",managedPoolFactory:"0xb8dfa4fd0f083de2b7edc0d5eed5e684e54ba45d",merkleOrchard:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",mockAaveLendingPool:"0x0df6bb26533eb86f371b1f70eecdd955420523c6",mockAaveLinearPool:"0x0889b240a5876aae745ac19f1771853671dc5d36",mockComposableStablePool:"0x0f25823cf786b78696b16536e2f2b9835289ab51",mockErc4626LinearPool:"0xc55ec796a4debe625d95436a3531f4950b11bdcf",mockErc4626Token:"0x19dfef0a828eec0c85fbb335aa65437417390b85",mockManagedPool:"0x074efd7806e6c28e8b6611075b1aa62c6c408090",mockStaticAToken:"0xe72b2780d3c57f781bd4e8572e200cd7e9a447c2",mockWeightedPool:"0xb77e03655ee894aade216a83d05511a9f9895126",mockYearnLinearPool:"0xdae301690004946424e41051ace1791083be42a1",mockYearnTokenVault:"0x28fa1e40011adf98898e8243b2a48bb21ebf0c29",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x41b953164995c11c81da73d212ed8af25741b7ac",nullVotingEscrow:"0x1311fbc9f60359639174c1e7cc2032dbdb5cc4d1",poolRecoveryHelper:"0x495f696430f4a51f7fcb98fbe68a9cb7a07fb1ba",protocolFeePercentagesProvider:"0x42ac0e6fa47385d55aff070d79ef0079868c48a6",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0xef44d6786b2b4d544b7850fe67ce6381626bf2d6",protocolIdRegistry:"0xa523f47a933d5020b23629ddf689695aa94612dc",recoveryModeHelper:"0x1eb79551ca0e83ec145608bc39a0c7f10ca21aa5",rewardsOnlyGauge:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0xd961e30156c2e0d0d925a0de45f931cb7815e970",votingEscrowDelegationProxy:"0x0f08eef2c785aa5e7539684af04755dec1347b7c",weightedPoolFactory:"0xfc8a407bba312ac761d8bfe04ce1201904842b76",weth:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",yearnLinearPoolFactory:"0x0b576c1245f479506e7c8bbc4db4db07c1cd31f9"},tokens:{BAL:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",USDC:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",WBTC:"0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",WETH:"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",WMATIC:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"}},1101:{contracts:{aaveLinearPoolFactory:"0x4b7b369989e613ff2c65768b7cf930cc927f901e",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0xdcdbf71a870cc60c6f9b621e28a7d3ffd6dd4965",authorizerAdaptorEntrypoint:"0xb9ad3466cdd42015cc05d4804dc68d562b6a2065",authorizerWithAdaptorValidation:"0x8df317a729fcaa260306d7de28888932cb579b88",bal:"0x120ef59b80774f02211563834d8e3b72cb1649d6",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0x809b79b53f18e9bc08a961ed4678b901ac93213a",balancerRelayer:"0x4678731dc41142a902a114ac5b2f77b63f4a259d",batchRelayerLibrary:"0x54f8f9d28e26fa5864cfa80f50a5df95fd85f46a",childChainGauge:"0x59562f93c447656f6e4799fc1fc7c3d977c3324f",childChainGaugeFactory:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",circuitBreakerLib:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",composableStablePoolFactory:"0x8ea89804145c007e7d226001a96955ad53836087",erc4626LinearPoolFactory:"0x6b1da720be2d11d95177ccfc40a917c2688f396c",externalWeightedMath:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",gaugeWorkingBalanceHelper:"0xef454a7b3f965d3f6723e462405246f8cd865425",gearboxLinearPoolFactory:"0x687b8c9b41e01be8b591725fac5d5f52d0564d79",l2BalancerPseudoMinter:"0x475d18169be8a89357a9ee3ab00ca386d20fa229",l2LayerZeroBridgeForwarder:"0xded7fef7d8ecdcb74f22f0169e1a9ec696e6695d",managedPoolAddRemoveTokenLib:"0xacf05be5134d64d150d153818f8c67ee36996650",managedPoolAmmLib:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",managedPoolFactory:"0xaf779e58dafb4307b998c7b3c9d3f788dfc80632",mockAaveLendingPool:"0x161f4014c27773840ccb4ec1957113e6dd028846",mockAaveLinearPool:"0xbfd65c6160cfd638a85c645e6e6d8acac5dac935",mockComposableStablePool:"0x6f5f794a3cef904b8517c4c311de2fa837ff24a0",mockErc4626LinearPool:"0xac4b72c01072a52b73ca71105504f1372efcce0d",mockErc4626Token:"0x0c6052254551eae3ecac77b01dfcf1025418828f",mockGearboxDieselToken:"0x698caed853be9cea96c268f565e2b61d3b2bcda4",mockGearboxLinearPool:"0x32f03464fdf909fdf3798f87ff3712b10c59bd86",mockGearboxVault:"0x88ed12a90142fdbfe2a28f7d5b48927254c7e760",mockLiquidityBootstrappingPool:"0x3c87ff3e9307dbebfae720e04c6439e49f79bf9b",mockManagedPool:"0x522ee506a2f63d0ae1d79d6f5dbd9d0bca32c866",mockStaticAToken:"0x4638ab64022927c9bd5947607459d13f57f1551c",mockWeightedPool:"0x78385153d2f356c87001f09bb5424137c618d38b",mockYearnLinearPool:"0x02c9dcb975262719a61f9b40bdf0987ead9add3a",mockYearnTokenVault:"0xdbf7b9f1d2bfba14e42709f84dda3187ee410e38",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x3b1eb8eb7b43882b385ab30533d9a2bef9052a98",nullVotingEscrow:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",poolRecoveryHelper:"0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd",protocolFeePercentagesProvider:"0x1802953277fd955f9a254b80aa0582f193cf1d77",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",protocolIdRegistry:"0x6cad2ea22bfa7f4c14aae92e47f510cd5c509bc7",recoveryModeHelper:"0x300ab2038eac391f26d9f895dc61f8f66a548833",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",votingEscrowDelegationProxy:"0xc7e5ed1054a24ef31d827e6f86caa58b3bc168d7",weightedPoolFactory:"0x03f3fb107e74f2eac9358862e91ad3c692712054",weth:"0x4f9a0e7fd2bf6067db6994cf12e4495df938e6e9",yearnLinearPoolFactory:"0x44d33798dddcdabc93fe6a40c80588033dc502d3"},tokens:{}},8453:{contracts:{aaveLinearPoolFactory:"0x687b8c9b41e01be8b591725fac5d5f52d0564d79",authorizer:"0x809b79b53f18e9bc08a961ed4678b901ac93213a",authorizerAdaptor:"0x6cad2ea22bfa7f4c14aae92e47f510cd5c509bc7",authorizerAdaptorEntrypoint:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",authorizerWithAdaptorValidation:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",bal:"0x4158734d47fc9692176b5085e0f52ee0da5d47f1",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0x300ab2038eac391f26d9f895dc61f8f66a548833",balancerRelayer:"0x76f7204b62f554b79d444588edac9dfa7032c71a",batchRelayerLibrary:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",childChainGauge:"0x59562f93c447656f6e4799fc1fc7c3d977c3324f",childChainGaugeFactory:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",circuitBreakerLib:"0xef454a7b3f965d3f6723e462405246f8cd865425",composableStablePoolFactory:"0x8df317a729fcaa260306d7de28888932cb579b88",erc4626LinearPoolFactory:"0x161f4014c27773840ccb4ec1957113e6dd028846",externalWeightedMath:"0x7920bfa1b2041911b354747ca7a6cdd2dfc50cfd",gaugeWorkingBalanceHelper:"0xa7d524046ef89de9f8e4f2d7b029f66ccb738d48",gearboxLinearPoolFactory:"0x9dd32684176638d977883448a4c914311c07bd62",l2BalancerPseudoMinter:"0xc7e5ed1054a24ef31d827e6f86caa58b3bc168d7",l2LayerZeroBridgeForwarder:"0x8ea89804145c007e7d226001a96955ad53836087",managedPoolAddRemoveTokenLib:"0xb19382073c7a0addbb56ac6af1808fa49e377b75",managedPoolAmmLib:"0x7d2248f194755dca9a1887099394f39476d28c9a",managedPoolFactory:"0x9a62c91626d39d0216b3959112f9d4678e20134d",mockAaveLendingPool:"0x88ed12a90142fdbfe2a28f7d5b48927254c7e760",mockAaveLinearPool:"0x712e23a9b91aa30ee7997d1c7a1a285d4c7912d1",mockComposableStablePool:"0x7f6e9d6a4093af9d09bae92d24bfe42fc5369ae6",mockErc4626LinearPool:"0x1cc2e10c486ffb7228810b9c7c183d0cd92cdf44",mockErc4626Token:"0x4638ab64022927c9bd5947607459d13f57f1551c",mockGearboxDieselToken:"0xb521dd5c8e13fe202626cac98873fea2b7760ce4",mockGearboxLinearPool:"0x3c28a59356b473847aaa5e0b6f561636079213a6",mockGearboxVault:"0x79e435875ccee3cd9e8da23fe34f9a011d05ea6c",mockLiquidityBootstrappingPool:"",mockManagedPool:"0xe50ad96af9370d05d3c1ce85f17c31557b29c4ee",mockStaticAToken:"0x698caed853be9cea96c268f565e2b61d3b2bcda4",mockWeightedPool:"0xd9dbbfaa703f3c33838365ae00fe4eb22cdf8d46",mockYearnLinearPool:"0x369877467fc3b6774de4e11e0c0abbde70eb40fd",mockYearnTokenVault:"0xdbf7b9f1d2bfba14e42709f84dda3187ee410e38",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x0c6052254551eae3ecac77b01dfcf1025418828f",nullVotingEscrow:"0x475d18169be8a89357a9ee3ab00ca386d20fa229",poolRecoveryHelper:"0x03f3fb107e74f2eac9358862e91ad3c692712054",protocolFeePercentagesProvider:"0xded7fef7d8ecdcb74f22f0169e1a9ec696e6695d",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0xacf05be5134d64d150d153818f8c67ee36996650",protocolIdRegistry:"0x682f0ddbfd41d1272982f64a499fb62d80e27589",recoveryModeHelper:"0x313a8d36b1d90a4cba3a505fdc3480c3870be053",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",votingEscrowDelegationProxy:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",weightedPoolFactory:"0x4c32a8a8fda4e24139b51b456b42290f51d6a1c4",weth:"0x4200000000000000000000000000000000000006",yearnLinearPoolFactory:"0x44d33798dddcdabc93fe6a40c80588033dc502d3"},tokens:{}},42161:{contracts:{aaveLinearPoolFactory:"0x7396f99b48e7436b152427bfa3dd6aa8c7c6d05b",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",authorizerAdaptorEntrypoint:"0x97207b095e4d5c9a6e4cfbfcd2c3358e03b90c4a",authorizerWithAdaptorValidation:"0x6b1da720be2d11d95177ccfc40a917c2688f396c",bal:"0x040d1edc9569d4bab2d15287dc5a4f10f56a56b8",balancerHelpers:"0x77d46184d22ca6a3726a2f500c776767b6a3d6ab",balancerQueries:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",balancerRelayer:"0x598ce0f1ab64b27256759ef99d883ee51138b9bd",batchRelayerLibrary:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",childChainGauge:"0xa523f47a933d5020b23629ddf689695aa94612dc",childChainGaugeFactory:"0x6817149cb753bf529565b4d023d7507ed2ff4bc0",childChainGaugeRewardHelper:"0xa0dabebaad1b243bbb243f933013d560819eb66f",childChainGaugeTokenAdder:"0xbfd9769b061e57e478690299011a028194d66e3c",childChainLiquidityGaugeFactory:"0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2",childChainStreamer:"0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f8",circuitBreakerLib:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",composableStablePoolFactory:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",doubleEntrypointFixRelayer:"0x8e5698dc4897dc12243c8642e77b4f21349db97c",erc4626LinearPoolFactory:"0x7adbdabaa80f654568421887c12f09e0c7bd9629",externalWeightedMath:"0x03f3fb107e74f2eac9358862e91ad3c692712054",gaugeWorkingBalanceHelper:"0xea924b45a3fcdaadf4e5cfb1665823b8f8f2039b",l2BalancerPseudoMinter:"0xc3ccace87f6d3a81724075adcb5ddd85a8a1bb68",l2LayerZeroBridgeForwarder:"0x12ca9de662a7bf5dc89e034a5083ef751b08ede7",managedPoolAddRemoveTokenLib:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",managedPoolAmmLib:"0x300ab2038eac391f26d9f895dc61f8f66a548833",managedPoolFactory:"0x8ea89804145c007e7d226001a96955ad53836087",merkleOrchard:"0x9805dcfd25e6de36bad8fe9d3fe2c9b44b764102",mockAaveLendingPool:"0x533a16f90e7d3ca31dbc608e5ec54967710f0d2a",mockAaveLinearPool:"0x19b1c92631405a0a9495ccba0becf4f2e8e908bd",mockComposableStablePool:"0xff7e6b102516e071dcda763ee9d02c1515481db5",mockErc4626LinearPool:"0x3f53a862919ccfa023cb6ace91378a79fb0f6bf5",mockErc4626Token:"0x4be0e4d6184348c5ba845a4010528cfc779610b8",mockManagedPool:"0xf5a71257b331c02da1eae52151c3d600f16b76f0",mockStaticAToken:"0x8b7854708c0c54f9d7d1ff351d4f84e6de0e134c",mockWeightedPool:"0x129c6402ff88611aa59bf2e14b39e091822e2c9c",mockYearnLinearPool:"0x1fa7f727934226aedab636d62a084931b97d366b",mockYearnTokenVault:"0xb15608d28eb43378a7e7780add3fe9bc132baf40",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x1802953277fd955f9a254b80aa0582f193cf1d77",nullVotingEscrow:"0x9da18982a33fd0c7051b19f0d7c76f2d5e7e017c",poolRecoveryHelper:"0xb5e56cc3d2e38e53b1166175c59e921a37cdc1e2",protocolFeePercentagesProvider:"0x5ef4c5352882b10893b70dbcaa0c000965bd23c5",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x70bbd023481788e443472e123ab963e5ebf58d06",protocolIdRegistry:"0x5cf4928a3205728bd12830e1840f7db85c62a4b9",recoveryModeHelper:"0x682f0ddbfd41d1272982f64a499fb62d80e27589",rewardsOnlyGauge:"0x41b953164995c11c81da73d212ed8af25741b7ac",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x6b5da774890db7b7b96c6f44e6a4b0f657399e2e",votingEscrowDelegationProxy:"0x81cfae226343b24ba12ec6521db2c79e7aeeb310",weightedPoolFactory:"0xc7e5ed1054a24ef31d827e6f86caa58b3bc168d7",weth:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",yearnLinearPoolFactory:"0x19dfef0a828eec0c85fbb335aa65437417390b85"},tokens:{BADGER:"0xbfa641051ba0a0ad1b0acf549a89536a0d76472e",CRV:"0x11cdb42b0eb46d95f990bedd4695a6e3fa034978",LDO:"0x13ad51ed4f1b7e9dc168d8a00cb3f4ddd85efa60",renBTC:"0xdbf31df14b66535af65aac99c32e9ea844e14501",SUSHI:"0xd4d42f0b6def4ce0383636770ef773390d85c61a",USDC:"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",USDT:"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",WBTC:"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f",WETH:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1"}},43114:{contracts:{aaveLinearPoolFactory:"0x6caf662b573f577de01165d2d38d1910bba41f8a",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0xdae7e32adc5d490a43ccba1f0c736033f2b4efca",authorizerAdaptorEntrypoint:"0x4e7bbd911cf1efa442bc1b2e9ea01ffe785412ec",authorizerWithAdaptorValidation:"0x8df317a729fcaa260306d7de28888932cb579b88",bal:"0xe15bcb9e0ea69e6ab9fa080c4c4a5632896298c3",balancerHelpers:"0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9",balancerQueries:"0xc128468b7ce63ea702c1f104d55a2566b13d3abd",balancerRelayer:"0x03f1ab8b19bce21eb06c364aec9e40322572a1e9",batchRelayerLibrary:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",childChainGauge:"0x4b7b369989e613ff2c65768b7cf930cc927f901e",childChainGaugeFactory:"0x161f4014c27773840ccb4ec1957113e6dd028846",childChainGaugeRewardHelper:"0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647",childChainGaugeTokenAdder:"0xf302f9f50958c5593770fdf4d4812309ff77414f",childChainLiquidityGaugeFactory:"0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2",childChainStreamer:"0xd7fad3bd59d6477cbe1be7f646f7f1ba25b230f8",circuitBreakerLib:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",composableStablePoolFactory:"0x3b1eb8eb7b43882b385ab30533d9a2bef9052a98",distributionScheduler:"0xc128a9954e6c874ea3d62ce62b468ba073093f25",erc4626LinearPoolFactory:"0x4507d91cd2c0d51d9b4f30bf0b93afc938a70ba5",externalWeightedMath:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",gaugeWorkingBalanceHelper:"0x687b8c9b41e01be8b591725fac5d5f52d0564d79",l2BalancerPseudoMinter:"0xea924b45a3fcdaadf4e5cfb1665823b8f8f2039b",l2LayerZeroBridgeForwarder:"0x4638ab64022927c9bd5947607459d13f57f1551c",managedPoolAddRemoveTokenLib:"0xacf05be5134d64d150d153818f8c67ee36996650",managedPoolAmmLib:"0xa69e0ccf150a29369d8bbc0b3f510849db7e8eee",managedPoolFactory:"0x03f3fb107e74f2eac9358862e91ad3c692712054",mockAaveLendingPool:"0x57ea28a99394978d060e483477c0fd9fb9afa96c",mockAaveLinearPool:"0xa826a114b0c7db4d1ff4a4be845a78998c64564c",mockComposableStablePool:"0xea4643102dfc03d5e382e7827bf767f6587e9965",mockErc4626LinearPool:"0xed3e2f496cbcd8e212192fb8d1499842f04a0d19",mockErc4626Token:"0x2ebe41e1aa44d61c206a94474932dadc7d3fd9e3",mockManagedPool:"0x3fb81f6fb0dd94c6fc7e138887f1ca4cdb5e2999",mockStaticAToken:"0xd8b6b96c88ad626eb6209c4876e3b14f45f8803a",mockWeightedPool:"0xb2b5b452d53401391155ea48c4451f6e9b0dd058",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e",nullVotingEscrow:"0x6b1da720be2d11d95177ccfc40a917c2688f396c",poolRecoveryHelper:"0x3b8ca519122cdd8efb272b0d3085453404b25bd0",protocolFeePercentagesProvider:"0x239e55f427d44c3cc793f49bfb507ebe76638a2b",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x8f42adbba1b16eaae3bb5754915e0d06059add75",recoveryModeHelper:"0x300ab2038eac391f26d9f895dc61f8f66a548833",rewardsOnlyGauge:"0x41b953164995c11c81da73d212ed8af25741b7ac",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",votingEscrowDelegationProxy:"0x0c6052254551eae3ecac77b01dfcf1025418828f",weightedPoolFactory:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",weth:"0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7"},tokens:{}},11155111:{contracts:{aaveLinearPoolFactory:"0xdf9b5b00ef9bca66e9902bd813db14e4343be025",authorizer:"0xa331d84ec860bf466b4cdccfb4ac09a1b43f3ae6",authorizerAdaptor:"0xdcdbf71a870cc60c6f9b621e28a7d3ffd6dd4965",authorizerAdaptorEntrypoint:"0xb9ad3466cdd42015cc05d4804dc68d562b6a2065",authorizerWithAdaptorValidation:"0xb521dd5c8e13fe202626cac98873fea2b7760ce4",bal:"0xb19382073c7a0addbb56ac6af1808fa49e377b75",balancerHelpers:"0xdae7e32adc5d490a43ccba1f0c736033f2b4efca",balancerMinter:"0x1783cd84b3d01854a96b4ed5843753c2ccbd574a",balancerQueries:"0x1802953277fd955f9a254b80aa0582f193cf1d77",balancerRelayer:"0x6d5342d716c13d9a3f072a2b11498624ade27f90",balancerTokenAdmin:"0x7d2248f194755dca9a1887099394f39476d28c9a",balTokenHolderFactory:"0xef454a7b3f965d3f6723e462405246f8cd865425",batchRelayerLibrary:"0x5f6848976c2914403b425f18b589a65772f082e3",childChainGauge:"0xc49ca921c4cd1117162eaeec0ee969649997950c",childChainGaugeFactory:"0xc370cd86d5488c1788b62f11b09adb0c47f47440",circuitBreakerLib:"0x4c0c450bedb9282a7a54fcb316c285e85a8c0265",composableStablePoolFactory:"0xa3fd20e29358c056b727657e83dfd139abbc9924",erc4626LinearPoolFactory:"0x59562f93c447656f6e4799fc1fc7c3d977c3324f",externalWeightedMath:"0x8246e571d88acd1346179cc3641de87fe3544d7a",feeDistributor:"0xa6971317fb06c76ef731601c64433a4846fca707",gaugeAdder:"0xe42ffa682a26ef8f25891db4882932711d42e467",gaugeController:"0x577e5993b9cc480f07f98b5ebd055604bd9071c4",gaugeWorkingBalanceHelper:"0x2e4abed3362a622c5f712bb183005a476b146bd3",gearboxLinearPoolFactory:"0x8df317a729fcaa260306d7de28888932cb579b88",l2BalancerPseudoMinter:"0xb51f7ffc97cedfb6922e8b9bbf3ef7575fafd630",l2LayerZeroBridgeForwarder:"0xc7e5ed1054a24ef31d827e6f86caa58b3bc168d7",liquidityGaugeFactory:"0x2ff226cd12c80511a641a6101f071d853a4e5363",liquidityGaugeV5:"0x82416ce6ea7dd4923d4a3ed70a79b4a432a382c4",managedPoolAddRemoveTokenLib:"0xc7416e4f3715467ddcf28dc409a9483b2e4d4f43",managedPoolAmmLib:"0xa30ade89e6af5b0ca515cd78e44f9ad0c63989b2",managedPoolFactory:"0x63e179c5b6d54b2c2e36b9ce4085ef5a8c86d50c",mockAaveLendingPool:"0x300ab2038eac391f26d9f895dc61f8f66a548833",mockAaveLinearPool:"0xe4efd99f3c03778ba913eb578c599329634e2bd7",mockComposableStablePool:"0xa8d865fe1d68a405b29f884358468c9b52d4841d",mockErc4626LinearPool:"0x0c2ead6f2dc2a9385187023f4cec5925337b330f",mockErc4626Token:"0x2498a2b0d6462d2260eac50ae1c3e03f4829ba95",mockGearboxDieselToken:"0x4c32a8a8fda4e24139b51b456b42290f51d6a1c4",mockGearboxLinearPool:"0x112a7b7ca66e6963c49bc523a415f7d8cdb806b9",mockGearboxVault:"0x3b1eb8eb7b43882b385ab30533d9a2bef9052a98",mockLiquidityBootstrappingPool:"0xe90472ffc41d7ddf8e3b456bba748e3f22c59c6f",mockManagedPool:"0xe458224ca8d6605c87b73e92aa5cb7a4e77770f3",mockShareToken:"0x0c6052254551eae3ecac77b01dfcf1025418828f",mockSilo:"0x6b1da720be2d11d95177ccfc40a917c2688f396c",mockSiloLinearPool:"0xa149cf2d795aab83a15673f5beade9361e4e3f65",mockSiloRepository:"0xa7d524046ef89de9f8e4f2d7b029f66ccb738d48",mockStaticAToken:"0x03f3fb107e74f2eac9358862e91ad3c692712054",mockWeightedPool:"0xf7a7e1f48fa43cb7919ff4eb362c5be78092df4a",mockYearnLinearPool:"0x016b7366f76aa2794097798b90cf239796aeff8d",mockYearnTokenVault:"0x9129e834e15ea19b6069e8f08a8ecfc13686b8dc",noProtocolFeeLiquidityBootstrappingPoolFactory:"0x45ffd460cc6642b8d8fb12373dfd77ceb0f4932b",nullVotingEscrow:"0x475d18169be8a89357a9ee3ab00ca386d20fa229",omniVotingEscrowAdaptor:"0xe39b5e3b6d74016b2f6a9673d7d7493b6df549d5",poolRecoveryHelper:"0x1b6f057520b4e826271d47b8bdab98e35af17e59",preseededVotingEscrowDelegation:"0xb1a4fe1c6d25a0ddab47431a92a723dd71d9021f",protocolFeePercentagesProvider:"0xf7d5dce55e6d47852f054697bab6a1b48a00ddbd",protocolFeesCollector:"0xce88686553686da562ce7cea497ce749da109f9f",protocolFeesWithdrawer:"0x809b79b53f18e9bc08a961ed4678b901ac93213a",protocolIdRegistry:"0x6cad2ea22bfa7f4c14aae92e47f510cd5c509bc7",recoveryModeHelper:"0x5419e785b83ad3539d3a8741c0abb77d90d8784e",siloLinearPoolFactory:"0x8ea89804145c007e7d226001a96955ad53836087",singleRecipientGauge:"0x9a5ddde7056ceffb03d9962c4549ac1c4ad1f985",singleRecipientGaugeFactory:"0x7ee4d172ae50c627a1bfa9a99e1260c54da26fdf",smartWalletChecker:"0x230a59f4d9adc147480f03b0d3fffecd56c3289a",testBalancerToken:"0xb19382073c7a0addbb56ac6af1808fa49e377b75",vault:"0xba12222222228d8ba445958a75a0704d566bf2c8",veBoostV2:"0x927906bbac747c13c75f6447fe8abb490eab456c",votingEscrow:"0x150a72e4d4d81bbf045565e232c50ed0931ad795",votingEscrowDelegation:"0x0c5538098ebe88175078972f514c9e101d325d4f",votingEscrowDelegationProxy:"0xd87f44df0159dc78029ab9ca7d7e57e7249f5acd",votingEscrowRemapper:"0xf24917fb88261a37cc57f686ebc831a5c0b9fd39",weightedPoolFactory:"0x7920bfa1b2041911b354747ca7a6cdd2dfc50cfd",weth:"0x7b79995e5f793a07bc00c21412e50ecae098e7f9",yearnLinearPoolFactory:"0xacf05be5134d64d150d153818f8c67ee36996650"},tokens:{}}};const ka="0xBA12222222228d8Ba445958a75a0704d566BF2C8",Ba={[e.Network.MAINNET]:{chainId:e.Network.MAINNET,addresses:{contracts:{multicall:"0xeefba1e63905ef1d7acba5a8513c70307c1ce441",poolDataQueries:"0xf5CDdF6feD9C589f1Be04899F48f9738531daD59",lidoRelayer:"0xdcdbf71A870cc60C6F9B621E28a7D3Ffd6Dd4965",veBal:"0xC128a9954e6c874eA3d62ce62B468bA073093F25",gaugeControllerCheckpointer:"0x8e5698dc4897dc12243c8642e77b4f21349db97c",veBalProxy:"0x6f5a2eE11E7a772AeB5114A20d0D7c0ff61EB8A0",gyroConfigProxy:"0xac89cc9d78bbad7eb3a02601b4d65daa1f908aa6",...va[e.Network.MAINNET].contracts},tokens:{bal:va[e.Network.MAINNET].contracts.bal,wrappedNativeAsset:va[e.Network.MAINNET].contracts.weth,bbaUsd:va[e.Network.MAINNET].tokens.bb_a_usd,lbpRaisingTokens:["0x6b175474e89094c44da98b954eedeac495271d0f","0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"],stETH:"0xae7ab96520de3a18e5e111b5eaab095312d7fe84",wstETH:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",veBal:"0xC128a9954e6c874eA3d62ce62B468bA073093F25",...va[e.Network.MAINNET].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"ethereum"}},pools:{wETHwstETH:{id:"0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080",address:"0x32296969ef14eb0c6d29669c550d4a0449130230"}},poolsToIgnore:["0xbd482ffb3e6e50dc1c437557c3bea2b68f3683ee0000000000000000000003c6","0x0afbd58beca09545e4fb67772faf3858e610bcd00000000000000000000004b9","0xf22ff21e17157340575158ad7394e068048dd98b0000000000000000000004b8","0xf71d0774b214c4cf51e33eb3d30ef98132e4dbaa00000000000000000000046e"],sorConnectingTokens:[{symbol:"wEth",address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},{symbol:"wstEth",address:"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"},{symbol:"DOLA",address:"0x865377367054516e17014CcdED1e7d814EDC9ce4"},{symbol:"rEth",address:"0xae78736cd615f374d3085123a210448e74fc6393"},{symbol:"ETHx",address:"0xa35b1b31ce002fbf2058d22f30f95d405200a15b"}],sorTriPathMidPoolIds:["0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112"]},[e.Network.POLYGON]:{chainId:e.Network.POLYGON,addresses:{contracts:{multicall:"0xa1B2b503959aedD81512C37e9dce48164ec6a94d",poolDataQueries:"0x84813aA3e079A665C0B80F944427eE83cBA63617",gaugeClaimHelper:"0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33",gyroConfigProxy:"0xfdc2e9e03f515804744a40d0f8d25c16e93fbe67",...va[e.Network.POLYGON].contracts},tokens:{bal:va[e.Network.POLYGON].contracts.bal,wrappedNativeAsset:va[e.Network.POLYGON].contracts.weth,lbpRaisingTokens:["0x8f3cf7ad23cd3cadbd9735aff958023239c6a063","0x2791bca1f2de4661ed88a30c99a7a9449aa84174","0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"],...va[e.Network.POLYGON].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-prune-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-polygon",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/ianlapham/polygon-blocks"},thirdParty:{coingecko:{nativeAssetId:"",platformId:"polygon-pos"}},pools:{},poolsToIgnore:["0x600bd01b6526611079e12e1ff93aba7a3e34226f0000000000000000000009e4","0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455"],sorConnectingTokens:[{symbol:"weth",address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"},{symbol:"bbrz2",address:"0xe22483774bd8611be2ad2f4194078dac9159f4ba"}]},[e.Network.ARBITRUM]:{chainId:e.Network.ARBITRUM,addresses:{contracts:{multicall:"0x269ff446d9892c9e19082564df3f5e8741e190a1",poolDataQueries:"0x7Ba29fE8E83dd6097A7298075C4AFfdBda3121cC",gaugeClaimHelper:"0xa0dabebaad1b243bbb243f933013d560819eb66f",gyroConfigProxy:"0x9b683ca24b0e013512e2566b68704dbe9677413c",...va[e.Network.ARBITRUM].contracts},tokens:{bal:va[e.Network.ARBITRUM].contracts.bal,wrappedNativeAsset:va[e.Network.ARBITRUM].contracts.weth,lbpRaisingTokens:["0xda10009cbd5d07dd0cecc66161fc93d7c9000da1","0xff970a61a04b1ca14834a43f5de4533ebddb5cc8","0x82af49447d8a07e3bd95bd0d56f35241523fbab1"],...va[e.Network.ARBITRUM].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-arbitrum-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-arbitrum",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/ianlapham/arbitrum-one-blocks"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"arbitrum-one"}},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"}],sorTriPathMidPoolIds:["0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158","0x0052688295413b32626d226a205b95cdb337de860002000000000000000003d1","0xa1a8bf131571a2139feb79401aa4a2e9482df6270002000000000000000004b4"]},[e.Network.GOERLI]:{chainId:e.Network.GOERLI,addresses:{contracts:{multicall:"0x77dCa2C955b15e9dE4dbBCf1246B4B85b651e50e",poolDataQueries:"0x6d3197d069F8F9f1Fe7e23665Bc64CB77ED8b089",veBal:"0x33A99Dcc4C85C014cf12626959111D5898bbCAbF",veBalProxy:"0xA1F107D1cD709514AE8A914eCB757E95f9cedB31",erc4626LinearPoolFactory:"0xba240c856498e2d7a70af4911aafae0d6b565a5b",aaveLinearPoolFactory:"0x76578ecf9a141296ec657847fb45b0585bcda3a6",...va[e.Network.GOERLI].contracts},tokens:{bal:va[e.Network.GOERLI].contracts.bal,wrappedNativeAsset:va[e.Network.GOERLI].contracts.weth}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-goerli-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-goerli",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/blocklytics/goerli-blocks"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"ethereum"}},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1"}]},[e.Network.OPTIMISM]:{chainId:e.Network.OPTIMISM,addresses:{contracts:{multicall:"0x2dc0e2aa608532da689e89e237df582b783e552c",poolDataQueries:"0x6B5dA774890Db7B7b96C6f44e6a4b0F657399E2e",gyroConfigProxy:"0x32acb44fc929339b9f16f0449525cc590d2a23f3",...va[e.Network.OPTIMISM].contracts},tokens:{bal:"0xfe8b128ba8c78aabc59d4c64cee7ff28e9379921",wrappedNativeAsset:va[e.Network.OPTIMISM].contracts.weth,lbpRaisingTokens:["0xda10009cbd5d07dd0cecc66161fc93d7c9000da1","0x7f5c764cbc14f9669b88837ca1490cca17c31607","0x4200000000000000000000000000000000000006"],...va[e.Network.OPTIMISM].tokens}},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"optimistic-ethereum"}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-optimism",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-optimism",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/lyra-finance/optimism-mainnet-blocks"},pools:{},sorConnectingTokens:[{symbol:"weth",address:"0x4200000000000000000000000000000000000006"}]},[e.Network.GNOSIS]:{chainId:e.Network.GNOSIS,addresses:{contracts:{multicall:"0xbb6fab6b627947dae0a75808250d8b2652952cb5",poolDataQueries:"0x3f170631ed9821Ca51A59D996aB095162438DC10",...va[e.Network.GNOSIS].contracts},tokens:{wrappedNativeAsset:va[e.Network.GNOSIS].contracts.weth,bal:va[e.Network.GNOSIS].contracts.bal,...va[e.Network.GNOSIS].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gnosis-chain-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-gnosis-chain"},thirdParty:{coingecko:{nativeAssetId:"xdai",platformId:"xdai"}},averageBlockTime:5,pools:{},sorConnectingTokens:[{symbol:"weth",address:"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"},{symbol:"wsEth",address:"0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6"}],sorTriPathMidPoolIds:["0xeb30c85cc528537f5350cf5684ce6a4538e13394000200000000000000000059","0x7644fa5d0ea14fcf3e813fdf93ca9544f8567655000000000000000000000066"]},[e.Network.FANTOM]:{chainId:e.Network.FANTOM,addresses:{contracts:{vault:"0x20dd72Ed959b6147912C2e529F0a0C651c33c9ce",multicall:"0x66335d7ad8011f6aa3f48aadcb523b62b38ed961",poolDataQueries:"0xb132F1E145DcC085980C531e2dA81f2b84efc14F",gaugeClaimHelper:"0x0000000000000000000000000000000000000000",balancerRelayer:"0x419f7925b8c9e409b6ee8792242556fa210a7a09",balancerHelpers:"0xfE18C7C70b0a2c6541bEde0367124278BC345Dc8",weightedPoolFactory:"0x60467cb225092cE0c989361934311175f437Cf53",composableStablePoolFactory:"0x44814E3A603bb7F1198617995c5696C232F6e8Ed",yearnLinearPoolFactory:"0x1f73ae6ed391a2b1e84ff988a1bb5394b78a4a71"},tokens:{bal:"0xF24Bcf4d1e507740041C9cFd2DddB29585aDCe1e",wrappedNativeAsset:"0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",lbpRaisingTokens:["0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83","0x04068DA6C83AFCFA0e13ba15A6696662335D5B75","0x8D11eC38a3EB5E956B052f67Da8Bdc9bef8Abf3E"]}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-v2-fantom",gaugesSubgraph:"",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/beethovenxfi/fantom-blocks"},thirdParty:{coingecko:{nativeAssetId:"ftm",platformId:"fantom"}},pools:{},poolsToIgnore:[],sorConnectingTokens:[{symbol:"wftm",address:"0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83"}]},[e.Network.SEPOLIA]:{chainId:e.Network.SEPOLIA,addresses:{contracts:{multicall:"0xcA11bde05977b3631167028862bE2a173976CA11",poolDataQueries:"0x9805dcfD25e6De36bad8fe9D3Fe2c9b44B764102",...va[e.Network.SEPOLIA].contracts},tokens:{bal:va[e.Network.SEPOLIA].contracts.bal,wrappedNativeAsset:va[e.Network.SEPOLIA].contracts.weth,...va[e.Network.SEPOLIA].tokens}},urls:{subgraph:"https://api.studio.thegraph.com/query/24660/balancer-sepolia-v2/version/latest"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"ethereum"}},pools:{},poolsToIgnore:[],sorConnectingTokens:[]},[e.Network.ZKEVM]:{chainId:e.Network.ZKEVM,addresses:{contracts:{balancerMinter:"0x475D18169BE8a89357A9ee3Ab00ca386d20fA229",multicall:"0xcA11bde05977b3631167028862bE2a173976CA11",poolDataQueries:"0xF24917fB88261a37Cc57F686eBC831a5c0B9fD39",...va[e.Network.ZKEVM].contracts},tokens:{bal:va[e.Network.ZKEVM].contracts.bal,wrappedNativeAsset:va[e.Network.ZKEVM].contracts.weth,...va[e.Network.ZKEVM].tokens}},urls:{subgraph:"https://api.studio.thegraph.com/query/24660/balancer-polygon-zk-v2/version/latest",gaugesSubgraph:"https://api.studio.thegraph.com/query/24660/balancer-gauges-polygon-zk/version/latest"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"polygon-zkevm"}},averageBlockTime:4,multicallBatchSize:128,pools:{},poolsToIgnore:[],sorConnectingTokens:[{symbol:"weth",address:"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9"},{symbol:"wsEth",address:"0x5D8cfF95D7A57c0BF50B30b43c7CC0D52825D4a9"}]},[e.Network.AVALANCHE]:{chainId:e.Network.AVALANCHE,addresses:{contracts:{balancerMinter:"0xEa924b45a3fcDAAdf4E5cFB1665823B8F8F2039B",multicall:"0xcA11bde05977b3631167028862bE2a173976CA11",poolDataQueries:"0x67af5D428d38C5176a286a2371Df691cDD914Fb8",...va[e.Network.AVALANCHE].contracts},tokens:{bal:va[e.Network.AVALANCHE].contracts.bal,wrappedNativeAsset:va[e.Network.AVALANCHE].contracts.weth,...va[e.Network.AVALANCHE].tokens}},urls:{subgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-avalanche-v2",gaugesSubgraph:"https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-avalanche",blockNumberSubgraph:"https://api.thegraph.com/subgraphs/name/iliaazhel/avalanche-blocks"},thirdParty:{coingecko:{nativeAssetId:"avalanche-2",platformId:"avalanche"}},pools:{},poolsToIgnore:[],sorConnectingTokens:[{symbol:"WAVAX",address:"0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7"},{symbol:"sAVAX",address:"0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be"}]},[e.Network.BASE]:{chainId:e.Network.BASE,addresses:{contracts:{balancerMinter:"0xc7E5ED1054A24Ef31D827E6F86caA58B3Bc168d7",multicall:"0xcA11bde05977b3631167028862bE2a173976CA11",poolDataQueries:"",...va[e.Network.BASE].contracts},tokens:{bal:va[e.Network.BASE].contracts.bal,wrappedNativeAsset:va[e.Network.BASE].contracts.weth,...va[e.Network.BASE].tokens}},urls:{subgraph:"https://api.studio.thegraph.com/query/24660/balancer-base-v2/version/latest",gaugesSubgraph:"https://api.studio.thegraph.com/query/24660/balancer-gauges-base/version/latest",blockNumberSubgraph:"https://api.studio.thegraph.com/query/48427/bleu-base-blocks/version/latest"},thirdParty:{coingecko:{nativeAssetId:"eth",platformId:"base"}},averageBlockTime:2,pools:{},poolsToIgnore:[],sorConnectingTokens:[{symbol:"weth",address:"0x4200000000000000000000000000000000000006"}],sorTriPathMidPoolIds:["0x2db50a0e0310723ef0c2a165cb9a9f80d772ba2f00020000000000000000000d"]}},Ca=e=>Ba[e].addresses;var Oa;e.BalancerErrorCode=void 0,(Oa=e.BalancerErrorCode||(e.BalancerErrorCode={})).ABOVE_MAX_TOKENS="ABOVE_MAX_TOKENS",Oa.BELOW_MIN_TOKENS="BELOW_MIN_TOKENS",Oa.EXIT_DELTA_AMOUNTS="EXIT_DELTA_AMOUNTS",Oa.FEE_PROVIDER_NOT_PROVIDED="FEE_PROVIDER_NOT_PROVIDED",Oa.GAUGES_HELPER_ADDRESS_NOT_PROVIDED="GAUGES_HELPER_ADDRESS_NOT_PROVIDED",Oa.GAUGES_NOT_FOUND="GAUGES_NOT_FOUND",Oa.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED="GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED",Oa.GAUGES_REWARD_TOKEN_EMPTY="GAUGES_REWARD_TOKEN_EMPTY",Oa.ILLEGAL_PARAMETER="ILLEGAL_PARAMETER",Oa.INTERNAL_ERROR_INVALID_ABI="INTERNAL_ERROR_INVALID_ABI",Oa.INPUT_LENGTH_MISMATCH="INPUT_LENGTH_MISMATCH",Oa.INPUT_OUT_OF_BOUNDS="INPUT_OUT_OF_BOUNDS",Oa.INPUT_TOKEN_INVALID="INPUT_TOKEN_INVALID",Oa.INVALID_PROTOCOL_ID="INVALID_PROTOCOL_ID",Oa.INVALID_SWAP_FEE_PERCENTAGE="INVALID_SWAP_FEE_PERCENTAGE",Oa.INVALID_WEIGHTS="INVALID_WEIGHTS",Oa.JOIN_DELTA_AMOUNTS="JOIN_DELTA_AMOUNTS",Oa.JOIN_WITH_ZERO_AMOUNT="JOIN_WITH_ZERO_AMOUNT",Oa.MISSING_AMP="MISSING_AMP",Oa.MISSING_DECIMALS="MISSING_DECIMALS",Oa.MISSING_PRICE_RATE="MISSING_PRICE_RATE",Oa.MISSING_TOKENS="MISSING_TOKENS",Oa.MISSING_WEIGHT="MISSING_WEIGHT",Oa.NO_POOL_DATA="NO_POOL_DATA",Oa.NO_VALUE_PARAMETER="NO_VALUE_PARAMETER",Oa.POOL_DOESNT_EXIST="POOL_DOESNT_EXIST",Oa.QUERY_BATCH_SWAP="QUERY_BATCH_SWAP",Oa.RELAY_SWAP_AMOUNTS="RELAY_SWAP_AMOUNTS",Oa.REWARD_TOKEN_ZERO="REWARD_TOKEN_ZERO",Oa.TIMESTAMP_IN_THE_FUTURE="TIMESTAMP_IN_THE_FUTURE",Oa.TOKEN_MISMATCH="TOKEN_MISMATCH",Oa.UNSUPPORTED_PAIR="UNSUPPORTED_PAIR",Oa.UNSUPPORTED_POOL_TYPE="UNSUPPORTED_POOL_TYPE",Oa.UNSUPPORTED_POOL_TYPE_VERSION="UNSUPPORTED_POOL_TYPE_VERSION";class Ma extends Error{constructor(e){super(Ma.getMessage(e)),this.code=e,this.name="BalancerError"}static getMessage(t){switch(t){case e.BalancerErrorCode.ABOVE_MAX_TOKENS:return"the array contains more tokens than the maximum allowed";case e.BalancerErrorCode.BELOW_MIN_TOKENS:return"the array does not contain the minimum quantity of tokens";case e.BalancerErrorCode.EXIT_DELTA_AMOUNTS:return"Error when checking exit call deltas";case e.BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED:return"Fee Provider Repository has not been provided";case e.BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED:return"Liquidity Gauges Helper Contract address has not been provided";case e.BalancerErrorCode.GAUGES_NOT_FOUND:return"Liquidity Gauges not found with given addresses";case e.BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED:return"Liquidity Gauges Reward Minter Contract address has not been provided";case e.BalancerErrorCode.GAUGES_REWARD_TOKEN_EMPTY:return"No Reward Tokens for Liquidity Gauges provided";case e.BalancerErrorCode.INPUT_LENGTH_MISMATCH:return"input length mismatch";case e.BalancerErrorCode.INPUT_OUT_OF_BOUNDS:return"input out of bounds";case e.BalancerErrorCode.INPUT_TOKEN_INVALID:return"input token invalid";case e.BalancerErrorCode.INVALID_PROTOCOL_ID:return"The provided protocol id does not correspond to a protocol";case e.BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE:return"The swap fee needs to be greater than zero and less than 1e17(10%)";case e.BalancerErrorCode.INVALID_WEIGHTS:return"The sum of the weights needs to be equal to 1e18(100%)";case e.BalancerErrorCode.JOIN_DELTA_AMOUNTS:return"Error when checking join call deltas";case e.BalancerErrorCode.JOIN_WITH_ZERO_AMOUNT:return"Cant join pool with 0 amount of token in";case e.BalancerErrorCode.MISSING_AMP:return"missing amp";case e.BalancerErrorCode.MISSING_DECIMALS:return"missing decimals";case e.BalancerErrorCode.MISSING_PRICE_RATE:return"missing price rate";case e.BalancerErrorCode.MISSING_TOKENS:return"missing tokens";case e.BalancerErrorCode.MISSING_WEIGHT:return"missing weight";case e.BalancerErrorCode.NO_POOL_DATA:return"no pool data";case e.BalancerErrorCode.NO_VALUE_PARAMETER:return"Illegal value passed as parameter";case e.BalancerErrorCode.POOL_DOESNT_EXIST:return"balancer pool does not exist";case e.BalancerErrorCode.RELAY_SWAP_AMOUNTS:return"Error when checking swap amounts";case e.BalancerErrorCode.REWARD_TOKEN_ZERO:return"All Zero Values for Reward Tokens";case e.BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE:return"Timestamp cannot be in the future";case e.BalancerErrorCode.TOKEN_MISMATCH:return"token mismatch";case e.BalancerErrorCode.UNSUPPORTED_PAIR:return"unsupported token pair";case e.BalancerErrorCode.UNSUPPORTED_POOL_TYPE:return"unsupported pool type";default:return"Unknown error"}}}function Fa(e,t,a){return a?function(e,t){const a=se-ye.divDownFixed(e,t);return a<0?BigInt(0):a}(e,t):function(e,t){const a=ye.divDownFixed(e,t)-se;return a<0?BigInt(0):a}(e,t)}const Ra=BigInt(1e3);function Na(e,t,a,n){const o=t.length,i=function(e,t,a){let n=oe;const o=t.length;for(let e=0;ei){if(s-i<=1)return s}else if(i-s<=1)return s}throw new Error("Errors.STABLE_INVARIANT_DIDNT_CONVERGE")}(e,t,!0);let s=oe,r=i/BigInt(o);for(let e=0;e{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:s,pool:t,shouldUnwrapNativeAsset:o});const l=this.sortValuesExitExactBptIn({pool:t,wrappedNativeAsset:i,shouldUnwrapNativeAsset:o,singleTokenOut:s}),{minAmountsOut:d,expectedAmountsOut:p}=l.singleTokenOutIndex>=0?this.calcTokenOutGivenExactBptIn({...l,bptIn:a,slippage:n}):this.calcTokensOutGivenExactBptIn({...l,bptIn:a,slippage:n}),u=l.singleTokenOutIndex>=0?S.exitExactBPTInForOneTokenOut(a,l.singleTokenOutIndex):S.exitExactBPTInForTokensOut(a),c=this.encodeExitPool({poolTokens:l.poolTokens,poolId:t.id,exiter:e,minAmountsOut:d,userData:u,toInternalBalance:r}),y=(new La).calcPriceImpact(t,p.map(BigInt),BigInt(a),!1);return{...c,expectedAmountsOut:p,minAmountsOut:d,priceImpact:y}},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{this.checkInputsExactTokensOut(n,a,t);const r=this.sortValuesExitExactTokensOut({pool:t,wrappedNativeAsset:i,amountsOut:n,tokensOut:a}),{expectedBPTIn:l,maxBPTIn:d}=this.calcBptInGivenExactTokensOut({...r,slippage:o}),{downScaledAmountsOut:p,poolTokens:u}=r,c=S.exitBPTInForExactTokensOut(p,d);return{...this.encodeExitPool({poolId:t.id,userData:c,poolTokens:u,minAmountsOut:p,exiter:e,toInternalBalance:s}),expectedBPTIn:l,maxBPTIn:d,priceImpact:(new La).calcPriceImpact(t,p.map(BigInt),BigInt(l),!1)}},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:void 0,pool:t,shouldUnwrapNativeAsset:!1});const i=me(t),{minAmountsOut:s,expectedAmountsOut:r}=this.calcTokensOutGivenExactBptIn({...i,singleTokenOutIndex:-1,bptIn:a,slippage:n}),l=A.recoveryModeExit(a),d=this.encodeExitPool({poolTokens:i.poolTokens,poolId:t.id,exiter:e,minAmountsOut:s,userData:l,toInternalBalance:o}),p=(new La).calcPriceImpact(t,r.map(BigInt),BigInt(a),!1);return{...d,expectedAmountsOut:r,minAmountsOut:s,priceImpact:p}},this.checkInputsExactBPTIn=({bptIn:t,singleTokenOut:o,pool:i,shouldUnwrapNativeAsset:s})=>{if(!t.length||n.parseFixed(t,18).isNegative())throw new Ma(e.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(o&&o!==a.AddressZero&&!i.tokens.map((e=>e.address)).some((e=>je(e,o))))throw new Ma(e.BalancerErrorCode.TOKEN_MISMATCH);if(!s&&o===a.AddressZero)throw new Error("shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values");if(i.tokens.some((e=>void 0===e.decimals)))throw new Ma(e.BalancerErrorCode.MISSING_DECIMALS);if(!i.amp)throw new Ma(e.BalancerErrorCode.MISSING_AMP)},this.checkInputsExactTokensOut=(t,a,n)=>{if(a.length!=t.length||a.length!=n.tokensList.length)throw new Ma(e.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(n.tokens.some((e=>void 0===e.decimals)))throw new Ma(e.BalancerErrorCode.MISSING_DECIMALS);if(!n.amp)throw new Ma(e.BalancerErrorCode.MISSING_AMP)},this.sortValuesExitExactBptIn=({pool:e,wrappedNativeAsset:t,shouldUnwrapNativeAsset:a,singleTokenOut:n})=>{const o=me(e,t,a),{poolTokens:i}=o;let s=-1;return n&&(s=i.indexOf(n)),{...o,singleTokenOutIndex:s}},this.sortValuesExitExactTokensOut=({pool:e,wrappedNativeAsset:t,amountsOut:n,tokensOut:o})=>{const i=o.some((e=>e===a.AddressZero)),s=me(e,t,i),{scalingFactors:r}=s,l=new z(t),[,d]=l.sortTokens(o,n),p=pe(d.map((e=>BigInt(e))),r.map((e=>BigInt(e))));return{...s,upScaledAmountsOut:p,downScaledAmountsOut:d}},this.calcTokenOutGivenExactBptIn=({poolTokens:e,ampWithPrecision:t,upScaledBalances:a,totalSharesEvm:o,swapFeeEvm:i,singleTokenOutIndex:s,bptIn:r,slippage:l,scalingFactors:d})=>{const p=x.StableMathBigInt._calcTokenOutGivenExactBptIn(t,a,s,BigInt(r),o,i).toString(),u=ue(BigInt(p)-BigInt(1),d[s]).toString(),c=Array(e.length).fill("0"),y=Array(e.length).fill("0");return c[s]=u,y[s]=$e(n.BigNumber.from(u),n.BigNumber.from(l)).toString(),{minAmountsOut:y,expectedAmountsOut:c}},this.calcTokensOutGivenExactBptIn=({upScaledBalances:e,totalSharesEvm:t,scalingFactors:a,bptIn:o,slippage:i})=>{const s=ce(x.StableMathBigInt._calcTokensOutGivenExactBptIn(e,BigInt(o),t),a),r=s.map((e=>e.toString()));return{minAmountsOut:s.map((e=>$e(n.BigNumber.from(e),n.BigNumber.from(i)).toString())),expectedAmountsOut:r}},this.calcBptInGivenExactTokensOut=({ampWithPrecision:e,upScaledBalances:t,upScaledAmountsOut:a,totalSharesEvm:o,swapFeeEvm:i,slippage:s})=>{const r=x.StableMathBigInt._calcBptInGivenExactTokensOut(e,t,a,o,i).toString();return{maxBPTIn:Je(n.BigNumber.from(r),n.BigNumber.from(s)).toString(),expectedBPTIn:r}},this.encodeExitPool=({poolId:e,exiter:t,poolTokens:a,minAmountsOut:n,userData:o,toInternalBalance:i})=>{const s=ka,r="exitPool",l={poolId:e,sender:t,recipient:t,exitPoolRequest:{assets:a,minAmountsOut:n,userData:o,toInternalBalance:i}};return{data:pa.createInterface().encodeFunctionData(r,[l.poolId,l.sender,l.recipient,l.exitPoolRequest]),to:s,functionName:r,attributes:l}}}}class Ua{constructor(){this.buildJoin=({joiner:e,pool:t,tokensIn:a,amountsIn:n,slippage:o,wrappedNativeAsset:i})=>{this.checkInputs(a,n,t);const s=this.sortValues({pool:t,wrappedNativeAsset:i,tokensIn:a,amountsIn:n}),{expectedBPTOut:r,minBPTOut:l}=this.calcBptOutGivenExactTokensIn({...s,slippage:o});return{...this.encodeJoinPool({joiner:e,amountsIn:n,tokensIn:a,poolId:t.id,minBPTOut:l,...s}),minBPTOut:l,expectedBPTOut:r,priceImpact:(new La).calcPriceImpact(t,s.sortedAmountsIn.map(BigInt),BigInt(r),!0)}},this.checkInputs=(t,a,n)=>{if(a.length!=t.length||a.length!=n.tokensList.length)throw new Ma(e.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(n.tokens.some((e=>void 0===e.decimals)))throw new Ma(e.BalancerErrorCode.MISSING_DECIMALS);if(!n.amp)throw new Ma(e.BalancerErrorCode.MISSING_AMP)},this.sortValues=({pool:e,wrappedNativeAsset:t,amountsIn:n,tokensIn:o})=>{const{poolTokens:i,ampWithPrecision:s,totalSharesEvm:r,swapFeeEvm:l,scalingFactors:d,upScaledBalances:p}=me(e,t,o.includes(a.AddressZero)),u=new z(t),[,c]=u.sortTokens(o,n);return{poolTokens:i,ampWithPrecision:s,totalSharesEvm:r,swapFeeEvm:l,upScaledBalances:p,upScaledAmountsIn:pe(c.map((e=>BigInt(e))),d.map((e=>BigInt(e)))),sortedAmountsIn:c}},this.calcBptOutGivenExactTokensIn=({ampWithPrecision:e,upScaledBalances:t,upScaledAmountsIn:a,totalSharesEvm:o,swapFeeEvm:i,slippage:s})=>{const r=x.StableMathBigInt._calcBptOutGivenExactTokensIn(e,t,a,o,i).toString();return{expectedBPTOut:r,minBPTOut:$e(n.BigNumber.from(r),n.BigNumber.from(s)).toString()}},this.encodeJoinPool=({poolId:e,joiner:t,poolTokens:a,sortedAmountsIn:n,amountsIn:o,tokensIn:i,minBPTOut:s})=>{const r=S.joinExactTokensInForBPTOut(n,s),l=ka,d="joinPool",p={poolId:e,sender:t,recipient:t,joinPoolRequest:{assets:a,maxAmountsIn:n,userData:r,fromInternalBalance:!1}};return{attributes:p,data:pa.createInterface().encodeFunctionData(d,[p.poolId,p.sender,p.recipient,p.joinPoolRequest]),functionName:d,to:l,value:Ve(i,o)}}}}class Va{calcTotal(e){var t,a;let o=n.BigNumber.from(0),i=n.BigNumber.from(0);for(let a=0;a{this.checkInputs(a,n,t.tokensList);const s=this.sortValuesBasedOnPoolVersion({pool:t,wrappedNativeAsset:i,amountsIn:n,tokensIn:a}),r=this.buildExactTokensInForBPTOut({...s,slippage:o,joiner:e,poolId:t.id}),l=Ve(a,n),d=(new La).calcPriceImpact(t,s.sortedAmountsIn.map(BigInt),BigInt(r.expectedBPTOut),!0);return{...r,to:ka,value:l,priceImpact:d}}}sortValuesBasedOnPoolVersion({pool:e,wrappedNativeAsset:t,amountsIn:a,tokensIn:n}){return this.sortV1(t,n,a,e)}checkInputs(t,a,n){if(t.length!=a.length||t.length!=n.length-1)throw new Ma(e.BalancerErrorCode.INPUT_LENGTH_MISMATCH)}encodeUserDataExactTokensInForBPTOut(e,t,a){const o=$e(n.BigNumber.from(e),n.BigNumber.from(t)).toString();return{userData:O.joinExactTokensInForBPTOut(a,o),minBPTOut:o}}encodeJoinPool(e,t,a,n,o,i){const s="joinPool",r={poolId:e,sender:t,recipient:a,joinPoolRequest:{assets:n,maxAmountsIn:i,userData:o,fromInternalBalance:!1}};return{functionName:s,attributes:r,data:pa.createInterface().encodeFunctionData(s,[r.poolId,r.sender,r.recipient,r.joinPoolRequest])}}sortV1(e,t,n,o){const i=new z(e),[,s]=i.sortTokens(t,n),{poolTokens:r,ampWithPrecision:l,swapFeeEvm:d,totalSharesEvm:p,bptIndex:u,scalingFactorsWithoutBpt:c,upScaledBalancesWithoutBpt:y}=me(o,e,t.includes(a.AddressZero));return{sortedAmountsIn:s,scalingFactorsWithoutBpt:c,upScaledBalancesWithoutBpt:y,ampWithPrecision:l,totalSharesEvm:p,swapFeeEvm:d,bptIndex:u,poolTokens:r}}buildExactTokensInForBPTOut(e){const{sortedAmountsIn:t,scalingFactorsWithoutBpt:a,upScaledBalancesWithoutBpt:n,ampWithPrecision:o,totalSharesEvm:i,swapFeeEvm:s,bptIndex:r,poolTokens:l,slippage:d,poolId:p,joiner:u}=e,c=this.calcBptOutGivenExactTokensIn(t,a,n,o,i,s),y=this.encodeUserDataExactTokensInForBPTOut(c,d,t),{functionName:b,data:m,attributes:f}=this.encodeJoinPool(p,u,u,l,y.userData,Xe(t,r,"0"));return{functionName:b,data:m,attributes:f,minBPTOut:y.minBPTOut,expectedBPTOut:c.toString()}}calcBptOutGivenExactTokensIn(e,t,a,n,o,i){const s=pe(e.map(BigInt),t.map(BigInt));return d.StableMathBigInt._calcBptOutGivenExactTokensIn(n,a,s,o,i)}sortV4(e,t,a){const{poolTokens:n,poolTokensWithoutBpt:o,ampWithPrecision:i,swapFeeEvm:s,totalSharesEvm:r,scalingFactorsWithoutBpt:l,upScaledBalancesWithoutBpt:d}=me(a),[p]=Ze(o,e,t);return{sortedAmountsIn:p,scalingFactorsWithoutBpt:l,upScaledBalancesWithoutBpt:d,ampWithPrecision:i,totalSharesEvm:r,swapFeeEvm:s,bptIndex:0,poolTokens:n}}}class Ka{constructor(){this.buildExitExactBPTIn=({exiter:e,pool:t,bptIn:a,slippage:n,shouldUnwrapNativeAsset:o,wrappedNativeAsset:i,singleTokenOut:s,toInternalBalance:r})=>{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:s,pool:t,shouldUnwrapNativeAsset:o});const l=this.sortValuesExitExactBptIn({pool:t,wrappedNativeAsset:i,shouldUnwrapNativeAsset:o,singleTokenOut:s}),{minAmountsOut:d,expectedAmountsOut:p}=l.singleTokenOutIndexWithoutBpt>=0?this.calcTokenOutGivenExactBptIn({...l,bptIn:a,slippage:n}):this.calcTokensOutGivenExactBptIn({...l,bptIn:a,slippage:n}),u=l.singleTokenOutIndexWithoutBpt>=0?O.exitExactBPTInForOneTokenOut(a,l.singleTokenOutIndexWithoutBpt):O.exitExactBPTInForAllTokensOut(a),c=Xe(d,l.bptIndex,"0"),y=this.encodeExitPool({poolTokens:l.poolTokens,poolId:t.id,exiter:e,userData:u,minAmountsOut:c,toInternalBalance:r}),b=(new La).calcPriceImpact(t,p.map(BigInt),BigInt(a),!1);return{...y,expectedAmountsOut:p,minAmountsOut:d,priceImpact:b}},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{this.checkInputsExactTokensOut(a,n,t);const r=this.sortValuesExitExactTokensOut({pool:t,wrappedNativeAsset:i,amountsOut:n,tokensOut:a}),{bptIn:l,maxBPTIn:d}=this.calcBptInGivenExactTokensOut({...r,slippage:o}),p=O.exitBPTInForExactTokensOut(r.downscaledAmountsOutWithoutBpt,d);return{...this.encodeExitPool({poolTokens:r.poolTokens,minAmountsOut:r.downscaledAmountsOutWithBpt,userData:p,exiter:e,poolId:t.id,toInternalBalance:s}),maxBPTIn:d,expectedBPTIn:l,priceImpact:(new La).calcPriceImpact(t,r.downscaledAmountsOutWithoutBpt.map(BigInt),BigInt(l),!1)}},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{this.checkInputsRecoveryExit({bptIn:a,pool:t}),t.tokens.forEach((e=>e.priceRate="1"));const i=me(t),{minAmountsOut:s,expectedAmountsOut:r}=this.calcTokensOutGivenExactBptIn({...i,bptIn:a,slippage:n}),l=A.recoveryModeExit(a),d=Xe(s,i.bptIndex,"0"),p=this.encodeExitPool({poolTokens:i.poolTokens,poolId:t.id,exiter:e,userData:l,minAmountsOut:d,toInternalBalance:o}),u=(new La).calcPriceImpact(t,r.map(BigInt),BigInt(a),!1);return{...p,expectedAmountsOut:r,minAmountsOut:s,priceImpact:u}},this.checkInputsExactBPTIn=({bptIn:t,singleTokenOut:o,pool:i,shouldUnwrapNativeAsset:s})=>{if(n.BigNumber.from(t).lte(0))throw new Ma(e.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(!o&&i.poolTypeVersion<2)throw new Error("Unsupported Exit Type For Pool");if(o&&o!==a.AddressZero&&!i.tokens.map((e=>e.address)).some((e=>je(e,o))))throw new Ma(e.BalancerErrorCode.TOKEN_MISMATCH);if(!s&&o===a.AddressZero)throw new Error("shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values");if(i.tokens.some((e=>void 0===e.decimals)))throw new Ma(e.BalancerErrorCode.MISSING_DECIMALS);if(!i.amp)throw new Ma(e.BalancerErrorCode.MISSING_AMP)},this.checkInputsExactTokensOut=(t,a,n)=>{if(t.length!=a.length||t.length!=n.tokensList.length-1)throw new Ma(e.BalancerErrorCode.INPUT_LENGTH_MISMATCH)},this.checkInputsRecoveryExit=({bptIn:t,pool:a})=>{if(n.BigNumber.from(t).lte(0))throw new Ma(e.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(!a.isInRecoveryMode)throw new Error("Exit type not supported because pool is not in Recovery Mode");if(a.tokens.some((e=>void 0===e.decimals)))throw new Ma(e.BalancerErrorCode.MISSING_DECIMALS);if(!a.amp)throw new Ma(e.BalancerErrorCode.MISSING_AMP)},this.sortValuesExitExactBptIn=({pool:e,singleTokenOut:t,wrappedNativeAsset:a,shouldUnwrapNativeAsset:n})=>{const o=me(e,a,n);let i=-1;return t&&(i=o.poolTokensWithoutBpt.indexOf(t)),{...o,singleTokenOutIndexWithoutBpt:i}},this.sortValuesExitExactTokensOut=({pool:e,wrappedNativeAsset:t,amountsOut:o,tokensOut:i})=>{const s=i.some((e=>e===a.AddressZero)),r=me(e,t,s),l=new z(t),[,d]=l.sortTokens(i,o),p=Xe(d,r.bptIndex,"0").map((e=>{const t=n.BigNumber.from(e);return t.isZero()?e:t.sub(1).toString()})),u=pe(d.map((e=>BigInt(e))),r.scalingFactorsWithoutBpt);return{...r,upScaledAmountsOutWithoutBpt:u,downscaledAmountsOutWithBpt:p,downscaledAmountsOutWithoutBpt:d}},this.calcTokenOutGivenExactBptIn=({ampWithPrecision:e,upScaledBalancesWithoutBpt:t,singleTokenOutIndexWithoutBpt:a,scalingFactorsWithoutBpt:o,totalSharesEvm:i,swapFeeEvm:s,bptIn:r,slippage:l})=>{const d=x.StableMathBigInt._calcTokenOutGivenExactBptIn(e,t,a,BigInt(r),i,s),p=Array(t.length).fill("0"),u=Array(t.length).fill("0"),c=ue(d,o[a]);return p[a]=c.toString(),u[a]=$e(n.BigNumber.from(c),n.BigNumber.from(l)).toString(),{minAmountsOut:u,expectedAmountsOut:p}},this.calcTokensOutGivenExactBptIn=({upScaledBalancesWithoutBpt:e,totalSharesEvm:t,scalingFactorsWithoutBpt:a,bptIn:o,slippage:i})=>{const s=ce(x.StableMathBigInt._calcTokensOutGivenExactBptIn(e,BigInt(o),t),a),r=s.map((e=>e.toString()));return{minAmountsOut:s.map((e=>$e(n.BigNumber.from(e),n.BigNumber.from(i)).toString())),expectedAmountsOut:r}},this.calcBptInGivenExactTokensOut=({ampWithPrecision:e,upScaledBalancesWithoutBpt:t,upScaledAmountsOutWithoutBpt:a,totalSharesEvm:o,swapFeeEvm:i,slippage:s})=>{const r=x.StableMathBigInt._calcBptInGivenExactTokensOut(e,t,a,o,i).toString();return{bptIn:r,maxBPTIn:Je(n.BigNumber.from(r),n.BigNumber.from(s)).toString()}},this.encodeExitPool=e=>{const{exiter:t,poolId:a,minAmountsOut:n,userData:o,poolTokens:i,toInternalBalance:s}=e,r="exitPool",l={poolId:a,sender:t,recipient:t,exitPoolRequest:{assets:i,minAmountsOut:n,userData:o,toInternalBalance:s}};return{to:ka,functionName:r,attributes:l,data:pa.createInterface().encodeFunctionData(r,[l.poolId,l.sender,l.recipient,l.exitPoolRequest])}}}}class $a{constructor(e=new Ka,t=new Va,a=new Wa,n=new La,o=new Ha){this.exit=e,this.liquidity=t,this.spotPriceCalculator=a,this.priceImpactCalculator=n,this.join=o}}class Ja{bptZeroPriceImpact(t,a){if(a.length!==t.tokensList.length)throw new Ma(e.BalancerErrorCode.INPUT_LENGTH_MISMATCH);const{scalingFactorsRaw:n,totalSharesEvm:o,upScaledBalances:i,weights:s}=me(t);let r=oe;for(let e=0;e{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:s,pool:t,shouldUnwrapNativeAsset:o});const l=this.sortValuesExitExactBptIn({pool:t,wrappedNativeAsset:i,shouldUnwrapNativeAsset:o,singleTokenOut:s}),{minAmountsOut:d,expectedAmountsOut:p}=l.singleTokenOutIndex>=0?this.calcTokenOutGivenExactBptIn({...l,bptIn:a,slippage:n}):this.calcTokensOutGivenExactBptIn({...l,bptIn:a,slippage:n}),u=l.singleTokenOutIndex>=0?v.exitExactBPTInForOneTokenOut(a,l.singleTokenOutIndex):v.exitExactBPTInForTokensOut(a),c=this.encodeExitPool({poolTokens:l.poolTokens,poolId:t.id,exiter:e,minAmountsOut:d,userData:u,toInternalBalance:r}),y=(new Ja).calcPriceImpact(t,p.map(BigInt),BigInt(a),!1);return{...c,expectedAmountsOut:p,minAmountsOut:d,priceImpact:y}},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{this.checkInputsExactTokensOut(n,a,t);const r=this.sortValuesExitExactTokensOut({pool:t,wrappedNativeAsset:i,amountsOut:n,tokensOut:a}),{expectedBPTIn:l,maxBPTIn:d}=this.calcBptInGivenExactTokensOut({...r,slippage:o}),{downScaledAmountsOut:p,poolTokens:u}=r,c=v.exitBPTInForExactTokensOut(p,d);return{...this.encodeExitPool({poolId:t.id,userData:c,poolTokens:u,minAmountsOut:p,exiter:e,toInternalBalance:s}),expectedBPTIn:l,maxBPTIn:d,priceImpact:(new Ja).calcPriceImpact(t,p.map(BigInt),BigInt(l),!1)}},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:void 0,pool:t,shouldUnwrapNativeAsset:!1}),t.tokens.forEach((e=>e.priceRate="1"));const i=me(t),{minAmountsOut:s,expectedAmountsOut:r}=this.calcTokensOutGivenExactBptIn({...i,bptIn:a,slippage:n,singleTokenOutIndex:-1}),l=A.recoveryModeExit(a),d=this.encodeExitPool({poolTokens:i.poolTokens,poolId:t.id,exiter:e,minAmountsOut:s,userData:l,toInternalBalance:o}),p=(new Ja).calcPriceImpact(t,r.map(BigInt),BigInt(a),!1);return{...d,expectedAmountsOut:r,minAmountsOut:s,priceImpact:p}},this.checkInputsExactBPTIn=({bptIn:t,singleTokenOut:o,pool:i,shouldUnwrapNativeAsset:s})=>{if(!t.length||n.parseFixed(t,18).isNegative())throw new Ma(e.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(o&&o!==a.AddressZero&&!i.tokens.map((e=>e.address)).some((e=>je(e,o))))throw new Ma(e.BalancerErrorCode.TOKEN_MISMATCH);if(!s&&o===a.AddressZero)throw new Error("shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values");if(i.tokens.some((e=>void 0===e.decimals)))throw new Ma(e.BalancerErrorCode.MISSING_DECIMALS)},this.checkInputsExactTokensOut=(t,a,n)=>{if(a.length!=t.length||a.length!=n.tokensList.length)throw new Ma(e.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(n.tokens.some((e=>void 0===e.decimals)))throw new Ma(e.BalancerErrorCode.MISSING_DECIMALS)},this.sortValuesExitExactBptIn=({pool:e,wrappedNativeAsset:t,shouldUnwrapNativeAsset:a,singleTokenOut:n})=>{const o=me(e,t,a),{poolTokens:i}=o;let s=-1;return n&&(s=i.indexOf(n.toLowerCase())),{...o,singleTokenOutIndex:s}},this.sortValuesExitExactTokensOut=({pool:e,wrappedNativeAsset:t,amountsOut:n,tokensOut:o})=>{const i=o.some((e=>e===a.AddressZero)),s=me(e,t,i),{scalingFactors:r}=s,l=new z(t),[,d]=l.sortTokens(o,n),p=pe(d.map((e=>BigInt(e))),r.map((e=>BigInt(e))));return{...s,upScaledAmountsOut:p,downScaledAmountsOut:d}},this.calcTokenOutGivenExactBptIn=({poolTokens:e,weights:t,upScaledBalances:a,totalSharesEvm:o,swapFeeEvm:i,singleTokenOutIndex:s,bptIn:r,slippage:l,scalingFactors:d})=>{const p=x.WeightedMaths._calcTokenOutGivenExactBptIn(a[s],t[s],BigInt(r),o,i).toString(),u=ue(BigInt(p)-BigInt(1),d[s]).toString(),c=Array(e.length).fill("0"),y=Array(e.length).fill("0");return c[s]=u,y[s]=$e(n.BigNumber.from(u),n.BigNumber.from(l)).toString(),{minAmountsOut:y,expectedAmountsOut:c}},this.calcTokensOutGivenExactBptIn=({upScaledBalances:e,totalSharesEvm:t,scalingFactors:a,bptIn:o,slippage:i})=>{const s=ce(x.WeightedMaths._calcTokensOutGivenExactBptIn(e,BigInt(o),t).map((e=>e.toString())).map((e=>BigInt(e))),a),r=s.map((e=>e.toString()));return{minAmountsOut:s.map((e=>$e(n.BigNumber.from(e),n.BigNumber.from(i)).toString())),expectedAmountsOut:r}},this.calcBptInGivenExactTokensOut=({weights:e,upScaledBalances:t,upScaledAmountsOut:a,totalSharesEvm:o,swapFeeEvm:i,slippage:s})=>{const r=x.WeightedMaths._calcBptInGivenExactTokensOut(t,e,a,o,i).toString();return{maxBPTIn:Je(n.BigNumber.from(r),n.BigNumber.from(s)).toString(),expectedBPTIn:r}},this.encodeExitPool=({poolId:e,exiter:t,poolTokens:a,minAmountsOut:n,userData:o,toInternalBalance:i})=>{const s=ka,r="exitPool",l={poolId:e,sender:t,recipient:t,exitPoolRequest:{assets:a,minAmountsOut:n,userData:o,toInternalBalance:i}};return{data:pa.createInterface().encodeFunctionData(r,[l.poolId,l.sender,l.recipient,l.exitPoolRequest]),to:s,functionName:r,attributes:l}}}}class Xa{constructor(){this.buildJoin=({joiner:e,pool:t,tokensIn:a,amountsIn:n,slippage:o,wrappedNativeAsset:i})=>{this.checkInputs(n,a,t);const s=this.sortValues({pool:t,wrappedNativeAsset:i,tokensIn:a,amountsIn:n}),{expectedBPTOut:r,minBPTOut:l}=this.calcBptOutGivenExactTokensIn({...s,slippage:o});return{...this.encodeJoinPool({...s,poolId:t.id,joiner:e,minBPTOut:l,tokensIn:a,amountsIn:n}),minBPTOut:l,expectedBPTOut:r,priceImpact:(new Ja).calcPriceImpact(t,s.sortedAmountsIn.map(BigInt),BigInt(r),!0)}},this.checkInputs=(t,a,n)=>{if(t.length!=a.length||t.length!=n.tokensList.length)throw new Ma(e.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(n.tokens.some((e=>void 0===e.decimals)))throw new Ma(e.BalancerErrorCode.MISSING_DECIMALS);if(n.tokens.some((e=>!e.weight)))throw new Ma(e.BalancerErrorCode.MISSING_WEIGHT)},this.sortValues=({pool:e,tokensIn:t,amountsIn:n,wrappedNativeAsset:o})=>{const i=t.some((e=>e===a.AddressZero)),s=me(e,o,i),r=new z(o),[,l]=r.sortTokens(t,n),d=pe(l.map(BigInt),s.scalingFactors);return{...s,sortedAmountsIn:l,upScaledAmountsIn:d}},this.calcBptOutGivenExactTokensIn=({upScaledBalances:e,weights:t,upScaledAmountsIn:a,totalSharesEvm:o,swapFeeEvm:i,slippage:s})=>{const r=d.WeightedMaths._calcBptOutGivenExactTokensIn(e,t,a,o,i).toString();return{expectedBPTOut:r,minBPTOut:$e(n.BigNumber.from(r),n.BigNumber.from(s)).toString()}},this.encodeJoinPool=({sortedAmountsIn:e,poolTokens:t,poolId:a,joiner:n,minBPTOut:o,amountsIn:i,tokensIn:s})=>{const r="joinPool",l={poolId:a,sender:n,recipient:n,joinPoolRequest:{assets:t,maxAmountsIn:e,userData:v.joinExactTokensInForBPTOut(e,o),fromInternalBalance:!1}};return{to:ka,functionName:r,data:pa.createInterface().encodeFunctionData(r,[l.poolId,l.sender,l.recipient,l.joinPoolRequest]),attributes:l,value:Ve(s,i)}}}}class Ya{calcTotal(e){var t;let a=n.BigNumber.from(0),o=n.BigNumber.from(0);for(let n=0;ne.add(Ge(t.weight||"0",18))),n.BigNumber.from(0));if(a.gt(0)){return We(o.mul(i).div(a),36)}return"0"}}class za{calcPoolSpotPrice(e,t,a){const n=e===a.address||t===a.address;if(n){const e={address:a.address,balance:a.totalShares,decimals:18,priceRate:"1",weight:"0"};a.tokens.push(e),a.tokensList.push(a.address)}const o=d.WeightedPool.fromPool(a),i=o.parsePoolPairData(e,t),s=o._spotPriceAfterSwapExactTokenInForTokenOut(i,d.ZERO).toString();return n&&(a.tokens.pop(),a.tokensList.pop()),s}}class Za{constructor(e=new ja,t=new Xa,a=new Ya,n=new za,o=new Ja){this.exit=e,this.join=t,this.liquidity=a,this.spotPriceCalculator=n,this.priceImpactCalculator=o}}class Qa{calcTotal(e){var t,o;let i=a.Zero,s=a.Zero;for(let a=0;a{throw new Error("Exit type not supported")},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{throw new Error("Exit type not supported")},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{throw new Error("Exit type not supported")}}}class nn{constructor(){this.buildJoin=({joiner:e,pool:t,tokensIn:a,amountsIn:n,slippage:o,wrappedNativeAsset:i})=>{throw new Error("Join type not supported")}}}class on{constructor(e=new an,t=new nn,a=new Va,n=new Wa,o=new La){this.exit=e,this.join=t,this.liquidity=a,this.spotPriceCalculator=n,this.priceImpactCalculator=o}}class sn{bptZeroPriceImpact(e,t){throw new Error("Linear Pool bptZeroPriceImpact Not Implented")}calcPriceImpact(e,t,a,n){return"0"}}class rn{constructor(){this.buildExitExactBPTIn=({exiter:e,pool:t,bptIn:a,slippage:n,shouldUnwrapNativeAsset:o,wrappedNativeAsset:i,singleTokenOut:s,toInternalBalance:r})=>{throw new Error("Exit type not supported")},this.buildExitExactTokensOut=({exiter:e,pool:t,tokensOut:a,amountsOut:n,slippage:o,wrappedNativeAsset:i,toInternalBalance:s})=>{throw new Error("Exit type not supported")},this.buildRecoveryExit=({exiter:e,pool:t,bptIn:a,slippage:n,toInternalBalance:o})=>{this.checkInputsExactBPTIn({bptIn:a,singleTokenOut:void 0,pool:t,shouldUnwrapNativeAsset:!1}),t.tokens.forEach((e=>e.priceRate="1"));const i=me(t),{minAmountsOut:s,expectedAmountsOut:r}=this.calcTokensOutGivenExactBptIn({...i,bptIn:a,slippage:n}),l=A.recoveryModeExit(a),d=Xe(s,i.bptIndex,"0"),p=this.encodeExitPool({poolTokens:i.poolTokens,poolId:t.id,exiter:e,minAmountsOut:d,userData:l,toInternalBalance:o}),u=(new sn).calcPriceImpact(t,r.map(BigInt),BigInt(a),!1);return{...p,expectedAmountsOut:r,minAmountsOut:s,priceImpact:u}},this.checkInputsExactBPTIn=({bptIn:t,pool:a})=>{if(n.BigNumber.from(t).lte(0))throw new Ma(e.BalancerErrorCode.INPUT_OUT_OF_BOUNDS);if(a.tokens.some((e=>void 0===e.decimals)))throw new Ma(e.BalancerErrorCode.MISSING_DECIMALS)},this.calcTokensOutGivenExactBptIn=({bptIndex:e,upScaledBalances:t,totalSharesEvm:a,scalingFactors:o,bptIn:i,slippage:s})=>{const r=ze(ce(x.LinearMaths._calcTokensOutGivenExactBptIn(t,BigInt(i),a,e),o),e).map((e=>e.toString()));return{minAmountsOut:r.map((e=>$e(n.BigNumber.from(e),n.BigNumber.from(s)).toString())),expectedAmountsOut:r}},this.encodeExitPool=e=>{const{exiter:t,poolId:a,minAmountsOut:n,userData:o,poolTokens:i,toInternalBalance:s}=e,r="exitPool",l={poolId:a,sender:t,recipient:t,exitPoolRequest:{assets:i,minAmountsOut:n,userData:o,toInternalBalance:s}};return{to:ka,functionName:r,attributes:l,data:pa.createInterface().encodeFunctionData(r,[l.poolId,l.sender,l.recipient,l.exitPoolRequest])}}}}class ln{constructor(){this.buildJoin=({joiner:e,pool:t,tokensIn:a,amountsIn:n,slippage:o,wrappedNativeAsset:i})=>{throw new Error("Join type not supported")}}}const dn=18,pn=Ge("1",dn);class un{calcTotal(e){var t,n;let o=a.Zero,i=a.Zero;for(let a=0;aBigInt(0)){const t=ye.divDownFixed(i,o);for(let n=0;nBigInt(0)){const t=ye.divDownFixed(i,o);for(let n=0;nt.address!==e.address)),a=await Promise.all(t.map((async e=>{const t=await this.pools.findBy("address",e.address);if(!t)return;const a=Ge(await this.getLiquidity(t),18),n=Ge(t.totalShares,18),o=Ge(e.balance,18),i=n.eq(0)?0:a.mul(o).div(n);return{address:t.address,liquidity:i.toString()}}))),o=a.reduce(((e,t)=>e.add(t?t.liquidity:n.BigNumber.from(0))),n.BigNumber.from(0)),i=t.filter((e=>!a.find((t=>(null==t?void 0:t.address)===e.address)))),s=await Promise.all(i.map((async e=>{var t;const a=await this.tokenPrices.find(e.address);return{address:e.address,decimals:e.decimals,priceRate:e.priceRate,price:(null==a?void 0:a.usd)&&a||{usd:null===(t=e.token)||void 0===t?void 0:t.latestUSDPrice},balance:e.balance,weight:e.weight}}))),r=Ge(An.from(e.poolType).liquidity.calcTotal(s),18);return We(o.add(r),18)}async getBptPrice(e){const t=await this.getLiquidity(e);return(parseFloat(t)/parseFloat(e.totalShares)).toString()}}const vn=n.BigNumber.from("0"),kn=e=>e?Object.keys(e).filter((t=>e[t].gt(vn))).reduce(((t,a)=>(t[a]=e[a],t)),{}):{},Bn=(e,t,a)=>e.map((e=>((e,t,a)=>{if(!t[e.address]&&!a[e.address])return e;const n=kn(t[e.address]),o=kn(a[e.address]);return e.claimableTokens||(e.claimableTokens={...n,...o}),e})(e,t,a))).filter((e=>e.claimableTokens&&Object.keys(e.claimableTokens).length)),Cn=(e,t)=>{var a;if(t.rewardTokens)for(const n of Object.keys(t.rewardTokens))e[a=t.id]||(e[a]=[]),e[t.id].push(n);return e},On=new t.Interface(["function claim_rewards(address sender, address receiver) returns (uint256)","function claimable_tokens(address addr) view returns (uint256)","function claimable_reward(address addr, address token) view returns (uint256)"]),Mn=new t.Interface(["function mintMany(address[] gauges) returns (uint256)"]),Fn=new t.Interface(["function getPendingRewards(address gauge, address user, address token) view returns (uint256)","function claimRewardsFromGauges(address[] gauges, address user)"]);class Rn{constructor(e,t,a,n,o,i){this.multicall=n,this.liquidityGauges=e,this.feeDistributor=t,this.chainId=a,this.gaugeClaimHelperAddress=o,this.balancerMinterAddress=i}async getClaimableRewardTokens(t){const a=await this.getGauges();if(!a.length)throw new Ma(e.BalancerErrorCode.GAUGES_NOT_FOUND);const n=a.map((e=>e.address)),o=this.getRewardTokens(a),i=await this.retrieveClaimableTokens(n,t),s=await this.retrieveClaimableRewards(o,t);return Bn(a,s,i)}async buildClaimRewardTokensRequest(t,a){if(1===this.chainId||5===this.chainId){if(!this.balancerMinterAddress)throw new Ma(e.BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED)}else if(!this.gaugeClaimHelperAddress)throw new Ma(e.BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED);const o=(await this.getClaimableRewardTokens(a)).filter((e=>t.map((e=>e.toLowerCase())).includes(e.address.toLowerCase()))).filter((e=>e.claimableTokens&&Object.keys(e.claimableTokens).length)),i=Array.from(new Set(o.map((e=>e.claimableTokens)).map((e=>Object.keys(e||{}))).flatMap((e=>e))));if(!i.length)throw new Ma(e.BalancerErrorCode.GAUGES_REWARD_TOKEN_EMPTY);const s=i.map((e=>o.reduce(((t,a)=>(a.claimableTokens&&a.claimableTokens[e]&&a.claimableTokens[e]!==vn&&(t=a.claimableTokens[e].add(t)),t)),n.BigNumber.from(0))));if(!s.length||s.every((e=>e.eq(vn))))throw new Ma(e.BalancerErrorCode.REWARD_TOKEN_ZERO);if(1===this.chainId||5===this.chainId){if(!this.balancerMinterAddress)throw new Ma(e.BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED);const n=Mn.encodeFunctionData("mintMany",[t]);return{to:this.balancerMinterAddress,from:a,callData:n,tokensOut:i,expectedTokensValue:s,functionName:"mintMany"}}{if(!this.gaugeClaimHelperAddress)throw new Ma(e.BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED);const n=Fn.encodeFunctionData("claimRewardsFromGauges",[t,a]);return{to:this.gaugeClaimHelperAddress,from:a,callData:n,tokensOut:i,expectedTokensValue:s,functionName:"claimRewardsFromGauges"}}}async getClaimableVeBalTokens(t,a){var n;if(!this.feeDistributor)throw new Ma(e.BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED);return null===(n=this.feeDistributor)||void 0===n?void 0:n.getClaimableBalances(t,a)}async buildClaimVeBalTokensRequest(t,a){if(!this.feeDistributor)throw new Ma(e.BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED);const n=await this.feeDistributor.getClaimableBalances(t,a),o=a.map((e=>{var t;return null!==(t=n[e])&&void 0!==t?t:vn}));if(o.every((e=>e.eq(vn))))throw new Ma(e.BalancerErrorCode.REWARD_TOKEN_ZERO);const i=this.feeDistributor.claimBalances(t,a);return{to:this.feeDistributor.feeDistributor.address,from:t,callData:i,tokensOut:a,expectedTokensValue:o,functionName:"claimTokens"}}async getGauges(){return await this.liquidityGauges.fetch()}getRewardTokens(e){return e.reduce(Cn,{})}async retrieveClaimableRewards(e,t){const a=Object.keys(e),{payload:o,paths:i}=this.getPayload(a,e,t),[,s]=await this.multicall.callStatic.aggregate(o),r=s.map((e=>"0x"==e?"0x0":e));return i.reduce((e=>(t,a,o)=>{var i;const s=n.BigNumber.from(`${e[o]}`);return s.gt(vn)&&(t[i=a.gauge]||(t[i]={}),t[a.gauge][a.token]=s),t})(r),{})}getPayload(e,t,a){const n=[],o=[];for(const i of e)for(const e of t[i])o.push({gauge:i,token:e}),n.push(this.getArguments(a,i,e));return{payload:n,paths:o}}getArguments(t,a,n){if(1===this.chainId||5===this.chainId)return{target:a,callData:On.encodeFunctionData("claimable_reward",[t,n])};if(!this.gaugeClaimHelperAddress)throw new Ma(e.BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED);return{target:this.gaugeClaimHelperAddress,callData:Fn.encodeFunctionData("getPendingRewards",[a,t,n])}}async retrieveClaimableTokens(t,a){if(this.chainId===e.Network.MAINNET||this.chainId===e.Network.GOERLI){const e=Ba[this.chainId].addresses.tokens.bal,o=t.map((e=>({target:e,callData:On.encodeFunctionData("claimable_tokens",[a])}))),[,i]=await this.multicall.callStatic.aggregate(o),s=i.map((e=>"0x"==e?"0x0":e));return t.reduce(((e,t)=>(a,o,i)=>{const s=n.BigNumber.from(`${e[i]}`);return s.gt(vn)&&(a[o]||(a[o]={}),a[o][t]=s),a})(s,e),{})}return{}}}async function Nn(e,t,n,o){const i={sender:a.AddressZero,recipient:a.AddressZero,fromInternalBalance:!1,toInternalBalance:!1};try{return(await e.callStatic.queryBatchSwap(t,n,o,i)).map((e=>e.toString()))}catch(e){throw`queryBatchSwap call error: ${e}`}}var Ln=function(){return Ln=Object.assign||function(e){for(var t,a=1,n=arguments.length;ae();function Zo(e,t=zo){return{PoolShare:(a,n)=>t((t=>e.request(Lo,a,{...n,...t})),"PoolShare","query"),PoolShares:(a,n)=>t((t=>e.request(Do,a,{...n,...t})),"PoolShares","query"),Pools:(a,n)=>t((t=>e.request(Uo,a,{...n,...t})),"Pools","query"),AllPools:(a,n)=>t((t=>e.request(Vo,a,{...n,...t})),"AllPools","query"),Pool:(a,n)=>t((t=>e.request(qo,a,{...n,...t})),"Pool","query"),PoolHistoricalLiquidities:(a,n)=>t((t=>e.request(Go,a,{...n,...t})),"PoolHistoricalLiquidities","query"),PoolSnapshots:(a,n)=>t((t=>e.request(Wo,a,{...n,...t})),"PoolSnapshots","query"),JoinExits:(a,n)=>t((t=>e.request(Ho,a,{...n,...t})),"JoinExits","query"),Balancers:(a,n)=>t((t=>e.request(Ko,a,{...n,...t})),"Balancers","query"),TokenPrices:(a,n)=>t((t=>e.request($o,a,{...n,...t})),"TokenPrices","query"),TokenLatestPrices:(a,n)=>t((t=>e.request(Jo,a,{...n,...t})),"TokenLatestPrices","query"),TokenLatestPrice:(a,n)=>t((t=>e.request(jo,a,{...n,...t})),"TokenLatestPrice","query"),User:(a,n)=>t((t=>e.request(Xo,a,{...n,...t})),"User","query"),Users:(a,n)=>t((t=>e.request(Yo,a,{...n,...t})),"Users","query")}}var Qo,ei,ti,ai,ni,oi,ii,si,ri,li,di,pi,ui,ci,yi,bi,mi,fi;!function(e){e.Arbitrum="Arbitrum",e.Avalanche="Avalanche",e.Base="Base",e.Gnosis="Gnosis",e.Optimism="Optimism",e.Polygon="Polygon",e.PolygonZkEvm="PolygonZkEvm"}(Qo||(Qo={})),function(e){e.gauges="gauges",e.id="id",e.numGauges="numGauges"}(ei||(ei={})),function(e){e.balance="balance",e.gauge="gauge",e.gauge__id="gauge__id",e.gauge__isKilled="gauge__isKilled",e.gauge__isPreferentialGauge="gauge__isPreferentialGauge",e.gauge__poolAddress="gauge__poolAddress",e.gauge__poolId="gauge__poolId",e.gauge__relativeWeightCap="gauge__relativeWeightCap",e.gauge__streamer="gauge__streamer",e.gauge__symbol="gauge__symbol",e.gauge__totalSupply="gauge__totalSupply",e.id="id",e.user="user",e.user__id="user__id"}(ti||(ti={})),function(e){e.id="id",e.name="name"}(ai||(ai={})),function(e){e.gauge="gauge",e.gauge__addedTimestamp="gauge__addedTimestamp",e.gauge__address="gauge__address",e.gauge__id="gauge__id",e.id="id",e.timestamp="timestamp",e.user="user",e.user__id="user__id",e.weight="weight"}(ni||(ni={})),function(e){e.addedTimestamp="addedTimestamp",e.address="address",e.id="id",e.liquidityGauge="liquidityGauge",e.liquidityGauge__id="liquidityGauge__id",e.liquidityGauge__isKilled="liquidityGauge__isKilled",e.liquidityGauge__isPreferentialGauge="liquidityGauge__isPreferentialGauge",e.liquidityGauge__poolAddress="liquidityGauge__poolAddress",e.liquidityGauge__poolId="liquidityGauge__poolId",e.liquidityGauge__relativeWeightCap="liquidityGauge__relativeWeightCap",e.liquidityGauge__streamer="liquidityGauge__streamer",e.liquidityGauge__symbol="liquidityGauge__symbol",e.liquidityGauge__totalSupply="liquidityGauge__totalSupply",e.rootGauge="rootGauge",e.rootGauge__chain="rootGauge__chain",e.rootGauge__id="rootGauge__id",e.rootGauge__isKilled="rootGauge__isKilled",e.rootGauge__recipient="rootGauge__recipient",e.rootGauge__relativeWeightCap="rootGauge__relativeWeightCap",e.type="type",e.type__id="type__id",e.type__name="type__name"}(oi||(oi={})),function(e){e.factory="factory",e.factory__id="factory__id",e.factory__numGauges="factory__numGauges",e.gauge="gauge",e.gauge__addedTimestamp="gauge__addedTimestamp",e.gauge__address="gauge__address",e.gauge__id="gauge__id",e.id="id",e.isKilled="isKilled",e.isPreferentialGauge="isPreferentialGauge",e.pool="pool",e.poolAddress="poolAddress",e.poolId="poolId",e.pool__address="pool__address",e.pool__id="pool__id",e.pool__poolId="pool__poolId",e.relativeWeightCap="relativeWeightCap",e.rewardTokensList="rewardTokensList",e.shares="shares",e.streamer="streamer",e.symbol="symbol",e.tokens="tokens",e.totalSupply="totalSupply"}(ii||(ii={})),function(e){e.bias="bias",e.id="id",e.slope="slope",e.timestamp="timestamp",e.user="user",e.user__id="user__id"}(si||(si={})),function(e){e.bias="bias",e.dstChainId="dstChainId",e.id="id",e.localUser="localUser",e.localUser__id="localUser__id",e.remoteUser="remoteUser",e.slope="slope",e.timestamp="timestamp",e.votingEscrowID="votingEscrowID",e.votingEscrowID__id="votingEscrowID__id",e.votingEscrowID__stakedSupply="votingEscrowID__stakedSupply"}(ri||(ri={})),function(e){e.asc="asc",e.desc="desc"}(li||(li={})),function(e){e.address="address",e.gauges="gauges",e.gaugesList="gaugesList",e.id="id",e.poolId="poolId",e.preferentialGauge="preferentialGauge",e.preferentialGauge__id="preferentialGauge__id",e.preferentialGauge__isKilled="preferentialGauge__isKilled",e.preferentialGauge__isPreferentialGauge="preferentialGauge__isPreferentialGauge",e.preferentialGauge__poolAddress="preferentialGauge__poolAddress",e.preferentialGauge__poolId="preferentialGauge__poolId",e.preferentialGauge__relativeWeightCap="preferentialGauge__relativeWeightCap",e.preferentialGauge__streamer="preferentialGauge__streamer",e.preferentialGauge__symbol="preferentialGauge__symbol",e.preferentialGauge__totalSupply="preferentialGauge__totalSupply"}(di||(di={})),function(e){e.decimals="decimals",e.gauge="gauge",e.gauge__id="gauge__id",e.gauge__isKilled="gauge__isKilled",e.gauge__isPreferentialGauge="gauge__isPreferentialGauge",e.gauge__poolAddress="gauge__poolAddress",e.gauge__poolId="gauge__poolId",e.gauge__relativeWeightCap="gauge__relativeWeightCap",e.gauge__streamer="gauge__streamer",e.gauge__symbol="gauge__symbol",e.gauge__totalSupply="gauge__totalSupply",e.id="id",e.periodFinish="periodFinish",e.rate="rate",e.symbol="symbol",e.totalDeposited="totalDeposited"}(pi||(pi={})),function(e){e.chain="chain",e.factory="factory",e.factory__id="factory__id",e.factory__numGauges="factory__numGauges",e.gauge="gauge",e.gauge__addedTimestamp="gauge__addedTimestamp",e.gauge__address="gauge__address",e.gauge__id="gauge__id",e.id="id",e.isKilled="isKilled",e.recipient="recipient",e.relativeWeightCap="relativeWeightCap"}(ui||(ui={})),function(e){e.factory="factory",e.factory__id="factory__id",e.factory__numGauges="factory__numGauges",e.gauge="gauge",e.gauge__addedTimestamp="gauge__addedTimestamp",e.gauge__address="gauge__address",e.gauge__id="gauge__id",e.id="id",e.isKilled="isKilled",e.recipient="recipient",e.relativeWeightCap="relativeWeightCap"}(ci||(ci={})),function(e){e.gaugeShares="gaugeShares",e.gaugeVotes="gaugeVotes",e.id="id",e.omniVotingLocks="omniVotingLocks",e.votingLocks="votingLocks"}(yi||(yi={})),function(e){e.bias="bias",e.id="id",e.lockedBalance="lockedBalance",e.slope="slope",e.timestamp="timestamp",e.unlockTime="unlockTime",e.updatedAt="updatedAt",e.user="user",e.user__id="user__id",e.votingEscrowID="votingEscrowID",e.votingEscrowID__id="votingEscrowID__id",e.votingEscrowID__stakedSupply="votingEscrowID__stakedSupply"}(bi||(bi={})),function(e){e.id="id",e.locks="locks",e.omniLocks="omniLocks",e.stakedSupply="stakedSupply"}(mi||(mi={})),function(e){e.allow="allow",e.deny="deny"}(fi||(fi={}));const Ti=vo` + fragment SubgraphGaugeShare on GaugeShare { + id + balance + user { + id + } + gauge { + id + isKilled + poolId + poolAddress + totalSupply + } +} + `,hi=vo` + fragment SubgraphLiquidityGauge on LiquidityGauge { + id + symbol + poolAddress + poolId + streamer + factory { + id + numGauges + } + totalSupply + tokens { + id + symbol + decimals + totalDeposited + rate + periodFinish + } +} + `,Ii=vo` + fragment SubgraphPoolWithPreferentialGauge on Pool { + id + poolId + preferentialGauge { + ...SubgraphLiquidityGauge + } +} + ${hi}`,gi=vo` + query GaugeShare($id: ID!, $block: Block_height) { + gaugeShare(id: $id, block: $block) { + ...SubgraphGaugeShare + } +} + ${Ti}`,_i=vo` + query GaugeShares($first: Int, $orderBy: GaugeShare_orderBy, $orderDirection: OrderDirection, $skip: Int, $where: GaugeShare_filter, $block: Block_height) { + gaugeShares( + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + skip: $skip + where: $where + block: $block + ) { + ...SubgraphGaugeShare + } +} + ${Ti}`,Pi=vo` + query LiquidityGauges($skip: Int, $first: Int, $orderBy: LiquidityGauge_orderBy, $orderDirection: OrderDirection, $where: LiquidityGauge_filter, $block: Block_height) { + liquidityGauges( + skip: $skip + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + where: $where + block: $block + ) { + ...SubgraphLiquidityGauge + } +} + ${hi}`,wi=vo` + query Pools($skip: Int, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter, $block: Block_height) { + pools( + skip: $skip + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + where: $where + block: $block + ) { + ...SubgraphPoolWithPreferentialGauge + } +} + ${Ii}`,xi=vo` + query PoolGauges($where: Pool_filter, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $skip: Int, $block: Block_height) { + pools( + where: $where + first: $first + orderBy: $orderBy + orderDirection: $orderDirection + skip: $skip + block: $block + ) { + gauges { + id + relativeWeightCap + } + preferentialGauge { + id + } + } +} + `,Ei=(e,t,a)=>e();function Ai(e){return Zo(new u.GraphQLClient(e))}function Si(e){return function(e,t=Ei){return{GaugeShare:(a,n)=>t((t=>e.request(gi,a,{...n,...t})),"GaugeShare","query"),GaugeShares:(a,n)=>t((t=>e.request(_i,a,{...n,...t})),"GaugeShares","query"),LiquidityGauges:(a,n)=>t((t=>e.request(Pi,a,{...n,...t})),"LiquidityGauges","query"),Pools:(a,n)=>t((t=>e.request(wi,a,{...n,...t})),"Pools","query"),PoolGauges:(a,n)=>t((t=>e.request(xi,a,{...n,...t})),"PoolGauges","query")}}(new u.GraphQLClient(e))}class vi{constructor(e,a,n={}){this.options=n,this.calls=[],this.paths=[],this.address="0xcA11bde05977b3631167028862bE2a173976CA11",this.interface=new t.Interface(e),this.multicall=oa.connect(this.address,a)}call(e,t,a,n){return this.calls.push([t,a,n]),this.paths.push(e),this}async execute(e={},t=1024){const a=e;return(await this.executeMulticall(t)).forEach(((e,t)=>r.set(a,this.paths[t],e.length>1?e:e[0]))),this.calls=[],this.paths=[],a}async executeMulticall(e){const t=Math.ceil(this.calls.length/e),a=[],n=[];for(let a=0;a({target:e,allowFailure:!0,callData:this.interface.encodeFunctionData(t,a)})));n.push(this.multicall.callStatic.aggregate3(t,this.options))}return(await Promise.all(n)).forEach(((t,n)=>{const o=n*e;for(let e=0;e{a.call(`${e}.weights`,t,"getNormalizedWeights")},Ci=(e,t,a)=>{a.call(`${e}.targets`,t,"getTargets"),a.call(`${e}.wrappedTokenRate`,t,"getWrappedTokenRate")},Oi=(e,t,a)=>{a.call(`${e}.amp`,t,"getAmplificationParameter")},Mi=(e,t,a)=>{a.call(`${e}.tokenRates`,t,"getTokenRates")},Fi=async(e,t,a,n=1024)=>{if(0===e.length)return{};const o=new vi(ki,a);e.forEach((({id:e,address:a,poolType:n,poolTypeVersion:i})=>{((e,t,a,n,o)=>{o.call(`${e}.poolTokens`,a,"getPoolTokens",[e]),o.call(`${e}.totalShares`,t,(e=>e.includes("Linear")||["StablePhantom"].includes(e)?"getVirtualSupply":"ComposableStable"===e?"getActualSupply":"totalSupply")(n)),o.call(`${e}.swapFee`,t,(e=>"Element"===e?"percentFee":"FX"===e?"protocolPercentFee":"getSwapFeePercentage")(n))})(e,a,t,n,o),((e,t=1)=>{const a=()=>({});switch(e){case"Weighted":case"LiquidityBootstrapping":case"Investment":return Bi;case"Stable":case"StablePhantom":case"MetaStable":case"ComposableStable":return Oi;case"GyroE":case"Gyro2":return 2===t?Mi:a;case"AaveLinear":return 1===t?Ci:a;default:return a}})(n,i)(e,a,o)}));return await o.execute({},n)};async function Ri(e,t,a,o,i=1024){if(0===e.length)return e;const s=[],r=await Fi(e,a,o,i);return e.forEach((e=>{const t=r[e.id];s.push(((e,t)=>({...e,tokens:t.poolTokens?e.tokens.map((a=>{const o=t.poolTokens[0].map((e=>e.toLowerCase())).indexOf(a.address),i=e.wrappedIndex&&e.tokensList[e.wrappedIndex],s=void 0===a.decimals?18:a.decimals;return{...a,balance:n.formatFixed(t.poolTokens[1][o],s),weight:t.weights&&n.formatFixed(t.weights[o],18)||a.weight,priceRate:t.wrappedTokenRate&&i&&i.toLowerCase()===a.address.toLowerCase()&&n.formatFixed(t.wrappedTokenRate,18)||a.priceRate}})):e.tokens,totalShares:t.totalShares?n.formatFixed(t.totalShares,18):e.totalShares,swapFee:t.swapFee?n.formatFixed(t.swapFee,18):e.swapFee,amp:t.amp&&t.amp[0]&&n.formatFixed(t.amp[0],String(t.amp[2]).length-1)||e.amp,lowerTarget:t.targets&&n.formatFixed(t.targets[0],18)||e.lowerTarget,upperTarget:t.targets&&n.formatFixed(t.targets[1],18)||e.upperTarget,tokenRates:t.tokenRates&&t.tokenRates.map((e=>n.formatFixed(e,18)))||e.tokenRates}))(e,t))})),s}class Ni{constructor(e,t,a,n,o){this.client=e,this.provider=t,this.network=a,this.sorConfig=n,this.defaultArgs=(null==o?void 0:o.args)||{orderBy:mo.TotalLiquidity,orderDirection:lo.Desc,where:{swapEnabled:{eq:!0},totalShares:{gt:1e-12}}}}async getPools(e){const t=function(e){return e.map((e=>({...e,poolType:e.poolType||"",tokens:(e.tokens||[]).map((e=>({...e,weight:e.weight||null}))),totalWeight:e.totalWeight||void 0,amp:e.amp||void 0,expiryTime:e.expiryTime?r.parseInt(e.expiryTime):void 0,unitSeconds:e.unitSeconds?r.parseInt(e.unitSeconds):void 0,principalToken:e.principalToken||void 0,baseToken:e.baseToken||void 0})))}((await this.getSubgraphPools(e)).filter((e=>{if(!this.network.poolsToIgnore)return!0;return-1===this.network.poolsToIgnore.findIndex((t=>t.toLowerCase()===e.id.toLowerCase()))})));if(this.sorConfig&&!1===this.sorConfig.fetchOnChainBalances)return t;const a=X.getInstance();a.time(`fetching on-chain balances for ${t.length} pools`);const n=await Ri(t,this.network.addresses.contracts.multicall,this.network.addresses.contracts.vault,this.provider,this.network.multicallBatchSize);return a.timeEnd(`fetching on-chain balances for ${t.length} pools`),n}async getSubgraphPools(e){const t=new ot(e||this.defaultArgs).format(new nt);if(t.first){const{pools:e}=await this.client.Pools(t);return e}const{pool0:a,pool1000:n,pool2000:o}=await this.client.AllPools(t);return[...a,...n,...o]}}class Li{constructor(e,t){this.client=e,this.weth=t.toLowerCase()}async getNativeAssetPriceInToken(e){const t=await this.getLatestPriceInEthFromSubgraph(e);if(!t)throw Error("No price found in the subgraph");return""+1/t}async getLatestPriceInEthFromSubgraph(e){e=e.toLowerCase();const{latestPrices:t}=await this.client.TokenLatestPrices({where:{asset_in:[e,this.weth]}}),a=r.keyBy(t,"id");if(a[`${e}-${this.weth}`])return parseFloat(a[`${e}-${this.weth}`].price);const n=t.filter((t=>t.asset===e));for(const e of n){const t=a[`${e.pricingAsset}-${this.weth}`];if(t)return parseFloat(e.price)*parseFloat(t.price)}return null}}function Di(e){var t,a;if("number"==typeof e.network){const a=Ba[e.network];return{...a,urls:{...a.urls,subgraph:null!==(t=e.customSubgraphUrl)&&void 0!==t?t:a.urls.subgraph},tenderly:e.tenderly}}return{...e.network,urls:{...e.network.urls,subgraph:null!==(a=e.customSubgraphUrl)&&void 0!==a?a:e.network.urls.subgraph},tenderly:e.network.tenderly}}const Ui=["0x00c2a4be503869fa751c2dbcb7156cc970b5a8da000000000000000000000477","0x02d928e68d8f10c0358566152677db51e1e2dc8c00000000000000000000051e","0x04248aabca09e9a1a3d5129a7ba05b7f17de768400000000000000000000050e","0x05513ca725b6ce035ca2641075474eb469f05f4c00020000000000000000041f","0x0a0fb4ff697de5ac5b6770cd8ee1b72af80b57cf000000000000000000000496","0x0afbd58beca09545e4fb67772faf3858e610bcd00000000000000000000004b9","0x0d05aac44ac7dd3c7ba5d50be93eb884a057d23400000000000000000000051c","0x11839d635e2f0270da37e8ef4324d4d5d54329570002000000000000000004d8","0x126e7643235ec0ab9c103c507642dc3f4ca23c66000000000000000000000468","0x133d241f225750d2c92948e464a5a80111920331000000000000000000000476","0x159cb00338fb63f263fd6f621df619cef71da9540000000000000000000004d5","0x173063a30e095313eee39411f07e95a8a806014e0002000000000000000003ab","0x1bd2f176a812e312077bca87e37c08432bb09f3e0000000000000000000005a1","0x20b156776114e8a801e9767d90c6ccccc8adf398000000000000000000000499","0x246ffb4d928e394a02e45761fecdba6c2e79b8eb000000000000000000000541","0x25accb7943fd73dda5e23ba6329085a3c24bfb6a000200000000000000000387","0x26c2b83fc8535deead276f5cc3ad9c1a2192e02700020000000000000000056b","0x2b218683178d029bab6c9789b1073aa6c96e517600000000000000000000058c","0x2ba7aa2213fa2c909cd9e46fed5a0059542b36b00000000000000000000003a3","0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c0000000000000000000000fd","0x2e52c64fd319e380cdbcfc4577ea1fda558a32e40002000000000000000005ba","0x2f4eb100552ef93840d5adc30560e5513dfffacb000000000000000000000334","0x2ff1a9dbdacd55297452cfd8a4d94724bc22a5f7000000000000000000000484","0x3035917be42af437cbdd774be26b9ec90a2bd677000200000000000000000543","0x331d50e0b00fc1c32742f151e56b9b616227e23e00000000000000000000047c","0x334c96d792e4b26b841d28f53235281cec1be1f200020000000000000000038a","0x335d1709d4da9aca59d16328db5cd4ea66bfe06b0000000000000000000004d6","0x395d8a1d9ad82b5abe558f8abbfe183b27138af40000000000000000000004e5","0x3bb22fc9033b802f2ac47c18885f63476f158afc000000000000000000000483","0x3c640f0d3036ad85afa2d5a9e32be651657b874f00000000000000000000046b","0x3cdae4f12a67ba563499e102f309c73213cb241c000000000000000000000335","0x3dbb8d974b82e82ce79c20c0f5995f4f1f533ede000000000000000000000470","0x3f7a7fd7f214be45ec26820fd01ac3be4fc75aa70002000000000000000004c5","0x3fcb7085b8f2f473f80bf6d879cae99ea4de934400000000000000000000056d","0x41503c9d499ddbd1dcdf818a1b05e9774203bf46000000000000000000000594","0x4228290ee9cab692938ff0b4ba303fbcdb68e9f200020000000000000000057d","0x454ed96955d04d2f5cdd05e0fd1c77975bfe5307000000000000000000000410","0x481c5fc05d63a58aa2f0f2aa417c021b5d419cb200000000000000000000056a","0x483006684f422a9448023b2382615c57c5ecf18f000000000000000000000488","0x4a82b580365cff9b146281ab72500957a849abdc000000000000000000000494","0x4c81255cc9ed7062180ea99962fe05ac0d57350b0000000000000000000005a3","0x4c8d2e60863e8d7e1033eda2b3d84e92a641802000000000000000000000040f","0x4cbde5c4b4b53ebe4af4adb85404725985406163000000000000000000000595","0x4ce0bd7debf13434d3ae127430e9bd4291bfb61f00020000000000000000038b","0x4ce277df0feb5b4d07a0ca2adcf5326e4005239d000000000000000000000518","0x4fd4687ec38220f805b6363c3c1e52d0df3b5023000200000000000000000473","0x4fd63966879300cafafbb35d157dc5229278ed230000000000000000000000e9","0x50cf90b954958480b8df7958a9e965752f62712400000000000000000000046f","0x53bc3cba3832ebecbfa002c12023f8ab1aa3a3a0000000000000000000000411","0x5a6a8cffb4347ff7fc484bf5f0f8a2e234d34255000200000000000000000275","0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b","0x60683b05e9a39e3509d8fdb9c959f23170f8a0fa000000000000000000000489","0x60d604890feaa0b5460b28a424407c24fe89374a0000000000000000000004fc","0x639883476960a23b38579acfd7d71561a0f408cf000200000000000000000505","0x652d486b80c461c397b0d95612a404da936f3db30000000000000000000000e7","0x6667c6fa9f2b3fc1cc8d85320b62703d938e43850000000000000000000004fb","0x6a1eb2e9b45e772f55bd9a34659a04b6f75da68700000000000000000000040d","0x6c56e72c551b5ac4bf54a620a76077ca768c8fe40002000000000000000004da","0x70b7d3b3209a59fb0400e17f67f3ee8c37363f4900020000000000000000018f","0x7337224d59cb16c2dc6938cd45a7b2c60c865d6a0000000000000000000004d4","0x74cbfaf94a3577c539a9dcee9870a6349a33b34f000000000000000000000534","0x779d01f939d78a918a3de18cc236ee89221dfd4e0000000000000000000004c7","0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe","0x804cdb9116a10bb78768d3252355a1b18067bf8f0000000000000000000000fb","0x813e3fe1761f714c502d1d2d3a7cceb33f37f59d00000000000000000000040c","0x82698aecc9e28e9bb27608bd52cf57f704bd1b83000000000000000000000336","0x8a6b25e33b12d1bb6929a8793961076bd1f9d3eb0002000000000000000003e8","0x8e6ec57a822c2f527f2df7c7d7d361df3e7530a1000000000000000000000498","0x8f4063446f5011bc1c9f79a819efe87776f23704000000000000000000000197","0x9001cbbd96f54a658ff4e6e65ab564ded76a543100000000000000000000050a","0x9210f1204b5a24742eba12f710636d76240df3d00000000000000000000000fc","0x9516a2d25958edb8da246a320f2c7d94a0dbe25d000000000000000000000519","0x959216bb492b2efa72b15b7aacea5b5c984c3cca000200000000000000000472","0x968024662b9566b42d78af23a0f441bc8723fa83000200000000000000000418","0x99c88ad7dc566616548adde8ed3effa730eb6c3400000000000000000000049a","0x9b1c8407a360443a9e5eca004713e4088fab8ac0000000000000000000000497","0x9b692f571b256140a39a34676bffa30634c586e100000000000000000000059d","0x9d7f992c900fbea0ec314bdd71b7cc1becf76a33000200000000000000000573","0x9fb771d530b0ceba5160f7bfe2dd1e8b8aa1340300000000000000000000040e","0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d","0xa1697f9af0875b63ddc472d6eebada8c1fab85680000000000000000000004f9","0xa3823e50f20982656557a4a6a9c06ba5467ae9080000000000000000000000e6","0xa718042e5622099e5f0ace4e7122058ab39e1bbe000200000000000000000475","0xa8b103a10a94f4f2d7ed2fdcd5545e807557330700000000000000000000048e","0xac5b4ef7ede2f2843a704e96dcaa637f4ba3dc3f00000000000000000000051d","0xac976bb42cb0c85635644e8c7c74d0e0286aa61c0000000000000000000003cb","0xae37d54ae477268b9997d4161b96b8200755935c000000000000000000000337","0xae8535c23afedda9304b03c68a3563b75fc8f92b0000000000000000000005a0","0xb0f75e97a114a4eb4a425edc48990e6760726709000000000000000000000198","0xb5e3de837f869b0248825e0175da73d4e8c3db6b000200000000000000000474","0xb841b062ea8ccf5c4cb78032e91de4ae875560420002000000000000000005b7","0xb9bd68a77ccf8314c0dfe51bc291c77590c4e9e6000200000000000000000385","0xbb6881874825e60e1160416d6c426eae65f2459e000000000000000000000592","0xbc0f2372008005471874e426e86ccfae7b4de79d000000000000000000000485","0xbf2ef8bdc2fc0f3203b3a01778e3ec5009aeef3300000000000000000000058d","0xbfa413a2ff0f20456d57b643746133f54bfe0cd20000000000000000000004c3","0xc2b021133d1b0cf07dba696fd5dd89338428225b000000000000000000000598","0xc443c15033fcb6cf72cc24f1bda0db070ddd9786000000000000000000000593","0xc50d4347209f285247bda8a09fc1c12ce42031c3000000000000000000000590","0xc5dc1316ab670a2eed5716d7f19ced321191f38200000000000000000000056e","0xc8c79fcd0e859e7ec81118e91ce8e4379a481ee6000000000000000000000196","0xcaa052584b462198a5a9356c28bce0634d65f65c0000000000000000000004db","0xcbfa4532d8b2ade2c261d3dd5ef2a2284f7926920000000000000000000004fa","0xcfae6e251369467f465f13836ac8135bd42f8a56000000000000000000000591","0xd4e7c1f3da1144c9e2cfd1b015eda7652b4a439900000000000000000000046a","0xd6e355036f41dc261b3f1ed3bbc6003e87aadb4f000000000000000000000495","0xd7edb56f63b2a0191742aea32df1f98ca81ed9c600000000000000000000058e","0xd997f35c9b1281b82c8928039d14cddab5e13c2000000000000000000000019c","0xdba274b4d04097b90a72b62467d828cefd708037000000000000000000000486","0xdc063deafce952160ec112fa382ac206305657e60000000000000000000004c4","0xdec02e6642e2c999af429f5ce944653cad15e093000000000000000000000469","0xe03af00fabe8401560c1ff7d242d622a5b601573000000000000000000000493","0xe0fcbf4d98f0ad982db260f86cf28b49845403c5000000000000000000000504","0xe2d16b0a39f3fbb4389a0e8f1efcbecfb3d1e6e10000000000000000000005a7","0xe4dc3c1998ac693d68f4c77476d7c815694c3e94000200000000000000000416","0xe6bcc79f328eec93d4ec8f7ed35534d9ab549faa0000000000000000000000e8","0xe8c56405bc405840154d9b572927f4197d110de10000000000000000000005a4","0xeb486af868aeb3b6e53066abc9623b1041b42bc000000000000000000000046c","0xeb567dde03f3da7fe185bdacd5ab495ab220769d000000000000000000000548","0xec3626fee40ef95e7c0cbb1d495c8b67b34d398300000000000000000000053d","0xf22ff21e17157340575158ad7394e068048dd98b0000000000000000000004b8","0xf57c794f42da72b38c8f610ff3b5e8502e48cbde00000000000000000000055c","0xf71d0774b214c4cf51e33eb3d30ef98132e4dbaa00000000000000000000046e","0xfa24a90a3f2bbe5feea92b95cd0d14ce709649f900000000000000000000058f","0xfd11ccdbdb7ab91cb9427a6d6bf570c95876d1950000000000000000000004c2","0xfebb0bbf162e64fb9d0dfe186e517d84c395f016000000000000000000000502","0xfef969638c52899f91781f1be594af6f40b99bad00000000000000000000047b","0x02e139d53ebf4033bf78ab66c6a1e7f1f204487f0002000000000000000009f9","0x03090a9811181a2afe830a3a0b467698ccf3a8b1000000000000000000000bf5","0x0320c1c5b6df19a194d48882aaec1c72940081d9000000000000000000000a7d","0x04b54ea92d73de2d62d651db7d9778f0c49157d8000200000000000000000ba2","0x0503dd6b2d3dd463c9bef67fb5156870af63393e00000000000000000000042e","0x0889b240a5876aae745ac19f1771853671dc5d36000000000000000000000b3f","0x0bc54e914f53f98d16035f4f0d948f3e09c2fac0000200000000000000000bac","0x0c06e87c7b88d998f645b91c1f53b51294b12bca000100000000000000000bb9","0x10b040038f87219d9b42e025e3bd9b8095c87dd9000000000000000000000b11","0x117a3d474976274b37b7b94af5dcade5c90c6e85000000000000000000000aca","0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000a5f","0x1379b816b9be611431d693290289c204720ca56d000100000000000000000b6f","0x150e7b885bdfce974f2abe88a72fdbd692175c6f0002000000000000000009fd","0x178e029173417b1f9c8bc16dcec6f697bc323746000000000000000000000758","0x1aafc31091d93c3ff003cff5d2d8f7ba2e7284250000000000000000000003b3","0x216690738aac4aa0c4770253ca26a28f0115c595000000000000000000000b2c","0x216d6db0c28204014618482c369d7fbf0a8f3232000100000000000000000b60","0x230ecdb2a7cee56d6889965a023aa0473d6da507000000000000000000000bf3","0x252ff6a3a6fd7b5e8e999de8e3f5c3b306ed1401000200000000000000000bec","0x25e57f4612912614e6c99616bd2abb9b5ae71e99000000000000000000000bf0","0x2645b13fd2c5295296e94a76280b968bdcbbdfed000000000000000000000c11","0x284eb68520c8fa83361c1a3a5910aec7f873c18b000000000000000000000ac9","0x2c8dbe8eb86135d9f2f26d196748c088d47f73e7000200000000000000000a29","0x31bccf9e28b94e5dacebaa67fe8bc1603cecd904000000000000000000000a01","0x341068a547c3cde3c09e338714010dd01b32f93f000200000000000000000a34","0x3db543faf7a92052de7860c5c9debabee59ed5bd000000000000000000000a62","0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd00000000000000000000070d","0x3efb91c4f9b103ee45885695c67794591916f34e000200000000000000000b43","0x402cfdb7781fa85d52f425352661128250b79e12000000000000000000000be3","0x43894de14462b421372bcfe445fa51b1b4a0ff3d000000000000000000000b36","0x4739e50b59b552d490d3fdc60d200977a38510c0000000000000000000000b10","0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b","0x4a0b73f0d13ff6d43e304a174697e3d5cfd310a400020000000000000000091c","0x4a77ef015ddcd972fd9ba2c7d5d658689d090f1a000000000000000000000b38","0x4ae3661afa119892f0cc8c43edaf6a94989ac171000000000000000000000c06","0x4ccb966d8246240afb7a1a24628efb930870b1c40002000000000000000009fc","0x52cc8389c6b93d740325729cc7c958066cee4262000000000000000000000b0f","0x5b77107fcdf2b41903bab2bc555d4fc14cf7667d000000000000000000000b32","0x5bae72b75caab1f260d21bc028c630140607d6e8000000000000000000000ac6","0x600bd01b6526611079e12e1ff93aba7a3e34226f0000000000000000000009e4","0x63ce19ccd39930725b8a3d2733627804718ab83d000000000000000000000bf2","0x64efad69f099813021b41f4cac6e749fd55e188f000000000000000000000b39","0x6933ec1ca55c06a894107860c92acdfd2dd8512f000000000000000000000428","0x6abe4e7a497b8293c258389c1b00d177e4f257ed00010000000000000000080d","0x6c8c7fc50247a47038015eb1fd5dc105d05dafba000200000000000000000ba0","0x7079a25dec33be61bbd81b2fb69b468e80d3e72c0000000000000000000009ff","0x71bd10c2a590b5858f5576550c163976a48af906000000000000000000000b27","0x7c82a23b4c48d796dee36a9ca215b641c6a8709d000000000000000000000acd","0x7f4f4942f2a14b6ab7b08b10ada1aacede4ee8d4000200000000000000000b44","0x86aef31951e0a3a54333bd9e72f9a95587d058c5000200000000000000000912","0x882c7a84231484b3e9f3fd45ac04b1eb5d35b076000200000000000000000a91","0x894c82800526e0391e709c0983a5aea3718b7f6d000000000000000000000ac5","0x89b28a9494589b09dbccb69911c189f74fdadc5a000000000000000000000b33","0x89bb15076c9f2d86aa98ec6cffc1a71e31c38953000000000000000000000bf1","0x89f1146fee52b5d9166e9c83cc388b6d8f69f1380001000000000000000009e7","0x8a819a4cabd6efcb4e5504fe8679a1abd831dd8f00000000000000000000042d","0x8b58a1e7fff52001c22386c2918d45938a6a9be30001000000000000000008d9","0x8b8225bfedebaf1708c55743acb4ad43fd4d0f21000200000000000000000918","0x8fbd0f8e490735cfc3abf4f29cbddd5c3289b9a7000000000000000000000b5b","0x8fd39252d683fdb60bddd4df4b53c9380b496d59000200000000000000000b45","0x9321e2250767d79bab5aa06daa8606a2b3b7b4c5000000000000000000000bf4","0x949a12b95ec5b80c375b98963a5d6b33b0d0efff0002000000000000000009fe","0x9a020bdc2faff5bd24c6acc2020d01ff9f2c627a000000000000000000000ae2","0x9cf9358300e34bf9373d30129a1e718d8d058b54000200000000000000000913","0x9e34631547adcf2f8cefa0f5f223955c7b137571000000000000000000000ad5","0xa5a935833f6a5312715f182733eab088452335d7000100000000000000000bee","0xa5fe91dde37d8bf2dacacc0168b115d28ed03f84000000000000000000000b35","0xa8bf1c584519be0184311c48adbdc4c15cb2e8c1000000000000000000000bf6","0xab269164a10fab22bc87c39946da06c870b172d6000000000000000000000bfc","0xac2cae8d2f78a4a8f92f20dbe74042cd0a8d5af3000000000000000000000be2","0xae646817e458c0be890b81e8d880206710e3c44e000000000000000000000acb","0xaef2c171dbe64b0c18977e16e70bfd29d4ee0256000000000000000000000ac8","0xb0c830dceb4ef55a60192472c20c8bf19df03488000000000000000000000be1","0xb266ac3b7c98d7bcb28731dac0ef42dba1b276be000000000000000000000be4","0xb371aa09f5a110ab69b39a84b5469d29f9b22b76000000000000000000000b37","0xb3d658d5b95bf04e2932370dd1ff976fe18dd66a000000000000000000000ace","0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e","0xb59be8f3c85a9dd6e2899103b6fbf6ea405b99a4000000000000000000000b34","0xb878ecce26838fbba4f78cb5b791a0e09152c067000000000000000000000427","0xb973ca96a3f0d61045f53255e319aedb6ed4924000000000000000000000042f","0xbd4e35784c832d0f9049b54cb3609e5907c5b495000100000000000000000b14","0xc55ec796a4debe625d95436a3531f4950b11bdcf000000000000000000000b3e","0xc7e6389e364f4275eb442ef215ed21877028e2af000000000000000000000ac7","0xc83b55bbd005f1f84906545fcdb145dee53523e0000200000000000000000b30","0xcb21a9e647c95127ed784626485b3104cb28d0e7000000000000000000000425","0xd00f9ca46ce0e4a63067c4657986f0167b0de1e5000000000000000000000b42","0xd2f3b9e67c69762dd1c88f1d3dadd1649a190761000200000000000000000bf7","0xd4accb350f9cf59fe3cf7a5ee6ed9ace6a568ea9000200000000000000000b75","0xda1cd1711743e57dd57102e9e61b75f3587703da000000000000000000000acc","0xdae301690004946424e41051ace1791083be42a1000000000000000000000b40","0xde0a77ab6689b980c30306b10f9131a007e1af81000200000000000000000ba1","0xe051605a83deae38d26a7346b100ef1ac2ef8a0b0000000000000000000003ce","0xe1fb90d0d3b47e551d494d7ebe8f209753526b01000000000000000000000ac4","0xe2272cddb2cc408e79e02a73d1db9acc24a843d5000200000000000000000ba7","0xe2dc0e0f2c358d6e31836dee69a558ab8d1390e70000000000000000000009fa","0xe4885ed2818cc9e840a25f94f9b2a28169d1aea7000000000000000000000b29","0xe6909c2f18a29d97217a6146f045e1780606991f000100000000000000000bfe","0xe78b25c06db117fdf8f98583cdaaa6c92b79e917000000000000000000000b2b","0xea11645ac7d8f2def94c9d8d86bd766296c9b6b6000000000000000000000b3a","0xeb480dbbdd921cd6c359e4cc4c65ddea6395e2a1000200000000000000000946","0xed35f28f837e96f81240ebb82e0e3f518c7e8a2f000100000000000000000bb5","0xf0211cceebe6fcc45052b4e57ee95d233f5669d2000100000000000000000c01","0xf22a66046b5307842f21b311ecb4c462c24c0635000000000000000000000b15","0xf28f17be00f8ca3c9b7f66a4aad5513757fb3341000200000000000000000b5a","0xf42ed61450458ee4620f5ef4f29adb25a6ef0fb6000000000000000000000bf8","0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56000000000000000000000445","0xf93579002dbe8046c43fefe86ec78b1112247bb8000000000000000000000759","0xf984eb2b8a7ef780245a797a2fccd82f346409ca000000000000000000000a59","0xfa2c0bd8327c99db5bde4c9e9e5cbf30946351bb000000000000000000000948","0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea600000000000000000000075a","0x1ac55c31dac78ca943cb8ebfca5945ce09e036e2000000000000000000000024","0x225e0047671939a8d78e08ebd692788abe63f15c000000000000000000000009","0x41211bba6d37f5a74b22e667533f080c7c7f3f1300000000000000000000000b","0x4de21b365d6543661d0e105e579a34b963862497000200000000000000000045","0x581ec1f5e7ced12b186deae32256adb53bdd5b08000000000000000000000001","0x66f33ae36dd80327744207a48122f874634b3ada000100000000000000000013","0xa3ed6f78edc29f69df8a0d16b1d1ccf9871f918c000000000000000000000032","0xa611a551b95b205ccd9490657acf7899daee5db700000000000000000000002e","0xb95829adbacd8af89e291dee78bc09e24de51d6b000000000000000000000043","0xb973ca96a3f0d61045f53255e319aedb6ed49240000200000000000000000011","0xba1a5b19d09a79dada039b1f974015c5a989d5fd000100000000000000000046","0xbb9cd48d33033f5effbedec9dd700c7d7e1dcf5000000000000000000000000e","0xd16f72b02da5f51231fde542a8b9e2777a478c8800000000000000000000000f","0xd4015683b8153666190e0b2bec352580ebc4caca00000000000000000000000d","0xe15cac1df3621e001f76210ab12a7f1a1691481f000000000000000000000044","0xe7f88d7d4ef2eb18fcf9dd7216ba7da1c46f3dd600000000000000000000000a","0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56000200000000000000000012","0xfedb19ec000d38d92af4b21436870f115db22725000000000000000000000010","0xffff76a3280e95dc855696111c2562da09db2ac000000000000000000000000c","0x00fcd3d55085e998e291a0005cedecf58ac14c4000020000000000000000047f","0x077794c30afeccdf5ad2abc0588e8cee7197b71a000000000000000000000352","0x117a3d474976274b37b7b94af5dcade5c90c6e85000000000000000000000381","0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000353","0x19b1c92631405a0a9495ccba0becf4f2e8e908bd000000000000000000000410","0x1e550b7764da9638fdd32c8a701364de31f45ee800000000000000000000047c","0x1fa7f727934226aedab636d62a084931b97d366b000000000000000000000411","0x23ca0306b21ea71552b148cf3c4db4fc85ae19290000000000000000000000c9","0x284eb68520c8fa83361c1a3a5910aec7f873c18b000000000000000000000380","0x2a96254ca32020b20ed3506f8f75318da24709f9000200000000000000000456","0x36942963e3b6f37ecc45a4e72349558514233f0000000000000000000000048a","0x3f53a862919ccfa023cb6ace91378a79fb0f6bf500000000000000000000040f","0x40af308e3d07ec769d85eb80afb116525ff4ac99000000000000000000000485","0x418de00ae109e6f874d872658767866d680eaa1900000000000000000000047d","0x45c4d1376943ab28802b995acffc04903eb5223f000000000000000000000470","0x4689122d360c4725d244c5cfea22861333d862e6000100000000000000000468","0x4739e50b59b552d490d3fdc60d200977a38510c0000000000000000000000409","0x49a0e3334496442a9706e481617724e7e37eaa080000000000000000000003ff","0x519cce718fcd11ac09194cff4517f12d263be067000000000000000000000382","0x52cc8389c6b93d740325729cc7c958066cee4262000000000000000000000408","0x567ecfcb22205d279bb8eed3e066989902bf03d5000000000000000000000452","0x585d95df0231fa08aeee35ff0c16b92fd0ecdc3300020000000000000000045f","0x5a7f39435fd9c381e4932fa2047c9a5136a5e3e7000000000000000000000400","0x5bae72b75caab1f260d21bc028c630140607d6e8000000000000000000000350","0x6cb787a419c3e6ee2e9ff365856c29cd10659113000000000000000000000474","0x7c82a23b4c48d796dee36a9ca215b641c6a8709d000000000000000000000406","0x81fc12c60ee5b753cf5fd0adc342dfb5f3817e3200000000000000000000035d","0x894c82800526e0391e709c0983a5aea3718b7f6d00000000000000000000034f","0x970712708a08e8fb152be4d81b2dc586923f5369000200000000000000000479","0x9bf7c3b63c77b4b4f2717776f15a4bec1b532a280000000000000000000000c8","0x9cebf13bb702f253abf1579294694a1edad00eaa000000000000000000000486","0x9e34631547adcf2f8cefa0f5f223955c7b137571000000000000000000000407","0x9fb7d6dcac7b6aa20108bad226c35b85a9e31b63000200000000000000000412","0xa1ea76c42b2938cfa9abea12357881006c52851300000000000000000000048f","0xa50f89e9f439fde2a6fe05883721a00475da3c4500000000000000000000048b","0xa612b6aed2e7ca1a3a4f23fbca9128461bbb7718000000000000000000000274","0xa8af146d79ac0bb981e4e0d8b788ec5711b1d5d000000000000000000000047b","0xad28940024117b442a9efb6d0f25c8b59e1c950b00000000000000000000046f","0xae646817e458c0be890b81e8d880206710e3c44e00000000000000000000039d","0xaef2c171dbe64b0c18977e16e70bfd29d4ee0256000000000000000000000351","0xbbf9d705b75f408cfcaee91da32966124d2c6f7d00000000000000000000047e","0xbd724eb087d4cc0f61a5fed1fffaf937937e14de000000000000000000000473","0xbe0f30217be1e981add883848d0773a86d2d2cd4000000000000000000000471","0xc46be4b8bb6b5a3d3120660efae9c5416318ed40000000000000000000000472","0xc69771058481551261709d8db44977e9afde645000010000000000000000042a","0xc6eee8cb7643ec2f05f46d569e9ec8ef8b41b389000000000000000000000475","0xcba9ff45cfb9ce238afde32b0148eb82cbe635620000000000000000000003fd","0xcf8b555b7754556cf2ac2165e77ee23ed8517d7900020000000000000000045e","0xd0dc20e6342db2de82692b8dc842301ff9121805000200000000000000000454","0xd3d5d45f4edf82ba0dfaf061d230766032a10e07000200000000000000000413","0xd6d20527c7b0669989ee082b9d3a1c63af742290000000000000000000000483","0xda1cd1711743e57dd57102e9e61b75f3587703da0000000000000000000003fc","0xe1fb90d0d3b47e551d494d7ebe8f209753526b0100000000000000000000034e","0xee02583596aee94cccb7e8ccd3921d955f17982a00000000000000000000040a","0xf984eb2b8a7ef780245a797a2fccd82f346409ca00000000000000000000034d","0xff8f84e8c87532af96aef5582ee451572233678b000200000000000000000478","0x054e7b0c73e1ee5aed6864fa511658fc2b54bcaa000000000000000000000015","0x3f1a2c4a3a751f6626bd90ef16e104f0772d4d6b00020000000000000000001b","0x7275c131b1f67e8b53b4691f92b0e35a4c1c6e22000000000000000000000010","0xa154009870e9b6431305f19b09f9cfd7284d4e7a000000000000000000000013","0xa1d14d922a575232066520eda11e27760946c991000000000000000000000012","0xa826a114b0c7db4d1ff4a4be845a78998c64564c000000000000000000000008","0xea67626e1f0b59e0d172a04f5702ef90bcdf440c00000000000000000000000f","0xeb496161099d45b3ea4892408ef745c6182eb56e00000000000000000000000e","0xece571847897fd61e764d455dc15cf1cd9de8d6f000000000000000000000014","0xed3e2f496cbcd8e212192fb8d1499842f04a0d19000000000000000000000009","0x02c9dcb975262719a61f9b40bdf0987ead9add3a000000000000000000000006","0x16c9a4d841e88e52b51936106010f27085a529ec00000000000000000000000c","0x32be2d0ddeaf3333501b24a28668ce373ba8e763000200000000000000000014","0x32f03464fdf909fdf3798f87ff3712b10c59bd86000000000000000000000005","0x4b718e0e2fea1da68b763cd50c446fba03ceb2ea00000000000000000000000b","0x68a69c596b3839023c0e08d09682314f582314e5000200000000000000000011","0x6f34a44fce1506352a171232163e7716dd073ade000200000000000000000015","0x9e2d87f904862671eb49cb358e74284762cc9f42000200000000000000000013","0xac4b72c01072a52b73ca71105504f1372efcce0d000000000000000000000003","0xbfd65c6160cfd638a85c645e6e6d8acac5dac935000000000000000000000004","0xe274c9deb6ed34cfe4130f8d0a8a948dea5bb28600000000000000000000000d"];class Vi{constructor(t){this.chainId=t,this.balancerApiUrl="https://api-v3.balancer.fi/",this.tokenPriceQuery=u.gql` + query queryTokenPrices($chainKey: GqlChain!) { + tokenGetCurrentPrices(chains: [$chainKey]) { + address + price + } + } + `,this.chainKey=e.Network[t]}async getNativeAssetPriceInToken(e){const{tokenGetCurrentPrices:t}=await u.request(this.balancerApiUrl,this.tokenPriceQuery,{chainKey:this.chainKey}),a=t.find((({address:t})=>t.toLowerCase()===e.toLowerCase()));if(!a)throw new Error("Token Price not found in the API");const n=t.find((({address:e})=>e.toLowerCase()===qi[this.chainKey]));if(!n)throw new Error("Native Token Price not found in the API");const o=a.price/n.price;return String(o)}}var qi;function Gi(e=!0){return e?"https://api.coingecko.com/api/v3/":"https://pro-api.coingecko.com/api/v3/"}function Wi(e=!0){return e?"x-cg-demo-api-key":"x-cg-pro-api-key"}!function(e){e.MAINNET="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.POLYGON="0x0000000000000000000000000000000000001010",e.ARBITRUM="0x912ce59144191c1204e64559fe8253a0e49e6548",e.AVALANCHE="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.BASE="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.FANTOM="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.GNOSIS="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.OPTIMISM="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",e.ZKEVM="0xa2036f0538221a77a3937f1379699f44945018d0"}(qi||(qi={}));class Hi{constructor(e,t){this.chainId=e,this.urlBase=`${Gi(null==t?void 0:t.isDemoApiKey)}simple/token_price/${this.platformId}?vs_currencies=${this.nativeAssetId}`,this.coingeckoApiKeyHeaderName=Wi(null==t?void 0:t.isDemoApiKey),this.apiKey=t.coingeckoApiKey}async getNativeAssetPriceInToken(e){const t=await this.getTokenPriceInNativeAsset(e);return""+1/parseFloat(t)}async getTokenPriceInNativeAsset(e){var t;const a=`${this.urlBase}&contract_addresses=${e}`,{data:n}=await E.default.get(a,{headers:{Accept:"application/json","Content-Type":"application/json",[this.coingeckoApiKeyHeaderName]:null!==(t=this.apiKey)&&void 0!==t?t:""}});if(void 0===n[e.toLowerCase()]||void 0===n[e.toLowerCase()][this.nativeAssetId])throw Error("No price returned from Coingecko");return n[e.toLowerCase()][this.nativeAssetId]}get platformId(){return Ba[this.chainId].thirdParty.coingecko.platformId||"2"}get nativeAssetId(){return Ba[this.chainId].thirdParty.coingecko.nativeAssetId||""}}class Ki extends d.SOR{constructor(e){const t=Di(e),a=Ki.getSorConfig(e),n=Ki.getSorNetworkConfig(t),o=new p.JsonRpcProvider(e.rpcUrl,e.network),i=Ai(t.urls.subgraph);super(o,n,Ki.getPoolDataService(t,a,o,i),Ki.getTokenPriceService(t,a,i,e.coingecko))}static getSorConfig(e){return{tokenPriceService:"api",poolDataService:"subgraph",fetchOnChainBalances:!0,...e.sor}}static getSorNetworkConfig(e){var t;return{...e,vault:e.addresses.contracts.vault,weth:e.addresses.tokens.wrappedNativeAsset,lbpRaisingTokens:null===(t=e.addresses.tokens)||void 0===t?void 0:t.lbpRaisingTokens,wETHwstETH:e.pools.wETHwstETH,connectingTokens:e.sorConnectingTokens,triPathMidPoolIds:e.sorTriPathMidPoolIds}}static getPoolDataService(e,t,a,n){var o;const i=[...null!==(o=e.poolsToIgnore)&&void 0!==o?o:[],...Ui];return"object"==typeof t.poolDataService?t.poolDataService:new Ni(n,a,{...e,poolsToIgnore:i},t)}static getTokenPriceService(e,t,a,n){return"coingecko"===t.tokenPriceService&&n?new Hi(e.chainId,n):"object"==typeof t.tokenPriceService?t.tokenPriceService:"subgraph"===t.tokenPriceService?new Li(a,e.addresses.tokens.wrappedNativeAsset):new Vi(e.chainId)}}function $i(e){if(e.poolIds.length>2)throw new Error("Simple flash swap only supports a maximum of two pools");if(e.assets.length>2)throw new Error("Simple flash swap only supports a maximum of to two assets (tokens)")}function Ji(e,t){return[{poolId:e[0],assetInIndex:0,assetOutIndex:1,amount:t,userData:"0x"},{poolId:e[1],assetInIndex:1,assetOutIndex:0,amount:"0",userData:"0x"}]}function ji(e){return-1*Number(e)}function Xi(e){return r.sum(e)}const Yi={"0xae7ab96520de3a18e5e111b5eaab095312d7fe84":"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0","0xd46ba6d942050d489dbd938a2c909a5d5039a161":"0xedb171c18ce90b633db442f2a6f72874093b49ef","0x1e6bb68acec8fefbd87d192be09bb274170a0548":"0xF03387d8d0FF326ab586A58E0ab4121d106147DF"};function zi(e){let t=e;return Yi.hasOwnProperty(e)&&(t=Yi[e]),t}var Zi;function Qi(e,t,a){const{tokens:n,contracts:o}=Ca(a);let i={id:Zi.vault,address:o.vault};return n.stETH&&o.lidoRelayer&&[e,t].includes(n.stETH)&&(i={id:Zi.lido,address:o.lidoRelayer}),i}function es(e){return e.id===Zi.lido?Pt.abi.filter((e=>"function"===e.type&&e.name&&["swap","batchSwap"].includes(e.name))):pa.abi.filter((e=>"function"===e.type&&e.name&&["swap","batchSwap"].includes(e.name)))}function ts(e){return{amount:e,max:t=>e.mul(1e4+t).div(1e4),min:t=>e.mul(1e4-t).div(1e4)}}function as(t,a){const n=a===e.SwapType.SwapExactIn?t.swapAmount:t.returnAmount,o=a===e.SwapType.SwapExactIn?t.returnAmount:t.swapAmount,i=a===e.SwapType.SwapExactIn?t.swapAmountForSwaps||t.swapAmount:t.returnAmountFromSwaps||t.returnAmount,s=a===e.SwapType.SwapExactIn?t.returnAmountFromSwaps||t.returnAmount:t.swapAmountForSwaps||t.swapAmount,r=zi(t.tokenIn),l=zi(t.tokenOut);return{...t,amountIn:n,amountOut:o,amountInForLimits:ts(i),amountOutForLimits:ts(s),tokenInForSwaps:r,tokenOutFromSwaps:l}}!function(e){e[e.vault=1]="vault",e[e.lido=2]="lido"}(Zi||(Zi={}));class ns{constructor(e,t,a){this.kind=t,this.chainId=a,this.functionName="swap",this.swapInfo=as(e,t),this.relayer=Qi(this.swapInfo.tokenIn,this.swapInfo.tokenOut,this.chainId)}setFunds(e,t){this.funds={sender:e,recipient:t||e,fromInternalBalance:!1,toInternalBalance:!1}}setDeadline(e){this.deadline=e}get amount(){return this.kind===e.SwapType.SwapExactOut?this.swapInfo.amountOutForLimits.amount:this.swapInfo.amountInForLimits.amount}setLimits(t){this.limit=this.kind===e.SwapType.SwapExactIn?this.swapInfo.amountOutForLimits.min(t).toString():this.swapInfo.amountInForLimits.max(t).toString()}get singleSwap(){return{poolId:this.swapInfo.swaps[0].poolId,kind:this.kind,assetIn:this.swapInfo.tokenInForSwaps,assetOut:this.swapInfo.tokenOutFromSwaps,amount:this.amount.toString(),userData:"0x"}}attributes(){var e;if(!this.funds||!this.limit||!this.deadline)throw new Error("Uninitialized arguments");let t={request:this.singleSwap,funds:this.funds,limit:this.limit,deadline:this.deadline};const a=this.fragment();return a[0].inputs&&(null===(e=a[0].inputs)||void 0===e?void 0:e.length)>4&&(t={...t,value:"0",outputReference:"0"}),t}data(){return new t.Interface(this.fragment()).encodeFunctionData("swap",Object.values(this.attributes()))}value(t){let o=n.BigNumber.from(0);return this.swapInfo.tokenIn===a.AddressZero&&(o=this.kind===e.SwapType.SwapExactIn?this.swapInfo.amountIn:this.swapInfo.amountInForLimits.max(t)),o}to(){return this.relayer.address}fragment(){return es(this.relayer).filter((e=>e.name===this.functionName))}}class os{constructor(e,t,a){this.kind=t,this.chainId=a,this.functionName="batchSwap",this.swapInfo=as(e,t),this.relayer=Qi(this.swapInfo.tokenIn,this.swapInfo.tokenOut,this.chainId)}setFunds(e,t){this.funds={sender:e,recipient:t||e,fromInternalBalance:!1,toInternalBalance:!1}}setDeadline(e){this.deadline=e}minAmountOut(t){return this.kind===e.SwapType.SwapExactIn?this.swapInfo.amountOutForLimits.min(t):this.swapInfo.amountOutForLimits.amount}maxAmountIn(t){return this.kind===e.SwapType.SwapExactOut?this.swapInfo.amountInForLimits.max(t):this.swapInfo.amountInForLimits.amount}setLimits(e){this.limits=this.swapInfo.tokenAddresses.map((t=>{let a=n.BigNumber.from(0);return t===this.swapInfo.tokenInForSwaps&&(a=this.maxAmountIn(e)),t===this.swapInfo.tokenOutFromSwaps&&(a=this.minAmountOut(e).mul(-1)),a})).map((e=>e.toString().split(".")[0]))}attributes(){var e;if(!this.funds||!this.limits||!this.deadline)throw new Error("Uninitialized arguments");let t={kind:this.kind,swaps:this.swapInfo.swaps,assets:this.swapInfo.tokenAddresses,funds:this.funds,limits:this.limits,deadline:this.deadline};const a=this.fragment();return a[0].inputs&&(null===(e=a[0].inputs)||void 0===e?void 0:e.length)>6&&(t={...t,value:"0",outputReferences:[]}),t}data(){return new t.Interface(this.fragment()).encodeFunctionData("batchSwap",Object.values(this.attributes()))}value(e){let t=n.BigNumber.from(0);return this.swapInfo.tokenIn===a.AddressZero&&(t=this.maxAmountIn(e)),t}to(){return this.relayer.address}fragment(){return es(this.relayer).filter((e=>e.name===this.functionName))}}const is={maxPools:4,gasPrice:"1",deadline:"999999999999999999",maxSlippage:10};class ss{constructor(e){e instanceof d.SOR?(this.sor=e,this.chainId=this.sor.provider._network.chainId):(this.sor=new Ki(e),"number"==typeof e.network?this.chainId=e.network:this.chainId=e.network.chainId),this.vaultContract=pa.connect(ka,this.sor.provider)}static getLimitsForSlippage(e,t,a,n,o,i){return Sa(e,t,a,n,o,i).map((e=>e.toString()))}async findRouteGivenIn({tokenIn:e,tokenOut:t,amount:a,gasPrice:n,maxPools:o=4}){return this.sor.getSwaps(e,t,d.SwapTypes.SwapExactIn,a,{gasPrice:n,maxPools:o})}async findRouteGivenOut({tokenIn:e,tokenOut:t,amount:a,gasPrice:n,maxPools:o=4}){return this.sor.getSwaps(e,t,d.SwapTypes.SwapExactOut,a,{gasPrice:n,maxPools:o})}buildSwap({userAddress:e,recipient:t,swapInfo:a,kind:n,deadline:o,maxSlippage:i}){if(!this.chainId)throw"Missing network configuration";const s=a.swaps.length>1?new os(a,n,this.chainId):new ns(a,n,this.chainId);s.setFunds(e,t),s.setDeadline(o),s.setLimits(i);const r=s.to(),{functionName:l}=s;return{to:r,functionName:l,attributes:s.attributes(),data:s.data(),value:s.value(i)}}async buildRouteExactIn(t,a,o,i,s,r=is){const l={...is,...r},d=await this.findRouteGivenIn({tokenIn:o,tokenOut:i,amount:n.BigNumber.from(s),gasPrice:n.BigNumber.from(l.gasPrice),maxPools:l.maxPools});return this.buildSwap({userAddress:t,recipient:a,swapInfo:d,kind:e.SwapType.SwapExactIn,deadline:l.deadline,maxSlippage:l.maxSlippage})}static encodeBatchSwap(e){return pa.createInterface().encodeFunctionData("batchSwap",[e.kind,e.swaps,e.assets,e.funds,e.limits,e.deadline])}static encodeSimpleFlashSwap(t){return this.encodeBatchSwap(function({poolIds:t,assets:a,flashLoanAmount:n,walletAddress:o}){$i({poolIds:t,assets:a});const i=Ji(t,n),s={sender:o,fromInternalBalance:!1,recipient:o,toInternalBalance:!1};return{kind:e.SwapType.SwapExactIn,swaps:i,assets:a,funds:s,limits:["0","0"],deadline:"999999999999999999"}}(t))}async fetchPools(e){return this.sor.fetchPools(e)}getPools(){return this.sor.getPools()}async queryBatchSwap(e){return await Nn(this.vaultContract,e.kind,e.swaps,e.assets)}async querySimpleFlashSwap(t){return await async function(t){$i(t);const[a,n]=t.assets;try{const o=await Nn(t.vaultContract,e.SwapType.SwapExactIn,Ji(t.poolIds,t.flashLoanAmount),t.assets),i={[a]:ji(o[0]).toString(),[n]:ji(o[1]).toString()};return{profits:i,isProfitable:Xi([i[a],i[n]])>0}}catch(e){throw`Failed to querySimpleFlashSwap: ${e}`}}({...t,vaultContract:this.vaultContract})}async getSorSwap(t){return await async function(t,a,n,o,i){const s=n===e.SwapType.SwapExactIn?d.SwapTypes.SwapExactIn:d.SwapTypes.SwapExactOut;return await i.getSwaps(t.toLowerCase(),a.toLowerCase(),s,o)}(t.tokenIn,t.tokenOut,t.swapType,t.amount,this.sor)}async queryExactIn(t){const a=await this.query(t,e.SwapType.SwapExactIn);return this.assetDeltas(a.map(String),t.tokenAddresses)}async queryExactOut(t){const a=await this.query(t,e.SwapType.SwapExactOut);return this.assetDeltas(a.map(String),t.tokenAddresses)}query(e,t){const{swaps:n,tokenAddresses:o}=e,i={sender:a.AddressZero,recipient:a.AddressZero,fromInternalBalance:!1,toInternalBalance:!1};return this.vaultContract.callStatic.queryBatchSwap(t,n,o,i)}assetDeltas(e,t){return Object.fromEntries(e.map(((e,a)=>[t[a],e])))}}var rs;e.PoolKind=void 0,(rs=e.PoolKind||(e.PoolKind={}))[rs.WEIGHTED=0]="WEIGHTED",rs[rs.LEGACY_STABLE=1]="LEGACY_STABLE",rs[rs.COMPOSABLE_STABLE=2]="COMPOSABLE_STABLE",rs[rs.COMPOSABLE_STABLE_V2=3]="COMPOSABLE_STABLE_V2";const ls=Pt.createInterface();class ds{static encodeApproveVault(e,t){return ls.encodeFunctionData("approveVault",[e,t])}static encodeSetRelayerApproval(e,t,a){return ls.encodeFunctionData("setRelayerApproval",[e,t,a])}static encodeGaugeWithdraw(e,t,a,n){return ls.encodeFunctionData("gaugeWithdraw",[e,t,a,n])}static encodeGaugeDeposit(e,t,a,n){return ls.encodeFunctionData("gaugeDeposit",[e,t,a,n])}static encodeSwap(e){return ls.encodeFunctionData("swap",[e.request,e.funds,e.limit,e.deadline,e.value,e.outputReference])}static encodeBatchSwap(e){return ls.encodeFunctionData("batchSwap",[e.swapType,e.swaps,e.assets,e.funds,e.limits,e.deadline,e.value,e.outputReferences])}static encodeExitPool(e){return ls.encodeFunctionData("exitPool",[e.poolId,e.poolKind,e.sender,e.recipient,e.exitPoolRequest,e.outputReferences])}static encodeJoinPool(e){return ls.encodeFunctionData("joinPool",[e.poolId,e.kind,e.sender,e.recipient,e.joinPoolRequest,e.value,e.outputReference])}static encodeWrapAaveDynamicToken(e){return ls.encodeFunctionData("wrapAaveDynamicToken",[e.staticToken,e.sender,e.recipient,e.amount,e.fromUnderlying,e.outputReference])}static encodeUnwrapAaveStaticToken(e){return ls.encodeFunctionData("unwrapAaveStaticToken",[e.staticToken,e.sender,e.recipient,e.amount,e.toUnderlying,e.outputReference])}static encodeUnwrapWstETH(e){return ls.encodeFunctionData("unwrapWstETH",[e.sender,e.recipient,e.amount,e.outputReference])}static encodeUnwrap(e,t){let a;switch(t){case"AaveLinear":return this.encodeUnwrapAaveStaticToken({staticToken:e.wrappedToken,sender:e.sender,recipient:e.recipient,amount:e.amount,toUnderlying:!0,outputReference:e.outputReference});case"BeefyLinear":case"ERC4626Linear":a="unwrapERC4626";break;case"EulerLinear":a="unwrapEuler";break;case"GearboxLinear":a="unwrapGearbox";break;case"ReaperLinear":a="unwrapReaperVaultToken";break;case"TetuLinear":a="unwrapTetu";break;case"YearnLinear":a="unwrapYearn";break;case"MidasLinear":a="unwrapCompoundV2";break;case"SiloLinear":a="unwrapShareToken";break;default:throw new Error("Unwrapping not supported for this pool type: "+t)}return ls.encodeFunctionData(a,[e.wrappedToken,e.sender,e.recipient,e.amount,e.outputReference])}static encodePeekChainedReferenceValue(e){return ls.encodeFunctionData("peekChainedReferenceValue",[e])}static toChainedReference(e,t=!0){const a=t?ds.CHAINED_REFERENCE_TEMP_PREFIX:ds.CHAINED_REFERENCE_READONLY_PREFIX,o=`0x${a}${"0".repeat(64-a.length)}`;return n.BigNumber.from(o).add(e)}static fromChainedReference(e,t=!0){const a=t?ds.CHAINED_REFERENCE_TEMP_PREFIX:ds.CHAINED_REFERENCE_READONLY_PREFIX,o=`0x${a}${"0".repeat(64-a.length)}`;return n.BigNumber.from(e).sub(n.BigNumber.from(o))}static isChainedReference(e){const t=n.BigNumber.from(e),a=n.BigNumber.from("0xfff0000000000000000000000000000000000000000000000000000000000000"),o=t.toBigInt()&a.toBigInt();return"0xba10000000000000000000000000000000000000000000000000000000000000"===n.BigNumber.from(o)._hex.toString()}static formatExitPoolInput(e){const{assets:t,minAmountsOut:a,userData:n,toInternalBalance:o,poolId:i,poolKind:s,sender:r,recipient:l,outputReferences:d}=e;return{poolId:i,poolKind:s,sender:r,recipient:l,outputReferences:d,exitPoolRequest:{assets:t,minAmountsOut:a,userData:n,toInternalBalance:o}}}static formatJoinPoolInput(e){const{assets:t,maxAmountsIn:a,userData:n,fromInternalBalance:o,poolId:i,kind:s,sender:r,recipient:l,value:d,outputReference:p}=e;return{poolId:i,kind:s,sender:r,recipient:l,value:d,outputReference:p,joinPoolRequest:{assets:t,maxAmountsIn:a,userData:n,fromInternalBalance:o}}}}ds.CHAINED_REFERENCE_TEMP_PREFIX="ba10",ds.CHAINED_REFERENCE_READONLY_PREFIX="ba11",ds.signRelayerApproval=async(e,t,n,o)=>{const i=o.interface.encodeFunctionData("setRelayerApproval",[t,e,!0]),s=await ae.signSetRelayerApprovalAuthorization(o,n,e,i);return ae.encodeCalldataAuthorization("0x",a.MaxUint256,s)};class ps{constructor(e){this.url=Di(e).urls.subgraph,this.client=this.initClient()}initClient(){return Zo(new u.GraphQLClient(this.url))}}class us{constructor(e,t){this.swaps=t||new ss(e)}async fetchPools(){return this.swaps.fetchPools()}getPools(){return this.swaps.getPools()}async getSpotPrice(t,a,n=[]){0===n.length&&(await this.fetchPools(),n=this.getPools());const o=d.parseToPoolsDict(n,0),i=this.swaps.sor.routeProposer.getCandidatePathsFromDict(t,a,0,o,4);if(0===i.length)throw new Ma(e.BalancerErrorCode.UNSUPPORTED_PAIR);return d.getSpotPriceAfterSwapForPath(i[0],0,d.ZERO).toString()}}const cs=["function getPoolId() view returns (bytes32)","function getSwapFeePercentage() view returns (uint256)","function getProtocolFeesCollector() view returns (address)","function inRecoveryMode() view returns (bool)"];class ys{constructor(e,a,n={}){this.multicall=e,this.options=n,this.calls=[],this.paths=[],this.interface=new t.Interface(a)}call(e,t,a,n){return this.calls.push([t,a,n]),this.paths.push(e),this}async execute(e={}){const t=e;return(await this.executeMulticall()).forEach(((e,a)=>r.set(t,this.paths[a],e.length>1?e:e[0]))),this.calls=[],this.paths=[],t}async executeMulticall(){const[,e]=await this.multicall.callStatic.aggregate(this.calls.map((([e,t,a])=>({target:e,callData:this.interface.encodeFunctionData(t,a)}))),this.options);return e.map(((e,t)=>this.interface.decodeFunctionResult(this.calls[t][1],e)))}}function bs(e){return Math.round(Date.now()/1e3)-e<86400}class ms{constructor(e,t){this.veBalAddress=e,this.multicall=t}async getLockInfo(e){if(!this.veBalAddress)throw new Error("veBal address must be defined");const t=new ys(this.multicall,[...Pa.abi]);t.call("locked",this.veBalAddress,"locked",[e]),t.call("epoch",this.veBalAddress,"epoch"),t.call("totalSupply",this.veBalAddress,"totalSupply()");const a=await t.execute();return this.formatLockInfo(a)}formatLockInfo(e){const[t,a]=e.locked,n=t.gt(0),o=1e3*a.toNumber();const i=n&&Date.now()>o;return{lockedEndDate:o,lockedAmount:Ce(t),totalSupply:Ce(e.totalSupply),epoch:Ce(e.epoch,0),hasExistingLock:n,isExpired:i}}}class fs{constructor(e,t){if(!e.veBalProxy)throw new Error("veBalProxy address must be defined");this.instance=xa.connect(e.veBalProxy,t)}async getAdjustedBalance(e){return Ce(await this.instance.adjustedBalanceOf(e))}}class Ts{constructor(e,t){this.getLiquidityGauge=ea.connect,this.contractAddresses="number"==typeof e?Ba[e].addresses.contracts:e;const a=pa.connect(this.contractAddresses.vault,t),n=bt.connect(this.contractAddresses.balancerHelpers,t);let o;this.contractAddresses.lidoRelayer&&(o=Yt.connect(this.contractAddresses.lidoRelayer,t));const i=aa.connect(this.contractAddresses.multicall,t),s=gt.connect(this.contractAddresses.balancerRelayer,t);let r,l,d,p,u,c,y,b,m,f,T;this.contractAddresses.veBal&&(r=new ms(this.contractAddresses.veBal,i)),this.contractAddresses.veBalProxy&&(l=new fs(this.contractAddresses,t)),this.contractAddresses.gaugeClaimHelper&&(d=Gt.connect(this.contractAddresses.gaugeClaimHelper,t)),this.contractAddresses.composableStablePoolFactory&&(p=At.connect(this.contractAddresses.composableStablePoolFactory,t)),this.contractAddresses.weightedPoolFactory&&(u=ba.connect(this.contractAddresses.weightedPoolFactory,t)),this.contractAddresses.aaveLinearPoolFactory&&(c=lt.connect(this.contractAddresses.aaveLinearPoolFactory,t)),this.contractAddresses.erc4626LinearPoolFactory&&(y=Ft.connect(this.contractAddresses.erc4626LinearPoolFactory,t)),this.contractAddresses.eulerLinearPoolFactory&&(b=Dt.connect(this.contractAddresses.eulerLinearPoolFactory,t)),this.contractAddresses.gearboxLinearPoolFactory&&(m=$t.connect(this.contractAddresses.gearboxLinearPoolFactory,t)),this.contractAddresses.yearnLinearPoolFactory&&(f=ha.connect(this.contractAddresses.yearnLinearPoolFactory,t)),this.contractAddresses.gyroConfigProxy&&(T=jt.connect(this.contractAddresses.gyroConfigProxy,t)),this.instances={aaveLinearPoolFactory:c,balancerHelpers:n,BasePool:this.getBasePool,composableStablePoolFactory:p,ERC20:this.getErc20,erc4626LinearPoolFactory:y,eulerLinearPoolFactory:b,gaugeClaimHelper:d,gearboxLinearPoolFactory:m,gyroConfig:T,liquidityGauge:this.getLiquidityGauge,lidoRelayer:o,multicall:i,relayer:s,veBal:r,veBalProxy:l,weightedPoolFactory:u,yearnLinearPoolFactory:f,vault:a}}get contracts(){return this.instances}getErc20(e,t){return Bt.connect(e,t)}getBasePool(e,t){return((e,t)=>new b.Contract(e,cs,t))(e,t)}}class hs{constructor(e,t){this.tokenPrices=e,this.tokenHistoricalPrices=t}async calcImpLoss(t,a){if(1e3*t>=Date.now())throw console.error(`[ImpermanentLossService][calcImpLoss]Error: ${Ma.getMessage(e.BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE)}`),new Ma(e.BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE);const n=await this.prepareData(t,a),o=this.getPoolValueDelta(n),i=this.getHoldValueDelta(n);return this.calculateImpermanentLoss(o,i)}calculateImpermanentLoss(e,t){return Math.floor(100*Math.abs(e/t-1)*100)/100}getPoolValueDelta(e){return e.reduce(((e,t)=>e*Math.pow(Math.abs(t.priceDelta+1),t.weight)),1)}getHoldValueDelta(e){return e.reduce(((e,t)=>e+Math.abs(t.priceDelta+1)*t.weight),0)}async prepareData(e,t){const a=t.tokens.filter((e=>e.address!==t.address)),n=this.getWeights(a),o=a.map((e=>e.address)),i=await this.getEntryPrices(e,o),s=await this.getExitPrices(a);return this.getAssets(a,s,i,n)}getAssets(e,t,a,n){return e.map(((e,o)=>({priceDelta:this.getDelta(a[e.address],t[e.address]),weight:n[o]})))}getDelta(t,a){if(0===t)throw console.error(`[ImpermanentLossService][getDelta]Error: ${Ma.getMessage(e.BalancerErrorCode.ILLEGAL_PARAMETER)}: entry price is 0`),new Ma(e.BalancerErrorCode.ILLEGAL_PARAMETER);return(a-t)/t}getWeights(t){const a=t.every((e=>!e.weight)),n=Math.round(1/t.length*100)/100,o=a?t.map((()=>n)):t.map((e=>{var t;return Number(null!==(t=e.weight)&&void 0!==t?t:0)}));if(o.some((e=>0===e)))throw console.error(`[ImpermanentLossService][getWeights]Error: ${Ma.getMessage(e.BalancerErrorCode.MISSING_WEIGHT)}`),new Ma(e.BalancerErrorCode.MISSING_WEIGHT);return o}async getExitPrices(t){var a;const n=await Promise.all(t.map((e=>this.tokenPrices.find(e.address)))).catch((()=>[]));if(!n.length||n.some((e=>void 0===(null==e?void 0:e.usd))))throw console.error(`[ImpermanentLossService][getExitPrices]Error: ${Ma.getMessage(e.BalancerErrorCode.MISSING_PRICE_RATE)}`),new Ma(e.BalancerErrorCode.MISSING_PRICE_RATE);const o=t.map(((e,t)=>({...e,price:n[t]}))),i={};for(const e of o)(null===(a=e.price)||void 0===a?void 0:a.usd)&&(i[e.address]=+e.price.usd);return i}async getEntryPrices(t,a){const n={};for(const o of a){const a=await this.tokenHistoricalPrices.findBy(o,t).catch((e=>{X.getInstance().warn(`[ImpermanentLossService][getEntryPrices]Error: ${e.message}`)}));if(!(null==a?void 0:a.usd)){throw X.getInstance().warn(`[ImpermanentLossService][getEntryPrices]Error: ${Ma.getMessage(e.BalancerErrorCode.MISSING_PRICE_RATE)}`),new Ma(e.BalancerErrorCode.MISSING_PRICE_RATE)}n[o]=+a.usd}return n}}const Is=145e3,gs=1648465251,_s=31536e3,Ps=2**(1/4),ws=(e=Math.round((new Date).getTime()/1e3))=>{const t=Math.floor((e-gs)/_s);return Is*Ps**-t},xs=e=>365*(Is*Ps**-e/7);var Es=Object.freeze({__proto__:null,INITIAL_RATE:Is,START_EPOCH_TIME:gs,weekly:ws,total:xs,between:(e,t)=>{if(et.address!==e.address)),n=await Promise.all(a.map((async t=>{let a=0;const n=await this.tokenYields.find(t.address);if(n)a="MetaStable"===e.poolType||e.poolType.includes("Gyro")?n*(1-await this.protocolSwapFeePercentage(e)):"ComposableStable"===e.poolType||"Weighted"===e.poolType&&e.poolTypeVersion>=2?t.isExemptFromYieldProtocolFee?n:n*(1-parseFloat(e.protocolYieldFeeCache||"0.5")):n;else{const n=await this.pools.findBy("address",t.address);if(n){const o=await this.swapFees(n);let i=(await this.tokenAprs(n)).total;("ComposableStable"===e.poolType||"Weighted"===e.poolType&&2===e.poolTypeVersion)&&(t.isExemptFromYieldProtocolFee||(i*=1-parseFloat(e.protocolYieldFeeCache||"0.5"))),a=o+i}}return a}))),o=async e=>{var a,n,o,i,s;let r;if(e.weight)return parseFloat(e.weight);if(null===(n=null===(a=e.token)||void 0===a?void 0:a.pool)||void 0===n?void 0:n.poolType){const t=await this.pools.findBy("address",e.address);t&&(r=(await this.bptPrice(t)).toString())}else r=(null===(o=e.price)||void 0===o?void 0:o.usd)||(null===(i=await this.tokenPrices.find(e.address))||void 0===i?void 0:i.usd)||(null===(s=e.token)||void 0===s?void 0:s.latestUSDPrice);if(r){return parseFloat(e.balance)*parseFloat(r)/parseFloat(t)}throw`No price for ${e.address}`},i=await Promise.all(a.map((async(e,t)=>{if(0===n[t])return 0;try{const a=await o(e);return Math.round(n[t]*a)}catch(e){return X.getInstance().error(e),0}})));return{total:i.reduce(((e,t)=>e+t),0),breakdown:r.pickBy(r.zipObject(a.map((e=>e.address)),i),r.identity)}}async stakingApr(e,t=1){if(!this.liquidityGauges)return 0;const a=await this.liquidityGauges.findBy("poolId",e.id);if(!a||1==e.chainId&&0===a.workingSupply||e.chainId>1&&0===a.totalSupply||e.chainId>1&&0===a.balInflationRate)return 0;const n=Ba[e.chainId].addresses.tokens.bal;if(!n)return 0;const[o,i]=await Promise.all([this.tokenPrices.find(n),this.bptPrice(e)]);if(!(null==o?void 0:o.usd))throw"Missing BAL price";const s=(a.workingSupply+.4)/.4*i;if(a.balInflationRate){const e=86400*a.balInflationRate*365*parseFloat(o.usd);return Math.round(1e4*t*e/s)}if(e.chainId>1){if(!a.rewardTokens)return 0;const e=n&&a.rewardTokens[n];if(!e)return 0;{let t;try{t=await this.rewardTokenApr(n,e);const o=a.totalSupply*i,s=t.value/o;return Math.round(1e4*s)}catch(e){return 0}}}const r=parseFloat(o.usd),l=Math.round((new Date).getTime()/1e3),d=ws(l)/7*365*a.relativeWeight*r;return Math.round(1e4*t*d/s)}async rewardAprs(e){if(!this.liquidityGauges)return{total:0,breakdown:{}};const t=await this.liquidityGauges.findBy("poolId",e.id);if(!t||!t.rewardTokens||Object.keys(t.rewardTokens).length<1)return{total:0,breakdown:{}};const a=Ba[e.chainId].addresses.tokens.bal,n=Object.keys(t.rewardTokens).filter((e=>e!=a)).map((async e=>{const a=t.rewardTokens[e];try{return await this.rewardTokenApr(e,a)}catch(t){return{address:e,value:0}}})),o=await this.bptPrice(e),i=t.totalSupply*o;if(0==i)return{total:0,breakdown:{}};const s={};let r=0;for await(const e of Object.values(n)){const t=e.value/i,a=Math.round(1e4*t);r+=a,s[e.address]=a}return{total:r,breakdown:s}}async protocolApr(e){if("0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014"!=e.id||!this.feeDistributor)return 0;const t=new As(this.feeDistributor,this.tokenPrices),{lastWeekBalRevenue:a,lastWeekBBAUsdRevenue:n,veBalSupply:o}=await t.data(),i=await this.bptPrice(e);if(!i)throw"bptPrice for veBal pool missing";const s=(a+n)/7;return Math.round(365*s*1e4/(i*o))}async apr(e){if(Ui.includes(e.id))return{swapFees:0,tokenAprs:{total:0,breakdown:{}},stakingApr:{min:0,max:0},rewardAprs:{total:0,breakdown:{}},protocolApr:0,min:0,max:0};const[t,a,n,o,i,s]=await Promise.all([this.swapFees(e),this.tokenAprs(e),this.stakingApr(e),this.stakingApr(e,2.5),this.rewardAprs(e),this.protocolApr(e)]);return{swapFees:t,tokenAprs:a,stakingApr:{min:n,max:o},rewardAprs:i,protocolApr:s,min:t+a.total+i.total+n,max:t+a.total+i.total+s+o}}async last24hFees(e){return new Ss(this.yesterdaysPools).last24h(e)}async totalLiquidity(e){try{const t=new Sn(this.pools,this.tokenPrices);return await t.getLiquidity(e)}catch(t){return X.getInstance().warn("Liquidity calculcation failed, falling back to subgraph"),e.totalLiquidity}}async bptPrice(e){return parseFloat(await this.totalLiquidity(e))/parseFloat(e.totalShares)}async protocolSwapFeePercentage(e){let t=.5;return t=e.poolType.includes("Gyro")&&this.gyroConfigRepository?await this.gyroConfigRepository.getGyroProtocolFee(e.address):e.protocolSwapFeeCache?parseFloat(e.protocolSwapFeeCache):await this.feeCollector.find("")||.5,t}async rewardTokenApr(e,t){if(t.period_finish.toNumber(){e.includes("Linear")&&ks.includes(e)&&Bs.set(e,"batchSwap")})),Bs.set(e.PoolType.Element,"batchSwap"),Bs.set(e.PoolType.Investment,"joinPool"),Bs.set(e.PoolType.LiquidityBootstrapping,"joinPool"),Bs.set(e.PoolType.MetaStable,"joinPool"),Bs.set(e.PoolType.Stable,"joinPool"),Bs.set(e.PoolType.StablePhantom,"batchSwap"),Bs.set(e.PoolType.Weighted,"joinPool"),Bs.set(e.PoolType.ComposableStable,"joinPool");const Cs=new Map;ks.forEach((e=>{e.includes("Linear")&&ks.includes(e)&&Cs.set(e,"batchSwap")})),Cs.set(e.PoolType.Element,"batchSwap"),Cs.set(e.PoolType.Investment,"exitPool"),Cs.set(e.PoolType.LiquidityBootstrapping,"exitPool"),Cs.set(e.PoolType.MetaStable,"exitPool"),Cs.set(e.PoolType.Stable,"exitPool"),Cs.set(e.PoolType.StablePhantom,"batchSwap"),Cs.set(e.PoolType.Weighted,"exitPool"),Cs.set(e.PoolType.ComposableStable,"exitPool");class Os{constructor(t){this.pools=t,this.getGraphNodes=async(t,a,n)=>{if(!await this.pools.find(a))throw new Ma(e.BalancerErrorCode.POOL_DOESNT_EXIST);const o=await this.buildGraphFromRootPool(a,n);if(o.id!==a)throw new Error("Error creating graph nodes");return t?Os.orderByBfs(o).reverse():Os.orderByBfs(o)}}async buildGraphFromRootPool(t,n){const o=await this.pools.find(t);if(!o)throw new Ma(e.BalancerErrorCode.POOL_DOESNT_EXIST);return(await this.buildGraphFromPool(o.address,0,void 0,a.WeiPerEther,n))[0]}getTokenTotal(e){const t=e.tokensList.indexOf(e.address);let n=a.Zero;const{balancesEvm:o}=me(e);return o.forEach(((e,a)=>{t!==a&&(n=n.add(e))})),n}async buildGraphFromPool(t,o,i,s,r){var l;const d=await this.pools.findBy("address",t);if(!d){if(i){const e=await this.pools.findBy("address",i.address),a=e.tokensList.indexOf(t),n=null!==(l=e.tokens[a].decimals)&&void 0!==l?l:18,{balancesEvm:r}=me(e);return Os.createInputTokenNode(o,t,n,i,s,r[a].toString())}throw new Ma(e.BalancerErrorCode.POOL_DOESNT_EXIST)}const p=Bs.get(d.poolType),u=Cs.get(d.poolType);if(!p||!u)throw new Ma(e.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);const c=this.getTokenTotal(d),{spotPriceCalculator:y}=An.from(d.poolType),b={};let m=18;d.tokens.forEach((e=>{if(je(e.address,d.address))return void(m=e.decimals?e.decimals:18);const t=y.calcPoolSpotPrice(e.address,d.address,d);b[e.address]=t}));let f={address:d.address,id:d.id,type:d.poolType,joinAction:p,exitAction:u,isProportionalExit:!1,children:[],marked:!1,index:o.toString(),parent:i,proportionOfParent:s,isLeaf:!1,spotPrices:b,decimals:m,balance:d.totalShares,priceRate:a.WeiPerEther.toString()};if(this.updateNodeIfProportionalExit(d,f),o++,d.poolType.toString().includes("Linear"))[f,o]=this.createLinearNodeChildren(f,o,d,r);else{const{balancesEvm:e}=me(d);for(let t=0;t2)&&(a.isProportionalExit=!0)}createLinearNodeChildren(e,t,a,n){var o;if(void 0===a.mainIndex)throw new Error("Issue With Linear Pool");if(n.map((e=>e.toLowerCase())).includes(a.tokensList[a.mainIndex].toLowerCase())){const n=this.createWrappedTokenNode(a,t,e,e.proportionOfParent);return e.children.push(n[0]),[e,n[1]]}{const{balancesEvm:n}=me(a),i=null!==(o=a.tokens[a.mainIndex].decimals)&&void 0!==o?o:18,s=Os.createInputTokenNode(t,a.tokensList[a.mainIndex],i,e,e.proportionOfParent,n[a.mainIndex].toString());return e.children.push(s[0]),[e,t=s[1]]}}createWrappedTokenNode(e,t,a,n){var o;if(void 0===e.wrappedIndex||void 0===e.mainIndex)throw new Error("Issue With Linear Pool");const{balancesEvm:i,upScaledBalances:s,scalingFactorsRaw:r,priceRates:l}=me(e),d={type:"WrappedToken",address:e.tokensList[e.wrappedIndex],id:"N/A",children:[],marked:!1,joinAction:"wrap",exitAction:"unwrap",isProportionalExit:!1,index:t.toString(),parent:a,proportionOfParent:n,isLeaf:!1,spotPrices:{},decimals:18,balance:i[e.wrappedIndex].toString(),priceRate:l[e.wrappedIndex].toString()};t++;const p=null!==(o=e.tokens[e.mainIndex].decimals)&&void 0!==o?o:18,u=ue(s[e.wrappedIndex],r[e.mainIndex]).toString(),c=Os.createInputTokenNode(t,e.tokensList[e.mainIndex],p,d,n,u);return d.children=[c[0]],[d,t=c[1]]}static createInputTokenNode(e,t,n,o,i,s){return[{address:t,id:"N/A",type:"Input",children:[],marked:!1,joinAction:"input",exitAction:"output",isProportionalExit:!1,index:e.toString(),parent:o,proportionOfParent:i,isLeaf:!0,spotPrices:{},decimals:n,balance:s,priceRate:a.WeiPerEther.toString()},e+1]}static orderByBfs(e){const t=[],a=[];for(e.marked=!0,t.push(e);t.length>0;){const e=t.shift();e&&a.push(e),null==e||e.children.forEach((e=>{e.marked||(e.marked=!0,t.push(e))}))}return a}static getLeafAddresses(e){return e.filter((e=>e.isLeaf)).map((e=>e.address))}static isProportionalPools(e){return e.every((e=>!(e.children.length>1)||e.isProportionalExit))}}class Ms{constructor(){}}Ms.joinInit=e=>t.defaultAbiCoder.decode(["uint256","uint256[]"],e),Ms.joinExactTokensInForBPTOut=e=>t.defaultAbiCoder.decode(["uint256","uint256[]","uint256"],e),Ms.joinTokenInForExactBPTOut=e=>t.defaultAbiCoder.decode(["uint256","uint256","uint256"],e),Ms.joinAllTokensInForExactBPTOut=e=>t.defaultAbiCoder.decode(["uint256","uint256"],e),Ms.exitExactBPTInForOneTokenOut=e=>t.defaultAbiCoder.decode(["uint256","uint256","uint256"],e),Ms.exitExactBPTInForTokensOut=e=>t.defaultAbiCoder.decode(["uint256","uint256"],e),Ms.exitBPTInForExactTokensOut=e=>t.defaultAbiCoder.decode(["uint256","uint256[]","uint256"],e);class Fs{constructor(e){this.relayerModel=e}joinKind(e){const a=t.defaultAbiCoder.decode(["uint256"],e)[0];if(!a)throw new Error("No exit kind.");return a.toNumber()}decodeJoinData(t,a){if(a===e.WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT){return Ms.joinAllTokensInForExactBPTOut(t).toString()}if(a===e.WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT){const[,e]=Ms.joinExactTokensInForBPTOut(t);return e}if(a===e.WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT){const[,e,a]=Ms.joinTokenInForExactBPTOut(t);return[e.toString(),a]}throw new Error("Non supported join data")}allTokensInForExactBPTOut(){throw new Error("joinAllTokensInForExactBPTOut not supported")}joinExactTokensInForBPTOut(t,a){const o=this.decodeJoinData(t,e.WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT),i=this.relayerModel.doChainedRefReplacements(o),s=a._calcBptOutGivenExactTokensIn(i.map((e=>n.BigNumber.from(e))));if("StablePhantom"==a.SubgraphType||"ComposableStable"==a.SubgraphType){const e=a.tokens.find((e=>je(e.address,a.address)));if(!e)throw new Error("Pool does not contain BPT as a token");const t=n.parseFixed(e.balance.toString(),e.decimals);a.updateTokenBalanceForPool(a.address,t.sub(s))}else a.updateTokenBalanceForPool(a.address,a.totalShares.add(s));const r=a.tokens.filter((e=>!je(e.address,a.address)));return i.forEach(((e,t)=>{const o=n.parseFixed(r[t].balance.toString(),r[t].decimals);a.updateTokenBalanceForPool(r[t].address,o.add(e))})),[s.toString(),r.map((e=>e.address)),i]}joinTokenInForExactBPTOut(t,a){const[o,i]=this.decodeJoinData(t,e.WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT),s=this.relayerModel.doChainedRefReplacement(o),r=a.parsePoolPairData(a.tokensList[Number(i)],a.address),l=n.formatFixed(s,18),p=a._tokenInForExactTokenOut(r,d.bnum(l.toString())).dp(r.decimalsIn),u=n.parseFixed(p.toString(),r.decimalsIn);return a.updateTokenBalanceForPool(r.tokenIn,r.balanceIn.add(u)),a.updateTokenBalanceForPool(r.tokenOut,r.balanceOut.add(s)),[u.toString(),r.tokenIn,u.toString()]}async doJoinPool(t,n){const o=n[t.poolId],i=this.joinKind(t.encodedUserData);let s="0",r=[],l=[];if(i===e.WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT)s=this.allTokensInForExactBPTOut();else if(i===e.WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT)[s,r,l]=this.joinExactTokensInForBPTOut(t.encodedUserData,o);else{if(i!==e.WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT)throw new Error("Exit type not implemented");{let e,a;[s,e,a]=this.joinTokenInForExactBPTOut(t.encodedUserData,o),r.push(e),l.push(a)}}return r.push(o.address),l.push(a.Zero.sub(s).toString()),t.outputReference&&ds.isChainedReference(t.outputReference)&&this.relayerModel.setChainedReferenceValue(t.outputReference,s),[r,l]}}class Rs{constructor(e){this.relayerModel=e}exitKind(a,n){const o=t.defaultAbiCoder.decode(["uint256"],n)[0];if(!o)throw new Error("No exit kind.");return"ComposableStable"===a?o.toNumber()===e.ComposableStablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT?e.WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT:o.toNumber()===e.ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT?e.WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT:e.WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT:o.toNumber()}decodeExitData(t,a){if(a===e.WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT){const[,e,a]=Ms.exitBPTInForExactTokensOut(t);return[e.toString(),a.toString()]}if(a===e.WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT){const[,e,a]=Ms.exitExactBPTInForOneTokenOut(t);return[e.toString(),a.toString()]}if(a===e.WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT){const[,e]=Ms.exitExactBPTInForTokensOut(t);return[e.toString()]}throw new Error("Non supported exit data")}exactBptInForTokensOut(t,a){const[o]=this.decodeExitData(t,e.WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT),i=this.relayerModel.doChainedRefReplacement(o),s=a._calcTokensOutGivenExactBptIn(n.BigNumber.from(i)).map((e=>e.toString()));if("StablePhantom"==a.SubgraphType||"ComposableStable"==a.SubgraphType){const e=a.tokens.find((e=>je(e.address,a.address)));if(!e)throw new Error("Pool does not contain BPT as a token");const t=n.parseFixed(e.balance.toString(),e.decimals);a.updateTokenBalanceForPool(a.address,t.add(i))}else a.updateTokenBalanceForPool(a.address,a.totalShares.sub(i));const r=a.tokens.filter((e=>!je(e.address,a.address)));return s.forEach(((e,t)=>{const o=n.parseFixed(r[t].balance.toString(),r[t].decimals);a.updateTokenBalanceForPool(r[t].address,o.sub(e))})),[i,r.map((e=>e.address)),s]}exactBptInForOneTokenOut(t,a){const[o,i]=this.decodeExitData(t,e.WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT),s=this.relayerModel.doChainedRefReplacement(o),r=a.parsePoolPairData(a.address,a.tokensList[Number(i)]),l=n.formatFixed(s,r.decimalsIn),p=a._exactTokenInForTokenOut(r,d.bnum(l)).dp(r.decimalsOut),u=n.parseFixed(p.toString(),r.decimalsOut),c=function(e,t){const a=[];return t.forEach((t=>{const o=e.tokens.findIndex((e=>je(e.address,t)));if(o<0)throw"Pool does not contain tokenIn";a.push(n.parseFixed(e.tokens[o].balance,e.tokens[o].decimals).toString())})),a}(a,[a.address,r.tokenOut]);a.updateTokenBalanceForPool(r.tokenOut,n.BigNumber.from(c[1]).sub(u)),"StablePhantom"==a.SubgraphType||"ComposableStable"==a.SubgraphType?a.updateTokenBalanceForPool(a.address,n.BigNumber.from(c[0]).add(s)):a.updateTokenBalanceForPool(a.address,a.totalShares.sub(s));const y=a.tokensList.filter((e=>!je(e,a.address))),b=new Array(y.length).fill("0");return b[Number(i)]=u.toString(),[s,y,b]}async doExitPool(t,n){const o=n[t.poolId],i=this.exitKind(o.SubgraphType,t.encodedUserData);let s,r=[],l=[];const d=[],p=[];if(i===e.WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT)[s,l,r]=this.exactBptInForTokensOut(t.encodedUserData,o);else{if(i!==e.WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT)throw new Error("Exit type not implemented");[s,l,r]=this.exactBptInForOneTokenOut(t.encodedUserData,o)}for(let e=0;ea.Zero.sub(e).toString()))),[d,p]}}class Ns{constructor(e){this.relayerModel=e}async doSingleSwap(e,t){const n=this.relayerModel.doChainedRefReplacement(e.request.amount.toString()),o=t[e.request.poolId],[,i]=this.doSwap(e.request.assetIn,e.request.assetOut,o,e.request.kind,n),s=a.Zero.sub(i);if(!e.outputReference)throw new Error("Missing outputReference");return this.relayerModel.setChainedReferenceValue(e.outputReference.toString(),s.abs().toString()),[s.toString(),n]}async doBatchSwap(t,n){const o=t.assets,i=new Array(o.length).fill(a.Zero);let s;for(let e=0;e{const r=o[a.assetInIndex],l=o[a.assetOutIndex],d=n[a.poolId];let p=a.amount;"0"===p&&(p=s);const[u,c]=this.doSwap(r,l,d,t.swapType,p);s=t.swapType===e.SwapType.SwapExactIn?c.toString():u.toString(),i[a.assetInIndex]=i[a.assetInIndex].add(u),i[a.assetOutIndex]=i[a.assetOutIndex].sub(c)}));for(let e=0;ee.toString()))}doSwap(t,o,i,s,r){const l=i.parsePoolPairData(t,o),p=s===e.SwapType.SwapExactIn;let u=p?n.BigNumber.from(r):a.Zero,c=p?a.Zero:n.BigNumber.from(r);const y=n.formatFixed(u,l.decimalsIn),b=n.formatFixed(c,l.decimalsOut);if(p){const e=i._exactTokenInForTokenOut(l,d.bnum(y.toString())).dp(l.decimalsOut);c=n.parseFixed(e.toString(),l.decimalsOut)}else{const e=i._tokenInForExactTokenOut(l,d.bnum(b.toString())).dp(l.decimalsIn);u=n.parseFixed(e.toString(),l.decimalsIn)}return i.updateTokenBalanceForPool(l.tokenIn,l.balanceIn.add(u)),i.updateTokenBalanceForPool(l.tokenOut,l.balanceOut.sub(c)),[u,c]}}class Ls{constructor(e){this.relayerModel=e}async doUnwrap(e,t){const o=t[e.poolId],i=o.tokens[o.wrappedIndex],s=o.tokens[o.mainIndex],r=this.relayerModel.doChainedRefReplacement(e.amount.toString()),l=ye.divDownFixed(ye.mulDownFixed(BigInt(r),n.parseFixed(i.priceRate,18).toBigInt()),a.WeiPerEther.toBigInt()).toString();this.relayerModel.setChainedReferenceValue(e.outputReference.toString(),l);return[[i.address,s.address],[r,a.Zero.sub(l).toString()]]}}class Ds{constructor(e){this.relayerModel=e,this.joinModel=new Fs(e),this.exitModel=new Rs(e),this.swapModel=new Ns(e),this.unwrapModel=new Ls(e)}async doJoin(e,t){return this.joinModel.doJoinPool(e,t)}async doExit(e,t){return this.exitModel.doExitPool(e,t)}async doBatchSwap(e,t){return this.swapModel.doBatchSwap(e,t)}async doSingleSwap(e,t){return this.swapModel.doSingleSwap(e,t)}async doUnwrap(e,t){return this.unwrapModel.doUnwrap(e,t)}}class Us{constructor(){this.chainedRefs={}}setChainedReferenceValue(e,t){this.chainedRefs[e]=t}getChainedReferenceValue(e){return this.chainedRefs[e]}doChainedRefReplacement(e){return ds.isChainedReference(e.toString())?this.getChainedReferenceValue(e.toString()):e}doChainedRefReplacements(e){return e.map((e=>this.doChainedRefReplacement(e).toString()))}}class Vs{constructor(e,t){this.poolDataService=e,this.wrappedNativeAsset=t,this.poolsArray=[],this.poolsDict={}}dataSource(){return this.poolDataService}async all(e=!1){if(e||0===this.poolsArray.length){const e=r.cloneDeep(await this.dataSource().getPools());for(const t of e)if(["Weighted","Investment","Stable","LiquidityBootstrapping"].includes(t.poolType)){const e={address:t.address,balance:t.totalShares,decimals:18,priceRate:"1",weight:"0"};t.tokens.push(e),t.tokensList.push(t.address)}this.poolsArray=e}return this.poolsArray}parseToPoolsDict(e){return Object.fromEntries(r.cloneDeep(e).filter((e=>e.tokensList.length>0&&"0"!==e.tokens[0].balance)).map((e=>[e.id,this.parseNewPool(e)])).filter((([,e])=>void 0!==e)))}parseNewPool(e){if(!e.swapEnabled)return;let t={};try{if(["Weighted","Investment","LiquidityBootstrapping"].includes(e.poolType)){t=d.WeightedPool.fromPool(e,!1)}else if("Stable"===e.poolType){t=d.StablePool.fromPool(e)}else if("MetaStable"===e.poolType){t=d.MetaStablePool.fromPool(e)}else if(e.poolType.toString().includes("Linear")){t=d.LinearPool.fromPool(e)}else if("StablePhantom"===e.poolType){t=d.PhantomStablePool.fromPool(e)}else{if("ComposableStable"!==e.poolType){return void X.getInstance().warn(`Unknown pool type or type field missing: ${e.poolType} ${e.id}`)}t=d.ComposableStablePool.fromPool(e)}if(!t)throw new Error("Issue with Pool");t.SubgraphType=e.poolType}catch(e){return void console.error("Error parseNewPool")}return t}async poolsDictionary(e=!1){if(e||0===Object.keys(this.poolsDict).length){const t=await this.all(e);this.poolsDict=this.parseToPoolsDict(t)}return this.poolsDict}}var qs,Gs;!function(e){e[e.BatchSwap=0]="BatchSwap",e[e.Join=1]="Join",e[e.Exit=2]="Exit",e[e.Swap=3]="Swap",e[e.Unwrap=4]="Unwrap"}(qs||(qs={}));class Ws{constructor(e,t){this.poolsSource=new Vs(e,t)}updateDeltas(e,t,n){return t.forEach(((t,o)=>{e[t]||(e[t]=a.Zero),e[t]=e[t].add(n[o])})),e}async multicall(e,t=!1){const a=new Us,n=new Ds(a),o=await this.poolsSource.poolsDictionary(t),i={};for(const t of e){let e=[],a=[];switch(t.actionType){case qs.Join:[e,a]=await n.doJoin(t,o);break;case qs.Exit:[e,a]=await n.doExit(t,o);break;case qs.BatchSwap:e=t.assets,a=await n.doBatchSwap(t,o);break;case qs.Swap:e=[t.request.assetOut,t.request.assetIn],a=await n.doSingleSwap(t,o);break;case qs.Unwrap:[e,a]=await n.doUnwrap(t,o)}this.updateDeltas(i,e,a)}return i}static mapSwapRequest(e){return{actionType:qs.Swap,request:e.request,funds:e.funds,outputReference:e.outputReference}}static mapBatchSwapRequest(e){return{actionType:qs.BatchSwap,swaps:e.swaps,assets:e.assets,funds:e.funds,swapType:e.swapType,outputReferences:e.outputReferences}}static mapJoinPoolRequest(e){return{actionType:qs.Join,poolId:e.poolId,encodedUserData:e.joinPoolRequest.userData,outputReference:e.outputReference}}static mapExitPoolRequest(e){return{actionType:qs.Exit,poolId:e.poolId,encodedUserData:e.exitPoolRequest.userData,outputReferences:e.outputReferences}}static mapUnwrapRequest(e,t,a){return{actionType:qs.Unwrap,poolId:a,amount:e,outputReference:t}}}const Hs=gt.createInterface();function Ks(e){X.getInstance()}class $s{constructor(t,o,i){this.poolGraph=t,this.simulationService=i,this.createCalls=async(e,t,a,n,o)=>{const{multiRequests:i,encodedCalls:s,outputIndexes:r,deltas:l}=this.createActionCalls(e,t,a,n);o&&s.unshift(this.createSetRelayerApproval(o));return{multiRequests:i,encodedCall:Hs.encodeFunctionData("multicall",[s]),outputIndexes:o?r.map((e=>e+1)):r,deltas:l}},this.amountsOutByJoinPath=async(e,t,o,i,s,r,l,d)=>{const p=await this.simulationService.simulateGeneralisedJoin(this.relayer,t,o,s,e,i,r,l,d),u=p.reduce(((e,t)=>e.add(n.BigNumber.from(t))),a.Zero).toString();return{amountsOut:p,totalAmountOut:u}},this.minAmountsOutByJoinPath=(e,t,a)=>({minAmountsOut:t.map((t=>$e(n.BigNumber.from(t),n.BigNumber.from(e)).toString())),totalMinAmountOut:$e(n.BigNumber.from(a),n.BigNumber.from(e)).toString()}),this.createActionCalls=(e,t,a,n)=>{const o=[],i=[],s=[],r=!n,l={};return e.forEach(((e,d)=>{const p=e[0].isLeaf,u=[];if(e.forEach(((o,s)=>{var c,y;if(o.children.length>0&&0===o.children.filter((e=>this.shouldBeConsidered(e))).length)return void(o.index="0");const b=o.children.filter((e=>this.shouldBeConsidered(e))).some((e=>"input"===e.joinAction))?t:this.relayer,m=s===e.length-1,f=null!==(y=p&&(null===(c=o.parent)||void 0===c?void 0:c.children.filter((e=>this.shouldBeConsidered(e))).some((e=>"input"===e.joinAction))))&&void 0!==y&&y,T=m||f?t:this.relayer,h=m&&n?n[d]:"0";switch(o.joinAction){case"batchSwap":{const{modelRequest:e,encodedCall:t,assets:n,amounts:s}=this.createSwap(o,d,h,b,T,a,r);u.push(e),i.push(t),this.updateDeltas(l,n,s)}break;case"joinPool":{const{modelRequest:e,encodedCall:t,assets:n,amounts:s,minBptOut:p}=this.createJoinPool(o,d,h,b,T,a,r);u.push(e),i.push(t),this.updateDeltas(l,[o.address,...n],[p,...s])}break;default:return}})),r){const e=100*d,t=ds.encodePeekChainedReferenceValue(ds.toChainedReference(e,!1));i.push(t),s.push(i.indexOf(t))}o.push(u)})),{multiRequests:o,encodedCalls:i,outputIndexes:s,deltas:l}},this.createSetRelayerApproval=e=>ds.encodeSetRelayerApproval(this.relayer,!0,e),this.createSwap=(t,o,i,s,r,l,d)=>{var p;if(1!==t.children.length)throw new Error("Unsupported swap");const u=t.children[0].address,c=this.getOutputRefValue(o,t.children[0]),y=i,b=l&&!d?this.replaceWrappedNativeAsset([u])[0]:u,m={poolId:t.id,kind:e.SwapType.SwapExactIn,assetIn:b,assetOut:t.address,amount:c.value,userData:"0x"},f={sender:s,recipient:r,fromInternalBalance:this.allImmediateChildrenSendToInternal(t),toInternalBalance:this.allSiblingsSendToInternal(t)},T=n.BigNumber.from(this.getOutputRefValue(o,t).value),h=l&&!d?Ve([b],[c.value]):a.Zero,I={request:m,funds:f,limit:y,deadline:n.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:h,outputReference:T},g=ds.encodeSwap(I);Ks(),Ks(JSON.stringify(I)),Ks(JSON.stringify(null===(p=I.value)||void 0===p?void 0:p.toString()));const _=Ws.mapSwapRequest(I),P=t.children.some((e=>"input"===e.joinAction))?c.value:"0",w=null!=t.parent?"0":n.BigNumber.from(i).mul(-1).toString();return{modelRequest:_,encodedCall:g,assets:[t.address,u],amounts:[w,P]}},this.createJoinPool=(t,n,o,i,s,r,l)=>{var d;const p=[],u=[];t.children.forEach((e=>{p.push(e.address),this.shouldBeConsidered(e)?u.push(this.getOutputRefValue(n,e).value):u.push("0")})),t.type===e.PoolType.ComposableStable&&(p.push(t.address),u.push("0"));const c=new z(this.wrappedNativeAsset),[y,b]=c.sortTokens(p,u);let m=[];const f=y.map((e=>e.toLowerCase())).indexOf(t.address.toLowerCase());let T;m=-1===f?b:[...b.slice(0,f),...b.slice(f+1)],T=t.type===e.PoolType.Weighted?v.joinExactTokensInForBPTOut(m,o):S.joinExactTokensInForBPTOut(m,o);const h=r&&!l?Ve(this.replaceWrappedNativeAsset(y),b):a.Zero,I=this.allImmediateChildrenSendToInternal(t),g=ds.formatJoinPoolInput({poolId:t.id,kind:0,sender:i,recipient:s,value:h,outputReference:this.getOutputRefValue(n,t).value,joinPoolRequest:{},assets:r&&!l?this.replaceWrappedNativeAsset(y):y,maxAmountsIn:b,userData:T,fromInternalBalance:I}),_=ds.encodeJoinPool(g);Ks(),Ks(JSON.stringify(g)),Ks(JSON.stringify(null===(d=g.value)||void 0===d?void 0:d.toString()));const P=Ws.mapJoinPoolRequest(g),w=b.map((e=>ds.isChainedReference(e)?"0":e)),x=ds.isChainedReference(o)?"0":o,E=t.children.filter((e=>this.shouldBeConsidered(e))).some((e=>"input"===e.joinAction));return{modelRequest:P,encodedCall:_,assets:E?y:[],amounts:E?w:[],minBptOut:null!=t.parent?a.Zero.toString():a.Zero.sub(x).toString()}},this.getOutputRefValue=(e,t)=>"input"===t.joinAction?{value:t.index,isRef:!1}:"0"===t.index&&t.parent?{value:"0",isRef:!0}:{value:ds.toChainedReference(n.BigNumber.from(t.index).add(100*e)).toString(),isRef:!0},this.shouldBeConsidered=e=>"0"!==e.index,this.sendsToInternalBalance=e=>"input"!==e.joinAction&&"joinPool"!==e.joinAction,this.allImmediateChildrenSendToInternal=e=>{const t=e.children.filter((e=>this.shouldBeConsidered(e)));return 0!==t.length&&t.filter((e=>this.sendsToInternalBalance(e))).length===t.length},this.allSiblingsSendToInternal=e=>{if(!e.parent)return!1;const t=e.parent.children.filter((e=>this.shouldBeConsidered(e)));return t.filter((e=>this.sendsToInternalBalance(e))).length===t.length},this.replaceWrappedNativeAsset=e=>{const t=e.findIndex((e=>e.toLowerCase()===this.wrappedNativeAsset.toLowerCase()));return Ye(e,t,a.AddressZero)};const{tokens:s,contracts:r}=Ca(o.chainId);this.relayer=r.balancerRelayer,this.wrappedNativeAsset=s.wrappedNativeAsset}checkInputs(t,n){if(0===t.length)throw new Ma(e.BalancerErrorCode.MISSING_TOKENS);if(n.every((e=>"0"===e)))throw new Ma(e.BalancerErrorCode.JOIN_WITH_ZERO_AMOUNT);if(t.length!=n.length)throw new Ma(e.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(t.some((e=>e===a.AddressZero))&&t.some((e=>e.toLowerCase()===this.wrappedNativeAsset.toLowerCase())))throw new Ma(e.BalancerErrorCode.INPUT_TOKEN_INVALID)}async joinPool(e,t,n,o,i,s,r,l){this.checkInputs(t,n);const d=await this.poolGraph.getGraphNodes(!0,e,[]),p=t.findIndex((e=>e===a.AddressZero)),u=-1!==p,c=Ye(t,p,this.wrappedNativeAsset.toLowerCase()),y=$s.getJoinPaths(d,c,n),b=$s.totalBptZeroPriceImpact(y);Ks();const{multiRequests:m,encodedCall:f,outputIndexes:T}=await this.createCalls(y,o,u,void 0,l),{amountsOut:h,totalAmountOut:I}=await this.amountsOutByJoinPath(o,m,f,c,T,s,r,"0"),{minAmountsOut:g,totalMinAmountOut:_}=this.minAmountsOutByJoinPath(i,h,I),P=Fa(BigInt(I),b.toBigInt(),!0).toString();Ks();const{encodedCall:w,deltas:x}=await this.createCalls(y,o,u,g,l),E=u?x[this.wrappedNativeAsset.toLowerCase()]:a.Zero;return Ks(E.toString()),this.assertDeltas(e,x,c,n,_),{to:this.relayer,encodedCall:w,expectedOut:I,minOut:_,priceImpact:P,value:E}}assertDeltas(t,a,o,i,s){var r;const l=N(t);if(a[l.toLowerCase()].add(s).abs().gt(3))throw console.error("join assertDeltas, bptOut: ",l,s,null===(r=a[l.toLowerCase()])||void 0===r?void 0:r.toString()),new Ma(e.BalancerErrorCode.JOIN_DELTA_AMOUNTS);delete a[l.toLowerCase()],o.forEach(((t,o)=>{var s,r;if(!n.BigNumber.from(i[o]).eq(0)&&(null===(s=a[t.toLowerCase()])||void 0===s?void 0:s.toString())!==i[o])throw console.error("join assertDeltas, tokenIn: ",t,i[o],null===(r=a[t.toLowerCase()])||void 0===r?void 0:r.toString()),new Ma(e.BalancerErrorCode.JOIN_DELTA_AMOUNTS);delete a[t.toLowerCase()]}));for(const t in a)if("0"!==a[t].toString())throw console.error("join assertDeltas, non-input token should be 0: ",t,a[t].toString()),new Ma(e.BalancerErrorCode.JOIN_DELTA_AMOUNTS)}updateDeltas(e,t,n){return t.forEach(((t,o)=>{const i=t.toLowerCase();e[i]||(e[i]=a.Zero),e[i]=e[i].add(n[o])})),e}}Gs=$s,$s.getJoinPaths=(e,t,o)=>{const i=[],s=e.filter((e=>t.filter(((e,t)=>n.BigNumber.from(o[t]).gt(0))).map((e=>e.toLowerCase())).includes(e.address.toLowerCase())));s.some((e=>e.isLeaf))&&i.push(e);const l=s.filter((e=>!e.isLeaf));return l.forEach((e=>{const s=o.find(((a,n)=>je(t[n],e.address))),d=l.filter((t=>je(t.address,e.address))).reduce(((e,t)=>e.add(t.proportionOfParent)),n.BigNumber.from(0)),p=n.BigNumber.from(s).mul(e.proportionOfParent).div(d).toString(),[u]=Os.createInputTokenNode(0,e.address,e.decimals,e.parent,a.WeiPerEther,e.balance);u.index=p,u.isLeaf=!1;const c=[u];let y=u.parent,b=u;for(;y;){const e=r.cloneDeep(y);e.children=e.children.map((e=>e.address===b.address?b:{...e,index:"0"})),c.push(e),b=e,y=e.parent}i.push(c)})),Gs.updateInputAmounts(i,t,o),i},$s.updateInputAmounts=(e,t,a)=>{const o=(e,t)=>{if(e.length>1){const a=e.reduce(((e,t)=>e.add(t.index)),n.BigNumber.from(0)),o=n.BigNumber.from(t).sub(a);e[0].index=o.add(e[0].index).toString()}},i=e.find((e=>e[0].isLeaf));if(i){const e=Gs.updateTotalProportions(i);i.forEach((n=>{"input"===n.joinAction&&(n=Gs.updateNodeAmount(n,t,a,e))})),t.forEach(((e,t)=>{const n=i.filter((t=>t.isLeaf&&je(t.address,e)));o(n,a[t])}))}const s=e.filter((e=>!e[0].isLeaf));s.length>1&&t.forEach(((e,t)=>{const n=s.map((e=>e[0])).filter((t=>je(t.address,e)));o(n,a[t])}))},$s.totalBptZeroPriceImpact=e=>{let t=n.BigNumber.from("0");return e.forEach((e=>{if(e[0].isLeaf){e.filter((e=>e.isLeaf)).forEach((e=>{const a=Gs.bptOutZeroPiForInputNode(e);t=t.add(a)}))}else{const a=Gs.bptOutZeroPiForInputNode(e[0]);t=t.add(a)}})),t},$s.bptOutZeroPiForInputNode=e=>{if("0"===e.index||"input"!==e.joinAction)return BigInt(0);let t=1,a=e.parent,o=e.address;for(;void 0!==a;){if("batchSwap"===a.joinAction||"joinPool"===a.joinAction){const e=a.spotPrices[o.toLowerCase()];t*=parseFloat(e),o=a.address}a=a.parent}const i=n.parseFixed(t.toFixed(18),18),s=le(BigInt(e.decimals)),r=de(BigInt(e.index),s);return ye.divDownFixed(r,i.toBigInt())},$s.updateTotalProportions=e=>{const t={};return e.forEach((e=>{t[e.address]?t[e.address]=t[e.address].add(e.proportionOfParent):t[e.address]=e.proportionOfParent})),t},$s.updateNodeAmount=(e,t,a,n)=>{const o=t.map((e=>e.toLowerCase())).indexOf(e.address.toLowerCase());if(-1===o)return e.index="0",e;const i=n[e.address],s=e.proportionOfParent.mul(1e18.toString()).div(i).mul(a[o]).div(1e18.toString());return e.index=s.toString(),e};class Js{constructor(e,t){this.chainId=e,this.simulateMulticall=async(e,t,a,n,o="0")=>{const i={...await this.encodeBalanceAndAllowanceOverrides(a,n),...await this.encodeRelayerApprovalOverride(a,e)};return this.simulateTransaction(e,t,a,i,o)},this.simulateTransaction=async(e,t,a,o,i)=>{const s=Object.fromEntries(Object.keys(o).map((e=>[e,{storage:o[e].value}]))),r={...s,[a]:{balance:n.parseFixed("100",18).toHexString()}},l={network_id:this.chainId.toString(),block_number:this.blockNumber,from:a,to:e,input:t,value:i,save_if_fails:!0,simulation_type:"quick",state_objects:r},d=this.tenderlyUrl+"simulate";return(await E.default.post(d,l,this.opts)).data.transaction.transaction_info.call_trace.output},this.encodeRelayerApprovalOverride=async(e,t)=>{const a={[`${this.vaultAddress}`]:{value:{[`_approvedRelayers[${e}][${t}]`]:(!0).toString()}}};return await this.requestStateOverrides(a)},this.encodeBalanceAndAllowanceOverrides=async(e,t)=>{const n=t.filter((e=>e!==a.AddressZero));if(0===n.length)return{};let o={};n.forEach((t=>o={...o,[`${t}`]:{value:{[`_balances[${e}]`]:a.MaxInt256.toString(),[`_allowances[${e}][${this.vaultAddress}]`]:a.MaxInt256.toString(),[`balanceOf[${e}]`]:a.MaxInt256.toString(),[`allowance[${e}][${this.vaultAddress}]`]:a.MaxInt256.toString(),[`balances[${e}]`]:a.MaxInt256.toString(),[`allowed[${e}][${this.vaultAddress}]`]:a.MaxInt256.toString()}}}));const i=await this.requestStateOverrides(o);if(Object.keys(i).some((e=>2!==Object.keys(i[e].value).length)))throw new Error("Couldn't encode state overrides - states should match the ones in the contracts");return i},this.requestStateOverrides=async e=>{const t=this.tenderlyUrl+"contracts/encode-states",a={networkID:this.chainId.toString(),stateOverrides:e},n=(await E.default.post(t,a,this.opts)).data.stateOverrides;if(!n||Object.keys(n).length!==Object.keys(e).length)throw new Error("Couldn't encode state overrides - contracts should be verified and whitelisted on Tenderly");return n};const{contracts:o}=Ca(this.chainId);this.vaultAddress=o.vault,this.tenderlyUrl=`https://api.tenderly.co/api/v1/account/${t.user}/project/${t.project}/`,this.opts={headers:{"X-Access-Key":t.accessKey}},this.blockNumber=t.blockNumber}}var js;e.SimulationType=void 0,(js=e.SimulationType||(e.SimulationType={}))[js.Tenderly=0]="Tenderly",js[js.VaultModel=1]="VaultModel",js[js.Static=2]="Static";class Xs{constructor(a,n){this.simulateGeneralisedJoin=async(t,a,n,o,i,s,r,l,d)=>{const p=[];switch(l){case e.SimulationType.Tenderly:{if(!this.tenderlyHelper)throw new Error("Missing Tenderly config");const e=await this.tenderlyHelper.simulateMulticall(t,n,i,s,d);p.push(...this.decodeResult(e,o));break}case e.SimulationType.VaultModel:{const e=await this.simulateRequests(a);p.push(...e);break}case e.SimulationType.Static:{const e=await r.call({to:t,data:n,value:d});try{p.push(...this.decodeResult(e,o))}catch(t){const a=Buffer.from(e.split("x")[1],"hex").toString("utf8");throw new Error(`Transaction reverted with error: ${a}`)}break}default:throw new Error("Simulation type not supported")}return p},this.simulateGeneralisedExit=async(t,a,n,o,i,s,r,l)=>{const d=[];switch(l){case e.SimulationType.Tenderly:{if(!this.tenderlyHelper)throw new Error("Missing Tenderly config");const e=await this.tenderlyHelper.simulateMulticall(t,n,i,[s]);d.push(...this.decodeResult(e,o));break}case e.SimulationType.VaultModel:{const e=await this.simulateRequests(a);d.push(...e);break}case e.SimulationType.Static:{const e=await r.call({to:t,data:n});try{d.push(...this.decodeResult(e,o))}catch(t){const a=Buffer.from(e.split("x")[1],"hex").toString("utf8");throw new Error(`Transaction reverted with error: ${a}`)}break}default:throw new Error("Simulation type not supported")}return d},this.decodeResult=(e,a)=>{const n=t.defaultAbiCoder.decode(["bytes[]"],e)[0];return a.map((e=>t.defaultAbiCoder.decode(["uint256"],n[e]).toString()))},this.simulateRequests=async e=>{if(void 0===this.vaultModel)throw new Error("Missing Vault Model Config.");const t=[];for(const[a,n]of e.entries()){const e=await this.vaultModel.multicall(n,0===a),o=Object.values(e).filter((e=>e.lt(0)));if(0===o.length)throw new Error("No delta found for token out.");t.push(...o.map((e=>e.mul(-1).toString())))}return t},a.tenderly&&(this.tenderlyHelper=new Js(a.chainId,a.tenderly)),this.vaultModel=n?new Ws(n,a.addresses.tokens.wrappedNativeAsset):void 0}}const Ys=gt.createInterface();function zs(e){X.getInstance()}class Zs{constructor(e,t,o){this.poolGraph=e,this.simulationService=o,this.amountsOutByExitPath=async(e,t,a,n,o,i,s)=>await this.simulationService.simulateGeneralisedExit(this.relayer,t,a,o,e,n,i,s),this.amountsOutByTokenOut=(e,t,n)=>{const o={};t.forEach(((e,t)=>{var i;return o[e]=(null!==(i=o[e])&&void 0!==i?i:a.Zero).add(n[t])}));return e.map((e=>o[e].toString()))},this.minAmountsOut=(e,t,a)=>({minAmountsOutByExitPath:e.map((e=>$e(n.BigNumber.from(e),n.BigNumber.from(a)).toString())),minAmountsOutByTokenOut:t.map((e=>$e(n.BigNumber.from(e),n.BigNumber.from(a)).toString()))}),this.getExitPaths=(e,t)=>{const o=e.map((e=>{const n=[e];for(;n[0].parent;)n.unshift(r.cloneDeep(n[0].parent));return n[0].index=n[n.length-1].proportionOfParent.mul(t).div(a.WeiPerEther).toString(),n})),i=o.reduce(((e,t)=>{const a=t[0].index;return n.BigNumber.from(a).add(e)}),a.Zero),s=n.BigNumber.from(t).sub(i);return o[o.length-1][0].index=s.add(o[o.length-1][0].index).toString(),o},this.createUnwrap=(e,t,n,o,i,s)=>{var r,l;const d=ds.toChainedReference(this.getOutputRef(n,e.index)).toString(),p=ds.toChainedReference(this.getOutputRef(n,t.index)),u=null===(r=e.parent)||void 0===r?void 0:r.type,c={wrappedToken:e.address,sender:i,recipient:s,amount:d,outputReference:p},y=ds.encodeUnwrap(c,u);zs(),zs(),zs(JSON.stringify(c));return{modelRequest:Ws.mapUnwrapRequest(d,p,null===(l=e.parent)||void 0===l?void 0:l.id),encodedCall:y,assets:[t.address],amounts:[a.Zero.sub(o).toString()]}},this.getOutputRef=(e,t)=>100*e+parseInt(t),this.receivesFromInternal=e=>!!e.parent&&("output"!==e.exitAction&&"unwrap"!==e.exitAction&&"exitPool"!==e.exitAction);const{tokens:i,contracts:s}=Ca(t.chainId);this.wrappedNativeAsset=i.wrappedNativeAsset,this.relayer=s.balancerRelayer}async getExitInfo(t,a,n,o){zs();const i=await this.getExit(t,a,n,o,[],e.SimulationType.VaultModel);return{tokensOut:i.tokensOut,estimatedAmountsOut:i.expectedAmountsOut,priceImpact:i.priceImpact,tokensToUnwrap:i.tokensToUnwrap}}async buildExitCall(e,t,a,n,o,i,s,r){zs();const l=await this.getExit(e,t,a,o,null!=r?r:[],i,s),{minAmountsOutByExitPath:d,minAmountsOutByTokenOut:p}=this.minAmountsOut(l.expectedAmountsOutByExitPath,l.expectedAmountsOut,n);zs();const{encodedCall:u,deltas:c}=await this.createCalls(l.exitPaths,a,l.isProportional,d,s);return this.assertDeltas(e,c,t,l.tokensOut,p),{to:this.relayer,encodedCall:u,tokensOut:l.tokensOut,expectedAmountsOut:l.expectedAmountsOut,minAmountsOut:p,priceImpact:l.priceImpact}}async getExit(e,t,a,o,i,s,r){const l=await this.poolGraph.getGraphNodes(!1,e,i),d=Os.isProportionalPools(l);zs();let p=[],u=[],c=[];const y=l.filter((e=>"output"===e.exitAction));if(u=y.map((e=>e.address.toLowerCase())),c=[...new Set(u)].sort(),d){const e=l.map(((e,a)=>(0===a&&(e.index=t),e)));p[0]=e}else p=this.getExitPaths(y,t);const{multiRequests:b,encodedCall:m,outputIndexes:f}=await this.createCalls(p,a,d,void 0,r),T=await this.amountsOutByExitPath(a,b,m,l[0].address,f,o,s),h=y.filter(((e,t)=>n.BigNumber.from(T[t]).gt(e.balance))).map((e=>e.address.toLowerCase()));if(i.some((e=>h.includes(e.toLowerCase()))))throw new Error("Insufficient pool balance to perform generalised exit - try exitting with smaller amounts");if(h.length>0)return await this.getExit(e,t,a,o,[...new Set(h)].sort(),s,r);{const a=this.amountsOutByTokenOut(c,u,T),n=await this.calculatePriceImpact(e,this.poolGraph,c,a,t);return{tokensToUnwrap:i,tokensOut:c,exitPaths:p,isProportional:d,expectedAmountsOut:a,expectedAmountsOutByExitPath:T,priceImpact:n}}}async calculatePriceImpact(e,t,a,n,o){const i=await t.getGraphNodes(!0,e,[]),s=$s.getJoinPaths(i,a,n),r=$s.totalBptZeroPriceImpact(s);return Fa(BigInt(o),r.toBigInt(),!1).toString()}assertDeltas(t,a,n,o,i){var s;const r=N(t);if(a[r.toLowerCase()].sub(n).abs().gt(3))throw console.error("exit assertDeltas, bptIn: ",r,n,null===(s=a[r.toLowerCase()])||void 0===s?void 0:s.toString()),new Ma(e.BalancerErrorCode.EXIT_DELTA_AMOUNTS);delete a[r.toLowerCase()],o.forEach(((t,n)=>{var o;if(a[t.toLowerCase()].add(i[n]).abs().gt(1))throw console.error("exit assertDeltas, tokenOut: ",t,i[n],null===(o=a[t.toLowerCase()])||void 0===o?void 0:o.toString()),new Ma(e.BalancerErrorCode.EXIT_DELTA_AMOUNTS);delete a[t.toLowerCase()]}));for(const t in a)if("0"!==a[t].toString())throw console.error("exit assertDeltas, non-input token should be 0: ",t,a[t].toString()),new Ma(e.BalancerErrorCode.EXIT_DELTA_AMOUNTS)}async createCalls(e,t,a,n,o){const{multiRequests:i,calls:s,outputIndexes:l,deltas:d}=this.createActionCalls(r.cloneDeep(e),t,a,n);o&&s.unshift(ds.encodeSetRelayerApproval(this.relayer,!0,o));return{multiRequests:i,encodedCall:Ys.encodeFunctionData("multicall",[s]),outputIndexes:o?l.map((e=>e+1)):l,deltas:d}}updateDeltas(e,t,n){return t.forEach(((t,o)=>{const i=t.toLowerCase();e[i]||(e[i]=a.Zero),e[i]=e[i].add(n[o])})),e}createActionCalls(e,t,n,o){const i=[],s=[],r=[],l=!o,d={},p=(e,a)=>a.children.filter((t=>e.map((e=>e.index)).includes(t.index))).some((e=>"output"===e.exitAction))?t:this.relayer;return e.forEach(((e,u)=>{const c=[],y=e.filter((e=>"output"===e.exitAction));e.forEach((i=>{const b=i.children.find((t=>e.map((e=>e.index)).includes(t.index))),m=((e,a)=>a.parent?p(e,a.parent):t)(e,i),f=p(e,i),T=i.children.filter((t=>e.map((e=>e.index)).includes(t.index))).some((e=>"output"===e.exitAction||"unwrap"===e.exitAction));let h="0";const I=Array(i.children.length).fill("0");switch(o&&T&&(n?i.children.forEach(((e,t)=>{let n;"unwrap"===e.exitAction?(n=y.indexOf(e.children[0]),h=a.WeiPerEther.mul(o[n]).div(e.priceRate).toString()):"output"===e.exitAction?(n=y.indexOf(e),h=o[n]):h="0",I[t]=h})):h="unwrap"===(null==b?void 0:b.exitAction)?a.WeiPerEther.mul(o[u]).div(b.priceRate).toString():o[u]),i.exitAction){case"unwrap":{const{modelRequest:e,encodedCall:t,assets:a,amounts:n}=this.createUnwrap(i,b,u,h,m,f);c.push(e),s.push(t),this.updateDeltas(d,a,n);break}case"batchSwap":{const{modelRequest:e,encodedCall:t,assets:a,amounts:n}=this.createSwap(i,b,u,h,m,f);c.push(e),s.push(t),this.updateDeltas(d,a,n);break}case"exitPool":{let e;e=n?this.createExitPoolProportional(i,I,m,f):this.createExitPool(i,b,u,h,m,f);const{modelRequest:t,encodedCall:a,bptIn:o,tokensOut:r,amountsOut:l}=e;c.push(t),s.push(a),this.updateDeltas(d,[i.address,...r],[o,...l]);break}case"output":l&&(s.push(ds.encodePeekChainedReferenceValue(ds.toChainedReference(this.getOutputRef(u,i.index),!1))),r.push(s.length-1));break;default:return}})),i.push(c)})),{multiRequests:i,calls:s,outputIndexes:r,deltas:d}}createSwap(t,a,o,i,s,r){const l=!t.parent,d=l?t.index:ds.toChainedReference(this.getOutputRef(o,t.index)).toString(),p=a.address,u=[p,t.address],c=i,y={poolId:t.id,kind:e.SwapType.SwapExactIn,assetIn:t.address,assetOut:p,amount:d,userData:"0x"},b={sender:s,recipient:r,fromInternalBalance:this.receivesFromInternal(t),toInternalBalance:this.receivesFromInternal(a)},m=ds.toChainedReference(this.getOutputRef(o,a.index)),f={request:y,funds:b,limit:c,deadline:n.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReference:m};zs(),zs(JSON.stringify(f));const T=ds.encodeSwap(f),h=l?d:"0";return{modelRequest:Ws.mapSwapRequest(f),encodedCall:T,assets:u,amounts:["output"!==a.exitAction?"0":n.BigNumber.from(i).mul(-1).toString(),h]}}createBatchSwap(t,o,i,s,r,l){const d=!t.parent,p=d?t.index:ds.toChainedReference(this.getOutputRef(i,t.index)).toString(),u=[...o.map((e=>e.address)),t.address],c=[...s];c.push(p);const y=[],b=[];o.forEach(((e,n)=>{const o=e.proportionOfParent.mul(p).div(a.WeiPerEther).toString(),i={poolId:t.id,assetInIndex:u.length-1,assetOutIndex:n,amount:o,userData:"0x"};y.push(i),b.push({index:n,key:ds.toChainedReference(this.getOutputRef(0,e.index))})}));const m=y.reduce(((e,t)=>e.add(t.amount)),n.BigNumber.from(0)),f=n.BigNumber.from(p).sub(m);y[0].amount=f.add(y[0].amount).toString();const T={sender:r,recipient:l,fromInternalBalance:this.receivesFromInternal(t),toInternalBalance:this.receivesFromInternal(o[0])},h={swapType:e.SwapType.SwapExactIn,swaps:y,assets:u,funds:T,limits:c,deadline:n.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:b};zs(),zs(JSON.stringify(h));const I=ds.encodeBatchSwap(h),g=Ws.mapBatchSwapRequest(h),_=d?p:"0",P=[...o.map(((e,t)=>"output"!==e.exitAction?"0":n.BigNumber.from(s[t]).mul(-1).toString())),_];return{modelRequest:g,encodedCall:I,assets:u,amounts:P}}createExitPool(t,n,o,i,s,r){const l=n.address,d=!t.parent,p=d?t.index:ds.toChainedReference(this.getOutputRef(o,t.index)).toString(),u=[],c=[];t.children.forEach((e=>{u.push(e.address),c.push(e.address===l?i:"0")})),t.type===e.PoolType.ComposableStable&&(u.push(t.address),c.push("0"));const y=new z(this.wrappedNativeAsset),[b,m]=y.sortTokens(u,c);let f=[];const T=b.map((e=>e.toLowerCase())).indexOf(t.address.toLowerCase());let h;f=-1===T?b:[...b.slice(0,T),...b.slice(T+1)],h=t.type===e.PoolType.Weighted?v.exitExactBPTInForOneTokenOut(p,f.indexOf(l)):S.exitExactBPTInForOneTokenOut(p,f.indexOf(l));const I=[{index:b.map((e=>e.toLowerCase())).indexOf(l.toLowerCase()),key:ds.toChainedReference(this.getOutputRef(o,n.index))}],g=this.receivesFromInternal(n),_=ds.formatExitPoolInput({poolId:t.id,poolKind:0,sender:s,recipient:r,outputReferences:I,exitPoolRequest:{},assets:b,minAmountsOut:m,userData:h,toInternalBalance:g});zs(),zs(JSON.stringify(_));const P=ds.encodeExitPool(_),w=Ws.mapExitPoolRequest(_),x=m.map((e=>ds.isChainedReference(e)?"0":a.Zero.sub(e).toString())),E=ds.isChainedReference(p)?"0":p;return{modelRequest:w,encodedCall:P,bptIn:d?E:a.Zero.toString(),tokensOut:"output"!==n.exitAction?[]:b,amountsOut:"output"!==n.exitAction?[]:x}}createExitPoolProportional(t,n,o,i){const s=!t.parent,r=s?t.index:ds.toChainedReference(this.getOutputRef(0,t.index)).toString(),l=t.children.map((e=>e.address)),d=[...n];t.type===e.PoolType.ComposableStable&&(l.push(t.address),d.push("0"));const p=new z(this.wrappedNativeAsset),[u,c]=p.sortTokens(l,d);let y;y=t.type===e.PoolType.Weighted?v.exitExactBPTInForTokensOut(r):t.type===e.PoolType.ComposableStable?O.exitExactBPTInForAllTokensOut(r):S.exitExactBPTInForTokensOut(r);const b=t.children.map((e=>({index:u.map((e=>e.toLowerCase())).indexOf(e.address.toLowerCase()),key:ds.toChainedReference(this.getOutputRef(0,e.index))})));let m=0;t.type===e.PoolType.ComposableStable&&(m=3);const f=t.children.every((e=>this.receivesFromInternal(e))),T=ds.formatExitPoolInput({poolId:t.id,poolKind:m,sender:o,recipient:i,outputReferences:b,exitPoolRequest:{},assets:u,minAmountsOut:c,userData:y,toInternalBalance:f});zs(),zs(JSON.stringify(T));const h=ds.encodeExitPool(T),I=Ws.mapExitPoolRequest(T),g=c.map((e=>ds.isChainedReference(e)?"0":a.Zero.sub(e).toString())),_=ds.isChainedReference(r)?"0":r,P=s?_:a.Zero.toString(),w=u.filter((e=>t.children.filter((e=>"output"===e.exitAction)).map((e=>e.address)).includes(e))),x=g.filter(((e,t)=>w.includes(u[t])));return{modelRequest:I,encodedCall:h,bptIn:P,tokensOut:w,amountsOut:x}}}class Qs{constructor(e){this.yesterdaysPools=e}async last24h(e){let t;return this.yesterdaysPools&&(t=await this.yesterdaysPools.find(e.id)),e.totalSwapVolume?(null==t?void 0:t.totalSwapVolume)?parseFloat(e.totalSwapVolume)-parseFloat(t.totalSwapVolume):e.createTime&&bs(e.createTime)?parseFloat(e.totalSwapVolume):0:0}}class er{constructor(t,a){this.checkCreateInputs=({tokenAddresses:t,tokenRateCacheDurations:a,exemptFromYieldProtocolFeeFlags:n,rateProviders:o,swapFeeEvm:i})=>{if(t.length!==a.length||a.length!==n.length||n.length!==o.length)throw new Ma(e.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(BigInt(i)<=BigInt(0)||BigInt(i)>BigInt(1e17))throw new Ma(e.BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE)},this.parseCreateParamsForEncoding=({name:e,symbol:t,tokenAddresses:a,amplificationParameter:n,rateProviders:o,tokenRateCacheDurations:i,exemptFromYieldProtocolFeeFlags:s,swapFeeEvm:r,owner:l,salt:d})=>{const p=new z(this.wrappedNativeAsset),[u,c,y,b]=p.sortTokens(a,o,i,s);return[e,t,u,n,c,y,b,r.toString(),l,d||tt()]},this.encodeCreateFunctionData=e=>At.createInterface().encodeFunctionData("create",e),this.checkInitJoinInputs=({poolId:t,poolAddress:a,tokensIn:n,amountsIn:o})=>{if(!t||!a)throw new Ma(e.BalancerErrorCode.NO_POOL_DATA);if(n.length!==o.length)throw new Ma(e.BalancerErrorCode.INPUT_LENGTH_MISMATCH)},this.parseParamsForInitJoin=({joiner:e,poolId:t,poolAddress:a,tokensIn:n,amountsIn:o})=>{const i=new z(this.wrappedNativeAsset),s=[...n,a],r=[...o,"0"],l=[...o,BigInt.asUintN(256,BigInt(-1)).toString()],[d,p,u]=i.sortTokens(s,r,l),c={poolId:t,sender:e,recipient:e,joinPoolRequest:{assets:d,maxAmountsIn:u,userData:O.joinInit(p),fromInternalBalance:!1}};return{attributes:c,params:[c.poolId,c.sender,c.recipient,c.joinPoolRequest]}},this.encodeInitJoinFunctionData=e=>{const t="joinPool";return{functionName:t,data:pa.createInterface().encodeFunctionData(t,e)}},this.getPoolAddressAndIdWithReceipt=async(e,t)=>{var a;const n=et({receipt:t,to:(null===(a=this.contracts.composableStablePoolFactory)||void 0===a?void 0:a.address)||"",contractInterface:At.createInterface(),logName:"PoolCreated"}).args.pool,o=this.getPoolInterface(),i=new b.Contract(n,o,e);return{poolAddress:n,poolId:await i.getPoolId()}};const{tokens:n}=Ca(t.chainId);this.wrappedNativeAsset=n.wrappedNativeAsset,this.contracts=a}create({name:e,symbol:t,tokenAddresses:a,amplificationParameter:n,rateProviders:o,tokenRateCacheDurations:i,exemptFromYieldProtocolFeeFlags:s,swapFeeEvm:r,owner:l,salt:d}){var p;this.checkCreateInputs({rateProviders:o,tokenAddresses:a,tokenRateCacheDurations:i,exemptFromYieldProtocolFeeFlags:s,swapFeeEvm:r});const u=this.parseCreateParamsForEncoding({name:e,symbol:t,tokenAddresses:a,amplificationParameter:n,rateProviders:o,tokenRateCacheDurations:i,exemptFromYieldProtocolFeeFlags:s,swapFeeEvm:r,owner:l,salt:d}),c=this.encodeCreateFunctionData(u);return{to:null===(p=this.contracts.composableStablePoolFactory)||void 0===p?void 0:p.address,data:c}}buildInitJoin({joiner:e,poolId:t,poolAddress:a,tokensIn:n,amountsIn:o}){this.checkInitJoinInputs({tokensIn:n,amountsIn:o,poolId:t,poolAddress:a});const{attributes:i,params:s}=this.parseParamsForInitJoin({joiner:e,poolId:t,poolAddress:a,tokensIn:n,amountsIn:o}),{functionName:r,data:l}=this.encodeInitJoinFunctionData(s);return{to:ka,functionName:r,data:l,attributes:i}}getPoolInterface(){return xt.createInterface()}}class tr{constructor(t,a){this.parseCreateParamsForEncoding=({name:e,symbol:t,tokenAddresses:a,normalizedWeights:n,rateProviders:o,swapFeeEvm:i,owner:s,salt:r})=>{const l=new z(this.wrappedNativeAsset),[d,p,u]=l.sortTokens(a,n,o);return[e,t,d,p,u,i.toString(),s,r||tt()]},this.encodeCreateFunctionData=e=>ba.createInterface().encodeFunctionData("create",e),this.parseParamsForInitJoin=({joiner:e,poolId:t,tokensIn:a,amountsIn:n})=>{const o=new z(this.wrappedNativeAsset),[i,s]=o.sortTokens(a,n),r={poolId:t,sender:e,recipient:e,joinPoolRequest:{assets:i,maxAmountsIn:s,userData:v.joinInit(s),fromInternalBalance:!1}};return{attributes:r,params:[r.poolId,r.sender,r.recipient,r.joinPoolRequest]}},this.encodeInitJoinFunctionData=e=>{const t="joinPool";return{functionName:t,data:pa.createInterface().encodeFunctionData(t,e)}},this.checkInitJoinInputs=({poolId:t,tokensIn:a,amountsIn:n})=>{if(!t)throw new Ma(e.BalancerErrorCode.NO_POOL_DATA);if(a.length!==n.length)throw new Ma(e.BalancerErrorCode.INPUT_LENGTH_MISMATCH)};const{tokens:n}=Ca(t.chainId);this.wrappedNativeAsset=n.wrappedNativeAsset,this.contracts=a}create({name:e,symbol:t,tokenAddresses:a,normalizedWeights:n,rateProviders:o,swapFeeEvm:i,owner:s,salt:r}){var l;this.checkCreateInputs({tokenAddresses:a,normalizedWeights:n,swapFeeEvm:i,rateProviders:o});const d=this.parseCreateParamsForEncoding({name:e,symbol:t,tokenAddresses:a,normalizedWeights:n,rateProviders:o,swapFeeEvm:i,owner:s,salt:r}),p=this.encodeCreateFunctionData(d);return{to:null===(l=this.contracts.weightedPoolFactory)||void 0===l?void 0:l.address,data:p}}checkCreateInputs({tokenAddresses:t,normalizedWeights:a,swapFeeEvm:n,rateProviders:o}){if(t.length!==a.length||a.length!==o.length)throw new Ma(e.BalancerErrorCode.INPUT_LENGTH_MISMATCH);if(t.length<2)throw new Ma(e.BalancerErrorCode.BELOW_MIN_TOKENS);if(t.length>8)throw new Ma(e.BalancerErrorCode.ABOVE_MAX_TOKENS);if(BigInt(n)<=BigInt(0)||BigInt(n)>BigInt(1e17))throw new Ma(e.BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE);if(a.reduce(((e,t)=>ye.add(e,BigInt(t))),BigInt(0))!==BigInt(1e18))throw new Ma(e.BalancerErrorCode.INVALID_WEIGHTS)}buildInitJoin({joiner:e,poolId:t,tokensIn:a,amountsIn:n}){this.checkInitJoinInputs({poolId:t,tokensIn:a,amountsIn:n});const{attributes:o,params:i}=this.parseParamsForInitJoin({joiner:e,poolId:t,tokensIn:a,amountsIn:n}),{functionName:s,data:r}=this.encodeInitJoinFunctionData(i);return{to:ka,functionName:s,data:r,attributes:o}}async getPoolAddressAndIdWithReceipt(e,t){var a;const n=et({receipt:t,to:(null===(a=this.contracts.weightedPoolFactory)||void 0===a?void 0:a.address)||"",contractInterface:ba.createInterface(),logName:"PoolCreated"}).args.pool,o=this.getPoolInterface(),i=new b.Contract(n,o,e);return{poolAddress:n,poolId:await i.getPoolId()}}getPoolInterface(){return ca.createInterface()}}var ar;e.ProtocolId=void 0,(ar=e.ProtocolId||(e.ProtocolId={}))[ar.AAVE_V1=0]="AAVE_V1",ar[ar.AAVE_V2=1]="AAVE_V2",ar[ar.AAVE_V3=2]="AAVE_V3",ar[ar.AMPLEFORTH=3]="AMPLEFORTH",ar[ar.BEEFY=4]="BEEFY",ar[ar.EULER=5]="EULER",ar[ar.GEARBOX=6]="GEARBOX",ar[ar.IDLE=7]="IDLE",ar[ar.MORPHO=8]="MORPHO",ar[ar.RADIANT=9]="RADIANT",ar[ar.REAPER=10]="REAPER",ar[ar.SILO=11]="SILO",ar[ar.STARGATE=12]="STARGATE",ar[ar.STURDY=13]="STURDY",ar[ar.TESSERA=14]="TESSERA",ar[ar.TETU=15]="TETU",ar[ar.YEARN=16]="YEARN",ar[ar.MIDAS=17]="MIDAS",ar[ar.AGAVE=18]="AGAVE";class nr{constructor(t,a){this.getPoolFactoryInterface=()=>{switch(this.poolType){case e.PoolType.AaveLinear:return lt.createInterface();case e.PoolType.Linear:case e.PoolType.ERC4626Linear:return Ft.createInterface();case e.PoolType.EulerLinear:return Dt.createInterface();case e.PoolType.GearboxLinear:return $t.createInterface();case e.PoolType.YearnLinear:return ha.createInterface();default:throw new Ma(e.BalancerErrorCode.UNSUPPORTED_POOL_TYPE)}},this.getPoolInterface=()=>{switch(this.poolType){case e.PoolType.AaveLinear:return st.createInterface();case e.PoolType.Linear:case e.PoolType.ERC4626Linear:return Ot.createInterface();case e.PoolType.EulerLinear:return Nt.createInterface();case e.PoolType.GearboxLinear:return Ht.createInterface();case e.PoolType.YearnLinear:return fa.createInterface();default:throw new Ma(e.BalancerErrorCode.UNSUPPORTED_POOL_TYPE)}},this.checkCreateInputs=({swapFeeEvm:t,protocolId:a})=>{if(!e.ProtocolId[a])throw new Ma(e.BalancerErrorCode.INVALID_PROTOCOL_ID);if(BigInt(t)<=BigInt(0)||BigInt(t)>BigInt(1e17))throw new Ma(e.BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE);this.getFactoryAddress()},this.parseCreateParamsForEncoding=({name:t,symbol:a,mainToken:n,wrappedToken:o,upperTargetEvm:i,swapFeeEvm:s,owner:r,protocolId:l,salt:d})=>this.poolType===e.PoolType.EulerLinear?[t,a,n,o,i,s,r,l.toString()]:[t,a,n,o,i,s,r,l.toString(),d||tt()],this.encodeCreateFunctionData=t=>{const a=this.getPoolFactoryInterface();return this.poolType,e.PoolType.EulerLinear,a.encodeFunctionData("create",t)},this.getFactoryAddress=()=>{switch(this.poolType){case e.PoolType.AaveLinear:if(this.contracts.aaveLinearPoolFactory)return this.contracts.aaveLinearPoolFactory.address;throw new Ma(e.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);case e.PoolType.Linear:case e.PoolType.ERC4626Linear:if(this.contracts.erc4626LinearPoolFactory)return this.contracts.erc4626LinearPoolFactory.address;throw new Ma(e.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);case e.PoolType.EulerLinear:if(this.contracts.eulerLinearPoolFactory)return this.contracts.eulerLinearPoolFactory.address;throw new Ma(e.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);case e.PoolType.GearboxLinear:if(this.contracts.gearboxLinearPoolFactory)return this.contracts.gearboxLinearPoolFactory.address;throw new Ma(e.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);case e.PoolType.YearnLinear:if(this.contracts.yearnLinearPoolFactory)return this.contracts.yearnLinearPoolFactory.address;throw new Ma(e.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);default:throw new Ma(e.BalancerErrorCode.UNSUPPORTED_POOL_TYPE)}},this.getPoolAddressAndIdWithReceipt=async(e,t)=>{const a=et({receipt:t,to:this.getFactoryAddress()||"",contractInterface:this.getPoolFactoryInterface(),logName:"PoolCreated"}).args.pool,n=this.getPoolInterface(),o=new b.Contract(a,n,e);return{poolAddress:a,poolId:await o.getPoolId()}},this.contracts=t,this.poolType=a}buildInitJoin(){throw new Ma(e.BalancerErrorCode.UNSUPPORTED_POOL_TYPE)}create({name:e,symbol:t,mainToken:a,wrappedToken:n,upperTargetEvm:o,swapFeeEvm:i,owner:s,protocolId:r,salt:l}){this.checkCreateInputs({swapFeeEvm:i,protocolId:r});const d=this.parseCreateParamsForEncoding({name:e,symbol:t,mainToken:a,wrappedToken:n,upperTargetEvm:o,swapFeeEvm:i,owner:s,protocolId:r,salt:l}),p=this.encodeCreateFunctionData(d);return{to:this.getFactoryAddress(),data:p}}}class or{constructor(e,t){this.networkConfig=e,this.contracts=t.contracts}of(t){switch(t){case"Weighted":return new tr(this.networkConfig,this.contracts);case"Investment":case"LiquidityBootstrapping":case"Stable":case"MetaStable":case"StablePhantom":default:throw new Ma(e.BalancerErrorCode.UNSUPPORTED_POOL_TYPE);case"ComposableStable":return new er(this.networkConfig,this.contracts);case"Linear":case"AaveLinear":case"ERC4626Linear":case"EulerLinear":case"GearboxLinear":case"YearnLinear":return new nr(this.contracts,t)}}}class ir{constructor(t){this.pool=t;const a=(t=>{switch(t){case e.PoolType.Weighted:return v;case e.PoolType.Stable:case e.PoolType.MetaStable:case e.PoolType.StablePhantom:case e.PoolType.Element:case e.PoolType.Gyro2:case e.PoolType.Gyro3:return S;case e.PoolType.ComposableStable:return O;default:if(Qe(t))return S}})(t.poolType);if(!a)throw"Pool type not supported";this.encoder=a}buildQueryJoinExactIn({maxAmountsInByToken:e,minimumBPT:t=a.Zero}){const o=this.pool.tokensList.findIndex((e=>this.pool.id.includes(e))),i=[...this.pool.tokensList],s=this.pool.tokensList.map((t=>{var a;return null!==(a=e.get(t))&&void 0!==a?a:n.BigNumber.from("0")}));let r;r=o>-1?ze(s,o):s;const l=this.encoder.joinExactTokensInForBPTOut(r,t);return[this.pool.id,a.AddressZero,a.AddressZero,{assets:i,maxAmountsIn:s,userData:l,fromInternalBalance:!1}]}buildQueryJoinExactOut({maxAmountIn:e,bptOut:t,tokenIn:n}){const o=this.pool.tokensList.findIndex((e=>this.pool.id.includes(e)));let i=[...this.pool.tokensList];o>-1&&(i=ze(this.pool.tokensList,o));const s=i.indexOf(n),r=this.encoder.joinTokenInForExactBPTOut(t,s),l=e?this.pool.tokensList.map((t=>t===n?e:"0")):[];return[this.pool.id,a.AddressZero,a.AddressZero,{assets:this.pool.tokensList,maxAmountsIn:l,userData:r,fromInternalBalance:!1}]}buildQueryExitToSingleToken({minAmountOut:e,bptIn:t,tokenOut:n}){const o=this.pool.tokensList.findIndex((e=>this.pool.id.includes(e)));let i=[...this.pool.tokensList];o>-1&&(i=ze(this.pool.tokensList,o));const s=i.indexOf(n),r=this.encoder.exitExactBPTInForOneTokenOut(t,s),l=e?this.pool.tokensList.map((t=>t===n?e:"0")):[];return[this.pool.id,a.AddressZero,a.AddressZero,{assets:this.pool.tokensList,minAmountsOut:l,userData:r,toInternalBalance:!1}]}buildQueryExitProportionally({minAmountsOut:e=[],bptIn:t}){if(!this.encoder.exitExactBPTInForTokensOut)throw"Proportional exit not implemented";const n=this.encoder.exitExactBPTInForTokensOut(t);return[this.pool.id,a.AddressZero,a.AddressZero,{assets:this.pool.tokensList,minAmountsOut:e,userData:n,toInternalBalance:!1}]}buildQueryExitExactOut({minAmountsOut:e,maxBptIn:t=a.MaxUint256}){const n=this.pool.tokensList.findIndex((e=>this.pool.id.includes(e)));let o=[...e];n>-1&&(o=ze(e,n));const i=this.encoder.exitBPTInForExactTokensOut(o,t);return[this.pool.id,a.AddressZero,a.AddressZero,{assets:this.pool.tokensList,minAmountsOut:e,userData:i,toInternalBalance:!1}]}}class sr{constructor(e){this.liquidityGaugesRepository=e}async relativeWeight(e){const t=await this.liquidityGaugesRepository.findBy("poolId",e);return t?t.relativeWeight:0}async weekly(e){return ws()*await this.relativeWeight(e)}}const rr=(e,t,a)=>{const o=e.tokens.filter((t=>!e.id.toLowerCase().includes(t.address.toLowerCase()))),i=o.findIndex((e=>e.address.toLowerCase()===t.toLowerCase()));if(-1==i)throw new Error("Token not found in pool");const s=o.map((e=>Oe(e.balance,e.decimals))),r=n.BigNumber.from(a),l=s.map((e=>e.mul(r).div(s[i])));return{tokens:o.map((e=>e.address)),amounts:l.map((e=>e.toString()))}},lr=(e,t)=>()=>{throw`${t} for poolType ${e} not implemented`};class dr{constructor(e,t,a){this.networkConfig=e,this.repositories=t,this.balancerContracts=a,this.aprService=new vs(this.repositories.pools,this.repositories.tokenPrices,this.repositories.tokenMeta,this.repositories.tokenYields,this.repositories.feeCollector,this.repositories.yesterdaysPools,this.repositories.liquidityGauges,this.repositories.feeDistributor,this.repositories.gyroConfigRepository),this.liquidityService=new Sn(t.pools,t.tokenPrices),this.simulationService=new Xs(e,this.repositories.poolsForSimulations),this.graphService=new Os(this.repositories.poolsOnChain),this.joinService=new $s(this.graphService,e,this.simulationService),this.exitService=new Zs(this.graphService,e,this.simulationService),this.feesService=new Ss(t.yesterdaysPools),this.volumeService=new Qs(t.yesterdaysPools),this.poolFactory=new or(e,a),this.impermanentLossService=new hs(t.tokenPrices,t.tokenHistoricalPrices),t.liquidityGauges&&(this.emissionsService=new sr(t.liquidityGauges)),this.proportionalAmounts=rr}static wrap(e,t){let a,n,o;try{a=An.from(e.poolType),o={buildJoin:(t,n,o,s)=>a.join.buildJoin({joiner:t,pool:e,tokensIn:n,amountsIn:o,slippage:s,wrappedNativeAsset:i}),calcPriceImpact:async(t,n,o)=>a.priceImpactCalculator.calcPriceImpact(e,t.map(BigInt),BigInt(n),o),buildExitExactBPTIn:(t,n,o,s=!1,r,l=!1)=>{if(a.exit.buildExitExactBPTIn)return a.exit.buildExitExactBPTIn({exiter:t,pool:e,bptIn:n,slippage:o,shouldUnwrapNativeAsset:s,wrappedNativeAsset:i,singleTokenOut:r,toInternalBalance:l});throw"ExitExactBPTIn not supported"},buildExitExactTokensOut:(t,n,o,s,r=!1)=>a.exit.buildExitExactTokensOut({exiter:t,pool:e,tokensOut:n,amountsOut:o,slippage:s,wrappedNativeAsset:i,toInternalBalance:r}),buildRecoveryExit:(t,n,o,i=!1)=>a.exit.buildRecoveryExit({exiter:t,pool:e,bptIn:n,slippage:o,toInternalBalance:i}),calcSpotPrice:(t,n)=>a.spotPriceCalculator.calcPoolSpotPrice(t,n,e),calcProportionalAmounts:(t,a)=>rr(e,t,a)}}catch(t){if("UNSUPPORTED_POOL_TYPE"!=t.code){X.getInstance().warn(t)}o={buildJoin:lr(e.poolType,"buildJoin"),calcPriceImpact:lr(e.poolType,"calcPriceImpact"),buildExitExactBPTIn:lr(e.poolType,"buildExitExactBPTIn"),buildExitExactTokensOut:lr(e.poolType,"buildExitExactTokensOut"),calcSpotPrice:lr(e.poolType,"calcSpotPrice"),buildRecoveryExit:lr(e.poolType,"buildRecoveryExit")}}try{n=new ir(e),o={...o,buildQueryJoinExactIn:n.buildQueryJoinExactIn.bind(n),buildQueryJoinExactOut:n.buildQueryJoinExactOut.bind(n),buildQueryExitExactOut:n.buildQueryExitExactOut.bind(n),buildQueryExitToSingleToken:n.buildQueryExitToSingleToken.bind(n),buildQueryExitProportionally:n.buildQueryExitProportionally.bind(n)}}catch(t){o={...o,buildQueryJoinExactIn:lr(e.poolType,"buildQueryJoinExactIn"),buildQueryJoinExactOut:lr(e.poolType,"buildQueryJoinExactOut"),buildQueryExitExactOut:lr(e.poolType,"buildQueryExitExactOut"),buildQueryExitToSingleToken:lr(e.poolType,"buildQueryExitToSingleToken"),buildQueryExitProportionally:lr(e.poolType,"buildQueryExitProportionally")}}const i=t.addresses.tokens.wrappedNativeAsset.toLowerCase(),s=e.tokensList.indexOf(e.address);return{...e,...o,bptIndex:s}}dataSource(){return this.repositories.pools}async apr(e){return this.aprService.apr(e)}async impermanentLoss(e,t){return this.impermanentLossService.calcImpLoss(e,t)}async liquidity(e){return this.liquidityService.getLiquidity(e)}async bptPrice(e){return this.liquidityService.getBptPrice(e)}buildJoin({pool:e,tokensIn:t,amountsIn:a,userAddress:n,slippage:o}){const i=An.from(e.poolType);if(!i)throw`buildJoin for poolType ${e.poolType} not implemented`;return i.join.buildJoin({joiner:n,pool:e,tokensIn:t,amountsIn:a,slippage:o,wrappedNativeAsset:this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase()})}buildExitExactBPTIn({pool:e,bptAmount:t,userAddress:a,slippage:n,shouldUnwrapNativeAsset:o,singleTokenOut:i}){const s=An.from(e.poolType);if(!s||!s.exit.buildExitExactBPTIn)throw`buildExit for poolType ${e.poolType} not implemented`;return s.exit.buildExitExactBPTIn({pool:e,exiter:a,bptIn:t,slippage:n,wrappedNativeAsset:this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase(),shouldUnwrapNativeAsset:null!=o&&o,singleTokenOut:null!=i?i:void 0,toInternalBalance:!1})}buildRecoveryExit({pool:e,bptAmount:t,userAddress:a,slippage:n,toInternalBalance:o}){const i=An.from(e.poolType);if(!i||!i.exit.buildRecoveryExit)throw`buildRecoveryExit for poolType ${e.poolType} not implemented`;return i.exit.buildRecoveryExit({exiter:a,pool:e,bptIn:t,slippage:n,toInternalBalance:!!o})}async generalisedJoin(e,t,a,n,o,i,s,r){return this.joinService.joinPool(e,t,a,n,o,i,s,r)}async generalisedExit(e,t,a,n,o,i,s,r){return this.exitService.buildExitCall(e,t,a,n,o,i,s,r)}calcPriceImpact({pool:e,tokenAmounts:t,bptAmount:a,isJoin:n}){return An.from(e.poolType).priceImpactCalculator.calcPriceImpact(e,t.map(BigInt),BigInt(a),n)}async getExitInfo(e,t,a,n){return this.exitService.getExitInfo(e,t,a,n)}async fees(e){return this.feesService.last24h(e)}async volume(e){return this.volumeService.last24h(e)}async find(e){const t=await this.dataSource().find(e);if(t)return dr.wrap(t,this.networkConfig)}async findBy(e,t){if("id"==e)return this.find(t);if("address"==e){const e=await this.dataSource().findBy("address",t);if(!e)return;return dr.wrap(e,this.networkConfig)}throw`search by ${e} not implemented`}async all(){const e=await this.dataSource().all();return e?e.map((e=>dr.wrap(e,this.networkConfig))).filter((e=>e)):[]}async where(e){const t=await this.dataSource().where(e);if(!t)return[];return t.map((e=>dr.wrap(e,this.networkConfig))).filter((e=>e))}}const pr=new ve("strings/5.7.0");var ur,cr;function yr(e,t,a,n,o){if(e===cr.BAD_PREFIX||e===cr.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return e===cr.OVERRUN?a.length-t-1:0}function br(e,t=ur.current){t!=ur.current&&(pr.checkNormalize(),e=e.normalize(t));let a=[];for(let t=0;t>6|192),a.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);if(t>=e.length||56320!=(64512&o))throw new Error("invalid utf-8 string");const i=65536+((1023&n)<<10)+(1023&o);a.push(i>>18|240),a.push(i>>12&63|128),a.push(i>>6&63|128),a.push(63&i|128)}else a.push(n>>12|224),a.push(n>>6&63|128),a.push(63&n|128)}return i.arrayify(a)}function mr(e){const t=br(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return i.hexlify(i.concat([t,a.HashZero]).slice(0,32))}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(ur||(ur={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(cr||(cr={})),Object.freeze({error:function(e,t,a,n,o){return pr.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",a)},ignore:yr,replace:function(e,t,a,n,o){return e===cr.OVERLONG?(n.push(o),0):(n.push(65533),yr(e,t,a))}});var fr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Tr={exports:{}};!function(e){!function(){var t="input is invalid type",a="object"==typeof window,n=a?window:{};n.JS_SHA3_NO_WINDOW&&(a=!1);var o=!a&&"object"==typeof self;!n.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?n=fr:o&&(n=self);var i=!n.JS_SHA3_NO_COMMON_JS&&e.exports,s=!n.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,r="0123456789abcdef".split(""),l=[4,1024,262144,67108864],d=[0,8,16,24],p=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],u=[224,256,384,512],c=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};!n.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!s||!n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var m=function(e,t,a){return function(n){return new B(e,t,e).update(n)[a]()}},f=function(e,t,a){return function(n,o){return new B(e,t,o).update(n)[a]()}},T=function(e,t,a){return function(t,n,o,i){return P["cshake"+e].update(t,n,o,i)[a]()}},h=function(e,t,a){return function(t,n,o,i){return P["kmac"+e].update(t,n,o,i)[a]()}},I=function(e,t,a,n){for(var o=0;o>5,this.byteCount=this.blockCount<<2,this.outputBlocks=a>>5,this.extraBytes=(31&a)>>3;for(var n=0;n<50;++n)this.s[n]=0}function C(e,t,a){B.call(this,e,t,a)}B.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var a,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(s&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||s&&ArrayBuffer.isView(e)))throw new Error(t);a=!0}for(var o,i,r=this.blocks,l=this.byteCount,p=e.length,u=this.blockCount,c=0,y=this.s;c>2]|=e[c]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(r[o>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=l){for(this.start=o-l,this.block=r[u],o=0;o>=8);a>0;)o.unshift(a),a=255&(e>>=8),++n;return t?o.push(n):o.unshift(n),this.update(o),o.length},B.prototype.encodeString=function(e){var a,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(s&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||s&&ArrayBuffer.isView(e)))throw new Error(t);a=!0}var o=0,i=e.length;if(a)o=i;else for(var r=0;r=57344?o+=3:(l=65536+((1023&l)<<10|1023&e.charCodeAt(++r)),o+=4)}return o+=this.encode(8*o),this.update(e),o},B.prototype.bytepad=function(e,t){for(var a=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[a],t=1;t>4&15]+r[15&e]+r[e>>12&15]+r[e>>8&15]+r[e>>20&15]+r[e>>16&15]+r[e>>28&15]+r[e>>24&15];s%t==0&&(O(a),i=0)}return o&&(e=a[i],l+=r[e>>4&15]+r[15&e],o>1&&(l+=r[e>>12&15]+r[e>>8&15]),o>2&&(l+=r[e>>20&15]+r[e>>16&15])),l},B.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,a=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,r=this.outputBits>>3;e=o?new ArrayBuffer(n+1<<2):new ArrayBuffer(r);for(var l=new Uint32Array(e);s>8&255,l[e+2]=t>>16&255,l[e+3]=t>>24&255;r%a==0&&O(n)}return i&&(e=r<<2,t=n[s],l[e]=255&t,i>1&&(l[e+1]=t>>8&255),i>2&&(l[e+2]=t>>16&255)),l},C.prototype=new B,C.prototype.finalize=function(){return this.encode(this.outputBits,!0),B.prototype.finalize.call(this)};var O=function(e){var t,a,n,o,i,s,r,l,d,u,c,y,b,m,f,T,h,I,g,_,P,w,x,E,A,S,v,k,B,C,O,M,F,R,N,L,D,U,V,q,G,W,H,K,$,J,j,X,Y,z,Z,Q,ee,te,ae,ne,oe,ie,se,re,le,de,pe;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],r=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],d=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],c=e[7]^e[17]^e[27]^e[37]^e[47],t=(y=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|r>>>31),a=(b=e[9]^e[19]^e[29]^e[39]^e[49])^(r<<1|s>>>31),e[0]^=t,e[1]^=a,e[10]^=t,e[11]^=a,e[20]^=t,e[21]^=a,e[30]^=t,e[31]^=a,e[40]^=t,e[41]^=a,t=o^(l<<1|d>>>31),a=i^(d<<1|l>>>31),e[2]^=t,e[3]^=a,e[12]^=t,e[13]^=a,e[22]^=t,e[23]^=a,e[32]^=t,e[33]^=a,e[42]^=t,e[43]^=a,t=s^(u<<1|c>>>31),a=r^(c<<1|u>>>31),e[4]^=t,e[5]^=a,e[14]^=t,e[15]^=a,e[24]^=t,e[25]^=a,e[34]^=t,e[35]^=a,e[44]^=t,e[45]^=a,t=l^(y<<1|b>>>31),a=d^(b<<1|y>>>31),e[6]^=t,e[7]^=a,e[16]^=t,e[17]^=a,e[26]^=t,e[27]^=a,e[36]^=t,e[37]^=a,e[46]^=t,e[47]^=a,t=u^(o<<1|i>>>31),a=c^(i<<1|o>>>31),e[8]^=t,e[9]^=a,e[18]^=t,e[19]^=a,e[28]^=t,e[29]^=a,e[38]^=t,e[39]^=a,e[48]^=t,e[49]^=a,m=e[0],f=e[1],J=e[11]<<4|e[10]>>>28,j=e[10]<<4|e[11]>>>28,k=e[20]<<3|e[21]>>>29,B=e[21]<<3|e[20]>>>29,re=e[31]<<9|e[30]>>>23,le=e[30]<<9|e[31]>>>23,W=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,T=e[13]<<12|e[12]>>>20,h=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,C=e[33]<<13|e[32]>>>19,O=e[32]<<13|e[33]>>>19,de=e[42]<<2|e[43]>>>30,pe=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ae=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,D=e[15]<<6|e[14]>>>26,I=e[25]<<11|e[24]>>>21,g=e[24]<<11|e[25]>>>21,z=e[34]<<15|e[35]>>>17,Z=e[35]<<15|e[34]>>>17,M=e[45]<<29|e[44]>>>3,F=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,A=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,oe=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,V=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,P=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,$=e[9]<<27|e[8]>>>5,S=e[18]<<20|e[19]>>>12,v=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,G=e[39]<<8|e[38]>>>24,w=e[48]<<14|e[49]>>>18,x=e[49]<<14|e[48]>>>18,e[0]=m^~T&I,e[1]=f^~h&g,e[10]=E^~S&k,e[11]=A^~v&B,e[20]=R^~L&U,e[21]=N^~D&V,e[30]=K^~J&X,e[31]=$^~j&Y,e[40]=te^~ne&ie,e[41]=ae^~oe&se,e[2]=T^~I&_,e[3]=h^~g&P,e[12]=S^~k&C,e[13]=v^~B&O,e[22]=L^~U&q,e[23]=D^~V&G,e[32]=J^~X&z,e[33]=j^~Y&Z,e[42]=ne^~ie&re,e[43]=oe^~se&le,e[4]=I^~_&w,e[5]=g^~P&x,e[14]=k^~C&M,e[15]=B^~O&F,e[24]=U^~q&W,e[25]=V^~G&H,e[34]=X^~z&Q,e[35]=Y^~Z&ee,e[44]=ie^~re&de,e[45]=se^~le&pe,e[6]=_^~w&m,e[7]=P^~x&f,e[16]=C^~M&E,e[17]=O^~F&A,e[26]=q^~W&R,e[27]=G^~H&N,e[36]=z^~Q&K,e[37]=Z^~ee&$,e[46]=re^~de&te,e[47]=le^~pe&ae,e[8]=w^~m&T,e[9]=x^~f&h,e[18]=M^~E&S,e[19]=F^~A&v,e[28]=W^~R&L,e[29]=H^~N&D,e[38]=Q^~K&J,e[39]=ee^~$&j,e[48]=de^~te&ne,e[49]=pe^~ae&oe,e[0]^=p[n],e[1]^=p[n+1]};if(i)e.exports=P;else for(x=0;x256)&&Pr.throwArgumentError("invalid number type","type",e),a&&(s=256),t=n.BigNumber.from(t).toTwos(s),i.zeroPad(t,s/8)}if(o=e.match(Ir),o){const n=parseInt(o[1]);return(String(n)!==o[1]||0===n||n>32)&&Pr.throwArgumentError("invalid bytes type","type",e),i.arrayify(t).byteLength!==n&&Pr.throwArgumentError(`invalid value for ${e}`,"value",t),a?i.arrayify((t+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):t}if(o=e.match(_r),o&&Array.isArray(t)){const a=o[1];parseInt(o[2]||String(t.length))!=t.length&&Pr.throwArgumentError(`invalid array length for ${e}`,"value",t);const n=[];return t.forEach((function(e){n.push(wr(a,e,!0))})),i.concat(n)}return Pr.throwArgumentError("invalid type","type",e)}function xr(e,t){e.length!=t.length&&Pr.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const a=[];return e.forEach((function(e,n){a.push(wr(e,t[n]))})),i.hexlify(i.concat(a))}function Er(e,t){return a=xr(e,t),"0x"+hr.keccak_256(i.arrayify(a));var a}const Ar=mr("PROTOCOL_SWAP_FEE_PERC"),Sr=mr("E-CLP"),vr=Er(["bytes"],[t.defaultAbiCoder.encode(["bytes32","bytes32"],[Ar,Sr])]);class kr{constructor(e,t,a){this.gyroConfigAddress=e,this.multicall=t,this.gyroConfigInterface=jt.createInterface(),this.gyroConfig=jt.connect(e,a)}async getGyroProtocolFee(e){let a;const o=Er(["bytes"],[t.defaultAbiCoder.encode(["bytes32","uint256"],[Ar,e])]),i=[{target:this.gyroConfigAddress,callData:this.gyroConfigInterface.encodeFunctionData("hasKey",[o])},{target:this.gyroConfigAddress,callData:this.gyroConfigInterface.encodeFunctionData("hasKey",[vr])},{target:this.gyroConfigAddress,callData:this.gyroConfigInterface.encodeFunctionData("hasKey",[Ar])}],[,[s,r,l]]=await this.multicall.callStatic.aggregate(i),d=n.BigNumber.from(s).eq(1),p=n.BigNumber.from(r).eq(1),u=n.BigNumber.from(l).eq(1);return a=d?parseFloat(n.formatFixed(await this.gyroConfig.getUint(o),18)):p?parseFloat(n.formatFixed(await this.gyroConfig.getUint(vr),18)):u?parseFloat(n.formatFixed(await this.gyroConfig.getUint(Ar),18)):0,a}}const Br=new t.Interface(["function gauge_relative_weight(address gauge, uint timestamp) view returns (uint)"]),Cr=new t.Interface(["function gauge_relative_weight(address gauge) view returns (uint)"]);class Or{constructor(e,t,a){this.multicall=e,this.gaugeControllerAddress=t,this.gaugeControllerCheckpointerAddress=a}async getRelativeWeights(e,t){const a=e.map((e=>this.gaugeControllerCheckpointerAddress&&!t?{target:this.gaugeControllerCheckpointerAddress,callData:Cr.encodeFunctionData("gauge_relative_weight",[o.getAddress(e)])}:{target:this.gaugeControllerAddress,callData:Br.encodeFunctionData("gauge_relative_weight",[o.getAddress(e),t||Math.floor(Date.now()/1e3)])})),[,n]=await this.multicall.callStatic.aggregate(a);return e.reduce(((e,t,a)=>(e[t]||(e[t]=parseFloat(Ce(n[a],18))),e)),{})}}class Mr{async get(e){const t=await this.query(e);return(null==t?void 0:t.length)>0?t[0]:void 0}async find(e){return this.get({where:{id:e}})}async findBy(e,t){return this.get({where:{[String(e)]:t}})}async findAllBy(e,t,a=1e3,n=0){const o={where:{[String(e)]:t},first:a,skip:n};return this.query(o)}}class Fr extends Mr{constructor(e,t,a){super(),this.chainId=t,this.blockHeight=a,this.client=Ai(e)}}class Rr extends Mr{constructor(e,t,a){super(),this.chainId=t,this.blockHeight=a,this.client=Si(e)}}class Nr extends Rr{async query(e){e.orderBy||(e.orderBy=ti.balance),e.orderDirection||(e.orderDirection=li.desc),!e.block&&this.blockHeight&&(e.block={number:await this.blockHeight()});const{gaugeShares:t}=await this.client.GaugeShares(e);return t.map(this.mapType)}mapType(e){var t;return{id:e.id,balance:e.balance,userAddress:null===(t=e.user)||void 0===t?void 0:t.id,gauge:{id:e.gauge.id,poolId:e.gauge.poolId||void 0,isKilled:e.gauge.isKilled,totalSupply:e.gauge.totalSupply}}}async findByUser(t,a,n){return this.findAllBy(e.GaugeShareAttributes.UserAddress,t,a,n)}async findByGauge(t,a,n){return this.findAllBy(e.GaugeShareAttributes.GaugeId,t,a,n)}}const Lr=new t.Interface(["function totalSupply() view returns (uint)","function working_supply() view returns (uint)","function reward_count() view returns (uint)","function reward_tokens(uint rewardIndex) view returns (address)","function reward_data(address rewardToken) view returns (tuple(address token, address distributor, uint period_finish, uint rate, uint last_update, uint integral) data)"]),Dr=new t.Interface(["function inflation_rate(uint currentWeekTimestamp) view returns (uint)"]);class Ur{constructor(e,t){this.multicall=e,this.chainId=t}async getTotalSupplies(e){const t=e.map((e=>({target:e,callData:Lr.encodeFunctionData("totalSupply",[])}))),[,a]=await this.multicall.callStatic.aggregate(t),n=a.map((e=>"0x"==e?"0x0":e));return e.reduce(((e,t,a)=>(e[t]||(e[t]=parseFloat(Ce(n[a],18))),e)),{})}async getWorkingSupplies(e){const t=e.map((e=>({target:e,callData:Lr.encodeFunctionData("working_supply",[])}))),[,a]=await this.multicall.callStatic.aggregate(t),n=a.map((e=>"0x"==e?"0x0":e));return e.reduce(((e,t,a)=>(e[t]||(e[t]=parseFloat(Ce(n[a],18))),e)),{})}async getInflationRates(e){const t=Math.floor(Date.now()/1e3/604800),a=e.map((e=>({target:e,callData:Dr.encodeFunctionData("inflation_rate",[t])}))),[,n]=await this.multicall.callStatic.aggregate(a),o=n.map((e=>"0x"==e?"0x0":e));return e.reduce(((e,t,a)=>(e[t]||(e[t]=parseFloat(Ce(o[a],18))),e)),{})}async getRewardCounts(e){let t;if(1==this.chainId){const a=e.map((e=>({target:e,callData:Lr.encodeFunctionData("reward_count",[])}))),[,n]=await this.multicall.callStatic.aggregate(a),o=n.map((e=>"0x"==e?"0x0":e));t=e.reduce(((e,t,a)=>(e[t]||(e[t]=parseInt(o[a])),e)),{})}else t=e.reduce(((e,t)=>(e[t]||(e[t]=1),e)),{});return t}async getRewardTokens(e,t){const a=t||await this.getRewardCounts(e),n=e.filter((e=>a[e]>0)),o=[0],i=n.map(((e,t)=>{const n=[];for(let t=0;t{const n=o[a],i=o[a+1],r=[];for(let e=n;e{const o=[];for(let t=0;tLr.decodeFunctionResult("reward_data",e)[0]));return Object.keys(a).reduce(((e,t,o)=>{const i=n[o],r=a[t].reduce(((e,t,a)=>(e[t]||(e[t]=s[i+a]),e)),{});return e[t]||(e[t]=r),e}),{})}}class Vr{constructor(e){this.gauges=[],this.client=Si(e)}async fetch(){const e=(await this.client.Pools({first:1e3,where:{preferentialGauge_not:null}})).pools.map((e=>e.preferentialGauge));return this.gauges=e,this.gauges}async find(e){return 0==this.gauges.length&&await this.fetch(),this.gauges.find((t=>t.id==e))}async findBy(e,t){if(0==this.gauges.length&&await this.fetch(),"id"==e)return this.find(t);if("poolId"==e)return this.gauges.find((e=>e.poolId==t));if("poolAddress"==e)return this.gauges.find((e=>e.poolAddress==t));throw`search by ${e} not implemented`}}class qr{constructor(e,t,a,n,o){this.chainId=n,this.workingSupplies={},this.relativeWeights={},this.inflationRates={},this.rewardData={},a&&(this.gaugeController=new Or(t,a,o)),this.multicall=new Ur(t,n),this.subgraph=new Vr(e)}async fetch(){const e=await this.subgraph.fetch(),t=e.map((e=>e.id));if(1==this.chainId)this.workingSupplies=await this.multicall.getWorkingSupplies(t);else{const t=["0x3b8ca519122cdd8efb272b0d3085453404b25bd0","0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2","0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647","0x809b79b53f18e9bc08a961ed4678b901ac93213a"],a=e.filter((e=>!t.includes(e.factory.id.toLowerCase()))).map((e=>e.id));a.length>0&&(this.inflationRates=await this.multicall.getInflationRates(a),this.workingSupplies=await this.multicall.getWorkingSupplies(a))}return this.gaugeController&&(this.relativeWeights=await this.gaugeController.getRelativeWeights(t)),this.rewardData=e.reduce(((e,t)=>{var a;return e[a=t.id]||(e[a]=t.tokens?Object.fromEntries(t.tokens.map((e=>[e.id.split("-")[0],{distributor:"",last_update:n.BigNumber.from(0),integral:n.BigNumber.from(0),token:e.id.split("-")[0],decimals:e.decimals,rate:Oe(e.rate||"0",e.decimals),period_finish:n.BigNumber.from(e.periodFinish||"0")}]))):{}),e}),{}),e.map(this.compose.bind(this))}async find(e){return this.gauges||(this.gauges=this.fetch()),(await this.gauges).find((t=>t.id==e))}async findBy(e,t){let a;if(this.gauges||(this.gauges=this.fetch()),"id"==e)return this.find(t);if("address"==e)return this.find(t);if("poolId"==e)a=(await this.gauges).find((e=>e.poolId==t));else{if("poolAddress"!=e)throw`search by ${e} not implemented`;a=(await this.gauges).find((e=>e.poolAddress==t))}return a}compose(e){return{id:e.id,address:e.id,name:e.symbol,poolId:e.poolId,poolAddress:e.poolAddress,totalSupply:parseFloat(e.totalSupply),workingSupply:this.workingSupplies[e.id],relativeWeight:this.relativeWeights[e.id],rewardTokens:this.rewardData[e.id],balInflationRate:this.inflationRates[e.id]}}}class Gr{constructor(e,t){this.url=e,this.apiKey=t}async get(e){try{const t=this.toPayload(e),{data:a}=await E.default.post(this.url,t,{headers:{"x-api-key":this.apiKey}});if(a.errors)throw new Error(a.errors.map((e=>e.message)).join(","));return a.data}catch(e){throw console.error(e),e}return[]}toPayload(e){return JSON.stringify({query:m.jsonToGraphQLQuery({query:e})})}}function Wr(e){return new Promise((t=>setTimeout(t,e)))}const Hr=(e,t)=>{var a,n,o,i,s,r,l,d,p,u,c;return{id:e.id,name:e.name||"",address:e.address,chainId:t,poolType:e.poolType,poolTypeVersion:e.poolTypeVersion||1,swapFee:e.swapFee,swapEnabled:e.swapEnabled,protocolYieldFeeCache:e.protocolYieldFeeCache||"0.5",protocolSwapFeeCache:e.protocolSwapFeeCache||"0.5",amp:null!==(a=e.amp)&&void 0!==a?a:void 0,owner:null!==(n=e.owner)&&void 0!==n?n:void 0,factory:null!==(o=e.factory)&&void 0!==o?o:void 0,symbol:null!==(i=e.symbol)&&void 0!==i?i:void 0,tokens:(e.tokens||[]).map(Kr),tokensList:e.tokensList,tokenAddresses:(e.tokens||[]).map((e=>e.address)),totalLiquidity:e.totalLiquidity,totalShares:e.totalShares,totalSwapFee:e.totalSwapFee,totalSwapVolume:e.totalSwapVolume,priceRateProviders:null!==(s=e.priceRateProviders)&&void 0!==s?s:void 0,createTime:e.createTime,mainIndex:null!==(r=e.mainIndex)&&void 0!==r?r:void 0,wrappedIndex:null!==(l=e.wrappedIndex)&&void 0!==l?l:void 0,totalWeight:e.totalWeight||"1",lowerTarget:null!==(d=e.lowerTarget)&&void 0!==d?d:"0",upperTarget:null!==(p=e.upperTarget)&&void 0!==p?p:"0",isInRecoveryMode:null!==(u=e.isInRecoveryMode)&&void 0!==u&&u,isPaused:null!==(c=e.isPaused)&&void 0!==c&&c}},Kr=e=>{const t=$r(e.token);return{...e,isExemptFromYieldProtocolFee:e.isExemptFromYieldProtocolFee||!1,token:t}},$r=e=>{let t=null;return e.pool&&(t={id:e.pool.id,address:e.pool.address,totalShares:e.pool.totalShares,poolType:e.pool.poolType,mainIndex:e.pool.mainIndex||0},(null==e?void 0:e.pool.tokens)&&(t.tokens=e.pool.tokens.map(Jr))),{pool:t,latestUSDPrice:e.latestUSDPrice||void 0}},Jr=e=>({address:e.address,decimals:e.decimals,symbol:e.symbol,balance:e.balance,priceRate:e.priceRate,weight:e.weight,isExemptFromYieldProtocolFee:e.isExemptFromYieldProtocolFee||void 0,token:e.token?$r(e.token):void 0});class jr{constructor(e){var t,a;this.skip=0,this.client=Ai(e.url),this.blockHeight=e.blockHeight,this.chainId=e.chainId;const n={orderBy:mo.TotalLiquidity,orderDirection:lo.Desc,where:{totalShares:{gt:1e-12}}},o=Object.assign({},(null===(t=e.query)||void 0===t?void 0:t.args)||n),i=Object.assign({},(null===(a=e.query)||void 0===a?void 0:a.attrs)||{});this.query={args:o,attrs:i}}async fetchAllPools(){const e=X.getInstance();e.time("fetching pools"),this.blockHeight&&(this.query.args.block={number:await this.blockHeight()});const t=new ot(this.query.args).format(new nt),{pool0:a,pool1000:n,pool2000:o}=await this.client.AllPools(t);return e.timeEnd("fetching pools"),[...a,...n,...o].map((e=>Hr(e,this.chainId)))}async fetch(e){const t=X.getInstance();t.time("fetching pools"),(null==e?void 0:e.skip)&&(this.query.args.skip=e.skip),this.blockHeight&&(this.query.args.block={number:await this.blockHeight()}),this.query.args.first=(null==e?void 0:e.first)||this.query.args.first||1e3;const a=new ot(this.query.args).format(new nt),{pools:n}=await this.client.Pools(a);return this.skip=((null==e?void 0:e.skip)||0)+n.length,t.timeEnd("fetching pools"),n.map((e=>Hr(e,this.chainId)))}async find(e){return await this.findBy("id",e)}async findBy(e,t){return this.pools||(this.pools=this.fetchAllPools()),(await this.pools).find((a=>a[e]==t))}async all(){return this.pools||(this.pools=this.fetchAllPools()),this.pools}async block(){return this.blockHeight?{number:await this.blockHeight()}:void 0}async where(e){return this.pools||(this.pools=this.fetchAllPools()),(await this.pools).filter(e)}}class Xr{constructor(e,t,a,n){this.poolsSubgraph=e,this.poolsToIgnore=a,this.batchSize=n,this.skip=0,this.provider=t.provider,this.multicall=t.multicall,this.vault=t.vault}filterPools(e){return e.filter((e=>{if(!1===e.swapEnabled)return!1;if(!this.poolsToIgnore)return!0;return-1===this.poolsToIgnore.findIndex((t=>t.toLowerCase()===e.id.toLowerCase()))}))}async fetchDefault(){const e=await this.poolsSubgraph.all(),t=this.filterPools(e),a=X.getInstance();a.time(`fetching onchain ${t.length} pools`);const n=await Ri(t,this.multicall,this.vault,this.provider,this.batchSize);return a.timeEnd(`fetching onchain ${t.length} pools`),n}async fetch(e){const t=await this.poolsSubgraph.fetch(e),a=this.filterPools(t),n=X.getInstance();n.time(`fetching onchain ${a.length} pools`);const o=await Ri(a,this.multicall,this.vault,this.provider,this.batchSize);return n.timeEnd(`fetching onchain ${a.length} pools`),o}async find(e,t=!1){return await this.findBy("id",e,t)}async findBy(e,t,a=!1){return this.pools&&!a||(this.pools=this.fetchDefault()),(await this.pools).find((a=>a[e]==t))}async all(){return this.pools||(this.pools=this.fetchDefault()),this.pools}async where(e){return this.pools||(this.pools=this.fetchDefault()),(await this.pools).filter(e)}async refresh(e){const t=await Ri([e],this.multicall,this.vault,this.provider);if(this.pools){const a=(await this.pools).findIndex((t=>t.address===e.address));-1!==a&&(this.pools=Promise.resolve([...(await this.pools).splice(a,1),t[0]]))}return t[0]}}class Yr extends Rr{async query(e){!e.block&&this.blockHeight&&(e.block={number:await this.blockHeight()});const{pools:t}=await this.client.PoolGauges(e);return t.map(this.mapType)}mapType(e){return e}}var zr;e.PoolJoinExitAttributes=void 0,(zr=e.PoolJoinExitAttributes||(e.PoolJoinExitAttributes={})).Pool="pool",zr.Sender="sender";class Zr extends Fr{async query(e){e.orderBy||(e.orderBy=oo.Timestamp),e.orderDirection||(e.orderDirection=lo.Asc),!e.block&&this.blockHeight&&(e.block={number:await this.blockHeight()});const{joinExits:t}=await this.client.JoinExits(e);return t.map(this.mapType)}mapType(e){return{id:e.id,userAddress:e.user.id,poolId:e.pool.id,timestamp:e.timestamp,type:e.type,amounts:e.amounts,tokens:e.pool.tokensList}}async findByUser(t,a,n){return this.findAllBy(e.PoolJoinExitAttributes.Sender,t,a,n)}async findJoins(e,t){return this.query({where:{sender:e,pool:t,type:"Join"}})}async findExits(e,t){return this.query({where:{sender:e,pool:t,type:"Exit"}})}async findByPool(t,a,n){return this.findAllBy(e.PoolJoinExitAttributes.Pool,t,a,n)}}class Qr extends Fr{async query(e){e.orderBy||(e.orderBy=co.Balance),e.orderDirection||(e.orderDirection=lo.Desc),!e.block&&this.blockHeight&&(e.block={number:await this.blockHeight()});const{poolShares:t}=await this.client.PoolShares(e);return t.map(this.mapType)}mapType(e){return{id:e.id,userAddress:e.userAddress.id,poolId:e.poolId.id,balance:e.balance}}async findByUser(t,a,n){return this.findAllBy(e.PoolShareAttributes.UserAddress,t,a,n)}async findByPool(t,a,n){return this.findAllBy(e.PoolShareAttributes.PoolId,t,a,n)}}class el{constructor(e){this.tokens=e}async find(e){return this.tokens.find((t=>t.address.toLowerCase()===e.toLowerCase()))}async findBy(e,t){return this.tokens.find((a=>a[e]===t))}}class tl{constructor(e,t=1,a){var n;this.chainId=t,this.prices={},this.baseTokenAddresses=e.map(Le),this.url=`${Gi(null==a?void 0:a.isDemoApiKey)}simple/token_price/${this.platform(t)}?vs_currencies=usd,eth`,this.urlNative=`${Gi(null==a?void 0:a.isDemoApiKey)}simple/price/?vs_currencies=eth,usd&ids=`,this.coingeckoApiKeyHeaderName=Wi(null==a?void 0:a.isDemoApiKey),this.apiKey=null==a?void 0:a.coingeckoApiKey,this.debouncer=new qe(this.fetch.bind(this),200,null!==(n=null==a?void 0:a.tokensPerPriceRequest)&&void 0!==n?n:10)}async fetch(e,{signal:t}={}){var a,n,o;try{const{data:n}=await E.default.get(`${this.url}&contract_addresses=${e.join(",")}`,{signal:t,headers:{[this.coingeckoApiKeyHeaderName]:null!==(a=this.apiKey)&&void 0!==a?a:""}});return n}catch(e){const t=["Error fetching token prices from coingecko"];return e.isAxiosError?void 0!==(null===(n=e.response)||void 0===n?void 0:n.status)&&t.push(`with status ${null===(o=e.response)||void 0===o?void 0:o.status}`):t.push(e),Promise.reject(t.join(" "))}}fetchNative({signal:e}={}){var t;let a;!function(e){e.ETH="ethereum",e.MATIC="matic-network",e.XDAI="xdai"}(a||(a={}));let n=a.ETH;return 137===this.chainId&&(n=a.MATIC),100===this.chainId&&(n=a.XDAI),E.default.get(`${this.urlNative}${n}`,{signal:e,headers:{[this.coingeckoApiKeyHeaderName]:null!==(t=this.apiKey)&&void 0!==t?t:""}}).then((({data:e})=>e[n])).catch((e=>{var t;const a=["Error fetching native token from coingecko"];return e.isAxiosError?(null===(t=e.response)||void 0===t?void 0:t.status)&&a.push(`with status ${e.response.status}`):a.push(e),Promise.reject(a.join(" "))})).finally((()=>{}))}find(e){const t=Le(e,this.chainId);if(!this.prices[t]){if(0===Object.keys(this.prices).length)for(const e of this.baseTokenAddresses)this.prices[e]=this.debouncer.fetch(e).then((t=>t[e]));if(t===he(this.chainId).Addresses.nativeAsset.toLowerCase())return this.nativePrice||(this.prices[t]=this.fetchNative()),this.prices[t];this.prices[t]=this.debouncer.fetch(t).then((e=>e[t]))}return this.prices[t]}async findBy(e,t){if("address"==e)return this.find(t)}platform(e){switch(e){case 1:case 5:case 42:case 31337:return"ethereum";case 100:return"xdai";case 137:return"polygon-pos";case 250:return"fantom";case 1101:return"polygon-zkevm";case 8453:return"base";case 42161:return"arbitrum-one";case 43114:return"avalanche"}return"2"}}class al{constructor(e=1,t){this.chainId=e,this.prices={},this.urlBase=`${Gi(null==t?void 0:t.isDemoApiKey)}coins/${this.platform(e)}/contract/%TOKEN_ADDRESS%/market_chart/range?vs_currency=usd`,this.apiKey=null==t?void 0:t.coingeckoApiKey,this.coingeckoApiKeyHeaderName=Wi(null==t?void 0:t.isDemoApiKey)}async fetch(e,t,{signal:a}={}){var n,o;const i=this.urlRange(e,t);try{const{data:e}=await E.default.get(i,{signal:a,headers:{[this.coingeckoApiKeyHeaderName]:null!==(n=this.apiKey)&&void 0!==n?n:""}});return e}catch(e){if(e.isAxiosError)throw new Error("Error fetching historical token prices from coingecko - "+e.message+" - "+(null===(o=e.response)||void 0===o?void 0:o.statusText));throw new Error("Unknown Error: "+e)}}async find(e){throw"Historic price requires point-in-time timestamp, please use findBy(address, timestamp)"}async findBy(e,t){const a=Le(e,this.chainId);return{usd:`${(await this.fetch(a,t)).prices[0][1]}`}}platform(e){switch(e){case 1:case 5:case 42:case 31337:return"ethereum";case 137:return"polygon-pos";case 42161:return"arbitrum-one";case 100:return"xdai"}return"2"}urlRange(e,t){const a=t-3600,n=t+3600;return`${this.urlBase.replace("%TOKEN_ADDRESS%",e)}&from=${a}&to=${n}`}}class nl{constructor(e,t=1){this.subgraphUrl=e,this.chainId=t,this.prices={},this.debouncer=new qe(this.fetch.bind(this),200)}async fetch(e,{signal:t}={}){return e.length,E.default.post(this.subgraphUrl,{variables:{addresses:e},query:"query($addresses: [String!]) {\n tokens(\n where: {\n id_in: $addresses\n }\n ) {\n address\n latestUSDPrice\n }\n }"},{signal:t}).then((e=>e.data.data)).then((({tokens:e})=>Object.fromEntries(e.map((e=>[e.address,{usd:e.latestUSDPrice||void 0}]))))).finally((()=>{e.length}))}async find(e){const t=Le(e,this.chainId);return this.prices[t]||(this.prices[t]=this.debouncer.fetch(t).then((e=>e[t]))),this.prices[t]}async findBy(e,t){if("address"==e)return this.find(t)}}class ol{constructor(e,t,a){this.coingeckoRepository=e,this.subgraphRepository=t,this.aaveRates=a}async find(e){let t;try{if(t=await this.coingeckoRepository.find(e),!(null==t?void 0:t.usd))throw new Error("Price not found")}catch(a){X.getInstance().warn(a),t=await this.subgraphRepository.find(e)}const a=await this.aaveRates.getRate(e)||1;return t&&t.usd?{...t,usd:(parseFloat(t.usd)*a).toString()}:t}async findBy(e,t){if("address"===e)return this.find(t);throw`Token price search by ${e} not implemented`}}class il{constructor(e,t){this.coingeckoRepository=e,this.aaveRates=t}async find(e){return this.findBy(e,Math.floor(Date.now()/1e3))}async findBy(e,t){const a=await this.coingeckoRepository.findBy(e,t),n=await this.aaveRates.getRate(e)||1;return a&&a.usd?{...a,usd:(parseFloat(a.usd)*n).toString()}:a}}const sl=["function claimTokens(address user, address[] tokens) returns (uint256[])","function claimToken(address user, address token) returns (uint256)"],rl=new t.Interface(["function getTokensDistributedInWeek(address token, uint timestamp) view returns (uint)","function claimTokens(address user, address[] tokens) returns (uint256[])","function claimToken(address user, address token) returns (uint256)"]),ll=new t.Interface(["function totalSupply() view returns (uint)"]);class dl{constructor(e,t,a,n,o,i){this.multicall=e,this.feeDistributorAddress=t,this.balAddress=a,this.veBalAddress=n,this.bbAUsdAddress=o,this.feeDistributor=((e,t)=>new b.Contract(e,sl,t))(t,i)}async fetch(e){const t=this.getPreviousWeek(e),a=[{target:this.feeDistributorAddress,callData:rl.encodeFunctionData("getTokensDistributedInWeek",[o.getAddress(this.balAddress),t])},{target:this.feeDistributorAddress,callData:rl.encodeFunctionData("getTokensDistributedInWeek",[o.getAddress(this.bbAUsdAddress),t])},{target:this.veBalAddress,callData:ll.encodeFunctionData("totalSupply",[])}],[,n]=await this.multicall.callStatic.aggregate(a);return{balAmount:parseFloat(Ce(n[0],18)),bbAUsdAmount:parseFloat(Ce(n[1],18)),veBalSupply:parseFloat(Ce(n[2],18)),bbAUsdPrice:parseFloat("1.0"),balAddress:this.balAddress}}async multicallData(e){return this.data||(this.data=await this.fetch(e)),this.data}getPreviousWeek(e){const t=new Date(e);t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0);let a=t.getUTCDay()-4;return a<0&&(a+=7),a+=7,Math.floor(t.getTime()/1e3)-86400*a}async getClaimableBalances(e,t){try{const a=await this.feeDistributor.callStatic.claimTokens(e,t);return this.extractTokenBalance(t,a)}catch(e){return{}}}claimBalances(e,t){return rl.encodeFunctionData("claimTokens",[e,t])}extractTokenBalance(e,t){return e.reduce(((e,a,o)=>{var i;return e[a]=null!==(i=t[o])&&void 0!==i?i:n.BigNumber.from(0),e}),{})}}const pl=new t.Interface(["function getProtocolFeesCollector() view returns (address)"]),ul=new t.Interface(["function getSwapFeePercentage() view returns (uint)"]);let cl;class yl{constructor(e,t){this.provider=t,this.vault=new b.Contract(e,pl,this.provider)}async fetch(){const e=await this.vault.getProtocolFeesCollector(),t=new b.Contract(e,ul,this.provider),a=await t.getSwapFeePercentage();return parseFloat(Ce(a,18))}async find(){return cl||(cl=this.fetch()),this.swapFeePercentage=await cl,this.swapFeePercentage}async findBy(){return this.find()}}const bl=new t.Interface(["function getSwapFeePercentage() view returns (uint)"]);let ml;class fl{constructor(e,t){this.multicall=e,this.protocolFeePercentagesProviderAddress=t}async fetch(){const e=[{target:this.protocolFeePercentagesProviderAddress,callData:bl.encodeFunctionData("getFeeTypePercentage",[0])},{target:this.protocolFeePercentagesProviderAddress,callData:bl.encodeFunctionData("getFeeTypePercentage",[2])}],[,t]=await this.multicall.callStatic.aggregate(e);return{swapFee:parseFloat(Ce(t[0],18)),yieldFee:parseFloat(Ce(t[2],18))}}async getFees(){return ml||(ml=this.fetch()),this.protocolFees=await ml,this.protocolFees}}class Tl{constructor(e="https://yield-tokens.balancer.workers.dev/"){this.url=e}async fetch(){let e={};try{e=(await E.default.get(this.url)).data}catch(e){X.getInstance().warn(`Failed to fetch yield tokens: ${e}`)}return e}async find(e){const t=e.toLocaleLowerCase();return this.yields||(this.yields=this.fetch()),this.yields.then((e=>e[t]&&e[t]>0?e[t]:0))}async findBy(e,t){return"address"!=e?0:this.find(t)}}const hl=e=>`{\n blocks(first: 1, orderBy: timestamp, orderDirection: asc, where: { timestamp_gt: ${e} }) {\n number\n }\n}`,Il=async(e,t)=>{const a={query:hl(t)},n=await E.default.post(e,a),{data:{blocks:o}}=n.data;return parseInt(o[0].number)};class gl{constructor(e){this.endpoint=e,this.blocks={}}async find(e){if("dayAgo"==e){const e=""+(Math.floor(Date.now()/1e3)-86400);return this.blocks[e]||(this.blocks={...this.blocks,[e]:Il(this.endpoint,e)}),this.blocks[e]}}async findBy(e="",t=""){}}var _l=[{chainId:1,address:"0x8888801af4d980682e47f1a9036e589479e835c5",symbol:"mph"},{chainId:1,address:"0x27054b13b1b798b345b591a4d22e6562d47ea75a",symbol:"ast"},{chainId:1,address:"0x3301ee63fb29f863f2333bd4466acb46cd8323e6",symbol:"akita"},{chainId:1,address:"0x616e8bfa43f920657b3497dbf40d6b1a02d4608d",symbol:"aurabal"},{chainId:1,address:"0xc0c293ce456ff0ed870add98a0828dd4d2903dbf",symbol:"aura"},{chainId:1,address:"0x3472a5a71965499acd81997a54bba8d852c6e53d",symbol:"badger"},{chainId:1,address:"0xba100000625a3754423978a60c9317c58a424e3d",symbol:"bal"},{chainId:1,address:"0x804cdb9116a10bb78768d3252355a1b18067bf8f",symbol:"bb-a-dai"},{chainId:1,address:"0x9210f1204b5a24742eba12f710636d76240df3d0",symbol:"bb-a-usdc"},{chainId:1,address:"0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c",symbol:"bb-a-usdt"},{chainId:1,address:"0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb2",symbol:"bb-a-usd"},{chainId:1,address:"0x2d94aa3e47d9d5024503ca8491fce9a2fb4da198",symbol:"bank"},{chainId:1,address:"0x0d8775f648430679a709e98d2b0cb6250d2887ef",symbol:"bat"},{chainId:1,address:"0xf17e65822b568b3903685a7c9f496cf7656cc6c2",symbol:"bico"},{chainId:1,address:"0x799ebfabe77a6e34311eeee9825190b9ece32824",symbol:"btrst"},{chainId:1,address:"0x514910771af9ca656af840dff83e8264ecf986ca",symbol:"link"},{chainId:1,address:"0x3506424f91fd33084466f402d5d97f05f8e3b4af",symbol:"chz"},{chainId:1,address:"0x41e5560054824ea6b0732e656e3ad64e20e94e45",symbol:"cvc"},{chainId:1,address:"0xc00e94cb662c3520282e6f5717214004a7f26888",symbol:"comp"},{chainId:1,address:"0xdef1ca1fb7fbcdc777520aa7f396b4e015f497ab",symbol:"cow"},{chainId:1,address:"0xd533a949740bb3306d119cc777fa900ba034cd52",symbol:"crv"},{chainId:1,address:"0x6b175474e89094c44da98b954eedeac495271d0f",symbol:"dai"},{chainId:1,address:"0xf2051511b9b121394fa75b8f7d4e7424337af687",symbol:"haus"},{chainId:1,address:"0x888888435fde8e7d4c54cab67f206e4199454c60",symbol:"dfx"},{chainId:1,address:"0x798d1be841a82a273720ce31c822c61a67a601c3",symbol:"digg"},{chainId:1,address:"0xf629cbd94d3791c9250152bd8dfbdf380e2a3b9c",symbol:"enj"},{chainId:1,address:"0xc18360217d8f7ab5e7c516566761ea12ce7f9d72",symbol:"ens"},{chainId:1,address:"0x4e15361fd6b4bb609fa63c81a2be19d873717870",symbol:"ftm"},{chainId:1,address:"0x956f47f50a910163d8bf957cf5846d573e7f87ca",symbol:"fei"},{chainId:1,address:"0xed1480d12be41d92f36f5f7bdd88212e381a3677",symbol:"fdt"},{chainId:1,address:"0x586aa273f262909eef8fa02d90ab65f5015e0516",symbol:"fiat"},{chainId:1,address:"0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",symbol:"gtc"},{chainId:1,address:"0x900db999074d9277c5da2a43f252d74366230da0",symbol:"giv"},{chainId:1,address:"0x6810e776880c02933d47db1b9fc05908e5386b96",symbol:"gno"},{chainId:1,address:"0xba485b556399123261a5f9c95d413b4f93107407",symbol:"graviaura"},{chainId:1,address:"0x3ec8798b81485a254928b70cda1cf0a2bb0b74d7",symbol:"gro"},{chainId:1,address:"0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f",symbol:"snx"},{chainId:1,address:"0x5a98fcbea516cf06857215779fd812ca3bef1b32",symbol:"ldo"},{chainId:1,address:"0x6dea81c8171d0ba574754ef6f8b412f2ed88c54d",symbol:"lqty"},{chainId:1,address:"0x5f98805a4e8be255a32880fdec7f6728c6568ba0",symbol:"lusd"},{chainId:1,address:"0x965d79f1a1016b574a62986e13ca8ab04dfdd15c",symbol:"m2"},{chainId:1,address:"0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",symbol:"mkr"},{chainId:1,address:"0xd084944d3c05cd115c09d072b9f44ba3e0e45921",symbol:"fold"},{chainId:1,address:"0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0",symbol:"matic"},{chainId:1,address:"0xa3bed4e1c75d00fa6f4e5e6922db7261b5e9acd2",symbol:"mta"},{chainId:1,address:"0x4b13006980acb09645131b91d259eaa111eaf5ba",symbol:"myc"},{chainId:1,address:"0x333a4823466879eef910a04d473505da62142069",symbol:"nation"},{chainId:1,address:"0xcfeaead4947f0705a14ec42ac3d44129e1ef3ed5",symbol:"note"},{chainId:1,address:"0x967da4048cd07ab37855c090aaf366e4ce1b9f48",symbol:"ocean"},{chainId:1,address:"0x64aa3364f17a4d01c6f1751fd97c2bd3d7e7f1d5",symbol:"ohm"},{chainId:1,address:"0xab846fb6c81370327e784ae7cbb6d6a6af6ff4bf",symbol:"pal"},{chainId:1,address:"0xcafe001067cdef266afb7eb5a286dcfd277f3de5",symbol:"psp"},{chainId:1,address:"0x68037790a0229e9ce6eaa8a99ea92964106c4703",symbol:"par"},{chainId:1,address:"0x45804880de22913dafe09f4980848ece6ecbaf78",symbol:"paxg"},{chainId:1,address:"0x89ab32156e46f46d02ade3fecbe5fc4243b9aaed",symbol:"pnt"},{chainId:1,address:"0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec",symbol:"poly"},{chainId:1,address:"0x43d4a3cd90ddd2f8f4f693170c9c8098163502ad",symbol:"d2d"},{chainId:1,address:"0xeb4c2781e4eba804ce9a9803c67d0893436bb27d",symbol:"renbtc"},{chainId:1,address:"0x408e41876cccdc0f92210600ef50372656052a38",symbol:"ren"},{chainId:1,address:"0xfb5453340c03db5ade474b27e68b6a9c6b2823eb",symbol:"robot"},{chainId:1,address:"0xd33526068d116ce69f19a9ee46f0bd304f21a51f",symbol:"rpl"},{chainId:1,address:"0xae78736cd615f374d3085123a210448e74fc6393",symbol:"reth"},{chainId:1,address:"0xfe18be6b3bd88a2d2a7f928d00292e7a9963cfc6",symbol:"sbtc"},{chainId:1,address:"0x476c5e26a75bd202a9683ffd34359c0cc15be0ff",symbol:"srm"},{chainId:1,address:"0x35e78b3982e87ecfd5b3f3265b601c046cdbe232",symbol:"xai"},{chainId:1,address:"0x3affcca64c2a6f4e3b6bd9c64cd2c969efd1ecbe",symbol:"dsla"},{chainId:1,address:"0xf24d8651578a55b0c119b9910759a351a3458895",symbol:"sdbal"},{chainId:1,address:"0x11c1a6b3ed6bb362954b29d3183cfa97a0c806aa",symbol:"str"},{chainId:1,address:"0x8f693ca8d21b157107184d29d398a8d082b38b76",symbol:"data"},{chainId:1,address:"0x470ebf5f030ed85fc1ed4c2d36b9dd02e77cf1b7",symbol:"temple"},{chainId:1,address:"0xa36fdbbae3c9d55a1d67ee5821d53b50b63a1ab9",symbol:"temp"},{chainId:1,address:"0xdac17f958d2ee523a2206206994597c13d831ec7",symbol:"usdt"},{chainId:1,address:"0x9c4a4204b79dd291d6b6571c5be8bbcd0622f050",symbol:"tcr"},{chainId:1,address:"0x226f7b842e0f0120b7e194d05432b3fd14773a9d",symbol:"unn"},{chainId:1,address:"0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",symbol:"uni"},{chainId:1,address:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",symbol:"usdc"},{chainId:1,address:"0x81f8f0bb1cb2a06649e51913a151f0e7ef6fa321",symbol:"vita"},{chainId:1,address:"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",symbol:"weth"},{chainId:1,address:"0xedb171c18ce90b633db442f2a6f72874093b49ef",symbol:"wampl"},{chainId:1,address:"0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",symbol:"wbtc"},{chainId:1,address:"0xf203ca1769ca8e9e8fe1da9d147db68b6c919817",symbol:"wncg"},{chainId:1,address:"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",symbol:"wsteth"},{chainId:1,address:"0x79c71d3436f39ce382d0f58f1b011d88100b9d91",symbol:"xns"},{chainId:1,address:"0x0bc529c00c6401aef6d220be8c6ea1667f6ad93e",symbol:"yfi"},{chainId:1,address:"0xbcca60bb61934080951369a648fb03df4f96263c",symbol:"ausdc"},{chainId:1,address:"0x028171bca77440897b824ca71d1c56cac55b68a3",symbol:"adai"},{chainId:1,address:"0x3ed3b47dd13ec9a98b44e6204a523e766b225811",symbol:"ausdt"},{chainId:137,address:"0x9c2c5fd7b07e95ee044ddeba0e97a665f142394f",symbol:"1inch"},{chainId:137,address:"0xd6df932a45c0f255f85145f286ea0b292b21c90b",symbol:"aave"},{chainId:137,address:"0xc3fdbadc7c795ef1d6ba111e06ff8f16a20ea539",symbol:"addy"},{chainId:137,address:"0xf84bd51eab957c2e7b7d646a3427c5a50848281d",symbol:"agar"},{chainId:137,address:"0x033d942a6b495c4071083f4cde1f17e986fe856c",symbol:"aga"},{chainId:137,address:"0x0e9b89007eee9c958c0eda24ef70723c2c93dd58",symbol:"amaticc"},{chainId:137,address:"0x034b2090b579228482520c589dbd397c53fc51cc",symbol:"vision"},{chainId:137,address:"0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b",symbol:"avax"},{chainId:137,address:"0x49690541e3f6e933a9aa3cffee6010a7bb5b72d7",symbol:"axiav3"},{chainId:137,address:"0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3",symbol:"bal"},{chainId:137,address:"0xdb7cb471dd0b49b29cab4a1c14d070f27216a0ab",symbol:"bank"},{chainId:137,address:"0xfbdd194376de19a88118e84e279b977f165d01b8",symbol:"bifi"},{chainId:137,address:"0xd6ca869a4ec9ed2c7e618062cdc45306d8dbbc14",symbol:"btc2x-fli-p"},{chainId:137,address:"0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39",symbol:"link"},{chainId:137,address:"0x172370d5cd63279efa6d502dab29171933a610af",symbol:"crv"},{chainId:137,address:"0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",symbol:"dai"},{chainId:137,address:"0x1d607faa0a51518a7728580c238d912747e71f7a",symbol:"data"},{chainId:137,address:"0x85955046df4668e1dd369d2de9f3aeb98dd2a369",symbol:"dpi"},{chainId:137,address:"0xe7804d91dfcde7f776c90043e03eaa6df87e6395",symbol:"dfx"},{chainId:137,address:"0xf28164a485b0b2c90639e47b0f377b4a438a16b1",symbol:"dquick"},{chainId:137,address:"0x45c32fa6df82ead1e2ef74d17b76547eddfaff89",symbol:"frax"},{chainId:137,address:"0x50b728d8d964fd00c2d0aad81718b71311fef68a",symbol:"snx"},{chainId:137,address:"0x72928d5436ff65e57f72d5566dcd3baedc649a88",symbol:"hdao"},{chainId:137,address:"0x3ad707da309f3845cd602059901e39c4dcd66473",symbol:"eth2x-fli-p"},{chainId:137,address:"0x4f025829c4b13df652f38abd2ab901185ff1e609",symbol:"ieth-fli-p"},{chainId:137,address:"0x340f412860da7b7823df372a2b59ff78b7ae6abc",symbol:"imatic-fli-p"},{chainId:137,address:"0xf287d97b6345bad3d88856b26fb7c0ab3f2c7976",symbol:"matic2x-fli-p"},{chainId:137,address:"0x130ce4e4f76c2265f94a961d70618562de0bb8d2",symbol:"ibtc-fli-p"},{chainId:137,address:"0x596ebe76e2db4470966ea395b0d063ac6197a8c5",symbol:"jrt"},{chainId:137,address:"0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4",symbol:"stmatic"},{chainId:137,address:"0xf501dd45a1198c2e1b5aef5314a68b9006d842e0",symbol:"mta"},{chainId:137,address:"0xeaecc18198a475c921b24b8a6c1c1f0f5f3f7ea0",symbol:"seed"},{chainId:137,address:"0xfe712251173a2cd5f5be2b46bb528328ea3565e1",symbol:"mvi"},{chainId:137,address:"0xa3fa99a148fa48d14ed51d610c367c61876997f1",symbol:"mimatic"},{chainId:137,address:"0xa486c6bc102f409180ccb8a94ba045d39f8fc7cb",symbol:"nex"},{chainId:137,address:"0xe2aa7db6da1dae97c5f5c6914d285fbfcc32a128",symbol:"par"},{chainId:137,address:"0x580a84c73811e1839f75d86d75d88cca0c241ff4",symbol:"qi"},{chainId:137,address:"0x831753dd7087cac61ab5644b308642cc1c33dc13",symbol:"quick"},{chainId:137,address:"0xb5c064f955d8e7f38fe0460c556a72987494ee17",symbol:"quick"},{chainId:137,address:"0x00e5646f60ac6fb446f621d146b6e1886f002905",symbol:"rai"},{chainId:137,address:"0x431cd3c9ac9fc73644bf68bf5691f4b83f9e104f",symbol:"rbw"},{chainId:137,address:"0xdbf31df14b66535af65aac99c32e9ea844e14501",symbol:"renbtc"},{chainId:137,address:"0x501ace9c35e60f03a2af4d484f49f9b1efde9f40",symbol:"solace"},{chainId:137,address:"0xfa68fb4628dff1028cfec22b4162fccd0d45efb6",symbol:"maticx"},{chainId:137,address:"0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a",symbol:"sushi"},{chainId:137,address:"0xdf7837de1f2fa4631d716cf2502f8b230f1dcc32",symbol:"tel"},{chainId:137,address:"0xe6469ba6d2fd6130788e0ea9c0a0515900563b59",symbol:"ust"},{chainId:137,address:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",symbol:"usdt"},{chainId:137,address:"0x5fe2b58c013d7601147dcdd68c143a77499f5531",symbol:"grt"},{chainId:137,address:"0xbbba073c31bf03b8acf7c28ef0738decf3695683",symbol:"sand"},{chainId:137,address:"0x2934b36ca9a4b31e633c5be670c8c8b28b6aa015",symbol:"thx"},{chainId:137,address:"0x2f800db0fdb5223b3c3f354886d907a671414a7f",symbol:"bct"},{chainId:137,address:"0x2e1ad108ff1d8c782fcbbb89aad783ac49586756",symbol:"tusd"},{chainId:137,address:"0x3809dcdd5dde24b37abe64a5a339784c3323c44f",symbol:"swap"},{chainId:137,address:"0x7fbc10850cae055b27039af31bd258430e714c62",symbol:"ubt"},{chainId:137,address:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",symbol:"usdc"},{chainId:137,address:"0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",symbol:"weth"},{chainId:137,address:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",symbol:"wmatic"},{chainId:137,address:"0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6",symbol:"wbtc"},{chainId:137,address:"0x24834bbec7e39ef42f4a75eaf8e5b6486d3f0e57",symbol:"lunc"},{chainId:137,address:"0xf153eff70dc0bf3b085134928daeea248d9b30d0",symbol:"xmark"},{chainId:42161,address:"0x9f20de1fc9b161b34089cbeae888168b44b03461",symbol:"arbis"},{chainId:42161,address:"0x040d1edc9569d4bab2d15287dc5a4f10f56a56b8",symbol:"bal"},{chainId:42161,address:"0x031d35296154279dc1984dcd93e392b1f946737b",symbol:"cap"},{chainId:42161,address:"0xf97f4df75117a78c1a5a0dbb814af92458539fb4",symbol:"link"},{chainId:42161,address:"0x354a6da3fcde098f8389cad84b0182725c6c91de",symbol:"comp"},{chainId:42161,address:"0xf4d48ce3ee1ac3651998971541badbb9a14d7234",symbol:"cream"},{chainId:42161,address:"0x11cdb42b0eb46d95f990bedd4695a6e3fa034978",symbol:"crv"},{chainId:42161,address:"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1",symbol:"dai"},{chainId:42161,address:"0x8038f3c971414fd1fc220ba727f2d4a0fc98cb65",symbol:"dht"},{chainId:42161,address:"0xf0b5ceefc89684889e5f7e0a7775bd100fcd3709",symbol:"dusd"},{chainId:42161,address:"0x6c2c06790b3e3e3c38e12ee22f8183b37a13ee55",symbol:"dpx"},{chainId:42161,address:"0x32eb7902d4134bf98a28b963d26de779af92a212",symbol:"rdpx"},{chainId:42161,address:"0xc3ae0333f0f34aa734d5493276223d95b8f9cb37",symbol:"dxd"},{chainId:42161,address:"0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a",symbol:"gmx"},{chainId:42161,address:"0xa0b862f60edef4452f25b4160f177db44deb6cf1",symbol:"gno"},{chainId:42161,address:"0xb965029343d55189c25a7f3e0c9394dc0f5d41b1",symbol:"ndx"},{chainId:42161,address:"0x539bde0d7dbd336b79148aa742883198bbf60342",symbol:"magic"},{chainId:42161,address:"0x4e352cf164e64adcbad318c3a1e222e9eba4ce42",symbol:"mcb"},{chainId:42161,address:"0x3f56e0c36d275367b8c502090edf38289b3dea0d",symbol:"mimatic"},{chainId:42161,address:"0x965772e0e9c84b6f359c8597c891108dcf1c5b1a",symbol:"pickle"},{chainId:42161,address:"0x6694340fc020c5e6b96567843da2df01b2ce1eb6",symbol:"stg"},{chainId:42161,address:"0xd4d42f0b6def4ce0383636770ef773390d85c61a",symbol:"sushi"},{chainId:42161,address:"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",symbol:"usdt"},{chainId:42161,address:"0x23a941036ae778ac51ab04cea08ed6e2fe103614",symbol:"grt"},{chainId:42161,address:"0xa72159fc390f0e3c6d415e658264c7c4051e9b87",symbol:"tcr"},{chainId:42161,address:"0x4d15a3a2286d883af0aa1b3f21367843fac63e07",symbol:"tusd"},{chainId:42161,address:"0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0",symbol:"uni"},{chainId:42161,address:"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",symbol:"usdc"},{chainId:42161,address:"0xa684cd057951541187f288294a1e1c2646aa2d24",symbol:"vsta"},{chainId:42161,address:"0x64343594ab9b56e99087bfa6f2335db24c2d1f17",symbol:"vst"},{chainId:42161,address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1",symbol:"weth"},{chainId:42161,address:"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f",symbol:"wbtc"},{chainId:42161,address:"0x82e3a8f066a6989666b031d916c43672085b1582",symbol:"yfi"}];class Pl{constructor(e,t,a,n,o){if(this.pools=new jr({url:e.urls.subgraph,chainId:e.chainId,query:n}),this.poolsForSimulations=new Ni(Ai(e.urls.subgraph),t,e,void 0,n),this.poolsOnChain=new Xr(this.pools,{provider:t,multicall:e.addresses.contracts.multicall,vault:e.addresses.contracts.vault},e.poolsToIgnore,e.multicallBatchSize),this.poolShares=new Qr(e.urls.subgraph,e.chainId),this.poolJoinExits=new Zr(e.urls.subgraph,e.chainId),e.urls.gaugesSubgraph&&(this.poolGauges=new Yr(e.urls.gaugesSubgraph,e.chainId),this.gaugeShares=new Nr(e.urls.gaugesSubgraph,e.chainId)),e.urls.blockNumberSubgraph){this.blockNumbers=new gl(e.urls.blockNumberSubgraph);const t=async()=>{if(this.blockNumbers)return await this.blockNumbers.find("dayAgo")};this.yesterdaysPools=new jr({url:e.urls.subgraph,chainId:e.chainId,blockHeight:t,query:n})}else if(e.averageBlockTime){const a=async()=>await t.getBlockNumber()-Math.round(86400/(e.averageBlockTime||2));this.yesterdaysPools=new jr({url:e.urls.subgraph,chainId:e.chainId,blockHeight:a,query:n})}const i=_l.filter((t=>t.chainId==e.chainId)).map((e=>e.address)),s=new tl(i,e.chainId,o),r=new nl(e.urls.subgraph,e.chainId),l=new Ne(a.contracts.multicall,e.chainId);this.tokenPrices=new ol(s,r,l);const d=new al(e.chainId,o);this.tokenHistoricalPrices=new il(d,l),this.tokenMeta=new el([]),e.urls.gaugesSubgraph&&(this.liquidityGauges=new qr(e.urls.gaugesSubgraph,a.contracts.multicall,e.addresses.contracts.gaugeController||"",e.chainId,e.addresses.contracts.gaugeControllerCheckpointer)),e.addresses.contracts.feeDistributor&&e.addresses.tokens.bal&&e.addresses.tokens.veBal&&e.addresses.tokens.bbaUsd&&(this.feeDistributor=new dl(a.contracts.multicall,e.addresses.contracts.feeDistributor,e.addresses.tokens.bal,e.addresses.tokens.veBal,e.addresses.tokens.bbaUsd,t)),this.feeCollector=new yl(e.addresses.contracts.vault,t),e.addresses.contracts.protocolFeePercentagesProvider&&(this.protocolFees=new fl(a.contracts.multicall,e.addresses.contracts.protocolFeePercentagesProvider)),this.tokenYields=new Tl,e.addresses.contracts.gyroConfigProxy&&(this.gyroConfigRepository=new kr(e.addresses.contracts.gyroConfigProxy,a.contracts.multicall,t))}}const wl=(t,a)=>"Stable"===t?e.PoolKind.LEGACY_STABLE:"ComposableStable"===t&&1===a?e.PoolKind.COMPOSABLE_STABLE:"ComposableStable"===t?e.PoolKind.COMPOSABLE_STABLE_V2:e.PoolKind.WEIGHTED,xl=ds.encodeSetRelayerApproval,El=ds.encodeGaugeWithdraw,Al=ds.encodeGaugeDeposit,Sl=ds.encodePeekChainedReferenceValue,vl=gt.createInterface(),kl=(e,t)=>{var a;return(null===(a=e.poolType)||void 0===a?void 0:a.match(/.*Linear.*/))?Bl(e,t):[]},Bl=(e,t)=>{if(!(e.id&&t.id&&e.tokens&&t.tokens&&e.mainIndex&&t.mainIndex))throw"Missing tokens";const a=e.tokens[e.mainIndex];return[{poolId:e.id,assetIn:e.address,assetOut:a.address},{poolId:t.id,assetIn:a.address,assetOut:t.address}]},Cl=async(e,t)=>{const a=await t.find(e);if(!a)throw`Pool ${e} not found`;const n=async(e,a)=>{let o=[{address:e}];const i=await t.findBy("address",e);if(i&&e!=a){const t=i.tokens.sort(Ol),a=await Promise.all(t.map((({address:e})=>n(e,i.address))));o=[{address:e,id:i.id,poolType:i.poolType,poolTypeVersion:i.poolTypeVersion,mainIndex:i.mainIndex,tokens:a.flat()}]}return o},o=a.tokens.sort(Ol);return{id:e,address:a.address,tokens:(await Promise.all(o.map((({address:e})=>n(e,a.address))))).flat(),poolType:a.poolType,poolTypeVersion:a.poolTypeVersion,mainIndex:a.mainIndex}},Ol=(e,t)=>e.address.toLowerCase()>t.address.toLowerCase()?1:-1,Ml=(t,o,i,s,r,l,d=!1,p,u,c)=>{if(!(r.id&&l.id&&r.tokens&&l.tokens&&r.poolType&&l.poolType))throw"Pool data is missing";const y=r.tokens.flatMap((({address:e})=>e)),b=l.tokens.flatMap((({address:e})=>e)),m="ComposableStable"==r.poolType&&1==r.poolTypeVersion?0:-1;let f,T=[];m>-1?(f=[{index:m,key:ds.toChainedReference(`10${m}`)}],T=[ds.toChainedReference(`20${m}`)]):(f=y.map(((e,t)=>({index:t,key:ds.toChainedReference(`10${t}`)}))),T=y.map(((e,t)=>ds.toChainedReference(`20${t}`))));const h=ds.toChainedReference("999"),I=[];let g=!1;"ComposableStable"===r.poolType&&(g=!0),c&&I.push(xl(o,!0,c)),p&&I.push(El(p,t,o,i)),I.push(((e,t,a,n,o=-1,i,s,r,l,d=!0)=>{let p;const u="ComposableStable"===t&&1===a;p=o>-1?S.exitExactBPTInForOneTokenOut(s,o):(u?O.exitExactBPTInForAllTokensOut:S.exitExactBPTInForTokensOut)(s);const c=wl(t,a);return ds.encodeExitPool({poolId:e,poolKind:c,sender:r,recipient:l,outputReferences:i,exitPoolRequest:{assets:n,minAmountsOut:new Array(n.length).fill("0"),userData:p,toInternalBalance:d}})})(r.id,r.poolType,r.poolTypeVersion||1,y,m,f,i,p?o:t,o));const _=((e,t,a)=>{const n=({tokens:e,mainIndex:t})=>e&&t&&e[t].address||"",o=e.flatMap(n),i=t.flatMap(n),s=o.map(((e,t)=>e&&[t,i.indexOf(e)]||[-1,-1])).map((([a,n])=>{if(-1===a||-1===n)return[];const o=e[a],i=t[n];return kl(o,i)}));return a>-1?[s[a]]:s})(r.tokens,l.tokens,m);if(_.flat().length>0){const t=_.map(((e,t)=>({path:e,inputAmount:String(f[t].key),outputReference:T[t]}))).filter((({path:e})=>e.length>0));I.push(((t,o,i,s,r=!0)=>{const l=[],d=[],p=[],u=[];i.forEach((e=>{const{path:t,inputAmount:n,outputReference:o}=e;for(let e=0;el.address!=e)).map((e=>{var t;const a=y.indexOf(e);return String(g&&T[a]||(null===(t=f[a])||void 0===t?void 0:t.key)||0)}));I.push(((e,t,n,o,i,s,r,l,d,p=!0)=>{const u=o.map((()=>a.MaxInt256)),c=S.joinExactTokensInForBPTOut(i,s),y=wl(t,n);return ds.encodeJoinPool({poolId:e,kind:y,sender:l,recipient:d,joinPoolRequest:{assets:o,maxAmountsIn:u,userData:c,fromInternalBalance:p},value:"0",outputReference:r})})(l.id,l.poolType,l.poolTypeVersion||1,b,P,s,String(h),o,u?o:t,!0)),!0===d&&I.push(Sl(String(h))),u&&I.push(Al(u,o,t,String(h)));return vl.encodeFunctionData("multicall",[I])};class Fl{constructor({relayerAddress:e,poolsRepository:t,gaugesRepository:a,provider:n}){this.getExpectedBptOut=Fl.getExpectedBptOut,this.relayerAddress=e,this.poolsRepository=t,this.gaugesRepository=a,this.provider=n}async pool2pool({user:e,from:t,to:a,balance:n,minBptOut:o="0",authorisation:i}){const s=await Cl(t,this.poolsRepository),r=await Cl(a,this.poolsRepository),l=Ml(e,this.relayerAddress,String(n),o,s,r,"0"==o,void 0,void 0,i);return{to:this.relayerAddress,data:l}}async pool2poolWithGauges({user:e,from:t,to:a,balance:n,minBptOut:o="0",authorisation:i}){const s=await this.gaugesRepository.findBy("poolId",t),r=await this.gaugesRepository.findBy("poolId",a);if(!(s&&s.poolId&&r&&r.poolId))throw new Error("Gauge not found");const l=await Cl(s.poolId,this.poolsRepository),d=await Cl(r.poolId,this.poolsRepository),p=Ml(e,this.relayerAddress,String(n),o,l,d,"0"==o,s.id,r.id,i);return{to:this.relayerAddress,data:p}}async gauge2gauge({user:e,from:t,to:a,balance:n,authorisation:o}){const i=[El(t,e,this.relayerAddress,n),Al(a,this.relayerAddress,e,n)];o&&i.unshift(xl(this.relayerAddress,!0,o));const s=vl.encodeFunctionData("multicall",[i]);return{to:this.relayerAddress,data:s}}}Fl.getExpectedBptOut=e=>{const t=vl.decodeFunctionResult("multicall",e)[0].slice(-2).filter((e=>"0x"!==e));return String(BigInt(t))};var Rl,Nl;!function(e){e[e.Direct=0]="Direct",e[e.TokenIn=1]="TokenIn",e[e.TokenOut=2]="TokenOut",e[e.Middle=3]="Middle"}(Rl||(Rl={})),function(e){e[e.BatchSwap=0]="BatchSwap",e[e.Join=1]="Join",e[e.Exit=2]="Exit"}(Nl||(Nl={}));class Ll{constructor(e,t,a,n,o,i,s,r,l,d){const p=this.getActionStep(e,t,a,n);this.amountIn=this.getActionAmount(o,Nl.BatchSwap,p,s),this.hasTokenIn=this.actionHasTokenIn(p),this.hasTokenOut=this.actionHasTokenOut(p);const u=this.hasTokenOut?i:"0";this.minOut=this.getActionMinOut(u,r);const[c,y]=this.getActionOutputRef(p,n,s);this.nextOpRefKey=y,this.opRefStart=c,this.sender=this.getSender(this.hasTokenIn,l,d),this.receiver=this.getReceiver(this.hasTokenOut,l,d)}getActionAmount(e,t,a,n){let o=e;return(a===Rl.TokenOut||a===Rl.Middle&&t===Nl.Join||a===Rl.Middle&&t===Nl.Exit)&&(o=ds.toChainedReference(n-1).toString()),o}getActionOutputRef(e,t,a){let n={};return e!==Rl.TokenIn&&e!==Rl.Middle||(n=this.getOutputRef(a,t),a++),[n,a]}getActionMinOut(e,t){return $e(n.BigNumber.from(e),n.BigNumber.from(t)).toString()}getActionStep(e,t,a,n){let o;return o=a===e&&n===t?Rl.Direct:a===e?Rl.TokenIn:n===t?Rl.TokenOut:Rl.Middle,o}getOutputRef(e,t){return{index:t,key:ds.toChainedReference(e)}}getFromInternal(e,t){return!e&&!t}getToInternal(e,t){return!e&&!t}actionHasTokenIn(e){return e===Rl.Direct||e===Rl.TokenIn}actionHasTokenOut(e){return e===Rl.Direct||e===Rl.TokenOut}getSender(e,t,a){return e?t:a}getReceiver(e,t,a){return e?t:a}getPoolKind(e){let t=0;return["MetaStable","Stable","StablePhantom"].includes(e)?t=1:"ComposableStable"===e&&(t=3),t}}class Dl extends Ll{constructor(e,t,a,n,o,i,s,r){var l;super(t,a,e.assetInIndex,e.assetOutIndex,e.amount,null!==(l=e.returnAmount)&&void 0!==l?l:"0",n,i,s,r),this.opRefKey=n,this.type=Nl.Exit,this.poolId=e.poolId,this.tokenOut=o[e.assetOutIndex],this.toInternalBalance=this.getToInternal(this.hasTokenOut),this.opRef=this.opRefStart}callData(e,t){const a=e.tokensList,n=new z(t),[o]=n.sortTokens(a),i=this.tokenOut,s=o.findIndex((e=>e.toLowerCase()===i.toLowerCase())),r=Array(a.length).fill("0");r[s]=this.minOut;const l=this.amountIn,d={assets:o,minAmountsOut:r,userData:v.exitExactBPTInForOneTokenOut(l,s),toInternalBalance:this.toInternalBalance,poolId:this.poolId,poolKind:this.getPoolKind(e.poolType),sender:this.sender,recipient:this.receiver,outputReferences:this.opRef.key?[this.opRef]:[],exitPoolRequest:{}},p=ds.formatExitPoolInput(d);return{params:d,encoded:ds.encodeExitPool(p)}}getAmountIn(){return this.hasTokenIn?this.amountIn:"0"}getAmountOut(){return this.hasTokenOut?this.minOut:"0"}}class Ul extends Ll{constructor(e,t,a,n,o,i,s,r){var l;super(t,a,e.assetInIndex,e.assetOutIndex,e.amount,null!==(l=e.returnAmount)&&void 0!==l?l:"0",n,i,s,r),this.opRefKey=n,this.type=Nl.Join,this.poolId=e.poolId,this.tokenIn=o[e.assetInIndex],this.fromInternal=this.getFromInternal(this.hasTokenIn),this.opRef=this.opRefStart}callData(e,t){const a=e.tokensList,n=new z(t),[o]=n.sortTokens(a),i=this.tokenIn,s=o.findIndex((e=>e.toLowerCase()===i.toLowerCase())),r=Array(a.length).fill("0");r[s]=this.amountIn;const l=this.minOut,d=v.joinExactTokensInForBPTOut(r,l),p={poolId:this.poolId,sender:this.sender,recipient:this.receiver,kind:this.getPoolKind(e.poolType),joinPoolRequest:{assets:o,maxAmountsIn:r,userData:d,fromInternalBalance:this.fromInternal},value:"0",outputReference:this.opRef.key?this.opRef.key.toString():"0"};return{params:p,encoded:ds.encodeJoinPool(p)}}getAmountIn(){return this.hasTokenIn?this.amountIn:"0"}getAmountOut(){return this.hasTokenOut?this.minOut:"0"}}class Vl extends Ll{constructor(e,t,a,n,o,i,s,r,l){var d;super(t,a,e.assetInIndex,e.assetOutIndex,e.amount,null!==(d=e.returnAmount)&&void 0!==d?d:"0",n,i,r,l),this.mainTokenInIndex=t,this.mainTokenOutIndex=a,this.opRefKey=n,this.assets=o,this.slippage=i,this.pools=s,this.user=r,this.relayer=l,this.approveTokens=[],this.opRef=[],this.type=Nl.BatchSwap,this.swaps=[{...e,amount:this.amountIn}];const p=this.isBpt(s,o[e.assetInIndex]);p&&this.approveTokens.push(o[e.assetInIndex]),this.fromInternal=this.getFromInternal(this.hasTokenIn,p);const u=this.isBpt(s,o[e.assetOutIndex]);this.toInternal=this.getToInternal(this.hasTokenOut,u),this.limits=this.getLimits(o,e.assetInIndex,e.assetOutIndex,e.amount,this.hasTokenIn,this.hasTokenOut,this.minOut),this.opRefStart.index&&this.opRef.push(this.opRefStart)}getLimits(e,t,o,i,s,r,l){const d=e.map((()=>n.BigNumber.from(0)));return d[t]=s?n.BigNumber.from(i):a.MaxInt256,r&&(d[o]=n.BigNumber.from(l).mul(-1)),d}updateLimits(e,t){t.hasTokenIn&&(e[t.swaps[0].assetInIndex]=e[t.swaps[0].assetInIndex].add(t.amountIn)),t.hasTokenOut&&(e[t.swaps[0].assetOutIndex]=e[t.swaps[0].assetOutIndex].sub(t.minOut))}isChainedSwap(e){return this.opRef[this.swaps.length-1]&&this.toInternal===e.fromInternal&&this.receiver===e.sender&&this.opRef[this.swaps.length-1].key.toString()===e.amountIn}canAddSwap(e){return!!this.isChainedSwap(e)||e.fromInternal===this.fromInternal&&e.toInternal===this.toInternal&&e.receiver===this.receiver&&e.sender===this.sender}callData(){const t=[];for(const e of this.approveTokens){const n=ds.encodeApproveVault(e,a.MaxUint256.toString());t.push(n)}const o={sender:this.sender,recipient:this.receiver,fromInternalBalance:this.fromInternal,toInternalBalance:this.toInternal},i={swapType:e.SwapType.SwapExactIn,swaps:this.swaps,assets:this.assets,funds:o,limits:this.limits.map((e=>e.toString())),deadline:n.BigNumber.from(Math.ceil(Date.now()/1e3)+3600),value:"0",outputReferences:this.opRef},s=ds.encodeBatchSwap(i);return t.push(s),{params:i,encoded:t}}getAmountIn(){return this.limits[this.mainTokenInIndex].toString()}getAmountOut(){return this.limits[this.mainTokenOutIndex].abs().toString()}copy(){return new Vl(this.swaps[0],this.mainTokenInIndex,this.mainTokenOutIndex,this.opRefKey,this.assets,this.slippage,this.pools,this.user,this.relayer)}addSwap(e){const t=this.isChainedSwap(e);this.swaps.push(e.swaps[0]),this.approveTokens=[...new Set([...this.approveTokens,...e.approveTokens])],this.toInternal=e.toInternal,this.receiver=e.receiver,this.hasTokenOut=e.hasTokenOut,this.minOut=e.minOut,this.opRef=[...this.opRef,...e.opRef],t||(this.amountIn=n.BigNumber.from(this.amountIn).add(e.amountIn).toString()),this.updateLimits(this.limits,e)}isBpt(e,t){return e.some((e=>e.address.toLowerCase()===t.toLowerCase()))}}function ql(e){const t=function(e){const t=[],a=[],n=[];for(const o of e)o.type===Nl.Exit||o.type===Nl.Join?o.hasTokenIn?t.push(o):o.hasTokenOut?a.push(o):n.push(o):n.push(o);return[...t,...n,...a]}(e);return function(e){const t=[];let a;for(const n of e)n.type===Nl.BatchSwap?a?a.canAddSwap(n)?a.addSwap(n):(t.push(a),a=n.copy()):a=n.copy():(a&&(t.push(a),a=void 0),t.push(n));return a&&t.push(a),t}(t)}const Gl=new t.Interface([{inputs:[{internalType:"contract IVault",name:"vault",type:"address"},{internalType:"address",name:"libraryAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"getLibrary",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getVault",outputs:[{internalType:"contract IVault",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}]);function Wl(e){X.getInstance()}function Hl(e,t,a){if("Weighted"!==a)return!1;const n=t[e.assetOutIndex],o=N(e.poolId);return n.toLowerCase()===o.toLowerCase()}function Kl(e,t,a){if("Weighted"!==a)return!1;const n=t[e.assetInIndex],o=N(e.poolId);return n.toLowerCase()===o.toLowerCase()}Object.defineProperty(e,"PoolFilter",{enumerable:!0,get:function(){return d.PoolFilter}}),Object.defineProperty(e,"SOR",{enumerable:!0,get:function(){return d.SOR}}),Object.defineProperty(e,"SwapTypes",{enumerable:!0,get:function(){return d.SwapTypes}}),Object.defineProperty(e,"stableBPTForTokensZeroPriceImpact",{enumerable:!0,get:function(){return d.stableBPTForTokensZeroPriceImpact}}),Object.defineProperty(e,"weightedBPTForTokensZeroPriceImpact",{enumerable:!0,get:function(){return d.weightedBPTForTokensZeroPriceImpact}}),e.AMP_PRECISION=3,e.APR_THRESHOLD=1e4,e.AaveLinearPoolFactory__factory=lt,e.AaveLinearPool__factory=st,e.AaveRates=Ne,e.AaveWrapping__factory=pt,e.AssetHelpers=z,e.Authoriser__factory=ct,e.BALANCER_NETWORK_CONFIG=Ba,e.BalancerAPIArgsFormatter=at,e.BalancerError=Ma,e.BalancerErrors=Q,e.BalancerHelpers__factory=bt,e.BalancerMinterAuthorization=ne,e.BalancerMinter__factory=ft,e.BalancerPoolDataQueries__factory=ht,e.BalancerRelayer__factory=gt,e.BalancerSDK=class{constructor(e,t=new Ki(e),a=new ps(e)){this.config=e,this.sor=t,this.subgraph=a;X.getInstance().setLoggingEnabled(!!e.enableLogging),this.networkConfig=Di(e),this.provider=t.provider,this.balancerContracts=new Ts(this.networkConfig.addresses.contracts,t.provider),this.data=new Pl(this.networkConfig,t.provider,this.balancerContracts,e.subgraphQuery,e.coingecko),this.swaps=new ss(this.config),this.relayer=new ds,this.pricing=new us(e,this.swaps),this.pools=new dr(this.networkConfig,this.data,this.balancerContracts),this.data.liquidityGauges&&(this.claimService=new Rn(this.data.liquidityGauges,this.data.feeDistributor,this.networkConfig.chainId,this.contracts.multicall,this.networkConfig.addresses.contracts.gaugeClaimHelper,this.networkConfig.addresses.contracts.balancerMinter),this.migrationService=new Fl({relayerAddress:this.networkConfig.addresses.contracts.balancerRelayer,poolsRepository:this.data.pools,gaugesRepository:this.data.liquidityGauges.subgraph,provider:this.provider})),this.vaultModel=new Ws(this.data.poolsForSimulations,this.networkConfig.addresses.tokens.wrappedNativeAsset)}get contracts(){return this.balancerContracts.contracts}},e.BasePoolEncoder=A,e.BatchRelayerLibrary__factory=Pt,e.BlockNumberRepository=gl,e.CoingeckoHistoricalPriceRepository=al,e.CoingeckoPriceRepository=tl,e.ComposableStablePoolEncoder=O,e.ComposableStablePoolFactory__factory=At,e.ComposableStablePool__factory=xt,e.ConvergentCurvePool__factory=vt,e.Data=Pl,e.Debouncer=qe,e.ERC20__factory=Bt,e.ERC4626LinearPoolFactory__factory=Ft,e.ERC4626LinearPool__factory=Ot,e.EulerLinearPoolFactory__factory=Dt,e.EulerLinearPool__factory=Nt,e.FXPool__factory=Vt,e.FeeCollectorRepository=yl,e.FeeDistributorRepository=dl,e.GaugeClaimHelper__factory=Gt,e.GaugeControllerMulticallRepository=Or,e.GaugeSharesRepository=Nr,e.GearboxLinearPoolFactory__factory=$t,e.GearboxLinearPool__factory=Ht,e.GraphQLArgsBuilder=ot,e.GyroConfig__factory=jt,e.GyroEV2__factory=ga,e.HistoricalPriceProvider=il,e.LidoRelayer__factory=Yt,e.LinearPool__factory=Zt,e.Liquidity=Sn,e.LiquidityGaugeSubgraphRPCProvider=qr,e.LiquidityGaugeV5__factory=ea,e.LiquidityGaugesMulticallRepository=Ur,e.LiquidityGaugesSubgraphRepository=Vr,e.ManagedPoolEncoder=k,e.Migrations=Fl,e.Multicall3__factory=oa,e.Multicall__factory=aa,e.POOLS=function(e){return q[e]?q[e]:V},e.PoolGaugesRepository=Yr,e.PoolJoinExitRepository=Zr,e.PoolSharesRepository=Qr,e.Pools=dr,e.PoolsBalancerAPIRepository=class{constructor(e){var t,a;this.pools=[],this.skip=0,this.hasFetched=!1,this.isFetching=!1,this.client=new Gr(e.url,e.apiKey);this.query={args:Object.assign({},(null===(t=e.query)||void 0===t?void 0:t.args)||{chainId:1,orderBy:"totalLiquidity",orderDirection:"desc",where:{swapEnabled:{eq:!0},totalShares:{gt:.05}}}),attrs:Object.assign({},(null===(a=e.query)||void 0===a?void 0:a.attrs)||{id:!0,address:!0})},delete this.query.args.skip}fetchFromCache(e,t){return this.pools.slice(t,e+t)}async fetch(e){const t=(null==e?void 0:e.first)||10,a=(null==e?void 0:e.skip)||0;return this.hasFetched||this.fetchAll(e),await this.awaitEnoughPoolsFetched(t,a),this.fetchFromCache(t,a)}async fetchAll(e){this.isFetching=!0,this.hasFetched=!0,this.nextToken&&(this.query.args.nextToken=this.nextToken),this.query.args.first=1e3;const t=new ot(this.query.args).format(new at),a=this.query.attrs;a.nextToken=!0;const n={pools:{__args:t,...a}},o=(await this.client.get(n)).pools;if(this.nextToken=o.nextToken,this.pools=this.pools.concat(o.pools.map(this.format)),this.nextToken)return await this.fetchAll(e);this.isFetching=!1}async awaitEnoughPoolsFetched(e,t){for(let a=0;a<1e3;a++){if(this.pools.length>e+t)return;if(!this.isFetching)return;await Wr(10)}}async find(e){return 0==this.pools.length&&await this.fetch(),this.findBy("id",e)}async findBy(e,t){0==this.pools.length&&await this.fetch();const a=this.pools.find((a=>a[e]==t));if(a)return this.format(a)}format(e){var t,a,n,o;if(null===(t=e.apr)||void 0===t?void 0:t.rewardAprs.breakdown){const t=JSON.parse(null===(a=e.apr)||void 0===a?void 0:a.rewardAprs.breakdown);e.apr.rewardAprs.breakdown=t}if(null===(n=e.apr)||void 0===n?void 0:n.tokenAprs.breakdown){const t=JSON.parse(null===(o=e.apr)||void 0===o?void 0:o.tokenAprs.breakdown);e.apr.tokenAprs.breakdown=t}return e}},e.PoolsFallbackRepository=class{constructor(e,t={}){this.providers=e,this.currentProviderIdx=0,this.timeout=t.timeout||1e4}async fetch(e){return this.fallbackQuery("fetch",[e])}get currentProvider(){if(this.providers.length&&!(this.currentProviderIdx>=this.providers.length))return this.providers[this.currentProviderIdx]}async find(e){return this.fallbackQuery("find",[e])}async findBy(e,t){return this.fallbackQuery("findBy",[e,t])}async fallbackQuery(e,t){if(this.currentProviderIdx>=this.providers.length)throw new Error("No working providers found");let a;try{const n=this.providers[this.currentProviderIdx];a=await Promise.race([n[e].apply(n,t),new Promise(((e,t)=>setTimeout((()=>t(new Error("timeout"))),this.timeout)))])}catch(n){const o=n.message;if("timeout"===o){X.getInstance().warn("Provider "+this.currentProviderIdx+" timed out, falling back to next provider")}else{const e=X.getInstance();e.warn(`Provider ${this.currentProviderIdx} failed with error, falling back to next provider.`),e.warn(o)}this.currentProviderIdx++,a=await this.fallbackQuery.call(this,e,t)}return a}},e.PoolsStaticRepository=class{constructor(e){this.pools=e}async find(e){return this.pools.find((t=>t.id.toLowerCase()===e.toLowerCase()))}async findBy(e,t){return this.pools.find((a=>a[e]===t))}async all(){return this.pools}async where(e){return(await this.all()).filter(e)}},e.PoolsSubgraphOnChainRepository=Xr,e.PoolsSubgraphRepository=jr,e.ProtocolFeesProvider=fl,e.Relayer=ds,e.RelayerAuthorization=ae,e.SHALLOW_COMPOSABLE_STABLE_BUFFER=1e6,e.Sor=Ki,e.StablePoolEncoder=S,e.StablePool__factory=sa,e.StaticATokenRateProvider__factory=la,e.StaticTokenPriceProvider=class{constructor(e){this.tokenPrices=Object.fromEntries(Object.entries(e).map((([e,t])=>[e.toLowerCase(),t])))}async find(e){const t=e.toLowerCase(),a=this.tokenPrices[t];if(a)return a}async findBy(e,t){if("address"==e)return this.find(t)}},e.StaticTokenProvider=el,e.Subgraph=ps,e.SubgraphArgsFormatter=nt,e.SubgraphPriceRepository=nl,e.Swaps=ss,e.TokenPriceProvider=ol,e.TokenYieldsRepository=Tl,e.Vault__factory=pa,e.VeBal__factory=Pa,e.VeDelegationProxy__factory=xa,e.WeightedPoolEncoder=v,e.WeightedPoolFactory__factory=ba,e.WeightedPool__factory=ca,e.YearnLinearPoolFactory__factory=ha,e.YearnLinearPool__factory=fa,e.accountToAddress=ee,e.addSlippage=Je,e.addressMapIn=De,e.balEmissions=Es,e.bn=e=>n.parseFixed(`${e}`,18),e.buildRelayerCalls=function(t,a,o,i,s,r,l){const d=function(e,t,a,n,o,i,s,r){var l;const d=n.findIndex((t=>t.toLowerCase()===e.toLowerCase())),p=n.findIndex((e=>e.toLowerCase()===t.toLowerCase())),u=[];let c=0;for(const e of a){const t=null===(l=i.find((t=>t.id===e.poolId)))||void 0===l?void 0:l.poolType;if(Hl(e,n,t)){const t=new Ul(e,d,p,c,n,o,s,r);c=t.nextOpRefKey,u.push(t)}else{if(!Kl(e,n,t)){const t=new Vl(e,d,p,c,n,o,i,s,r);c=t.nextOpRefKey,u.push(t);continue}{const t=new Dl(e,d,p,c,n,o,s,r);c=t.nextOpRefKey,u.push(t)}}}return u}(t.tokenIn,t.tokenOut,t.swaps,t.tokenAddresses,r,a,o,i),p=ql(d),u=[],c=[];l&&u.push(ds.encodeSetRelayerApproval(i,!0,l));for(const t of p){if(t.type===Nl.Exit||t.type===Nl.Join){const n=a.find((e=>e.id===t.poolId));if(void 0===n)throw new Ma(e.BalancerErrorCode.NO_POOL_DATA);const{params:o,encoded:i}=t.callData(n,s);u.push(i),c.push(o)}if(t.type===Nl.BatchSwap){const{params:e,encoded:a}=t.callData();u.push(...a),c.push(e)}}return function(t,a,o,i){const s=t.reduce(((e=n.BigNumber.from(0),t)=>e.add(t))),r=a.reduce(((e=n.BigNumber.from(0),t)=>e.add(t)));Wl(s.toString()),Wl(o.swapAmount.toString()),Wl(r.toString()),Wl($e(o.returnAmount,n.BigNumber.from(i)).toString()),Wl(o.returnAmount.toString());const l=r.sub($e(o.returnAmount,n.BigNumber.from(i)));if(!s.eq(o.swapAmount)||!l.lt("3"))throw new Ma(e.BalancerErrorCode.RELAY_SWAP_AMOUNTS)}(p.map((e=>n.BigNumber.from(e.getAmountIn()))),p.map((e=>n.BigNumber.from(e.getAmountOut()))),t,r),{to:i,data:Gl.encodeFunctionData("multicall",[u]),rawCalls:u,inputs:c}},e.canUseJoinExit=function(e,t,n){return e!==d.SwapTypes.SwapExactOut&&t.toLowerCase()!==a.AddressZero.toLowerCase()&&n.toLowerCase()!==a.AddressZero.toLowerCase()},e.factories=Aa,e.fetchOnChainPoolData=Fi,e.findEventInReceiptLogs=et,e.formatFixed=We,e.formatFromBigInt18=function(e){return n.formatFixed(n.BigNumber.from(e),18)},e.getEthValue=Ve,e.getLimitsForSlippage=Sa,e.getOnChainBalances=Ri,e.getPoolAddress=N,e.getPoolNonce=D,e.getPoolSpecialization=L,e.getRandomBytes32=tt,e.insert=Xe,e.isLinearish=Qe,e.isNormalizedWeights=e=>{const t=e.reduce(((e,t)=>e.add(t)),a.Zero);return t.eq(a.WeiPerEther)},e.isSameAddress=je,e.mulSlippage=Ke,e.parseFixed=Ge,e.parsePoolInfo=me,e.parseToBigInt18=function(e){return Ge(e,18).toBigInt()},e.removeItem=ze,e.reorderArrays=Ze,e.replace=Ye,e.signPermit=async(e,t,o,s,r=a.MaxUint256,l)=>{const{chainId:d}=await e.provider.getNetwork(),p=await t.getAddress();l||(l=await e.nonces(p));const u={name:await e.name(),version:"1",chainId:d,verifyingContract:e.address},c={owner:p,spender:await ee(o),value:s,nonce:l,deadline:r},y=await t._signTypedData(u,{Permit:[{name:"owner",type:"address"},{name:"spender",type:"address"},{name:"value",type:"uint256"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},c);return{...i.splitSignature(y),deadline:n.BigNumber.from(r),nonce:n.BigNumber.from(l)}},e.someJoinExit=function(e,t,a){return t.some((t=>function(e,t,a){const n=e.find((e=>e.id===t.poolId));return"Weighted"===(null==n?void 0:n.poolType)&&[a[t.assetInIndex],a[t.assetOutIndex]].includes(n.address)}(e,t,a)))},e.splitPoolId=e=>({address:N(e),specialization:L(e),nonce:D(e)}),e.subSlippage=$e,e.toNormalizedWeights=function(e){if(100==e.length)return Array(100).fill(a.WeiPerEther.div(100));const t=e.reduce(((e,t)=>e.add(t)),a.Zero);if(t.eq(a.WeiPerEther))return e;const n=[];let o=a.Zero;for(let i=0;i{e.price&&(t[e.address]=e.price)})),t},e.truncateAddresses=function(e){return e.map((e=>`${e.slice(0,6)}...${e.slice(38,42)}`))},e.unwrapToken=Ue,e.wrappedTokensMap=Fe,e.yieldTokens=Me,Object.defineProperty(e,"__esModule",{value:!0})})); +//# sourceMappingURL=index.umd.js.map diff --git a/package/dist/index.umd.js.map b/package/dist/index.umd.js.map new file mode 100644 index 000000000..e7d0ea8e4 --- /dev/null +++ b/package/dist/index.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.umd.js","sources":["../../src/pool-base/encoder.ts","../../src/pool-stable/encoder.ts","../../src/pool-weighted/encoder.ts","../../src/pool-composable-stable/encoder.ts","../node_modules/tiny-invariant/dist/esm/tiny-invariant.js","../../src/pool-utils/poolId.ts","../../src/lib/constants/network.ts","../../src/lib/constants/pools.ts","../../src/modules/data/pool-gauges/types.ts","../../src/modules/data/pool-shares/types.ts","../../src/modules/data/gauge-shares/types.ts","../../src/types.ts","../../src/lib/utils/logger.ts","../../src/lib/utils/assetHelpers.ts","../../src/lib/utils/errors.ts","../../src/lib/utils/signatures.ts","../../src/lib/utils/permit.ts","../../src/lib/utils/solidityMaths.ts","../../src/lib/utils/poolHelper.ts","../../src/lib/constants/tokens.ts","../node_modules/@ethersproject/logger/lib.esm/index.js","../node_modules/@ethersproject/logger/lib.esm/_version.js","../node_modules/@ethersproject/units/lib.esm/_version.js","../node_modules/@ethersproject/units/lib.esm/index.js","../../src/modules/data/token-prices/aave-rates.ts","../../src/lib/utils/tokens.ts","../../src/lib/utils/debouncer.ts","../../src/lib/utils/math.ts","../../src/lib/utils/slippageHelper.ts","../../src/lib/utils/index.ts","../../src/lib/graphql/formatters/balancer-api.ts","../../src/lib/graphql/formatters/subgraph.ts","../../src/lib/graphql/args-builder.ts","../../src/contracts/factories/AaveLinearPool__factory.ts","../../src/contracts/factories/AaveLinearPoolFactory__factory.ts","../../src/contracts/factories/AaveWrapping__factory.ts","../../src/contracts/factories/Authoriser__factory.ts","../../src/contracts/factories/BalancerHelpers__factory.ts","../../src/contracts/factories/BalancerMinter__factory.ts","../../src/contracts/factories/BalancerPoolDataQueries__factory.ts","../../src/contracts/factories/BalancerRelayer__factory.ts","../../src/contracts/factories/BatchRelayerLibrary__factory.ts","../../src/contracts/factories/ComposableStablePool__factory.ts","../../src/contracts/factories/ComposableStablePoolFactory__factory.ts","../../src/contracts/factories/ConvergentCurvePool__factory.ts","../../src/contracts/factories/ERC20__factory.ts","../../src/contracts/factories/ERC4626LinearPool__factory.ts","../../src/contracts/factories/ERC4626LinearPoolFactory__factory.ts","../../src/contracts/factories/EulerLinearPool__factory.ts","../../src/contracts/factories/EulerLinearPoolFactory__factory.ts","../../src/contracts/factories/FXPool__factory.ts","../../src/contracts/factories/GaugeClaimHelper__factory.ts","../../src/contracts/factories/GearboxLinearPool__factory.ts","../../src/contracts/factories/GearboxLinearPoolFactory__factory.ts","../../src/contracts/factories/GyroConfig__factory.ts","../../src/contracts/factories/LidoRelayer__factory.ts","../../src/contracts/factories/LinearPool__factory.ts","../../src/contracts/factories/LiquidityGaugeV5__factory.ts","../../src/contracts/factories/Multicall__factory.ts","../../src/contracts/factories/Multicall3__factory.ts","../../src/contracts/factories/StablePool__factory.ts","../../src/contracts/factories/StaticATokenRateProvider__factory.ts","../../src/contracts/factories/Vault__factory.ts","../../src/contracts/factories/WeightedPool__factory.ts","../../src/contracts/factories/WeightedPoolFactory__factory.ts","../../src/contracts/factories/YearnLinearPool__factory.ts","../../src/contracts/factories/YearnLinearPoolFactory__factory.ts","../../src/contracts/factories/GyroEV2__factory.ts","../../src/contracts/factories/VeBal__factory.ts","../../src/contracts/factories/VeDelegationProxy__factory.ts","../../src/modules/swaps/types.ts","../../src/modules/swaps/helpers.ts","../../src/lib/constants/config.ts","../../src/balancerErrors.ts","../../src/modules/pricing/priceImpact.ts","../../src/lib/utils/stableMathHelpers.ts","../../src/modules/pools/pool-types/concerns/stable/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/stable/exit.concern.ts","../../src/modules/pools/pool-types/concerns/stable/join.concern.ts","../../src/modules/pools/pool-types/concerns/stable/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/stable/spotPrice.concern.ts","../../src/modules/pools/pool-types/stable.module.ts","../../src/modules/pools/pool-types/concerns/stablePhantom/spotPrice.concern.ts","../../src/modules/pools/pool-types/concerns/composableStable/join.concern.ts","../../src/modules/pools/pool-types/concerns/composableStable/exit.concern.ts","../../src/modules/pools/pool-types/composableStable.module.ts","../../src/modules/pools/pool-types/concerns/weighted/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/weighted/exit.concern.ts","../../src/modules/pools/pool-types/concerns/weighted/join.concern.ts","../../src/modules/pools/pool-types/concerns/weighted/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/weighted/spotPrice.concern.ts","../../src/modules/pools/pool-types/weighted.module.ts","../../src/modules/pools/pool-types/concerns/metaStable/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/metaStable/spotPrice.concern.ts","../../src/modules/pools/pool-types/metaStable.module.ts","../../src/modules/pools/pool-types/concerns/stablePhantom/exit.concern.ts","../../src/modules/pools/pool-types/concerns/stablePhantom/join.concern.ts","../../src/modules/pools/pool-types/stablePhantom.module.ts","../../src/modules/pools/pool-types/concerns/linear/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/linear/exit.concern.ts","../../src/modules/pools/pool-types/concerns/linear/join.concern.ts","../../src/modules/pools/pool-types/concerns/linear/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/linear/spotPrice.concern.ts","../../src/modules/pools/pool-types/linear.module.ts","../../src/modules/pools/pool-types/concerns/fx/exit.concern.ts","../../src/modules/pools/pool-types/concerns/fx/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/fx/spotPrice.concern.ts","../../src/modules/pools/pool-types/concerns/fx/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/fx/join.concern.ts","../../src/modules/pools/pool-types/fx.module.ts","../../src/modules/pools/pool-types/concerns/gyro/exit.concern.ts","../../src/modules/pools/pool-types/concerns/gyro/liquidity.concern.ts","../../src/modules/pools/pool-types/concerns/gyro/spotPrice.concern.ts","../../src/modules/pools/pool-types/concerns/gyro/priceImpact.concern.ts","../../src/modules/pools/pool-types/concerns/gyro/join.concern.ts","../../src/modules/pools/pool-types/gyro.module.ts","../../src/modules/pools/pool-type-concerns.ts","../../src/modules/liquidity/liquidity.module.ts","../../src/modules/claims/helper.ts","../../src/modules/claims/ClaimService.ts","../../src/modules/swaps/queryBatchSwap.ts","../node_modules/tslib/tslib.es6.js","../node_modules/graphql-tag/lib/index.js","../../src/modules/subgraph/generated/balancer-subgraph-types.ts","../../src/modules/subgraph/generated/balancer-gauges.ts","../../src/modules/subgraph/subgraph.ts","../../src/lib/utils/multiCaller3.ts","../../src/modules/data/pool/onchain-data.ts","../../src/modules/sor/pool-data/subgraphPoolDataService.ts","../../src/modules/sor/token-price/subgraphTokenPriceService.ts","../../src/modules/sdk.helpers.ts","../../src/lib/constants/poolsToIgnore.ts","../../src/modules/sor/token-price/apiTokenPriceService.ts","../../src/lib/utils/coingecko-api.ts","../../src/modules/sor/token-price/coingeckoTokenPriceService.ts","../../src/modules/sor/sor.module.ts","../../src/modules/swaps/flashSwap/index.ts","../../src/modules/swaps/swap_builder/swap_utils.ts","../../src/modules/swaps/swap_builder/swap_info_decorator.ts","../../src/modules/swaps/swap_builder/single_swap_builder.ts","../../src/modules/swaps/swap_builder/batch_swap_builder.ts","../../src/modules/swaps/swaps.module.ts","../../src/modules/relayer/types.ts","../../src/modules/relayer/relayer.module.ts","../../src/modules/subgraph/subgraph.module.ts","../../src/modules/pricing/pricing.module.ts","../../src/modules/contracts/implementations/base-pool.ts","../../src/lib/utils/multiCaller.ts","../../src/lib/utils/time.ts","../../src/modules/contracts/implementations/veBAL.ts","../../src/modules/contracts/implementations/veBAL-proxy.ts","../../src/modules/contracts/contracts.module.ts","../../src/modules/pools/impermanentLoss/impermanentLossService.ts","../../src/modules/data/bal/emissions.ts","../../src/modules/pools/apr/protocol-revenue.ts","../../src/modules/pools/fees/fees.ts","../../src/modules/pools/apr/apr.ts","../../src/modules/graph/graph.ts","../../src/pool-weighted/decoder.ts","../../src/modules/vaultModel/poolModel/join.ts","../../src/modules/vaultModel/poolModel/exit.ts","../../src/modules/vaultModel/poolModel/swap.ts","../../src/modules/vaultModel/poolModel/unwrap.ts","../../src/modules/vaultModel/poolModel/poolModel.ts","../../src/modules/vaultModel/relayer.ts","../../src/modules/vaultModel/poolSource.ts","../../src/modules/vaultModel/vaultModel.module.ts","../../src/modules/joins/joins.module.ts","../../src/lib/utils/tenderlyHelper.ts","../../src/modules/simulation/simulation.module.ts","../../src/modules/exits/exits.module.ts","../../src/modules/pools/volume/volume.ts","../../src/modules/pools/factory/composable-stable/composable-stable.factory.ts","../../src/modules/pools/factory/weighted/weighted.factory.ts","../../src/modules/pools/factory/types.ts","../../src/modules/pools/factory/linear/linear.factory.ts","../../src/modules/pools/pool-factory__factory.ts","../../src/modules/pools/queries/params_builder.ts","../../src/modules/pools/queries/get_encoder.ts","../../src/modules/pools/emissions/index.ts","../../src/modules/pools/proportional-amounts/index.ts","../../src/modules/pools/index.ts","../node_modules/@ethersproject/strings/lib.esm/_version.js","../node_modules/@ethersproject/strings/lib.esm/utf8.js","../node_modules/@ethersproject/strings/lib.esm/bytes32.js","../node_modules/js-sha3/src/sha3.js","../node_modules/@ethersproject/solidity/lib.esm/_version.js","../node_modules/@ethersproject/solidity/lib.esm/index.js","../node_modules/@ethersproject/keccak256/lib.esm/index.js","../../src/modules/data/gyro-config/repository.ts","../../src/modules/data/gauge-controller/multicall.ts","../../src/modules/subgraph/repository/abstract-subgraph-repository.ts","../../src/modules/subgraph/repository/balancer-subgraph-repository.ts","../../src/modules/subgraph/repository/gauges-subgraph-repository.ts","../../src/modules/data/gauge-shares/repository.ts","../../src/modules/data/liquidity-gauges/multicall.ts","../../src/modules/data/liquidity-gauges/subgraph.ts","../../src/modules/data/liquidity-gauges/provider.ts","../../src/modules/api/balancer-api.client.ts","../../src/modules/data/pool/balancer-api.ts","../../src/modules/data/pool/subgraph-helpers.ts","../../src/modules/data/pool/subgraph.ts","../../src/modules/data/pool/subgraphOnChain.ts","../../src/modules/data/pool-gauges/repository.ts","../../src/modules/data/pool-joinExit/types.ts","../../src/modules/data/pool-joinExit/repository.ts","../../src/modules/data/pool-shares/repository.ts","../../src/modules/data/token/static.ts","../../src/modules/data/token-prices/coingecko.ts","../../src/modules/data/token-prices/coingecko-historical.ts","../../src/modules/data/token-prices/subgraph.ts","../../src/modules/data/token-prices/provider.ts","../../src/modules/data/token-prices/historical-price-provider.ts","../../src/modules/contracts/implementations/feeDistributor.ts","../../src/modules/data/fee-distributor/repository.ts","../../src/modules/data/fee-collector/repository.ts","../../src/modules/data/protocol-fees/provider.ts","../../src/modules/data/token-yields/repository.ts","../../src/modules/data/block-number/index.ts","../../src/modules/data/index.ts","../../src/modules/relayer/actions.ts","../../src/modules/liquidity-managment/migrations/helpers.ts","../../src/modules/liquidity-managment/migrations/builder.ts","../../src/modules/liquidity-managment/migrations.ts","../../src/modules/swaps/joinExit/actions/types.ts","../../src/modules/swaps/joinExit/actions/baseAction.ts","../../src/modules/swaps/joinExit/actions/exit.ts","../../src/modules/swaps/joinExit/actions/join.ts","../../src/modules/swaps/joinExit/actions/swap.ts","../../src/modules/swaps/joinExit/actions/helpers.ts","../../src/modules/swaps/joinExit/joinAndExit.ts","../../src/modules/sdk.module.ts","../../src/modules/data/pool/fallback.ts","../../src/modules/data/pool/static.ts","../../src/modules/data/token-prices/static.ts","../../src/pool-weighted/normalizedWeights.ts"],"sourcesContent":["import { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\n\n// RECOVERY_MODE must match BasePoolUserData.RECOVERY_MODE_EXIT_KIND, the value that (Legacy)BasePool uses to detect the special exit enabled in recovery mode.\nenum BasePoolExitKind {\n RECOVERY_MODE = 255,\n}\n\nexport class BasePoolEncoder {\n /**\n * Encodes the userData parameter for exiting any Pool in recovery mode, by removing tokens in return for\n * an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n */\n static recoveryModeExit = (bptAmountIn: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [BasePoolExitKind.RECOVERY_MODE, bptAmountIn]\n );\n}\n","import { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\n\nexport enum StablePoolJoinKind {\n INIT = 0,\n EXACT_TOKENS_IN_FOR_BPT_OUT,\n TOKEN_IN_FOR_EXACT_BPT_OUT,\n}\n\nexport enum StablePhantomPoolJoinKind {\n INIT = 0,\n COLLECT_PROTOCOL_FEES,\n}\n\nexport enum StablePoolExitKind {\n EXACT_BPT_IN_FOR_ONE_TOKEN_OUT = 0,\n EXACT_BPT_IN_FOR_TOKENS_OUT,\n BPT_IN_FOR_EXACT_TOKENS_OUT,\n}\n\nexport class StablePoolEncoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Encodes the userData parameter for providing the initial liquidity to a StablePool\n * @param initialBalances - the amounts of tokens to send to the pool to form the initial balances\n */\n static joinInit = (amountsIn: BigNumberish[]): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]'],\n [StablePoolJoinKind.INIT, amountsIn]\n );\n\n /**\n * Encodes the userData parameter for collecting protocol fees for StablePhantomPool\n */\n static joinCollectProtocolFees = (): string =>\n defaultAbiCoder.encode(\n ['uint256'],\n [StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]\n );\n\n /**\n * Encodes the userData parameter for joining a StablePool with exact token inputs\n * @param amountsIn - the amounts each of token to deposit in the pool as liquidity\n * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens\n */\n static joinExactTokensInForBPTOut = (\n amountsIn: BigNumberish[],\n minimumBPT: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [StablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT, amountsIn, minimumBPT]\n );\n\n /**\n * Encodes the userData parameter for joining a StablePool with to receive an exact amount of BPT\n * @param bptAmountOut - the amount of BPT to be minted\n * @param enterTokenIndex - the index of the token to be provided as liquidity\n */\n static joinTokenInForExactBPTOut = (\n bptAmountOut: BigNumberish,\n enterTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n StablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,\n bptAmountOut,\n enterTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a StablePool by removing a single token in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n * @param enterTokenIndex - the index of the token to removed from the pool\n */\n static exitExactBPTInForOneTokenOut = (\n bptAmountIn: BigNumberish,\n exitTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n StablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,\n bptAmountIn,\n exitTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a StablePool by removing tokens in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n */\n static exitExactBPTInForTokensOut = (bptAmountIn: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [StablePoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT, bptAmountIn]\n );\n\n /**\n * Encodes the userData parameter for exiting a StablePool by removing exact amounts of tokens\n * @param amountsOut - the amounts of each token to be withdrawn from the pool\n * @param maxBPTAmountIn - the minimum acceptable BPT to burn in return for withdrawn tokens\n */\n static exitBPTInForExactTokensOut = (\n amountsOut: BigNumberish[],\n maxBPTAmountIn: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [\n StablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,\n amountsOut,\n maxBPTAmountIn,\n ]\n );\n}\n","import { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\n\nexport enum WeightedPoolJoinKind {\n INIT = 0,\n EXACT_TOKENS_IN_FOR_BPT_OUT,\n TOKEN_IN_FOR_EXACT_BPT_OUT,\n ALL_TOKENS_IN_FOR_EXACT_BPT_OUT,\n}\n\nexport enum WeightedPoolExitKind {\n EXACT_BPT_IN_FOR_ONE_TOKEN_OUT = 0,\n EXACT_BPT_IN_FOR_TOKENS_OUT,\n BPT_IN_FOR_EXACT_TOKENS_OUT,\n MANAGEMENT_FEE_TOKENS_OUT,\n}\n\nexport class WeightedPoolEncoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Encodes the userData parameter for providing the initial liquidity to a WeightedPool\n * @param initialBalances - the amounts of tokens to send to the pool to form the initial balances\n */\n static joinInit = (amountsIn: BigNumberish[]): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]'],\n [WeightedPoolJoinKind.INIT, amountsIn]\n );\n\n /**\n * Encodes the userData parameter for joining a WeightedPool with exact token inputs\n * @param amountsIn - the amounts each of token to deposit in the pool as liquidity\n * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens\n */\n static joinExactTokensInForBPTOut = (\n amountsIn: BigNumberish[],\n minimumBPT: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT, amountsIn, minimumBPT]\n );\n\n /**\n * Encodes the userData parameter for joining a WeightedPool with a single token to receive an exact amount of BPT\n * @param bptAmountOut - the amount of BPT to be minted\n * @param enterTokenIndex - the index of the token to be provided as liquidity\n */\n static joinTokenInForExactBPTOut = (\n bptAmountOut: BigNumberish,\n enterTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,\n bptAmountOut,\n enterTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for joining a WeightedPool proportionally to receive an exact amount of BPT\n * @param bptAmountOut - the amount of BPT to be minted\n */\n static joinAllTokensInForExactBPTOut = (bptAmountOut: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT, bptAmountOut]\n );\n\n /**\n * Encodes the userData parameter for exiting a WeightedPool by removing a single token in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n * @param enterTokenIndex - the index of the token to removed from the pool\n */\n static exitExactBPTInForOneTokenOut = (\n bptAmountIn: BigNumberish,\n exitTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,\n bptAmountIn,\n exitTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a WeightedPool by removing tokens in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n */\n static exitExactBPTInForTokensOut = (bptAmountIn: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT, bptAmountIn]\n );\n\n /**\n * Encodes the userData parameter for exiting a WeightedPool by removing exact amounts of tokens\n * @param amountsOut - the amounts of each token to be withdrawn from the pool\n * @param maxBPTAmountIn - the minimum acceptable BPT to burn in return for withdrawn tokens\n */\n static exitBPTInForExactTokensOut = (\n amountsOut: BigNumberish[],\n maxBPTAmountIn: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [\n WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,\n amountsOut,\n maxBPTAmountIn,\n ]\n );\n}\n\nexport class ManagedPoolEncoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Encodes the userData parameter for exiting a ManagedPool for withdrawing management fees.\n * This can only be done by the pool owner.\n */\n static exitForManagementFees = (): string =>\n defaultAbiCoder.encode(\n ['uint256'],\n [WeightedPoolExitKind.MANAGEMENT_FEE_TOKENS_OUT]\n );\n}\n","import { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\nimport { StablePhantomPoolJoinKind } from '../pool-stable/index';\n\nexport enum ComposableStablePoolJoinKind {\n INIT = 0,\n EXACT_TOKENS_IN_FOR_BPT_OUT,\n TOKEN_IN_FOR_EXACT_BPT_OUT,\n}\n\nexport enum ComposableStablePoolExitKind {\n EXACT_BPT_IN_FOR_ONE_TOKEN_OUT = 0,\n BPT_IN_FOR_EXACT_TOKENS_OUT,\n EXACT_BPT_IN_FOR_ALL_TOKENS_OUT,\n}\n\nexport class ComposableStablePoolEncoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Encodes the userData parameter for providing the initial liquidity to a ComposableStablePool\n * @param initialBalances - the amounts of tokens to send to the pool to form the initial balances\n */\n static joinInit = (amountsIn: BigNumberish[]): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]'],\n [ComposableStablePoolJoinKind.INIT, amountsIn]\n );\n\n /**\n * Encodes the userData parameter for collecting protocol fees for StablePhantomPool\n */\n static joinCollectProtocolFees = (): string =>\n defaultAbiCoder.encode(\n ['uint256'],\n [StablePhantomPoolJoinKind.COLLECT_PROTOCOL_FEES]\n );\n\n /**\n * Encodes the userData parameter for joining a ComposableStablePool with exact token inputs\n * @param amountsIn - the amounts each of token to deposit in the pool as liquidity\n * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens\n */\n static joinExactTokensInForBPTOut = (\n amountsIn: BigNumberish[],\n minimumBPT: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [\n ComposableStablePoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT,\n amountsIn,\n minimumBPT,\n ]\n );\n\n /**\n * Encodes the userData parameter for joining a ComposableStablePool with to receive an exact amount of BPT\n * @param bptAmountOut - the amount of BPT to be minted\n * @param enterTokenIndex - the index of the token to be provided as liquidity\n */\n static joinTokenInForExactBPTOut = (\n bptAmountOut: BigNumberish,\n enterTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n ComposableStablePoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT,\n bptAmountOut,\n enterTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a ComposableStablePool by removing a single token in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n * @param enterTokenIndex - the index of the token to removed from the pool\n */\n static exitExactBPTInForOneTokenOut = (\n bptAmountIn: BigNumberish,\n exitTokenIndex: number\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256', 'uint256'],\n [\n ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT,\n bptAmountIn,\n exitTokenIndex,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a StablePool by removing tokens in return for an exact amount of BPT\n * @param bptAmountIn - the amount of BPT to be burned\n */\n static exitExactBPTInForAllTokensOut = (bptAmountIn: BigNumberish): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256'],\n [\n ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT,\n bptAmountIn,\n ]\n );\n\n /**\n * Encodes the userData parameter for exiting a ComposableStablePool by removing exact amounts of tokens\n * @param amountsOut - the amounts of each token to be withdrawn from the pool\n * @param maxBPTAmountIn - the max acceptable BPT to burn in return for withdrawn tokens\n */\n static exitBPTInForExactTokensOut = (\n amountsOut: BigNumberish[],\n maxBPTAmountIn: BigNumberish\n ): string =>\n defaultAbiCoder.encode(\n ['uint256', 'uint256[]', 'uint256'],\n [\n ComposableStablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT,\n amountsOut,\n maxBPTAmountIn,\n ]\n );\n}\n","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\n\nexport { invariant as default };\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { PoolSpecialization } from '../types';\nimport invariant from 'tiny-invariant';\n\n/**\n * Splits a poolId into its components, i.e. pool address, pool specialization and its nonce\n * @param poolId - a bytes32 string of the pool's ID\n * @returns an object with the decomposed poolId\n */\nexport const splitPoolId = (\n poolId: string\n): {\n address: string;\n specialization: PoolSpecialization;\n nonce: BigNumber;\n} => {\n return {\n address: getPoolAddress(poolId),\n specialization: getPoolSpecialization(poolId),\n nonce: getPoolNonce(poolId),\n };\n};\n\n/**\n * Extracts a pool's address from its poolId\n * @param poolId - a bytes32 string of the pool's ID\n * @returns the pool's address\n */\nexport const getPoolAddress = (poolId: string): string => {\n invariant(poolId.length === 66, 'Invalid poolId length');\n return poolId.slice(0, 42);\n};\n\n/**\n * Extracts a pool's specialization from its poolId\n * @param poolId - a bytes32 string of the pool's ID\n * @returns the pool's specialization\n */\nexport const getPoolSpecialization = (poolId: string): PoolSpecialization => {\n invariant(poolId.length === 66, 'Invalid poolId length');\n\n // Only have 3 pool specializations so we can just pull the relevant character\n const specializationCode = parseInt(poolId[45]);\n invariant(specializationCode < 3, 'Invalid pool specialization');\n\n return specializationCode;\n};\n\n/**\n * Extracts a pool's nonce from its poolId\n * @param poolId - a bytes32 string of the pool's ID\n * @returns the pool's nonce\n */\nexport const getPoolNonce = (poolId: string): BigNumber => {\n invariant(poolId.length === 66, 'Invalid poolId length');\n return BigNumber.from(`0x${poolId.slice(46)}`);\n};\n","export enum Network {\n MAINNET = 1,\n GOERLI = 5,\n GÖRLI = 5,\n OPTIMISM = 10,\n GNOSIS = 100,\n POLYGON = 137,\n FANTOM = 250,\n BASE = 8453,\n ZKEVM = 1101,\n ARBITRUM = 42161,\n AVALANCHE = 43114,\n SEPOLIA = 11155111,\n}\n","import { Network } from '@/lib/constants/network';\n\n// Do not display APR values greater than this amount; they are likely to be nonsensical\n// These can arise from pools with extremely low balances (e.g., completed LBPs)\nexport const APR_THRESHOLD = 10_000;\n\n/**\n * For proportional exits from ComposableStable pools the ExactBPTInForTokensOut\n * exit type was removed. Therefore we have to use BPTInForExactTokensOut which\n * makes proportional exits using a user's total BPT balance impossible. In\n * order to 'fix' this we need to subtract a little bit from the bptIn value\n * when calculating the ExactTokensOut. The variable below is that \"little bit\".\n */\nexport const SHALLOW_COMPOSABLE_STABLE_BUFFER = 1e6; // EVM scale, so this is 1 Mwei\n\ntype FactoryType =\n | 'oracleWeightedPool'\n | 'weightedPool'\n | 'stablePool'\n | 'managedPool'\n | 'liquidityBootstrappingPool'\n | 'boostedPool'\n | 'composableStablePool';\n\ntype PoolMetadata = {\n name: string;\n hasIcon: boolean;\n};\n\nexport type NamedPools = {\n staBAL: string;\n bbAaveUSD: {\n v1: string;\n v2: string;\n };\n xMatic: {\n v1: string;\n v2: string;\n };\n stMatic: {\n v1: string;\n v2: string;\n };\n mai4: {\n mai4: string;\n maiBbaUsd: string;\n };\n veBAL: string;\n};\n\ntype Pools = {\n IdsMap: Partial;\n Pagination: {\n PerPage: number;\n PerPool: number;\n PerPoolInitial: number;\n };\n DelegateOwner: string;\n ZeroAddress: string;\n DynamicFees: {\n Gauntlet: string[];\n };\n BlockList: string[];\n ExcludedPoolTypes: string[];\n Stable: {\n AllowList: string[];\n };\n Investment: {\n AllowList: string[];\n };\n Factories: Record;\n Stakable: {\n AllowList: string[];\n };\n Metadata: Record;\n};\n\nconst POOLS_GOERLI: Pools = {\n IdsMap: {\n staBAL:\n '0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062',\n bbAaveUSD: {\n v1: '0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f',\n v2: '0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7',\n },\n veBAL: '0xf8a0623ab66f985effc1c69d05f1af4badb01b00000200000000000000000060',\n },\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [\n '0x22d398c68030ef6b1c55321cca6e0cecc5c93b2f000200000000000000000678',\n ],\n ExcludedPoolTypes: ['Element', 'AaveLinear', 'Linear', 'ERC4626Linear', 'FX'],\n Stable: {\n AllowList: [\n '0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f',\n '0xb60e46d90f2de35f7062a27d3a98749414036d5d000200000000000000000061',\n '0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062',\n '0xc957b1acceb21707b782eb8eee2ed8e20088463d000200000000000000000076',\n '0x3d5981bdd8d3e49eb7bbdc1d2b156a3ee019c18e0000000000000000000001a7',\n '0x14f93df8a4e37bfdb49d2cec4789df7a010603d700000000000000000000011d',\n '0x00a62d31b6c776b6813543bc99ff265f7222dbe100000000000000000000011e',\n '0x0c925fce89a22e36ebd9b3c6e0262234e853d2f600000000000000000000019c',\n ],\n },\n Investment: {\n AllowList: [],\n },\n Factories: {\n '0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0': 'oracleWeightedPool',\n '0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9': 'weightedPool',\n '0x44afeb87c871d8fea9398a026dea2bd3a13f5769': 'stablePool',\n '0xa55f73e2281c60206ba43a3590db07b8955832be': 'stablePool', // Metastable\n '0xb48cc42c45d262534e46d5965a9ac496f1b7a830': 'liquidityBootstrappingPool',\n '0xb0c726778c3ae4b3454d85557a48e8fa502bdd6a': 'liquidityBootstrappingPool', // LBP (zero protocol fee)\n '0x41e9036ae350baedcc7107760a020dca3c0731ec': 'boostedPool',\n '0xb848f50141f3d4255b37ac288c25c109104f2158': 'composableStablePool',\n '0x94f68b54191f62f781fe8298a8a5fa3ed772d227': 'weightedPool', // weighted pool v2\n },\n Stakable: {\n AllowList: [\n '0x16faf9f73748013155b7bc116a3008b57332d1e600020000000000000000005b',\n '0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f',\n '0xdcdd4a3d36dec8d57594e89763d069a7e9b223e2000000000000000000000062',\n '0x67f8fcb9d3c463da05de1392efdbb2a87f8599ea000200000000000000000059',\n ],\n },\n Metadata: {\n '0x13acd41c585d7ebb4a9460f7c8f50be60dc080cd00000000000000000000005f': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: false,\n },\n },\n};\n\nconst POOLS_MAINNET: Pools = {\n IdsMap: {\n staBAL:\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063',\n bbAaveUSD: {\n v1: '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe',\n v2: '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d',\n },\n veBAL: '0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014',\n },\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: [\n 'Element',\n 'AaveLinear',\n 'Linear',\n 'ERC4626Linear',\n 'Gyro2',\n 'Gyro3',\n 'GyroE',\n 'FX',\n ],\n Stable: {\n AllowList: [\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063', // staBAL3 (DAI-USD-USDC)\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066', // WBTC-renBTC-sBTC\n '0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e', // PAR-sEUR-EURS\n '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080', // Lido Metastable\n '0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112', // Rocket Pool Metastable\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe', // Mainnet bb-a-USD\n '0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed', // wstETH/WETH #2\n '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249', // b-auraBAL-Stable (auraBal / 8020 BALETH)\n '0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d', // sdBAL Stable Pool (sdBAL / 8020 BALETH)\n '0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d', // Fiat DAO Stable Pool\n '0xf93579002dbe8046c43fefe86ec78b1112247bb80000000000000000000002bc', // USDD 3 pool\n '0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351', // MAI stable pool\n '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d', // bb-a-USD V2\n '0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b', // DOLA/INV stable pool\n ],\n },\n Investment: {\n AllowList: [\n '0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af', // iROBOT mainnet\n '0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a', // Techemy mainnet\n '0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2', // WSB-DEFI mainnet\n ],\n },\n Factories: {\n '0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0': 'oracleWeightedPool',\n '0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9': 'weightedPool',\n '0xc66ba2b6595d3613ccab350c886ace23866ede24': 'stablePool',\n '0x67d27634e44793fe63c467035e31ea8635117cd4': 'stablePool', // Metastable\n '0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de': 'liquidityBootstrappingPool', // Mainnet LBP\n '0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e': 'liquidityBootstrappingPool', // Mainnet LBP (zero protocol fee)\n '0x48767f9f868a4a7b86a90736632f6e44c2df7fa9': 'managedPool', // Mainnet Managed\n '0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2': 'boostedPool', // mainnet stablephantom\n '0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c': 'stablePool', // stable pool v2\n '0xf9ac7b9df2b3454e841110cce5550bd5ac6f875f': 'composableStablePool', // ComposableStable\n '0xcc508a455f5b0073973107db6a878ddbdab957bc': 'weightedPool', // weighted pool v2\n },\n Stakable: {\n AllowList: [\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063',\n '0x072f14b85add63488ddad88f855fda4a99d6ac9b000200000000000000000027',\n '0x0b09dea16768f0799065c475be02919503cb2a3500020000000000000000001a',\n '0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000013',\n '0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112',\n '0x27c9f71cc31464b906e0006d4fcbc8900f48f15f00020000000000000000010f',\n '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080',\n '0x350196326aeaa9b98f1903fb5e8fc2686f85318c000200000000000000000084',\n '0x3e5fa9518ea95c3e533eb377c001702a9aacaa32000200000000000000000052',\n '0x51735bdfbfe3fc13dea8dc6502e2e958989429610002000000000000000000a0',\n '0x5d66fff62c17d841935b60df5f07f6cf79bd0f4700020000000000000000014c',\n '0x5f7fa48d765053f8dd85e052843e12d23e3d7bc50002000000000000000000c0',\n '0x702605f43471183158938c1a3e5f5a359d7b31ba00020000000000000000009f',\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe',\n '0x7edde0cb05ed19e03a9a47cd5e53fc57fde1c80c0002000000000000000000c8',\n '0x8f4205e1604133d1875a3e771ae7e4f2b086563900020000000000000000010e',\n '0x90291319f1d4ea3ad4db0dd8fe9e12baf749e84500020000000000000000013c',\n '0x96646936b91d6b9d7d0c47c496afbf3d6ec7b6f8000200000000000000000019',\n '0x96ba9025311e2f47b840a1f68ed57a3df1ea8747000200000000000000000160',\n '0xa02e4b3d18d4e6b8d18ac421fbc3dfff8933c40a00020000000000000000004b',\n '0xa6f548df93de924d73be7d25dc02554c6bd66db500020000000000000000000e',\n '0xbaeec99c90e3420ec6c1e7a769d2a856d2898e4d00020000000000000000008a',\n '0xbf96189eee9357a95c7719f4f5047f76bde804e5000200000000000000000087',\n '0xe2469f47ab58cf9cf59f9822e3c5de4950a41c49000200000000000000000089',\n '0xe99481dc77691d8e2456e5f3f61c1810adfc1503000200000000000000000018',\n '0xec60a5fef79a92c741cb74fdd6bfc340c0279b01000200000000000000000015',\n '0xedf085f65b4f6c155e13155502ef925c9a756003000200000000000000000123',\n '0xefaa1604e82e1b3af8430b90192c1b9e8197e377000200000000000000000021',\n '0xf4c0dd9b82da36c07605df83c8a416f11724d88b000200000000000000000026',\n '0xf5aaf7ee8c39b651cebf5f1f50c10631e78e0ef9000200000000000000000069',\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066',\n '0x92762b42a06dcdddc5b7362cfb01e631c4d44b40000200000000000000000182',\n '0xde8c195aa41c11a0c4787372defbbddaa31306d2000200000000000000000181',\n '0x17ddd9646a69c9445cd8a9f921d4cd93bf50d108000200000000000000000159',\n '0xc45d42f801105e861e86658648e3678ad7aa70f900010000000000000000011e',\n '0x2d344a84bac123660b021eebe4eb6f12ba25fe8600020000000000000000018a',\n '0xb460daa847c45f1c4a41cb05bfb3b51c92e41b36000200000000000000000194',\n '0x5122e01d819e58bb2e22528c0d68d310f0aa6fd7000200000000000000000163',\n '0x851523a36690bf267bbfec389c823072d82921a90002000000000000000001ed',\n '0xe8cc7e765647625b95f59c15848379d10b9ab4af0002000000000000000001de',\n '0x85370d9e3bb111391cc89f6de344e801760461830002000000000000000001ef',\n '0xa7ff759dbef9f3efdd1d59beee44b966acafe214000200000000000000000180',\n '0x3f7c10701b14197e2695dec6428a2ca4cf7fc3b800020000000000000000023c',\n '0x2d011adf89f0576c9b722c28269fcb5d50c2d17900020000000000000000024d',\n '0x178e029173417b1f9c8bc16dcec6f697bc32374600000000000000000000025d',\n '0xcfca23ca9ca720b6e98e3eb9b6aa0ffc4a5c08b9000200000000000000000274',\n '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249',\n '0x0578292cb20a443ba1cde459c985ce14ca2bdee5000100000000000000000269',\n '0x8eb6c82c3081bbbd45dcac5afa631aac53478b7c000100000000000000000270',\n '0x1b65fe4881800b91d4277ba738b567cbb200a60d0002000000000000000002cc',\n '0x99a14324cfd525a34bbc93ac7e348929909d57fd00020000000000000000030e',\n '0x9b532ab955417afd0d012eb9f7389457cd0ea712000000000000000000000338',\n '0x48607651416a943bf5ac71c41be1420538e78f87000200000000000000000327',\n '0x6a5ead5433a50472642cd268e584dafa5a394490000200000000000000000366',\n '0x0fd5663d4893ae0d579d580584806aadd2dd0b8b000200000000000000000367',\n '0x441b8a1980f2f2e43a9397099d15cc2fe6d3625000020000000000000000035f',\n '0xf3aeb3abba741f0eece8a1b1d2f11b85899951cb000200000000000000000351',\n '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d',\n ],\n },\n Metadata: {\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: true,\n },\n '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: true,\n },\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063': {\n name: 'Balancer Stable USD',\n hasIcon: true,\n },\n '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd000200000000000000000249': {\n name: 'AuraBAL Stable Pool',\n hasIcon: false,\n },\n },\n};\n\nconst POOLS_POLYGON: Pools = {\n IdsMap: {\n xMatic: {\n v1: '0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4',\n v2: '0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c',\n },\n stMatic: {\n v1: '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366',\n v2: '0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d',\n },\n mai4: {\n mai4: '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012',\n maiBbaUsd:\n '0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e',\n },\n },\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: [\n 'Element',\n 'AaveLinear',\n 'Linear',\n 'ERC4626Linear',\n 'Gyro2',\n 'Gyro3',\n 'GyroE',\n 'FX',\n ],\n Stable: {\n AllowList: [\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012', // polygon MAI/DAI/USDC/USDT\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e', // polygon WBTC/renBTC\n '0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b', // polygon,\n '0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068', // tusd polygon\n '0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b', // dusd polygon\n '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366', // polygon staked matic\n '0xb4670d1389c758e4380c4211bcbc85342688b9c50002000000000000000003d8', // vQi,\n '0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455', // 4pool\n '0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4', // maticx metastable\n '0xb4b22bd6cdad0ab828be6f8a4086dfa54e9b373600020000000000000000058f', // Polygon tetuBAL-80BAL-20WETH\n '0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba', // tetuBAL-80BAL-20WETH V2 (with short name)\n '0x0b8319061732b34cab22445fa83b81f950e4b7ed000000000000000000000709',\n '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366',\n '0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d',\n '0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c',\n '0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e', // mai / bb-am-USD\n '0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b', // bb-am-USD\n '0xa48d164f6eb0edc68bd03b56fa59e12f24499ad10000000000000000000007c4', // ageur stable\n ],\n },\n Investment: {\n AllowList: [''],\n },\n Factories: {\n '0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0': 'oracleWeightedPool',\n '0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9': 'weightedPool',\n '0xc66ba2b6595d3613ccab350c886ace23866ede24': 'stablePool',\n '0xdae7e32adc5d490a43ccba1f0c736033f2b4efca': 'stablePool', // Metastable\n '0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de': 'liquidityBootstrappingPool', // LBP\n '0x41b953164995c11c81da73d212ed8af25741b7ac': 'liquidityBootstrappingPool', // LBP (zero protocol fee)\n '0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193': 'managedPool', // Polygon Managed\n '0xc128a9954e6c874ea3d62ce62b468ba073093f25': 'boostedPool', // polygon stablephantom\n '0xca96c4f198d343e251b1a01f3eba061ef3da73c1': 'stablePool', // stable pool v2,\n '0x136fd06fa01ecf624c7f2b3cb15742c1339dc2c4': 'composableStablePool', // ComposableStable\n '0x0e39c3d9b2ec765efd9c5c70bb290b1fcd8536e3': 'weightedPool', // weighted pool v2\n },\n Stakable: {\n AllowList: [\n '0x0297e37f1873d2dab4487aa67cd56b58e2f27875000100000000000000000002',\n '0x03cd191f589d12b0582a99808cf19851e468e6b500010000000000000000000a',\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012',\n '0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068',\n '0x10f21c9bd8128a29aa785ab2de0d044dcdd79436000200000000000000000059',\n '0x186084ff790c65088ba694df11758fae4943ee9e000200000000000000000032',\n '0x36128d5436d2d70cab39c9af9cce146c38554ff0000100000000000000000008',\n '0x5a6ae1fd70d04ba4a279fc219dfabc53825cb01d00020000000000000000020e',\n '0x614b5038611729ed49e0ded154d8a5d3af9d1d9e00010000000000000000001d',\n '0x7c9cf12d783821d5c63d8e9427af5c44bad92445000100000000000000000051',\n '0x805ca3ccc61cc231851dee2da6aabff0a7714aa7000200000000000000000361',\n '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366',\n '0xb204bf10bc3a5435017d3db247f56da601dfe08a0002000000000000000000fe',\n '0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455',\n '0xce66904b68f1f070332cbc631de7ee98b650b499000100000000000000000009',\n '0xcf354603a9aebd2ff9f33e1b04246d8ea204ae9500020000000000000000005a',\n '0xdb1db6e248d7bb4175f6e5a382d0a03fe3dcc813000100000000000000000035',\n '0xea4e073c8ac859f2994c07e627178719c8002dc00002000000000000000003dc',\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e',\n '0xc17636e36398602dd37bb5d1b3a9008c7629005f0002000000000000000004c4',\n '0x2dbc9ab0160087ae59474fb7bed95b9e808fa6bc0001000000000000000003db',\n '0xb797adfb7b268faeaa90cadbfed464c76ee599cd0002000000000000000005ba',\n '0x8f9dd2064eb38e8e40f2ab67bde27c0e16ea9b080002000000000000000004ca',\n '0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b',\n '0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e',\n '0x8159462d255c1d24915cb51ec361f700174cd99400000000000000000000075d',\n '0xb20fc01d21a50d2c734c4a1262b4404d41fa7bf000000000000000000000075c',\n ],\n },\n Metadata: {},\n};\n\nconst POOLS_ARBITRUM: Pools = {\n IdsMap: {},\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: ['Element', 'AaveLinear', 'Linear', 'ERC4626Linear', 'FX'],\n Stable: {\n AllowList: [\n '0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012', // arbitrum\n '0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016', // arbitrum\n '0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020', // tusd arbitrum\n '0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d', // mai\n '0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f', // VST\n '0xd89746affa5483627a87e55713ec1905114394950002000000000000000000bf', // fluid stable\n '0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102', // vesta new stable\n '0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159', // stETH\n ],\n },\n Investment: {\n AllowList: [''],\n },\n Factories: {\n '0x7dfdef5f355096603419239ce743bfaf1120312b': 'weightedPool', // Arbitrum Weighted\n '0xcf0a32bbef8f064969f21f7e02328fb577382018': 'weightedPool', // Arbitrum WeightedOracle\n '0x2433477a10fc5d31b9513c638f19ee85caed53fd': 'stablePool', // Arbitrum Stable\n '0xebfd5681977e38af65a7487dc70b8221d089ccad': 'stablePool', // Arbitrum MetaStable\n '0x142b9666a0a3a30477b052962dda81547e7029ab': 'liquidityBootstrappingPool', // Arbitrum LBP (old)\n '0x1802953277fd955f9a254b80aa0582f193cf1d77': 'liquidityBootstrappingPool', // Arbitrum LBP (new)\n '0xacd615b3705b9c880e4e7293f1030b34e57b4c1c': 'managedPool', // arbitrum managed\n '0xdae7e32adc5d490a43ccba1f0c736033f2b4efca': 'boostedPool', // arbitrum stablephantom\n '0xef44d6786b2b4d544b7850fe67ce6381626bf2d6': 'stablePool', // stable pool v2\n '0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33': 'composableStablePool', // ComposableStable\n '0x8df6efec5547e31b0eb7d1291b511ff8a2bf987c': 'weightedPool', // weighted pool v2\n },\n Stakable: {\n AllowList: [\n '0x0510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d',\n '0x0adeb25cb5920d4f7447af4a0428072edc2cee2200020000000000000000004a',\n '0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016',\n '0x1779900c7707885720d39aa741f4086886307e9e00020000000000000000004b',\n '0x4a3a22a3e7fee0ffbb66f1c28bfac50f75546fc7000200000000000000000008',\n '0x5a5884fc31948d59df2aeccca143de900d49e1a300000000000000000000006f',\n '0x64541216bafffeec8ea535bb71fbc927831d0595000100000000000000000002',\n '0x651e00ffd5ecfa7f3d4f33d62ede0a97cf62ede2000200000000000000000006',\n '0xb28670b3e7ad27bd41fb5938136bf9e9cba90d6500020000000000000000001e',\n '0xb340b6b1a34019853cb05b2de6ee8ffd0b89a008000100000000000000000036',\n '0xb5b77f1ad2b520df01612399258e7787af63025d000200000000000000000010',\n '0xc2f082d33b5b8ef3a7e3de30da54efd3114512ac000200000000000000000017',\n '0xc61ff48f94d801c1ceface0289085197b5ec44f000020000000000000000004d',\n '0xcc65a812ce382ab909a11e434dbf75b34f1cc59d000200000000000000000001',\n '0xe1b40094f1446722c424c598ac412d590e0b3ffb000200000000000000000076',\n '0xb3028ca124b80cfe6e9ca57b70ef2f0ccc41ebd40002000000000000000000ba',\n '0x7bceaa9c5e7f4836fec3bce2d5346637c9b13970000000000000000000000102',\n '0xfb5e6d0c1dfed2ba000fbc040ab8df3615ac329c000000000000000000000159',\n '0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158',\n ],\n },\n Metadata: {},\n};\n\nconst POOLS_GNOSIS: Pools = {\n IdsMap: {},\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: [\n 'Element',\n 'AaveLinear',\n 'Linear',\n 'ERC4626Linear',\n 'FX',\n 'Gyro2',\n 'Gyro3',\n 'GyroE',\n 'HighAmpComposableStable',\n 'FX',\n ],\n Stable: {\n AllowList: [\n '0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000004',\n '0x707b7d4a1bae449d546dcab869256591bbb3d70b000000000000000000000000',\n ],\n },\n Investment: {\n AllowList: [],\n },\n Factories: {},\n Stakable: {\n AllowList: [],\n },\n Metadata: {},\n};\n\nconst POOLS_GENERIC: Pools = {\n IdsMap: {},\n Pagination: {\n PerPage: 10,\n PerPool: 10,\n PerPoolInitial: 5,\n },\n DelegateOwner: '0xba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1ba1b',\n ZeroAddress: '0x0000000000000000000000000000000000000000',\n DynamicFees: {\n Gauntlet: [],\n },\n BlockList: [''],\n ExcludedPoolTypes: ['Element', 'AaveLinear', 'Linear', 'ERC4626Linear', 'FX'],\n Stable: {\n AllowList: [\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000063',\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc56000000000000000000000066',\n '0x9f19a375709baf0e8e35c2c5c65aca676c4c719100000000000000000000006e',\n '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080', // Lido Metastable\n '0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112', // Rocket Pool Metastable\n '0x06df3b2bbb68adc8b0e302443692037ed9f91b42000000000000000000000012', // polygon\n '0xfeadd389a5c427952d8fdb8057d6c8ba1156cc5600020000000000000000001e', // polygon\n '0x9be7de742865d021c0e8fb9d64311b2c040c1ec1000200000000000000000012', // arbitrum\n '0x9f19a375709baf0e8e35c2c5c65aca676c4c7191000200000000000000000022', // polygon PAR/PAR,\n '0x1533a3278f3f9141d5f820a184ea4b017fce2382000000000000000000000016', // arbitrum\n '0xf38cf113d2d4f60c36cbd95af2f48a9a0167045a00000000000000000000005b', // polygon,\n '0x0d34e5dd4d8f043557145598e4e2dc286b35fd4f000000000000000000000068', // tusd polygon\n '0x386b5d43ba8b97c43d4afb4cdae7877a1b295e8a000000000000000000000020', // tusd arbitrum\n '0x5028497af0c9a54ea8c6d42a054c0341b9fc616800020000000000000000007b', // dusd polygon\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe', // Mainnet bb-a-USD\n '0xaf5e0b5425de1f5a630a8cb5aa9d97b8141c908d000200000000000000000366', // staked matic\n ],\n },\n Investment: {\n AllowList: [\n '0xccf5575570fac94cec733a58ff91bb3d073085c70002000000000000000000af', // iROBOT mainnet\n '0xe7b1d394f3b40abeaa0b64a545dbcf89da1ecb3f00010000000000000000009a', // Techemy mainnet\n '0x3b40d7d5ae25df2561944dd68b252016c4c7b2800001000000000000000000c2', // WSB-DEFI mainnet\n ],\n },\n Factories: {\n '0xa5bf2ddf098bb0ef6d120c98217dd6b141c74ee0': 'oracleWeightedPool',\n '0x8e9aa87e45e92bad84d5f8dd1bff34fb92637de9': 'weightedPool',\n '0xc66ba2b6595d3613ccab350c886ace23866ede24': 'stablePool',\n '0x67d27634e44793fe63c467035e31ea8635117cd4': 'stablePool', // Metastable\n '0x7dfdef5f355096603419239ce743bfaf1120312b': 'weightedPool', // Arbitrum Weighted\n '0xcf0a32bbef8f064969f21f7e02328fb577382018': 'weightedPool', // Arbitrum WeightedOracle\n '0x2433477a10fc5d31b9513c638f19ee85caed53fd': 'stablePool', // Arbitrum Stable\n '0xebfd5681977e38af65a7487dc70b8221d089ccad': 'stablePool', // Arbitrum MetaStable\n '0x751a0bc0e3f75b38e01cf25bfce7ff36de1c87de': 'liquidityBootstrappingPool', // Mainnet LBP\n '0x0f3e0c4218b7b0108a3643cfe9d3ec0d4f57c54e': 'liquidityBootstrappingPool', // Mainnet LBP (zero protocol fee)\n '0x142b9666a0a3a30477b052962dda81547e7029ab': 'liquidityBootstrappingPool', // Arbitrum LBP (old)\n '0x1802953277fd955f9a254b80aa0582f193cf1d77': 'liquidityBootstrappingPool', // Arbitrum LBP (new)\n '0x48767f9f868a4a7b86a90736632f6e44c2df7fa9': 'managedPool', // Mainnet Managed\n '0x0f7bb7ce7b6ed9366f9b6b910adefe72dc538193': 'managedPool', // Polygon Managed\n '0xacd615b3705b9c880e4e7293f1030b34e57b4c1c': 'managedPool', // arbitrum managed\n '0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2': 'boostedPool', // mainnet stablephantom\n '0xdae7e32adc5d490a43ccba1f0c736033f2b4efca': 'boostedPool', // arbitrum stablephantom\n '0xc128a9954e6c874ea3d62ce62b468ba073093f25': 'boostedPool', // polygon stablephantom\n },\n Stakable: {\n AllowList: [],\n },\n Metadata: {\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: true,\n },\n '0x8fd162f338b770f7e879030830cde9173367f3010000000000000000000004d8': {\n name: 'Balancer Boosted Aave USD',\n hasIcon: true,\n },\n '0xd387dfd3a786e7caa06e6cf0c675352c7ffff30400000000000000000000063e': {\n name: 'Balancer Stable USD',\n hasIcon: true,\n },\n },\n};\n\nconst POOLS_MAP = {\n [Network.GOERLI]: POOLS_GOERLI,\n [Network.MAINNET]: POOLS_MAINNET,\n [Network.POLYGON]: POOLS_POLYGON,\n [Network.ARBITRUM]: POOLS_ARBITRUM,\n [Network.GNOSIS]: POOLS_GNOSIS,\n};\n\nexport function POOLS(networkId: Network): Pools {\n const id = networkId as keyof typeof POOLS_MAP;\n return POOLS_MAP[id] ? POOLS_MAP[id] : POOLS_GENERIC;\n}\n","export enum PoolGaugesAttributes {\n Id = 'id',\n Address = 'address',\n PoolId = 'poolId',\n}\n\nexport interface PoolGauges {\n preferentialGauge: {\n id: string;\n };\n gauges: {\n id: string;\n relativeWeightCap?: string | null;\n }[];\n}\n","export enum PoolShareAttributes {\n Balance = 'balance',\n Id = 'id',\n PoolId = 'poolId',\n UserAddress = 'userAddress',\n}\n\nexport interface PoolShare {\n id: string;\n userAddress: string;\n poolId: string;\n balance: string;\n}\n","export enum GaugeShareAttributes {\n Id = 'id',\n UserAddress = 'user',\n GaugeId = 'gauge',\n Balance = 'balance',\n}\n\nexport interface GaugeShare {\n id: string;\n balance: string;\n userAddress: string;\n gauge: {\n id: string;\n poolId?: string;\n isKilled: boolean;\n totalSupply: string;\n };\n}\n","import { Network } from './lib/constants/network';\nimport type { BigNumberish } from '@ethersproject/bignumber';\nimport type { Contract } from '@ethersproject/contracts';\nimport type { PoolDataService, TokenPriceService } from '@balancer-labs/sor';\nimport type {\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n JoinPoolAttributes,\n} from './modules/pools/pool-types/concerns/types';\nimport type {\n Findable,\n Searchable,\n LiquidityGauge,\n PoolAttribute,\n TokenAttribute,\n Cacheable,\n} from '@/modules/data/types';\nimport type {\n BaseFeeDistributor,\n GaugeSharesRepository,\n PoolGaugesRepository,\n PoolSharesRepository,\n ProtocolFeesProvider,\n PoolJoinExitRepository,\n} from './modules/data';\nimport type { GraphQLArgs } from './lib/graphql';\nimport type { AprBreakdown } from '@/modules/pools/apr/apr';\nimport { SubgraphPoolDataService } from '@/modules/sor/pool-data/subgraphPoolDataService';\nimport * as Queries from '@/modules/pools/queries/types';\nimport { GyroConfigRepository } from '@/modules/data/gyro-config/repository';\n\nexport * from '@/modules/data/types';\nexport { Network, AprBreakdown };\n\nexport type Address = string;\n\nexport interface BalancerSdkConfig {\n //use a known network or provide an entirely custom config\n network: Network | BalancerNetworkConfig;\n rpcUrl: string;\n //overwrite the subgraph url if you don't want to use the balancer labs maintained version\n customSubgraphUrl?: string;\n subgraphQuery?: GraphQLQuery;\n //optionally overwrite parts of the standard SOR config\n sor?: Partial;\n tenderly?: BalancerTenderlyConfig;\n enableLogging?: boolean;\n coingecko?: CoingeckoConfig;\n}\n\nexport interface BalancerTenderlyConfig {\n accessKey: string;\n user: string;\n project: string;\n blockNumber?: number;\n}\n\nexport interface BalancerSdkSorConfig {\n //use a built-in service or provide a custom implementation of a TokenPriceService\n //defaults to coingecko\n tokenPriceService: 'api' | 'coingecko' | 'subgraph' | TokenPriceService;\n //use a built-in service or provide a custom implementation of a PoolDataService\n //defaults to subgraph\n poolDataService: 'subgraph' | PoolDataService;\n //if a custom PoolDataService is provided, on chain balance fetching needs to be handled externally\n //default to true.\n fetchOnChainBalances: boolean;\n}\n\nexport interface ContractAddresses {\n vault: string;\n multicall: string;\n poolDataQueries: string;\n gaugeClaimHelper?: string;\n balancerHelpers: string;\n balancerMinter?: string;\n lidoRelayer?: string;\n balancerRelayer: string;\n gaugeController?: string;\n feeDistributor?: string;\n veBal?: string;\n veBalProxy?: string;\n protocolFeePercentagesProvider?: string;\n weightedPoolFactory?: string;\n composableStablePoolFactory?: string;\n\n aaveLinearPoolFactory?: string;\n erc4626LinearPoolFactory?: string;\n eulerLinearPoolFactory?: string;\n gearboxLinearPoolFactory?: string;\n yearnLinearPoolFactory?: string;\n\n [key: string]: string | undefined;\n}\n\nexport interface BalancerNetworkConfig {\n chainId: Network;\n addresses: {\n contracts: ContractAddresses;\n tokens: {\n wrappedNativeAsset: string;\n lbpRaisingTokens?: string[];\n stETH?: string;\n wstETH?: string;\n bal: string;\n veBal?: string;\n bbaUsd?: string;\n };\n };\n tenderly?: BalancerTenderlyConfig;\n urls: {\n subgraph: string;\n gaugesSubgraph?: string;\n blockNumberSubgraph?: string;\n };\n thirdParty: {\n coingecko: {\n nativeAssetId: string;\n platformId: string;\n };\n };\n averageBlockTime?: number; // In seconds, used if blockNumberSubgraph not set\n multicallBatchSize?: number; // Only zkEVM needs a smaller batch size of 128, defaults to 1024\n pools: {\n wETHwstETH?: PoolReference;\n };\n poolsToIgnore?: string[];\n sorConnectingTokens?: { symbol: string; address: string }[];\n sorTriPathMidPoolIds?: string[];\n}\n\nexport interface BalancerDataRepositories {\n feeDistributor?: BaseFeeDistributor;\n feeCollector: Findable;\n gaugeShares?: GaugeSharesRepository;\n gyroConfigRepository?: GyroConfigRepository;\n liquidityGauges?: Findable;\n protocolFees?: ProtocolFeesProvider;\n /**\n * Why do we need 3 different pools repositories?\n */\n pools: Findable & Searchable;\n // Does it need to be different from the pools repository?\n poolsForSimulations: SubgraphPoolDataService;\n poolGauges?: PoolGaugesRepository;\n poolJoinExits: PoolJoinExitRepository;\n // Perhaps better to use a function to get upto date balances when needed.\n poolsOnChain: Findable &\n Searchable &\n Cacheable;\n poolShares: PoolSharesRepository;\n tokenHistoricalPrices: Findable;\n tokenMeta: Findable;\n tokenPrices: Findable;\n tokenYields: Findable;\n // Replace with a swapFeeRepository, we don't need historic pools for any other reason than to get the swap fee\n yesterdaysPools?: Findable & Searchable;\n}\n\nexport type PoolReference = {\n id: string;\n address: string;\n};\n\nexport enum PoolSpecialization {\n GeneralPool = 0,\n MinimalSwapInfoPool,\n TwoTokenPool,\n}\n\n// Joins\n\nexport type JoinPoolRequest = {\n assets: string[];\n maxAmountsIn: BigNumberish[];\n userData: string;\n fromInternalBalance: boolean;\n};\n\n// Exit\n\nexport type ExitPoolRequest = {\n assets: string[];\n minAmountsOut: string[];\n userData: string;\n toInternalBalance: boolean;\n};\n\n// Balance Operations\n\nexport enum UserBalanceOpKind {\n DepositInternal = 0,\n WithdrawInternal,\n TransferInternal,\n TransferExternal,\n}\n\nexport type UserBalanceOp = {\n kind: UserBalanceOpKind;\n asset: string;\n amount: BigNumberish;\n sender: string;\n recipient: string;\n};\n\nexport enum PoolBalanceOpKind {\n Withdraw = 0,\n Deposit = 1,\n Update = 2,\n}\n\nexport type PoolBalanceOp = {\n kind: PoolBalanceOpKind;\n poolId: string;\n token: string;\n amount: BigNumberish;\n};\n\nexport interface TransactionData {\n contract?: Contract;\n function: string;\n params: string[];\n outputs?: {\n amountsIn?: string[];\n amountsOut?: string[];\n };\n}\n\nexport type Currency = 'eth' | 'usd';\n\nexport type Price = { [currency in Currency]?: string };\nexport type TokenPrices = { [address: string]: Price };\nexport type HistoricalPrices = {\n prices: [[number, number]];\n market_caps: [[number, number]];\n total_volumes: [[number, number]];\n};\n\nexport interface Token {\n address: string;\n decimals?: number;\n symbol?: string;\n price?: Price;\n}\n\nexport interface PoolToken extends Token {\n balance: string;\n priceRate?: string;\n weight?: string | null;\n isExemptFromYieldProtocolFee?: boolean;\n token?: SubPoolMeta;\n}\n\nexport interface SubPoolMeta {\n pool: SubPool | null;\n latestUSDPrice?: string;\n latestFXPrice?: string;\n}\n\nexport interface SubPool {\n id: string;\n address: string;\n poolType: PoolType;\n totalShares: string;\n mainIndex: number;\n tokens?: PoolToken[];\n}\n\nexport interface OnchainTokenData {\n balance: string;\n weight: number;\n decimals: number;\n logoURI: string | undefined;\n name: string;\n symbol: string;\n}\n\nexport interface OnchainPoolData {\n tokens: Record;\n totalSupply: string;\n decimals: number;\n swapFee: string;\n amp?: string;\n swapEnabled: boolean;\n tokenRates?: string[];\n}\n\nexport enum PoolType {\n Weighted = 'Weighted',\n Investment = 'Investment',\n Stable = 'Stable',\n ComposableStable = 'ComposableStable',\n MetaStable = 'MetaStable',\n StablePhantom = 'StablePhantom',\n LiquidityBootstrapping = 'LiquidityBootstrapping',\n Element = 'Element',\n Gyro2 = 'Gyro2',\n Gyro3 = 'Gyro3',\n GyroE = 'GyroE',\n Managed = 'Managed',\n // Linear Pools defined below all operate the same mathematically but have different factories and names in Subgraph\n AaveLinear = 'AaveLinear',\n Linear = 'Linear',\n EulerLinear = 'EulerLinear',\n ERC4626Linear = 'ERC4626Linear',\n BeefyLinear = 'BeefyLinear',\n GearboxLinear = 'GearboxLinear',\n MidasLinear = 'MidasLinear',\n ReaperLinear = 'ReaperLinear',\n SiloLinear = 'SiloLinear',\n TetuLinear = 'TetuLinear',\n YearnLinear = 'YearnLinear',\n FX = 'FX',\n}\n\nexport interface Pool {\n id: string;\n name: string;\n address: string;\n chainId: number;\n poolType: PoolType;\n poolTypeVersion: number;\n swapFee: string;\n protocolYieldFeeCache: string;\n protocolSwapFeeCache: string;\n owner?: string;\n factory?: string;\n tokens: PoolToken[];\n tokensList: string[];\n tokenAddresses?: string[];\n totalLiquidity: string;\n totalShares: string;\n totalSwapFee?: string;\n totalSwapVolume?: string;\n onchain?: OnchainPoolData;\n createTime?: number;\n mainTokens?: string[];\n wrappedTokens?: string[];\n unwrappedTokens?: string[];\n isNew?: boolean;\n volumeSnapshot?: string;\n feesSnapshot?: string;\n boost?: string;\n symbol?: string;\n swapEnabled: boolean;\n amp?: string;\n wrappedIndex?: number;\n mainIndex?: number;\n apr?: AprBreakdown;\n liquidity?: string;\n totalWeight: string;\n lowerTarget: string;\n upperTarget: string;\n priceRateProviders?: PriceRateProvider[];\n lastJoinExitInvariant?: string;\n isInRecoveryMode?: boolean;\n isPaused?: boolean;\n tokenRates?: string[];\n}\n\nexport interface PriceRateProvider {\n address: string;\n token: {\n address: string;\n };\n}\n\n/**\n * Pool use-cases / controller layer\n */\nexport interface PoolWithMethods extends Pool, Queries.ParamsBuilder {\n /**\n * Build join pool transaction parameters with exact tokens in and minimum BPT out based on slippage tolerance\n * @param joiner Account address joining pool\n * @param tokensIn Token addresses provided for joining pool (same length and order as amountsIn)\n * @param amountsIn Token amounts provided for joining pool in EVM scale\n * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildJoin: (\n joiner: string,\n tokensIn: string[],\n amountsIn: string[],\n slippage: string\n ) => JoinPoolAttributes;\n\n /**\n * Calculate price impact of bptAmount against zero price impact BPT amount.\n * @param tokenAmounts Token amounts. Needs a value for each pool token.\n * @param bptAmount BPT amount for comparison (in EVM scale).\n * @param isJoin boolean indicating if the price impact is for a join or exit.\n * @returns price impact in EVM scale.\n */\n calcPriceImpact: (\n tokenAmounts: string[],\n bptAmount: string,\n isJoin: boolean\n ) => Promise;\n\n /**\n * Build exit pool transaction parameters with exact BPT in and minimum token amounts out based on slippage tolerance\n * @param exiter Account address exiting pool\n * @param bptIn BPT provided for exiting pool in EVM scale\n * @param slippage Maximum slippage tolerance in bps. i.e. 50 = 5%\n * @param shouldUnwrapNativeAsset Indicates whether wrapped native asset should be unwrapped after exit. Defaults to false.\n * @param singleTokenOut Optional: token address that if provided will exit to given token\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildExitExactBPTIn: (\n exiter: string,\n bptIn: string,\n slippage: string,\n shouldUnwrapNativeAsset?: boolean,\n singleTokenOut?: string,\n toInternalBalance?: boolean\n ) => ExitExactBPTInAttributes;\n\n /**\n * Build exit pool transaction parameters with exact tokens out and maximum BPT in based on slippage tolerance\n * @param exiter Account address exiting pool\n * @param tokensOut Tokens provided for exiting pool (same length and order as amountsOut)\n * @param amountsOut Amounts provided for exiting pool in EVM scale\n * @param slippage Maximum slippage tolerance in bps. i.e. 50 = 5%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildExitExactTokensOut: (\n exiter: string,\n tokensOut: string[],\n amountsOut: string[],\n slippage: string,\n toInternalBalance?: boolean\n ) => ExitExactTokensOutAttributes;\n\n /**\n * Build recovery exit pool transaction parameters with exact BPT in and minimum token amounts out based on slippage tolerance\n * @param exiter Account address exiting pool\n * @param bptIn BPT amount in EVM scale\n * @param slippage Maximum slippage tolerance in basis points. i.e. 50 = 5%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildRecoveryExit: (\n exiter: string,\n bptIn: string,\n slippage: string,\n toInternalBalance?: boolean\n ) => ExitExactBPTInAttributes;\n\n /**\n * Calculate spot price for swapping tokenIn with tokenOut\n * @param tokenIn Token address\n * @param tokenOut Token address\n * @returns spot price for swapping tokenIn with tokenOut in EVM scale\n */\n calcSpotPrice: (tokenIn: string, tokenOut: string) => string;\n\n bptIndex: number;\n}\n\nexport interface GraphQLQuery {\n args: GraphQLArgs;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n attrs: any;\n}\n\nexport type CoingeckoConfig = {\n coingeckoApiKey: string;\n tokensPerPriceRequest?: number;\n isDemoApiKey?: boolean;\n};\n","export class Logger {\n private enableLogging: boolean;\n\n private static instance: Logger;\n\n private constructor() {\n this.enableLogging = true; // Logging is initially enabled\n }\n\n static getInstance(): Logger {\n if (!Logger.instance) {\n Logger.instance = new Logger();\n }\n return Logger.instance;\n }\n\n setLoggingEnabled(enabled: boolean): void {\n this.enableLogging = enabled;\n }\n\n info(message: string): void {\n if (this.enableLogging) {\n console.log(`[INFO] ${message}`);\n }\n }\n\n warn(message: string): void {\n if (this.enableLogging) {\n console.warn(`[WARN] ${message}`);\n }\n }\n\n error(message: string): void {\n if (this.enableLogging) {\n console.error(`[ERROR] ${message}`);\n }\n }\n\n time(message: string): void {\n if (this.enableLogging) {\n console.time(`[TIME] ${message}`);\n }\n }\n\n timeEnd(message: string): void {\n if (this.enableLogging) {\n console.timeEnd(`[TIME] ${message}`);\n }\n }\n}\n","import { getAddress } from '@ethersproject/address';\nimport { AddressZero } from '@ethersproject/constants';\nimport invariant from 'tiny-invariant';\n\nconst cmpTokens = (tokenA: string, tokenB: string): number =>\n tokenA.toLowerCase() > tokenB.toLowerCase() ? 1 : -1;\n\nconst transposeMatrix = (matrix: unknown[][]): unknown[][] =>\n matrix[0].map((_, columnIndex) => matrix.map((row) => row[columnIndex]));\n\nexport class AssetHelpers {\n public readonly ETH: string = AddressZero;\n public readonly WETH: string;\n\n constructor(wethAddress: string) {\n this.WETH = getAddress(wethAddress);\n }\n\n static isEqual = (addressA: string, addressB: string): boolean =>\n getAddress(addressA) === getAddress(addressB);\n\n /**\n * Tests whether `token` is ETH (represented by `0x0000...0000`).\n *\n * @param token - the address of the asset to be checked\n */\n isETH = (token: string): boolean => AssetHelpers.isEqual(token, this.ETH);\n\n /**\n * Tests whether `token` is WETH.\n *\n * @param token - the address of the asset to be checked\n */\n isWETH = (token: string): boolean => AssetHelpers.isEqual(token, this.WETH);\n\n /**\n * Converts an asset to the equivalent ERC20 address.\n *\n * For ERC20s this will return the passed address but passing ETH (`0x0000...0000`) will return the WETH address\n * @param token - the address of the asset to be translated to an equivalent ERC20\n * @returns the address of translated ERC20 asset\n */\n translateToERC20 = (token: string): string =>\n this.isETH(token) ? this.WETH : token;\n\n /**\n * Sorts an array of token addresses into ascending order to match the format expected by the Vault.\n *\n * Passing additional arrays will result in each being sorted to maintain relative ordering to token addresses.\n *\n * The zero address (representing ETH) is sorted as if it were the WETH address.\n * This matches the behaviour expected by the Vault when receiving an array of addresses.\n *\n * @param tokens - an array of token addresses to be sorted in ascending order\n * @param others - a set of arrays to be sorted in the same order as the tokens, e.g. token weights or asset manager addresses\n * @returns an array of the form `[tokens, ...others]` where each subarray has been sorted to maintain its ordering relative to `tokens`\n *\n * @example\n * const [tokens] = sortTokens([tokenB, tokenC, tokenA])\n * const [tokens, weights] = sortTokens([tokenB, tokenC, tokenA], [weightB, weightC, weightA])\n * // where tokens = [tokenA, tokenB, tokenC], weights = [weightA, weightB, weightC]\n */\n sortTokens(\n tokens: string[],\n ...others: unknown[][]\n ): [string[], ...unknown[][]] {\n others.forEach((array) =>\n invariant(tokens.length === array.length, 'array length mismatch')\n );\n\n // We want to sort ETH as if were WETH so we translate to ERC20s\n const erc20Tokens = tokens.map(this.translateToERC20);\n\n const transpose = transposeMatrix([erc20Tokens, ...others]) as [\n string,\n ...unknown[]\n ][];\n const sortedTranspose = transpose.sort(([tokenA], [tokenB]) =>\n cmpTokens(tokenA, tokenB)\n );\n const [sortedErc20s, ...sortedOthers] = transposeMatrix(\n sortedTranspose\n ) as [string[], ...unknown[][]];\n\n // If one of the tokens was ETH, we need to translate back from WETH\n const sortedTokens = tokens.includes(this.ETH)\n ? sortedErc20s.map((token) => (this.isWETH(token) ? this.ETH : token))\n : sortedErc20s;\n return [sortedTokens, ...sortedOthers];\n }\n}\n","const balancerErrorCodes: Record = {\n '000': 'ADD_OVERFLOW',\n '001': 'SUB_OVERFLOW',\n '002': 'SUB_UNDERFLOW',\n '003': 'MUL_OVERFLOW',\n '004': 'ZERO_DIVISION',\n '005': 'DIV_INTERNAL',\n '006': 'X_OUT_OF_BOUNDS',\n '007': 'Y_OUT_OF_BOUNDS',\n '008': 'PRODUCT_OUT_OF_BOUNDS',\n '009': 'INVALID_EXPONENT',\n '100': 'OUT_OF_BOUNDS',\n '101': 'UNSORTED_ARRAY',\n '102': 'UNSORTED_TOKENS',\n '103': 'INPUT_LENGTH_MISMATCH',\n '104': 'ZERO_TOKEN',\n '200': 'MIN_TOKENS',\n '201': 'MAX_TOKENS',\n '202': 'MAX_SWAP_FEE_PERCENTAGE',\n '203': 'MIN_SWAP_FEE_PERCENTAGE',\n '204': 'MINIMUM_BPT',\n '205': 'CALLER_NOT_VAULT',\n '206': 'UNINITIALIZED',\n '207': 'BPT_IN_MAX_AMOUNT',\n '208': 'BPT_OUT_MIN_AMOUNT',\n '209': 'EXPIRED_PERMIT',\n '210': 'NOT_TWO_TOKENS',\n '211': 'DISABLED',\n '300': 'MIN_AMP',\n '301': 'MAX_AMP',\n '302': 'MIN_WEIGHT',\n '303': 'MAX_STABLE_TOKENS',\n '304': 'MAX_IN_RATIO',\n '305': 'MAX_OUT_RATIO',\n '306': 'MIN_BPT_IN_FOR_TOKEN_OUT',\n '307': 'MAX_OUT_BPT_FOR_TOKEN_IN',\n '308': 'NORMALIZED_WEIGHT_INVARIANT',\n '309': 'INVALID_TOKEN',\n '310': 'UNHANDLED_JOIN_KIND',\n '311': 'ZERO_INVARIANT',\n '312': 'ORACLE_INVALID_SECONDS_QUERY',\n '313': 'ORACLE_NOT_INITIALIZED',\n '314': 'ORACLE_QUERY_TOO_OLD',\n '315': 'ORACLE_INVALID_INDEX',\n '316': 'ORACLE_BAD_SECS',\n '317': 'AMP_END_TIME_TOO_CLOSE',\n '318': 'AMP_ONGOING_UPDATE',\n '319': 'AMP_RATE_TOO_HIGH',\n '320': 'AMP_NO_ONGOING_UPDATE',\n '321': 'STABLE_INVARIANT_DIDNT_CONVERGE',\n '322': 'STABLE_GET_BALANCE_DIDNT_CONVERGE',\n '323': 'RELAYER_NOT_CONTRACT',\n '324': 'BASE_POOL_RELAYER_NOT_CALLED',\n '325': 'REBALANCING_RELAYER_REENTERED',\n '326': 'GRADUAL_UPDATE_TIME_TRAVEL',\n '327': 'SWAPS_DISABLED',\n '328': 'CALLER_IS_NOT_LBP_OWNER',\n '329': 'PRICE_RATE_OVERFLOW',\n '330': 'INVALID_JOIN_EXIT_KIND_WHILE_SWAPS_DISABLED',\n '331': 'WEIGHT_CHANGE_TOO_FAST',\n '332': 'LOWER_GREATER_THAN_UPPER_TARGET',\n '333': 'UPPER_TARGET_TOO_HIGH',\n '334': 'UNHANDLED_BY_LINEAR_POOL',\n '335': 'OUT_OF_TARGET_RANGE',\n '336': 'UNHANDLED_EXIT_KIND ',\n '337': 'UNAUTHORIZED_EXIT',\n '338': 'MAX_MANAGEMENT_SWAP_FEE_PERCENTAGE',\n '339': 'UNHANDLED_BY_MANAGED_POOL',\n '340': 'UNHANDLED_BY_PHANTOM_POOL',\n '341': 'TOKEN_DOES_NOT_HAVE_RATE_PROVIDER',\n '342': 'INVALID_INITIALIZATION',\n '343': 'OUT_OF_NEW_TARGET_RANGE',\n '344': 'UNAUTHORIZED_OPERATION',\n '345': 'UNINITIALIZED_POOL_CONTROLLER',\n '400': 'REENTRANCY',\n '401': 'SENDER_NOT_ALLOWED',\n '402': 'PAUSED',\n '403': 'PAUSE_WINDOW_EXPIRED',\n '404': 'MAX_PAUSE_WINDOW_DURATION',\n '405': 'MAX_BUFFER_PERIOD_DURATION',\n '406': 'INSUFFICIENT_BALANCE',\n '407': 'INSUFFICIENT_ALLOWANCE',\n '408': 'ERC20_TRANSFER_FROM_ZERO_ADDRESS',\n '409': 'ERC20_TRANSFER_TO_ZERO_ADDRESS',\n '410': 'ERC20_MINT_TO_ZERO_ADDRESS',\n '411': 'ERC20_BURN_FROM_ZERO_ADDRESS',\n '412': 'ERC20_APPROVE_FROM_ZERO_ADDRESS',\n '413': 'ERC20_APPROVE_TO_ZERO_ADDRESS',\n '414': 'ERC20_TRANSFER_EXCEEDS_ALLOWANCE',\n '415': 'ERC20_DECREASED_ALLOWANCE_BELOW_ZERO',\n '416': 'ERC20_TRANSFER_EXCEEDS_BALANCE',\n '417': 'ERC20_BURN_EXCEEDS_ALLOWANCE',\n '418': 'SAFE_ERC20_CALL_FAILED',\n '419': 'ADDRESS_INSUFFICIENT_BALANCE',\n '420': 'ADDRESS_CANNOT_SEND_VALUE',\n '421': 'SAFE_CAST_VALUE_CANT_FIT_INT256',\n '422': 'GRANT_SENDER_NOT_ADMIN',\n '423': 'REVOKE_SENDER_NOT_ADMIN',\n '424': 'RENOUNCE_SENDER_NOT_ALLOWED',\n '425': 'BUFFER_PERIOD_EXPIRED',\n '426': 'CALLER_IS_NOT_OWNER',\n '427': 'NEW_OWNER_IS_ZERO',\n '428': 'CODE_DEPLOYMENT_FAILED',\n '429': 'CALL_TO_NON_CONTRACT',\n '430': 'LOW_LEVEL_CALL_FAILED',\n '431': 'NOT_PAUSED',\n '432': 'ADDRESS_ALREADY_ALLOWLISTED',\n '433': 'ADDRESS_NOT_ALLOWLISTED',\n '434': 'ERC20_BURN_EXCEEDS_BALANCE',\n '500': 'INVALID_POOL_ID',\n '501': 'CALLER_NOT_POOL',\n '502': 'SENDER_NOT_ASSET_MANAGER',\n '503': 'USER_DOESNT_ALLOW_RELAYER',\n '504': 'INVALID_SIGNATURE',\n '505': 'EXIT_BELOW_MIN',\n '506': 'JOIN_ABOVE_MAX',\n '507': 'SWAP_LIMIT',\n '508': 'SWAP_DEADLINE',\n '509': 'CANNOT_SWAP_SAME_TOKEN',\n '510': 'UNKNOWN_AMOUNT_IN_FIRST_SWAP',\n '511': 'MALCONSTRUCTED_MULTIHOP_SWAP',\n '512': 'INTERNAL_BALANCE_OVERFLOW',\n '513': 'INSUFFICIENT_INTERNAL_BALANCE',\n '514': 'INVALID_ETH_INTERNAL_BALANCE',\n '515': 'INVALID_POST_LOAN_BALANCE',\n '516': 'INSUFFICIENT_ETH',\n '517': 'UNALLOCATED_ETH',\n '518': 'ETH_TRANSFER',\n '519': 'CANNOT_USE_ETH_SENTINEL',\n '520': 'TOKENS_MISMATCH',\n '521': 'TOKEN_NOT_REGISTERED',\n '522': 'TOKEN_ALREADY_REGISTERED',\n '523': 'TOKENS_ALREADY_SET',\n '524': 'TOKENS_LENGTH_MUST_BE_2',\n '525': 'NONZERO_TOKEN_BALANCE',\n '526': 'BALANCE_TOTAL_OVERFLOW',\n '527': 'POOL_NO_TOKENS',\n '528': 'INSUFFICIENT_FLASH_LOAN_BALANCE',\n '600': 'SWAP_FEE_PERCENTAGE_TOO_HIGH',\n '601': 'FLASH_LOAN_FEE_PERCENTAGE_TOO_HIGH',\n '602': 'INSUFFICIENT_FLASH_LOAN_FEE_AMOUNT',\n};\n\nexport class BalancerErrors {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n static isErrorCode = (error: string): boolean => {\n if (!error.includes('BAL#')) return false;\n\n const errorCode = error.replace('BAL#', '');\n return Object.keys(balancerErrorCodes).includes(errorCode);\n };\n\n /**\n * Decodes a Balancer error code into the corresponding reason\n * @param error - a Balancer error code of the form `BAL#000`\n * @returns The decoded error reason\n */\n static parseErrorCode = (error: string): string => {\n if (!error.includes('BAL#')) throw new Error('Error code not found');\n const errorCode = error.replace('BAL#', '');\n\n const actualError = balancerErrorCodes[errorCode];\n\n if (!actualError) throw new Error('Error code not found');\n\n return actualError;\n };\n\n /**\n * Decodes a Balancer error code into the corresponding reason\n * @param error - a Balancer error code of the form `BAL#000`\n * @returns The decoded error reason if passed a valid error code, otherwise returns passed input\n */\n static tryParseErrorCode = (error: string): string => {\n try {\n return BalancerErrors.parseErrorCode(error);\n } catch {\n return error;\n }\n };\n\n /**\n * Tests whether a string is a known Balancer error message\n * @param error - a string to be checked verified as a Balancer error message\n */\n static isBalancerError = (error: string): boolean =>\n Object.values(balancerErrorCodes).includes(error);\n\n /**\n * Encodes an error string into the corresponding error code\n * @param error - a Balancer error message string\n * @returns a Balancer error code of the form `BAL#000`\n */\n static encodeError = (error: string): string => {\n const encodedError = Object.entries(balancerErrorCodes).find(\n ([, message]) => message === error\n );\n\n if (!encodedError) throw Error('Error message not found');\n\n return `BAL#${encodedError[0]}`;\n };\n}\n","import { MaxUint256 as MAX_DEADLINE } from '@ethersproject/constants';\nimport { Contract } from '@ethersproject/contracts';\nimport { hexValue, hexZeroPad, splitSignature } from '@ethersproject/bytes';\nimport { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { Signer, TypedDataSigner } from '@ethersproject/abstract-signer';\n\nexport type Account = string | Signer | Contract;\n\nexport async function accountToAddress(account: Account): Promise {\n if (typeof account == 'string') return account;\n if (Signer.isSigner(account)) return account.getAddress();\n if (account.address) return account.address;\n throw new Error('Could not read account address');\n}\n\nexport enum RelayerAction {\n JoinPool = 'JoinPool',\n ExitPool = 'ExitPool',\n Swap = 'Swap',\n BatchSwap = 'BatchSwap',\n SetRelayerApproval = 'SetRelayerApproval',\n}\n\nexport class RelayerAuthorization {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n static encodeCalldataAuthorization = (\n calldata: string,\n deadline: BigNumberish,\n signature: string\n ): string => {\n const encodedDeadline = hexZeroPad(hexValue(deadline), 32).slice(2);\n const { v, r, s } = splitSignature(signature);\n const encodedV = hexZeroPad(hexValue(v), 32).slice(2);\n const encodedR = r.slice(2);\n const encodedS = s.slice(2);\n return `${calldata}${encodedDeadline}${encodedV}${encodedR}${encodedS}`;\n };\n\n static signJoinAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.JoinPool,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signExitAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.ExitPool,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signSwapAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.Swap,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signBatchSwapAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.BatchSwap,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signSetRelayerApprovalAuthorization = (\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline?: BigNumberish,\n nonce?: BigNumberish\n ): Promise =>\n RelayerAuthorization.signAuthorizationFor(\n RelayerAction.SetRelayerApproval,\n validator,\n user,\n allowedSender,\n allowedCalldata,\n deadline,\n nonce\n );\n\n static signAuthorizationFor = async (\n type: RelayerAction,\n validator: Contract,\n user: Signer & TypedDataSigner,\n allowedSender: Account,\n allowedCalldata: string,\n deadline: BigNumberish = MAX_DEADLINE,\n nonce?: BigNumberish\n ): Promise => {\n const { chainId } = await validator.provider.getNetwork();\n if (!nonce) {\n const userAddress = await user.getAddress();\n nonce = (await validator.getNextNonce(userAddress)) as BigNumberish;\n }\n\n const domain = {\n name: 'Balancer V2 Vault',\n version: '1',\n chainId,\n verifyingContract: validator.address,\n };\n\n const types = {\n [type]: [\n { name: 'calldata', type: 'bytes' },\n { name: 'sender', type: 'address' },\n { name: 'nonce', type: 'uint256' },\n { name: 'deadline', type: 'uint256' },\n ],\n };\n\n const value = {\n calldata: allowedCalldata,\n sender: await accountToAddress(allowedSender),\n nonce: nonce.toString(),\n deadline: deadline.toString(),\n };\n\n return user._signTypedData(domain, types, value);\n };\n}\n\nexport class BalancerMinterAuthorization {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n static signSetMinterApproval = async (\n minterContract: Contract,\n minter: Account,\n approval: boolean,\n user: Signer & TypedDataSigner,\n deadline: BigNumberish = MAX_DEADLINE,\n nonce?: BigNumberish\n ): Promise<{ v: number; r: string; s: string; deadline: BigNumber }> => {\n const { chainId } = await minterContract.provider.getNetwork();\n if (!nonce) {\n const userAddress = await user.getAddress();\n nonce = (await minterContract.getNextNonce(userAddress)) as BigNumberish;\n }\n\n const domain = {\n name: 'Balancer Minter',\n version: '1',\n chainId,\n verifyingContract: minterContract.address,\n };\n\n const types = {\n SetMinterApproval: [\n { name: 'minter', type: 'address' },\n { name: 'approval', type: 'bool' },\n { name: 'nonce', type: 'uint256' },\n { name: 'deadline', type: 'uint256' },\n ],\n };\n\n const value = {\n minter: await accountToAddress(minter),\n approval,\n nonce: nonce.toString(),\n deadline: deadline.toString(),\n };\n\n const signature = await user._signTypedData(domain, types, value);\n\n return {\n ...splitSignature(signature),\n deadline: BigNumber.from(deadline),\n };\n };\n}\n","import { Signer, TypedDataSigner } from '@ethersproject/abstract-signer';\nimport { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { splitSignature } from '@ethersproject/bytes';\nimport { MaxUint256 as MAX_DEADLINE } from '@ethersproject/constants';\nimport { Contract } from '@ethersproject/contracts';\nimport { Account, accountToAddress } from './signatures';\n\nexport const signPermit = async (\n token: Contract,\n owner: Signer & TypedDataSigner,\n spender: Account,\n amount: BigNumberish,\n deadline: BigNumberish = MAX_DEADLINE,\n nonce?: BigNumberish\n): Promise<{\n v: number;\n r: string;\n s: string;\n deadline: BigNumber;\n nonce: BigNumber;\n}> => {\n const { chainId } = await token.provider.getNetwork();\n const ownerAddress = await owner.getAddress();\n\n if (!nonce) nonce = (await token.nonces(ownerAddress)) as BigNumberish;\n\n const domain = {\n name: await token.name(),\n version: '1',\n chainId,\n verifyingContract: token.address,\n };\n\n const types = {\n Permit: [\n { name: 'owner', type: 'address' },\n { name: 'spender', type: 'address' },\n { name: 'value', type: 'uint256' },\n { name: 'nonce', type: 'uint256' },\n { name: 'deadline', type: 'uint256' },\n ],\n };\n\n const value = {\n owner: ownerAddress,\n spender: await accountToAddress(spender),\n value: amount,\n nonce,\n deadline,\n };\n\n const signature = await owner._signTypedData(domain, types, value);\n return {\n ...splitSignature(signature),\n deadline: BigNumber.from(deadline),\n nonce: BigNumber.from(nonce),\n };\n};\n","export const BZERO = BigInt(0);\nexport const BONE = BigInt(1);\nexport const ONE = BigInt('1000000000000000000'); // 18 decimal places\n\nconst _require = (b: boolean, message: string) => {\n if (!b) throw new Error(message);\n};\n\n/**\n * @dev Returns a scaling factor that, when multiplied to a token amount for `token`, normalizes its balance as if\n * it had 18 decimals.\n */\nexport function _computeScalingFactor(tokenDecimals: bigint): bigint {\n // Tokens with more than 18 decimals are not supported.\n const decimalsDifference = BigInt(18) - tokenDecimals;\n return ONE * BigInt(10) ** decimalsDifference;\n}\n\n/**\n * @dev Applies `scalingFactor` to `amount`, resulting in a larger or equal value depending on whether it needed\n * scaling or not.\n */\nexport function _upscale(amount: bigint, scalingFactor: bigint): bigint {\n // Upscale rounding wouldn't necessarily always go in the same direction: in a swap for example the balance of\n // token in should be rounded up, and that of token out rounded down. This is the only place where we round in\n // the same direction for all amounts, as the impact of this rounding is expected to be minimal (and there's no\n // rounding error unless `_scalingFactor()` is overriden).\n return SolidityMaths.mulDownFixed(amount, scalingFactor);\n}\n\n/**\n * @dev Same as `_upscale`, but for an entire array. This function does not return anything, but instead *mutates*\n * the `amounts` array.\n */\nexport function _upscaleArray(\n amounts: bigint[],\n scalingFactors: bigint[]\n): bigint[] {\n const upscaledAmounts = new Array(amounts.length);\n for (let i = 0; i < amounts.length; ++i) {\n upscaledAmounts[i] = SolidityMaths.mulDownFixed(\n amounts[i],\n scalingFactors[i]\n );\n }\n return upscaledAmounts;\n}\n\n/**\n * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\n * whether it needed scaling or not. The result is rounded down.\n */\nexport function _downscaleDown(amount: bigint, scalingFactor: bigint): bigint {\n return SolidityMaths.divDownFixed(amount, scalingFactor);\n}\n\n/**\n * @dev Same as `_downscaleDown`, but for an entire array. This function does not return anything, but instead\n * *mutates* the `amounts` array.\n */\nexport function _downscaleDownArray(\n amounts: bigint[],\n scalingFactors: bigint[]\n): bigint[] {\n const downscaledAmounts = new Array(amounts.length);\n for (let i = 0; i < amounts.length; ++i) {\n downscaledAmounts[i] = SolidityMaths.divDownFixed(\n amounts[i],\n scalingFactors[i]\n );\n }\n return downscaledAmounts;\n}\n\n/**\n * @dev Reverses the `scalingFactor` applied to `amount`, resulting in a smaller or equal value depending on\n * whether it needed scaling or not. The result is rounded up.\n */\nexport function _downscaleUp(amount: bigint, scalingFactor: bigint): bigint {\n return SolidityMaths.divUpFixed(amount, scalingFactor);\n}\n\nexport class SolidityMaths {\n /**\n * @dev Returns the addition of two unsigned integers of 256 bits, reverting on overflow.\n */\n // add(a: bigint, b: bigint): bigint {\n // const c = a + b;\n // // _require(c >= a, Errors.ADD_OVERFLOW);\n // return c;\n // }\n\n /**\n * @dev Returns the addition of two signed integers, reverting on overflow.\n */\n static add(a: bigint, b: bigint): bigint {\n const c = a + b;\n _require((b >= 0 && c >= a) || (b < 0 && c < a), 'Errors.ADD_OVERFLOW');\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers of 256 bits, reverting on overflow.\n */\n static sub(a: bigint, b: bigint): bigint {\n _require(b <= a, 'Errors.SUB_OVERFLOW');\n const c = a - b;\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two signed integers, reverting on overflow.\n */\n // sub(int256 a, int256 b) internal pure returns (int256) {\n // int256 c = a - b;\n // // _require((b >= 0 && c <= a) || (b < 0 && c > a), Errors.SUB_OVERFLOW);\n // return c;\n // }\n\n /**\n * @dev Returns the largest bigint in the array.\n */\n static max(args: bigint[]): bigint {\n if (args.length === 0) throw new Error('Errors.EMPTY_ARRAY');\n if (args.length === 1) return args[0];\n return args.reduce((previous, current) =>\n current > previous ? current : previous\n );\n }\n\n /**\n * @dev Returns the smallest of two numbers of 256 bits.\n */\n static min(a: bigint, b: bigint): bigint {\n return a < b ? a : b;\n }\n\n static mul(a: bigint, b: bigint): bigint {\n const c = a * b;\n _require(a == BZERO || c / a == b, 'Errors.MUL_OVERFLOW');\n return c;\n }\n\n static div(a: bigint, b: bigint, roundUp: boolean): bigint {\n return roundUp ? this.divUp(a, b) : this.divDown(a, b);\n }\n\n static divDown(a: bigint, b: bigint): bigint {\n _require(b != BZERO, 'Errors.ZERO_DIVISION');\n return a / b;\n }\n\n static divUp(a: bigint, b: bigint): bigint {\n _require(b != BZERO, 'Errors.ZERO_DIVISION');\n\n if (a == BZERO) {\n return BZERO;\n } else {\n return BONE + (a - BONE) / b;\n }\n }\n\n // Modification: Taken from the fixed point class\n static MAX_POW_RELATIVE_ERROR = BigInt(10000);\n\n static mulUpFixed(a: bigint, b: bigint): bigint {\n const product = a * b;\n _require(a == BZERO || product / a == b, 'Errors.MUL_OVERFLOW');\n\n if (product == BZERO) {\n return BZERO;\n } else {\n // The traditional divUp formula is:\n // divUp(x, y) := (x + y - 1) / y\n // To avoid intermediate overflow in the addition, we distribute the division and get:\n // divUp(x, y) := (x - 1) / y + 1\n // Note that this requires x != 0, which we already tested for.\n\n return (product - BONE) / ONE + BONE;\n }\n }\n\n // Modification: Taken from the fixed point class\n static divDownFixed(a: bigint, b: bigint): bigint {\n _require(b != BZERO, 'Errors.ZERO_DIVISION');\n if (a == BZERO) {\n return BZERO;\n } else {\n const aInflated = a * ONE;\n // _require(aInflated / a == ONE, Errors.DIV_INTERNAL); // mul overflow\n\n return aInflated / b;\n }\n }\n\n // Modification: Taken from the fixed point class\n static divUpFixed(a: bigint, b: bigint): bigint {\n _require(b != BZERO, 'Errors.ZERO_DIVISION');\n\n if (a == BZERO) {\n return BZERO;\n } else {\n const aInflated = a * ONE;\n _require(aInflated / a == ONE, 'Errors.DIV_INTERNAL'); // mul overflow\n\n // The traditional divUp formula is:\n // divUp(x, y) := (x + y - 1) / y\n // To avoid intermediate overflow in the addition, we distribute the division and get:\n // divUp(x, y) := (x - 1) / y + 1\n // Note that this requires x != 0, which we already tested for.\n\n return (aInflated - BONE) / b + BONE;\n }\n }\n\n // Modification: Taken from the fixed point class\n static powUpFixed(x: bigint, y: bigint): bigint {\n const raw = LogExpMath.pow(x, y);\n const maxError = this.add(\n this.mulUpFixed(raw, this.MAX_POW_RELATIVE_ERROR),\n BONE\n );\n\n return this.add(raw, maxError);\n }\n\n // Modification: Taken from the fixed point class\n static complementFixed(x: bigint): bigint {\n return x < ONE ? ONE - x : BZERO;\n }\n\n static mulDownFixed(a: bigint, b: bigint): bigint {\n const product = a * b;\n _require(a == BZERO || product / a == b, 'Errors.MUL_OVERFLOW');\n\n return product / ONE;\n }\n}\n\nclass LogExpMath {\n // All fixed point multiplications and divisions are inlined. This means we need to divide by ONE when multiplying\n // two numbers, and multiply by ONE when dividing them.\n\n // All arguments and return values are 18 decimal fixed point numbers.\n static ONE_18 = BigInt('1000000000000000000');\n\n // Internally, intermediate values are computed with higher precision as 20 decimal fixed point numbers, and in the\n // case of ln36, 36 decimals.\n static ONE_20 = BigInt('100000000000000000000');\n static ONE_36 = BigInt('1000000000000000000000000000000000000');\n\n // The domain of natural exponentiation is bound by the word size and number of decimals used.\n //\n // Because internally the result will be stored using 20 decimals, the largest possible result is\n // (2^255 - 1) / 10^20, which makes the largest exponent ln((2^255 - 1) / 10^20) = 130.700829182905140221.\n // The smallest possible result is 10^(-18), which makes largest negative argument\n // ln(10^(-18)) = -41.446531673892822312.\n // We use 130.0 and -41.0 to have some safety margin.\n static MAX_NATURAL_EXPONENT = BigInt('130000000000000000000');\n static MIN_NATURAL_EXPONENT = BigInt('-41000000000000000000');\n\n // Bounds for ln_36's argument. Both ln(0.9) and ln(1.1) can be represented with 36 decimal places in a fixed point\n // 256 bit integer.\n static LN_36_LOWER_BOUND: bigint =\n BigInt(LogExpMath.ONE_18) - BigInt('100000000000000000');\n static LN_36_UPPER_BOUND: bigint =\n BigInt(LogExpMath.ONE_18) + BigInt('100000000000000000');\n\n static MILD_EXPONENT_BOUND: bigint =\n BigInt(2) ** BigInt(254) / LogExpMath.ONE_20;\n\n // 18 decimal constants\n static x0 = BigInt('128000000000000000000'); // 2ˆ7\n static a0 = BigInt(\n '38877084059945950922200000000000000000000000000000000000'\n ); // eˆ(x0) (no decimals)\n static x1 = BigInt('64000000000000000000'); // 2ˆ6\n static a1 = BigInt('6235149080811616882910000000'); // eˆ(x1) (no decimals)\n\n // 20 decimal constants\n static x2 = BigInt('3200000000000000000000'); // 2ˆ5\n static a2 = BigInt('7896296018268069516100000000000000'); // eˆ(x2)\n static x3 = BigInt('1600000000000000000000'); // 2ˆ4\n static a3 = BigInt('888611052050787263676000000'); // eˆ(x3)\n static x4 = BigInt('800000000000000000000'); // 2ˆ3\n static a4 = BigInt('298095798704172827474000'); // eˆ(x4)\n static x5 = BigInt('400000000000000000000'); // 2ˆ2\n static a5 = BigInt('5459815003314423907810'); // eˆ(x5)\n static x6 = BigInt('200000000000000000000'); // 2ˆ1\n static a6 = BigInt('738905609893065022723'); // eˆ(x6)\n static x7 = BigInt('100000000000000000000'); // 2ˆ0\n static a7 = BigInt('271828182845904523536'); // eˆ(x7)\n static x8 = BigInt('50000000000000000000'); // 2ˆ-1\n static a8 = BigInt('164872127070012814685'); // eˆ(x8)\n static x9 = BigInt('25000000000000000000'); // 2ˆ-2\n static a9 = BigInt('128402541668774148407'); // eˆ(x9)\n static x10 = BigInt('12500000000000000000'); // 2ˆ-3\n static a10 = BigInt('113314845306682631683'); // eˆ(x10)\n static x11 = BigInt('6250000000000000000'); // 2ˆ-4\n static a11 = BigInt('106449445891785942956'); // eˆ(x11)\n\n // All arguments and return values are 18 decimal fixed point numbers.\n static pow(x: bigint, y: bigint): bigint {\n if (y === BZERO) {\n // We solve the 0^0 indetermination by making it equal one.\n return this.ONE_18;\n }\n\n if (x == BZERO) {\n return BZERO;\n }\n\n // Instead of computing x^y directly, we instead rely on the properties of logarithms and exponentiation to\n // arrive at that result. In particular, exp(ln(x)) = x, and ln(x^y) = y * ln(x). This means\n // x^y = exp(y * ln(x)).\n\n // The ln function takes a signed value, so we need to make sure x fits in the signed 256 bit range.\n _require(\n x <\n BigInt(\n '57896044618658097711785492504343953926634992332820282019728792003956564819968'\n ),\n 'Errors.X_OUT_OF_BOUNDS'\n );\n const x_int256 = x;\n\n // We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In\n // both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.\n\n // This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.\n _require(y < this.MILD_EXPONENT_BOUND, 'Errors.Y_OUT_OF_BOUNDS');\n const y_int256 = y;\n\n let logx_times_y;\n if (\n this.LN_36_LOWER_BOUND < x_int256 &&\n x_int256 < this.LN_36_UPPER_BOUND\n ) {\n const ln_36_x = this._ln_36(x_int256);\n\n // ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just\n // bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal\n // multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the\n // (downscaled) last 18 decimals.\n logx_times_y =\n (ln_36_x / this.ONE_18) * y_int256 +\n ((ln_36_x % this.ONE_18) * y_int256) / this.ONE_18;\n } else {\n logx_times_y = this._ln(x_int256) * y_int256;\n }\n logx_times_y /= this.ONE_18;\n\n // Finally, we compute exp(y * ln(x)) to arrive at x^y\n _require(\n this.MIN_NATURAL_EXPONENT <= logx_times_y &&\n logx_times_y <= this.MAX_NATURAL_EXPONENT,\n 'Errors.PRODUCT_OUT_OF_BOUNDS'\n );\n\n // return uint256(exp(logx_times_y));\n return this.exp(logx_times_y);\n }\n\n static exp(x: bigint): bigint {\n _require(\n x >= this.MIN_NATURAL_EXPONENT && x <= this.MAX_NATURAL_EXPONENT,\n 'Errors.INVALID_EXPONENT'\n );\n\n if (x < 0) {\n // We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it\n // fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).\n // Fixed point division requires multiplying by ONE_18.\n return (this.ONE_18 * this.ONE_18) / this.exp(BigInt(-1) * x);\n }\n\n // First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,\n // where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7\n // because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the\n // decomposition.\n // At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this\n // decomposition, which will be lower than the smallest x_n.\n // exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.\n // We mutate x by subtracting x_n, making it the remainder of the decomposition.\n\n // The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause\n // intermediate overflows. Instead we store them as plain integers, with 0 decimals.\n // Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the\n // decomposition.\n\n // For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct\n // it and compute the accumulated product.\n\n let firstAN;\n if (x >= this.x0) {\n x -= this.x0;\n firstAN = this.a0;\n } else if (x >= this.x1) {\n x -= this.x1;\n firstAN = this.a1;\n } else {\n firstAN = BigInt(1); // One with no decimal places\n }\n\n // We now transform x into a 20 decimal fixed point number, to have enhanced precision when computing the\n // smaller terms.\n x *= BigInt(100);\n\n // `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point\n // one. Recall that fixed point multiplication requires dividing by ONE_20.\n let product = this.ONE_20;\n\n if (x >= this.x2) {\n x -= this.x2;\n product = (product * this.a2) / this.ONE_20;\n }\n if (x >= this.x3) {\n x -= this.x3;\n product = (product * this.a3) / this.ONE_20;\n }\n if (x >= this.x4) {\n x -= this.x4;\n product = (product * this.a4) / this.ONE_20;\n }\n if (x >= this.x5) {\n x -= this.x5;\n product = (product * this.a5) / this.ONE_20;\n }\n if (x >= this.x6) {\n x -= this.x6;\n product = (product * this.a6) / this.ONE_20;\n }\n if (x >= this.x7) {\n x -= this.x7;\n product = (product * this.a7) / this.ONE_20;\n }\n if (x >= this.x8) {\n x -= this.x8;\n product = (product * this.a8) / this.ONE_20;\n }\n if (x >= this.x9) {\n x -= this.x9;\n product = (product * this.a9) / this.ONE_20;\n }\n\n // x10 and x11 are unnecessary here since we have high enough precision already.\n\n // Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series\n // expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).\n\n let seriesSum = this.ONE_20; // The initial one in the sum, with 20 decimal places.\n let term; // Each term in the sum, where the nth term is (x^n / n!).\n\n // The first term is simply x.\n term = x;\n seriesSum += term;\n\n // Each term (x^n / n!) equals the previous one times x, divided by n. Since x is a fixed point number,\n // multiplying by it requires dividing by this.ONE_20, but dividing by the non-fixed point n values does not.\n\n term = (term * x) / this.ONE_20 / BigInt(2);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(3);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(4);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(5);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(6);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(7);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(8);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(9);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(10);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(11);\n seriesSum += term;\n\n term = (term * x) / this.ONE_20 / BigInt(12);\n seriesSum += term;\n\n // 12 Taylor terms are sufficient for 18 decimal precision.\n\n // We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor\n // approximation of the exponentiation of the remainder (both with 20 decimals). All that remains is to multiply\n // all three (one 20 decimal fixed point multiplication, dividing by this.ONE_20, and one integer multiplication),\n // and then drop two digits to return an 18 decimal value.\n\n return (((product * seriesSum) / this.ONE_20) * firstAN) / BigInt(100);\n }\n\n static _ln_36(x: bigint): bigint {\n // Since ln(1) = 0, a value of x close to one will yield a very small result, which makes using 36 digits\n // worthwhile.\n\n // First, we transform x to a 36 digit fixed point value.\n x *= this.ONE_18;\n\n // We will use the following Taylor expansion, which converges very rapidly. Let z = (x - 1) / (x + 1).\n // ln(x) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\n\n // Recall that 36 digit fixed point division requires multiplying by ONE_36, and multiplication requires\n // division by ONE_36.\n const z = ((x - this.ONE_36) * this.ONE_36) / (x + this.ONE_36);\n const z_squared = (z * z) / this.ONE_36;\n\n // num is the numerator of the series: the z^(2 * n + 1) term\n let num = z;\n\n // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\n let seriesSum = num;\n\n // In each step, the numerator is multiplied by z^2\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(3);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(5);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(7);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(9);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(11);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(13);\n\n num = (num * z_squared) / this.ONE_36;\n seriesSum += num / BigInt(15);\n\n // 8 Taylor terms are sufficient for 36 decimal precision.\n\n // All that remains is multiplying by 2 (non fixed point).\n return seriesSum * BigInt(2);\n }\n\n /**\n * @dev Internal natural logarithm (ln(a)) with signed 18 decimal fixed point argument.\n */\n static _ln(a: bigint): bigint {\n if (a < this.ONE_18) {\n // Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less\n // than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.\n // Fixed point division requires multiplying by this.ONE_18.\n return BigInt(-1) * this._ln((this.ONE_18 * this.ONE_18) / a);\n }\n\n // First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which\n // we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,\n // ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot\n // be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.\n // At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this\n // decomposition, which will be lower than the smallest a_n.\n // ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.\n // We mutate a by subtracting a_n, making it the remainder of the decomposition.\n\n // For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point\n // numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by\n // this.ONE_18 to convert them to fixed point.\n // For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide\n // by it and compute the accumulated sum.\n\n let sum = BZERO;\n if (a >= this.a0 * this.ONE_18) {\n a /= this.a0; // Integer, not fixed point division\n sum += this.x0;\n }\n\n if (a >= this.a1 * this.ONE_18) {\n a /= this.a1; // Integer, not fixed point division\n sum += this.x1;\n }\n\n // All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.\n sum *= BigInt(100);\n a *= BigInt(100);\n\n // Because further a_n are 20 digit fixed point numbers, we multiply by ONE_20 when dividing by them.\n\n if (a >= this.a2) {\n a = (a * this.ONE_20) / this.a2;\n sum += this.x2;\n }\n\n if (a >= this.a3) {\n a = (a * this.ONE_20) / this.a3;\n sum += this.x3;\n }\n\n if (a >= this.a4) {\n a = (a * this.ONE_20) / this.a4;\n sum += this.x4;\n }\n\n if (a >= this.a5) {\n a = (a * this.ONE_20) / this.a5;\n sum += this.x5;\n }\n\n if (a >= this.a6) {\n a = (a * this.ONE_20) / this.a6;\n sum += this.x6;\n }\n\n if (a >= this.a7) {\n a = (a * this.ONE_20) / this.a7;\n sum += this.x7;\n }\n\n if (a >= this.a8) {\n a = (a * this.ONE_20) / this.a8;\n sum += this.x8;\n }\n\n if (a >= this.a9) {\n a = (a * this.ONE_20) / this.a9;\n sum += this.x9;\n }\n\n if (a >= this.a10) {\n a = (a * this.ONE_20) / this.a10;\n sum += this.x10;\n }\n\n if (a >= this.a11) {\n a = (a * this.ONE_20) / this.a11;\n sum += this.x11;\n }\n\n // a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series\n // that converges rapidly for values of `a` close to one - the same one used in ln_36.\n // Let z = (a - 1) / (a + 1).\n // ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))\n\n // Recall that 20 digit fixed point division requires multiplying by ONE_20, and multiplication requires\n // division by ONE_20.\n const z = ((a - this.ONE_20) * this.ONE_20) / (a + this.ONE_20);\n const z_squared = (z * z) / this.ONE_20;\n\n // num is the numerator of the series: the z^(2 * n + 1) term\n let num = z;\n\n // seriesSum holds the accumulated sum of each term in the series, starting with the initial z\n let seriesSum = num;\n\n // In each step, the numerator is multiplied by z^2\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(3);\n\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(5);\n\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(7);\n\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(9);\n\n num = (num * z_squared) / this.ONE_20;\n seriesSum += num / BigInt(11);\n\n // 6 Taylor terms are sufficient for 36 decimal precision.\n\n // Finally, we multiply by 2 (non fixed point) to compute ln(remainder)\n seriesSum *= BigInt(2);\n\n // We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both\n // with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal\n // value.\n\n return (sum + seriesSum) / BigInt(100);\n }\n}\n","import { parseFixed } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport { Pool } from '../../types';\nimport {\n SolidityMaths,\n _computeScalingFactor,\n _upscaleArray,\n} from '@/lib/utils/solidityMaths';\nimport { AssetHelpers } from '@/lib/utils/assetHelpers';\n\nexport const AMP_PRECISION = 3; // number of decimals -> precision 1000\n\ntype ParsedPoolInfo = {\n bptIndex: number;\n higherBalanceTokenIndex: number;\n ampWithPrecision: bigint;\n balancesEvm: bigint[];\n balancesEvmWithoutBpt: bigint[];\n priceRates: bigint[];\n priceRatesWithoutBpt: bigint[];\n swapFeeEvm: bigint;\n poolTokens: string[];\n poolTokensWithoutBpt: string[];\n weights: bigint[];\n scalingFactors: bigint[];\n scalingFactorsWithoutBpt: bigint[];\n scalingFactorsRaw: bigint[];\n scalingFactorsRawWithoutBpt: bigint[];\n upScaledBalances: bigint[];\n upScaledBalancesWithoutBpt: bigint[];\n totalSharesEvm: bigint;\n};\n\n/**\n * Parse pool info into EVM amounts. Sorts by token order if wrappedNativeAsset param passed.\n * @param pool Pool object to be parsed\n * @param wrappedNativeAsset e.g. wETH address\n * @param unwrapNativeAsset if true, changes wETH address to ETH address\n * @returns parsed pool info\n */\nexport const parsePoolInfo = (\n pool: Pool,\n wrappedNativeAsset?: string,\n unwrapNativeAsset?: boolean\n): ParsedPoolInfo => {\n let poolTokens = unwrapNativeAsset\n ? pool.tokens.map((token) =>\n token.address === wrappedNativeAsset ? AddressZero : token.address\n )\n : pool.tokens.map((token) => token.address);\n let decimals = pool.tokens.map((token) => {\n return token.decimals ?? 18;\n });\n let balancesEvm = pool.tokens.map((token) =>\n parseFixed(token.balance, token.decimals).toBigInt()\n );\n let weights = pool.tokens.map((token) => {\n return parseFixed(token.weight ?? '1', 18).toBigInt();\n });\n let priceRates = pool.tokens.map((token) => {\n return parseFixed(token.priceRate ?? '1', 18).toBigInt();\n });\n\n let scalingFactorsRaw = decimals.map((d) => _computeScalingFactor(BigInt(d)));\n let scalingFactors = scalingFactorsRaw.map((sf, i) =>\n SolidityMaths.mulDownFixed(sf, priceRates[i])\n );\n // This assumes token.balance is in human scale (e.g. from SG)\n let upScaledBalances = _upscaleArray(balancesEvm, scalingFactors);\n if (wrappedNativeAsset) {\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n [\n poolTokens,\n decimals,\n scalingFactors,\n scalingFactorsRaw,\n balancesEvm,\n upScaledBalances,\n weights,\n priceRates,\n ] = assetHelpers.sortTokens(\n poolTokens,\n decimals,\n scalingFactors,\n scalingFactorsRaw,\n balancesEvm,\n upScaledBalances,\n weights,\n priceRates\n ) as [\n string[],\n number[],\n bigint[],\n bigint[],\n bigint[],\n bigint[],\n bigint[],\n bigint[]\n ];\n }\n\n // Solidity maths uses precison method for amp that must be replicated\n const ampWithPrecision = parseFixed(\n pool.amp ?? '1',\n AMP_PRECISION\n ).toBigInt();\n\n const higherBalanceTokenIndex = upScaledBalances.indexOf(\n SolidityMaths.max(upScaledBalances)\n );\n\n const scalingFactorsWithoutBpt = [...scalingFactors];\n const scalingFactorsRawWithoutBpt = [...scalingFactorsRaw];\n const poolTokensWithoutBpt = [...poolTokens];\n const balancesEvmWithoutBpt = [...balancesEvm];\n const priceRatesWithoutBpt = [...priceRates];\n const upScaledBalancesWithoutBpt = [...upScaledBalances];\n\n const bptIndex = poolTokens.indexOf(pool.address);\n if (bptIndex !== -1) {\n scalingFactorsWithoutBpt.splice(bptIndex, 1);\n scalingFactorsRawWithoutBpt.splice(bptIndex, 1);\n poolTokensWithoutBpt.splice(bptIndex, 1);\n balancesEvmWithoutBpt.splice(bptIndex, 1);\n priceRatesWithoutBpt.splice(bptIndex, 1);\n upScaledBalancesWithoutBpt.splice(bptIndex, 1);\n }\n\n return {\n bptIndex,\n higherBalanceTokenIndex,\n ampWithPrecision,\n balancesEvm,\n balancesEvmWithoutBpt,\n priceRates,\n priceRatesWithoutBpt,\n swapFeeEvm: parseFixed(pool.swapFee, 18).toBigInt(),\n poolTokens,\n poolTokensWithoutBpt,\n weights,\n scalingFactors,\n scalingFactorsWithoutBpt,\n scalingFactorsRaw,\n scalingFactorsRawWithoutBpt,\n upScaledBalances,\n upScaledBalancesWithoutBpt,\n totalSharesEvm: parseFixed(pool.totalShares || '0', 18).toBigInt(),\n };\n};\n","import { Network } from '@/lib/constants/network';\n\n/**\n * TYPES\n */\ntype CommonTokens = {\n nativeAsset: string;\n wNativeAsset: string;\n WETH: string;\n BAL: string;\n bbaUSD?: string;\n bbaUSDv2?: string;\n};\n\ntype TokenConstants = {\n Popular: {\n Symbols: string[];\n };\n Addresses: CommonTokens;\n PriceChainMap?: Record;\n};\n\n/**\n * CONSTANTS\n */\nexport const DEFAULT_TOKEN_DECIMALS = 18;\n\nexport const TOKENS_MAINNET: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'AAVE', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n WETH: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n BAL: '0xba100000625a3754423978a60c9317c58a424e3d',\n bbaUSD: '0x7B50775383d3D6f0215A8F290f2C9e2eEBBEceb2',\n bbaUSDv2: '0xA13a9247ea42D743238089903570127DdA72fE44',\n },\n};\n\nexport const TOKENS_POLYGON: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'AAVE', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',\n WETH: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619',\n BAL: '0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3',\n },\n};\n\nexport const TOKENS_ARBITRUM: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'AAVE', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',\n WETH: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',\n BAL: '0x040d1EdC9569d4Bab2D15287Dc5A4F10F56a56B8',\n },\n};\n\nexport const TOKENS_GNOSIS: TokenConstants = {\n Popular: {\n Symbols: ['xDAI', 'WXDAI', 'WETH', 'BAL'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0xe91d153e0b41518a2ce8dd3d7944fa863463a97d',\n WETH: '0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1',\n BAL: '0x7eF541E2a22058048904fE5744f9c7E4C57AF717',\n },\n};\nexport const TOKENS_GOERLI: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'USDT', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1',\n WETH: '0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1',\n BAL: '0xfA8449189744799aD2AcE7e0EBAC8BB7575eff47',\n bbaUSD: '0x13ACD41C585d7EbB4a9460f7C8f50BE60DC080Cd',\n },\n PriceChainMap: {\n /**\n * Addresses must be lower case and map from goerli to mainnet, e.g\n * [goerli address]: mainnet address\n */\n '0xdfcea9088c8a88a76ff74892c1457c17dfeef9c1':\n '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n '0x37f03a12241e9fd3658ad6777d289c3fb8512bc9':\n '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',\n '0xfa8449189744799ad2ace7e0ebac8bb7575eff47':\n '0xba100000625a3754423978a60c9317c58a424e3d',\n '0xe0c9275e44ea80ef17579d33c55136b7da269aeb':\n '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n '0x8c9e6c40d3402480ace624730524facc5482798c':\n '0x6b175474e89094c44da98b954eedeac495271d0f',\n '0x1f1f156e0317167c11aa412e3d1435ea29dc3cce':\n '0xdac17f958d2ee523a2206206994597c13d831ec7',\n '0x4cb1892fddf14f772b2e39e299f44b2e5da90d04':\n '0x3ed3b47dd13ec9a98b44e6204a523e766b225811',\n '0x811151066392fd641fe74a9b55a712670572d161':\n '0xbcca60bb61934080951369a648fb03df4f96263c',\n '0x89534a24450081aa267c79b07411e9617d984052':\n '0x028171bca77440897b824ca71d1c56cac55b68a3',\n '0x829f35cebbcd47d3c120793c12f7a232c903138b':\n '0x956f47f50a910163d8bf957cf5846d573e7f87ca',\n '0xff386a3d08f80ac38c77930d173fa56c6286dc8b':\n '0x6810e776880c02933d47db1b9fc05908e5386b96',\n },\n};\n\nexport const TOKENS_GENERIC: TokenConstants = {\n Popular: {\n Symbols: ['WBTC', 'DAI', 'USDC', 'BAL', 'AAVE', 'WETH'],\n },\n Addresses: {\n nativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n wNativeAsset: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',\n WETH: '0x0000000000000000000000000000000000000000',\n BAL: '0x0000000000000000000000000000000000000000',\n },\n};\n\nexport const TOKENS_MAP = {\n [Network.GOERLI]: TOKENS_GOERLI,\n [Network.MAINNET]: TOKENS_MAINNET,\n [Network.POLYGON]: TOKENS_POLYGON,\n [Network.ARBITRUM]: TOKENS_ARBITRUM,\n [Network.GNOSIS]: TOKENS_GNOSIS,\n};\n\nexport function TOKENS(networkId: Network): TokenConstants {\n const id = networkId as keyof typeof TOKENS_MAP;\n return TOKENS_MAP[id] ? TOKENS_MAP[id] : TOKENS_GENERIC;\n}\n","\"use strict\";\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\nconst LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\nimport { version } from \"./_version\";\nlet _globalLogger = null;\nfunction _checkNormalize() {\n try {\n const missing = [];\n // Make sure all forms of normalization are supported\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n }\n catch (error) {\n missing.push(form);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\");\n }\n }\n catch (error) {\n return error.message;\n }\n return null;\n}\nconst _normalizeError = _checkNormalize();\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[\"DEBUG\"] = \"DEBUG\";\n LogLevel[\"INFO\"] = \"INFO\";\n LogLevel[\"WARNING\"] = \"WARNING\";\n LogLevel[\"ERROR\"] = \"ERROR\";\n LogLevel[\"OFF\"] = \"OFF\";\n})(LogLevel || (LogLevel = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ///////////////////\n // Generic Errors\n // Unknown Error\n ErrorCode[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n // Not Implemented\n ErrorCode[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n // Unsupported Operation\n // - operation\n ErrorCode[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n // Network Error (i.e. Ethereum Network, such as an invalid chain ID)\n // - event (\"noNetwork\" is not re-thrown in provider.ready; otherwise thrown)\n ErrorCode[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n // Some sort of bad response from the server\n ErrorCode[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n // Timeout\n ErrorCode[\"TIMEOUT\"] = \"TIMEOUT\";\n ///////////////////\n // Operational Errors\n // Buffer Overrun\n ErrorCode[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n ErrorCode[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ///////////////////\n // Argument Errors\n // Missing new operator to an object\n // - name: The name of the class\n ErrorCode[\"MISSING_NEW\"] = \"MISSING_NEW\";\n // Invalid argument (e.g. value is incompatible with type) to a function:\n // - argument: The argument name that was invalid\n // - value: The value of the argument\n ErrorCode[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ///////////////////\n // Blockchain Errors\n // Call exception\n // - transaction: the transaction\n // - address?: the contract address\n // - args?: The arguments passed into the function\n // - method?: The Solidity method signature\n // - errorSignature?: The EIP848 error signature\n // - errorArgs?: The EIP848 error parameters\n // - reason: The reason (only for EIP848 \"Error(string)\")\n ErrorCode[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n ErrorCode[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n // Nonce has already been used\n // - transaction: the transaction attempted\n ErrorCode[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n ErrorCode[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n ErrorCode[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n // The transaction was replaced by one with a higher gas price\n // - reason: \"cancelled\", \"replaced\" or \"repriced\"\n // - cancelled: true if reason == \"cancelled\" or reason == \"replaced\")\n // - hash: original transaction hash\n // - replacement: the full TransactionsResponse for the replacement\n // - receipt: the receipt of the replacement\n ErrorCode[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ///////////////////\n // Interaction Errors\n // The user rejected the action, such as signing a message or sending\n // a transaction\n ErrorCode[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n})(ErrorCode || (ErrorCode = {}));\n;\nconst HEX = \"0123456789abcdef\";\nexport class Logger {\n constructor(version) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n _log(logLevel, args) {\n const level = logLevel.toLowerCase();\n if (LogLevels[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel > LogLevels[level]) {\n return;\n }\n console.log.apply(console, args);\n }\n debug(...args) {\n this._log(Logger.levels.DEBUG, args);\n }\n info(...args) {\n this._log(Logger.levels.INFO, args);\n }\n warn(...args) {\n this._log(Logger.levels.WARNING, args);\n }\n makeError(message, code, params) {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n try {\n if (value instanceof Uint8Array) {\n let hex = \"\";\n for (let i = 0; i < value.length; i++) {\n hex += HEX[value[i] >> 4];\n hex += HEX[value[i] & 0x0f];\n }\n messageDetails.push(key + \"=Uint8Array(0x\" + hex + \")\");\n }\n else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\n }\n catch (error) {\n messageDetails.push(key + \"=\" + JSON.stringify(params[key].toString()));\n }\n });\n messageDetails.push(`code=${code}`);\n messageDetails.push(`version=${this.version}`);\n const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https:/\\/links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n // @TODO: Any??\n const error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function (key) {\n error[key] = params[key];\n });\n return error;\n }\n throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\", form: _normalizeError\n });\n }\n }\n checkSafeUint53(value, message) {\n if (typeof (value) !== \"number\") {\n return;\n }\n if (message == null) {\n message = \"value not safe\";\n }\n if (value < 0 || value >= 0x1fffffffffffff) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value: value\n });\n }\n if (value % 1) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value: value\n });\n }\n }\n checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n }\n else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger.errors.UNEXPECTED_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n }\n checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n }\n else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n static globalLogger() {\n if (!_globalLogger) {\n _globalLogger = new Logger(version);\n }\n return _globalLogger;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n static setLogLevel(logLevel) {\n const level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n Logger.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n }\n static from(version) {\n return new Logger(version);\n }\n}\nLogger.errors = ErrorCode;\nLogger.levels = LogLevel;\n//# sourceMappingURL=index.js.map","export const version = \"logger/5.7.0\";\n//# sourceMappingURL=_version.js.map","export const version = \"units/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { formatFixed, parseFixed } from \"@ethersproject/bignumber\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nconst names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\",\n];\n// Some environments have issues with RegEx that contain back-tracking, so we cannot\n// use them.\nexport function commify(value) {\n const comps = String(value).split(\".\");\n if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === \".\" || value === \"-.\") {\n logger.throwArgumentError(\"invalid value\", \"value\", value);\n }\n // Make sure we have at least one whole digit (0 if none)\n let whole = comps[0];\n let negative = \"\";\n if (whole.substring(0, 1) === \"-\") {\n negative = \"-\";\n whole = whole.substring(1);\n }\n // Make sure we have at least 1 whole digit with no leading zeros\n while (whole.substring(0, 1) === \"0\") {\n whole = whole.substring(1);\n }\n if (whole === \"\") {\n whole = \"0\";\n }\n let suffix = \"\";\n if (comps.length === 2) {\n suffix = \".\" + (comps[1] || \"0\");\n }\n while (suffix.length > 2 && suffix[suffix.length - 1] === \"0\") {\n suffix = suffix.substring(0, suffix.length - 1);\n }\n const formatted = [];\n while (whole.length) {\n if (whole.length <= 3) {\n formatted.unshift(whole);\n break;\n }\n else {\n const index = whole.length - 3;\n formatted.unshift(whole.substring(index));\n whole = whole.substring(0, index);\n }\n }\n return negative + formatted.join(\",\") + suffix;\n}\nexport function formatUnits(value, unitName) {\n if (typeof (unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) {\n unitName = 3 * index;\n }\n }\n return formatFixed(value, (unitName != null) ? unitName : 18);\n}\nexport function parseUnits(value, unitName) {\n if (typeof (value) !== \"string\") {\n logger.throwArgumentError(\"value must be a string\", \"value\", value);\n }\n if (typeof (unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) {\n unitName = 3 * index;\n }\n }\n return parseFixed(value, (unitName != null) ? unitName : 18);\n}\nexport function formatEther(wei) {\n return formatUnits(wei, 18);\n}\nexport function parseEther(ether) {\n return parseUnits(ether, 18);\n}\n//# sourceMappingURL=index.js.map","import { Interface } from '@ethersproject/abi';\nimport { formatUnits } from '@ethersproject/units';\nimport { Multicall } from '@/contracts';\nimport { Network } from '@/types';\n\nexport const yieldTokens = {\n [Network.MAINNET]: {\n waUSDT: '0xf8fd466f12e236f4c96f7cce6c79eadb819abf58',\n waUSDC: '0xd093fa4fb80d09bb30817fdcd442d4d02ed3e5de',\n waDAI: '0x02d60b84491589974263d922d9cc7a3152618ef6',\n },\n [Network.POLYGON]: {\n wamDAI: '0xee029120c72b0607344f35b17cdd90025e647b00',\n wamUSDC: '0x221836a597948dce8f3568e044ff123108acc42a',\n wamUSDT: '0x19c60a251e525fa88cd6f3768416a8024e98fc19',\n },\n};\n\nexport const wrappedTokensMap = {\n [Network.MAINNET]: {\n // USDT\n [yieldTokens[Network.MAINNET].waUSDT]: {\n aToken: '0x3ed3b47dd13ec9a98b44e6204a523e766b225811',\n underlying: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n },\n // USDC\n [yieldTokens[Network.MAINNET].waUSDC]: {\n aToken: '0xbcca60bb61934080951369a648fb03df4f96263c',\n underlying: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n },\n // DAI\n [yieldTokens[Network.MAINNET].waDAI]: {\n aToken: '0x028171bca77440897b824ca71d1c56cac55b68a3',\n underlying: '0x6b175474e89094c44da98b954eedeac495271d0f',\n },\n },\n [Network.POLYGON]: {\n // USDT\n [yieldTokens[Network.POLYGON].wamUSDT]: {\n aToken: '0x60d55f02a771d515e077c9c2403a1ef324885cec',\n underlying: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f',\n },\n // USDC\n [yieldTokens[Network.POLYGON].wamUSDC]: {\n aToken: '0x1a13f4ca1d028320a707d99520abfefca3998b7f',\n underlying: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',\n },\n // DAI\n [yieldTokens[Network.POLYGON].wamDAI]: {\n aToken: '0x27f8d03b3a2196956ed754badc28d73be8830a6e',\n underlying: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063',\n },\n },\n};\n\nconst wrappedATokenInterface = new Interface([\n 'function rate() view returns (uint256)',\n]);\n\nexport interface IAaveRates {\n getRate: (address: string) => Promise;\n}\n\nexport class AaveRates implements IAaveRates {\n rates?: Promise<{ [wrappedATokenAddress: string]: number }>;\n\n constructor(private multicall: Multicall, private network: Network) {}\n\n private async fetch(\n network: Network.MAINNET | Network.POLYGON\n ): Promise<{ [wrappedATokenAddress: string]: number }> {\n console.time('Fetching aave rates');\n const addresses = Object.values(yieldTokens[network]);\n const payload = addresses.map((wrappedATokenAddress) => ({\n target: wrappedATokenAddress,\n callData: wrappedATokenInterface.encodeFunctionData('rate', []),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const rates = addresses.reduce((p: { [key: string]: number }, a, i) => {\n p[a] ||= res[i] == '0x' ? 0 : parseFloat(formatUnits(res[i], 27));\n return p;\n }, {});\n console.timeEnd('Fetching aave rates');\n\n return rates;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async getRate(wrappedAToken: string): Promise {\n //To prevent bricked linear pools from effecting this call\n /*if (this.network != Network.MAINNET && this.network != Network.POLYGON) {\n return 1;\n }\n if (!Object.values(yieldTokens[this.network]).includes(wrappedAToken)) {\n return 1;\n }\n if (!this.rates) {\n this.rates = this.fetch(this.network);\n }\n\n return (await this.rates)[wrappedAToken];*/\n\n return 1;\n }\n}\n","import { Token, TokenPrices, Network } from '@/types';\nimport { TOKENS } from '@/lib/constants/tokens';\nimport { wrappedTokensMap as aaveWrappedMap } from '@/modules/data/token-prices/aave-rates';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\n\nexport function tokensToTokenPrices(tokens: Token[]): TokenPrices {\n const tokenPrices: TokenPrices = {};\n tokens.forEach((token) => {\n if (token.price) {\n tokenPrices[token.address] = token.price;\n }\n });\n\n return tokenPrices;\n}\n\nexport function tokenAddressForPricing(\n address: string,\n chainId: Network\n): string {\n let a = address.toLowerCase();\n a = addressMapIn(a, chainId);\n a = unwrapToken(a, chainId);\n\n return a;\n}\n\n/**\n * Maps testnet tokens, eg: on Göreli to a mainnet one.\n * Used to get the pricing information on networks not supported by a price feed.\n *\n * @param address Address on a testnet network\n */\nexport const addressMapIn = (address: string, chainId: Network): string => {\n const addressMap = TOKENS(chainId).PriceChainMap;\n return (addressMap && addressMap[address.toLowerCase()]) || address;\n};\n\n/**\n * Finds an underlying token address for a wrapped one\n *\n * @param wrappedAddress\n * @param chainId\n * @returns underlying token address\n */\nexport const unwrapToken = (\n wrappedAddress: string,\n chainId: Network\n): string => {\n const lowercase = wrappedAddress.toLocaleLowerCase();\n\n const aaveChain = chainId as keyof typeof aaveWrappedMap;\n if (\n aaveWrappedMap[aaveChain] != undefined &&\n aaveWrappedMap[aaveChain] != null\n ) {\n // Double if to avoid skipping just to at after compile: Object.keys()?.includes\n if (Object.keys(aaveWrappedMap[aaveChain]).includes(lowercase)) {\n return aaveWrappedMap[aaveChain][\n lowercase as keyof (typeof aaveWrappedMap)[typeof aaveChain]\n ].aToken;\n } else {\n return lowercase;\n }\n } else {\n return lowercase;\n }\n};\n\n// filter native asset (e.g. ETH) amounts\nexport const getEthValue = (tokens: string[], amounts: string[]): BigNumber => {\n const values = amounts.filter((amount, i) => tokens[i] === AddressZero);\n return values[0] ? BigNumber.from(values[0]) : BigNumber.from(0);\n};\n","/* eslint-disable @typescript-eslint/no-empty-function */\n\n/**\n * Debouncer for different attributes requested over time, which need to be aggregated into a single resolving call\n *\n * Choosing deferred promise since we have setTimeout that returns a promise\n * Some reference for history buffs: https://github.com/petkaantonov/bluebird/wiki/Promise-anti-patterns\n */\n\ninterface Promised {\n promise: Promise;\n resolve: (value: T) => void;\n reject: (reason: unknown) => void;\n}\n\nconst makePromise = (): Promised => {\n let resolve: (value: T) => void = () => {};\n let reject: (reason: unknown) => void = () => {};\n const promise = new Promise((res, rej) => {\n [resolve, reject] = [res, rej];\n });\n return { promise, reject, resolve };\n};\n\n/**\n * Aggregates attributes and exectutes a debounced call\n *\n * @param fn Function to debounce\n * @param wait Debouncing waiting time [ms]\n * @param limit Maximum number of attributes to execute in one promise\n * @returns Debouncer instance\n */\nexport class Debouncer {\n requestSets = []>[]; // new Set(); // collection of requested attributes\n promisedCalls: Promised[] = []; // When requesting a price we return a deferred promise\n promisedCount = 0; // New request coming when setTimeout is executing will make a new promise\n timeout?: ReturnType;\n debounceCancel = (): void => {}; // Allow to cancel mid-flight requests\n\n constructor(\n private fn: (attrs: A[]) => Promise,\n private wait = 200,\n private limit = 100\n ) {}\n\n fetch(attr?: A): Promise {\n this.requestSets[this.promisedCount] ||= new Set();\n\n // Accumulate attributes for debounced execution\n if (attr) {\n this.requestSets[this.promisedCount].add(attr);\n }\n\n // Execute immediately when limit is reached\n if (this.requestSets[this.promisedCount].size >= this.limit) {\n return this.execute(0);\n }\n\n // Return a running promise\n if (this.promisedCalls[this.promisedCount]) {\n return this.promisedCalls[this.promisedCount].promise;\n }\n\n // If no promise is running, start a new one\n return this.execute(this.wait);\n }\n\n execute(timeout = 0): Promise {\n // if no promise is running, start a new one\n if (!this.promisedCalls[this.promisedCount]) {\n this.promisedCalls[this.promisedCount] = makePromise();\n }\n\n const { promise, resolve, reject } = this.promisedCalls[this.promisedCount];\n\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n\n const call = () => {\n const requestAttrs = [...this.requestSets[this.promisedCount]];\n this.promisedCount++;\n this.fn(requestAttrs)\n .then((results) => {\n resolve(results);\n this.debounceCancel = () => {};\n })\n .catch((reason) => {\n if (\n reason.response &&\n reason.response.data &&\n reason.response.data.error\n ) {\n reason = reason.response.data.error;\n }\n reject(reason);\n });\n };\n\n if (timeout > 0) {\n this.timeout = setTimeout(call.bind(this), timeout);\n } else {\n call();\n }\n\n this.debounceCancel = () => {\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n reject('Cancelled');\n delete this.promisedCalls[this.promisedCount];\n };\n\n return promise;\n }\n}\n","import {\n BigNumber,\n BigNumberish,\n parseFixed as _parseFixed,\n formatFixed as _formatFixed,\n} from '@ethersproject/bignumber';\n\n/**\n * Scales a number up by 10 ^ decimals. Also ensures the returned value is an\n * integer, any additional decimals post scaling are removed.\n * @param value The value to be scaled up\n * @param decimals The total decimal places / order of magnitude to scale by\n * @returns The scaled value\n */\nexport function parseFixed(value: string, decimals?: BigNumberish): BigNumber {\n const valueWithTrimmedDecimals = new RegExp(`[0-9]+\\\\.?[0-9]{0,${decimals}}`);\n const result = value.match(valueWithTrimmedDecimals);\n let parsedValue = value;\n if (result) {\n parsedValue = result[0];\n }\n\n return _parseFixed(parsedValue, decimals);\n}\n\n/**\n * Scales a number down by 10 ^ decimals. Also ensures the returned value doesn't\n * have a .0 at the end, so integers are returned as integers.\n * @param value The value to be scaled down\n * @param decimals The total decimal places / order of magnitude to scale down by\n * @returns The scaled value\n */\nexport function formatFixed(\n value: BigNumberish,\n decimals: BigNumberish\n): string {\n const ethersFormat = _formatFixed(value, decimals);\n return ethersFormat.replace(/(.0$)/, '');\n}\n\nexport function parseToBigInt18(value: string): bigint {\n return parseFixed(value, 18).toBigInt();\n}\n\nexport function formatFromBigInt18(value: bigint): string {\n return _formatFixed(BigNumber.from(value), 18);\n}\n\n/**\n * Like parseEther but for numbers. Converts floating point to BigNumber using 18 decimals\n */\nexport const bn = (value: number): BigNumber => _parseFixed(`${value}`, 18);\n","import { BigNumber } from '@ethersproject/bignumber';\n\nconst bpsPerOne = BigNumber.from('10000'); // number of basis points in 100%\n\n/**\n * Multiplies input by slippage amount\n *\n * @param amount Input amount (not parsed)\n * @param slippage Slippage value in bps - i.e. 50 = 0.5%\n * @returns Result delta from multiplying amount and slippage\n */\nexport const mulSlippage = (\n amount: BigNumber,\n slippage: BigNumber\n): BigNumber => {\n const delta = amount.mul(slippage).div(bpsPerOne);\n return delta;\n};\n\n/**\n * Reduce input amount by slippage factor\n *\n * @param amount Input in EVM amounts\n * @param slippage Slippage value in bps - i.e. 50 = 0.5%\n * @returns Result amount subtracting slippage\n */\nexport const subSlippage = (\n amount: BigNumber,\n slippage: BigNumber\n): BigNumber => {\n const delta = mulSlippage(amount, slippage);\n return amount.sub(delta);\n};\n\n/**\n * Increase input amount by slippage factor\n *\n * @param amount Input in EVM amounts\n * @param slippage Slippage value in bps - i.e. 50 = 0.5%\n * @returns Result amount adding slippage\n */\nexport const addSlippage = (\n amount: BigNumber,\n slippage: BigNumber\n): BigNumber => {\n const delta = mulSlippage(amount, slippage);\n return amount.add(delta);\n};\n","import { Address, PoolType } from '@/types';\nimport { getAddress } from '@ethersproject/address';\nimport { Log, TransactionReceipt } from '@ethersproject/providers';\nimport { Interface, LogDescription } from '@ethersproject/abi';\nimport { Logger } from '@/lib/utils/logger';\n\nexport * from './assetHelpers';\nexport * from './errors';\nexport * from './permit';\nexport * from './poolHelper';\nexport * from './signatures';\nexport * from './tokens';\nexport * from './debouncer';\nexport * from './math';\nexport * from './slippageHelper';\n\nexport const isSameAddress = (address1: string, address2: string): boolean =>\n getAddress(address1) === getAddress(address2);\n\nexport function insert(arr: T[], index: number, newItem: T): T[] {\n if (index < 0 || index > arr.length) {\n return arr;\n }\n return [\n // part of the array before the specified index\n ...arr.slice(0, index),\n // inserted item\n newItem,\n // part of the array after the specified index\n ...arr.slice(index),\n ];\n}\n\n/**\n * Returns a new array with item on the specified index replaced by newItem\n * @param arr\n * @param index\n * @param newItem\n */\nexport function replace(arr: T[], index: number, newItem: T): T[] {\n if (index < 0 || index >= arr.length) {\n return arr;\n }\n return [\n // part of the array before the specified index\n ...arr.slice(0, index),\n // inserted item\n newItem,\n // part of the array after the specified index\n ...arr.slice(index + 1),\n ];\n}\n\n/**\n * Removes item from array at specified index and returns new array. (Does not mutate original)\n * @param arr Original array\n * @param index Index of item to be removed\n * @returns New array with item at index removed\n */\nexport function removeItem(arr: T[], index: number): T[] {\n const newArray = [...arr];\n if (index < 0 || index >= arr.length) {\n return newArray;\n }\n newArray.splice(index, 1);\n return newArray;\n}\n\n/**\n * REORDER ARRAYS USING A REFERENCE AND ORIGINAL ARRAY,\n * Example:\n * Input -> reference: [c,b,a], original: [a,b,c], others: [[1,2,3], [4,5,6]]\n * Sorts like -> [[c,b,a],[3,2,1],[6,5,4]]\n * Returns -> [6,5,4]\n * @param reference\n * @param original\n * @param others\n * @returns Sorted others\n */\nexport function reorderArrays(\n reference: T[],\n original: T[],\n ...others: unknown[][]\n): unknown[][] {\n if (\n reference.length !== original.length ||\n others.some((arr) => arr.length !== original.length)\n ) {\n throw new Error('Array length mismatch');\n }\n const indexesOfOriginal = reference.map((value) => original.indexOf(value));\n if (indexesOfOriginal.indexOf(-1) >= 0) {\n throw new Error('Invalid reference or original array');\n }\n const othersResorted: unknown[][] = [];\n indexesOfOriginal.forEach((indexOfOriginal, i) => {\n others.forEach((arr, arrIndex) => {\n if (!othersResorted[arrIndex]) {\n othersResorted[arrIndex] = [];\n }\n othersResorted[arrIndex][i] = arr[indexOfOriginal];\n });\n });\n return othersResorted;\n}\n\nexport function isLinearish(poolType: string): boolean {\n const supportedPoolTypes: string[] = Object.values(PoolType);\n if (poolType.includes('Linear') && supportedPoolTypes.includes(poolType))\n return true;\n else return false;\n}\n\nexport function truncateAddresses(addresses: string[]): string[] {\n return addresses.map((t) => `${t.slice(0, 6)}...${t.slice(38, 42)}`);\n}\n\nexport const findEventInReceiptLogs = ({\n receipt,\n to,\n contractInterface,\n logName,\n}: {\n receipt: TransactionReceipt;\n to: Address;\n contractInterface: Interface;\n logName: string;\n}): LogDescription => {\n const event = receipt.logs\n .filter((log: Log) => {\n return isSameAddress(log.address, to);\n })\n .map((log) => {\n try {\n return contractInterface.parseLog(log);\n } catch (error) {\n const logger = Logger.getInstance();\n logger.warn(error as string);\n return null;\n }\n })\n .find((parsedLog) => parsedLog?.name === logName);\n if (!event) {\n throw new Error('Event not found in logs');\n }\n return event;\n};\n\nexport const getRandomBytes32 = (): string => {\n const getRandomBytes8 = () => Math.random().toString(16).slice(2, 10);\n const randomBytes32 = Array(8).fill(null).map(getRandomBytes8).join('');\n return `0x${randomBytes32}`;\n};\n","import { GraphQLArgs, GraphQLArgsFormatter } from '../types';\n\nexport class BalancerAPIArgsFormatter implements GraphQLArgsFormatter {\n format(args: GraphQLArgs): GraphQLArgs {\n return args;\n }\n}\n","import { GraphQLArgs, GraphQLArgsFormatter, GraphQLFilter } from '../types';\n\nexport class SubgraphArgsFormatter implements GraphQLArgsFormatter {\n operatorMap: Record;\n\n constructor() {\n this.operatorMap = {\n gt: '_gt',\n lt: '_lt',\n eq: '',\n in: '_in',\n not_in: '_not_in',\n contains: '_contains',\n };\n }\n\n format(args: GraphQLArgs): GraphQLArgs {\n const whereQuery: Record = {};\n if (args.where) {\n Object.entries(args.where).forEach(([name, filter]) => {\n Object.entries(filter).forEach(([operator, value]) => {\n whereQuery[`${name}${this.operatorMap[operator]}`] = value;\n });\n });\n }\n\n return {\n ...args,\n ...{ where: whereQuery },\n };\n }\n}\n","import { mergeWith } from 'lodash';\nimport { GraphQLArgs, GraphQLArgsFormatter } from './types';\n\nexport * from './formatters';\n\nexport class GraphQLArgsBuilder {\n constructor(readonly args: GraphQLArgs) {}\n\n merge(other: GraphQLArgsBuilder): GraphQLArgsBuilder {\n const mergedArgs = mergeWith(\n this.args,\n other.args,\n (objValue: unknown, srcValue: unknown) => {\n if (Array.isArray(objValue)) {\n return objValue.concat(srcValue);\n }\n }\n );\n\n return new GraphQLArgsBuilder(mergedArgs);\n }\n\n format(formatter: GraphQLArgsFormatter): unknown {\n return formatter.format(this.args);\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n AaveLinearPool,\n AaveLinearPoolInterface,\n} from \"../AaveLinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct AaveLinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class AaveLinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): AaveLinearPoolInterface {\n return new utils.Interface(_abi) as AaveLinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): AaveLinearPool {\n return new Contract(address, _abi, signerOrProvider) as AaveLinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n AaveLinearPoolFactory,\n AaveLinearPoolFactoryInterface,\n} from \"../AaveLinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"AaveLinearPoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract AaveLinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class AaveLinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): AaveLinearPoolFactoryInterface {\n return new utils.Interface(_abi) as AaveLinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): AaveLinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as AaveLinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { AaveWrapping, AaveWrappingInterface } from \"../AaveWrapping\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approveVault\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStaticATokenLM\",\n name: \"staticToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"toUnderlying\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapAaveStaticToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStaticATokenLM\",\n name: \"staticToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"fromUnderlying\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapAaveDynamicToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n] as const;\n\nexport class AaveWrapping__factory {\n static readonly abi = _abi;\n static createInterface(): AaveWrappingInterface {\n return new utils.Interface(_abi) as AaveWrappingInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): AaveWrapping {\n return new Contract(address, _abi, signerOrProvider) as AaveWrapping;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { Authoriser, AuthoriserInterface } from \"../Authoriser\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"admin\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"previousAdminRole\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"newAdminRole\",\n type: \"bytes32\",\n },\n ],\n name: \"RoleAdminChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n ],\n name: \"RoleGranted\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n ],\n name: \"RoleRevoked\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DEFAULT_ADMIN_ROLE\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"actionId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n name: \"canPerform\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n ],\n name: \"getRoleAdmin\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\",\n },\n ],\n name: \"getRoleMember\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n ],\n name: \"getRoleMemberCount\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"grantRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"roles\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"grantRoles\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"roles\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"address[]\",\n name: \"accounts\",\n type: \"address[]\",\n },\n ],\n name: \"grantRolesToMany\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"hasRole\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"renounceRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"role\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"revokeRole\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"roles\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"revokeRoles\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"roles\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"address[]\",\n name: \"accounts\",\n type: \"address[]\",\n },\n ],\n name: \"revokeRolesFromMany\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class Authoriser__factory {\n static readonly abi = _abi;\n static createInterface(): AuthoriserInterface {\n return new utils.Interface(_abi) as AuthoriserInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): Authoriser {\n return new Contract(address, _abi, signerOrProvider) as Authoriser;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BalancerHelpers,\n BalancerHelpersInterface,\n} from \"../BalancerHelpers\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"_vault\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"minAmountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.ExitPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"maxAmountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.JoinPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"vault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class BalancerHelpers__factory {\n static readonly abi = _abi;\n static createInterface(): BalancerHelpersInterface {\n return new utils.Interface(_abi) as BalancerHelpersInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BalancerHelpers {\n return new Contract(address, _abi, signerOrProvider) as BalancerHelpers;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BalancerMinter,\n BalancerMinterInterface,\n} from \"../BalancerMinter\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IBalancerTokenAdmin\",\n name: \"tokenAdmin\",\n type: \"address\",\n },\n {\n internalType: \"contract IGaugeController\",\n name: \"gaugeController\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"minted\",\n type: \"uint256\",\n },\n ],\n name: \"Minted\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"approval\",\n type: \"bool\",\n },\n ],\n name: \"MinterApprovalSet\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"allowed_to_mint_for\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBalancerToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBalancerTokenAdmin\",\n outputs: [\n {\n internalType: \"contract IBalancerTokenAdmin\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getGaugeController\",\n outputs: [\n {\n internalType: \"contract IGaugeController\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"getMinterApproval\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n ],\n name: \"mint\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"mintFor\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n ],\n name: \"mintMany\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"mintManyFor\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"mint_for\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[8]\",\n name: \"gauges\",\n type: \"address[8]\",\n },\n ],\n name: \"mint_many\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"gauge\",\n type: \"address\",\n },\n ],\n name: \"minted\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"approval\",\n type: \"bool\",\n },\n ],\n name: \"setMinterApproval\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"approval\",\n type: \"bool\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"setMinterApprovalWithSignature\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"minter\",\n type: \"address\",\n },\n ],\n name: \"toggle_approve_mint\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class BalancerMinter__factory {\n static readonly abi = _abi;\n static createInterface(): BalancerMinterInterface {\n return new utils.Interface(_abi) as BalancerMinterInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BalancerMinter {\n return new Contract(address, _abi, signerOrProvider) as BalancerMinter;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BalancerPoolDataQueries,\n BalancerPoolDataQueriesInterface,\n} from \"../BalancerPoolDataQueries\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"_vault\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getAmpForPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getInRecoveryModeForPools\",\n outputs: [\n {\n internalType: \"bool[]\",\n name: \"\",\n type: \"bool[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getIsPausedForPools\",\n outputs: [\n {\n internalType: \"bool[]\",\n name: \"\",\n type: \"bool[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getLinearTargetsForPools\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"\",\n type: \"uint256[][]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getNormalizedWeightsForPools\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"\",\n type: \"uint256[][]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"poolIds\",\n type: \"bytes32[]\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"loadTokenBalanceUpdatesAfterBlock\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadTotalSupply\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadSwapFees\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadLinearWrappedTokenRates\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadLinearTargets\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadNormalizedWeights\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadScalingFactors\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadAmps\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadRates\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n internalType: \"enum TotalSupplyType[]\",\n name: \"totalSupplyTypes\",\n type: \"uint8[]\",\n },\n {\n internalType: \"enum SwapFeeType[]\",\n name: \"swapFeeTypes\",\n type: \"uint8[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"linearPoolIdxs\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"weightedPoolIdxs\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"scalingFactorPoolIdxs\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"ampPoolIdxs\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"ratePoolIdxs\",\n type: \"uint256[]\",\n },\n ],\n internalType: \"struct PoolDataQueryConfig\",\n name: \"config\",\n type: \"tuple\",\n },\n ],\n name: \"getPoolData\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"balances\",\n type: \"uint256[][]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"totalSupplies\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"swapFees\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"linearWrappedTokenRates\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[][]\",\n name: \"linearTargets\",\n type: \"uint256[][]\",\n },\n {\n internalType: \"uint256[][]\",\n name: \"weights\",\n type: \"uint256[][]\",\n },\n {\n internalType: \"uint256[][]\",\n name: \"scalingFactors\",\n type: \"uint256[][]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amps\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"rates\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"ignoreIdxs\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"poolIds\",\n type: \"bytes32[]\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"loadInRecoveryMode\",\n type: \"bool\",\n },\n {\n internalType: \"bool\",\n name: \"loadIsPaused\",\n type: \"bool\",\n },\n ],\n internalType: \"struct PoolStatusQueryConfig\",\n name: \"config\",\n type: \"tuple\",\n },\n ],\n name: \"getPoolStatus\",\n outputs: [\n {\n internalType: \"bool[]\",\n name: \"isPaused\",\n type: \"bool[]\",\n },\n {\n internalType: \"bool[]\",\n name: \"inRecoveryMode\",\n type: \"bool[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32[]\",\n name: \"poolIds\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n ],\n name: \"getPoolTokenBalancesWithUpdatesAfterBlock\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"\",\n type: \"uint256[][]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getRateForPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getScalingFactorsForPools\",\n outputs: [\n {\n internalType: \"uint256[][]\",\n name: \"\",\n type: \"uint256[][]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n {\n internalType: \"enum SwapFeeType[]\",\n name: \"swapFeeTypes\",\n type: \"uint8[]\",\n },\n ],\n name: \"getSwapFeePercentageForPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n {\n internalType: \"enum TotalSupplyType[]\",\n name: \"totalSupplyTypes\",\n type: \"uint8[]\",\n },\n ],\n name: \"getTotalSupplyForPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"poolAddresses\",\n type: \"address[]\",\n },\n ],\n name: \"getWrappedTokenRateForLinearPools\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"vault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class BalancerPoolDataQueries__factory {\n static readonly abi = _abi;\n static createInterface(): BalancerPoolDataQueriesInterface {\n return new utils.Interface(_abi) as BalancerPoolDataQueriesInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BalancerPoolDataQueries {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as BalancerPoolDataQueries;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BalancerRelayer,\n BalancerRelayerInterface,\n} from \"../BalancerRelayer\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"libraryAddress\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [],\n name: \"getLibrary\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes[]\",\n name: \"data\",\n type: \"bytes[]\",\n },\n ],\n name: \"multicall\",\n outputs: [\n {\n internalType: \"bytes[]\",\n name: \"results\",\n type: \"bytes[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n stateMutability: \"payable\",\n type: \"receive\",\n },\n] as const;\n\nexport class BalancerRelayer__factory {\n static readonly abi = _abi;\n static createInterface(): BalancerRelayerInterface {\n return new utils.Interface(_abi) as BalancerRelayerInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BalancerRelayer {\n return new Contract(address, _abi, signerOrProvider) as BalancerRelayer;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n BatchRelayerLibrary,\n BatchRelayerLibraryInterface,\n} from \"../BatchRelayerLibrary\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wstETH\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerMinter\",\n name: \"minter\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approveVault\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"assetInIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"assetOutIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.BatchSwapStep[]\",\n name: \"swaps\",\n type: \"tuple[]\",\n },\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"int256[]\",\n name: \"limits\",\n type: \"int256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"key\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct VaultActions.OutputReference[]\",\n name: \"outputReferences\",\n type: \"tuple[]\",\n },\n ],\n name: \"batchSwap\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum VaultActions.PoolKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"minAmountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.ExitPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"key\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct VaultActions.OutputReference[]\",\n name: \"outputReferences\",\n type: \"tuple[]\",\n },\n ],\n name: \"exitPool\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStakingLiquidityGauge[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n ],\n name: \"gaugeClaimRewards\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStakingLiquidityGauge\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"gaugeDeposit\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"gaugeMint\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"approval\",\n type: \"bool\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"gaugeSetMinterApproval\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStakingLiquidityGauge\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"gaugeWithdraw\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getEntrypoint\",\n outputs: [\n {\n internalType: \"contract IBalancerRelayer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum VaultActions.PoolKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"maxAmountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.JoinPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"joinPool\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.UserBalanceOpKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"asset\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n ],\n internalType: \"struct IVault.UserBalanceOp[]\",\n name: \"ops\",\n type: \"tuple[]\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"manageUserBalance\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"ref\",\n type: \"uint256\",\n },\n ],\n name: \"peekChainedReferenceValue\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"relayer\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"authorisation\",\n type: \"bytes\",\n },\n ],\n name: \"setRelayerApproval\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"stakeETH\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"stakeETHAndWrap\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.SingleSwap\",\n name: \"singleSwap\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"limit\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"swap\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStaticATokenLM\",\n name: \"staticToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"toUnderlying\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapAaveStaticToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract ICToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapCompoundV2\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC4626\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapERC4626\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IEulerToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapEuler\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IGearboxDieselToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"dieselAmount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapGearbox\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IReaperTokenVault\",\n name: \"vaultToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapReaperVaultToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IShareToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapShareToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract ITetuSmartVault\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapTetu\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IUnbuttonToken\",\n name: \"wrapperToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapUnbuttonToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapWstETH\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IYearnTokenVault\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"unwrapYearn\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20Permit\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"vaultPermit\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20PermitDAI\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"holder\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"expiry\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"allowed\",\n type: \"bool\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"vaultPermitDAI\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IStaticATokenLM\",\n name: \"staticToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"fromUnderlying\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapAaveDynamicToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract ICToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapCompoundV2\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC4626\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapERC4626\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IEulerToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"eulerProtocol\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapEuler\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IGearboxDieselToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"mainAmount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapGearbox\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IReaperTokenVault\",\n name: \"vaultToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapReaperVaultToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IShareToken\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapShareToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapStETH\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract ITetuSmartVault\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapTetu\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IUnbuttonToken\",\n name: \"wrapperToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"uAmount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapUnbuttonToken\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IYearnTokenVault\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"outputReference\",\n type: \"uint256\",\n },\n ],\n name: \"wrapYearn\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n] as const;\n\nexport class BatchRelayerLibrary__factory {\n static readonly abi = _abi;\n static createInterface(): BatchRelayerLibraryInterface {\n return new utils.Interface(_abi) as BatchRelayerLibraryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): BatchRelayerLibrary {\n return new Contract(address, _abi, signerOrProvider) as BatchRelayerLibrary;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ComposableStablePool,\n ComposableStablePoolInterface,\n} from \"../ComposableStablePool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"tokenRateCacheDurations\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bool[]\",\n name: \"exemptFromYieldProtocolFeeFlags\",\n type: \"bool[]\",\n },\n {\n internalType: \"uint256\",\n name: \"amplificationParameter\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n internalType: \"struct ComposableStablePool.NewPoolParams\",\n name: \"params\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"startValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"endValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"startTime\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"endTime\",\n type: \"uint256\",\n },\n ],\n name: \"AmpUpdateStarted\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"currentValue\",\n type: \"uint256\",\n },\n ],\n name: \"AmpUpdateStopped\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"feeType\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"protocolFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"ProtocolFeePercentageCacheUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenIndex\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"rate\",\n type: \"uint256\",\n },\n ],\n name: \"TokenRateCacheUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"tokenIndex\",\n type: \"uint256\",\n },\n {\n indexed: true,\n internalType: \"contract IRateProvider\",\n name: \"provider\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"cacheDuration\",\n type: \"uint256\",\n },\n ],\n name: \"TokenRateProviderSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getActualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAmplificationParameter\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"isUpdating\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"precision\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastJoinExitData\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lastJoinExitAmplification\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"lastPostJoinExitInvariant\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMinimumBpt\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"feeType\",\n type: \"uint256\",\n },\n ],\n name: \"getProtocolFeePercentageCache\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolSwapFeeDelegation\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRateProviders\",\n outputs: [\n {\n internalType: \"contract IRateProvider[]\",\n name: \"\",\n type: \"address[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"getTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"getTokenRateCache\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"rate\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"oldRate\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"duration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"expires\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"isTokenExemptFromYieldProtocolFee\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"swapRequest\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"poolConfig\",\n type: \"bytes\",\n },\n ],\n name: \"setAssetManagerPoolConfig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"duration\",\n type: \"uint256\",\n },\n ],\n name: \"setTokenRateCacheDuration\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"rawEndValue\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"endTime\",\n type: \"uint256\",\n },\n ],\n name: \"startAmplificationParameterUpdate\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"stopAmplificationParameterUpdate\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"updateProtocolFeePercentageCache\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"updateTokenRateCache\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class ComposableStablePool__factory {\n static readonly abi = _abi;\n static createInterface(): ComposableStablePoolInterface {\n return new utils.Interface(_abi) as ComposableStablePoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ComposableStablePool {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as ComposableStablePool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ComposableStablePoolFactory,\n ComposableStablePoolFactoryInterface,\n} from \"../ComposableStablePoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"amplificationParameter\",\n type: \"uint256\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"tokenRateCacheDurations\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bool[]\",\n name: \"exemptFromYieldProtocolFeeFlags\",\n type: \"bool[]\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract ComposableStablePool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class ComposableStablePoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): ComposableStablePoolFactoryInterface {\n return new utils.Interface(_abi) as ComposableStablePoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ComposableStablePoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as ComposableStablePoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ConvergentCurvePool,\n ConvergentCurvePoolInterface,\n} from \"../ConvergentCurvePool\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"_underlying\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"_bond\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"_expiration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_unitSeconds\",\n type: \"uint256\",\n },\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"_percentFee\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_percentFeeGov\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"_governance\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"collectedBase\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"collectedBond\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"remainingBase\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"remainingBond\",\n type: \"uint256\",\n },\n ],\n name: \"FeeCollection\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"FEE_BOUND\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"bond\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"bondDecimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseApproval\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"expiration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"feesBond\",\n outputs: [\n {\n internalType: \"uint128\",\n name: \"\",\n type: \"uint128\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"feesUnderlying\",\n outputs: [\n {\n internalType: \"uint128\",\n name: \"\",\n type: \"uint128\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"governance\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"increaseApproval\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"currentBalances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFee\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"currentBalances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFee\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"swapRequest\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"currentBalanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"currentBalanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"percentFee\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"percentFeeGov\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"amountX\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"reserveX\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"reserveY\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"out\",\n type: \"bool\",\n },\n ],\n name: \"solveTradeInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"underlying\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"underlyingDecimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unitSeconds\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class ConvergentCurvePool__factory {\n static readonly abi = _abi;\n static createInterface(): ConvergentCurvePoolInterface {\n return new utils.Interface(_abi) as ConvergentCurvePoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ConvergentCurvePool {\n return new Contract(address, _abi, signerOrProvider) as ConvergentCurvePool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { ERC20, ERC20Interface } from \"../ERC20\";\n\nconst _abi = [\n {\n constant: true,\n inputs: [],\n name: \"name\",\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_from\",\n type: \"address\",\n },\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n name: \"\",\n type: \"uint8\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n name: \"balance\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n constant: false,\n inputs: [\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n constant: true,\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n },\n {\n name: \"_spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n payable: true,\n stateMutability: \"payable\",\n type: \"fallback\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n] as const;\n\nexport class ERC20__factory {\n static readonly abi = _abi;\n static createInterface(): ERC20Interface {\n return new utils.Interface(_abi) as ERC20Interface;\n }\n static connect(address: string, signerOrProvider: Signer | Provider): ERC20 {\n return new Contract(address, _abi, signerOrProvider) as ERC20;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ERC4626LinearPool,\n ERC4626LinearPoolInterface,\n} from \"../ERC4626LinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct ERC4626LinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class ERC4626LinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): ERC4626LinearPoolInterface {\n return new utils.Interface(_abi) as ERC4626LinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ERC4626LinearPool {\n return new Contract(address, _abi, signerOrProvider) as ERC4626LinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n ERC4626LinearPoolFactory,\n ERC4626LinearPoolFactoryInterface,\n} from \"../ERC4626LinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"Erc4626LinearPoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract LinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class ERC4626LinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): ERC4626LinearPoolFactoryInterface {\n return new utils.Interface(_abi) as ERC4626LinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): ERC4626LinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as ERC4626LinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n EulerLinearPool,\n EulerLinearPoolInterface,\n} from \"../EulerLinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct EulerLinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class EulerLinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): EulerLinearPoolInterface {\n return new utils.Interface(_abi) as EulerLinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): EulerLinearPool {\n return new Contract(address, _abi, signerOrProvider) as EulerLinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n EulerLinearPoolFactory,\n EulerLinearPoolFactoryInterface,\n} from \"../EulerLinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"_eulerProtocol\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"EulerLinearPoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract LinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"eulerProtocol\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class EulerLinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): EulerLinearPoolFactoryInterface {\n return new utils.Interface(_abi) as EulerLinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): EulerLinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as EulerLinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { FXPool, FXPoolInterface } from \"../FXPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"_assetsToRegister\",\n type: \"address[]\",\n },\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"_protocolPercentFee\",\n type: \"uint256\",\n },\n {\n internalType: \"string\",\n name: \"_name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"_symbol\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"numeraire\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"reserve\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"weight\",\n type: \"uint256\",\n },\n ],\n name: \"AssetIncluded\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"derivative\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"numeraire\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"reserve\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"assimilator\",\n type: \"address\",\n },\n ],\n name: \"AssimilatorIncluded\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"newCollector\",\n type: \"address\",\n },\n ],\n name: \"ChangeCollectorAddress\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"isEmergency\",\n type: \"bool\",\n },\n ],\n name: \"EmergencyAlarm\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lptAmountBurned\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"amountsWithdrawn\",\n type: \"uint256[]\",\n },\n ],\n name: \"EmergencyWithdraw\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"feesCollected\",\n type: \"uint256\",\n },\n ],\n name: \"FeesAccrued\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"feesCollected\",\n type: \"uint256\",\n },\n ],\n name: \"FeesCollected\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lptAmountBurned\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"amountsWithdrawn\",\n type: \"uint256[]\",\n },\n ],\n name: \"OnExitPool\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lptAmountMinted\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"amountsDeposited\",\n type: \"uint256[]\",\n },\n ],\n name: \"OnJoinPool\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"previousOwner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\",\n },\n ],\n name: \"OwnershipTransferred\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"alpha\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"beta\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"delta\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"epsilon\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lambda\",\n type: \"uint256\",\n },\n ],\n name: \"ParametersSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"Paused\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"updater\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newProtocolPercentage\",\n type: \"uint256\",\n },\n ],\n name: \"ProtocolFeeShareUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"trader\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"origin\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"originAmount\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"targetAmount\",\n type: \"uint256\",\n },\n ],\n name: \"Trade\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"Unpaused\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_derivative\",\n type: \"address\",\n },\n ],\n name: \"assimilator\",\n outputs: [\n {\n internalType: \"address\",\n name: \"assimilator_\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"collectorAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"curve\",\n outputs: [\n {\n internalType: \"int128\",\n name: \"alpha\",\n type: \"int128\",\n },\n {\n internalType: \"int128\",\n name: \"beta\",\n type: \"int128\",\n },\n {\n internalType: \"int128\",\n name: \"delta\",\n type: \"int128\",\n },\n {\n internalType: \"int128\",\n name: \"epsilon\",\n type: \"int128\",\n },\n {\n internalType: \"int128\",\n name: \"lambda\",\n type: \"int128\",\n },\n {\n internalType: \"uint256\",\n name: \"cap\",\n type: \"uint256\",\n },\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"fxPoolAddress\",\n type: \"address\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n name: \"derivatives\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"emergency\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address[]\",\n name: \"_assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"_assetWeights\",\n type: \"uint256[]\",\n },\n ],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"liquidity\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"total_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"individual_\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n name: \"numeraires\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"swapRequest\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"owner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"paused\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"protocolPercentFee\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"renounceOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n name: \"reserves\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_cap\",\n type: \"uint256\",\n },\n ],\n name: \"setCap\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_collectorAddress\",\n type: \"address\",\n },\n ],\n name: \"setCollectorAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"_emergency\",\n type: \"bool\",\n },\n ],\n name: \"setEmergency\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_alpha\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_beta\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_feeAtHalt\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_epsilon\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_lambda\",\n type: \"uint256\",\n },\n ],\n name: \"setParams\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_protocolPercentFee\",\n type: \"uint256\",\n },\n ],\n name: \"setProtocolPercentFee\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalUnclaimedFeesInNumeraire\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newOwner\",\n type: \"address\",\n },\n ],\n name: \"transferOwnership\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"totalDepositNumeraire\",\n type: \"uint256\",\n },\n ],\n name: \"viewDeposit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"viewParameters\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"alpha_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"beta_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"delta_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"epsilon_\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"lambda_\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_curvesToBurn\",\n type: \"uint256\",\n },\n ],\n name: \"viewWithdraw\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class FXPool__factory {\n static readonly abi = _abi;\n static createInterface(): FXPoolInterface {\n return new utils.Interface(_abi) as FXPoolInterface;\n }\n static connect(address: string, signerOrProvider: Signer | Provider): FXPool {\n return new Contract(address, _abi, signerOrProvider) as FXPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n GaugeClaimHelper,\n GaugeClaimHelperInterface,\n} from \"../GaugeClaimHelper\";\n\nconst _abi = [\n {\n inputs: [],\n name: \"CLAIM_FREQUENCY\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IRewardsOnlyGauge\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"claimRewardsFromGauge\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IRewardsOnlyGauge[]\",\n name: \"gauges\",\n type: \"address[]\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"claimRewardsFromGauges\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IRewardsOnlyGauge\",\n name: \"gauge\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"getPendingRewards\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class GaugeClaimHelper__factory {\n static readonly abi = _abi;\n static createInterface(): GaugeClaimHelperInterface {\n return new utils.Interface(_abi) as GaugeClaimHelperInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GaugeClaimHelper {\n return new Contract(address, _abi, signerOrProvider) as GaugeClaimHelper;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n GearboxLinearPool,\n GearboxLinearPoolInterface,\n} from \"../GearboxLinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct GearboxLinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class GearboxLinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): GearboxLinearPoolInterface {\n return new utils.Interface(_abi) as GearboxLinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GearboxLinearPool {\n return new Contract(address, _abi, signerOrProvider) as GearboxLinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n GearboxLinearPoolFactory,\n GearboxLinearPoolFactoryInterface,\n} from \"../GearboxLinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"GearboxLinearPoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract GearboxLinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class GearboxLinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): GearboxLinearPoolFactoryInterface {\n return new utils.Interface(_abi) as GearboxLinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GearboxLinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as GearboxLinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { GyroConfig, GyroConfigInterface } from \"../GyroConfig\";\n\nconst _abi = [\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"previousValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newValue\",\n type: \"uint256\",\n },\n ],\n name: \"ConfigChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"ConfigFrozen\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"ConfigUnset\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"newGovernor\",\n type: \"address\",\n },\n ],\n name: \"GovernorChangeRequested\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"oldGovernor\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"newGovernor\",\n type: \"address\",\n },\n ],\n name: \"GovernorChanged\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"acceptGovernance\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"newGovernor\",\n type: \"address\",\n },\n ],\n name: \"changeGovernor\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"freeze\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"defaultValue\",\n type: \"address\",\n },\n ],\n name: \"getAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"getAddress\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"getConfigMeta\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"getUint\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"governor\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"hasKey\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_governor\",\n type: \"address\",\n },\n ],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"listKeys\",\n outputs: [\n {\n internalType: \"bytes32[]\",\n name: \"\",\n type: \"bytes32[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pendingGovernor\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"newValue\",\n type: \"address\",\n },\n ],\n name: \"setAddress\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"newValue\",\n type: \"uint256\",\n },\n ],\n name: \"setUint\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"key\",\n type: \"bytes32\",\n },\n ],\n name: \"unset\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class GyroConfig__factory {\n static readonly abi = _abi;\n static createInterface(): GyroConfigInterface {\n return new utils.Interface(_abi) as GyroConfigInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GyroConfig {\n return new Contract(address, _abi, signerOrProvider) as GyroConfig;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { LidoRelayer, LidoRelayerInterface } from \"../LidoRelayer\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IwstETH\",\n name: \"wstETH\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"assetInIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"assetOutIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.BatchSwapStep[]\",\n name: \"swaps\",\n type: \"tuple[]\",\n },\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"int256[]\",\n name: \"limits\",\n type: \"int256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n ],\n name: \"batchSwap\",\n outputs: [\n {\n internalType: \"int256[]\",\n name: \"swapAmounts\",\n type: \"int256[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"minAmountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.ExitPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"exitPool\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getStETH\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWstETH\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"maxAmountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.JoinPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"joinPool\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.SingleSwap\",\n name: \"singleSwap\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"limit\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n ],\n name: \"swap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"swapAmount\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n stateMutability: \"payable\",\n type: \"receive\",\n },\n] as const;\n\nexport class LidoRelayer__factory {\n static readonly abi = _abi;\n static createInterface(): LidoRelayerInterface {\n return new utils.Interface(_abi) as LidoRelayerInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): LidoRelayer {\n return new Contract(address, _abi, signerOrProvider) as LidoRelayer;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { LinearPool, LinearPoolInterface } from \"../LinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"poolConfig\",\n type: \"bytes\",\n },\n ],\n name: \"setAssetManagerPoolConfig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class LinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): LinearPoolInterface {\n return new utils.Interface(_abi) as LinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): LinearPool {\n return new Contract(address, _abi, signerOrProvider) as LinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n LiquidityGaugeV5,\n LiquidityGaugeV5Interface,\n} from \"../LiquidityGaugeV5\";\n\nconst _abi = [\n {\n name: \"Deposit\",\n inputs: [\n {\n name: \"provider\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Withdraw\",\n inputs: [\n {\n name: \"provider\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"UpdateLiquidityLimit\",\n inputs: [\n {\n name: \"user\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"original_balance\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"original_supply\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"working_balance\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"working_supply\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Transfer\",\n inputs: [\n {\n name: \"_from\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"_to\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"_value\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Approval\",\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"_spender\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"_value\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n inputs: [\n {\n name: \"minter\",\n type: \"address\",\n },\n {\n name: \"veBoostProxy\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_addr\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_claim_rewards\",\n type: \"bool\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"withdraw\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_claim_rewards\",\n type: \"bool\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"claim_rewards\",\n inputs: [],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"claim_rewards\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"claim_rewards\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_receiver\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"transferFrom\",\n inputs: [\n {\n name: \"_from\",\n type: \"address\",\n },\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"transfer\",\n inputs: [\n {\n name: \"_to\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"approve\",\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"permit\",\n inputs: [\n {\n name: \"_owner\",\n type: \"address\",\n },\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_deadline\",\n type: \"uint256\",\n },\n {\n name: \"_v\",\n type: \"uint8\",\n },\n {\n name: \"_r\",\n type: \"bytes32\",\n },\n {\n name: \"_s\",\n type: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"increaseAllowance\",\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_added_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"decreaseAllowance\",\n inputs: [\n {\n name: \"_spender\",\n type: \"address\",\n },\n {\n name: \"_subtracted_value\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"user_checkpoint\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"set_rewards_receiver\",\n inputs: [\n {\n name: \"_receiver\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"kick\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit_reward_token\",\n inputs: [\n {\n name: \"_reward_token\",\n type: \"address\",\n },\n {\n name: \"_amount\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"add_reward\",\n inputs: [\n {\n name: \"_reward_token\",\n type: \"address\",\n },\n {\n name: \"_distributor\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"set_reward_distributor\",\n inputs: [\n {\n name: \"_reward_token\",\n type: \"address\",\n },\n {\n name: \"_distributor\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"set_killed\",\n inputs: [\n {\n name: \"_is_killed\",\n type: \"bool\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"claimed_reward\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_token\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"claimable_reward\",\n inputs: [\n {\n name: \"_user\",\n type: \"address\",\n },\n {\n name: \"_reward_token\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"claimable_reward_write\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_token\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"claimable_tokens\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_checkpoint\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"future_epoch_time\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"inflation_rate\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"decimals\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"version\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"allowance\",\n inputs: [\n {\n name: \"owner\",\n type: \"address\",\n },\n {\n name: \"spender\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"initialize\",\n inputs: [\n {\n name: \"_lp_token\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"balanceOf\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"totalSupply\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"name\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"symbol\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"DOMAIN_SEPARATOR\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"nonces\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"factory\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"lp_token\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"is_killed\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"bool\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"reward_count\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"reward_data\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n components: [\n {\n name: \"token\",\n type: \"address\",\n },\n {\n name: \"distributor\",\n type: \"address\",\n },\n {\n name: \"period_finish\",\n type: \"uint256\",\n },\n {\n name: \"rate\",\n type: \"uint256\",\n },\n {\n name: \"last_update\",\n type: \"uint256\",\n },\n {\n name: \"integral\",\n type: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"rewards_receiver\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"reward_integral_for\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n {\n name: \"arg1\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"working_balances\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"working_supply\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_inv_supply_of\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_checkpoint_of\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_fraction\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"period\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"int128\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"reward_tokens\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"period_timestamp\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"integrate_inv_supply\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n] as const;\n\nexport class LiquidityGaugeV5__factory {\n static readonly abi = _abi;\n static createInterface(): LiquidityGaugeV5Interface {\n return new utils.Interface(_abi) as LiquidityGaugeV5Interface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): LiquidityGaugeV5 {\n return new Contract(address, _abi, signerOrProvider) as LiquidityGaugeV5;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { Multicall, MulticallInterface } from \"../Multicall\";\n\nconst _abi = [\n {\n constant: false,\n inputs: [\n {\n components: [\n {\n name: \"target\",\n type: \"address\",\n },\n {\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate\",\n outputs: [\n {\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n name: \"returnData\",\n type: \"bytes[]\",\n },\n ],\n payable: false,\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class Multicall__factory {\n static readonly abi = _abi;\n static createInterface(): MulticallInterface {\n return new utils.Interface(_abi) as MulticallInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): Multicall {\n return new Contract(address, _abi, signerOrProvider) as Multicall;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { Multicall3, Multicall3Interface } from \"../Multicall3\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes[]\",\n name: \"returnData\",\n type: \"bytes[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"allowFailure\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call3[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate3\",\n outputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"allowFailure\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call3Value[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"aggregate3Value\",\n outputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"blockAndAggregate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"blockHash\",\n type: \"bytes32\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBasefee\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"basefee\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n ],\n name: \"getBlockHash\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"blockHash\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBlockNumber\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getChainId\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"chainid\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockCoinbase\",\n outputs: [\n {\n internalType: \"address\",\n name: \"coinbase\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockDifficulty\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"difficulty\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockGasLimit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"gaslimit\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCurrentBlockTimestamp\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"timestamp\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"addr\",\n type: \"address\",\n },\n ],\n name: \"getEthBalance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"balance\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastBlockHash\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"blockHash\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"requireSuccess\",\n type: \"bool\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"tryAggregate\",\n outputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"requireSuccess\",\n type: \"bool\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Call[]\",\n name: \"calls\",\n type: \"tuple[]\",\n },\n ],\n name: \"tryBlockAndAggregate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"blockNumber\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"blockHash\",\n type: \"bytes32\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"success\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"returnData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct Multicall3.Result[]\",\n name: \"returnData\",\n type: \"tuple[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n] as const;\n\nexport class Multicall3__factory {\n static readonly abi = _abi;\n static createInterface(): Multicall3Interface {\n return new utils.Interface(_abi) as Multicall3Interface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): Multicall3 {\n return new Contract(address, _abi, signerOrProvider) as Multicall3;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { StablePool, StablePoolInterface } from \"../StablePool\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"amplificationParameter\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"startValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"endValue\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"startTime\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"endTime\",\n type: \"uint256\",\n },\n ],\n name: \"AmpUpdateStarted\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"currentValue\",\n type: \"uint256\",\n },\n ],\n name: \"AmpUpdateStopped\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAmplificationParameter\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"isUpdating\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"precision\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"swapRequest\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"poolConfig\",\n type: \"bytes\",\n },\n ],\n name: \"setAssetManagerPoolConfig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"rawEndValue\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"endTime\",\n type: \"uint256\",\n },\n ],\n name: \"startAmplificationParameterUpdate\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"stopAmplificationParameterUpdate\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class StablePool__factory {\n static readonly abi = _abi;\n static createInterface(): StablePoolInterface {\n return new utils.Interface(_abi) as StablePoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): StablePool {\n return new Contract(address, _abi, signerOrProvider) as StablePool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n StaticATokenRateProvider,\n StaticATokenRateProviderInterface,\n} from \"../StaticATokenRateProvider\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IStaticAToken\",\n name: \"_waToken\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"waToken\",\n outputs: [\n {\n internalType: \"contract IStaticAToken\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class StaticATokenRateProvider__factory {\n static readonly abi = _abi;\n static createInterface(): StaticATokenRateProviderInterface {\n return new utils.Interface(_abi) as StaticATokenRateProviderInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): StaticATokenRateProvider {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as StaticATokenRateProvider;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { Vault, VaultInterface } from \"../Vault\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"authorizer\",\n type: \"address\",\n },\n {\n internalType: \"contract IWETH\",\n name: \"weth\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IAuthorizer\",\n name: \"newAuthorizer\",\n type: \"address\",\n },\n ],\n name: \"AuthorizerChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"ExternalBalanceTransfer\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IFlashLoanRecipient\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"feeAmount\",\n type: \"uint256\",\n },\n ],\n name: \"FlashLoan\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"int256\",\n name: \"delta\",\n type: \"int256\",\n },\n ],\n name: \"InternalBalanceChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"liquidityProvider\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n indexed: false,\n internalType: \"int256[]\",\n name: \"deltas\",\n type: \"int256[]\",\n },\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"protocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n name: \"PoolBalanceChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"int256\",\n name: \"cashDelta\",\n type: \"int256\",\n },\n {\n indexed: false,\n internalType: \"int256\",\n name: \"managedDelta\",\n type: \"int256\",\n },\n ],\n name: \"PoolBalanceManaged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"poolAddress\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"enum IVault.PoolSpecialization\",\n name: \"specialization\",\n type: \"uint8\",\n },\n ],\n name: \"PoolRegistered\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"relayer\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\",\n },\n ],\n name: \"RelayerApprovalChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amountIn\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amountOut\",\n type: \"uint256\",\n },\n ],\n name: \"Swap\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n ],\n name: \"TokensDeregistered\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n indexed: false,\n internalType: \"address[]\",\n name: \"assetManagers\",\n type: \"address[]\",\n },\n ],\n name: \"TokensRegistered\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"WETH\",\n outputs: [\n {\n internalType: \"contract IWETH\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"assetInIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"assetOutIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.BatchSwapStep[]\",\n name: \"swaps\",\n type: \"tuple[]\",\n },\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"int256[]\",\n name: \"limits\",\n type: \"int256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n ],\n name: \"batchSwap\",\n outputs: [\n {\n internalType: \"int256[]\",\n name: \"assetDeltas\",\n type: \"int256[]\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n ],\n name: \"deregisterTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"minAmountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.ExitPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"exitPool\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IFlashLoanRecipient\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amounts\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"flashLoan\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n ],\n name: \"getInternalBalance\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n ],\n name: \"getPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"enum IVault.PoolSpecialization\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n ],\n name: \"getPoolTokenInfo\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"cash\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"managed\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n ],\n name: \"getPoolTokens\",\n outputs: [\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract ProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"relayer\",\n type: \"address\",\n },\n ],\n name: \"hasApprovedRelayer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"maxAmountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.JoinPoolRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n ],\n name: \"joinPool\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.PoolBalanceOpKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct IVault.PoolBalanceOp[]\",\n name: \"ops\",\n type: \"tuple[]\",\n },\n ],\n name: \"managePoolBalance\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.UserBalanceOpKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"asset\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n ],\n internalType: \"struct IVault.UserBalanceOp[]\",\n name: \"ops\",\n type: \"tuple[]\",\n },\n ],\n name: \"manageUserBalance\",\n outputs: [],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"assetInIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"assetOutIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.BatchSwapStep[]\",\n name: \"swaps\",\n type: \"tuple[]\",\n },\n {\n internalType: \"contract IAsset[]\",\n name: \"assets\",\n type: \"address[]\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n ],\n name: \"queryBatchSwap\",\n outputs: [\n {\n internalType: \"int256[]\",\n name: \"\",\n type: \"int256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IVault.PoolSpecialization\",\n name: \"specialization\",\n type: \"uint8\",\n },\n ],\n name: \"registerPool\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"address[]\",\n name: \"assetManagers\",\n type: \"address[]\",\n },\n ],\n name: \"registerTokens\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"newAuthorizer\",\n type: \"address\",\n },\n ],\n name: \"setAuthorizer\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"relayer\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"approved\",\n type: \"bool\",\n },\n ],\n name: \"setRelayerApproval\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IAsset\",\n name: \"assetOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IVault.SingleSwap\",\n name: \"singleSwap\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"fromInternalBalance\",\n type: \"bool\",\n },\n {\n internalType: \"address payable\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"toInternalBalance\",\n type: \"bool\",\n },\n ],\n internalType: \"struct IVault.FundManagement\",\n name: \"funds\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"limit\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n ],\n name: \"swap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"amountCalculated\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n stateMutability: \"payable\",\n type: \"receive\",\n },\n] as const;\n\nexport class Vault__factory {\n static readonly abi = _abi;\n static createInterface(): VaultInterface {\n return new utils.Interface(_abi) as VaultInterface;\n }\n static connect(address: string, signerOrProvider: Signer | Provider): Vault {\n return new Contract(address, _abi, signerOrProvider) as Vault;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { WeightedPool, WeightedPoolInterface } from \"../WeightedPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"normalizedWeights\",\n type: \"uint256[]\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"address[]\",\n name: \"assetManagers\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct WeightedPool.NewPoolParams\",\n name: \"params\",\n type: \"tuple\",\n },\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"feeType\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"protocolFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"ProtocolFeePercentageCacheUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DELEGATE_PROTOCOL_SWAP_FEES_SENTINEL\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getATHRateProduct\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getActualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastPostJoinExitInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getNormalizedWeights\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"feeType\",\n type: \"uint256\",\n },\n ],\n name: \"getProtocolFeePercentageCache\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolSwapFeeDelegation\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRateProviders\",\n outputs: [\n {\n internalType: \"contract IRateProvider[]\",\n name: \"\",\n type: \"address[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"poolConfig\",\n type: \"bytes\",\n },\n ],\n name: \"setAssetManagerPoolConfig\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"updateProtocolFeePercentageCache\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class WeightedPool__factory {\n static readonly abi = _abi;\n static createInterface(): WeightedPoolInterface {\n return new utils.Interface(_abi) as WeightedPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): WeightedPool {\n return new Contract(address, _abi, signerOrProvider) as WeightedPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n WeightedPoolFactory,\n WeightedPoolFactoryInterface,\n} from \"../WeightedPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20[]\",\n name: \"tokens\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"normalizedWeights\",\n type: \"uint256[]\",\n },\n {\n internalType: \"contract IRateProvider[]\",\n name: \"rateProviders\",\n type: \"address[]\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class WeightedPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): WeightedPoolFactoryInterface {\n return new utils.Interface(_abi) as WeightedPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): WeightedPoolFactory {\n return new Contract(address, _abi, signerOrProvider) as WeightedPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n YearnLinearPool,\n YearnLinearPoolInterface,\n} from \"../YearnLinearPool\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"assetManager\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"version\",\n type: \"string\",\n },\n ],\n internalType: \"struct YearnLinearPool.ConstructorArgs\",\n name: \"args\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"RecoveryModeStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"contract IERC20\",\n name: \"token\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"TargetsSet\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableRecoveryMode\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBptIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDomainSeparator\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMainToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"getNextNonce\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeesCollector\",\n outputs: [\n {\n internalType: \"contract IProtocolFeesCollector\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getScalingFactors\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTargets\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"lowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVirtualSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedIndex\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedToken\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getWrappedTokenRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"inRecoveryMode\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initialize\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFees\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"indexIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"indexOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"newLowerTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"newUpperTarget\",\n type: \"uint256\",\n },\n ],\n name: \"setTargets\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class YearnLinearPool__factory {\n static readonly abi = _abi;\n static createInterface(): YearnLinearPoolInterface {\n return new utils.Interface(_abi) as YearnLinearPoolInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): YearnLinearPool {\n return new Contract(address, _abi, signerOrProvider) as YearnLinearPool;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n YearnLinearPoolFactory,\n YearnLinearPoolFactoryInterface,\n} from \"../YearnLinearPoolFactory\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"protocolFeeProvider\",\n type: \"address\",\n },\n {\n internalType: \"contract IBalancerQueries\",\n name: \"queries\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"factoryVersion\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"poolVersion\",\n type: \"string\",\n },\n {\n internalType: \"uint256\",\n name: \"initialPauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"FactoryDisabled\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"PoolCreated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n ],\n name: \"YearnLinearPoolCreated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"mainToken\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"wrappedToken\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"upperTarget\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolId\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"salt\",\n type: \"bytes32\",\n },\n ],\n name: \"create\",\n outputs: [\n {\n internalType: \"contract LinearPool\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"disable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCode\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getCreationCodeContracts\",\n outputs: [\n {\n internalType: \"address\",\n name: \"contractA\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"contractB\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastCreatedPool\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPauseConfiguration\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolVersion\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getProtocolFeePercentagesProvider\",\n outputs: [\n {\n internalType: \"contract IProtocolFeePercentagesProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"isDisabled\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"pool\",\n type: \"address\",\n },\n ],\n name: \"isPoolFromFactory\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"version\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n] as const;\n\nexport class YearnLinearPoolFactory__factory {\n static readonly abi = _abi;\n static createInterface(): YearnLinearPoolFactoryInterface {\n return new utils.Interface(_abi) as YearnLinearPoolFactoryInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): YearnLinearPoolFactory {\n return new Contract(\n address,\n _abi,\n signerOrProvider\n ) as YearnLinearPoolFactory;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { GyroEV2, GyroEV2Interface, GyroECLPPool } from \"../GyroEV2\";\n\nconst _abi = [\n {\n inputs: [\n {\n components: [\n {\n components: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"symbol\",\n type: \"string\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"token0\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"token1\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodDuration\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"oracleEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n internalType: \"struct ExtensibleWeightedPool2Tokens.NewPoolParams\",\n name: \"baseParams\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"int256\",\n name: \"alpha\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"beta\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"c\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"s\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"lambda\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Params\",\n name: \"eclpParams\",\n type: \"tuple\",\n },\n {\n components: [\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"tauAlpha\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"tauBeta\",\n type: \"tuple\",\n },\n {\n internalType: \"int256\",\n name: \"u\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"v\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"w\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"z\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"dSq\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.DerivedParams\",\n name: \"derivedEclpParams\",\n type: \"tuple\",\n },\n {\n internalType: \"address\",\n name: \"rateProvider0\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"rateProvider1\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"capManager\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"bool\",\n name: \"capEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint120\",\n name: \"perAddressCap\",\n type: \"uint120\",\n },\n {\n internalType: \"uint128\",\n name: \"globalCap\",\n type: \"uint128\",\n },\n ],\n internalType: \"struct ICappedLiquidity.CapParams\",\n name: \"capParams\",\n type: \"tuple\",\n },\n {\n internalType: \"address\",\n name: \"pauseManager\",\n type: \"address\",\n },\n ],\n internalType: \"struct GyroECLPPool.GyroParams\",\n name: \"params\",\n type: \"tuple\",\n },\n {\n internalType: \"address\",\n name: \"configAddress\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Approval\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"capManager\",\n type: \"address\",\n },\n ],\n name: \"CapManagerUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"capEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint120\",\n name: \"perAddressCap\",\n type: \"uint120\",\n },\n {\n internalType: \"uint128\",\n name: \"globalCap\",\n type: \"uint128\",\n },\n ],\n indexed: false,\n internalType: \"struct ICappedLiquidity.CapParams\",\n name: \"params\",\n type: \"tuple\",\n },\n ],\n name: \"CapParamsUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"derivedParamsValidated\",\n type: \"bool\",\n },\n ],\n name: \"ECLPDerivedParamsValidated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paramsValidated\",\n type: \"bool\",\n },\n ],\n name: \"ECLPParamsValidated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"invariantAfterJoin\",\n type: \"uint256\",\n },\n ],\n name: \"InvariantAterInitializeJoin\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"oldInvariant\",\n type: \"uint256\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"newInvariant\",\n type: \"uint256\",\n },\n ],\n name: \"InvariantOldAndNew\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"enabled\",\n type: \"bool\",\n },\n ],\n name: \"OracleEnabledChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"oracleUpdatedIndex\",\n type: \"uint256\",\n },\n ],\n name: \"OracleIndexUpdated\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"address\",\n name: \"oldPauseManager\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"address\",\n name: \"newPauseManager\",\n type: \"address\",\n },\n ],\n name: \"PauseManagerChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"PausedLocally\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"PausedStateChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"SwapFeePercentageChanged\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n indexed: false,\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"invariant\",\n type: \"tuple\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"SwapParams\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n indexed: true,\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n indexed: false,\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n ],\n name: \"Transfer\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"UnpausedLocally\",\n type: \"event\",\n },\n {\n inputs: [],\n name: \"DOMAIN_SEPARATOR\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_dSq\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsAlpha\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsBeta\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsC\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsLambda\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_paramsS\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_tauAlphaX\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_tauAlphaY\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_tauBetaX\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_tauBetaY\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_u\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_v\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_w\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"_z\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"\",\n type: \"int256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n ],\n name: \"allowance\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"approve\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"capManager\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"capParams\",\n outputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"capEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint120\",\n name: \"perAddressCap\",\n type: \"uint120\",\n },\n {\n internalType: \"uint128\",\n name: \"globalCap\",\n type: \"uint128\",\n },\n ],\n internalType: \"struct ICappedLiquidity.CapParams\",\n name: \"\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_pauseManager\",\n type: \"address\",\n },\n ],\n name: \"changePauseManager\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"decimals\",\n outputs: [\n {\n internalType: \"uint8\",\n name: \"\",\n type: \"uint8\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"decreaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"startIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"endIndex\",\n type: \"uint256\",\n },\n ],\n name: \"dirtyUninitializedOracleSamples\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"enableOracle\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getECLPParams\",\n outputs: [\n {\n components: [\n {\n internalType: \"int256\",\n name: \"alpha\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"beta\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"c\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"s\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"lambda\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Params\",\n name: \"params\",\n type: \"tuple\",\n },\n {\n components: [\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"tauAlpha\",\n type: \"tuple\",\n },\n {\n components: [\n {\n internalType: \"int256\",\n name: \"x\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"y\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.Vector2\",\n name: \"tauBeta\",\n type: \"tuple\",\n },\n {\n internalType: \"int256\",\n name: \"u\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"v\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"w\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"z\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"dSq\",\n type: \"int256\",\n },\n ],\n internalType: \"struct GyroECLPMath.DerivedParams\",\n name: \"d\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLargestSafeQueryWindow\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getLastInvariant\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"enum IPriceOracle.Variable\",\n name: \"variable\",\n type: \"uint8\",\n },\n ],\n name: \"getLatest\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getMiscData\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"logInvariant\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"logTotalSupply\",\n type: \"int256\",\n },\n {\n internalType: \"uint256\",\n name: \"oracleSampleCreationTimestamp\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"oracleIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"oracleEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getNormalizedWeights\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getOwner\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IPriceOracle.Variable\",\n name: \"variable\",\n type: \"uint8\",\n },\n {\n internalType: \"uint256\",\n name: \"ago\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct IPriceOracle.OracleAccumulatorQuery[]\",\n name: \"queries\",\n type: \"tuple[]\",\n },\n ],\n name: \"getPastAccumulators\",\n outputs: [\n {\n internalType: \"int256[]\",\n name: \"results\",\n type: \"int256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPausedState\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n {\n internalType: \"uint256\",\n name: \"pauseWindowEndTime\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"bufferPeriodEndTime\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPoolId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getPrice\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"spotPrice\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"index\",\n type: \"uint256\",\n },\n ],\n name: \"getSample\",\n outputs: [\n {\n internalType: \"int256\",\n name: \"logPairPrice\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"accLogPairPrice\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"logBptPrice\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"accLogBptPrice\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"logInvariant\",\n type: \"int256\",\n },\n {\n internalType: \"int256\",\n name: \"accLogInvariant\",\n type: \"int256\",\n },\n {\n internalType: \"uint256\",\n name: \"timestamp\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSwapFeePercentage\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IPriceOracle.Variable\",\n name: \"variable\",\n type: \"uint8\",\n },\n {\n internalType: \"uint256\",\n name: \"secs\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"ago\",\n type: \"uint256\",\n },\n ],\n internalType: \"struct IPriceOracle.OracleAverageQuery[]\",\n name: \"queries\",\n type: \"tuple[]\",\n },\n ],\n name: \"getTimeWeightedAverage\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"results\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTokenRates\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"rate0\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"rate1\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTotalSamples\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"pure\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"gyroConfig\",\n outputs: [\n {\n internalType: \"contract IGyroConfig\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"addedValue\",\n type: \"uint256\",\n },\n ],\n name: \"increaseAllowance\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"name\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n ],\n name: \"nonces\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onExitPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"onJoinPool\",\n outputs: [\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256[]\",\n name: \"dueProtocolFeeAmounts\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"enum IVault.SwapKind\",\n name: \"kind\",\n type: \"uint8\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenIn\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"tokenOut\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"from\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"to\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IPoolSwapStructs.SwapRequest\",\n name: \"request\",\n type: \"tuple\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"balanceTokenOut\",\n type: \"uint256\",\n },\n ],\n name: \"onSwap\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"pauseManager\",\n outputs: [\n {\n internalType: \"address\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"owner\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"spender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"value\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"deadline\",\n type: \"uint256\",\n },\n {\n internalType: \"uint8\",\n name: \"v\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes32\",\n name: \"r\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32\",\n name: \"s\",\n type: \"bytes32\",\n },\n ],\n name: \"permit\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryExit\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptIn\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsOut\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"poolId\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256[]\",\n name: \"balances\",\n type: \"uint256[]\",\n },\n {\n internalType: \"uint256\",\n name: \"lastChangeBlock\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"protocolSwapFeePercentage\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"userData\",\n type: \"bytes\",\n },\n ],\n name: \"queryJoin\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"bptOut\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256[]\",\n name: \"amountsIn\",\n type: \"uint256[]\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"rateProvider0\",\n outputs: [\n {\n internalType: \"contract IRateProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"rateProvider1\",\n outputs: [\n {\n internalType: \"contract IRateProvider\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_capManager\",\n type: \"address\",\n },\n ],\n name: \"setCapManager\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"bool\",\n name: \"capEnabled\",\n type: \"bool\",\n },\n {\n internalType: \"uint120\",\n name: \"perAddressCap\",\n type: \"uint120\",\n },\n {\n internalType: \"uint128\",\n name: \"globalCap\",\n type: \"uint128\",\n },\n ],\n internalType: \"struct ICappedLiquidity.CapParams\",\n name: \"params\",\n type: \"tuple\",\n },\n ],\n name: \"setCapParams\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bool\",\n name: \"paused\",\n type: \"bool\",\n },\n ],\n name: \"setPaused\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"swapFeePercentage\",\n type: \"uint256\",\n },\n ],\n name: \"setSwapFeePercentage\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"symbol\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transfer\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"address\",\n name: \"recipient\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"amount\",\n type: \"uint256\",\n },\n ],\n name: \"transferFrom\",\n outputs: [\n {\n internalType: \"bool\",\n name: \"\",\n type: \"bool\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unpause\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class GyroEV2__factory {\n static readonly abi = _abi;\n static createInterface(): GyroEV2Interface {\n return new utils.Interface(_abi) as GyroEV2Interface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): GyroEV2 {\n return new Contract(address, _abi, signerOrProvider) as GyroEV2;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { VeBal, VeBalInterface } from \"../VeBal\";\n\nconst _abi = [\n {\n name: \"Deposit\",\n inputs: [\n {\n name: \"provider\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"locktime\",\n type: \"uint256\",\n indexed: true,\n },\n {\n name: \"type\",\n type: \"int128\",\n indexed: false,\n },\n {\n name: \"ts\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Withdraw\",\n inputs: [\n {\n name: \"provider\",\n type: \"address\",\n indexed: true,\n },\n {\n name: \"value\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"ts\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n name: \"Supply\",\n inputs: [\n {\n name: \"prevSupply\",\n type: \"uint256\",\n indexed: false,\n },\n {\n name: \"supply\",\n type: \"uint256\",\n indexed: false,\n },\n ],\n anonymous: false,\n type: \"event\",\n },\n {\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n inputs: [\n {\n name: \"token_addr\",\n type: \"address\",\n },\n {\n name: \"_name\",\n type: \"string\",\n },\n {\n name: \"_symbol\",\n type: \"string\",\n },\n {\n name: \"_authorizer_adaptor\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"token\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"name\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"symbol\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"string\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"decimals\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"admin\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"commit_smart_wallet_checker\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"apply_smart_wallet_checker\",\n inputs: [],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"get_last_user_slope\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"int128\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"user_point_history__ts\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_idx\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"locked__end\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"checkpoint\",\n inputs: [],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"deposit_for\",\n inputs: [\n {\n name: \"_addr\",\n type: \"address\",\n },\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"create_lock\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n {\n name: \"_unlock_time\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"increase_amount\",\n inputs: [\n {\n name: \"_value\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"increase_unlock_time\",\n inputs: [\n {\n name: \"_unlock_time\",\n type: \"uint256\",\n },\n ],\n outputs: [],\n },\n {\n stateMutability: \"nonpayable\",\n type: \"function\",\n name: \"withdraw\",\n inputs: [],\n outputs: [],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"balanceOf\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"balanceOf\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n {\n name: \"_t\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"balanceOfAt\",\n inputs: [\n {\n name: \"addr\",\n type: \"address\",\n },\n {\n name: \"_block\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"totalSupply\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"totalSupply\",\n inputs: [\n {\n name: \"t\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"totalSupplyAt\",\n inputs: [\n {\n name: \"_block\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"supply\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"locked\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n components: [\n {\n name: \"amount\",\n type: \"int128\",\n },\n {\n name: \"end\",\n type: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"epoch\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"point_history\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n components: [\n {\n name: \"bias\",\n type: \"int128\",\n },\n {\n name: \"slope\",\n type: \"int128\",\n },\n {\n name: \"ts\",\n type: \"uint256\",\n },\n {\n name: \"blk\",\n type: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"user_point_history\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n {\n name: \"arg1\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n components: [\n {\n name: \"bias\",\n type: \"int128\",\n },\n {\n name: \"slope\",\n type: \"int128\",\n },\n {\n name: \"ts\",\n type: \"uint256\",\n },\n {\n name: \"blk\",\n type: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"user_point_epoch\",\n inputs: [\n {\n name: \"arg0\",\n type: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint256\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"slope_changes\",\n inputs: [\n {\n name: \"arg0\",\n type: \"uint256\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"int128\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"future_smart_wallet_checker\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n {\n stateMutability: \"view\",\n type: \"function\",\n name: \"smart_wallet_checker\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n },\n ],\n },\n] as const;\n\nexport class VeBal__factory {\n static readonly abi = _abi;\n static createInterface(): VeBalInterface {\n return new utils.Interface(_abi) as VeBalInterface;\n }\n static connect(address: string, signerOrProvider: Signer | Provider): VeBal {\n return new Contract(address, _abi, signerOrProvider) as VeBal;\n }\n}\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type {\n VeDelegationProxy,\n VeDelegationProxyInterface,\n} from \"../VeDelegationProxy\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"contract IVault\",\n name: \"vault\",\n type: \"address\",\n },\n {\n internalType: \"contract IERC20\",\n name: \"votingEscrow\",\n type: \"address\",\n },\n {\n internalType: \"contract IVeDelegation\",\n name: \"delegation\",\n type: \"address\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"constructor\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: \"address\",\n name: \"newImplementation\",\n type: \"address\",\n },\n ],\n name: \"DelegationImplementationUpdated\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"adjustedBalanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"user\",\n type: \"address\",\n },\n ],\n name: \"adjusted_balance_of\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"selector\",\n type: \"bytes4\",\n },\n ],\n name: \"getActionId\",\n outputs: [\n {\n internalType: \"bytes32\",\n name: \"\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getAuthorizer\",\n outputs: [\n {\n internalType: \"contract IAuthorizer\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getDelegationImplementation\",\n outputs: [\n {\n internalType: \"contract IVeDelegation\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVault\",\n outputs: [\n {\n internalType: \"contract IVault\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getVotingEscrow\",\n outputs: [\n {\n internalType: \"contract IERC20\",\n name: \"\",\n type: \"address\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"killDelegation\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IVeDelegation\",\n name: \"delegation\",\n type: \"address\",\n },\n ],\n name: \"setDelegation\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class VeDelegationProxy__factory {\n static readonly abi = _abi;\n static createInterface(): VeDelegationProxyInterface {\n return new utils.Interface(_abi) as VeDelegationProxyInterface;\n }\n static connect(\n address: string,\n signerOrProvider: Signer | Provider\n ): VeDelegationProxy {\n return new Contract(address, _abi, signerOrProvider) as VeDelegationProxy;\n }\n}\n","import { SwapInfo } from '@balancer-labs/sor';\nimport { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { Vault } from '@/contracts/Vault';\n\nexport interface TokenAmounts {\n [token: string]: string;\n}\n\nexport interface SwapsOptions {\n maxPools?: number;\n gasPrice?: string;\n deadline?: string;\n maxSlippage?: number;\n}\n\nexport enum SwapType {\n SwapExactIn,\n SwapExactOut,\n}\n\nexport type FundManagement = {\n sender: string;\n recipient: string;\n fromInternalBalance: boolean;\n toInternalBalance: boolean;\n};\n\nexport type SingleSwap = {\n poolId: string;\n kind: SwapType;\n assetIn: string;\n assetOut: string;\n amount: BigNumberish;\n userData: string;\n};\n\nexport type Swap = {\n request: SingleSwap;\n funds: FundManagement;\n limit: BigNumberish;\n deadline: BigNumberish;\n value?: BigNumberish;\n outputReference?: BigNumberish;\n};\n\nexport type BatchSwapStep = {\n poolId: string;\n assetInIndex: number;\n assetOutIndex: number;\n amount: string;\n userData: string;\n};\n\nexport type BatchSwap = {\n kind: SwapType;\n swaps: BatchSwapStep[];\n assets: string[];\n funds: FundManagement;\n limits: BigNumberish[];\n deadline: BigNumberish;\n value?: BigNumberish;\n outputReferences?: { index: BigNumberish; key: BigNumberish }[];\n};\n\nexport interface SwapInput {\n tokenIn: string;\n tokenOut: string;\n swapType: SwapType;\n amount: string;\n}\n\nexport interface QuerySimpleFlashSwapParameters {\n poolIds: string[];\n assets: BatchSwap['assets'];\n flashLoanAmount: string;\n vaultContract: Vault;\n}\n\nexport interface SimpleFlashSwapParameters {\n poolIds: string[];\n assets: BatchSwap['assets'];\n flashLoanAmount: string;\n walletAddress: string;\n}\n\nexport interface QuerySimpleFlashSwapResponse {\n profits: Record;\n isProfitable: boolean;\n}\n\nexport interface FindRouteParameters {\n tokenIn: string;\n tokenOut: string;\n amount: BigNumber;\n gasPrice: BigNumber;\n maxPools?: number;\n}\n\nexport interface BuildTransactionParameters {\n userAddress: string;\n recipient?: string;\n swapInfo: SwapInfo;\n kind: SwapType;\n deadline: string;\n maxSlippage: number;\n}\n\nexport interface SwapTransactionRequest {\n to: string;\n data: string;\n value?: BigNumber;\n}\n\nexport interface SwapAttributes {\n to: string;\n functionName: string;\n attributes: Swap | BatchSwap;\n data: string;\n value?: BigNumber;\n}\n","import { BigNumberish, BigNumber } from '@ethersproject/bignumber';\nimport { Zero, WeiPerEther } from '@ethersproject/constants';\n\nimport { SwapType } from './types';\nimport { isSameAddress } from '@/lib/utils';\n\n/**\n * Helper to create limits using a defined slippage amount.\n * @param tokensIn - Array of token in addresses.\n * @param tokensOut - Array of token out addresses.\n * @param swapType - Type of swap - SwapExactIn or SwapExactOut\n * @param deltas - An array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array.\n * @param assets - array contains the addresses of all assets involved in the swaps.\n * @param slippage - Slippage to be applied. i.e. 5%=50000000000000000.\n * @returns Returns an array (same length as assets) with limits applied for each asset.\n */\nexport function getLimitsForSlippage(\n tokensIn: string[],\n tokensOut: string[],\n swapType: SwapType,\n deltas: BigNumberish[],\n assets: string[],\n slippage: BigNumberish\n): BigNumberish[] {\n // Limits:\n // +ve means max to send\n // -ve mean min to receive\n // For a multihop the intermediate tokens should be 0\n const limits: BigNumber[] = new Array(assets.length).fill(Zero);\n\n assets.forEach((token, i) => {\n if (tokensIn.some((tokenIn) => isSameAddress(token, tokenIn))) {\n // For SwapExactOut slippage is on tokenIn, i.e. amtIn + slippage\n const slippageAmount = BigNumber.from(slippage).add(WeiPerEther);\n limits[i] =\n swapType === SwapType.SwapExactOut\n ? limits[i].add(\n BigNumber.from(deltas[i]).mul(slippageAmount).div(WeiPerEther)\n )\n : limits[i].add(deltas[i]);\n }\n\n if (tokensOut.some((tokenOut) => isSameAddress(token, tokenOut))) {\n // For SwapExactIn slippage is on tokenOut, i.e. amtOut - slippage\n const slippageAmount = WeiPerEther.sub(BigNumber.from(slippage));\n limits[i] =\n swapType === SwapType.SwapExactIn\n ? limits[i].add(\n BigNumber.from(deltas[i]).mul(slippageAmount).div(WeiPerEther)\n )\n : limits[i].add(deltas[i]);\n }\n });\n\n return limits;\n}\n","import { Network } from './network';\nimport { BalancerNetworkConfig } from '@/types';\nimport addressesByNetwork from './addresses.json';\n\nexport const balancerVault = '0xBA12222222228d8Ba445958a75a0704d566BF2C8';\n\n// Info fetched using npm package slot20\nexport const BPT_SLOT = 0;\nexport const BPT_DECIMALS = 18;\n\nexport const BALANCER_NETWORK_CONFIG: Record = {\n [Network.MAINNET]: {\n chainId: Network.MAINNET, //1\n addresses: {\n //Mainnet deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/mainnet.html\n contracts: {\n multicall: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441',\n poolDataQueries: '0xf5CDdF6feD9C589f1Be04899F48f9738531daD59',\n lidoRelayer: '0xdcdbf71A870cc60C6F9B621E28a7D3Ffd6Dd4965',\n veBal: '0xC128a9954e6c874eA3d62ce62B468bA073093F25',\n gaugeControllerCheckpointer:\n '0x8e5698dc4897dc12243c8642e77b4f21349db97c',\n veBalProxy: '0x6f5a2eE11E7a772AeB5114A20d0D7c0ff61EB8A0',\n gyroConfigProxy: '0xac89cc9d78bbad7eb3a02601b4d65daa1f908aa6',\n ...addressesByNetwork[Network.MAINNET].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.MAINNET].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.MAINNET].contracts.weth,\n bbaUsd: addressesByNetwork[Network.MAINNET].tokens.bb_a_usd,\n lbpRaisingTokens: [\n '0x6b175474e89094c44da98b954eedeac495271d0f', // DAI\n '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // USDC\n '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH\n ],\n stETH: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',\n wstETH: '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',\n veBal: '0xC128a9954e6c874eA3d62ce62B468bA073093F25',\n ...addressesByNetwork[Network.MAINNET].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'ethereum',\n },\n },\n pools: {\n wETHwstETH: {\n id: '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080',\n address: '0x32296969ef14eb0c6d29669c550d4a0449130230',\n },\n },\n poolsToIgnore: [\n '0xbd482ffb3e6e50dc1c437557c3bea2b68f3683ee0000000000000000000003c6', // a pool made by an external dev who was playing with a novel rate provider mechanism in production.\n '0x0afbd58beca09545e4fb67772faf3858e610bcd00000000000000000000004b9',\n '0xf22ff21e17157340575158ad7394e068048dd98b0000000000000000000004b8',\n '0xf71d0774b214c4cf51e33eb3d30ef98132e4dbaa00000000000000000000046e',\n ],\n sorConnectingTokens: [\n {\n symbol: 'wEth',\n address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n },\n {\n symbol: 'wstEth',\n address: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',\n },\n {\n symbol: 'DOLA',\n address: '0x865377367054516e17014CcdED1e7d814EDC9ce4',\n },\n {\n symbol: 'rEth',\n address: '0xae78736cd615f374d3085123a210448e74fc6393',\n },\n {\n symbol: 'ETHx',\n address: '0xa35b1b31ce002fbf2058d22f30f95d405200a15b',\n },\n ],\n sorTriPathMidPoolIds: [\n '0x1e19cf2d73a72ef1332c882f20534b6519be0276000200000000000000000112', // rETH/WETH\n ],\n },\n [Network.POLYGON]: {\n chainId: Network.POLYGON, //137\n addresses: {\n //Polygon deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/polygon.html\n contracts: {\n multicall: '0xa1B2b503959aedD81512C37e9dce48164ec6a94d',\n poolDataQueries: '0x84813aA3e079A665C0B80F944427eE83cBA63617',\n gaugeClaimHelper: '0xaeb406b0e430bf5ea2dc0b9fe62e4e53f74b3a33',\n gyroConfigProxy: '0xfdc2e9e03f515804744a40d0f8d25c16e93fbe67',\n ...addressesByNetwork[Network.POLYGON].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.POLYGON].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.POLYGON].contracts.weth,\n lbpRaisingTokens: [\n '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063', // DAI\n '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', // USDC\n '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', // WMATIC\n ],\n ...addressesByNetwork[Network.POLYGON].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-prune-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-polygon',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/ianlapham/polygon-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: '',\n platformId: 'polygon-pos',\n },\n },\n pools: {},\n poolsToIgnore: [\n '0x600bd01b6526611079e12e1ff93aba7a3e34226f0000000000000000000009e4', // This pool has rateProviders with incorrect scaling\n '0xc31a37105b94ab4efca1954a14f059af11fcd9bb000000000000000000000455', // Stable pool with Convergence issues\n ],\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270',\n },\n {\n symbol: 'bbrz2',\n address: '0xe22483774bd8611be2ad2f4194078dac9159f4ba',\n }, // Joins Stables<>BRZ via https://app.balancer.fi/#/polygon/pool/0x4a0b73f0d13ff6d43e304a174697e3d5cfd310a400020000000000000000091c\n ],\n },\n [Network.ARBITRUM]: {\n chainId: Network.ARBITRUM, //42161\n //Arbitrum deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/arbitrum.html\n addresses: {\n contracts: {\n multicall: '0x269ff446d9892c9e19082564df3f5e8741e190a1',\n poolDataQueries: '0x7Ba29fE8E83dd6097A7298075C4AFfdBda3121cC',\n gaugeClaimHelper: '0xa0dabebaad1b243bbb243f933013d560819eb66f',\n gyroConfigProxy: '0x9b683ca24b0e013512e2566b68704dbe9677413c',\n ...addressesByNetwork[Network.ARBITRUM].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.ARBITRUM].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.ARBITRUM].contracts.weth,\n lbpRaisingTokens: [\n '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1', // DAI\n '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8', // USDC\n '0x82af49447d8a07e3bd95bd0d56f35241523fbab1', // WETH\n ],\n ...addressesByNetwork[Network.ARBITRUM].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-arbitrum-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-arbitrum',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/ianlapham/arbitrum-one-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'arbitrum-one',\n },\n },\n pools: {},\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',\n },\n ],\n sorTriPathMidPoolIds: [\n '0x178e029173417b1f9c8bc16dcec6f697bc323746000200000000000000000158', // wstEth/USDC.e to open up auraBAL/USDC\n '0x0052688295413b32626d226a205b95cdb337de860002000000000000000003d1', // arb/USDC.e to open up aura/USDC\n '0xa1a8bf131571a2139feb79401aa4a2e9482df6270002000000000000000004b4', // wstEth/Stable4Pool\n ],\n },\n [Network.GOERLI]: {\n chainId: Network.GOERLI, //5\n //Goerli deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/goerli.html\n addresses: {\n contracts: {\n multicall: '0x77dCa2C955b15e9dE4dbBCf1246B4B85b651e50e',\n poolDataQueries: '0x6d3197d069F8F9f1Fe7e23665Bc64CB77ED8b089',\n veBal: '0x33A99Dcc4C85C014cf12626959111D5898bbCAbF',\n veBalProxy: '0xA1F107D1cD709514AE8A914eCB757E95f9cedB31',\n erc4626LinearPoolFactory: '0xba240c856498e2d7a70af4911aafae0d6b565a5b',\n aaveLinearPoolFactory: '0x76578ecf9a141296ec657847fb45b0585bcda3a6',\n ...addressesByNetwork[Network.GOERLI].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.GOERLI].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.GOERLI].contracts.weth,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-goerli-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-goerli',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/blocklytics/goerli-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'ethereum',\n },\n },\n pools: {},\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0xdFCeA9088c8A88A76FF74892C1457C17dfeef9C1',\n },\n ],\n },\n [Network.OPTIMISM]: {\n chainId: Network.OPTIMISM, //10\n // Optimism deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/optimism.html\n addresses: {\n contracts: {\n multicall: '0x2dc0e2aa608532da689e89e237df582b783e552c',\n poolDataQueries: '0x6B5dA774890Db7B7b96C6f44e6a4b0F657399E2e',\n gyroConfigProxy: '0x32acb44fc929339b9f16f0449525cc590d2a23f3',\n ...addressesByNetwork[Network.OPTIMISM].contracts,\n },\n tokens: {\n bal: '0xfe8b128ba8c78aabc59d4c64cee7ff28e9379921',\n wrappedNativeAsset: addressesByNetwork[Network.OPTIMISM].contracts.weth,\n lbpRaisingTokens: [\n '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1', // DAI\n '0x7f5c764cbc14f9669b88837ca1490cca17c31607', // USDC\n '0x4200000000000000000000000000000000000006', // WETH\n ],\n ...addressesByNetwork[Network.OPTIMISM].tokens,\n },\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'optimistic-ethereum',\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-optimism',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-optimism',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/lyra-finance/optimism-mainnet-blocks',\n },\n pools: {},\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x4200000000000000000000000000000000000006',\n },\n ],\n },\n [Network.GNOSIS]: {\n chainId: Network.GNOSIS, //100\n // Gnosis deployment addresses: https://docs.balancer.fi/reference/contracts/deployment-addresses/gnosis.html\n addresses: {\n contracts: {\n multicall: '0xbb6fab6b627947dae0a75808250d8b2652952cb5',\n poolDataQueries: '0x3f170631ed9821Ca51A59D996aB095162438DC10',\n ...addressesByNetwork[Network.GNOSIS].contracts,\n },\n tokens: {\n wrappedNativeAsset: addressesByNetwork[Network.GNOSIS].contracts.weth,\n bal: addressesByNetwork[Network.GNOSIS].contracts.bal,\n ...addressesByNetwork[Network.GNOSIS].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gnosis-chain-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-gnosis-chain',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'xdai',\n platformId: 'xdai',\n },\n },\n averageBlockTime: 5,\n pools: {},\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d',\n },\n {\n symbol: 'wsEth',\n address: '0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6',\n },\n ],\n sorTriPathMidPoolIds: [\n '0xeb30c85cc528537f5350cf5684ce6a4538e13394000200000000000000000059', // 3POOL_BPT/wstETH\n '0x7644fa5d0ea14fcf3e813fdf93ca9544f8567655000000000000000000000066', // sBAL3\n ],\n },\n [Network.FANTOM]: {\n chainId: Network.FANTOM, //250\n //Fantom deployment addresses: https://docs.beets.fi/technicals/deployments\n addresses: {\n contracts: {\n vault: '0x20dd72Ed959b6147912C2e529F0a0C651c33c9ce',\n multicall: '0x66335d7ad8011f6aa3f48aadcb523b62b38ed961',\n poolDataQueries: '0xb132F1E145DcC085980C531e2dA81f2b84efc14F',\n gaugeClaimHelper: '0x0000000000000000000000000000000000000000', // no guages on fantom\n balancerRelayer: '0x419f7925b8c9e409b6ee8792242556fa210a7a09',\n balancerHelpers: '0xfE18C7C70b0a2c6541bEde0367124278BC345Dc8',\n weightedPoolFactory: '0x60467cb225092cE0c989361934311175f437Cf53',\n composableStablePoolFactory:\n '0x44814E3A603bb7F1198617995c5696C232F6e8Ed',\n yearnLinearPoolFactory: '0x1f73ae6ed391a2b1e84ff988a1bb5394b78a4a71',\n },\n tokens: {\n bal: '0xF24Bcf4d1e507740041C9cFd2DddB29585aDCe1e', //beets\n wrappedNativeAsset: '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83',\n lbpRaisingTokens: [\n '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83', // WFTM\n '0x04068DA6C83AFCFA0e13ba15A6696662335D5B75', // USDC\n '0x8D11eC38a3EB5E956B052f67Da8Bdc9bef8Abf3E', // DAI\n ],\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/beethovenxfi/beethovenx-v2-fantom',\n gaugesSubgraph: '', // no guages on fantom\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/beethovenxfi/fantom-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'ftm',\n platformId: 'fantom',\n },\n },\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [\n {\n symbol: 'wftm',\n address: '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83',\n },\n ],\n },\n [Network.SEPOLIA]: {\n chainId: Network.SEPOLIA, //11155111\n addresses: {\n contracts: {\n multicall: '0xcA11bde05977b3631167028862bE2a173976CA11',\n poolDataQueries: '0x9805dcfD25e6De36bad8fe9D3Fe2c9b44B764102',\n ...addressesByNetwork[Network.SEPOLIA].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.SEPOLIA].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.SEPOLIA].contracts.weth,\n ...addressesByNetwork[Network.SEPOLIA].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-sepolia-v2/version/latest',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'ethereum',\n },\n },\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [],\n },\n [Network.ZKEVM]: {\n chainId: Network.ZKEVM, //1101\n addresses: {\n contracts: {\n balancerMinter: '0x475D18169BE8a89357A9ee3Ab00ca386d20fA229',\n multicall: '0xcA11bde05977b3631167028862bE2a173976CA11',\n poolDataQueries: '0xF24917fB88261a37Cc57F686eBC831a5c0B9fD39',\n ...addressesByNetwork[Network.ZKEVM].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.ZKEVM].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.ZKEVM].contracts.weth,\n ...addressesByNetwork[Network.ZKEVM].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-polygon-zk-v2/version/latest',\n gaugesSubgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-gauges-polygon-zk/version/latest',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'polygon-zkevm',\n },\n },\n averageBlockTime: 4,\n multicallBatchSize: 128,\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9',\n },\n {\n symbol: 'wsEth',\n address: '0x5D8cfF95D7A57c0BF50B30b43c7CC0D52825D4a9',\n },\n ],\n },\n [Network.AVALANCHE]: {\n chainId: Network.AVALANCHE, //43114\n addresses: {\n contracts: {\n balancerMinter: '0xEa924b45a3fcDAAdf4E5cFB1665823B8F8F2039B',\n multicall: '0xcA11bde05977b3631167028862bE2a173976CA11',\n poolDataQueries: '0x67af5D428d38C5176a286a2371Df691cDD914Fb8',\n ...addressesByNetwork[Network.AVALANCHE].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.AVALANCHE].contracts.bal,\n wrappedNativeAsset:\n addressesByNetwork[Network.AVALANCHE].contracts.weth,\n ...addressesByNetwork[Network.AVALANCHE].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-avalanche-v2',\n gaugesSubgraph:\n 'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-gauges-avalanche',\n blockNumberSubgraph:\n 'https://api.thegraph.com/subgraphs/name/iliaazhel/avalanche-blocks',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'avalanche-2',\n platformId: 'avalanche',\n },\n },\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [\n {\n symbol: 'WAVAX',\n address: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7',\n },\n {\n symbol: 'sAVAX',\n address: '0x2b2c81e08f1af8835a78bb2a90ae924ace0ea4be',\n },\n ],\n },\n [Network.BASE]: {\n chainId: Network.BASE, //8453\n addresses: {\n contracts: {\n balancerMinter: '0xc7E5ED1054A24Ef31D827E6F86caA58B3Bc168d7',\n multicall: '0xcA11bde05977b3631167028862bE2a173976CA11',\n poolDataQueries: '',\n ...addressesByNetwork[Network.BASE].contracts,\n },\n tokens: {\n bal: addressesByNetwork[Network.BASE].contracts.bal,\n wrappedNativeAsset: addressesByNetwork[Network.BASE].contracts.weth,\n ...addressesByNetwork[Network.BASE].tokens,\n },\n },\n urls: {\n subgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-base-v2/version/latest',\n gaugesSubgraph:\n 'https://api.studio.thegraph.com/query/24660/balancer-gauges-base/version/latest',\n blockNumberSubgraph:\n 'https://api.studio.thegraph.com/query/48427/bleu-base-blocks/version/latest',\n },\n thirdParty: {\n coingecko: {\n nativeAssetId: 'eth',\n platformId: 'base',\n },\n },\n averageBlockTime: 2,\n pools: {},\n poolsToIgnore: [],\n sorConnectingTokens: [\n {\n symbol: 'weth',\n address: '0x4200000000000000000000000000000000000006',\n },\n ],\n sorTriPathMidPoolIds: [\n '0x2db50a0e0310723ef0c2a165cb9a9f80d772ba2f00020000000000000000000d', // weth/staBal\n ],\n },\n};\n\nexport const networkAddresses = (\n chainId: number\n): BalancerNetworkConfig['addresses'] =>\n BALANCER_NETWORK_CONFIG[chainId as Network].addresses;\n","export enum BalancerErrorCode {\n ABOVE_MAX_TOKENS = 'ABOVE_MAX_TOKENS',\n BELOW_MIN_TOKENS = 'BELOW_MIN_TOKENS',\n EXIT_DELTA_AMOUNTS = 'EXIT_DELTA_AMOUNTS',\n FEE_PROVIDER_NOT_PROVIDED = 'FEE_PROVIDER_NOT_PROVIDED',\n GAUGES_HELPER_ADDRESS_NOT_PROVIDED = 'GAUGES_HELPER_ADDRESS_NOT_PROVIDED',\n GAUGES_NOT_FOUND = 'GAUGES_NOT_FOUND',\n GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED = 'GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED',\n GAUGES_REWARD_TOKEN_EMPTY = 'GAUGES_REWARD_TOKEN_EMPTY',\n ILLEGAL_PARAMETER = 'ILLEGAL_PARAMETER',\n INTERNAL_ERROR_INVALID_ABI = 'INTERNAL_ERROR_INVALID_ABI',\n INPUT_LENGTH_MISMATCH = 'INPUT_LENGTH_MISMATCH',\n INPUT_OUT_OF_BOUNDS = 'INPUT_OUT_OF_BOUNDS',\n INPUT_TOKEN_INVALID = 'INPUT_TOKEN_INVALID',\n INVALID_PROTOCOL_ID = 'INVALID_PROTOCOL_ID',\n INVALID_SWAP_FEE_PERCENTAGE = 'INVALID_SWAP_FEE_PERCENTAGE',\n INVALID_WEIGHTS = 'INVALID_WEIGHTS',\n JOIN_DELTA_AMOUNTS = 'JOIN_DELTA_AMOUNTS',\n JOIN_WITH_ZERO_AMOUNT = 'JOIN_WITH_ZERO_AMOUNT',\n MISSING_AMP = 'MISSING_AMP',\n MISSING_DECIMALS = 'MISSING_DECIMALS',\n MISSING_PRICE_RATE = 'MISSING_PRICE_RATE',\n MISSING_TOKENS = 'MISSING_TOKENS',\n MISSING_WEIGHT = 'MISSING_WEIGHT',\n NO_POOL_DATA = 'NO_POOL_DATA',\n NO_VALUE_PARAMETER = 'NO_VALUE_PARAMETER',\n POOL_DOESNT_EXIST = 'POOL_DOESNT_EXIST',\n QUERY_BATCH_SWAP = 'QUERY_BATCH_SWAP',\n RELAY_SWAP_AMOUNTS = 'RELAY_SWAP_AMOUNTS',\n REWARD_TOKEN_ZERO = 'REWARD_TOKEN_ZERO',\n TIMESTAMP_IN_THE_FUTURE = 'TIMESTAMP_IN_THE_FUTURE',\n TOKEN_MISMATCH = 'TOKEN_MISMATCH',\n UNSUPPORTED_PAIR = 'UNSUPPORTED_PAIR',\n UNSUPPORTED_POOL_TYPE = 'UNSUPPORTED_POOL_TYPE',\n UNSUPPORTED_POOL_TYPE_VERSION = 'UNSUPPORTED_POOL_TYPE_VERSION',\n}\n\nexport class BalancerError extends Error {\n constructor(public code: BalancerErrorCode) {\n super(BalancerError.getMessage(code));\n this.name = 'BalancerError';\n }\n\n static getMessage(code: BalancerErrorCode): string {\n switch (code) {\n case BalancerErrorCode.ABOVE_MAX_TOKENS:\n return 'the array contains more tokens than the maximum allowed';\n case BalancerErrorCode.BELOW_MIN_TOKENS:\n return 'the array does not contain the minimum quantity of tokens';\n case BalancerErrorCode.EXIT_DELTA_AMOUNTS:\n return 'Error when checking exit call deltas';\n case BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED:\n return 'Fee Provider Repository has not been provided';\n case BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED:\n return 'Liquidity Gauges Helper Contract address has not been provided';\n case BalancerErrorCode.GAUGES_NOT_FOUND:\n return 'Liquidity Gauges not found with given addresses';\n case BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED:\n return 'Liquidity Gauges Reward Minter Contract address has not been provided';\n case BalancerErrorCode.GAUGES_REWARD_TOKEN_EMPTY:\n return 'No Reward Tokens for Liquidity Gauges provided';\n case BalancerErrorCode.INPUT_LENGTH_MISMATCH:\n return 'input length mismatch';\n case BalancerErrorCode.INPUT_OUT_OF_BOUNDS:\n return 'input out of bounds';\n case BalancerErrorCode.INPUT_TOKEN_INVALID:\n return 'input token invalid';\n case BalancerErrorCode.INVALID_PROTOCOL_ID:\n return 'The provided protocol id does not correspond to a protocol';\n case BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE:\n return 'The swap fee needs to be greater than zero and less than 1e17(10%)';\n case BalancerErrorCode.INVALID_WEIGHTS:\n return 'The sum of the weights needs to be equal to 1e18(100%)';\n case BalancerErrorCode.JOIN_DELTA_AMOUNTS:\n return 'Error when checking join call deltas';\n case BalancerErrorCode.JOIN_WITH_ZERO_AMOUNT:\n return 'Cant join pool with 0 amount of token in';\n case BalancerErrorCode.MISSING_AMP:\n return 'missing amp';\n case BalancerErrorCode.MISSING_DECIMALS:\n return 'missing decimals';\n case BalancerErrorCode.MISSING_PRICE_RATE:\n return 'missing price rate';\n case BalancerErrorCode.MISSING_TOKENS:\n return 'missing tokens';\n case BalancerErrorCode.MISSING_WEIGHT:\n return 'missing weight';\n case BalancerErrorCode.NO_POOL_DATA:\n return 'no pool data';\n case BalancerErrorCode.NO_VALUE_PARAMETER:\n return 'Illegal value passed as parameter';\n case BalancerErrorCode.POOL_DOESNT_EXIST:\n return 'balancer pool does not exist';\n case BalancerErrorCode.RELAY_SWAP_AMOUNTS:\n return 'Error when checking swap amounts';\n case BalancerErrorCode.REWARD_TOKEN_ZERO:\n return 'All Zero Values for Reward Tokens';\n case BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE:\n return 'Timestamp cannot be in the future';\n case BalancerErrorCode.TOKEN_MISMATCH:\n return 'token mismatch';\n case BalancerErrorCode.UNSUPPORTED_PAIR:\n return 'unsupported token pair';\n case BalancerErrorCode.UNSUPPORTED_POOL_TYPE:\n return 'unsupported pool type';\n default:\n return 'Unknown error';\n }\n }\n}\n","import { ONE, SolidityMaths } from '@/lib/utils/solidityMaths';\n\nexport function calcPriceImpact(\n bptAmount: bigint,\n bptZeroPriceImpact: bigint,\n isJoin: boolean\n): bigint {\n if (isJoin) return calcPriceImpactJoin(bptAmount, bptZeroPriceImpact);\n else return calcPriceImpactExit(bptAmount, bptZeroPriceImpact);\n}\n\nfunction calcPriceImpactJoin(\n bptAmount: bigint,\n bptZeroPriceImpact: bigint\n): bigint {\n // 1 - (bptAmount/bptZeroPI)\n const pi = ONE - SolidityMaths.divDownFixed(bptAmount, bptZeroPriceImpact);\n return pi < 0 ? BigInt(0) : pi;\n}\nfunction calcPriceImpactExit(\n bptAmount: bigint,\n bptZeroPriceImpact: bigint\n): bigint {\n // (bptAmount/bptZeroPI) - 1\n const pi = SolidityMaths.divDownFixed(bptAmount, bptZeroPriceImpact) - ONE;\n return pi < 0 ? BigInt(0) : pi;\n}\n","import { BZERO, SolidityMaths } from './solidityMaths';\n\nconst AMP_PRECISION = BigInt(1e3);\n\nexport function bptSpotPrice(\n amp: bigint,\n balances: bigint[],\n bptSupply: bigint,\n tokenIndexIn: number\n): bigint {\n const totalCoins = balances.length;\n const D = _calculateInvariant(amp, balances, true);\n let S = BZERO;\n let D_P = D / BigInt(totalCoins);\n for (let i = 0; i < totalCoins; i++) {\n if (i != tokenIndexIn) {\n S = S + balances[i];\n D_P = (D_P * D) / (BigInt(totalCoins) * balances[i]);\n }\n }\n const x = balances[tokenIndexIn];\n const alpha = amp * BigInt(totalCoins);\n const beta = alpha * S; // units: 10 ** 21\n const gamma = BigInt(AMP_PRECISION) - alpha;\n const partial_x = BigInt(2) * alpha * x + beta + gamma * D;\n const minus_partial_D =\n D_P * BigInt(totalCoins + 1) * AMP_PRECISION - gamma * x;\n const ans = SolidityMaths.divUpFixed(\n (partial_x * bptSupply) / minus_partial_D,\n D\n );\n return ans;\n}\n\nfunction _calculateInvariant(\n amp: bigint,\n balances: bigint[],\n roundUp: boolean\n): bigint {\n /**********************************************************************************************\n // invariant //\n // D = invariant D^(n+1) //\n // A = amplification coefficient A n^n S + D = A D n^n + ----------- //\n // S = sum of balances n^n P //\n // P = product of balances //\n // n = number of tokens //\n *********x************************************************************************************/\n\n // We support rounding up or down.\n\n let sum = BZERO;\n const numTokens = balances.length;\n for (let i = 0; i < numTokens; i++) {\n sum = sum + balances[i];\n }\n if (sum == BZERO) {\n return BZERO;\n }\n\n let prevInvariant = BZERO;\n let invariant = sum;\n const ampTimesTotal = amp * BigInt(numTokens);\n\n for (let i = 0; i < 255; i++) {\n let P_D = balances[0] * BigInt(numTokens);\n for (let j = 1; j < numTokens; j++) {\n P_D = SolidityMaths.div(\n SolidityMaths.mul(\n SolidityMaths.mul(P_D, balances[j]),\n BigInt(numTokens)\n ),\n invariant,\n roundUp\n );\n }\n prevInvariant = invariant;\n invariant = SolidityMaths.div(\n SolidityMaths.mul(\n SolidityMaths.mul(BigInt(numTokens), invariant),\n invariant\n ) +\n SolidityMaths.div(\n SolidityMaths.mul(SolidityMaths.mul(ampTimesTotal, sum), P_D),\n AMP_PRECISION,\n roundUp\n ),\n SolidityMaths.mul(BigInt(numTokens + 1), invariant) +\n // No need to use checked arithmetic for the amp precision, the amp is guaranteed to be at least 1\n SolidityMaths.div(\n SolidityMaths.mul(ampTimesTotal - AMP_PRECISION, P_D),\n AMP_PRECISION,\n !roundUp\n ),\n roundUp\n );\n\n if (invariant > prevInvariant) {\n if (invariant - prevInvariant <= 1) {\n return invariant;\n }\n } else if (prevInvariant - invariant <= 1) {\n return invariant;\n }\n }\n\n throw new Error('Errors.STABLE_INVARIANT_DIDNT_CONVERGE');\n}\n","import { PriceImpactConcern } from '@/modules/pools/pool-types/concerns/types';\nimport { ONE, BZERO, _upscale } from '@/lib/utils/solidityMaths';\nimport { calcPriceImpact } from '@/modules/pricing/priceImpact';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Pool } from '@/types';\nimport { bptSpotPrice } from '@/lib/utils/stableMathHelpers';\nimport { parsePoolInfo } from '@/lib/utils';\n\n// Note: this concern is used by Stable, MetaStable and StablePhantom pools\nexport class StablePoolPriceImpact implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n // upscales amp, swapfee, totalshares\n const {\n ampWithPrecision,\n scalingFactorsWithoutBpt,\n totalSharesEvm,\n upScaledBalancesWithoutBpt,\n } = parsePoolInfo(pool);\n\n // Check against array without BPT because concern is being reused by stablePhantom pools\n // Stable and MetaStable pools don't have BPT in the token list, so array without BPT is the same as the original array\n if (tokenAmounts.length !== upScaledBalancesWithoutBpt.length)\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n\n let bptZeroPriceImpact = BZERO;\n for (let i = 0; i < upScaledBalancesWithoutBpt.length; i++) {\n const price = bptSpotPrice(\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n totalSharesEvm,\n i\n );\n const amountUpscaled = _upscale(\n tokenAmounts[i],\n scalingFactorsWithoutBpt[i]\n );\n const newTerm = (price * amountUpscaled) / ONE;\n bptZeroPriceImpact += newTerm;\n }\n return bptZeroPriceImpact;\n }\n\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n const bptZeroPriceImpact = this.bptZeroPriceImpact(pool, tokenAmounts);\n return calcPriceImpact(bptAmount, bptZeroPriceImpact, isJoin).toString();\n }\n}\n","import { BigNumber, parseFixed } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport * as SOR from '@balancer-labs/sor';\nimport {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n ExitExactBPTInParameters,\n ExitExactTokensOutParameters,\n ExitPool,\n ExitPoolAttributes,\n} from '../types';\nimport { AssetHelpers, isSameAddress, parsePoolInfo } from '@/lib/utils';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { addSlippage, subSlippage } from '@/lib/utils/slippageHelper';\nimport { balancerVault } from '@/lib/constants/config';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport {\n _downscaleDown,\n _downscaleDownArray,\n _upscaleArray,\n} from '@/lib/utils/solidityMaths';\nimport { Pool } from '@/types';\nimport { BasePoolEncoder } from '@/pool-base';\nimport { StablePoolPriceImpact } from '../stable/priceImpact.concern';\n\ninterface SortedValues {\n poolTokens: string[];\n ampWithPrecision: bigint;\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n}\n\ntype ExactBPTInSortedValues = SortedValues & {\n scalingFactors: bigint[];\n singleTokenOutIndex: number;\n};\n\ntype ExactTokensOutSortedValues = SortedValues & {\n upScaledAmountsOut: bigint[];\n downScaledAmountsOut: string[];\n};\ntype CalcBptInGivenExactTokensOutParams = ExactTokensOutSortedValues &\n Pick;\n\ntype SortValuesParams = {\n pool: Pool;\n wrappedNativeAsset: string;\n shouldUnwrapNativeAsset?: boolean;\n};\n\ntype SortValuesExactBptInParams = SortValuesParams & {\n singleTokenOut?: string;\n};\n\ntype SortValuesExactTokensOutParams = SortValuesParams & {\n amountsOut: string[];\n tokensOut: string[];\n};\n\ntype EncodeExitParams = Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'toInternalBalance'\n> & {\n poolTokens: string[];\n poolId: string;\n userData: string;\n minAmountsOut: string[];\n};\n\nexport class StablePoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n });\n const sortedValues = this.sortValuesExitExactBptIn({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n });\n const { minAmountsOut, expectedAmountsOut } =\n sortedValues.singleTokenOutIndex >= 0\n ? this.calcTokenOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n })\n : this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData =\n sortedValues.singleTokenOutIndex >= 0\n ? StablePoolEncoder.exitExactBPTInForOneTokenOut(\n bptIn,\n sortedValues.singleTokenOutIndex\n )\n : StablePoolEncoder.exitExactBPTInForTokensOut(bptIn);\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n this.checkInputsExactTokensOut(amountsOut, tokensOut, pool);\n\n const sortedValues = this.sortValuesExitExactTokensOut({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n });\n const { expectedBPTIn, maxBPTIn } = this.calcBptInGivenExactTokensOut({\n ...sortedValues,\n slippage,\n });\n\n const { downScaledAmountsOut, poolTokens } = sortedValues;\n const userData = StablePoolEncoder.exitBPTInForExactTokensOut(\n downScaledAmountsOut,\n maxBPTIn\n );\n const encodedData = this.encodeExitPool({\n poolId: pool.id,\n userData,\n poolTokens,\n minAmountsOut: downScaledAmountsOut,\n exiter,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n downScaledAmountsOut.map(BigInt),\n BigInt(expectedBPTIn),\n false\n );\n\n return {\n ...encodedData,\n expectedBPTIn,\n maxBPTIn,\n priceImpact,\n };\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut: undefined,\n pool,\n shouldUnwrapNativeAsset: false,\n });\n const sortedValues = parsePoolInfo(pool);\n const { minAmountsOut, expectedAmountsOut } =\n this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n singleTokenOutIndex: -1,\n bptIn,\n slippage,\n });\n\n const userData = BasePoolEncoder.recoveryModeExit(bptIn);\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt inserted in the transaction\n * @param singleTokenOut (optional) the address of the single token that will be withdrawn, if null|undefined, all tokens will be withdrawn proportionally.\n * @param pool the pool that is being exited\n * @param shouldUnwrapNativeAsset Set true if the weth should be unwrapped to Eth\n */\n checkInputsExactBPTIn = ({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n }: Pick<\n ExitExactBPTInParameters,\n 'bptIn' | 'singleTokenOut' | 'pool' | 'shouldUnwrapNativeAsset'\n >): void => {\n if (!bptIn.length || parseFixed(bptIn, 18).isNegative()) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n if (\n singleTokenOut &&\n singleTokenOut !== AddressZero &&\n !pool.tokens\n .map((t) => t.address)\n .some((a) => isSameAddress(a, singleTokenOut))\n ) {\n throw new BalancerError(BalancerErrorCode.TOKEN_MISMATCH);\n }\n\n if (!shouldUnwrapNativeAsset && singleTokenOut === AddressZero)\n throw new Error(\n 'shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values'\n );\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n /**\n * Checks if the input of buildExitExactTokensOut is valid\n * @param amountsOut Must have an amount for each token, if the user will not withdraw any amount for a token, the value shall be '0'\n * @param tokensOut Must contain all the tokens of the pool\n * @param pool The pool that is being exited\n */\n checkInputsExactTokensOut = (\n amountsOut: string[],\n tokensOut: string[],\n pool: Pool\n ): void => {\n if (\n tokensOut.length != amountsOut.length ||\n tokensOut.length != pool.tokensList.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n sortValuesExitExactBptIn = ({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n }: SortValuesExactBptInParams): ExactBPTInSortedValues => {\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n // Parse pool info into EVM amounts in order to match amountsIn scalling\n const { poolTokens } = parsedPoolInfo;\n let singleTokenOutIndex = -1;\n if (singleTokenOut) {\n singleTokenOutIndex = poolTokens.indexOf(singleTokenOut);\n }\n return {\n ...parsedPoolInfo,\n singleTokenOutIndex,\n };\n };\n sortValuesExitExactTokensOut = ({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n }: SortValuesExactTokensOutParams): ExactTokensOutSortedValues => {\n const shouldUnwrapNativeAsset = tokensOut.some((a) => a === AddressZero);\n // Parse pool info into EVM amounts in order to match amountsOut scaling\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n const { scalingFactors } = parsedPoolInfo;\n\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts in into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, downScaledAmountsOut] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n // Maths should use upscaled amounts, e.g. 1USDC => 1e18 not 1e6\n const upScaledAmountsOut = _upscaleArray(\n downScaledAmountsOut.map((a) => BigInt(a)),\n scalingFactors.map((a) => BigInt(a))\n );\n\n return {\n ...parsedPoolInfo,\n upScaledAmountsOut,\n downScaledAmountsOut,\n };\n };\n calcTokenOutGivenExactBptIn = ({\n poolTokens,\n ampWithPrecision,\n upScaledBalances,\n totalSharesEvm,\n swapFeeEvm,\n singleTokenOutIndex,\n bptIn,\n slippage,\n scalingFactors,\n }: Pick<\n ExactBPTInSortedValues,\n | 'poolTokens'\n | 'ampWithPrecision'\n | 'upScaledBalances'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n | 'singleTokenOutIndex'\n | 'scalingFactors'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n // Calculate amount out given BPT in\n const amountOut = SOR.StableMathBigInt._calcTokenOutGivenExactBptIn(\n ampWithPrecision,\n upScaledBalances,\n singleTokenOutIndex,\n BigInt(bptIn),\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n const downscaledAmountOut = _downscaleDown(\n BigInt(amountOut) - BigInt(1), // The -1 is to solve rounding errors, sometimes the amount comes 1 point lower than expected\n scalingFactors[singleTokenOutIndex]\n ).toString();\n\n const expectedAmountsOut = Array(poolTokens.length).fill('0');\n const minAmountsOut = Array(poolTokens.length).fill('0');\n\n expectedAmountsOut[singleTokenOutIndex] = downscaledAmountOut;\n // Apply slippage tolerance\n minAmountsOut[singleTokenOutIndex] = subSlippage(\n BigNumber.from(downscaledAmountOut),\n BigNumber.from(slippage)\n ).toString();\n\n return { minAmountsOut, expectedAmountsOut };\n };\n\n calcTokensOutGivenExactBptIn = ({\n upScaledBalances,\n totalSharesEvm,\n scalingFactors,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n | 'upScaledBalances'\n | 'totalSharesEvm'\n | 'scalingFactors'\n | 'singleTokenOutIndex'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n const amountsOut = SOR.StableMathBigInt._calcTokensOutGivenExactBptIn(\n upScaledBalances,\n BigInt(bptIn),\n totalSharesEvm\n );\n // Maths return numbers scaled to 18 decimals. Must scale down to token decimals.\n const amountsOutScaledDown = _downscaleDownArray(\n amountsOut,\n scalingFactors\n );\n\n const expectedAmountsOut = amountsOutScaledDown.map((amount) =>\n amount.toString()\n );\n // Apply slippage tolerance\n const minAmountsOut = amountsOutScaledDown.map((amount) => {\n const minAmount = subSlippage(\n BigNumber.from(amount),\n BigNumber.from(slippage)\n );\n return minAmount.toString();\n });\n return { minAmountsOut, expectedAmountsOut };\n };\n calcBptInGivenExactTokensOut = ({\n ampWithPrecision,\n upScaledBalances,\n upScaledAmountsOut,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: CalcBptInGivenExactTokensOutParams): {\n maxBPTIn: string;\n expectedBPTIn: string;\n } => {\n // Calculate expected BPT in given tokens out\n const bptIn = SOR.StableMathBigInt._calcBptInGivenExactTokensOut(\n ampWithPrecision,\n upScaledBalances,\n upScaledAmountsOut,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n // Apply slippage tolerance\n const maxBPTIn = addSlippage(\n BigNumber.from(bptIn),\n BigNumber.from(slippage)\n ).toString();\n return { maxBPTIn, expectedBPTIn: bptIn };\n };\n\n encodeExitPool = ({\n poolId,\n exiter,\n poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n }: EncodeExitParams): ExitPoolAttributes => {\n const to = balancerVault;\n const functionName = 'exitPool';\n const attributes: ExitPool = {\n poolId,\n sender: exiter,\n recipient: exiter,\n exitPoolRequest: {\n assets: poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n },\n };\n // Encode transaction data into an ABI byte string which can be sent to the network to be executed\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.exitPoolRequest,\n ]);\n return { data, to, functionName, attributes };\n };\n}\n","import * as SOR from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { balancerVault } from '@/lib/constants/config';\nimport { AssetHelpers, getEthValue, parsePoolInfo } from '@/lib/utils';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { _upscaleArray } from '@/lib/utils/solidityMaths';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport { Pool } from '@/types';\n\nimport { StablePoolPriceImpact } from '../stable/priceImpact.concern';\nimport {\n JoinConcern,\n JoinPool,\n JoinPoolAttributes,\n JoinPoolParameters,\n} from '../types';\nimport { AddressZero } from '@ethersproject/constants';\n\ntype SortedValues = {\n poolTokens: string[];\n ampWithPrecision: bigint;\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n upScaledAmountsIn: bigint[];\n sortedAmountsIn: string[];\n};\n\ntype EncodeJoinPoolParams = {\n joiner: string;\n poolId: string;\n minBPTOut: string;\n} & Pick &\n Pick;\n\nexport class StablePoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n this.checkInputs(tokensIn, amountsIn, pool);\n const sortedValues = this.sortValues({\n pool,\n wrappedNativeAsset,\n tokensIn,\n amountsIn,\n });\n\n const { expectedBPTOut, minBPTOut } = this.calcBptOutGivenExactTokensIn({\n ...sortedValues,\n slippage,\n });\n\n const encodedData = this.encodeJoinPool({\n joiner,\n amountsIn,\n tokensIn,\n poolId: pool.id,\n minBPTOut,\n ...sortedValues,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n sortedValues.sortedAmountsIn.map(BigInt),\n BigInt(expectedBPTOut),\n true\n );\n\n return {\n ...encodedData,\n minBPTOut,\n expectedBPTOut,\n priceImpact,\n };\n };\n\n /**\n * Check if the input parameters of the buildJoin function are right\n * @param amountsIn Must have an amount for each token, if the user will not deposit any amount for a token, the value shall be '0'\n * @param tokensIn Must contain all the tokens of the pool\n * @param pool The pool that is being joined\n */\n checkInputs = (amountsIn: string[], tokensIn: string[], pool: Pool): void => {\n if (\n tokensIn.length != amountsIn.length ||\n tokensIn.length != pool.tokensList.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n\n sortValues = ({\n pool,\n wrappedNativeAsset,\n amountsIn,\n tokensIn,\n }: Pick<\n JoinPoolParameters,\n 'pool' | 'wrappedNativeAsset' | 'amountsIn' | 'tokensIn'\n >): SortedValues => {\n // Parse pool info into EVM amounts in order to match amountsIn scalling\n const {\n poolTokens,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n scalingFactors,\n upScaledBalances,\n } = parsePoolInfo(pool, wrappedNativeAsset, tokensIn.includes(AddressZero));\n\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts in into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, sortedAmountsIn] = assetHelpers.sortTokens(\n tokensIn,\n amountsIn\n ) as [string[], string[]];\n\n // Maths should use upscaled amounts, e.g. 1USDC => 1e18 not 1e6\n const upScaledAmountsIn = _upscaleArray(\n sortedAmountsIn.map((a) => BigInt(a)),\n scalingFactors.map((a) => BigInt(a))\n );\n return {\n poolTokens,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n upScaledBalances,\n upScaledAmountsIn,\n sortedAmountsIn,\n };\n };\n\n calcBptOutGivenExactTokensIn = ({\n ampWithPrecision,\n upScaledBalances,\n upScaledAmountsIn,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: Pick &\n Pick<\n SortedValues,\n | 'ampWithPrecision'\n | 'upScaledBalances'\n | 'upScaledAmountsIn'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n >): { expectedBPTOut: string; minBPTOut: string } => {\n const expectedBPTOut = SOR.StableMathBigInt._calcBptOutGivenExactTokensIn(\n ampWithPrecision,\n upScaledBalances,\n upScaledAmountsIn,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n const minBPTOut = subSlippage(\n BigNumber.from(expectedBPTOut),\n BigNumber.from(slippage)\n ).toString();\n\n return {\n expectedBPTOut,\n minBPTOut,\n };\n };\n\n encodeJoinPool = ({\n poolId,\n joiner,\n poolTokens,\n sortedAmountsIn,\n amountsIn,\n tokensIn,\n minBPTOut,\n }: EncodeJoinPoolParams): Pick<\n JoinPoolAttributes,\n 'value' | 'data' | 'to' | 'functionName' | 'attributes'\n > => {\n const userData = StablePoolEncoder.joinExactTokensInForBPTOut(\n sortedAmountsIn,\n minBPTOut\n );\n\n const to = balancerVault;\n const functionName = 'joinPool';\n const attributes: JoinPool = {\n poolId,\n sender: joiner,\n recipient: joiner,\n joinPoolRequest: {\n assets: poolTokens,\n maxAmountsIn: sortedAmountsIn,\n userData,\n fromInternalBalance: false,\n },\n };\n const vaultInterface = Vault__factory.createInterface();\n // encode transaction data into an ABI byte string which can be sent to the network to be executed\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ]);\n\n // If joining with a native asset value must be set in call\n const value = getEthValue(tokensIn, amountsIn);\n\n return {\n attributes,\n data,\n functionName,\n to,\n value,\n };\n };\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { parseFixed } from '@/lib/utils/math';\n\nconst SCALING_FACTOR = 18;\n\nexport class StablePoolLiquidity implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = BigNumber.from(0);\n let sumValue = BigNumber.from(0);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(token.price.usd.toString(), SCALING_FACTOR);\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n\n const value = balance.mul(price);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance.gt(0)) {\n const avgPrice = sumValue.div(sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n\n const value = balance.mul(avgPrice);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n }\n\n return formatFixed(sumValue, SCALING_FACTOR * 2).toString();\n }\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, StablePool, ZERO } from '@balancer-labs/sor';\nimport { Pool } from '@/types';\n\nexport class StablePoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const stablePool = StablePool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = stablePool.parsePoolPairData(tokenIn, tokenOut);\n return stablePool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n }\n}\n","import { StablePoolExit } from './concerns/stable/exit.concern';\nimport { StablePoolJoin } from './concerns/stable/join.concern';\nimport { StablePoolLiquidity } from './concerns/stable/liquidity.concern';\nimport { StablePoolSpotPrice } from './concerns/stable/spotPrice.concern';\nimport { StablePoolPriceImpact } from './concerns/stable/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class Stable implements PoolType {\n constructor(\n public exit: ExitConcern = new StablePoolExit(),\n public join: JoinConcern = new StablePoolJoin(),\n public liquidity: LiquidityConcern = new StablePoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new StablePoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new StablePoolPriceImpact()\n ) {}\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, PhantomStablePool, ZERO } from '@balancer-labs/sor';\nimport { Pool } from '@/types';\n\nexport class PhantomStablePoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const metaStablePool = PhantomStablePool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = metaStablePool.parsePoolPairData(tokenIn, tokenOut);\n return metaStablePool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n }\n}\n","import { StableMathBigInt } from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { balancerVault } from '@/lib/constants/config';\nimport {\n AssetHelpers,\n parsePoolInfo,\n insert,\n reorderArrays,\n getEthValue,\n} from '@/lib/utils';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { _upscaleArray } from '@/lib/utils/solidityMaths';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { Pool } from '@/types';\n\nimport { StablePoolPriceImpact } from '../stable/priceImpact.concern';\nimport {\n JoinPoolParameters,\n JoinConcern,\n JoinPoolAttributes,\n JoinPool,\n} from '../types';\nimport { AddressZero } from '@ethersproject/constants';\n\ninterface SortedValues {\n sortedAmountsIn: string[];\n scalingFactorsWithoutBpt: bigint[];\n upScaledBalancesWithoutBpt: bigint[];\n ampWithPrecision: bigint;\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n bptIndex: number;\n poolTokens: string[];\n}\n\ntype SortedInputs = SortedValues &\n Pick & {\n poolId: string;\n };\n\nexport class ComposableStablePoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n this.checkInputs(tokensIn, amountsIn, pool.tokensList);\n\n const sortedValues = this.sortValuesBasedOnPoolVersion({\n pool,\n wrappedNativeAsset,\n amountsIn,\n tokensIn,\n });\n\n const encodedData = this.buildExactTokensInForBPTOut({\n ...sortedValues,\n slippage,\n joiner,\n poolId: pool.id,\n });\n\n // If joining with a native asset value must be set in call\n const value = getEthValue(tokensIn, amountsIn);\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n sortedValues.sortedAmountsIn.map(BigInt),\n BigInt(encodedData.expectedBPTOut),\n true\n );\n\n return {\n ...encodedData,\n to: balancerVault,\n value,\n priceImpact,\n };\n };\n\n /**\n * Sorts inputs and pool value to be correct order and scale for maths and Vault interaction.\n * @param pool Pool data\n * @param wrappedNativeAsset (Used for sorting)\n * @param amountsIn Downscaled amounts in\n * @param tokensIn Addresses of token in\n * @returns Sorted values\n */\n sortValuesBasedOnPoolVersion({\n pool,\n wrappedNativeAsset,\n amountsIn,\n tokensIn,\n }: Pick<\n JoinPoolParameters,\n 'pool' | 'wrappedNativeAsset' | 'amountsIn' | 'tokensIn'\n >): SortedValues {\n /**\n * V1: Does not have proportional exits.\n * V2: Reintroduced proportional exits. Has vulnerability.\n * V3: Fixed vulnerability. Functionally the same as V2.\n * V4: Update to use new create method with new salt parameter\n * V5: Fixed vulnerability. Functionally the same as V4.\n */\n return this.sortV1(wrappedNativeAsset, tokensIn, amountsIn, pool);\n // Not release yet and needs tests to confirm\n // else if (values.pool.poolTypeVersion === 5)\n // sortedValues = this.sortV4(\n // values.tokensIn,\n // values.amountsIn,\n // values.pool\n // );\n }\n\n /**\n * Ensure tokensIn and amountsIn match pool tokens length\n * @param tokensIn\n * @param amountsIn\n * @param poolTokens\n */\n checkInputs(\n tokensIn: string[],\n amountsIn: string[],\n poolTokens: string[]\n ): void {\n if (\n tokensIn.length != amountsIn.length ||\n tokensIn.length != poolTokens.length - 1\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n }\n\n /**\n * Encodes user data with slippage applied to expected BPT out.\n * @param expectedBPTOut\n * @param slippage\n * @param amountsIn\n * @returns\n */\n encodeUserDataExactTokensInForBPTOut(\n expectedBPTOut: bigint,\n slippage: string,\n amountsIn: string[]\n ): { userData: string; minBPTOut: string } {\n const minBPTOut = subSlippage(\n BigNumber.from(expectedBPTOut),\n BigNumber.from(slippage)\n ).toString();\n\n //NEEDS TO ENCODE USER DATA WITHOUT BPT AMOUNT\n return {\n userData: ComposableStablePoolEncoder.joinExactTokensInForBPTOut(\n amountsIn, // No BPT amount\n minBPTOut\n ),\n minBPTOut,\n };\n }\n\n /**\n * Encode transaction data into an ABI byte string which can be sent to the network to be executed\n * @param poolId\n * @param sender\n * @param recipient\n * @param assetsWithBpt\n * @param encodedUserData\n * @param maxAmountsInWithBpt\n * @returns\n */\n encodeJoinPool(\n poolId: string,\n sender: string,\n recipient: string,\n assetsWithBpt: string[],\n encodedUserData: string,\n maxAmountsInWithBpt: string[]\n ): Pick {\n const functionName = 'joinPool';\n //assets AND maxAmountsIn NEEDS THE BPT VALUE IN THE ARRAY\n const attributes: JoinPool = {\n poolId,\n sender,\n recipient,\n joinPoolRequest: {\n assets: assetsWithBpt,\n maxAmountsIn: maxAmountsInWithBpt,\n userData: encodedUserData,\n fromInternalBalance: false,\n },\n };\n\n const vaultInterface = Vault__factory.createInterface();\n\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ]);\n\n return {\n functionName,\n attributes,\n data,\n };\n }\n\n /**\n * Sorts and scales values correctly for V1-V3 ComposableStable pool.\n * @param wrappedNativeAsset (Used for sorting)\n * @param tokensIn Addresses of token in\n * @param amountsIn Downscaled amounts in\n * @param pool Pool data\n * @returns Sorted values\n */\n sortV1(\n wrappedNativeAsset: string,\n tokensIn: string[],\n amountsIn: string[],\n pool: Pool\n ): SortedValues {\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts in into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, sortedAmountsIn] = assetHelpers.sortTokens(\n tokensIn,\n amountsIn\n ) as [string[], string[]];\n\n const {\n poolTokens,\n ampWithPrecision,\n swapFeeEvm,\n totalSharesEvm,\n bptIndex,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n } = parsePoolInfo(pool, wrappedNativeAsset, tokensIn.includes(AddressZero));\n return {\n sortedAmountsIn,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n bptIndex,\n poolTokens,\n };\n }\n\n buildExactTokensInForBPTOut(\n sortedValues: SortedInputs\n ): Pick<\n JoinPoolAttributes,\n 'minBPTOut' | 'functionName' | 'attributes' | 'data' | 'expectedBPTOut'\n > {\n const {\n sortedAmountsIn,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n bptIndex,\n poolTokens,\n slippage,\n poolId,\n joiner,\n } = sortedValues;\n // BPT out will be in correct scale and price rate is always 1e18 do doesn't need to be considered\n // Maths needs to have BPT values removed\n const expectedBPTOut = this.calcBptOutGivenExactTokensIn(\n sortedAmountsIn,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm\n );\n\n const userData = this.encodeUserDataExactTokensInForBPTOut(\n expectedBPTOut,\n slippage,\n sortedAmountsIn\n );\n\n const { functionName, data, attributes } = this.encodeJoinPool(\n poolId,\n joiner,\n joiner,\n poolTokens,\n userData.userData,\n insert(sortedAmountsIn, bptIndex, '0') // Adds value for BPT\n );\n\n return {\n functionName,\n data,\n attributes,\n minBPTOut: userData.minBPTOut,\n expectedBPTOut: expectedBPTOut.toString(),\n };\n }\n\n calcBptOutGivenExactTokensIn(\n amountsIn: string[],\n scalingFactorsWithoutBpt: bigint[],\n upScaledBalancesWithoutBpt: bigint[],\n ampWithPrecision: bigint,\n totalSharesEvm: bigint,\n swapFeeEvm: bigint\n ): bigint {\n /*\n Maths should use: \n - upscaled amounts, e.g. 1USDC = 1e18\n - rates (scaling factors should include these)\n */\n const upScaledAmountsIn = _upscaleArray(\n amountsIn.map(BigInt),\n scalingFactorsWithoutBpt.map(BigInt)\n );\n const expectedBPTOut = StableMathBigInt._calcBptOutGivenExactTokensIn(\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n upScaledAmountsIn, // Should not have BPT\n totalSharesEvm,\n swapFeeEvm\n );\n // BPT out will be in correct scale and price rate is always 1e18 do doesn't need to be considered\n return expectedBPTOut;\n }\n\n // This uses sorting where BPT is always at index 0.\n // Not currently released but keep for when it is.\n sortV4(tokensIn: string[], amountsIn: string[], pool: Pool): SortedValues {\n // This will keep ordering as read from Pool\n const {\n poolTokens,\n poolTokensWithoutBpt,\n ampWithPrecision,\n swapFeeEvm,\n totalSharesEvm,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n } = parsePoolInfo(pool);\n\n // Reorder amountsIn to match pool token order TODO - May have issues when adding native tokens to this mix.\n const [sortedAmountsIn] = reorderArrays(\n poolTokensWithoutBpt,\n tokensIn,\n amountsIn\n ) as [string[]];\n return {\n sortedAmountsIn,\n scalingFactorsWithoutBpt,\n upScaledBalancesWithoutBpt,\n ampWithPrecision,\n totalSharesEvm,\n swapFeeEvm,\n bptIndex: 0,\n poolTokens,\n };\n }\n}\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\n\nimport * as SOR from '@balancer-labs/sor';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport {\n AssetHelpers,\n insert,\n isSameAddress,\n parsePoolInfo,\n} from '@/lib/utils';\nimport { addSlippage, subSlippage } from '@/lib/utils/slippageHelper';\nimport {\n _downscaleDown,\n _downscaleDownArray,\n _upscaleArray,\n} from '@/lib/utils/solidityMaths';\nimport { balancerVault } from '@/lib/constants/config';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { Pool } from '@/types';\nimport {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactBPTInParameters,\n ExitExactTokensOutAttributes,\n ExitExactTokensOutParameters,\n ExitPool,\n ExitPoolAttributes,\n} from '../types';\nimport { BasePoolEncoder } from '@/pool-base';\nimport { StablePoolPriceImpact } from '../stable/priceImpact.concern';\n\ninterface SortedValues {\n poolTokens: string[];\n ampWithPrecision: bigint;\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n bptIndex: number;\n upScaledBalancesWithoutBpt: bigint[];\n scalingFactors: bigint[];\n scalingFactorsWithoutBpt: bigint[];\n}\n\ntype ExactBPTInSortedValues = SortedValues & {\n singleTokenOutIndexWithoutBpt: number;\n};\ntype ExactTokensOutSortedValues = SortedValues & {\n upScaledAmountsOutWithoutBpt: bigint[];\n downscaledAmountsOutWithoutBpt: string[];\n downscaledAmountsOutWithBpt: string[];\n};\n\ntype CalcBptInGivenExactTokensOutParams = ExactTokensOutSortedValues &\n Pick;\n\ntype SortValuesParams = {\n pool: Pool;\n wrappedNativeAsset: string;\n shouldUnwrapNativeAsset?: boolean;\n};\n\ntype SortValuesExactBptInParams = SortValuesParams & {\n singleTokenOut?: string;\n};\n\ntype SortValuesExactTokensOutParams = SortValuesParams & {\n amountsOut: string[];\n tokensOut: string[];\n};\n\ntype EncodeExitParams = Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'toInternalBalance'\n> & {\n poolTokens: string[];\n poolId: string;\n userData: string;\n minAmountsOut: string[];\n};\n\nexport class ComposableStablePoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n });\n\n const sortedValues = this.sortValuesExitExactBptIn({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n });\n\n const { minAmountsOut, expectedAmountsOut } =\n sortedValues.singleTokenOutIndexWithoutBpt >= 0\n ? this.calcTokenOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n })\n : this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData =\n sortedValues.singleTokenOutIndexWithoutBpt >= 0\n ? ComposableStablePoolEncoder.exitExactBPTInForOneTokenOut(\n bptIn,\n sortedValues.singleTokenOutIndexWithoutBpt\n )\n : ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut(bptIn);\n\n // MinAmounts needs a value for BPT for encoding\n const minAmountsOutWithBpt = insert(\n minAmountsOut,\n sortedValues.bptIndex,\n '0'\n );\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n userData,\n minAmountsOut: minAmountsOutWithBpt,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n this.checkInputsExactTokensOut(tokensOut, amountsOut, pool);\n const sortedValues = this.sortValuesExitExactTokensOut({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n });\n\n const { bptIn, maxBPTIn } = this.calcBptInGivenExactTokensOut({\n ...sortedValues,\n slippage,\n });\n\n // Have to make sure amountsOut does not have value for BPT index\n const userData = ComposableStablePoolEncoder.exitBPTInForExactTokensOut(\n sortedValues.downscaledAmountsOutWithoutBpt,\n maxBPTIn\n );\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n minAmountsOut: sortedValues.downscaledAmountsOutWithBpt,\n userData,\n exiter,\n poolId: pool.id,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n sortedValues.downscaledAmountsOutWithoutBpt.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n maxBPTIn,\n expectedBPTIn: bptIn,\n priceImpact,\n };\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n this.checkInputsRecoveryExit({\n bptIn,\n pool,\n });\n // Recovery exits don't use rates. We use them as part of scalingFactor so default to 1 incase of issues\n pool.tokens.forEach((t) => (t.priceRate = '1'));\n\n const sortedValues = parsePoolInfo(pool);\n\n const { minAmountsOut, expectedAmountsOut } =\n this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData = BasePoolEncoder.recoveryModeExit(bptIn);\n\n // MinAmounts needs a value for BPT for encoding\n const minAmountsOutWithBpt = insert(\n minAmountsOut,\n sortedValues.bptIndex,\n '0'\n );\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n userData,\n minAmountsOut: minAmountsOutWithBpt,\n toInternalBalance,\n });\n\n const priceImpactConcern = new StablePoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt amoun in EVM scale\n * @param singleTokenOut (optional) the address of the single token that will be withdrawn, if null|undefined, all tokens will be withdrawn proportionally.\n * @param pool the pool that is being exited\n * @param shouldUnwrapNativeAsset Set true if the weth should be unwrapped to Eth\n */\n checkInputsExactBPTIn = ({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n }: Pick<\n ExitExactBPTInParameters,\n 'bptIn' | 'singleTokenOut' | 'pool' | 'shouldUnwrapNativeAsset'\n >): void => {\n if (BigNumber.from(bptIn).lte(0)) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n if (!singleTokenOut && pool.poolTypeVersion < 2) {\n throw new Error('Unsupported Exit Type For Pool');\n }\n if (\n singleTokenOut &&\n singleTokenOut !== AddressZero &&\n !pool.tokens\n .map((t) => t.address)\n .some((a) => isSameAddress(a, singleTokenOut))\n ) {\n throw new BalancerError(BalancerErrorCode.TOKEN_MISMATCH);\n }\n\n if (!shouldUnwrapNativeAsset && singleTokenOut === AddressZero)\n throw new Error(\n 'shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values'\n );\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n\n /**\n * Checks if the input of buildExitExactTokensOut is valid\n */\n checkInputsExactTokensOut = (\n tokensOut: string[],\n amountsOut: string[],\n pool: Pool\n ): void => {\n // Should have a token for input for each non-BPT pool token\n // Should be an amount out for each token out\n if (\n tokensOut.length != amountsOut.length ||\n tokensOut.length != pool.tokensList.length - 1\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt amount in EVM scale\n * @param pool the pool that is being exited\n */\n checkInputsRecoveryExit = ({\n bptIn,\n pool,\n }: Pick): void => {\n if (BigNumber.from(bptIn).lte(0)) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n if (!pool.isInRecoveryMode) {\n throw new Error(\n 'Exit type not supported because pool is not in Recovery Mode'\n );\n }\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (!pool.amp) throw new BalancerError(BalancerErrorCode.MISSING_AMP);\n };\n\n /**\n * Sorts and returns the values of amounts, tokens, balances, indexes, that are necessary to do the maths and build the exit transactions\n * @param pool\n * @param singleTokenOut\n * @param wrappedNativeAsset\n * @param shouldUnwrapNativeAsset\n * @param amountsOut\n * @param tokensOut\n */\n sortValuesExitExactBptIn = ({\n pool,\n singleTokenOut,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n }: SortValuesExactBptInParams): ExactBPTInSortedValues => {\n const parsedValues = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n let singleTokenOutIndexWithoutBpt = -1;\n if (singleTokenOut) {\n singleTokenOutIndexWithoutBpt =\n parsedValues.poolTokensWithoutBpt.indexOf(singleTokenOut);\n }\n return {\n ...parsedValues,\n singleTokenOutIndexWithoutBpt,\n };\n };\n /**\n * Sorts and returns the values of amounts, tokens, balances, indexes, that are necessary to do the maths and build the exit transactions\n * @param pool\n * @param singleTokenOut\n * @param wrappedNativeAsset\n * @param amountsOut\n * @param tokensOut\n */\n sortValuesExitExactTokensOut = ({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n }: SortValuesExactTokensOutParams): ExactTokensOutSortedValues => {\n const shouldUnwrapNativeAsset = tokensOut.some((a) => a === AddressZero);\n const parsedValues = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts out into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, downscaledAmountsOutWithoutBpt] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n const downscaledAmountsOutWithBpt = insert(\n downscaledAmountsOutWithoutBpt,\n parsedValues.bptIndex,\n '0'\n );\n\n // This should not be required but there is currently a rounding issue with maths and this will ensure tx\n const downscaledAmountsOutWithBptWithRounding =\n downscaledAmountsOutWithBpt.map((a) => {\n const value = BigNumber.from(a);\n return value.isZero() ? a : value.sub(1).toString();\n });\n\n // Maths should use upscaled amounts with rates, e.g. 1USDC => 1e18 not 1e6\n const upScaledAmountsOutWithoutBpt = _upscaleArray(\n downscaledAmountsOutWithoutBpt.map((a) => BigInt(a)),\n parsedValues.scalingFactorsWithoutBpt\n );\n\n return {\n ...parsedValues,\n upScaledAmountsOutWithoutBpt,\n downscaledAmountsOutWithBpt: downscaledAmountsOutWithBptWithRounding,\n downscaledAmountsOutWithoutBpt,\n };\n };\n /**\n * Calculate the minimum and expect amountOut of the exit with exact bpt in transaction, and passes it to minAmountsOut and expectedAmountsOut arrays passed as parameters;\n * @param sortedValues\n * @param expectedAmountsOut\n * @param minAmountsOut\n * @param bptIn\n * @param slippage\n */\n calcTokenOutGivenExactBptIn = ({\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n singleTokenOutIndexWithoutBpt,\n scalingFactorsWithoutBpt,\n totalSharesEvm,\n swapFeeEvm,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n | 'ampWithPrecision'\n | 'upScaledBalancesWithoutBpt'\n | 'singleTokenOutIndexWithoutBpt'\n | 'scalingFactorsWithoutBpt'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n // Calculate amount out given BPT in\n const amountOut = SOR.StableMathBigInt._calcTokenOutGivenExactBptIn(\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n singleTokenOutIndexWithoutBpt,\n BigInt(bptIn),\n totalSharesEvm,\n swapFeeEvm\n );\n const expectedAmountsOut = Array(upScaledBalancesWithoutBpt.length).fill(\n '0'\n );\n const minAmountsOut = Array(upScaledBalancesWithoutBpt.length).fill('0');\n // Downscales to token decimals and removes priceRate\n const downscaledAmountOut = _downscaleDown(\n amountOut,\n scalingFactorsWithoutBpt[singleTokenOutIndexWithoutBpt]\n );\n\n expectedAmountsOut[singleTokenOutIndexWithoutBpt] =\n downscaledAmountOut.toString();\n // Apply slippage tolerance\n minAmountsOut[singleTokenOutIndexWithoutBpt] = subSlippage(\n BigNumber.from(downscaledAmountOut),\n BigNumber.from(slippage)\n ).toString();\n\n return { minAmountsOut, expectedAmountsOut };\n };\n\n calcTokensOutGivenExactBptIn = ({\n upScaledBalancesWithoutBpt,\n totalSharesEvm,\n scalingFactorsWithoutBpt,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n 'upScaledBalancesWithoutBpt' | 'totalSharesEvm' | 'scalingFactorsWithoutBpt'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n const amountsOut = SOR.StableMathBigInt._calcTokensOutGivenExactBptIn(\n upScaledBalancesWithoutBpt,\n BigInt(bptIn),\n totalSharesEvm\n );\n // Maths return numbers scaled to 18 decimals. Must scale down to token decimals.\n const amountsOutScaledDown = _downscaleDownArray(\n amountsOut,\n scalingFactorsWithoutBpt\n );\n\n const expectedAmountsOut = amountsOutScaledDown.map((amount) =>\n amount.toString()\n );\n // Apply slippage tolerance\n const minAmountsOut = amountsOutScaledDown.map((amount) => {\n const minAmount = subSlippage(\n BigNumber.from(amount),\n BigNumber.from(slippage)\n );\n return minAmount.toString();\n });\n return { minAmountsOut, expectedAmountsOut };\n };\n\n /**\n * Calculate the bptIn and maxBPTIn of the exit with exact tokens out transaction and returns them;\n * @param ampWithPrecision\n * @param upScaledBalancesWithoutBpt\n * @param upScaledAmountsOut\n * @param totalSharesEvm\n * @param swapFeeEvm\n * @param slippage\n */\n calcBptInGivenExactTokensOut = ({\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n upScaledAmountsOutWithoutBpt,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: CalcBptInGivenExactTokensOutParams): {\n bptIn: string;\n maxBPTIn: string;\n } => {\n const bptIn = SOR.StableMathBigInt._calcBptInGivenExactTokensOut(\n ampWithPrecision,\n upScaledBalancesWithoutBpt,\n upScaledAmountsOutWithoutBpt,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n // Apply slippage tolerance\n const maxBPTIn = addSlippage(\n BigNumber.from(bptIn),\n BigNumber.from(slippage)\n ).toString();\n\n return { bptIn, maxBPTIn };\n };\n\n /**\n * Encodes the function data and does the final building of the exit(with exact tokens out) transaction\n * @param params\n */\n encodeExitPool = (params: EncodeExitParams): ExitPoolAttributes => {\n const {\n exiter,\n poolId,\n minAmountsOut,\n userData,\n poolTokens,\n toInternalBalance,\n } = params;\n\n const to = balancerVault;\n const functionName = 'exitPool';\n const attributes: ExitPool = {\n poolId: poolId,\n sender: exiter,\n recipient: exiter,\n exitPoolRequest: {\n assets: poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n },\n };\n\n // encode transaction data into an ABI byte string which can be sent to the network to be executed\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.exitPoolRequest,\n ]);\n\n return {\n to,\n functionName,\n attributes,\n data,\n };\n };\n}\n","import { StablePoolLiquidity } from './concerns/stable/liquidity.concern';\nimport { PhantomStablePoolSpotPrice } from './concerns/stablePhantom/spotPrice.concern';\nimport { StablePoolPriceImpact } from './concerns/stable/priceImpact.concern';\nimport { ComposableStablePoolJoin } from './concerns/composableStable/join.concern';\nimport { ComposableStablePoolExit } from './concerns/composableStable/exit.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class ComposableStable implements PoolType {\n constructor(\n public exit: ExitConcern = new ComposableStablePoolExit(),\n public liquidity: LiquidityConcern = new StablePoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new PhantomStablePoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new StablePoolPriceImpact(),\n public join: JoinConcern = new ComposableStablePoolJoin()\n ) {}\n}\n","import { PriceImpactConcern } from '@/modules/pools/pool-types/concerns/types';\nimport { calcPriceImpact } from '@/modules/pricing/priceImpact';\nimport { ONE, BZERO, _upscale } from '@/lib/utils/solidityMaths';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Pool } from '@/types';\nimport { parsePoolInfo } from '@/lib/utils';\n\nexport class WeightedPoolPriceImpact implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n if (tokenAmounts.length !== pool.tokensList.length)\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n\n // totalShares, balances and weights all scaled up to 18 decimals\n const { scalingFactorsRaw, totalSharesEvm, upScaledBalances, weights } =\n parsePoolInfo(pool);\n\n let bptZeroPriceImpact = BZERO;\n for (let i = 0; i < tokenAmounts.length; i++) {\n const price = (weights[i] * totalSharesEvm) / upScaledBalances[i];\n const amountUpscaled = _upscale(tokenAmounts[i], scalingFactorsRaw[i]);\n const newTerm = (price * amountUpscaled) / ONE;\n bptZeroPriceImpact += newTerm;\n }\n return bptZeroPriceImpact;\n }\n\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n const bptZeroPriceImpact = this.bptZeroPriceImpact(pool, tokenAmounts);\n return calcPriceImpact(bptAmount, bptZeroPriceImpact, isJoin).toString();\n }\n}\n","import { BigNumber, parseFixed } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport * as SOR from '@balancer-labs/sor';\nimport {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n ExitExactBPTInParameters,\n ExitExactTokensOutParameters,\n ExitPool,\n ExitPoolAttributes,\n} from '../types';\nimport { AssetHelpers, isSameAddress, parsePoolInfo } from '@/lib/utils';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { addSlippage, subSlippage } from '@/lib/utils/slippageHelper';\nimport { balancerVault } from '@/lib/constants/config';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport {\n _downscaleDown,\n _downscaleDownArray,\n _upscaleArray,\n} from '@/lib/utils/solidityMaths';\nimport { Pool } from '@/types';\nimport { BasePoolEncoder } from '@/pool-base';\nimport { WeightedPoolPriceImpact } from '../weighted/priceImpact.concern';\n\ninterface SortedValues {\n poolTokens: string[];\n weights: bigint[];\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n}\n\ntype ExactBPTInSortedValues = SortedValues & {\n scalingFactors: bigint[];\n singleTokenOutIndex: number;\n};\n\ntype ExactTokensOutSortedValues = SortedValues & {\n upScaledAmountsOut: bigint[];\n downScaledAmountsOut: string[];\n};\ntype CalcBptInGivenExactTokensOutParams = ExactTokensOutSortedValues &\n Pick;\n\ntype SortValuesParams = {\n pool: Pool;\n wrappedNativeAsset: string;\n shouldUnwrapNativeAsset?: boolean;\n};\n\ntype SortValuesExactBptInParams = SortValuesParams & {\n singleTokenOut?: string;\n};\n\ntype SortValuesExactTokensOutParams = SortValuesParams & {\n amountsOut: string[];\n tokensOut: string[];\n};\n\ntype EncodeExitParams = Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'toInternalBalance'\n> & {\n poolTokens: string[];\n poolId: string;\n userData: string;\n minAmountsOut: string[];\n};\n\nexport class WeightedPoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n });\n const sortedValues = this.sortValuesExitExactBptIn({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n });\n const { minAmountsOut, expectedAmountsOut } =\n sortedValues.singleTokenOutIndex >= 0\n ? this.calcTokenOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n })\n : this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData =\n sortedValues.singleTokenOutIndex >= 0\n ? WeightedPoolEncoder.exitExactBPTInForOneTokenOut(\n bptIn,\n sortedValues.singleTokenOutIndex\n )\n : WeightedPoolEncoder.exitExactBPTInForTokensOut(bptIn);\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new WeightedPoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n this.checkInputsExactTokensOut(amountsOut, tokensOut, pool);\n\n const sortedValues = this.sortValuesExitExactTokensOut({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n });\n const { expectedBPTIn, maxBPTIn } = this.calcBptInGivenExactTokensOut({\n ...sortedValues,\n slippage,\n });\n\n const { downScaledAmountsOut, poolTokens } = sortedValues;\n const userData = WeightedPoolEncoder.exitBPTInForExactTokensOut(\n downScaledAmountsOut,\n maxBPTIn\n );\n const encodedData = this.encodeExitPool({\n poolId: pool.id,\n userData,\n poolTokens,\n minAmountsOut: downScaledAmountsOut,\n exiter,\n toInternalBalance,\n });\n\n const priceImpactConcern = new WeightedPoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n downScaledAmountsOut.map(BigInt),\n BigInt(expectedBPTIn),\n false\n );\n\n return {\n ...encodedData,\n expectedBPTIn,\n maxBPTIn,\n priceImpact,\n };\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut: undefined,\n pool,\n shouldUnwrapNativeAsset: false,\n });\n // Recovery exits don't use rates. We use them as part of scalingFactor so default to 1 incase of issues\n pool.tokens.forEach((t) => (t.priceRate = '1'));\n const sortedValues = parsePoolInfo(pool);\n const { minAmountsOut, expectedAmountsOut } =\n this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n singleTokenOutIndex: -1,\n });\n\n const userData = BasePoolEncoder.recoveryModeExit(bptIn);\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new WeightedPoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt inserted in the transaction\n * @param singleTokenOut (optional) the address of the single token that will be withdrawn, if null|undefined, all tokens will be withdrawn proportionally.\n * @param pool the pool that is being exited\n * @param shouldUnwrapNativeAsset Set true if the weth should be unwrapped to Eth\n */\n checkInputsExactBPTIn = ({\n bptIn,\n singleTokenOut,\n pool,\n shouldUnwrapNativeAsset,\n }: Pick<\n ExitExactBPTInParameters,\n 'bptIn' | 'singleTokenOut' | 'pool' | 'shouldUnwrapNativeAsset'\n >): void => {\n if (!bptIn.length || parseFixed(bptIn, 18).isNegative()) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n if (\n singleTokenOut &&\n singleTokenOut !== AddressZero &&\n !pool.tokens\n .map((t) => t.address)\n .some((a) => isSameAddress(a, singleTokenOut))\n ) {\n throw new BalancerError(BalancerErrorCode.TOKEN_MISMATCH);\n }\n\n if (!shouldUnwrapNativeAsset && singleTokenOut === AddressZero)\n throw new Error(\n 'shouldUnwrapNativeAsset and singleTokenOut should not have conflicting values'\n );\n\n // Check if there's any relevant weighted pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n };\n /**\n * Checks if the input of buildExitExactTokensOut is valid\n * @param amountsOut Must have an amount for each token, if the user will not withdraw any amount for a token, the value shall be '0'\n * @param tokensOut Must contain all the tokens of the pool\n * @param pool The pool that is being exited\n */\n checkInputsExactTokensOut = (\n amountsOut: string[],\n tokensOut: string[],\n pool: Pool\n ): void => {\n if (\n tokensOut.length != amountsOut.length ||\n tokensOut.length != pool.tokensList.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n // Check if there's any important weighted pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n };\n sortValuesExitExactBptIn = ({\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n }: SortValuesExactBptInParams): ExactBPTInSortedValues => {\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n // Parse pool info into EVM amounts in order to match amountsIn scalling\n const { poolTokens } = parsedPoolInfo;\n let singleTokenOutIndex = -1;\n if (singleTokenOut) {\n singleTokenOutIndex = poolTokens.indexOf(singleTokenOut.toLowerCase());\n }\n return {\n ...parsedPoolInfo,\n singleTokenOutIndex,\n };\n };\n sortValuesExitExactTokensOut = ({\n pool,\n wrappedNativeAsset,\n amountsOut,\n tokensOut,\n }: SortValuesExactTokensOutParams): ExactTokensOutSortedValues => {\n const shouldUnwrapNativeAsset = tokensOut.some((a) => a === AddressZero);\n // Parse pool info into EVM amounts in order to match amountsOut scaling\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n const { scalingFactors } = parsedPoolInfo;\n\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // Sorts amounts in into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const [, downScaledAmountsOut] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n // Maths should use upscaled amounts, e.g. 1USDC => 1e18 not 1e6\n const upScaledAmountsOut = _upscaleArray(\n downScaledAmountsOut.map((a) => BigInt(a)),\n scalingFactors.map((a) => BigInt(a))\n );\n\n return {\n ...parsedPoolInfo,\n upScaledAmountsOut,\n downScaledAmountsOut,\n };\n };\n calcTokenOutGivenExactBptIn = ({\n poolTokens,\n weights,\n upScaledBalances,\n totalSharesEvm,\n swapFeeEvm,\n singleTokenOutIndex,\n bptIn,\n slippage,\n scalingFactors,\n }: Pick<\n ExactBPTInSortedValues,\n | 'poolTokens'\n | 'weights'\n | 'upScaledBalances'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n | 'singleTokenOutIndex'\n | 'scalingFactors'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n // Calculate amount out given BPT in\n const amountOut = SOR.WeightedMaths._calcTokenOutGivenExactBptIn(\n upScaledBalances[singleTokenOutIndex],\n weights[singleTokenOutIndex],\n BigInt(bptIn),\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n const downscaledAmountOut = _downscaleDown(\n BigInt(amountOut) - BigInt(1), // The -1 is to solve rounding errors, sometimes the amount comes 1 point lower than expected\n scalingFactors[singleTokenOutIndex]\n ).toString();\n\n const expectedAmountsOut = Array(poolTokens.length).fill('0');\n const minAmountsOut = Array(poolTokens.length).fill('0');\n\n expectedAmountsOut[singleTokenOutIndex] = downscaledAmountOut;\n // Apply slippage tolerance\n minAmountsOut[singleTokenOutIndex] = subSlippage(\n BigNumber.from(downscaledAmountOut),\n BigNumber.from(slippage)\n ).toString();\n\n return { minAmountsOut, expectedAmountsOut };\n };\n\n calcTokensOutGivenExactBptIn = ({\n upScaledBalances,\n totalSharesEvm,\n scalingFactors,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n | 'upScaledBalances'\n | 'totalSharesEvm'\n | 'scalingFactors'\n | 'singleTokenOutIndex'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n // Calculate amounts out given BPT in\n const amountsOut = SOR.WeightedMaths._calcTokensOutGivenExactBptIn(\n upScaledBalances,\n BigInt(bptIn),\n totalSharesEvm\n ).map((amount) => amount.toString());\n // Maths return numbers scaled to 18 decimals. Must scale down to token decimals.\n const amountsOutScaledDown = _downscaleDownArray(\n amountsOut.map((a) => BigInt(a)),\n scalingFactors\n );\n\n const expectedAmountsOut = amountsOutScaledDown.map((amount) =>\n amount.toString()\n );\n // Apply slippage tolerance\n const minAmountsOut = amountsOutScaledDown.map((amount) => {\n const minAmount = subSlippage(\n BigNumber.from(amount),\n BigNumber.from(slippage)\n );\n return minAmount.toString();\n });\n return { minAmountsOut, expectedAmountsOut };\n };\n calcBptInGivenExactTokensOut = ({\n weights,\n upScaledBalances,\n upScaledAmountsOut,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: CalcBptInGivenExactTokensOutParams): {\n maxBPTIn: string;\n expectedBPTIn: string;\n } => {\n // Calculate expected BPT in given tokens out\n const bptIn = SOR.WeightedMaths._calcBptInGivenExactTokensOut(\n upScaledBalances,\n weights,\n upScaledAmountsOut,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n // Apply slippage tolerance\n const maxBPTIn = addSlippage(\n BigNumber.from(bptIn),\n BigNumber.from(slippage)\n ).toString();\n return { maxBPTIn, expectedBPTIn: bptIn };\n };\n\n encodeExitPool = ({\n poolId,\n exiter,\n poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n }: EncodeExitParams): ExitPoolAttributes => {\n const to = balancerVault;\n const functionName = 'exitPool';\n const attributes: ExitPool = {\n poolId,\n sender: exiter,\n recipient: exiter,\n exitPoolRequest: {\n assets: poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n },\n };\n // Encode transaction data into an ABI byte string which can be sent to the network to be executed\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.exitPoolRequest,\n ]);\n return { data, to, functionName, attributes };\n };\n}\n","import { WeightedMaths } from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { balancerVault } from '@/lib/constants/config';\nimport { AssetHelpers, getEthValue, parsePoolInfo } from '@/lib/utils';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { _upscaleArray } from '@/lib/utils/solidityMaths';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { Address, Pool } from '@/types';\nimport {\n JoinConcern,\n JoinPool,\n JoinPoolAttributes,\n JoinPoolParameters,\n} from '../types';\nimport { WeightedPoolPriceImpact } from '../weighted/priceImpact.concern';\n\ntype SortedValues = {\n poolTokens: string[];\n weights: bigint[];\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n upScaledAmountsIn: bigint[];\n sortedAmountsIn: string[];\n};\n\nexport class WeightedPoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n this.checkInputs(amountsIn, tokensIn, pool);\n\n const sortedValues = this.sortValues({\n pool,\n wrappedNativeAsset,\n tokensIn,\n amountsIn,\n });\n\n const { expectedBPTOut, minBPTOut } = this.calcBptOutGivenExactTokensIn({\n ...sortedValues,\n slippage,\n });\n\n const encodedFunctionData = this.encodeJoinPool({\n ...sortedValues,\n poolId: pool.id,\n joiner,\n minBPTOut,\n tokensIn,\n amountsIn,\n });\n\n const priceImpactConcern = new WeightedPoolPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n sortedValues.sortedAmountsIn.map(BigInt),\n BigInt(expectedBPTOut),\n true\n );\n\n return {\n ...encodedFunctionData,\n minBPTOut,\n expectedBPTOut,\n priceImpact,\n };\n };\n\n /**\n * Check if the input parameters of the buildJoin function are right\n * @param amountsIn Must have an amount for each token, if the user will not deposit any amount for a token, the value shall be '0'\n * @param tokensIn Must contain all the tokens of the pool\n * @param pool The pool that is being joined\n */\n checkInputs = (tokensIn: string[], amountsIn: string[], pool: Pool): void => {\n if (\n tokensIn.length != amountsIn.length ||\n tokensIn.length != pool.tokensList.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n\n // Check if there's any relevant weighted pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n if (pool.tokens.some((token) => !token.weight))\n throw new BalancerError(BalancerErrorCode.MISSING_WEIGHT);\n };\n\n sortValues = ({\n pool,\n tokensIn,\n amountsIn,\n wrappedNativeAsset,\n }: Pick<\n JoinPoolParameters,\n 'pool' | 'wrappedNativeAsset' | 'amountsIn' | 'tokensIn'\n >): SortedValues => {\n const shouldUnwrapNativeAsset = tokensIn.some((a) => a === AddressZero);\n // Parse pool info into EVM amounts in order to match amountsIn scalling\n const parsedPoolInfo = parsePoolInfo(\n pool,\n wrappedNativeAsset,\n shouldUnwrapNativeAsset\n );\n\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // sort inputs\n const [, sortedAmountsIn] = assetHelpers.sortTokens(\n tokensIn,\n amountsIn\n ) as [string[], string[]];\n const upScaledAmountsIn = _upscaleArray(\n sortedAmountsIn.map(BigInt),\n parsedPoolInfo.scalingFactors\n );\n // sort pool info\n return {\n ...parsedPoolInfo,\n sortedAmountsIn,\n upScaledAmountsIn,\n };\n };\n\n calcBptOutGivenExactTokensIn = ({\n upScaledBalances,\n weights,\n upScaledAmountsIn,\n totalSharesEvm,\n swapFeeEvm,\n slippage,\n }: Pick &\n Pick<\n SortedValues,\n | 'upScaledBalances'\n | 'weights'\n | 'upScaledAmountsIn'\n | 'totalSharesEvm'\n | 'swapFeeEvm'\n >): { expectedBPTOut: string; minBPTOut: string } => {\n const expectedBPTOut = WeightedMaths._calcBptOutGivenExactTokensIn(\n upScaledBalances,\n weights,\n upScaledAmountsIn,\n totalSharesEvm,\n swapFeeEvm\n ).toString();\n\n const minBPTOut = subSlippage(\n BigNumber.from(expectedBPTOut),\n BigNumber.from(slippage)\n ).toString();\n\n return {\n expectedBPTOut,\n minBPTOut,\n };\n };\n encodeJoinPool = ({\n sortedAmountsIn,\n poolTokens,\n poolId,\n joiner,\n minBPTOut,\n amountsIn,\n tokensIn,\n }: Pick &\n Pick & {\n joiner: Address;\n poolId: string;\n minBPTOut: string;\n }): Pick<\n JoinPoolAttributes,\n 'value' | 'data' | 'to' | 'functionName' | 'attributes'\n > => {\n const userData = WeightedPoolEncoder.joinExactTokensInForBPTOut(\n sortedAmountsIn,\n minBPTOut\n );\n const to = balancerVault;\n const functionName = 'joinPool';\n const attributes: JoinPool = {\n poolId,\n sender: joiner,\n recipient: joiner,\n joinPoolRequest: {\n assets: poolTokens,\n maxAmountsIn: sortedAmountsIn,\n userData,\n fromInternalBalance: false,\n },\n };\n const vaultInterface = Vault__factory.createInterface();\n // encode transaction data into an ABI byte string which can be sent to the network to be executed\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ]);\n\n const value = getEthValue(tokensIn, amountsIn);\n\n return {\n to,\n functionName,\n data,\n attributes,\n value,\n };\n };\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { parseFixed, formatFixed } from '@/lib/utils/math';\n\nconst SCALING_FACTOR = 18;\n\nexport class WeightedPoolLiquidity implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumWeight = BigNumber.from(0);\n let sumValue = BigNumber.from(0);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n if (!token.price?.usd) {\n continue;\n }\n\n let price: BigNumber;\n if (parseFloat(token.price.usd) < 1) {\n price = parseFixed(parseFloat(token.price.usd).toFixed(10), 10).mul(\n 1e8\n );\n } else {\n price = parseFixed(token.price.usd, SCALING_FACTOR);\n }\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n const weight = parseFixed(token.weight || '0', SCALING_FACTOR);\n\n const value = balance.mul(price);\n sumValue = sumValue.add(value);\n sumWeight = sumWeight.add(weight);\n }\n\n // Scale the known prices of x% of the pool to get value of 100% of the pool.\n const totalWeight = tokens.reduce(\n (total: BigNumber, token) =>\n total.add(parseFixed(token.weight || '0', SCALING_FACTOR)),\n BigNumber.from(0)\n );\n if (sumWeight.gt(0)) {\n const liquidity = sumValue.mul(totalWeight).div(sumWeight);\n return formatFixed(liquidity, SCALING_FACTOR * 2);\n }\n\n return '0';\n }\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, WeightedPool, ZERO } from '@balancer-labs/sor';\nimport { Pool, PoolToken } from '@/types';\n\nexport class WeightedPoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const isBPTAsToken = tokenIn === pool.address || tokenOut === pool.address;\n if (isBPTAsToken) {\n const bptAsToken: PoolToken = {\n address: pool.address,\n balance: pool.totalShares,\n decimals: 18,\n priceRate: '1',\n weight: '0',\n };\n pool.tokens.push(bptAsToken);\n pool.tokensList.push(pool.address);\n }\n const weightedPool = WeightedPool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = weightedPool.parsePoolPairData(tokenIn, tokenOut);\n const spotPrice = weightedPool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n if (isBPTAsToken) {\n pool.tokens.pop();\n pool.tokensList.pop();\n }\n return spotPrice;\n }\n}\n","import { WeightedPoolExit } from './concerns/weighted/exit.concern';\nimport { WeightedPoolJoin } from './concerns/weighted/join.concern';\nimport { WeightedPoolLiquidity } from './concerns/weighted/liquidity.concern';\nimport { WeightedPoolSpotPrice } from './concerns/weighted/spotPrice.concern';\nimport { WeightedPoolPriceImpact } from './concerns/weighted/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class Weighted implements PoolType {\n constructor(\n public exit: ExitConcern = new WeightedPoolExit(),\n public join: JoinConcern = new WeightedPoolJoin(),\n public liquidity: LiquidityConcern = new WeightedPoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new WeightedPoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new WeightedPoolPriceImpact()\n ) {}\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { formatFixed } from '@ethersproject/bignumber';\nimport { parseFixed } from '@/lib/utils/math';\nimport { Zero } from '@ethersproject/constants';\n\nconst SCALING_FACTOR = 18;\n\nexport class MetaStablePoolLiquidity implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = Zero;\n let sumValue = Zero;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(token.price.usd.toString(), SCALING_FACTOR);\n\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n\n const value = balance.mul(price);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance.gt(0)) {\n const avgPrice = sumValue.div(sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n\n const value = balance.mul(avgPrice);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n }\n\n return formatFixed(sumValue, SCALING_FACTOR * 2).toString();\n }\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, MetaStablePool, ZERO } from '@balancer-labs/sor';\nimport { Pool } from '@/types';\n\nexport class MetaStablePoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const metaStablePool = MetaStablePool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = metaStablePool.parsePoolPairData(tokenIn, tokenOut);\n return metaStablePool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n }\n}\n","import { MetaStablePoolLiquidity } from './concerns/metaStable/liquidity.concern';\nimport { MetaStablePoolSpotPrice } from './concerns/metaStable/spotPrice.concern';\nimport { StablePoolPriceImpact } from './concerns/stable/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n SpotPriceConcern,\n PriceImpactConcern,\n} from './concerns/types';\nimport { StablePoolExit } from '@/modules/pools/pool-types/concerns/stable/exit.concern';\nimport { StablePoolJoin } from '@/modules/pools/pool-types/concerns/stable/join.concern';\n\nexport class MetaStable implements PoolType {\n constructor(\n public exit: ExitConcern = new StablePoolExit(),\n public join: JoinConcern = new StablePoolJoin(),\n public liquidity: LiquidityConcern = new MetaStablePoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new MetaStablePoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new StablePoolPriceImpact()\n ) {}\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport {\n ExitConcern,\n ExitExactBPTInParameters,\n ExitExactTokensOutParameters,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n} from '../types';\n\nexport class StablePhantomPoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n /**\n * Exit type only supported when pool is in paused state and pause window\n * has expired, so this type of exit will not be supported.\n */\n throw new Error('Exit type not supported');\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n throw new Error('Exit type not supported');\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n throw new Error('Exit type not supported');\n };\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { JoinPoolParameters, JoinConcern, JoinPoolAttributes } from '../types';\n\nexport class StablePhantomPoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n throw new Error('Join type not supported');\n };\n}\n","import { StablePhantomPoolExit } from './concerns/stablePhantom/exit.concern';\nimport { StablePhantomPoolJoin } from './concerns/stablePhantom/join.concern';\nimport { StablePoolLiquidity } from './concerns/stable/liquidity.concern';\nimport { PhantomStablePoolSpotPrice } from './concerns/stablePhantom/spotPrice.concern';\nimport { StablePoolPriceImpact } from './concerns/stable/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n PriceImpactConcern,\n LiquidityConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class StablePhantom implements PoolType {\n constructor(\n public exit: ExitConcern = new StablePhantomPoolExit(),\n public join: JoinConcern = new StablePhantomPoolJoin(),\n public liquidity: LiquidityConcern = new StablePoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new PhantomStablePoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new StablePoolPriceImpact()\n ) {}\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { PriceImpactConcern } from '../types';\nimport { Pool } from '@/types';\n\nexport class LinearPriceImpact implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n throw new Error('Linear Pool bptZeroPriceImpact Not Implented');\n }\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n // Linear pools don't have price impact\n return '0';\n }\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport * as SOR from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts';\nimport { balancerVault } from '@/lib/constants/config';\nimport { insert, parsePoolInfo, removeItem } from '@/lib/utils';\nimport { _downscaleDownArray } from '@/lib/utils/solidityMaths';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { BasePoolEncoder } from '@/pool-base';\n\nimport {\n ExitConcern,\n ExitExactBPTInParameters,\n ExitExactTokensOutParameters,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n ExitPoolAttributes,\n ExitPool,\n} from '../types';\nimport { LinearPriceImpact } from '../linear/priceImpact.concern';\n\ninterface SortedValues {\n bptIndex: number;\n poolTokens: string[];\n totalSharesEvm: bigint;\n swapFeeEvm: bigint;\n upScaledBalances: bigint[];\n}\n\ntype ExactBPTInSortedValues = SortedValues & {\n scalingFactors: bigint[];\n};\n\ntype EncodeExitParams = Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'toInternalBalance'\n> & {\n poolTokens: string[];\n poolId: string;\n userData: string;\n minAmountsOut: string[];\n};\n\nexport class LinearPoolExit implements ExitConcern {\n buildExitExactBPTIn = ({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n }: ExitExactBPTInParameters): ExitExactBPTInAttributes => {\n throw new Error('Exit type not supported');\n };\n\n buildExitExactTokensOut = ({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes => {\n throw new Error('Exit type not supported');\n };\n\n buildRecoveryExit = ({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage' | 'toInternalBalance'\n >): ExitExactBPTInAttributes => {\n this.checkInputsExactBPTIn({\n bptIn,\n singleTokenOut: undefined,\n pool,\n shouldUnwrapNativeAsset: false,\n });\n // Recovery exits don't use rates. We use them as part of scalingFactor so default to 1 incase of issues\n pool.tokens.forEach((t) => (t.priceRate = '1'));\n const sortedValues = parsePoolInfo(pool);\n const { minAmountsOut, expectedAmountsOut } =\n this.calcTokensOutGivenExactBptIn({\n ...sortedValues,\n bptIn,\n slippage,\n });\n\n const userData = BasePoolEncoder.recoveryModeExit(bptIn);\n\n // MinAmounts needs a value for BPT for encoding\n const minAmountsOutWithBpt = insert(\n minAmountsOut,\n sortedValues.bptIndex,\n '0'\n );\n\n const encodedData = this.encodeExitPool({\n poolTokens: sortedValues.poolTokens,\n poolId: pool.id,\n exiter,\n minAmountsOut: minAmountsOutWithBpt,\n userData,\n toInternalBalance,\n });\n\n const priceImpactConcern = new LinearPriceImpact();\n const priceImpact = priceImpactConcern.calcPriceImpact(\n pool,\n expectedAmountsOut.map(BigInt),\n BigInt(bptIn),\n false\n );\n\n return {\n ...encodedData,\n expectedAmountsOut,\n minAmountsOut,\n priceImpact,\n };\n };\n\n /**\n * Checks if the input of buildExitExactBPTIn is valid\n * @param bptIn Bpt amount in EVM scale\n * @param pool the pool that is being exited\n */\n checkInputsExactBPTIn = ({\n bptIn,\n pool,\n }: Pick<\n ExitExactBPTInParameters,\n 'bptIn' | 'singleTokenOut' | 'pool' | 'shouldUnwrapNativeAsset'\n >): void => {\n if (BigNumber.from(bptIn).lte(0)) {\n throw new BalancerError(BalancerErrorCode.INPUT_OUT_OF_BOUNDS);\n }\n\n // Check if there's any relevant stable pool info missing\n if (pool.tokens.some((token) => token.decimals === undefined))\n throw new BalancerError(BalancerErrorCode.MISSING_DECIMALS);\n };\n\n calcTokensOutGivenExactBptIn = ({\n bptIndex,\n upScaledBalances,\n totalSharesEvm,\n scalingFactors,\n bptIn,\n slippage,\n }: Pick<\n ExactBPTInSortedValues,\n 'bptIndex' | 'upScaledBalances' | 'totalSharesEvm' | 'scalingFactors'\n > &\n Pick): {\n minAmountsOut: string[];\n expectedAmountsOut: string[];\n } => {\n const amountsOut = SOR.LinearMaths._calcTokensOutGivenExactBptIn(\n upScaledBalances,\n BigInt(bptIn),\n totalSharesEvm,\n bptIndex\n );\n // Maths return numbers scaled to 18 decimals. Must scale down to token decimals.\n const amountsOutScaledDown = _downscaleDownArray(\n amountsOut,\n scalingFactors\n );\n\n const expectedAmountsOut = removeItem(amountsOutScaledDown, bptIndex).map(\n (amount) => amount.toString()\n );\n // Apply slippage tolerance\n const minAmountsOut = expectedAmountsOut.map((amount) => {\n const minAmount = subSlippage(\n BigNumber.from(amount),\n BigNumber.from(slippage)\n );\n return minAmount.toString();\n });\n return { minAmountsOut, expectedAmountsOut };\n };\n\n /**\n * Encodes the function data and does the final building of the exit(with exact tokens out) transaction\n * @param params\n */\n encodeExitPool = (params: EncodeExitParams): ExitPoolAttributes => {\n const {\n exiter,\n poolId,\n minAmountsOut,\n userData,\n poolTokens,\n toInternalBalance,\n } = params;\n\n const to = balancerVault;\n const functionName = 'exitPool';\n const attributes: ExitPool = {\n poolId: poolId,\n sender: exiter,\n recipient: exiter,\n exitPoolRequest: {\n assets: poolTokens,\n minAmountsOut,\n userData,\n toInternalBalance,\n },\n };\n\n // encode transaction data into an ABI byte string which can be sent to the network to be executed\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.exitPoolRequest,\n ]);\n\n return {\n to,\n functionName,\n attributes,\n data,\n };\n };\n}\n","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { JoinPoolParameters, JoinConcern, JoinPoolAttributes } from '../types';\n\nexport class LinearPoolJoin implements JoinConcern {\n buildJoin = ({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n }: JoinPoolParameters): JoinPoolAttributes => {\n throw new Error('Join type not supported');\n };\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { parseFixed, formatFixed } from '@/lib/utils/math';\nimport { Zero } from '@ethersproject/constants';\n\nconst SCALING_FACTOR = 18;\nconst ONE = parseFixed('1', SCALING_FACTOR);\n\nexport class LinearPoolLiquidity implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = Zero;\n let sumValue = Zero;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(token.price.usd.toString(), SCALING_FACTOR);\n\n const balance = parseFixed(token.balance, SCALING_FACTOR);\n const value = balance.mul(price);\n\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance.gt(0)) {\n const avgPrice = sumValue.div(sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const priceRate = parseFixed(token.priceRate || '1', SCALING_FACTOR);\n\n // Apply priceRate to scale the balance correctly\n const balance = parseFixed(token.balance, SCALING_FACTOR)\n .mul(priceRate)\n .div(ONE);\n\n const value = balance.mul(avgPrice);\n sumValue = sumValue.add(value);\n sumBalance = sumBalance.add(balance);\n }\n }\n\n return formatFixed(sumValue, SCALING_FACTOR * 2);\n }\n}\n","import { SpotPriceConcern } from '../types';\nimport { SubgraphPoolBase, LinearPool, ZERO } from '@balancer-labs/sor';\nimport { Pool } from '@/types';\n\nexport class LinearPoolSpotPrice implements SpotPriceConcern {\n calcPoolSpotPrice(tokenIn: string, tokenOut: string, pool: Pool): string {\n const linearPool = LinearPool.fromPool(pool as SubgraphPoolBase);\n const poolPairData = linearPool.parsePoolPairData(tokenIn, tokenOut);\n return linearPool\n ._spotPriceAfterSwapExactTokenInForTokenOut(poolPairData, ZERO)\n .toString();\n }\n}\n","import { LinearPoolExit } from './concerns/linear/exit.concern';\nimport { LinearPoolJoin } from './concerns/linear/join.concern';\nimport { LinearPoolLiquidity } from './concerns/linear/liquidity.concern';\nimport { LinearPoolSpotPrice } from './concerns/linear/spotPrice.concern';\nimport { LinearPriceImpact } from './concerns/linear/priceImpact.concern';\nimport { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from './concerns/types';\n\nexport class Linear implements PoolType {\n constructor(\n public exit: ExitConcern = new LinearPoolExit(),\n public join: JoinConcern = new LinearPoolJoin(),\n public liquidity: LiquidityConcern = new LinearPoolLiquidity(),\n public spotPriceCalculator: SpotPriceConcern = new LinearPoolSpotPrice(),\n public priceImpactCalculator: PriceImpactConcern = new LinearPriceImpact()\n ) {}\n}\n","import {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactTokensOutAttributes,\n} from '@/modules/pools/pool-types/concerns/types';\n\nexport class FXExitConcern implements ExitConcern {\n buildExitExactTokensOut(): ExitExactTokensOutAttributes {\n throw new Error('FXExitConcern Not implemented');\n }\n\n buildRecoveryExit(): ExitExactBPTInAttributes {\n throw new Error('FXExitConcern Not implemented');\n }\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { formatFixed } from '@ethersproject/bignumber';\nimport { parseFixed } from '@/lib/utils/math';\nimport { SolidityMaths } from '@/lib/utils/solidityMaths';\n\nconst SCALING_FACTOR = 18;\n\nexport class FXLiquidityConcern implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = BigInt(0);\n let sumValue = BigInt(0);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(\n token.price.usd.toString(),\n SCALING_FACTOR\n ).toBigInt();\n const balance = parseFixed(token.balance, SCALING_FACTOR).toBigInt();\n\n const value = SolidityMaths.mulDownFixed(balance, price);\n sumValue = SolidityMaths.add(sumValue, value);\n sumBalance = SolidityMaths.add(sumBalance, balance);\n }\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance > BigInt(0)) {\n const avgPrice = SolidityMaths.divDownFixed(sumValue, sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const balance = parseFixed(token.balance, SCALING_FACTOR).toBigInt();\n\n const value = SolidityMaths.mulDownFixed(balance, avgPrice);\n sumValue = SolidityMaths.add(sumValue, value);\n sumBalance = SolidityMaths.add(sumBalance, balance);\n }\n }\n return formatFixed(sumValue.toString(), SCALING_FACTOR).toString();\n }\n}\n","import { SpotPriceConcern } from '@/modules/pools/pool-types/concerns/types';\n\nexport class FXSpotPriceConcern implements SpotPriceConcern {\n calcPoolSpotPrice(): string {\n throw new Error('FXSpotPriceConcern Not implemented');\n }\n}\n","import { PriceImpactConcern } from '@/modules/pools/pool-types/concerns/types';\nimport { Pool } from '@/types';\n\nexport class FXPriceImpactConcern implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n console.log(pool, tokenAmounts);\n throw new Error('Not implemented');\n }\n\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n console.log(pool, tokenAmounts, bptAmount, isJoin);\n throw new Error('Not implemented');\n }\n}\n","import {\n JoinConcern,\n JoinPoolAttributes,\n} from '@/modules/pools/pool-types/concerns/types';\n\nexport class FXJoinConcern implements JoinConcern {\n buildJoin(): JoinPoolAttributes {\n throw new Error('FXJoinConcern Not implemented');\n }\n}\n","import { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from '@/modules/pools/pool-types/concerns/types';\nimport { FXExitConcern } from '@/modules/pools/pool-types/concerns/fx/exit.concern';\nimport { FXLiquidityConcern } from '@/modules/pools/pool-types/concerns/fx/liquidity.concern';\nimport { FXSpotPriceConcern } from '@/modules/pools/pool-types/concerns/fx/spotPrice.concern';\nimport { FXPriceImpactConcern } from '@/modules/pools/pool-types/concerns/fx/priceImpact.concern';\nimport { FXJoinConcern } from '@/modules/pools/pool-types/concerns/fx/join.concern';\n\nexport class FX implements PoolType {\n constructor(\n public exit: ExitConcern = new FXExitConcern(),\n public liquidity: LiquidityConcern = new FXLiquidityConcern(),\n public spotPriceCalculator: SpotPriceConcern = new FXSpotPriceConcern(),\n public priceImpactCalculator: PriceImpactConcern = new FXPriceImpactConcern(),\n public join: JoinConcern = new FXJoinConcern()\n ) {}\n}\n","import {\n ExitConcern,\n ExitExactBPTInAttributes,\n ExitExactBPTInParameters,\n ExitExactTokensOutAttributes,\n ExitExactTokensOutParameters,\n} from '@/modules/pools/pool-types/concerns/types';\n\nexport class GyroExitConcern implements ExitConcern {\n buildExitExactTokensOut({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n }: ExitExactTokensOutParameters): ExitExactTokensOutAttributes {\n console.log(\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset\n );\n throw new Error('Not implemented');\n }\n\n buildRecoveryExit({\n exiter,\n pool,\n bptIn,\n slippage,\n }: Pick<\n ExitExactBPTInParameters,\n 'exiter' | 'pool' | 'bptIn' | 'slippage'\n >): ExitExactBPTInAttributes {\n console.log(exiter, pool, bptIn, slippage);\n throw new Error('Not implemented');\n }\n}\n","import { LiquidityConcern } from '../types';\nimport { PoolToken } from '@/types';\nimport { formatFixed } from '@ethersproject/bignumber';\nimport { parseFixed } from '@/lib/utils/math';\nimport { SolidityMaths } from '@/lib/utils/solidityMaths';\n\nconst SCALING_FACTOR = 18;\n\nexport class GyroLiquidityConcern implements LiquidityConcern {\n calcTotal(tokens: PoolToken[]): string {\n let sumBalance = BigInt(0);\n let sumValue = BigInt(0);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n // if a token's price is unknown, ignore it\n // it will be computed at the next step\n if (!token.price?.usd) {\n continue;\n }\n\n const price = parseFixed(\n token.price.usd.toString(),\n SCALING_FACTOR\n ).toBigInt();\n const balance = parseFixed(token.balance, SCALING_FACTOR).toBigInt();\n\n const value = SolidityMaths.mulDownFixed(balance, price);\n sumValue = SolidityMaths.add(sumValue, value);\n sumBalance = SolidityMaths.add(sumBalance, balance);\n }\n // if at least the partial value of the pool is known\n // then compute the rest of the value of tokens with unknown prices\n if (sumBalance > BigInt(0)) {\n const avgPrice = SolidityMaths.divDownFixed(sumValue, sumBalance);\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n\n if (token.price?.usd) {\n continue;\n }\n\n const balance = parseFixed(token.balance, SCALING_FACTOR).toBigInt();\n\n const value = SolidityMaths.mulDownFixed(balance, avgPrice);\n sumValue = SolidityMaths.add(sumValue, value);\n sumBalance = SolidityMaths.add(sumBalance, balance);\n }\n }\n return formatFixed(sumValue.toString(), SCALING_FACTOR).toString();\n }\n}\n","import { SpotPriceConcern } from '@/modules/pools/pool-types/concerns/types';\n\nexport class GyroSpotPriceConcern implements SpotPriceConcern {\n calcPoolSpotPrice(): string {\n throw new Error('GyroSpotPriceConcern Not implemented');\n }\n}\n","import { PriceImpactConcern } from '@/modules/pools/pool-types/concerns/types';\nimport { Pool } from '@/types';\n\nexport class GyroPriceImpactConcern implements PriceImpactConcern {\n bptZeroPriceImpact(pool: Pool, tokenAmounts: bigint[]): bigint {\n console.log(pool, tokenAmounts);\n throw new Error('Not implemented');\n }\n\n calcPriceImpact(\n pool: Pool,\n tokenAmounts: bigint[],\n bptAmount: bigint,\n isJoin: boolean\n ): string {\n console.log(pool, tokenAmounts, bptAmount, isJoin);\n throw new Error('Not implemented');\n }\n}\n","import {\n JoinConcern,\n JoinPoolAttributes,\n} from '@/modules/pools/pool-types/concerns/types';\n\nexport class GyroJoinConcern implements JoinConcern {\n buildJoin(): JoinPoolAttributes {\n throw new Error('GyroJoinConcern Not implemented');\n }\n}\n","import { PoolType } from './pool-type.interface';\nimport {\n ExitConcern,\n JoinConcern,\n LiquidityConcern,\n PriceImpactConcern,\n SpotPriceConcern,\n} from '@/modules/pools/pool-types/concerns/types';\nimport { GyroExitConcern } from '@/modules/pools/pool-types/concerns/gyro/exit.concern';\nimport { GyroLiquidityConcern } from '@/modules/pools/pool-types/concerns/gyro/liquidity.concern';\nimport { GyroSpotPriceConcern } from '@/modules/pools/pool-types/concerns/gyro/spotPrice.concern';\nimport { GyroPriceImpactConcern } from '@/modules/pools/pool-types/concerns/gyro/priceImpact.concern';\nimport { GyroJoinConcern } from '@/modules/pools/pool-types/concerns/gyro/join.concern';\n\nexport class Gyro implements PoolType {\n constructor(\n public exit: ExitConcern = new GyroExitConcern(),\n public liquidity: LiquidityConcern = new GyroLiquidityConcern(),\n public spotPriceCalculator: SpotPriceConcern = new GyroSpotPriceConcern(),\n public priceImpactCalculator: PriceImpactConcern = new GyroPriceImpactConcern(),\n public join: JoinConcern = new GyroJoinConcern()\n ) {}\n}\n","import { BalancerSdkConfig, PoolType } from '@/types';\nimport { Stable } from './pool-types/stable.module';\nimport { ComposableStable } from './pool-types/composableStable.module';\nimport { Weighted } from './pool-types/weighted.module';\nimport { MetaStable } from './pool-types/metaStable.module';\nimport { StablePhantom } from './pool-types/stablePhantom.module';\nimport { Linear } from './pool-types/linear.module';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { isLinearish } from '@/lib/utils';\nimport { FX } from '@/modules/pools/pool-types/fx.module';\nimport { Gyro } from '@/modules/pools/pool-types/gyro.module';\n\n/**\n * Wrapper around pool type specific methods.\n *\n * Returns a class instance of a type specific method handlers.\n */\nexport class PoolTypeConcerns {\n constructor(\n config: BalancerSdkConfig,\n public weighted = new Weighted(),\n public stable = new Stable(),\n public composableStable = new ComposableStable(),\n public metaStable = new MetaStable(),\n public stablePhantom = new StablePhantom(),\n public linear = new Linear()\n ) {}\n\n static from(\n poolType: PoolType\n ):\n | Weighted\n | Stable\n | ComposableStable\n | MetaStable\n | StablePhantom\n | Linear {\n // Calculate spot price using pool type\n switch (poolType) {\n case 'ComposableStable': {\n return new ComposableStable();\n }\n case 'FX': {\n return new FX();\n }\n case 'GyroE':\n case 'Gyro2':\n case 'Gyro3': {\n return new Gyro();\n }\n case 'MetaStable': {\n return new MetaStable();\n }\n case 'Stable': {\n return new Stable();\n }\n case 'StablePhantom': {\n return new StablePhantom();\n }\n case 'Investment':\n case 'LiquidityBootstrapping':\n case 'Weighted': {\n return new Weighted();\n }\n default: {\n // Handles all Linear pool types\n if (isLinearish(poolType)) return new Linear();\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n }\n }\n}\n","import { Findable, Pool, PoolToken, Price } from '@/types';\nimport { PoolAttribute } from '../data';\nimport { PoolTypeConcerns } from '../pools/pool-type-concerns';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { formatFixed, parseFixed } from '@/lib/utils/math';\n\nconst SCALE = 18;\n\nexport interface PoolBPTValue {\n address: string;\n liquidity: string;\n}\n\nexport class Liquidity {\n constructor(\n private pools: Findable,\n private tokenPrices: Findable\n ) {}\n\n async getLiquidity(pool: Pool): Promise {\n // Remove any tokens with same address as pool as they are pre-printed BPT\n const parsedTokens = pool.tokens.filter((token) => {\n return token.address !== pool.address;\n });\n\n // For all tokens that are pools (BPT), recurse into them and fetch their liquidity\n const subPoolLiquidity = await Promise.all(\n parsedTokens.map(async (token) => {\n const pool = await this.pools.findBy('address', token.address);\n if (!pool) return;\n\n const liquidity = parseFixed(await this.getLiquidity(pool), SCALE);\n const totalBPT = parseFixed(pool.totalShares, SCALE);\n const bptInParentPool = parseFixed(token.balance, SCALE);\n const liquidityInParentPool = totalBPT.eq(0)\n ? 0\n : liquidity.mul(bptInParentPool).div(totalBPT);\n\n return {\n address: pool.address,\n liquidity: liquidityInParentPool.toString(),\n };\n })\n );\n\n const totalSubPoolLiquidity = subPoolLiquidity.reduce(\n (totalLiquidity, subPool) => {\n return totalLiquidity.add(\n subPool ? subPool.liquidity : BigNumber.from(0)\n );\n },\n BigNumber.from(0)\n );\n\n // Filter tokens within pool that are not BPT themselves\n const nonPoolTokens = parsedTokens.filter((token) => {\n return !subPoolLiquidity.find((pool) => pool?.address === token.address);\n });\n\n // Update price using tokenPrices repository\n const nonPoolTokensWithUpdatedPrice: PoolToken[] = await Promise.all(\n nonPoolTokens.map(async (token) => {\n const tokenPrice = await this.tokenPrices.find(token.address);\n const poolToken: PoolToken = {\n address: token.address,\n decimals: token.decimals,\n priceRate: token.priceRate,\n price: (tokenPrice?.usd && tokenPrice) || {\n usd: token.token?.latestUSDPrice,\n },\n balance: token.balance,\n weight: token.weight,\n };\n return poolToken;\n })\n );\n\n // TODO: Just in case we need it soon. Otherwise remove without mercy.\n // Any of the tokens is missing the price, use subgraph totalLiquidity\n // if(nonPoolTokensWithUpdatedPrice.map((t) => t.price?.usd).indexOf(undefined) > -1) {\n // return pool.totalLiquidity\n // }\n\n const tokenLiquidity = PoolTypeConcerns.from(\n pool.poolType\n ).liquidity.calcTotal(nonPoolTokensWithUpdatedPrice);\n\n const parsedTokenLiquidity = parseFixed(tokenLiquidity, SCALE);\n\n const totalLiquidity = totalSubPoolLiquidity.add(parsedTokenLiquidity);\n\n return formatFixed(totalLiquidity, SCALE);\n }\n\n async getBptPrice(pool: Pool): Promise {\n const liquidity = await this.getLiquidity(pool);\n return (parseFloat(liquidity) / parseFloat(pool.totalShares)).toString();\n }\n}\n","import { LiquidityGauge } from '@/modules/data';\nimport { BigNumber } from '@ethersproject/bignumber';\n\nexport interface Tokens {\n [tokenAddress: string]: BigNumber;\n}\n\nexport interface GaugeTokens {\n [gaugeAddress: string]: Tokens;\n}\n\nexport interface ReduceGaugeTokens {\n (p: GaugeTokens, address: string, index: number): GaugeTokens;\n}\n\nexport interface ReduceGaugeRewards {\n (\n rewards: GaugeTokens,\n path: { gauge: string; token: string },\n index: number\n ): GaugeTokens;\n}\n\nexport const ZERO = BigNumber.from('0');\n\nexport const filterTokens = (tokens: Tokens): Tokens => {\n if (!tokens) return {};\n return Object.keys(tokens)\n .filter((token) => tokens[token].gt(ZERO))\n .reduce((obj: Tokens, token) => {\n obj[token] = tokens[token];\n return obj;\n }, {});\n};\n\nexport const populateGauge = (\n gauge: LiquidityGauge,\n rewards: GaugeTokens,\n tokens: GaugeTokens\n): LiquidityGauge => {\n if (!rewards[gauge.address] && !tokens[gauge.address]) return gauge;\n const claimableRewards = filterTokens(rewards[gauge.address]);\n const claimableTokens = filterTokens(tokens[gauge.address]);\n gauge.claimableTokens ||= {\n ...claimableRewards,\n ...claimableTokens,\n };\n return gauge;\n};\n\nexport const populateGauges = (\n gauges: LiquidityGauge[],\n claimableRewards: GaugeTokens,\n claimableTokens: GaugeTokens\n): LiquidityGauge[] => {\n return gauges\n .map((gauge) => populateGauge(gauge, claimableRewards, claimableTokens))\n .filter(\n (it) => it.claimableTokens && Object.keys(it.claimableTokens).length\n );\n};\n\nexport const reduceClaimableRewards = (res0x: string[]): ReduceGaugeRewards => {\n return (\n rewards: GaugeTokens,\n path: { gauge: string; token: string },\n index: number\n ): GaugeTokens => {\n const value = BigNumber.from(`${res0x[index]}`);\n if (value.gt(ZERO)) {\n rewards[path.gauge] ||= {};\n rewards[path.gauge][path.token] = value;\n }\n return rewards;\n };\n};\n\nexport const reduceClaimableTokens = (\n res0x: string[],\n balAddress: string\n): ReduceGaugeTokens => {\n return (p: GaugeTokens, address: string, index: number): GaugeTokens => {\n const value = BigNumber.from(`${res0x[index]}`);\n if (value.gt(ZERO)) {\n p[address] ||= {};\n p[address][balAddress] = value;\n }\n return p;\n };\n};\n\nexport const reduceRewardTokens = (\n result: { [gaugeAddress: string]: string[] },\n gauge: LiquidityGauge\n): { [gaugeAddress: string]: string[] } => {\n if (gauge.rewardTokens) {\n for (const key of Object.keys(gauge.rewardTokens)) {\n result[gauge.id] ||= [];\n result[gauge.id].push(key);\n }\n }\n return result;\n};\n","import { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Network } from '@/lib/constants';\nimport { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { Multicall } from '@/contracts';\nimport {\n FeeDistributorRepository,\n LiquidityGauge,\n LiquidityGaugeSubgraphRPCProvider,\n} from '@/modules/data';\nimport { Interface } from '@ethersproject/abi';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport {\n GaugeTokens,\n populateGauges,\n reduceClaimableRewards,\n reduceClaimableTokens,\n reduceRewardTokens,\n ZERO,\n} from './helper';\n\nconst liquidityGaugeV5Interface = new Interface([\n 'function claim_rewards(address sender, address receiver) returns (uint256)',\n 'function claimable_tokens(address addr) view returns (uint256)',\n 'function claimable_reward(address addr, address token) view returns (uint256)',\n]);\n\nconst balancerMinterInterface = new Interface([\n 'function mintMany(address[] gauges) returns (uint256)',\n]);\n\nconst gaugeClaimHelperInterface = new Interface([\n 'function getPendingRewards(address gauge, address user, address token) view returns (uint256)',\n 'function claimRewardsFromGauges(address[] gauges, address user)',\n]);\n\nexport interface TransactionData {\n to: string;\n from: string;\n callData: string;\n tokensOut: string[];\n expectedTokensValue: BigNumber[];\n functionName: string;\n}\n\nexport interface TokenBalance {\n [token: string]: BigNumber;\n}\n\nexport interface IClaimService {\n getClaimableRewardTokens(userAddress: string): Promise;\n buildClaimRewardTokensRequest(\n gaugeAddresses: string[],\n userAddress: string\n ): Promise;\n getClaimableVeBalTokens(\n userAddress: string,\n claimableTokens: string[]\n ): Promise;\n buildClaimVeBalTokensRequest(\n userAddress: string,\n claimableTokens: string[]\n ): Promise;\n}\n\nexport class ClaimService implements IClaimService {\n private readonly liquidityGauges: LiquidityGaugeSubgraphRPCProvider;\n private readonly gaugeClaimHelperAddress?: string;\n private readonly balancerMinterAddress?: string;\n private readonly chainId: Network;\n private readonly feeDistributor: FeeDistributorRepository | undefined;\n\n constructor(\n liquidityGauges: LiquidityGaugeSubgraphRPCProvider,\n feeDistributor: FeeDistributorRepository | undefined,\n chainId: Network,\n private multicall: Multicall,\n gaugeClaimHelperAddress?: string,\n balancerMinterAddress?: string\n ) {\n this.liquidityGauges = liquidityGauges;\n this.feeDistributor = feeDistributor;\n this.chainId = chainId;\n this.gaugeClaimHelperAddress = gaugeClaimHelperAddress;\n this.balancerMinterAddress = balancerMinterAddress;\n }\n\n /**\n * Get a list of liquidity gauges populated with the claimable tokens for the user.\n *\n * @param userAddress the user's account address\n */\n async getClaimableRewardTokens(\n userAddress: string\n ): Promise {\n const gauges = await this.getGauges();\n if (!gauges.length)\n throw new BalancerError(BalancerErrorCode.GAUGES_NOT_FOUND);\n\n const gaugeAddresses = gauges.map((it) => it.address);\n const rewardTokens = this.getRewardTokens(gauges);\n\n const claimableTokens = await this.retrieveClaimableTokens(\n gaugeAddresses,\n userAddress\n );\n const claimableRewards = await this.retrieveClaimableRewards(\n rewardTokens,\n userAddress\n );\n return populateGauges(gauges, claimableRewards, claimableTokens);\n }\n\n /**\n * Returns the data to be signed to claim the tokens on a list of liquidity gauges.\n * Only the tokens with balance will be claimed.\n *\n * @param gaugeAddresses the liquidity gauges' addresses\n * @param userAddress the user's account address\n * @throws error if no claimable token is found\n */\n async buildClaimRewardTokensRequest(\n gaugeAddresses: string[],\n userAddress: string\n ): Promise {\n if (this.chainId === 1 || this.chainId === 5) {\n if (!this.balancerMinterAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED\n );\n } else {\n if (!this.gaugeClaimHelperAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED\n );\n }\n const allGauges = await this.getClaimableRewardTokens(userAddress);\n const gauges = allGauges\n .filter((it) =>\n gaugeAddresses\n .map((it) => it.toLowerCase())\n .includes(it.address.toLowerCase())\n )\n .filter(\n (it) => it.claimableTokens && Object.keys(it.claimableTokens).length\n );\n const claimableTokens = Array.from(\n new Set(\n gauges\n .map((gauge) => gauge.claimableTokens)\n .map((tokens) => Object.keys(tokens || {}))\n .flatMap((it) => it)\n )\n );\n if (!claimableTokens.length)\n throw new BalancerError(BalancerErrorCode.GAUGES_REWARD_TOKEN_EMPTY);\n const expectedValues = claimableTokens.map((tokenAddress) => {\n return gauges.reduce((value: BigNumber, gauge) => {\n if (\n gauge.claimableTokens &&\n gauge.claimableTokens[tokenAddress] &&\n gauge.claimableTokens[tokenAddress] !== ZERO\n )\n value = gauge.claimableTokens[tokenAddress].add(value);\n return value;\n }, BigNumber.from(0));\n });\n if (!expectedValues.length || expectedValues.every((it) => it.eq(ZERO)))\n throw new BalancerError(BalancerErrorCode.REWARD_TOKEN_ZERO);\n if (this.chainId === 1 || this.chainId === 5) {\n if (!this.balancerMinterAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED\n );\n const callData = balancerMinterInterface.encodeFunctionData('mintMany', [\n gaugeAddresses,\n ]);\n return {\n to: this.balancerMinterAddress,\n from: userAddress,\n callData: callData,\n tokensOut: claimableTokens,\n expectedTokensValue: expectedValues,\n functionName: 'mintMany',\n };\n } else {\n if (!this.gaugeClaimHelperAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED\n );\n const callData = gaugeClaimHelperInterface.encodeFunctionData(\n 'claimRewardsFromGauges',\n [gaugeAddresses, userAddress]\n );\n return {\n to: this.gaugeClaimHelperAddress,\n from: userAddress,\n callData: callData,\n tokensOut: claimableTokens,\n expectedTokensValue: expectedValues,\n functionName: 'claimRewardsFromGauges',\n };\n }\n }\n\n /**\n * returns all the tokens' balance for protocol revenue and veBal incentives.\n *\n * @param userAddress the user's account address\n * @param claimableTokens the list of tokens for which the balance is desired\n */\n async getClaimableVeBalTokens(\n userAddress: string,\n claimableTokens: string[]\n ): Promise {\n if (!this.feeDistributor)\n throw new BalancerError(BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED);\n return this.feeDistributor?.getClaimableBalances(\n userAddress,\n claimableTokens\n );\n }\n\n /**\n * Returns the data to be signed to claim the tokens for protocol revenue and veBal incentives.\n *\n * @param userAddress the user's account address\n * @param claimableTokens the list of tokens to be claimed\n * @throws error if no claimable token is found\n */\n async buildClaimVeBalTokensRequest(\n userAddress: string,\n claimableTokens: string[]\n ): Promise {\n if (!this.feeDistributor)\n throw new BalancerError(BalancerErrorCode.FEE_PROVIDER_NOT_PROVIDED);\n const tokenBalance = await this.feeDistributor.getClaimableBalances(\n userAddress,\n claimableTokens\n );\n const expectedTokensValue = claimableTokens.map(\n (it) => tokenBalance[it] ?? ZERO\n );\n if (expectedTokensValue.every((it) => it.eq(ZERO)))\n throw new BalancerError(BalancerErrorCode.REWARD_TOKEN_ZERO);\n const callData = this.feeDistributor.claimBalances(\n userAddress,\n claimableTokens\n );\n return {\n to: this.feeDistributor.feeDistributor.address,\n from: userAddress,\n callData: callData,\n tokensOut: claimableTokens,\n expectedTokensValue: expectedTokensValue,\n functionName: 'claimTokens',\n };\n }\n\n // Private Functions\n\n private async getGauges(): Promise {\n return await this.liquidityGauges.fetch();\n }\n\n private getRewardTokens(gauges: LiquidityGauge[]): {\n [gaugeAddress: string]: string[];\n } {\n return gauges.reduce(reduceRewardTokens, {});\n }\n\n private async retrieveClaimableRewards(\n rewardTokens: { [address: string]: string[] },\n userAddress: string\n ): Promise {\n const gaugeAddresses = Object.keys(rewardTokens);\n const { payload, paths } = this.getPayload(\n gaugeAddresses,\n rewardTokens,\n userAddress\n );\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n return paths.reduce(reduceClaimableRewards(res0x), {});\n }\n\n private getPayload(\n gaugeAddresses: string[],\n rewardTokens: { [address: string]: string[] },\n userAddress: string\n ): {\n payload: { target: string; callData: string }[];\n paths: { gauge: string; token: string }[];\n } {\n const payload = [];\n const paths: { gauge: string; token: string }[] = [];\n for (const gaugeAddress of gaugeAddresses) {\n for (const tokenAddress of rewardTokens[gaugeAddress]) {\n paths.push({ gauge: gaugeAddress, token: tokenAddress });\n payload.push(\n this.getArguments(userAddress, gaugeAddress, tokenAddress)\n );\n }\n }\n return { payload, paths };\n }\n\n private getArguments(\n userAddress: string,\n gaugeAddress: string,\n tokenAddress: string\n ): { target: string; callData: string } {\n if (this.chainId === 1 || this.chainId === 5) {\n return {\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'claimable_reward',\n [userAddress, tokenAddress]\n ),\n };\n }\n if (!this.gaugeClaimHelperAddress)\n throw new BalancerError(\n BalancerErrorCode.GAUGES_HELPER_ADDRESS_NOT_PROVIDED\n );\n return {\n target: this.gaugeClaimHelperAddress,\n callData: gaugeClaimHelperInterface.encodeFunctionData(\n 'getPendingRewards',\n [gaugeAddress, userAddress, tokenAddress]\n ),\n };\n }\n\n private async retrieveClaimableTokens(\n gaugeAddresses: string[],\n userAddress: string\n ): Promise {\n if (this.chainId === Network.MAINNET || this.chainId === Network.GOERLI) {\n const balAddress = BALANCER_NETWORK_CONFIG[this.chainId].addresses.tokens\n .bal as string;\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'claimable_tokens',\n [userAddress]\n ),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n return gaugeAddresses.reduce(\n reduceClaimableTokens(res0x, balAddress),\n {}\n );\n }\n return {};\n }\n}\n","import { BigNumberish } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport { SOR, SwapTypes, SwapInfo } from '@balancer-labs/sor';\nimport { SwapType, BatchSwapStep, FundManagement } from './types';\nimport { Vault } from '@/contracts/Vault';\n\n/*\n * queryBatchSwap simulates a call to `batchSwap`, returning an array of Vault asset deltas. Calls to `swap` cannot be\n * simulated directly, but an equivalent `batchSwap` call can and will yield the exact same result.\n *\n * Each element in the array corresponds to the asset at the same index, and indicates the number of tokens (or ETH)\n * the Vault would take from the sender (if positive) or send to the recipient (if negative). The arguments it\n * receives are the same that an equivalent `batchSwap` call would receive.\n */\nexport async function queryBatchSwap(\n vaultContract: Vault,\n swapType: SwapType,\n swaps: BatchSwapStep[],\n assets: string[]\n): Promise {\n const funds: FundManagement = {\n sender: AddressZero,\n recipient: AddressZero,\n fromInternalBalance: false,\n toInternalBalance: false,\n };\n\n try {\n const deltas = await vaultContract.callStatic.queryBatchSwap(\n swapType,\n swaps,\n assets,\n funds\n );\n return deltas.map((d: BigNumberish) => d.toString());\n } catch (err) {\n throw `queryBatchSwap call error: ${err}`;\n }\n}\n\n/*\nUse SOR to get swapInfo for tokenIn>tokenOut.\nSwapInfos.swaps has path information.\n*/\nexport async function getSorSwapInfo(\n tokenIn: string,\n tokenOut: string,\n swapType: SwapType,\n amount: string,\n sor: SOR\n): Promise {\n const swapTypeSOR: SwapTypes =\n swapType === SwapType.SwapExactIn\n ? SwapTypes.SwapExactIn\n : SwapTypes.SwapExactOut;\n const swapInfo = await sor.getSwaps(\n tokenIn.toLowerCase(),\n tokenOut.toLowerCase(),\n swapTypeSOR,\n amount\n );\n return swapInfo;\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import { __assign } from \"tslib\";\nimport { parse } from 'graphql';\nvar docCache = new Map();\nvar fragmentSourceMap = new Map();\nvar printFragmentWarnings = true;\nvar experimentalFragmentVariables = false;\nfunction normalize(string) {\n return string.replace(/[\\s,]+/g, ' ').trim();\n}\nfunction cacheKeyFromLoc(loc) {\n return normalize(loc.source.body.substring(loc.start, loc.end));\n}\nfunction processFragments(ast) {\n var seenKeys = new Set();\n var definitions = [];\n ast.definitions.forEach(function (fragmentDefinition) {\n if (fragmentDefinition.kind === 'FragmentDefinition') {\n var fragmentName = fragmentDefinition.name.value;\n var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc);\n var sourceKeySet = fragmentSourceMap.get(fragmentName);\n if (sourceKeySet && !sourceKeySet.has(sourceKey)) {\n if (printFragmentWarnings) {\n console.warn(\"Warning: fragment with name \" + fragmentName + \" already exists.\\n\"\n + \"graphql-tag enforces all fragment names across your application to be unique; read more about\\n\"\n + \"this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names\");\n }\n }\n else if (!sourceKeySet) {\n fragmentSourceMap.set(fragmentName, sourceKeySet = new Set);\n }\n sourceKeySet.add(sourceKey);\n if (!seenKeys.has(sourceKey)) {\n seenKeys.add(sourceKey);\n definitions.push(fragmentDefinition);\n }\n }\n else {\n definitions.push(fragmentDefinition);\n }\n });\n return __assign(__assign({}, ast), { definitions: definitions });\n}\nfunction stripLoc(doc) {\n var workSet = new Set(doc.definitions);\n workSet.forEach(function (node) {\n if (node.loc)\n delete node.loc;\n Object.keys(node).forEach(function (key) {\n var value = node[key];\n if (value && typeof value === 'object') {\n workSet.add(value);\n }\n });\n });\n var loc = doc.loc;\n if (loc) {\n delete loc.startToken;\n delete loc.endToken;\n }\n return doc;\n}\nfunction parseDocument(source) {\n var cacheKey = normalize(source);\n if (!docCache.has(cacheKey)) {\n var parsed = parse(source, {\n experimentalFragmentVariables: experimentalFragmentVariables,\n allowLegacyFragmentVariables: experimentalFragmentVariables\n });\n if (!parsed || parsed.kind !== 'Document') {\n throw new Error('Not a valid GraphQL document.');\n }\n docCache.set(cacheKey, stripLoc(processFragments(parsed)));\n }\n return docCache.get(cacheKey);\n}\nexport function gql(literals) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (typeof literals === 'string') {\n literals = [literals];\n }\n var result = literals[0];\n args.forEach(function (arg, i) {\n if (arg && arg.kind === 'Document') {\n result += arg.loc.source.body;\n }\n else {\n result += arg;\n }\n result += literals[i + 1];\n });\n return parseDocument(result);\n}\nexport function resetCaches() {\n docCache.clear();\n fragmentSourceMap.clear();\n}\nexport function disableFragmentWarnings() {\n printFragmentWarnings = false;\n}\nexport function enableExperimentalFragmentVariables() {\n experimentalFragmentVariables = true;\n}\nexport function disableExperimentalFragmentVariables() {\n experimentalFragmentVariables = false;\n}\nvar extras = {\n gql: gql,\n resetCaches: resetCaches,\n disableFragmentWarnings: disableFragmentWarnings,\n enableExperimentalFragmentVariables: enableExperimentalFragmentVariables,\n disableExperimentalFragmentVariables: disableExperimentalFragmentVariables\n};\n(function (gql_1) {\n gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;\n})(gql || (gql = {}));\ngql[\"default\"] = gql;\nexport default gql;\n//# sourceMappingURL=index.js.map","import { GraphQLClient } from 'graphql-request';\nimport * as Dom from 'graphql-request/dist/types.dom';\nimport gql from 'graphql-tag';\nexport type Maybe = T | null;\nexport type InputMaybe = Maybe;\nexport type Exact = { [K in keyof T]: T[K] };\nexport type MakeOptional = Omit & { [SubKey in K]?: Maybe };\nexport type MakeMaybe = Omit & { [SubKey in K]: Maybe };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: string;\n String: string;\n Boolean: boolean;\n Int: number;\n Float: number;\n BigDecimal: string;\n BigInt: string;\n Bytes: string;\n Int8: any;\n};\n\nexport type AmpUpdate = {\n __typename?: 'AmpUpdate';\n endAmp: Scalars['BigInt'];\n endTimestamp: Scalars['BigInt'];\n id: Scalars['ID'];\n poolId: Pool;\n scheduledTimestamp: Scalars['Int'];\n startAmp: Scalars['BigInt'];\n startTimestamp: Scalars['BigInt'];\n};\n\nexport type AmpUpdate_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n endAmp?: InputMaybe;\n endAmp_gt?: InputMaybe;\n endAmp_gte?: InputMaybe;\n endAmp_in?: InputMaybe>;\n endAmp_lt?: InputMaybe;\n endAmp_lte?: InputMaybe;\n endAmp_not?: InputMaybe;\n endAmp_not_in?: InputMaybe>;\n endTimestamp?: InputMaybe;\n endTimestamp_gt?: InputMaybe;\n endTimestamp_gte?: InputMaybe;\n endTimestamp_in?: InputMaybe>;\n endTimestamp_lt?: InputMaybe;\n endTimestamp_lte?: InputMaybe;\n endTimestamp_not?: InputMaybe;\n endTimestamp_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n scheduledTimestamp?: InputMaybe;\n scheduledTimestamp_gt?: InputMaybe;\n scheduledTimestamp_gte?: InputMaybe;\n scheduledTimestamp_in?: InputMaybe>;\n scheduledTimestamp_lt?: InputMaybe;\n scheduledTimestamp_lte?: InputMaybe;\n scheduledTimestamp_not?: InputMaybe;\n scheduledTimestamp_not_in?: InputMaybe>;\n startAmp?: InputMaybe;\n startAmp_gt?: InputMaybe;\n startAmp_gte?: InputMaybe;\n startAmp_in?: InputMaybe>;\n startAmp_lt?: InputMaybe;\n startAmp_lte?: InputMaybe;\n startAmp_not?: InputMaybe;\n startAmp_not_in?: InputMaybe>;\n startTimestamp?: InputMaybe;\n startTimestamp_gt?: InputMaybe;\n startTimestamp_gte?: InputMaybe;\n startTimestamp_in?: InputMaybe>;\n startTimestamp_lt?: InputMaybe;\n startTimestamp_lte?: InputMaybe;\n startTimestamp_not?: InputMaybe;\n startTimestamp_not_in?: InputMaybe>;\n};\n\nexport enum AmpUpdate_OrderBy {\n EndAmp = 'endAmp',\n EndTimestamp = 'endTimestamp',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n ScheduledTimestamp = 'scheduledTimestamp',\n StartAmp = 'startAmp',\n StartTimestamp = 'startTimestamp'\n}\n\nexport type Balancer = {\n __typename?: 'Balancer';\n id: Scalars['ID'];\n poolCount: Scalars['Int'];\n pools?: Maybe>;\n protocolFeesCollector?: Maybe;\n totalLiquidity: Scalars['BigDecimal'];\n totalProtocolFee?: Maybe;\n totalSwapCount: Scalars['BigInt'];\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n};\n\n\nexport type BalancerPoolsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type BalancerSnapshot = {\n __typename?: 'BalancerSnapshot';\n id: Scalars['ID'];\n poolCount: Scalars['Int'];\n timestamp: Scalars['Int'];\n totalLiquidity: Scalars['BigDecimal'];\n totalProtocolFee?: Maybe;\n totalSwapCount: Scalars['BigInt'];\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n vault: Balancer;\n};\n\nexport type BalancerSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolCount?: InputMaybe;\n poolCount_gt?: InputMaybe;\n poolCount_gte?: InputMaybe;\n poolCount_in?: InputMaybe>;\n poolCount_lt?: InputMaybe;\n poolCount_lte?: InputMaybe;\n poolCount_not?: InputMaybe;\n poolCount_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n totalLiquidity?: InputMaybe;\n totalLiquidity_gt?: InputMaybe;\n totalLiquidity_gte?: InputMaybe;\n totalLiquidity_in?: InputMaybe>;\n totalLiquidity_lt?: InputMaybe;\n totalLiquidity_lte?: InputMaybe;\n totalLiquidity_not?: InputMaybe;\n totalLiquidity_not_in?: InputMaybe>;\n totalProtocolFee?: InputMaybe;\n totalProtocolFee_gt?: InputMaybe;\n totalProtocolFee_gte?: InputMaybe;\n totalProtocolFee_in?: InputMaybe>;\n totalProtocolFee_lt?: InputMaybe;\n totalProtocolFee_lte?: InputMaybe;\n totalProtocolFee_not?: InputMaybe;\n totalProtocolFee_not_in?: InputMaybe>;\n totalSwapCount?: InputMaybe;\n totalSwapCount_gt?: InputMaybe;\n totalSwapCount_gte?: InputMaybe;\n totalSwapCount_in?: InputMaybe>;\n totalSwapCount_lt?: InputMaybe;\n totalSwapCount_lte?: InputMaybe;\n totalSwapCount_not?: InputMaybe;\n totalSwapCount_not_in?: InputMaybe>;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n vault?: InputMaybe;\n vault_?: InputMaybe;\n vault_contains?: InputMaybe;\n vault_contains_nocase?: InputMaybe;\n vault_ends_with?: InputMaybe;\n vault_ends_with_nocase?: InputMaybe;\n vault_gt?: InputMaybe;\n vault_gte?: InputMaybe;\n vault_in?: InputMaybe>;\n vault_lt?: InputMaybe;\n vault_lte?: InputMaybe;\n vault_not?: InputMaybe;\n vault_not_contains?: InputMaybe;\n vault_not_contains_nocase?: InputMaybe;\n vault_not_ends_with?: InputMaybe;\n vault_not_ends_with_nocase?: InputMaybe;\n vault_not_in?: InputMaybe>;\n vault_not_starts_with?: InputMaybe;\n vault_not_starts_with_nocase?: InputMaybe;\n vault_starts_with?: InputMaybe;\n vault_starts_with_nocase?: InputMaybe;\n};\n\nexport enum BalancerSnapshot_OrderBy {\n Id = 'id',\n PoolCount = 'poolCount',\n Timestamp = 'timestamp',\n TotalLiquidity = 'totalLiquidity',\n TotalProtocolFee = 'totalProtocolFee',\n TotalSwapCount = 'totalSwapCount',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume',\n Vault = 'vault',\n VaultId = 'vault__id',\n VaultPoolCount = 'vault__poolCount',\n VaultProtocolFeesCollector = 'vault__protocolFeesCollector',\n VaultTotalLiquidity = 'vault__totalLiquidity',\n VaultTotalProtocolFee = 'vault__totalProtocolFee',\n VaultTotalSwapCount = 'vault__totalSwapCount',\n VaultTotalSwapFee = 'vault__totalSwapFee',\n VaultTotalSwapVolume = 'vault__totalSwapVolume'\n}\n\nexport type Balancer_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolCount?: InputMaybe;\n poolCount_gt?: InputMaybe;\n poolCount_gte?: InputMaybe;\n poolCount_in?: InputMaybe>;\n poolCount_lt?: InputMaybe;\n poolCount_lte?: InputMaybe;\n poolCount_not?: InputMaybe;\n poolCount_not_in?: InputMaybe>;\n pools_?: InputMaybe;\n protocolFeesCollector?: InputMaybe;\n protocolFeesCollector_contains?: InputMaybe;\n protocolFeesCollector_gt?: InputMaybe;\n protocolFeesCollector_gte?: InputMaybe;\n protocolFeesCollector_in?: InputMaybe>;\n protocolFeesCollector_lt?: InputMaybe;\n protocolFeesCollector_lte?: InputMaybe;\n protocolFeesCollector_not?: InputMaybe;\n protocolFeesCollector_not_contains?: InputMaybe;\n protocolFeesCollector_not_in?: InputMaybe>;\n totalLiquidity?: InputMaybe;\n totalLiquidity_gt?: InputMaybe;\n totalLiquidity_gte?: InputMaybe;\n totalLiquidity_in?: InputMaybe>;\n totalLiquidity_lt?: InputMaybe;\n totalLiquidity_lte?: InputMaybe;\n totalLiquidity_not?: InputMaybe;\n totalLiquidity_not_in?: InputMaybe>;\n totalProtocolFee?: InputMaybe;\n totalProtocolFee_gt?: InputMaybe;\n totalProtocolFee_gte?: InputMaybe;\n totalProtocolFee_in?: InputMaybe>;\n totalProtocolFee_lt?: InputMaybe;\n totalProtocolFee_lte?: InputMaybe;\n totalProtocolFee_not?: InputMaybe;\n totalProtocolFee_not_in?: InputMaybe>;\n totalSwapCount?: InputMaybe;\n totalSwapCount_gt?: InputMaybe;\n totalSwapCount_gte?: InputMaybe;\n totalSwapCount_in?: InputMaybe>;\n totalSwapCount_lt?: InputMaybe;\n totalSwapCount_lte?: InputMaybe;\n totalSwapCount_not?: InputMaybe;\n totalSwapCount_not_in?: InputMaybe>;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n};\n\nexport enum Balancer_OrderBy {\n Id = 'id',\n PoolCount = 'poolCount',\n Pools = 'pools',\n ProtocolFeesCollector = 'protocolFeesCollector',\n TotalLiquidity = 'totalLiquidity',\n TotalProtocolFee = 'totalProtocolFee',\n TotalSwapCount = 'totalSwapCount',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume'\n}\n\nexport type BlockChangedFilter = {\n number_gte: Scalars['Int'];\n};\n\nexport type Block_Height = {\n hash?: InputMaybe;\n number?: InputMaybe;\n number_gte?: InputMaybe;\n};\n\nexport type CircuitBreaker = {\n __typename?: 'CircuitBreaker';\n bptPrice: Scalars['BigDecimal'];\n id: Scalars['ID'];\n lowerBoundPercentage: Scalars['BigDecimal'];\n pool: Pool;\n token: PoolToken;\n upperBoundPercentage: Scalars['BigDecimal'];\n};\n\nexport type CircuitBreaker_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n bptPrice?: InputMaybe;\n bptPrice_gt?: InputMaybe;\n bptPrice_gte?: InputMaybe;\n bptPrice_in?: InputMaybe>;\n bptPrice_lt?: InputMaybe;\n bptPrice_lte?: InputMaybe;\n bptPrice_not?: InputMaybe;\n bptPrice_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n lowerBoundPercentage?: InputMaybe;\n lowerBoundPercentage_gt?: InputMaybe;\n lowerBoundPercentage_gte?: InputMaybe;\n lowerBoundPercentage_in?: InputMaybe>;\n lowerBoundPercentage_lt?: InputMaybe;\n lowerBoundPercentage_lte?: InputMaybe;\n lowerBoundPercentage_not?: InputMaybe;\n lowerBoundPercentage_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n token?: InputMaybe;\n token_?: InputMaybe;\n token_contains?: InputMaybe;\n token_contains_nocase?: InputMaybe;\n token_ends_with?: InputMaybe;\n token_ends_with_nocase?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_contains_nocase?: InputMaybe;\n token_not_ends_with?: InputMaybe;\n token_not_ends_with_nocase?: InputMaybe;\n token_not_in?: InputMaybe>;\n token_not_starts_with?: InputMaybe;\n token_not_starts_with_nocase?: InputMaybe;\n token_starts_with?: InputMaybe;\n token_starts_with_nocase?: InputMaybe;\n upperBoundPercentage?: InputMaybe;\n upperBoundPercentage_gt?: InputMaybe;\n upperBoundPercentage_gte?: InputMaybe;\n upperBoundPercentage_in?: InputMaybe>;\n upperBoundPercentage_lt?: InputMaybe;\n upperBoundPercentage_lte?: InputMaybe;\n upperBoundPercentage_not?: InputMaybe;\n upperBoundPercentage_not_in?: InputMaybe>;\n};\n\nexport enum CircuitBreaker_OrderBy {\n BptPrice = 'bptPrice',\n Id = 'id',\n LowerBoundPercentage = 'lowerBoundPercentage',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n Token = 'token',\n TokenAddress = 'token__address',\n TokenAssetManager = 'token__assetManager',\n TokenBalance = 'token__balance',\n TokenCashBalance = 'token__cashBalance',\n TokenDecimals = 'token__decimals',\n TokenId = 'token__id',\n TokenIndex = 'token__index',\n TokenIsExemptFromYieldProtocolFee = 'token__isExemptFromYieldProtocolFee',\n TokenManagedBalance = 'token__managedBalance',\n TokenName = 'token__name',\n TokenOldPriceRate = 'token__oldPriceRate',\n TokenPaidProtocolFees = 'token__paidProtocolFees',\n TokenPriceRate = 'token__priceRate',\n TokenSymbol = 'token__symbol',\n TokenWeight = 'token__weight',\n UpperBoundPercentage = 'upperBoundPercentage'\n}\n\nexport type GradualWeightUpdate = {\n __typename?: 'GradualWeightUpdate';\n endTimestamp: Scalars['BigInt'];\n endWeights: Array;\n id: Scalars['ID'];\n poolId: Pool;\n scheduledTimestamp: Scalars['Int'];\n startTimestamp: Scalars['BigInt'];\n startWeights: Array;\n};\n\nexport type GradualWeightUpdate_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n endTimestamp?: InputMaybe;\n endTimestamp_gt?: InputMaybe;\n endTimestamp_gte?: InputMaybe;\n endTimestamp_in?: InputMaybe>;\n endTimestamp_lt?: InputMaybe;\n endTimestamp_lte?: InputMaybe;\n endTimestamp_not?: InputMaybe;\n endTimestamp_not_in?: InputMaybe>;\n endWeights?: InputMaybe>;\n endWeights_contains?: InputMaybe>;\n endWeights_contains_nocase?: InputMaybe>;\n endWeights_not?: InputMaybe>;\n endWeights_not_contains?: InputMaybe>;\n endWeights_not_contains_nocase?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n scheduledTimestamp?: InputMaybe;\n scheduledTimestamp_gt?: InputMaybe;\n scheduledTimestamp_gte?: InputMaybe;\n scheduledTimestamp_in?: InputMaybe>;\n scheduledTimestamp_lt?: InputMaybe;\n scheduledTimestamp_lte?: InputMaybe;\n scheduledTimestamp_not?: InputMaybe;\n scheduledTimestamp_not_in?: InputMaybe>;\n startTimestamp?: InputMaybe;\n startTimestamp_gt?: InputMaybe;\n startTimestamp_gte?: InputMaybe;\n startTimestamp_in?: InputMaybe>;\n startTimestamp_lt?: InputMaybe;\n startTimestamp_lte?: InputMaybe;\n startTimestamp_not?: InputMaybe;\n startTimestamp_not_in?: InputMaybe>;\n startWeights?: InputMaybe>;\n startWeights_contains?: InputMaybe>;\n startWeights_contains_nocase?: InputMaybe>;\n startWeights_not?: InputMaybe>;\n startWeights_not_contains?: InputMaybe>;\n startWeights_not_contains_nocase?: InputMaybe>;\n};\n\nexport enum GradualWeightUpdate_OrderBy {\n EndTimestamp = 'endTimestamp',\n EndWeights = 'endWeights',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n ScheduledTimestamp = 'scheduledTimestamp',\n StartTimestamp = 'startTimestamp',\n StartWeights = 'startWeights'\n}\n\nexport enum InvestType {\n Exit = 'Exit',\n Join = 'Join'\n}\n\nexport type JoinExit = {\n __typename?: 'JoinExit';\n amounts: Array;\n id: Scalars['ID'];\n pool: Pool;\n sender: Scalars['Bytes'];\n timestamp: Scalars['Int'];\n tx: Scalars['Bytes'];\n type: InvestType;\n user: User;\n valueUSD?: Maybe;\n};\n\nexport type JoinExit_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n amounts?: InputMaybe>;\n amounts_contains?: InputMaybe>;\n amounts_contains_nocase?: InputMaybe>;\n amounts_not?: InputMaybe>;\n amounts_not_contains?: InputMaybe>;\n amounts_not_contains_nocase?: InputMaybe>;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n sender?: InputMaybe;\n sender_contains?: InputMaybe;\n sender_gt?: InputMaybe;\n sender_gte?: InputMaybe;\n sender_in?: InputMaybe>;\n sender_lt?: InputMaybe;\n sender_lte?: InputMaybe;\n sender_not?: InputMaybe;\n sender_not_contains?: InputMaybe;\n sender_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n tx?: InputMaybe;\n tx_contains?: InputMaybe;\n tx_gt?: InputMaybe;\n tx_gte?: InputMaybe;\n tx_in?: InputMaybe>;\n tx_lt?: InputMaybe;\n tx_lte?: InputMaybe;\n tx_not?: InputMaybe;\n tx_not_contains?: InputMaybe;\n tx_not_in?: InputMaybe>;\n type?: InputMaybe;\n type_in?: InputMaybe>;\n type_not?: InputMaybe;\n type_not_in?: InputMaybe>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n valueUSD?: InputMaybe;\n valueUSD_gt?: InputMaybe;\n valueUSD_gte?: InputMaybe;\n valueUSD_in?: InputMaybe>;\n valueUSD_lt?: InputMaybe;\n valueUSD_lte?: InputMaybe;\n valueUSD_not?: InputMaybe;\n valueUSD_not_in?: InputMaybe>;\n};\n\nexport enum JoinExit_OrderBy {\n Amounts = 'amounts',\n Id = 'id',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n Sender = 'sender',\n Timestamp = 'timestamp',\n Tx = 'tx',\n Type = 'type',\n User = 'user',\n UserId = 'user__id',\n ValueUsd = 'valueUSD'\n}\n\nexport type LatestPrice = {\n __typename?: 'LatestPrice';\n asset: Scalars['Bytes'];\n block: Scalars['BigInt'];\n id: Scalars['ID'];\n poolId: Pool;\n price: Scalars['BigDecimal'];\n pricingAsset: Scalars['Bytes'];\n};\n\nexport type LatestPrice_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n asset?: InputMaybe;\n asset_contains?: InputMaybe;\n asset_gt?: InputMaybe;\n asset_gte?: InputMaybe;\n asset_in?: InputMaybe>;\n asset_lt?: InputMaybe;\n asset_lte?: InputMaybe;\n asset_not?: InputMaybe;\n asset_not_contains?: InputMaybe;\n asset_not_in?: InputMaybe>;\n block?: InputMaybe;\n block_gt?: InputMaybe;\n block_gte?: InputMaybe;\n block_in?: InputMaybe>;\n block_lt?: InputMaybe;\n block_lte?: InputMaybe;\n block_not?: InputMaybe;\n block_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n price?: InputMaybe;\n price_gt?: InputMaybe;\n price_gte?: InputMaybe;\n price_in?: InputMaybe>;\n price_lt?: InputMaybe;\n price_lte?: InputMaybe;\n price_not?: InputMaybe;\n price_not_in?: InputMaybe>;\n pricingAsset?: InputMaybe;\n pricingAsset_contains?: InputMaybe;\n pricingAsset_gt?: InputMaybe;\n pricingAsset_gte?: InputMaybe;\n pricingAsset_in?: InputMaybe>;\n pricingAsset_lt?: InputMaybe;\n pricingAsset_lte?: InputMaybe;\n pricingAsset_not?: InputMaybe;\n pricingAsset_not_contains?: InputMaybe;\n pricingAsset_not_in?: InputMaybe>;\n};\n\nexport enum LatestPrice_OrderBy {\n Asset = 'asset',\n Block = 'block',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n Price = 'price',\n PricingAsset = 'pricingAsset'\n}\n\nexport type ManagementOperation = {\n __typename?: 'ManagementOperation';\n cashDelta: Scalars['BigDecimal'];\n id: Scalars['ID'];\n managedDelta: Scalars['BigDecimal'];\n poolTokenId: PoolToken;\n timestamp: Scalars['Int'];\n type: OperationType;\n};\n\nexport type ManagementOperation_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n cashDelta?: InputMaybe;\n cashDelta_gt?: InputMaybe;\n cashDelta_gte?: InputMaybe;\n cashDelta_in?: InputMaybe>;\n cashDelta_lt?: InputMaybe;\n cashDelta_lte?: InputMaybe;\n cashDelta_not?: InputMaybe;\n cashDelta_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n managedDelta?: InputMaybe;\n managedDelta_gt?: InputMaybe;\n managedDelta_gte?: InputMaybe;\n managedDelta_in?: InputMaybe>;\n managedDelta_lt?: InputMaybe;\n managedDelta_lte?: InputMaybe;\n managedDelta_not?: InputMaybe;\n managedDelta_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolTokenId?: InputMaybe;\n poolTokenId_?: InputMaybe;\n poolTokenId_contains?: InputMaybe;\n poolTokenId_contains_nocase?: InputMaybe;\n poolTokenId_ends_with?: InputMaybe;\n poolTokenId_ends_with_nocase?: InputMaybe;\n poolTokenId_gt?: InputMaybe;\n poolTokenId_gte?: InputMaybe;\n poolTokenId_in?: InputMaybe>;\n poolTokenId_lt?: InputMaybe;\n poolTokenId_lte?: InputMaybe;\n poolTokenId_not?: InputMaybe;\n poolTokenId_not_contains?: InputMaybe;\n poolTokenId_not_contains_nocase?: InputMaybe;\n poolTokenId_not_ends_with?: InputMaybe;\n poolTokenId_not_ends_with_nocase?: InputMaybe;\n poolTokenId_not_in?: InputMaybe>;\n poolTokenId_not_starts_with?: InputMaybe;\n poolTokenId_not_starts_with_nocase?: InputMaybe;\n poolTokenId_starts_with?: InputMaybe;\n poolTokenId_starts_with_nocase?: InputMaybe;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n type?: InputMaybe;\n type_in?: InputMaybe>;\n type_not?: InputMaybe;\n type_not_in?: InputMaybe>;\n};\n\nexport enum ManagementOperation_OrderBy {\n CashDelta = 'cashDelta',\n Id = 'id',\n ManagedDelta = 'managedDelta',\n PoolTokenId = 'poolTokenId',\n PoolTokenIdAddress = 'poolTokenId__address',\n PoolTokenIdAssetManager = 'poolTokenId__assetManager',\n PoolTokenIdBalance = 'poolTokenId__balance',\n PoolTokenIdCashBalance = 'poolTokenId__cashBalance',\n PoolTokenIdDecimals = 'poolTokenId__decimals',\n PoolTokenIdId = 'poolTokenId__id',\n PoolTokenIdIndex = 'poolTokenId__index',\n PoolTokenIdIsExemptFromYieldProtocolFee = 'poolTokenId__isExemptFromYieldProtocolFee',\n PoolTokenIdManagedBalance = 'poolTokenId__managedBalance',\n PoolTokenIdName = 'poolTokenId__name',\n PoolTokenIdOldPriceRate = 'poolTokenId__oldPriceRate',\n PoolTokenIdPaidProtocolFees = 'poolTokenId__paidProtocolFees',\n PoolTokenIdPriceRate = 'poolTokenId__priceRate',\n PoolTokenIdSymbol = 'poolTokenId__symbol',\n PoolTokenIdWeight = 'poolTokenId__weight',\n Timestamp = 'timestamp',\n Type = 'type'\n}\n\nexport enum OperationType {\n Deposit = 'Deposit',\n Update = 'Update',\n Withdraw = 'Withdraw'\n}\n\n/** Defines the order direction, either ascending or descending */\nexport enum OrderDirection {\n Asc = 'asc',\n Desc = 'desc'\n}\n\nexport type Pool = {\n __typename?: 'Pool';\n address: Scalars['Bytes'];\n alpha?: Maybe;\n amp?: Maybe;\n ampUpdates?: Maybe>;\n baseToken?: Maybe;\n beta?: Maybe;\n c?: Maybe;\n circuitBreakers?: Maybe>;\n createTime: Scalars['Int'];\n dSq?: Maybe;\n delta?: Maybe;\n epsilon?: Maybe;\n expiryTime?: Maybe;\n factory?: Maybe;\n historicalValues?: Maybe>;\n holdersCount: Scalars['BigInt'];\n id: Scalars['ID'];\n isInRecoveryMode?: Maybe;\n isPaused?: Maybe;\n joinExitEnabled?: Maybe;\n lambda?: Maybe;\n lastJoinExitAmp?: Maybe;\n lastPostJoinExitInvariant?: Maybe;\n latestAmpUpdate?: Maybe;\n lowerTarget?: Maybe;\n mainIndex?: Maybe;\n managementAumFee?: Maybe;\n managementFee?: Maybe;\n mustAllowlistLPs?: Maybe;\n name?: Maybe;\n oracleEnabled: Scalars['Boolean'];\n owner?: Maybe;\n poolType?: Maybe;\n poolTypeVersion?: Maybe;\n priceRateProviders?: Maybe>;\n principalToken?: Maybe;\n protocolAumFeeCache?: Maybe;\n protocolId?: Maybe;\n protocolIdData?: Maybe;\n protocolSwapFeeCache?: Maybe;\n protocolYieldFeeCache?: Maybe;\n root3Alpha?: Maybe;\n s?: Maybe;\n shares?: Maybe>;\n snapshots?: Maybe>;\n sqrtAlpha?: Maybe;\n sqrtBeta?: Maybe;\n strategyType: Scalars['Int'];\n /** Indicates if a pool can be swapped against. Combines multiple sources, including offchain curation */\n swapEnabled: Scalars['Boolean'];\n /** External indication from an offchain permissioned actor */\n swapEnabledCurationSignal?: Maybe;\n /** The native swapEnabled boolean. internal to the pool. Only applies to Gyro, LBPs and InvestmentPools */\n swapEnabledInternal?: Maybe;\n swapFee: Scalars['BigDecimal'];\n swaps?: Maybe>;\n swapsCount: Scalars['BigInt'];\n symbol?: Maybe;\n tauAlphaX?: Maybe;\n tauAlphaY?: Maybe;\n tauBetaX?: Maybe;\n tauBetaY?: Maybe;\n tokens?: Maybe>;\n tokensList: Array;\n totalAumFeeCollectedInBPT?: Maybe;\n totalLiquidity: Scalars['BigDecimal'];\n totalLiquiditySansBPT?: Maybe;\n totalProtocolFee?: Maybe;\n totalProtocolFeePaidInBPT?: Maybe;\n totalShares: Scalars['BigDecimal'];\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n totalWeight?: Maybe;\n tx?: Maybe;\n u?: Maybe;\n unitSeconds?: Maybe;\n upperTarget?: Maybe;\n v?: Maybe;\n vaultID: Balancer;\n w?: Maybe;\n weightUpdates?: Maybe>;\n wrappedIndex?: Maybe;\n z?: Maybe;\n};\n\n\nexport type PoolAmpUpdatesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolCircuitBreakersArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolHistoricalValuesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolPriceRateProvidersArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolSharesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolSnapshotsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolSwapsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolTokensArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type PoolWeightUpdatesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type PoolContract = {\n __typename?: 'PoolContract';\n id: Scalars['ID'];\n pool: Pool;\n};\n\nexport type PoolContract_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n};\n\nexport enum PoolContract_OrderBy {\n Id = 'id',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z'\n}\n\nexport type PoolHistoricalLiquidity = {\n __typename?: 'PoolHistoricalLiquidity';\n block: Scalars['BigInt'];\n id: Scalars['ID'];\n poolId: Pool;\n poolLiquidity: Scalars['BigDecimal'];\n poolShareValue: Scalars['BigDecimal'];\n poolTotalShares: Scalars['BigDecimal'];\n pricingAsset: Scalars['Bytes'];\n};\n\nexport type PoolHistoricalLiquidity_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n block?: InputMaybe;\n block_gt?: InputMaybe;\n block_gte?: InputMaybe;\n block_in?: InputMaybe>;\n block_lt?: InputMaybe;\n block_lte?: InputMaybe;\n block_not?: InputMaybe;\n block_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n poolLiquidity?: InputMaybe;\n poolLiquidity_gt?: InputMaybe;\n poolLiquidity_gte?: InputMaybe;\n poolLiquidity_in?: InputMaybe>;\n poolLiquidity_lt?: InputMaybe;\n poolLiquidity_lte?: InputMaybe;\n poolLiquidity_not?: InputMaybe;\n poolLiquidity_not_in?: InputMaybe>;\n poolShareValue?: InputMaybe;\n poolShareValue_gt?: InputMaybe;\n poolShareValue_gte?: InputMaybe;\n poolShareValue_in?: InputMaybe>;\n poolShareValue_lt?: InputMaybe;\n poolShareValue_lte?: InputMaybe;\n poolShareValue_not?: InputMaybe;\n poolShareValue_not_in?: InputMaybe>;\n poolTotalShares?: InputMaybe;\n poolTotalShares_gt?: InputMaybe;\n poolTotalShares_gte?: InputMaybe;\n poolTotalShares_in?: InputMaybe>;\n poolTotalShares_lt?: InputMaybe;\n poolTotalShares_lte?: InputMaybe;\n poolTotalShares_not?: InputMaybe;\n poolTotalShares_not_in?: InputMaybe>;\n pricingAsset?: InputMaybe;\n pricingAsset_contains?: InputMaybe;\n pricingAsset_gt?: InputMaybe;\n pricingAsset_gte?: InputMaybe;\n pricingAsset_in?: InputMaybe>;\n pricingAsset_lt?: InputMaybe;\n pricingAsset_lte?: InputMaybe;\n pricingAsset_not?: InputMaybe;\n pricingAsset_not_contains?: InputMaybe;\n pricingAsset_not_in?: InputMaybe>;\n};\n\nexport enum PoolHistoricalLiquidity_OrderBy {\n Block = 'block',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n PoolLiquidity = 'poolLiquidity',\n PoolShareValue = 'poolShareValue',\n PoolTotalShares = 'poolTotalShares',\n PricingAsset = 'pricingAsset'\n}\n\nexport type PoolShare = {\n __typename?: 'PoolShare';\n balance: Scalars['BigDecimal'];\n id: Scalars['ID'];\n poolId: Pool;\n userAddress: User;\n};\n\nexport type PoolShare_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n balance?: InputMaybe;\n balance_gt?: InputMaybe;\n balance_gte?: InputMaybe;\n balance_in?: InputMaybe>;\n balance_lt?: InputMaybe;\n balance_lte?: InputMaybe;\n balance_not?: InputMaybe;\n balance_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n userAddress?: InputMaybe;\n userAddress_?: InputMaybe;\n userAddress_contains?: InputMaybe;\n userAddress_contains_nocase?: InputMaybe;\n userAddress_ends_with?: InputMaybe;\n userAddress_ends_with_nocase?: InputMaybe;\n userAddress_gt?: InputMaybe;\n userAddress_gte?: InputMaybe;\n userAddress_in?: InputMaybe>;\n userAddress_lt?: InputMaybe;\n userAddress_lte?: InputMaybe;\n userAddress_not?: InputMaybe;\n userAddress_not_contains?: InputMaybe;\n userAddress_not_contains_nocase?: InputMaybe;\n userAddress_not_ends_with?: InputMaybe;\n userAddress_not_ends_with_nocase?: InputMaybe;\n userAddress_not_in?: InputMaybe>;\n userAddress_not_starts_with?: InputMaybe;\n userAddress_not_starts_with_nocase?: InputMaybe;\n userAddress_starts_with?: InputMaybe;\n userAddress_starts_with_nocase?: InputMaybe;\n};\n\nexport enum PoolShare_OrderBy {\n Balance = 'balance',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n UserAddress = 'userAddress',\n UserAddressId = 'userAddress__id'\n}\n\nexport type PoolSnapshot = {\n __typename?: 'PoolSnapshot';\n amounts: Array;\n holdersCount: Scalars['BigInt'];\n id: Scalars['ID'];\n liquidity: Scalars['BigDecimal'];\n pool: Pool;\n protocolFee?: Maybe;\n swapFees: Scalars['BigDecimal'];\n swapVolume: Scalars['BigDecimal'];\n swapsCount: Scalars['BigInt'];\n timestamp: Scalars['Int'];\n totalShares: Scalars['BigDecimal'];\n};\n\nexport type PoolSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n amounts?: InputMaybe>;\n amounts_contains?: InputMaybe>;\n amounts_contains_nocase?: InputMaybe>;\n amounts_not?: InputMaybe>;\n amounts_not_contains?: InputMaybe>;\n amounts_not_contains_nocase?: InputMaybe>;\n and?: InputMaybe>>;\n holdersCount?: InputMaybe;\n holdersCount_gt?: InputMaybe;\n holdersCount_gte?: InputMaybe;\n holdersCount_in?: InputMaybe>;\n holdersCount_lt?: InputMaybe;\n holdersCount_lte?: InputMaybe;\n holdersCount_not?: InputMaybe;\n holdersCount_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n liquidity?: InputMaybe;\n liquidity_gt?: InputMaybe;\n liquidity_gte?: InputMaybe;\n liquidity_in?: InputMaybe>;\n liquidity_lt?: InputMaybe;\n liquidity_lte?: InputMaybe;\n liquidity_not?: InputMaybe;\n liquidity_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n protocolFee?: InputMaybe;\n protocolFee_gt?: InputMaybe;\n protocolFee_gte?: InputMaybe;\n protocolFee_in?: InputMaybe>;\n protocolFee_lt?: InputMaybe;\n protocolFee_lte?: InputMaybe;\n protocolFee_not?: InputMaybe;\n protocolFee_not_in?: InputMaybe>;\n swapFees?: InputMaybe;\n swapFees_gt?: InputMaybe;\n swapFees_gte?: InputMaybe;\n swapFees_in?: InputMaybe>;\n swapFees_lt?: InputMaybe;\n swapFees_lte?: InputMaybe;\n swapFees_not?: InputMaybe;\n swapFees_not_in?: InputMaybe>;\n swapVolume?: InputMaybe;\n swapVolume_gt?: InputMaybe;\n swapVolume_gte?: InputMaybe;\n swapVolume_in?: InputMaybe>;\n swapVolume_lt?: InputMaybe;\n swapVolume_lte?: InputMaybe;\n swapVolume_not?: InputMaybe;\n swapVolume_not_in?: InputMaybe>;\n swapsCount?: InputMaybe;\n swapsCount_gt?: InputMaybe;\n swapsCount_gte?: InputMaybe;\n swapsCount_in?: InputMaybe>;\n swapsCount_lt?: InputMaybe;\n swapsCount_lte?: InputMaybe;\n swapsCount_not?: InputMaybe;\n swapsCount_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n totalShares?: InputMaybe;\n totalShares_gt?: InputMaybe;\n totalShares_gte?: InputMaybe;\n totalShares_in?: InputMaybe>;\n totalShares_lt?: InputMaybe;\n totalShares_lte?: InputMaybe;\n totalShares_not?: InputMaybe;\n totalShares_not_in?: InputMaybe>;\n};\n\nexport enum PoolSnapshot_OrderBy {\n Amounts = 'amounts',\n HoldersCount = 'holdersCount',\n Id = 'id',\n Liquidity = 'liquidity',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n ProtocolFee = 'protocolFee',\n SwapFees = 'swapFees',\n SwapVolume = 'swapVolume',\n SwapsCount = 'swapsCount',\n Timestamp = 'timestamp',\n TotalShares = 'totalShares'\n}\n\nexport type PoolToken = {\n __typename?: 'PoolToken';\n address: Scalars['String'];\n assetManager: Scalars['Bytes'];\n balance: Scalars['BigDecimal'];\n cashBalance: Scalars['BigDecimal'];\n circuitBreaker?: Maybe;\n decimals: Scalars['Int'];\n id: Scalars['ID'];\n index?: Maybe;\n isExemptFromYieldProtocolFee?: Maybe;\n managedBalance: Scalars['BigDecimal'];\n managements?: Maybe>;\n name: Scalars['String'];\n oldPriceRate?: Maybe;\n paidProtocolFees?: Maybe;\n poolId?: Maybe;\n priceRate: Scalars['BigDecimal'];\n symbol: Scalars['String'];\n token: Token;\n weight?: Maybe;\n};\n\n\nexport type PoolTokenManagementsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type PoolToken_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_contains_nocase?: InputMaybe;\n address_ends_with?: InputMaybe;\n address_ends_with_nocase?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_contains_nocase?: InputMaybe;\n address_not_ends_with?: InputMaybe;\n address_not_ends_with_nocase?: InputMaybe;\n address_not_in?: InputMaybe>;\n address_not_starts_with?: InputMaybe;\n address_not_starts_with_nocase?: InputMaybe;\n address_starts_with?: InputMaybe;\n address_starts_with_nocase?: InputMaybe;\n and?: InputMaybe>>;\n assetManager?: InputMaybe;\n assetManager_contains?: InputMaybe;\n assetManager_gt?: InputMaybe;\n assetManager_gte?: InputMaybe;\n assetManager_in?: InputMaybe>;\n assetManager_lt?: InputMaybe;\n assetManager_lte?: InputMaybe;\n assetManager_not?: InputMaybe;\n assetManager_not_contains?: InputMaybe;\n assetManager_not_in?: InputMaybe>;\n balance?: InputMaybe;\n balance_gt?: InputMaybe;\n balance_gte?: InputMaybe;\n balance_in?: InputMaybe>;\n balance_lt?: InputMaybe;\n balance_lte?: InputMaybe;\n balance_not?: InputMaybe;\n balance_not_in?: InputMaybe>;\n cashBalance?: InputMaybe;\n cashBalance_gt?: InputMaybe;\n cashBalance_gte?: InputMaybe;\n cashBalance_in?: InputMaybe>;\n cashBalance_lt?: InputMaybe;\n cashBalance_lte?: InputMaybe;\n cashBalance_not?: InputMaybe;\n cashBalance_not_in?: InputMaybe>;\n circuitBreaker?: InputMaybe;\n circuitBreaker_?: InputMaybe;\n circuitBreaker_contains?: InputMaybe;\n circuitBreaker_contains_nocase?: InputMaybe;\n circuitBreaker_ends_with?: InputMaybe;\n circuitBreaker_ends_with_nocase?: InputMaybe;\n circuitBreaker_gt?: InputMaybe;\n circuitBreaker_gte?: InputMaybe;\n circuitBreaker_in?: InputMaybe>;\n circuitBreaker_lt?: InputMaybe;\n circuitBreaker_lte?: InputMaybe;\n circuitBreaker_not?: InputMaybe;\n circuitBreaker_not_contains?: InputMaybe;\n circuitBreaker_not_contains_nocase?: InputMaybe;\n circuitBreaker_not_ends_with?: InputMaybe;\n circuitBreaker_not_ends_with_nocase?: InputMaybe;\n circuitBreaker_not_in?: InputMaybe>;\n circuitBreaker_not_starts_with?: InputMaybe;\n circuitBreaker_not_starts_with_nocase?: InputMaybe;\n circuitBreaker_starts_with?: InputMaybe;\n circuitBreaker_starts_with_nocase?: InputMaybe;\n decimals?: InputMaybe;\n decimals_gt?: InputMaybe;\n decimals_gte?: InputMaybe;\n decimals_in?: InputMaybe>;\n decimals_lt?: InputMaybe;\n decimals_lte?: InputMaybe;\n decimals_not?: InputMaybe;\n decimals_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n index?: InputMaybe;\n index_gt?: InputMaybe;\n index_gte?: InputMaybe;\n index_in?: InputMaybe>;\n index_lt?: InputMaybe;\n index_lte?: InputMaybe;\n index_not?: InputMaybe;\n index_not_in?: InputMaybe>;\n isExemptFromYieldProtocolFee?: InputMaybe;\n isExemptFromYieldProtocolFee_in?: InputMaybe>;\n isExemptFromYieldProtocolFee_not?: InputMaybe;\n isExemptFromYieldProtocolFee_not_in?: InputMaybe>;\n managedBalance?: InputMaybe;\n managedBalance_gt?: InputMaybe;\n managedBalance_gte?: InputMaybe;\n managedBalance_in?: InputMaybe>;\n managedBalance_lt?: InputMaybe;\n managedBalance_lte?: InputMaybe;\n managedBalance_not?: InputMaybe;\n managedBalance_not_in?: InputMaybe>;\n managements_?: InputMaybe;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n oldPriceRate?: InputMaybe;\n oldPriceRate_gt?: InputMaybe;\n oldPriceRate_gte?: InputMaybe;\n oldPriceRate_in?: InputMaybe>;\n oldPriceRate_lt?: InputMaybe;\n oldPriceRate_lte?: InputMaybe;\n oldPriceRate_not?: InputMaybe;\n oldPriceRate_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n paidProtocolFees?: InputMaybe;\n paidProtocolFees_gt?: InputMaybe;\n paidProtocolFees_gte?: InputMaybe;\n paidProtocolFees_in?: InputMaybe>;\n paidProtocolFees_lt?: InputMaybe;\n paidProtocolFees_lte?: InputMaybe;\n paidProtocolFees_not?: InputMaybe;\n paidProtocolFees_not_in?: InputMaybe>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n priceRate?: InputMaybe;\n priceRate_gt?: InputMaybe;\n priceRate_gte?: InputMaybe;\n priceRate_in?: InputMaybe>;\n priceRate_lt?: InputMaybe;\n priceRate_lte?: InputMaybe;\n priceRate_not?: InputMaybe;\n priceRate_not_in?: InputMaybe>;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n token?: InputMaybe;\n token_?: InputMaybe;\n token_contains?: InputMaybe;\n token_contains_nocase?: InputMaybe;\n token_ends_with?: InputMaybe;\n token_ends_with_nocase?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_contains_nocase?: InputMaybe;\n token_not_ends_with?: InputMaybe;\n token_not_ends_with_nocase?: InputMaybe;\n token_not_in?: InputMaybe>;\n token_not_starts_with?: InputMaybe;\n token_not_starts_with_nocase?: InputMaybe;\n token_starts_with?: InputMaybe;\n token_starts_with_nocase?: InputMaybe;\n weight?: InputMaybe;\n weight_gt?: InputMaybe;\n weight_gte?: InputMaybe;\n weight_in?: InputMaybe>;\n weight_lt?: InputMaybe;\n weight_lte?: InputMaybe;\n weight_not?: InputMaybe;\n weight_not_in?: InputMaybe>;\n};\n\nexport enum PoolToken_OrderBy {\n Address = 'address',\n AssetManager = 'assetManager',\n Balance = 'balance',\n CashBalance = 'cashBalance',\n CircuitBreaker = 'circuitBreaker',\n CircuitBreakerBptPrice = 'circuitBreaker__bptPrice',\n CircuitBreakerId = 'circuitBreaker__id',\n CircuitBreakerLowerBoundPercentage = 'circuitBreaker__lowerBoundPercentage',\n CircuitBreakerUpperBoundPercentage = 'circuitBreaker__upperBoundPercentage',\n Decimals = 'decimals',\n Id = 'id',\n Index = 'index',\n IsExemptFromYieldProtocolFee = 'isExemptFromYieldProtocolFee',\n ManagedBalance = 'managedBalance',\n Managements = 'managements',\n Name = 'name',\n OldPriceRate = 'oldPriceRate',\n PaidProtocolFees = 'paidProtocolFees',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n PriceRate = 'priceRate',\n Symbol = 'symbol',\n Token = 'token',\n TokenAddress = 'token__address',\n TokenDecimals = 'token__decimals',\n TokenFxOracleDecimals = 'token__fxOracleDecimals',\n TokenId = 'token__id',\n TokenLatestFxPrice = 'token__latestFXPrice',\n TokenLatestUsdPrice = 'token__latestUSDPrice',\n TokenLatestUsdPriceTimestamp = 'token__latestUSDPriceTimestamp',\n TokenName = 'token__name',\n TokenSymbol = 'token__symbol',\n TokenTotalBalanceNotional = 'token__totalBalanceNotional',\n TokenTotalBalanceUsd = 'token__totalBalanceUSD',\n TokenTotalSwapCount = 'token__totalSwapCount',\n TokenTotalVolumeNotional = 'token__totalVolumeNotional',\n TokenTotalVolumeUsd = 'token__totalVolumeUSD',\n Weight = 'weight'\n}\n\nexport type Pool_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_in?: InputMaybe>;\n alpha?: InputMaybe;\n alpha_gt?: InputMaybe;\n alpha_gte?: InputMaybe;\n alpha_in?: InputMaybe>;\n alpha_lt?: InputMaybe;\n alpha_lte?: InputMaybe;\n alpha_not?: InputMaybe;\n alpha_not_in?: InputMaybe>;\n amp?: InputMaybe;\n ampUpdates_?: InputMaybe;\n amp_gt?: InputMaybe;\n amp_gte?: InputMaybe;\n amp_in?: InputMaybe>;\n amp_lt?: InputMaybe;\n amp_lte?: InputMaybe;\n amp_not?: InputMaybe;\n amp_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n baseToken?: InputMaybe;\n baseToken_contains?: InputMaybe;\n baseToken_gt?: InputMaybe;\n baseToken_gte?: InputMaybe;\n baseToken_in?: InputMaybe>;\n baseToken_lt?: InputMaybe;\n baseToken_lte?: InputMaybe;\n baseToken_not?: InputMaybe;\n baseToken_not_contains?: InputMaybe;\n baseToken_not_in?: InputMaybe>;\n beta?: InputMaybe;\n beta_gt?: InputMaybe;\n beta_gte?: InputMaybe;\n beta_in?: InputMaybe>;\n beta_lt?: InputMaybe;\n beta_lte?: InputMaybe;\n beta_not?: InputMaybe;\n beta_not_in?: InputMaybe>;\n c?: InputMaybe;\n c_gt?: InputMaybe;\n c_gte?: InputMaybe;\n c_in?: InputMaybe>;\n c_lt?: InputMaybe;\n c_lte?: InputMaybe;\n c_not?: InputMaybe;\n c_not_in?: InputMaybe>;\n circuitBreakers_?: InputMaybe;\n createTime?: InputMaybe;\n createTime_gt?: InputMaybe;\n createTime_gte?: InputMaybe;\n createTime_in?: InputMaybe>;\n createTime_lt?: InputMaybe;\n createTime_lte?: InputMaybe;\n createTime_not?: InputMaybe;\n createTime_not_in?: InputMaybe>;\n dSq?: InputMaybe;\n dSq_gt?: InputMaybe;\n dSq_gte?: InputMaybe;\n dSq_in?: InputMaybe>;\n dSq_lt?: InputMaybe;\n dSq_lte?: InputMaybe;\n dSq_not?: InputMaybe;\n dSq_not_in?: InputMaybe>;\n delta?: InputMaybe;\n delta_gt?: InputMaybe;\n delta_gte?: InputMaybe;\n delta_in?: InputMaybe>;\n delta_lt?: InputMaybe;\n delta_lte?: InputMaybe;\n delta_not?: InputMaybe;\n delta_not_in?: InputMaybe>;\n epsilon?: InputMaybe;\n epsilon_gt?: InputMaybe;\n epsilon_gte?: InputMaybe;\n epsilon_in?: InputMaybe>;\n epsilon_lt?: InputMaybe;\n epsilon_lte?: InputMaybe;\n epsilon_not?: InputMaybe;\n epsilon_not_in?: InputMaybe>;\n expiryTime?: InputMaybe;\n expiryTime_gt?: InputMaybe;\n expiryTime_gte?: InputMaybe;\n expiryTime_in?: InputMaybe>;\n expiryTime_lt?: InputMaybe;\n expiryTime_lte?: InputMaybe;\n expiryTime_not?: InputMaybe;\n expiryTime_not_in?: InputMaybe>;\n factory?: InputMaybe;\n factory_contains?: InputMaybe;\n factory_gt?: InputMaybe;\n factory_gte?: InputMaybe;\n factory_in?: InputMaybe>;\n factory_lt?: InputMaybe;\n factory_lte?: InputMaybe;\n factory_not?: InputMaybe;\n factory_not_contains?: InputMaybe;\n factory_not_in?: InputMaybe>;\n historicalValues_?: InputMaybe;\n holdersCount?: InputMaybe;\n holdersCount_gt?: InputMaybe;\n holdersCount_gte?: InputMaybe;\n holdersCount_in?: InputMaybe>;\n holdersCount_lt?: InputMaybe;\n holdersCount_lte?: InputMaybe;\n holdersCount_not?: InputMaybe;\n holdersCount_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n isInRecoveryMode?: InputMaybe;\n isInRecoveryMode_in?: InputMaybe>;\n isInRecoveryMode_not?: InputMaybe;\n isInRecoveryMode_not_in?: InputMaybe>;\n isPaused?: InputMaybe;\n isPaused_in?: InputMaybe>;\n isPaused_not?: InputMaybe;\n isPaused_not_in?: InputMaybe>;\n joinExitEnabled?: InputMaybe;\n joinExitEnabled_in?: InputMaybe>;\n joinExitEnabled_not?: InputMaybe;\n joinExitEnabled_not_in?: InputMaybe>;\n lambda?: InputMaybe;\n lambda_gt?: InputMaybe;\n lambda_gte?: InputMaybe;\n lambda_in?: InputMaybe>;\n lambda_lt?: InputMaybe;\n lambda_lte?: InputMaybe;\n lambda_not?: InputMaybe;\n lambda_not_in?: InputMaybe>;\n lastJoinExitAmp?: InputMaybe;\n lastJoinExitAmp_gt?: InputMaybe;\n lastJoinExitAmp_gte?: InputMaybe;\n lastJoinExitAmp_in?: InputMaybe>;\n lastJoinExitAmp_lt?: InputMaybe;\n lastJoinExitAmp_lte?: InputMaybe;\n lastJoinExitAmp_not?: InputMaybe;\n lastJoinExitAmp_not_in?: InputMaybe>;\n lastPostJoinExitInvariant?: InputMaybe;\n lastPostJoinExitInvariant_gt?: InputMaybe;\n lastPostJoinExitInvariant_gte?: InputMaybe;\n lastPostJoinExitInvariant_in?: InputMaybe>;\n lastPostJoinExitInvariant_lt?: InputMaybe;\n lastPostJoinExitInvariant_lte?: InputMaybe;\n lastPostJoinExitInvariant_not?: InputMaybe;\n lastPostJoinExitInvariant_not_in?: InputMaybe>;\n latestAmpUpdate?: InputMaybe;\n latestAmpUpdate_?: InputMaybe;\n latestAmpUpdate_contains?: InputMaybe;\n latestAmpUpdate_contains_nocase?: InputMaybe;\n latestAmpUpdate_ends_with?: InputMaybe;\n latestAmpUpdate_ends_with_nocase?: InputMaybe;\n latestAmpUpdate_gt?: InputMaybe;\n latestAmpUpdate_gte?: InputMaybe;\n latestAmpUpdate_in?: InputMaybe>;\n latestAmpUpdate_lt?: InputMaybe;\n latestAmpUpdate_lte?: InputMaybe;\n latestAmpUpdate_not?: InputMaybe;\n latestAmpUpdate_not_contains?: InputMaybe;\n latestAmpUpdate_not_contains_nocase?: InputMaybe;\n latestAmpUpdate_not_ends_with?: InputMaybe;\n latestAmpUpdate_not_ends_with_nocase?: InputMaybe;\n latestAmpUpdate_not_in?: InputMaybe>;\n latestAmpUpdate_not_starts_with?: InputMaybe;\n latestAmpUpdate_not_starts_with_nocase?: InputMaybe;\n latestAmpUpdate_starts_with?: InputMaybe;\n latestAmpUpdate_starts_with_nocase?: InputMaybe;\n lowerTarget?: InputMaybe;\n lowerTarget_gt?: InputMaybe;\n lowerTarget_gte?: InputMaybe;\n lowerTarget_in?: InputMaybe>;\n lowerTarget_lt?: InputMaybe;\n lowerTarget_lte?: InputMaybe;\n lowerTarget_not?: InputMaybe;\n lowerTarget_not_in?: InputMaybe>;\n mainIndex?: InputMaybe;\n mainIndex_gt?: InputMaybe;\n mainIndex_gte?: InputMaybe;\n mainIndex_in?: InputMaybe>;\n mainIndex_lt?: InputMaybe;\n mainIndex_lte?: InputMaybe;\n mainIndex_not?: InputMaybe;\n mainIndex_not_in?: InputMaybe>;\n managementAumFee?: InputMaybe;\n managementAumFee_gt?: InputMaybe;\n managementAumFee_gte?: InputMaybe;\n managementAumFee_in?: InputMaybe>;\n managementAumFee_lt?: InputMaybe;\n managementAumFee_lte?: InputMaybe;\n managementAumFee_not?: InputMaybe;\n managementAumFee_not_in?: InputMaybe>;\n managementFee?: InputMaybe;\n managementFee_gt?: InputMaybe;\n managementFee_gte?: InputMaybe;\n managementFee_in?: InputMaybe>;\n managementFee_lt?: InputMaybe;\n managementFee_lte?: InputMaybe;\n managementFee_not?: InputMaybe;\n managementFee_not_in?: InputMaybe>;\n mustAllowlistLPs?: InputMaybe;\n mustAllowlistLPs_in?: InputMaybe>;\n mustAllowlistLPs_not?: InputMaybe;\n mustAllowlistLPs_not_in?: InputMaybe>;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n oracleEnabled?: InputMaybe;\n oracleEnabled_in?: InputMaybe>;\n oracleEnabled_not?: InputMaybe;\n oracleEnabled_not_in?: InputMaybe>;\n owner?: InputMaybe;\n owner_contains?: InputMaybe;\n owner_gt?: InputMaybe;\n owner_gte?: InputMaybe;\n owner_in?: InputMaybe>;\n owner_lt?: InputMaybe;\n owner_lte?: InputMaybe;\n owner_not?: InputMaybe;\n owner_not_contains?: InputMaybe;\n owner_not_in?: InputMaybe>;\n poolType?: InputMaybe;\n poolTypeVersion?: InputMaybe;\n poolTypeVersion_gt?: InputMaybe;\n poolTypeVersion_gte?: InputMaybe;\n poolTypeVersion_in?: InputMaybe>;\n poolTypeVersion_lt?: InputMaybe;\n poolTypeVersion_lte?: InputMaybe;\n poolTypeVersion_not?: InputMaybe;\n poolTypeVersion_not_in?: InputMaybe>;\n poolType_contains?: InputMaybe;\n poolType_contains_nocase?: InputMaybe;\n poolType_ends_with?: InputMaybe;\n poolType_ends_with_nocase?: InputMaybe;\n poolType_gt?: InputMaybe;\n poolType_gte?: InputMaybe;\n poolType_in?: InputMaybe>;\n poolType_lt?: InputMaybe;\n poolType_lte?: InputMaybe;\n poolType_not?: InputMaybe;\n poolType_not_contains?: InputMaybe;\n poolType_not_contains_nocase?: InputMaybe;\n poolType_not_ends_with?: InputMaybe;\n poolType_not_ends_with_nocase?: InputMaybe;\n poolType_not_in?: InputMaybe>;\n poolType_not_starts_with?: InputMaybe;\n poolType_not_starts_with_nocase?: InputMaybe;\n poolType_starts_with?: InputMaybe;\n poolType_starts_with_nocase?: InputMaybe;\n priceRateProviders_?: InputMaybe;\n principalToken?: InputMaybe;\n principalToken_contains?: InputMaybe;\n principalToken_gt?: InputMaybe;\n principalToken_gte?: InputMaybe;\n principalToken_in?: InputMaybe>;\n principalToken_lt?: InputMaybe;\n principalToken_lte?: InputMaybe;\n principalToken_not?: InputMaybe;\n principalToken_not_contains?: InputMaybe;\n principalToken_not_in?: InputMaybe>;\n protocolAumFeeCache?: InputMaybe;\n protocolAumFeeCache_gt?: InputMaybe;\n protocolAumFeeCache_gte?: InputMaybe;\n protocolAumFeeCache_in?: InputMaybe>;\n protocolAumFeeCache_lt?: InputMaybe;\n protocolAumFeeCache_lte?: InputMaybe;\n protocolAumFeeCache_not?: InputMaybe;\n protocolAumFeeCache_not_in?: InputMaybe>;\n protocolId?: InputMaybe;\n protocolIdData?: InputMaybe;\n protocolIdData_?: InputMaybe;\n protocolIdData_contains?: InputMaybe;\n protocolIdData_contains_nocase?: InputMaybe;\n protocolIdData_ends_with?: InputMaybe;\n protocolIdData_ends_with_nocase?: InputMaybe;\n protocolIdData_gt?: InputMaybe;\n protocolIdData_gte?: InputMaybe;\n protocolIdData_in?: InputMaybe>;\n protocolIdData_lt?: InputMaybe;\n protocolIdData_lte?: InputMaybe;\n protocolIdData_not?: InputMaybe;\n protocolIdData_not_contains?: InputMaybe;\n protocolIdData_not_contains_nocase?: InputMaybe;\n protocolIdData_not_ends_with?: InputMaybe;\n protocolIdData_not_ends_with_nocase?: InputMaybe;\n protocolIdData_not_in?: InputMaybe>;\n protocolIdData_not_starts_with?: InputMaybe;\n protocolIdData_not_starts_with_nocase?: InputMaybe;\n protocolIdData_starts_with?: InputMaybe;\n protocolIdData_starts_with_nocase?: InputMaybe;\n protocolId_gt?: InputMaybe;\n protocolId_gte?: InputMaybe;\n protocolId_in?: InputMaybe>;\n protocolId_lt?: InputMaybe;\n protocolId_lte?: InputMaybe;\n protocolId_not?: InputMaybe;\n protocolId_not_in?: InputMaybe>;\n protocolSwapFeeCache?: InputMaybe;\n protocolSwapFeeCache_gt?: InputMaybe;\n protocolSwapFeeCache_gte?: InputMaybe;\n protocolSwapFeeCache_in?: InputMaybe>;\n protocolSwapFeeCache_lt?: InputMaybe;\n protocolSwapFeeCache_lte?: InputMaybe;\n protocolSwapFeeCache_not?: InputMaybe;\n protocolSwapFeeCache_not_in?: InputMaybe>;\n protocolYieldFeeCache?: InputMaybe;\n protocolYieldFeeCache_gt?: InputMaybe;\n protocolYieldFeeCache_gte?: InputMaybe;\n protocolYieldFeeCache_in?: InputMaybe>;\n protocolYieldFeeCache_lt?: InputMaybe;\n protocolYieldFeeCache_lte?: InputMaybe;\n protocolYieldFeeCache_not?: InputMaybe;\n protocolYieldFeeCache_not_in?: InputMaybe>;\n root3Alpha?: InputMaybe;\n root3Alpha_gt?: InputMaybe;\n root3Alpha_gte?: InputMaybe;\n root3Alpha_in?: InputMaybe>;\n root3Alpha_lt?: InputMaybe;\n root3Alpha_lte?: InputMaybe;\n root3Alpha_not?: InputMaybe;\n root3Alpha_not_in?: InputMaybe>;\n s?: InputMaybe;\n s_gt?: InputMaybe;\n s_gte?: InputMaybe;\n s_in?: InputMaybe>;\n s_lt?: InputMaybe;\n s_lte?: InputMaybe;\n s_not?: InputMaybe;\n s_not_in?: InputMaybe>;\n shares_?: InputMaybe;\n snapshots_?: InputMaybe;\n sqrtAlpha?: InputMaybe;\n sqrtAlpha_gt?: InputMaybe;\n sqrtAlpha_gte?: InputMaybe;\n sqrtAlpha_in?: InputMaybe>;\n sqrtAlpha_lt?: InputMaybe;\n sqrtAlpha_lte?: InputMaybe;\n sqrtAlpha_not?: InputMaybe;\n sqrtAlpha_not_in?: InputMaybe>;\n sqrtBeta?: InputMaybe;\n sqrtBeta_gt?: InputMaybe;\n sqrtBeta_gte?: InputMaybe;\n sqrtBeta_in?: InputMaybe>;\n sqrtBeta_lt?: InputMaybe;\n sqrtBeta_lte?: InputMaybe;\n sqrtBeta_not?: InputMaybe;\n sqrtBeta_not_in?: InputMaybe>;\n strategyType?: InputMaybe;\n strategyType_gt?: InputMaybe;\n strategyType_gte?: InputMaybe;\n strategyType_in?: InputMaybe>;\n strategyType_lt?: InputMaybe;\n strategyType_lte?: InputMaybe;\n strategyType_not?: InputMaybe;\n strategyType_not_in?: InputMaybe>;\n swapEnabled?: InputMaybe;\n swapEnabledCurationSignal?: InputMaybe;\n swapEnabledCurationSignal_in?: InputMaybe>;\n swapEnabledCurationSignal_not?: InputMaybe;\n swapEnabledCurationSignal_not_in?: InputMaybe>;\n swapEnabledInternal?: InputMaybe;\n swapEnabledInternal_in?: InputMaybe>;\n swapEnabledInternal_not?: InputMaybe;\n swapEnabledInternal_not_in?: InputMaybe>;\n swapEnabled_in?: InputMaybe>;\n swapEnabled_not?: InputMaybe;\n swapEnabled_not_in?: InputMaybe>;\n swapFee?: InputMaybe;\n swapFee_gt?: InputMaybe;\n swapFee_gte?: InputMaybe;\n swapFee_in?: InputMaybe>;\n swapFee_lt?: InputMaybe;\n swapFee_lte?: InputMaybe;\n swapFee_not?: InputMaybe;\n swapFee_not_in?: InputMaybe>;\n swapsCount?: InputMaybe;\n swapsCount_gt?: InputMaybe;\n swapsCount_gte?: InputMaybe;\n swapsCount_in?: InputMaybe>;\n swapsCount_lt?: InputMaybe;\n swapsCount_lte?: InputMaybe;\n swapsCount_not?: InputMaybe;\n swapsCount_not_in?: InputMaybe>;\n swaps_?: InputMaybe;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n tauAlphaX?: InputMaybe;\n tauAlphaX_gt?: InputMaybe;\n tauAlphaX_gte?: InputMaybe;\n tauAlphaX_in?: InputMaybe>;\n tauAlphaX_lt?: InputMaybe;\n tauAlphaX_lte?: InputMaybe;\n tauAlphaX_not?: InputMaybe;\n tauAlphaX_not_in?: InputMaybe>;\n tauAlphaY?: InputMaybe;\n tauAlphaY_gt?: InputMaybe;\n tauAlphaY_gte?: InputMaybe;\n tauAlphaY_in?: InputMaybe>;\n tauAlphaY_lt?: InputMaybe;\n tauAlphaY_lte?: InputMaybe;\n tauAlphaY_not?: InputMaybe;\n tauAlphaY_not_in?: InputMaybe>;\n tauBetaX?: InputMaybe;\n tauBetaX_gt?: InputMaybe;\n tauBetaX_gte?: InputMaybe;\n tauBetaX_in?: InputMaybe>;\n tauBetaX_lt?: InputMaybe;\n tauBetaX_lte?: InputMaybe;\n tauBetaX_not?: InputMaybe;\n tauBetaX_not_in?: InputMaybe>;\n tauBetaY?: InputMaybe;\n tauBetaY_gt?: InputMaybe;\n tauBetaY_gte?: InputMaybe;\n tauBetaY_in?: InputMaybe>;\n tauBetaY_lt?: InputMaybe;\n tauBetaY_lte?: InputMaybe;\n tauBetaY_not?: InputMaybe;\n tauBetaY_not_in?: InputMaybe>;\n tokensList?: InputMaybe>;\n tokensList_contains?: InputMaybe>;\n tokensList_contains_nocase?: InputMaybe>;\n tokensList_not?: InputMaybe>;\n tokensList_not_contains?: InputMaybe>;\n tokensList_not_contains_nocase?: InputMaybe>;\n tokens_?: InputMaybe;\n totalAumFeeCollectedInBPT?: InputMaybe;\n totalAumFeeCollectedInBPT_gt?: InputMaybe;\n totalAumFeeCollectedInBPT_gte?: InputMaybe;\n totalAumFeeCollectedInBPT_in?: InputMaybe>;\n totalAumFeeCollectedInBPT_lt?: InputMaybe;\n totalAumFeeCollectedInBPT_lte?: InputMaybe;\n totalAumFeeCollectedInBPT_not?: InputMaybe;\n totalAumFeeCollectedInBPT_not_in?: InputMaybe>;\n totalLiquidity?: InputMaybe;\n totalLiquiditySansBPT?: InputMaybe;\n totalLiquiditySansBPT_gt?: InputMaybe;\n totalLiquiditySansBPT_gte?: InputMaybe;\n totalLiquiditySansBPT_in?: InputMaybe>;\n totalLiquiditySansBPT_lt?: InputMaybe;\n totalLiquiditySansBPT_lte?: InputMaybe;\n totalLiquiditySansBPT_not?: InputMaybe;\n totalLiquiditySansBPT_not_in?: InputMaybe>;\n totalLiquidity_gt?: InputMaybe;\n totalLiquidity_gte?: InputMaybe;\n totalLiquidity_in?: InputMaybe>;\n totalLiquidity_lt?: InputMaybe;\n totalLiquidity_lte?: InputMaybe;\n totalLiquidity_not?: InputMaybe;\n totalLiquidity_not_in?: InputMaybe>;\n totalProtocolFee?: InputMaybe;\n totalProtocolFeePaidInBPT?: InputMaybe;\n totalProtocolFeePaidInBPT_gt?: InputMaybe;\n totalProtocolFeePaidInBPT_gte?: InputMaybe;\n totalProtocolFeePaidInBPT_in?: InputMaybe>;\n totalProtocolFeePaidInBPT_lt?: InputMaybe;\n totalProtocolFeePaidInBPT_lte?: InputMaybe;\n totalProtocolFeePaidInBPT_not?: InputMaybe;\n totalProtocolFeePaidInBPT_not_in?: InputMaybe>;\n totalProtocolFee_gt?: InputMaybe;\n totalProtocolFee_gte?: InputMaybe;\n totalProtocolFee_in?: InputMaybe>;\n totalProtocolFee_lt?: InputMaybe;\n totalProtocolFee_lte?: InputMaybe;\n totalProtocolFee_not?: InputMaybe;\n totalProtocolFee_not_in?: InputMaybe>;\n totalShares?: InputMaybe;\n totalShares_gt?: InputMaybe;\n totalShares_gte?: InputMaybe;\n totalShares_in?: InputMaybe>;\n totalShares_lt?: InputMaybe;\n totalShares_lte?: InputMaybe;\n totalShares_not?: InputMaybe;\n totalShares_not_in?: InputMaybe>;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n totalWeight?: InputMaybe;\n totalWeight_gt?: InputMaybe;\n totalWeight_gte?: InputMaybe;\n totalWeight_in?: InputMaybe>;\n totalWeight_lt?: InputMaybe;\n totalWeight_lte?: InputMaybe;\n totalWeight_not?: InputMaybe;\n totalWeight_not_in?: InputMaybe>;\n tx?: InputMaybe;\n tx_contains?: InputMaybe;\n tx_gt?: InputMaybe;\n tx_gte?: InputMaybe;\n tx_in?: InputMaybe>;\n tx_lt?: InputMaybe;\n tx_lte?: InputMaybe;\n tx_not?: InputMaybe;\n tx_not_contains?: InputMaybe;\n tx_not_in?: InputMaybe>;\n u?: InputMaybe;\n u_gt?: InputMaybe;\n u_gte?: InputMaybe;\n u_in?: InputMaybe>;\n u_lt?: InputMaybe;\n u_lte?: InputMaybe;\n u_not?: InputMaybe;\n u_not_in?: InputMaybe>;\n unitSeconds?: InputMaybe;\n unitSeconds_gt?: InputMaybe;\n unitSeconds_gte?: InputMaybe;\n unitSeconds_in?: InputMaybe>;\n unitSeconds_lt?: InputMaybe;\n unitSeconds_lte?: InputMaybe;\n unitSeconds_not?: InputMaybe;\n unitSeconds_not_in?: InputMaybe>;\n upperTarget?: InputMaybe;\n upperTarget_gt?: InputMaybe;\n upperTarget_gte?: InputMaybe;\n upperTarget_in?: InputMaybe>;\n upperTarget_lt?: InputMaybe;\n upperTarget_lte?: InputMaybe;\n upperTarget_not?: InputMaybe;\n upperTarget_not_in?: InputMaybe>;\n v?: InputMaybe;\n v_gt?: InputMaybe;\n v_gte?: InputMaybe;\n v_in?: InputMaybe>;\n v_lt?: InputMaybe;\n v_lte?: InputMaybe;\n v_not?: InputMaybe;\n v_not_in?: InputMaybe>;\n vaultID?: InputMaybe;\n vaultID_?: InputMaybe;\n vaultID_contains?: InputMaybe;\n vaultID_contains_nocase?: InputMaybe;\n vaultID_ends_with?: InputMaybe;\n vaultID_ends_with_nocase?: InputMaybe;\n vaultID_gt?: InputMaybe;\n vaultID_gte?: InputMaybe;\n vaultID_in?: InputMaybe>;\n vaultID_lt?: InputMaybe;\n vaultID_lte?: InputMaybe;\n vaultID_not?: InputMaybe;\n vaultID_not_contains?: InputMaybe;\n vaultID_not_contains_nocase?: InputMaybe;\n vaultID_not_ends_with?: InputMaybe;\n vaultID_not_ends_with_nocase?: InputMaybe;\n vaultID_not_in?: InputMaybe>;\n vaultID_not_starts_with?: InputMaybe;\n vaultID_not_starts_with_nocase?: InputMaybe;\n vaultID_starts_with?: InputMaybe;\n vaultID_starts_with_nocase?: InputMaybe;\n w?: InputMaybe;\n w_gt?: InputMaybe;\n w_gte?: InputMaybe;\n w_in?: InputMaybe>;\n w_lt?: InputMaybe;\n w_lte?: InputMaybe;\n w_not?: InputMaybe;\n w_not_in?: InputMaybe>;\n weightUpdates_?: InputMaybe;\n wrappedIndex?: InputMaybe;\n wrappedIndex_gt?: InputMaybe;\n wrappedIndex_gte?: InputMaybe;\n wrappedIndex_in?: InputMaybe>;\n wrappedIndex_lt?: InputMaybe;\n wrappedIndex_lte?: InputMaybe;\n wrappedIndex_not?: InputMaybe;\n wrappedIndex_not_in?: InputMaybe>;\n z?: InputMaybe;\n z_gt?: InputMaybe;\n z_gte?: InputMaybe;\n z_in?: InputMaybe>;\n z_lt?: InputMaybe;\n z_lte?: InputMaybe;\n z_not?: InputMaybe;\n z_not_in?: InputMaybe>;\n};\n\nexport enum Pool_OrderBy {\n Address = 'address',\n Alpha = 'alpha',\n Amp = 'amp',\n AmpUpdates = 'ampUpdates',\n BaseToken = 'baseToken',\n Beta = 'beta',\n C = 'c',\n CircuitBreakers = 'circuitBreakers',\n CreateTime = 'createTime',\n DSq = 'dSq',\n Delta = 'delta',\n Epsilon = 'epsilon',\n ExpiryTime = 'expiryTime',\n Factory = 'factory',\n HistoricalValues = 'historicalValues',\n HoldersCount = 'holdersCount',\n Id = 'id',\n IsInRecoveryMode = 'isInRecoveryMode',\n IsPaused = 'isPaused',\n JoinExitEnabled = 'joinExitEnabled',\n Lambda = 'lambda',\n LastJoinExitAmp = 'lastJoinExitAmp',\n LastPostJoinExitInvariant = 'lastPostJoinExitInvariant',\n LatestAmpUpdate = 'latestAmpUpdate',\n LatestAmpUpdateEndAmp = 'latestAmpUpdate__endAmp',\n LatestAmpUpdateEndTimestamp = 'latestAmpUpdate__endTimestamp',\n LatestAmpUpdateId = 'latestAmpUpdate__id',\n LatestAmpUpdateScheduledTimestamp = 'latestAmpUpdate__scheduledTimestamp',\n LatestAmpUpdateStartAmp = 'latestAmpUpdate__startAmp',\n LatestAmpUpdateStartTimestamp = 'latestAmpUpdate__startTimestamp',\n LowerTarget = 'lowerTarget',\n MainIndex = 'mainIndex',\n ManagementAumFee = 'managementAumFee',\n ManagementFee = 'managementFee',\n MustAllowlistLPs = 'mustAllowlistLPs',\n Name = 'name',\n OracleEnabled = 'oracleEnabled',\n Owner = 'owner',\n PoolType = 'poolType',\n PoolTypeVersion = 'poolTypeVersion',\n PriceRateProviders = 'priceRateProviders',\n PrincipalToken = 'principalToken',\n ProtocolAumFeeCache = 'protocolAumFeeCache',\n ProtocolId = 'protocolId',\n ProtocolIdData = 'protocolIdData',\n ProtocolIdDataId = 'protocolIdData__id',\n ProtocolIdDataName = 'protocolIdData__name',\n ProtocolSwapFeeCache = 'protocolSwapFeeCache',\n ProtocolYieldFeeCache = 'protocolYieldFeeCache',\n Root3Alpha = 'root3Alpha',\n S = 's',\n Shares = 'shares',\n Snapshots = 'snapshots',\n SqrtAlpha = 'sqrtAlpha',\n SqrtBeta = 'sqrtBeta',\n StrategyType = 'strategyType',\n SwapEnabled = 'swapEnabled',\n SwapEnabledCurationSignal = 'swapEnabledCurationSignal',\n SwapEnabledInternal = 'swapEnabledInternal',\n SwapFee = 'swapFee',\n Swaps = 'swaps',\n SwapsCount = 'swapsCount',\n Symbol = 'symbol',\n TauAlphaX = 'tauAlphaX',\n TauAlphaY = 'tauAlphaY',\n TauBetaX = 'tauBetaX',\n TauBetaY = 'tauBetaY',\n Tokens = 'tokens',\n TokensList = 'tokensList',\n TotalAumFeeCollectedInBpt = 'totalAumFeeCollectedInBPT',\n TotalLiquidity = 'totalLiquidity',\n TotalLiquiditySansBpt = 'totalLiquiditySansBPT',\n TotalProtocolFee = 'totalProtocolFee',\n TotalProtocolFeePaidInBpt = 'totalProtocolFeePaidInBPT',\n TotalShares = 'totalShares',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume',\n TotalWeight = 'totalWeight',\n Tx = 'tx',\n U = 'u',\n UnitSeconds = 'unitSeconds',\n UpperTarget = 'upperTarget',\n V = 'v',\n VaultId = 'vaultID',\n VaultIdId = 'vaultID__id',\n VaultIdPoolCount = 'vaultID__poolCount',\n VaultIdProtocolFeesCollector = 'vaultID__protocolFeesCollector',\n VaultIdTotalLiquidity = 'vaultID__totalLiquidity',\n VaultIdTotalProtocolFee = 'vaultID__totalProtocolFee',\n VaultIdTotalSwapCount = 'vaultID__totalSwapCount',\n VaultIdTotalSwapFee = 'vaultID__totalSwapFee',\n VaultIdTotalSwapVolume = 'vaultID__totalSwapVolume',\n W = 'w',\n WeightUpdates = 'weightUpdates',\n WrappedIndex = 'wrappedIndex',\n Z = 'z'\n}\n\nexport type PriceRateProvider = {\n __typename?: 'PriceRateProvider';\n address: Scalars['Bytes'];\n cacheDuration?: Maybe;\n cacheExpiry?: Maybe;\n id: Scalars['ID'];\n lastCached?: Maybe;\n poolId: Pool;\n rate?: Maybe;\n token: PoolToken;\n};\n\nexport type PriceRateProvider_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n cacheDuration?: InputMaybe;\n cacheDuration_gt?: InputMaybe;\n cacheDuration_gte?: InputMaybe;\n cacheDuration_in?: InputMaybe>;\n cacheDuration_lt?: InputMaybe;\n cacheDuration_lte?: InputMaybe;\n cacheDuration_not?: InputMaybe;\n cacheDuration_not_in?: InputMaybe>;\n cacheExpiry?: InputMaybe;\n cacheExpiry_gt?: InputMaybe;\n cacheExpiry_gte?: InputMaybe;\n cacheExpiry_in?: InputMaybe>;\n cacheExpiry_lt?: InputMaybe;\n cacheExpiry_lte?: InputMaybe;\n cacheExpiry_not?: InputMaybe;\n cacheExpiry_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n lastCached?: InputMaybe;\n lastCached_gt?: InputMaybe;\n lastCached_gte?: InputMaybe;\n lastCached_in?: InputMaybe>;\n lastCached_lt?: InputMaybe;\n lastCached_lte?: InputMaybe;\n lastCached_not?: InputMaybe;\n lastCached_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n rate?: InputMaybe;\n rate_gt?: InputMaybe;\n rate_gte?: InputMaybe;\n rate_in?: InputMaybe>;\n rate_lt?: InputMaybe;\n rate_lte?: InputMaybe;\n rate_not?: InputMaybe;\n rate_not_in?: InputMaybe>;\n token?: InputMaybe;\n token_?: InputMaybe;\n token_contains?: InputMaybe;\n token_contains_nocase?: InputMaybe;\n token_ends_with?: InputMaybe;\n token_ends_with_nocase?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_contains_nocase?: InputMaybe;\n token_not_ends_with?: InputMaybe;\n token_not_ends_with_nocase?: InputMaybe;\n token_not_in?: InputMaybe>;\n token_not_starts_with?: InputMaybe;\n token_not_starts_with_nocase?: InputMaybe;\n token_starts_with?: InputMaybe;\n token_starts_with_nocase?: InputMaybe;\n};\n\nexport enum PriceRateProvider_OrderBy {\n Address = 'address',\n CacheDuration = 'cacheDuration',\n CacheExpiry = 'cacheExpiry',\n Id = 'id',\n LastCached = 'lastCached',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n Rate = 'rate',\n Token = 'token',\n TokenAddress = 'token__address',\n TokenAssetManager = 'token__assetManager',\n TokenBalance = 'token__balance',\n TokenCashBalance = 'token__cashBalance',\n TokenDecimals = 'token__decimals',\n TokenId = 'token__id',\n TokenIndex = 'token__index',\n TokenIsExemptFromYieldProtocolFee = 'token__isExemptFromYieldProtocolFee',\n TokenManagedBalance = 'token__managedBalance',\n TokenName = 'token__name',\n TokenOldPriceRate = 'token__oldPriceRate',\n TokenPaidProtocolFees = 'token__paidProtocolFees',\n TokenPriceRate = 'token__priceRate',\n TokenSymbol = 'token__symbol',\n TokenWeight = 'token__weight'\n}\n\nexport type ProtocolIdData = {\n __typename?: 'ProtocolIdData';\n id: Scalars['ID'];\n name: Scalars['String'];\n};\n\nexport type ProtocolIdData_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n};\n\nexport enum ProtocolIdData_OrderBy {\n Id = 'id',\n Name = 'name'\n}\n\nexport type Query = {\n __typename?: 'Query';\n /** Access to subgraph metadata */\n _meta?: Maybe<_Meta_>;\n ampUpdate?: Maybe;\n ampUpdates: Array;\n balancer?: Maybe;\n balancerSnapshot?: Maybe;\n balancerSnapshots: Array;\n balancers: Array;\n circuitBreaker?: Maybe;\n circuitBreakers: Array;\n gradualWeightUpdate?: Maybe;\n gradualWeightUpdates: Array;\n joinExit?: Maybe;\n joinExits: Array;\n latestPrice?: Maybe;\n latestPrices: Array;\n managementOperation?: Maybe;\n managementOperations: Array;\n pool?: Maybe;\n poolContract?: Maybe;\n poolContracts: Array;\n poolHistoricalLiquidities: Array;\n poolHistoricalLiquidity?: Maybe;\n poolShare?: Maybe;\n poolShares: Array;\n poolSnapshot?: Maybe;\n poolSnapshots: Array;\n poolToken?: Maybe;\n poolTokens: Array;\n pools: Array;\n priceRateProvider?: Maybe;\n priceRateProviders: Array;\n protocolIdData?: Maybe;\n protocolIdDatas: Array;\n swap?: Maybe;\n swapFeeUpdate?: Maybe;\n swapFeeUpdates: Array;\n swaps: Array;\n token?: Maybe;\n tokenPrice?: Maybe;\n tokenPrices: Array;\n tokenSnapshot?: Maybe;\n tokenSnapshots: Array;\n tokens: Array;\n tradePair?: Maybe;\n tradePairSnapshot?: Maybe;\n tradePairSnapshots: Array;\n tradePairs: Array;\n user?: Maybe;\n userInternalBalance?: Maybe;\n userInternalBalances: Array;\n users: Array;\n};\n\n\nexport type Query_MetaArgs = {\n block?: InputMaybe;\n};\n\n\nexport type QueryAmpUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryAmpUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryBalancerArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryBalancerSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryBalancerSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryBalancersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryCircuitBreakerArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryCircuitBreakersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGradualWeightUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGradualWeightUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryJoinExitArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryJoinExitsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryLatestPriceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryLatestPricesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryManagementOperationArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryManagementOperationsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolContractArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolContractsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolHistoricalLiquiditiesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolHistoricalLiquidityArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolShareArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolSharesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPriceRateProviderArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPriceRateProvidersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryProtocolIdDataArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryProtocolIdDatasArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QuerySwapArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QuerySwapFeeUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QuerySwapFeeUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QuerySwapsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTokenPriceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTokenPricesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTokenSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTokenSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTradePairArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTradePairSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryTradePairSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryTradePairsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryUserArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryUserInternalBalanceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryUserInternalBalancesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryUsersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\nexport type Subscription = {\n __typename?: 'Subscription';\n /** Access to subgraph metadata */\n _meta?: Maybe<_Meta_>;\n ampUpdate?: Maybe;\n ampUpdates: Array;\n balancer?: Maybe;\n balancerSnapshot?: Maybe;\n balancerSnapshots: Array;\n balancers: Array;\n circuitBreaker?: Maybe;\n circuitBreakers: Array;\n gradualWeightUpdate?: Maybe;\n gradualWeightUpdates: Array;\n joinExit?: Maybe;\n joinExits: Array;\n latestPrice?: Maybe;\n latestPrices: Array;\n managementOperation?: Maybe;\n managementOperations: Array;\n pool?: Maybe;\n poolContract?: Maybe;\n poolContracts: Array;\n poolHistoricalLiquidities: Array;\n poolHistoricalLiquidity?: Maybe;\n poolShare?: Maybe;\n poolShares: Array;\n poolSnapshot?: Maybe;\n poolSnapshots: Array;\n poolToken?: Maybe;\n poolTokens: Array;\n pools: Array;\n priceRateProvider?: Maybe;\n priceRateProviders: Array;\n protocolIdData?: Maybe;\n protocolIdDatas: Array;\n swap?: Maybe;\n swapFeeUpdate?: Maybe;\n swapFeeUpdates: Array;\n swaps: Array;\n token?: Maybe;\n tokenPrice?: Maybe;\n tokenPrices: Array;\n tokenSnapshot?: Maybe;\n tokenSnapshots: Array;\n tokens: Array;\n tradePair?: Maybe;\n tradePairSnapshot?: Maybe;\n tradePairSnapshots: Array;\n tradePairs: Array;\n user?: Maybe;\n userInternalBalance?: Maybe;\n userInternalBalances: Array;\n users: Array;\n};\n\n\nexport type Subscription_MetaArgs = {\n block?: InputMaybe;\n};\n\n\nexport type SubscriptionAmpUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionAmpUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionBalancerArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionBalancerSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionBalancerSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionBalancersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionCircuitBreakerArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionCircuitBreakersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGradualWeightUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGradualWeightUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionJoinExitArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionJoinExitsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionLatestPriceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionLatestPricesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionManagementOperationArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionManagementOperationsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolContractArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolContractsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolHistoricalLiquiditiesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolHistoricalLiquidityArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolShareArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolSharesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPriceRateProviderArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPriceRateProvidersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionProtocolIdDataArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionProtocolIdDatasArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionSwapArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionSwapFeeUpdateArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionSwapFeeUpdatesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionSwapsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTokenPriceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTokenPricesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTokenSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTokenSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTradePairArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTradePairSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionTradePairSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionTradePairsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionUserArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionUserInternalBalanceArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionUserInternalBalancesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionUsersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\nexport type Swap = {\n __typename?: 'Swap';\n caller: Scalars['Bytes'];\n id: Scalars['ID'];\n poolId: Pool;\n timestamp: Scalars['Int'];\n tokenAmountIn: Scalars['BigDecimal'];\n tokenAmountOut: Scalars['BigDecimal'];\n tokenIn: Scalars['Bytes'];\n tokenInSym: Scalars['String'];\n tokenOut: Scalars['Bytes'];\n tokenOutSym: Scalars['String'];\n tx: Scalars['Bytes'];\n userAddress: User;\n valueUSD: Scalars['BigDecimal'];\n};\n\nexport type SwapFeeUpdate = {\n __typename?: 'SwapFeeUpdate';\n endSwapFeePercentage: Scalars['BigDecimal'];\n endTimestamp: Scalars['BigInt'];\n id: Scalars['ID'];\n pool: Pool;\n scheduledTimestamp: Scalars['Int'];\n startSwapFeePercentage: Scalars['BigDecimal'];\n startTimestamp: Scalars['BigInt'];\n};\n\nexport type SwapFeeUpdate_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n endSwapFeePercentage?: InputMaybe;\n endSwapFeePercentage_gt?: InputMaybe;\n endSwapFeePercentage_gte?: InputMaybe;\n endSwapFeePercentage_in?: InputMaybe>;\n endSwapFeePercentage_lt?: InputMaybe;\n endSwapFeePercentage_lte?: InputMaybe;\n endSwapFeePercentage_not?: InputMaybe;\n endSwapFeePercentage_not_in?: InputMaybe>;\n endTimestamp?: InputMaybe;\n endTimestamp_gt?: InputMaybe;\n endTimestamp_gte?: InputMaybe;\n endTimestamp_in?: InputMaybe>;\n endTimestamp_lt?: InputMaybe;\n endTimestamp_lte?: InputMaybe;\n endTimestamp_not?: InputMaybe;\n endTimestamp_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n scheduledTimestamp?: InputMaybe;\n scheduledTimestamp_gt?: InputMaybe;\n scheduledTimestamp_gte?: InputMaybe;\n scheduledTimestamp_in?: InputMaybe>;\n scheduledTimestamp_lt?: InputMaybe;\n scheduledTimestamp_lte?: InputMaybe;\n scheduledTimestamp_not?: InputMaybe;\n scheduledTimestamp_not_in?: InputMaybe>;\n startSwapFeePercentage?: InputMaybe;\n startSwapFeePercentage_gt?: InputMaybe;\n startSwapFeePercentage_gte?: InputMaybe;\n startSwapFeePercentage_in?: InputMaybe>;\n startSwapFeePercentage_lt?: InputMaybe;\n startSwapFeePercentage_lte?: InputMaybe;\n startSwapFeePercentage_not?: InputMaybe;\n startSwapFeePercentage_not_in?: InputMaybe>;\n startTimestamp?: InputMaybe;\n startTimestamp_gt?: InputMaybe;\n startTimestamp_gte?: InputMaybe;\n startTimestamp_in?: InputMaybe>;\n startTimestamp_lt?: InputMaybe;\n startTimestamp_lte?: InputMaybe;\n startTimestamp_not?: InputMaybe;\n startTimestamp_not_in?: InputMaybe>;\n};\n\nexport enum SwapFeeUpdate_OrderBy {\n EndSwapFeePercentage = 'endSwapFeePercentage',\n EndTimestamp = 'endTimestamp',\n Id = 'id',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n ScheduledTimestamp = 'scheduledTimestamp',\n StartSwapFeePercentage = 'startSwapFeePercentage',\n StartTimestamp = 'startTimestamp'\n}\n\nexport type Swap_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n caller?: InputMaybe;\n caller_contains?: InputMaybe;\n caller_gt?: InputMaybe;\n caller_gte?: InputMaybe;\n caller_in?: InputMaybe>;\n caller_lt?: InputMaybe;\n caller_lte?: InputMaybe;\n caller_not?: InputMaybe;\n caller_not_contains?: InputMaybe;\n caller_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n tokenAmountIn?: InputMaybe;\n tokenAmountIn_gt?: InputMaybe;\n tokenAmountIn_gte?: InputMaybe;\n tokenAmountIn_in?: InputMaybe>;\n tokenAmountIn_lt?: InputMaybe;\n tokenAmountIn_lte?: InputMaybe;\n tokenAmountIn_not?: InputMaybe;\n tokenAmountIn_not_in?: InputMaybe>;\n tokenAmountOut?: InputMaybe;\n tokenAmountOut_gt?: InputMaybe;\n tokenAmountOut_gte?: InputMaybe;\n tokenAmountOut_in?: InputMaybe>;\n tokenAmountOut_lt?: InputMaybe;\n tokenAmountOut_lte?: InputMaybe;\n tokenAmountOut_not?: InputMaybe;\n tokenAmountOut_not_in?: InputMaybe>;\n tokenIn?: InputMaybe;\n tokenInSym?: InputMaybe;\n tokenInSym_contains?: InputMaybe;\n tokenInSym_contains_nocase?: InputMaybe;\n tokenInSym_ends_with?: InputMaybe;\n tokenInSym_ends_with_nocase?: InputMaybe;\n tokenInSym_gt?: InputMaybe;\n tokenInSym_gte?: InputMaybe;\n tokenInSym_in?: InputMaybe>;\n tokenInSym_lt?: InputMaybe;\n tokenInSym_lte?: InputMaybe;\n tokenInSym_not?: InputMaybe;\n tokenInSym_not_contains?: InputMaybe;\n tokenInSym_not_contains_nocase?: InputMaybe;\n tokenInSym_not_ends_with?: InputMaybe;\n tokenInSym_not_ends_with_nocase?: InputMaybe;\n tokenInSym_not_in?: InputMaybe>;\n tokenInSym_not_starts_with?: InputMaybe;\n tokenInSym_not_starts_with_nocase?: InputMaybe;\n tokenInSym_starts_with?: InputMaybe;\n tokenInSym_starts_with_nocase?: InputMaybe;\n tokenIn_contains?: InputMaybe;\n tokenIn_gt?: InputMaybe;\n tokenIn_gte?: InputMaybe;\n tokenIn_in?: InputMaybe>;\n tokenIn_lt?: InputMaybe;\n tokenIn_lte?: InputMaybe;\n tokenIn_not?: InputMaybe;\n tokenIn_not_contains?: InputMaybe;\n tokenIn_not_in?: InputMaybe>;\n tokenOut?: InputMaybe;\n tokenOutSym?: InputMaybe;\n tokenOutSym_contains?: InputMaybe;\n tokenOutSym_contains_nocase?: InputMaybe;\n tokenOutSym_ends_with?: InputMaybe;\n tokenOutSym_ends_with_nocase?: InputMaybe;\n tokenOutSym_gt?: InputMaybe;\n tokenOutSym_gte?: InputMaybe;\n tokenOutSym_in?: InputMaybe>;\n tokenOutSym_lt?: InputMaybe;\n tokenOutSym_lte?: InputMaybe;\n tokenOutSym_not?: InputMaybe;\n tokenOutSym_not_contains?: InputMaybe;\n tokenOutSym_not_contains_nocase?: InputMaybe;\n tokenOutSym_not_ends_with?: InputMaybe;\n tokenOutSym_not_ends_with_nocase?: InputMaybe;\n tokenOutSym_not_in?: InputMaybe>;\n tokenOutSym_not_starts_with?: InputMaybe;\n tokenOutSym_not_starts_with_nocase?: InputMaybe;\n tokenOutSym_starts_with?: InputMaybe;\n tokenOutSym_starts_with_nocase?: InputMaybe;\n tokenOut_contains?: InputMaybe;\n tokenOut_gt?: InputMaybe;\n tokenOut_gte?: InputMaybe;\n tokenOut_in?: InputMaybe>;\n tokenOut_lt?: InputMaybe;\n tokenOut_lte?: InputMaybe;\n tokenOut_not?: InputMaybe;\n tokenOut_not_contains?: InputMaybe;\n tokenOut_not_in?: InputMaybe>;\n tx?: InputMaybe;\n tx_contains?: InputMaybe;\n tx_gt?: InputMaybe;\n tx_gte?: InputMaybe;\n tx_in?: InputMaybe>;\n tx_lt?: InputMaybe;\n tx_lte?: InputMaybe;\n tx_not?: InputMaybe;\n tx_not_contains?: InputMaybe;\n tx_not_in?: InputMaybe>;\n userAddress?: InputMaybe;\n userAddress_?: InputMaybe;\n userAddress_contains?: InputMaybe;\n userAddress_contains_nocase?: InputMaybe;\n userAddress_ends_with?: InputMaybe;\n userAddress_ends_with_nocase?: InputMaybe;\n userAddress_gt?: InputMaybe;\n userAddress_gte?: InputMaybe;\n userAddress_in?: InputMaybe>;\n userAddress_lt?: InputMaybe;\n userAddress_lte?: InputMaybe;\n userAddress_not?: InputMaybe;\n userAddress_not_contains?: InputMaybe;\n userAddress_not_contains_nocase?: InputMaybe;\n userAddress_not_ends_with?: InputMaybe;\n userAddress_not_ends_with_nocase?: InputMaybe;\n userAddress_not_in?: InputMaybe>;\n userAddress_not_starts_with?: InputMaybe;\n userAddress_not_starts_with_nocase?: InputMaybe;\n userAddress_starts_with?: InputMaybe;\n userAddress_starts_with_nocase?: InputMaybe;\n valueUSD?: InputMaybe;\n valueUSD_gt?: InputMaybe;\n valueUSD_gte?: InputMaybe;\n valueUSD_in?: InputMaybe>;\n valueUSD_lt?: InputMaybe;\n valueUSD_lte?: InputMaybe;\n valueUSD_not?: InputMaybe;\n valueUSD_not_in?: InputMaybe>;\n};\n\nexport enum Swap_OrderBy {\n Caller = 'caller',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n Timestamp = 'timestamp',\n TokenAmountIn = 'tokenAmountIn',\n TokenAmountOut = 'tokenAmountOut',\n TokenIn = 'tokenIn',\n TokenInSym = 'tokenInSym',\n TokenOut = 'tokenOut',\n TokenOutSym = 'tokenOutSym',\n Tx = 'tx',\n UserAddress = 'userAddress',\n UserAddressId = 'userAddress__id',\n ValueUsd = 'valueUSD'\n}\n\nexport type Token = {\n __typename?: 'Token';\n address: Scalars['String'];\n decimals: Scalars['Int'];\n fxOracleDecimals?: Maybe;\n id: Scalars['ID'];\n latestFXPrice?: Maybe;\n latestPrice?: Maybe;\n latestUSDPrice?: Maybe;\n latestUSDPriceTimestamp?: Maybe;\n name?: Maybe;\n pool?: Maybe;\n symbol?: Maybe;\n totalBalanceNotional: Scalars['BigDecimal'];\n totalBalanceUSD: Scalars['BigDecimal'];\n totalSwapCount: Scalars['BigInt'];\n totalVolumeNotional: Scalars['BigDecimal'];\n totalVolumeUSD: Scalars['BigDecimal'];\n};\n\nexport type TokenPrice = {\n __typename?: 'TokenPrice';\n amount: Scalars['BigDecimal'];\n asset: Scalars['Bytes'];\n block: Scalars['BigInt'];\n id: Scalars['ID'];\n poolId: Pool;\n price: Scalars['BigDecimal'];\n pricingAsset: Scalars['Bytes'];\n timestamp: Scalars['Int'];\n};\n\nexport type TokenPrice_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n amount?: InputMaybe;\n amount_gt?: InputMaybe;\n amount_gte?: InputMaybe;\n amount_in?: InputMaybe>;\n amount_lt?: InputMaybe;\n amount_lte?: InputMaybe;\n amount_not?: InputMaybe;\n amount_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n asset?: InputMaybe;\n asset_contains?: InputMaybe;\n asset_gt?: InputMaybe;\n asset_gte?: InputMaybe;\n asset_in?: InputMaybe>;\n asset_lt?: InputMaybe;\n asset_lte?: InputMaybe;\n asset_not?: InputMaybe;\n asset_not_contains?: InputMaybe;\n asset_not_in?: InputMaybe>;\n block?: InputMaybe;\n block_gt?: InputMaybe;\n block_gte?: InputMaybe;\n block_in?: InputMaybe>;\n block_lt?: InputMaybe;\n block_lte?: InputMaybe;\n block_not?: InputMaybe;\n block_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_contains_nocase?: InputMaybe;\n poolId_ends_with?: InputMaybe;\n poolId_ends_with_nocase?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_contains_nocase?: InputMaybe;\n poolId_not_ends_with?: InputMaybe;\n poolId_not_ends_with_nocase?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n poolId_not_starts_with?: InputMaybe;\n poolId_not_starts_with_nocase?: InputMaybe;\n poolId_starts_with?: InputMaybe;\n poolId_starts_with_nocase?: InputMaybe;\n price?: InputMaybe;\n price_gt?: InputMaybe;\n price_gte?: InputMaybe;\n price_in?: InputMaybe>;\n price_lt?: InputMaybe;\n price_lte?: InputMaybe;\n price_not?: InputMaybe;\n price_not_in?: InputMaybe>;\n pricingAsset?: InputMaybe;\n pricingAsset_contains?: InputMaybe;\n pricingAsset_gt?: InputMaybe;\n pricingAsset_gte?: InputMaybe;\n pricingAsset_in?: InputMaybe>;\n pricingAsset_lt?: InputMaybe;\n pricingAsset_lte?: InputMaybe;\n pricingAsset_not?: InputMaybe;\n pricingAsset_not_contains?: InputMaybe;\n pricingAsset_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n};\n\nexport enum TokenPrice_OrderBy {\n Amount = 'amount',\n Asset = 'asset',\n Block = 'block',\n Id = 'id',\n PoolId = 'poolId',\n PoolIdAddress = 'poolId__address',\n PoolIdAlpha = 'poolId__alpha',\n PoolIdAmp = 'poolId__amp',\n PoolIdBaseToken = 'poolId__baseToken',\n PoolIdBeta = 'poolId__beta',\n PoolIdC = 'poolId__c',\n PoolIdCreateTime = 'poolId__createTime',\n PoolIdDSq = 'poolId__dSq',\n PoolIdDelta = 'poolId__delta',\n PoolIdEpsilon = 'poolId__epsilon',\n PoolIdExpiryTime = 'poolId__expiryTime',\n PoolIdFactory = 'poolId__factory',\n PoolIdHoldersCount = 'poolId__holdersCount',\n PoolIdId = 'poolId__id',\n PoolIdIsInRecoveryMode = 'poolId__isInRecoveryMode',\n PoolIdIsPaused = 'poolId__isPaused',\n PoolIdJoinExitEnabled = 'poolId__joinExitEnabled',\n PoolIdLambda = 'poolId__lambda',\n PoolIdLastJoinExitAmp = 'poolId__lastJoinExitAmp',\n PoolIdLastPostJoinExitInvariant = 'poolId__lastPostJoinExitInvariant',\n PoolIdLowerTarget = 'poolId__lowerTarget',\n PoolIdMainIndex = 'poolId__mainIndex',\n PoolIdManagementAumFee = 'poolId__managementAumFee',\n PoolIdManagementFee = 'poolId__managementFee',\n PoolIdMustAllowlistLPs = 'poolId__mustAllowlistLPs',\n PoolIdName = 'poolId__name',\n PoolIdOracleEnabled = 'poolId__oracleEnabled',\n PoolIdOwner = 'poolId__owner',\n PoolIdPoolType = 'poolId__poolType',\n PoolIdPoolTypeVersion = 'poolId__poolTypeVersion',\n PoolIdPrincipalToken = 'poolId__principalToken',\n PoolIdProtocolAumFeeCache = 'poolId__protocolAumFeeCache',\n PoolIdProtocolId = 'poolId__protocolId',\n PoolIdProtocolSwapFeeCache = 'poolId__protocolSwapFeeCache',\n PoolIdProtocolYieldFeeCache = 'poolId__protocolYieldFeeCache',\n PoolIdRoot3Alpha = 'poolId__root3Alpha',\n PoolIdS = 'poolId__s',\n PoolIdSqrtAlpha = 'poolId__sqrtAlpha',\n PoolIdSqrtBeta = 'poolId__sqrtBeta',\n PoolIdStrategyType = 'poolId__strategyType',\n PoolIdSwapEnabled = 'poolId__swapEnabled',\n PoolIdSwapEnabledCurationSignal = 'poolId__swapEnabledCurationSignal',\n PoolIdSwapEnabledInternal = 'poolId__swapEnabledInternal',\n PoolIdSwapFee = 'poolId__swapFee',\n PoolIdSwapsCount = 'poolId__swapsCount',\n PoolIdSymbol = 'poolId__symbol',\n PoolIdTauAlphaX = 'poolId__tauAlphaX',\n PoolIdTauAlphaY = 'poolId__tauAlphaY',\n PoolIdTauBetaX = 'poolId__tauBetaX',\n PoolIdTauBetaY = 'poolId__tauBetaY',\n PoolIdTotalAumFeeCollectedInBpt = 'poolId__totalAumFeeCollectedInBPT',\n PoolIdTotalLiquidity = 'poolId__totalLiquidity',\n PoolIdTotalLiquiditySansBpt = 'poolId__totalLiquiditySansBPT',\n PoolIdTotalProtocolFee = 'poolId__totalProtocolFee',\n PoolIdTotalProtocolFeePaidInBpt = 'poolId__totalProtocolFeePaidInBPT',\n PoolIdTotalShares = 'poolId__totalShares',\n PoolIdTotalSwapFee = 'poolId__totalSwapFee',\n PoolIdTotalSwapVolume = 'poolId__totalSwapVolume',\n PoolIdTotalWeight = 'poolId__totalWeight',\n PoolIdTx = 'poolId__tx',\n PoolIdU = 'poolId__u',\n PoolIdUnitSeconds = 'poolId__unitSeconds',\n PoolIdUpperTarget = 'poolId__upperTarget',\n PoolIdV = 'poolId__v',\n PoolIdW = 'poolId__w',\n PoolIdWrappedIndex = 'poolId__wrappedIndex',\n PoolIdZ = 'poolId__z',\n Price = 'price',\n PricingAsset = 'pricingAsset',\n Timestamp = 'timestamp'\n}\n\nexport type TokenSnapshot = {\n __typename?: 'TokenSnapshot';\n id: Scalars['ID'];\n timestamp: Scalars['Int'];\n token: Token;\n totalBalanceNotional: Scalars['BigDecimal'];\n totalBalanceUSD: Scalars['BigDecimal'];\n totalSwapCount: Scalars['BigInt'];\n totalVolumeNotional: Scalars['BigDecimal'];\n totalVolumeUSD: Scalars['BigDecimal'];\n};\n\nexport type TokenSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n token?: InputMaybe;\n token_?: InputMaybe;\n token_contains?: InputMaybe;\n token_contains_nocase?: InputMaybe;\n token_ends_with?: InputMaybe;\n token_ends_with_nocase?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_contains_nocase?: InputMaybe;\n token_not_ends_with?: InputMaybe;\n token_not_ends_with_nocase?: InputMaybe;\n token_not_in?: InputMaybe>;\n token_not_starts_with?: InputMaybe;\n token_not_starts_with_nocase?: InputMaybe;\n token_starts_with?: InputMaybe;\n token_starts_with_nocase?: InputMaybe;\n totalBalanceNotional?: InputMaybe;\n totalBalanceNotional_gt?: InputMaybe;\n totalBalanceNotional_gte?: InputMaybe;\n totalBalanceNotional_in?: InputMaybe>;\n totalBalanceNotional_lt?: InputMaybe;\n totalBalanceNotional_lte?: InputMaybe;\n totalBalanceNotional_not?: InputMaybe;\n totalBalanceNotional_not_in?: InputMaybe>;\n totalBalanceUSD?: InputMaybe;\n totalBalanceUSD_gt?: InputMaybe;\n totalBalanceUSD_gte?: InputMaybe;\n totalBalanceUSD_in?: InputMaybe>;\n totalBalanceUSD_lt?: InputMaybe;\n totalBalanceUSD_lte?: InputMaybe;\n totalBalanceUSD_not?: InputMaybe;\n totalBalanceUSD_not_in?: InputMaybe>;\n totalSwapCount?: InputMaybe;\n totalSwapCount_gt?: InputMaybe;\n totalSwapCount_gte?: InputMaybe;\n totalSwapCount_in?: InputMaybe>;\n totalSwapCount_lt?: InputMaybe;\n totalSwapCount_lte?: InputMaybe;\n totalSwapCount_not?: InputMaybe;\n totalSwapCount_not_in?: InputMaybe>;\n totalVolumeNotional?: InputMaybe;\n totalVolumeNotional_gt?: InputMaybe;\n totalVolumeNotional_gte?: InputMaybe;\n totalVolumeNotional_in?: InputMaybe>;\n totalVolumeNotional_lt?: InputMaybe;\n totalVolumeNotional_lte?: InputMaybe;\n totalVolumeNotional_not?: InputMaybe;\n totalVolumeNotional_not_in?: InputMaybe>;\n totalVolumeUSD?: InputMaybe;\n totalVolumeUSD_gt?: InputMaybe;\n totalVolumeUSD_gte?: InputMaybe;\n totalVolumeUSD_in?: InputMaybe>;\n totalVolumeUSD_lt?: InputMaybe;\n totalVolumeUSD_lte?: InputMaybe;\n totalVolumeUSD_not?: InputMaybe;\n totalVolumeUSD_not_in?: InputMaybe>;\n};\n\nexport enum TokenSnapshot_OrderBy {\n Id = 'id',\n Timestamp = 'timestamp',\n Token = 'token',\n TokenAddress = 'token__address',\n TokenDecimals = 'token__decimals',\n TokenFxOracleDecimals = 'token__fxOracleDecimals',\n TokenId = 'token__id',\n TokenLatestFxPrice = 'token__latestFXPrice',\n TokenLatestUsdPrice = 'token__latestUSDPrice',\n TokenLatestUsdPriceTimestamp = 'token__latestUSDPriceTimestamp',\n TokenName = 'token__name',\n TokenSymbol = 'token__symbol',\n TokenTotalBalanceNotional = 'token__totalBalanceNotional',\n TokenTotalBalanceUsd = 'token__totalBalanceUSD',\n TokenTotalSwapCount = 'token__totalSwapCount',\n TokenTotalVolumeNotional = 'token__totalVolumeNotional',\n TokenTotalVolumeUsd = 'token__totalVolumeUSD',\n TotalBalanceNotional = 'totalBalanceNotional',\n TotalBalanceUsd = 'totalBalanceUSD',\n TotalSwapCount = 'totalSwapCount',\n TotalVolumeNotional = 'totalVolumeNotional',\n TotalVolumeUsd = 'totalVolumeUSD'\n}\n\nexport type Token_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_contains_nocase?: InputMaybe;\n address_ends_with?: InputMaybe;\n address_ends_with_nocase?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_contains_nocase?: InputMaybe;\n address_not_ends_with?: InputMaybe;\n address_not_ends_with_nocase?: InputMaybe;\n address_not_in?: InputMaybe>;\n address_not_starts_with?: InputMaybe;\n address_not_starts_with_nocase?: InputMaybe;\n address_starts_with?: InputMaybe;\n address_starts_with_nocase?: InputMaybe;\n and?: InputMaybe>>;\n decimals?: InputMaybe;\n decimals_gt?: InputMaybe;\n decimals_gte?: InputMaybe;\n decimals_in?: InputMaybe>;\n decimals_lt?: InputMaybe;\n decimals_lte?: InputMaybe;\n decimals_not?: InputMaybe;\n decimals_not_in?: InputMaybe>;\n fxOracleDecimals?: InputMaybe;\n fxOracleDecimals_gt?: InputMaybe;\n fxOracleDecimals_gte?: InputMaybe;\n fxOracleDecimals_in?: InputMaybe>;\n fxOracleDecimals_lt?: InputMaybe;\n fxOracleDecimals_lte?: InputMaybe;\n fxOracleDecimals_not?: InputMaybe;\n fxOracleDecimals_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n latestFXPrice?: InputMaybe;\n latestFXPrice_gt?: InputMaybe;\n latestFXPrice_gte?: InputMaybe;\n latestFXPrice_in?: InputMaybe>;\n latestFXPrice_lt?: InputMaybe;\n latestFXPrice_lte?: InputMaybe;\n latestFXPrice_not?: InputMaybe;\n latestFXPrice_not_in?: InputMaybe>;\n latestPrice?: InputMaybe;\n latestPrice_?: InputMaybe;\n latestPrice_contains?: InputMaybe;\n latestPrice_contains_nocase?: InputMaybe;\n latestPrice_ends_with?: InputMaybe;\n latestPrice_ends_with_nocase?: InputMaybe;\n latestPrice_gt?: InputMaybe;\n latestPrice_gte?: InputMaybe;\n latestPrice_in?: InputMaybe>;\n latestPrice_lt?: InputMaybe;\n latestPrice_lte?: InputMaybe;\n latestPrice_not?: InputMaybe;\n latestPrice_not_contains?: InputMaybe;\n latestPrice_not_contains_nocase?: InputMaybe;\n latestPrice_not_ends_with?: InputMaybe;\n latestPrice_not_ends_with_nocase?: InputMaybe;\n latestPrice_not_in?: InputMaybe>;\n latestPrice_not_starts_with?: InputMaybe;\n latestPrice_not_starts_with_nocase?: InputMaybe;\n latestPrice_starts_with?: InputMaybe;\n latestPrice_starts_with_nocase?: InputMaybe;\n latestUSDPrice?: InputMaybe;\n latestUSDPriceTimestamp?: InputMaybe;\n latestUSDPriceTimestamp_gt?: InputMaybe;\n latestUSDPriceTimestamp_gte?: InputMaybe;\n latestUSDPriceTimestamp_in?: InputMaybe>;\n latestUSDPriceTimestamp_lt?: InputMaybe;\n latestUSDPriceTimestamp_lte?: InputMaybe;\n latestUSDPriceTimestamp_not?: InputMaybe;\n latestUSDPriceTimestamp_not_in?: InputMaybe>;\n latestUSDPrice_gt?: InputMaybe;\n latestUSDPrice_gte?: InputMaybe;\n latestUSDPrice_in?: InputMaybe>;\n latestUSDPrice_lt?: InputMaybe;\n latestUSDPrice_lte?: InputMaybe;\n latestUSDPrice_not?: InputMaybe;\n latestUSDPrice_not_in?: InputMaybe>;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n totalBalanceNotional?: InputMaybe;\n totalBalanceNotional_gt?: InputMaybe;\n totalBalanceNotional_gte?: InputMaybe;\n totalBalanceNotional_in?: InputMaybe>;\n totalBalanceNotional_lt?: InputMaybe;\n totalBalanceNotional_lte?: InputMaybe;\n totalBalanceNotional_not?: InputMaybe;\n totalBalanceNotional_not_in?: InputMaybe>;\n totalBalanceUSD?: InputMaybe;\n totalBalanceUSD_gt?: InputMaybe;\n totalBalanceUSD_gte?: InputMaybe;\n totalBalanceUSD_in?: InputMaybe>;\n totalBalanceUSD_lt?: InputMaybe;\n totalBalanceUSD_lte?: InputMaybe;\n totalBalanceUSD_not?: InputMaybe;\n totalBalanceUSD_not_in?: InputMaybe>;\n totalSwapCount?: InputMaybe;\n totalSwapCount_gt?: InputMaybe;\n totalSwapCount_gte?: InputMaybe;\n totalSwapCount_in?: InputMaybe>;\n totalSwapCount_lt?: InputMaybe;\n totalSwapCount_lte?: InputMaybe;\n totalSwapCount_not?: InputMaybe;\n totalSwapCount_not_in?: InputMaybe>;\n totalVolumeNotional?: InputMaybe;\n totalVolumeNotional_gt?: InputMaybe;\n totalVolumeNotional_gte?: InputMaybe;\n totalVolumeNotional_in?: InputMaybe>;\n totalVolumeNotional_lt?: InputMaybe;\n totalVolumeNotional_lte?: InputMaybe;\n totalVolumeNotional_not?: InputMaybe;\n totalVolumeNotional_not_in?: InputMaybe>;\n totalVolumeUSD?: InputMaybe;\n totalVolumeUSD_gt?: InputMaybe;\n totalVolumeUSD_gte?: InputMaybe;\n totalVolumeUSD_in?: InputMaybe>;\n totalVolumeUSD_lt?: InputMaybe;\n totalVolumeUSD_lte?: InputMaybe;\n totalVolumeUSD_not?: InputMaybe;\n totalVolumeUSD_not_in?: InputMaybe>;\n};\n\nexport enum Token_OrderBy {\n Address = 'address',\n Decimals = 'decimals',\n FxOracleDecimals = 'fxOracleDecimals',\n Id = 'id',\n LatestFxPrice = 'latestFXPrice',\n LatestPrice = 'latestPrice',\n LatestPriceAsset = 'latestPrice__asset',\n LatestPriceBlock = 'latestPrice__block',\n LatestPriceId = 'latestPrice__id',\n LatestPricePrice = 'latestPrice__price',\n LatestPricePricingAsset = 'latestPrice__pricingAsset',\n LatestUsdPrice = 'latestUSDPrice',\n LatestUsdPriceTimestamp = 'latestUSDPriceTimestamp',\n Name = 'name',\n Pool = 'pool',\n PoolAddress = 'pool__address',\n PoolAlpha = 'pool__alpha',\n PoolAmp = 'pool__amp',\n PoolBaseToken = 'pool__baseToken',\n PoolBeta = 'pool__beta',\n PoolC = 'pool__c',\n PoolCreateTime = 'pool__createTime',\n PoolDSq = 'pool__dSq',\n PoolDelta = 'pool__delta',\n PoolEpsilon = 'pool__epsilon',\n PoolExpiryTime = 'pool__expiryTime',\n PoolFactory = 'pool__factory',\n PoolHoldersCount = 'pool__holdersCount',\n PoolId = 'pool__id',\n PoolIsInRecoveryMode = 'pool__isInRecoveryMode',\n PoolIsPaused = 'pool__isPaused',\n PoolJoinExitEnabled = 'pool__joinExitEnabled',\n PoolLambda = 'pool__lambda',\n PoolLastJoinExitAmp = 'pool__lastJoinExitAmp',\n PoolLastPostJoinExitInvariant = 'pool__lastPostJoinExitInvariant',\n PoolLowerTarget = 'pool__lowerTarget',\n PoolMainIndex = 'pool__mainIndex',\n PoolManagementAumFee = 'pool__managementAumFee',\n PoolManagementFee = 'pool__managementFee',\n PoolMustAllowlistLPs = 'pool__mustAllowlistLPs',\n PoolName = 'pool__name',\n PoolOracleEnabled = 'pool__oracleEnabled',\n PoolOwner = 'pool__owner',\n PoolPoolType = 'pool__poolType',\n PoolPoolTypeVersion = 'pool__poolTypeVersion',\n PoolPrincipalToken = 'pool__principalToken',\n PoolProtocolAumFeeCache = 'pool__protocolAumFeeCache',\n PoolProtocolId = 'pool__protocolId',\n PoolProtocolSwapFeeCache = 'pool__protocolSwapFeeCache',\n PoolProtocolYieldFeeCache = 'pool__protocolYieldFeeCache',\n PoolRoot3Alpha = 'pool__root3Alpha',\n PoolS = 'pool__s',\n PoolSqrtAlpha = 'pool__sqrtAlpha',\n PoolSqrtBeta = 'pool__sqrtBeta',\n PoolStrategyType = 'pool__strategyType',\n PoolSwapEnabled = 'pool__swapEnabled',\n PoolSwapEnabledCurationSignal = 'pool__swapEnabledCurationSignal',\n PoolSwapEnabledInternal = 'pool__swapEnabledInternal',\n PoolSwapFee = 'pool__swapFee',\n PoolSwapsCount = 'pool__swapsCount',\n PoolSymbol = 'pool__symbol',\n PoolTauAlphaX = 'pool__tauAlphaX',\n PoolTauAlphaY = 'pool__tauAlphaY',\n PoolTauBetaX = 'pool__tauBetaX',\n PoolTauBetaY = 'pool__tauBetaY',\n PoolTotalAumFeeCollectedInBpt = 'pool__totalAumFeeCollectedInBPT',\n PoolTotalLiquidity = 'pool__totalLiquidity',\n PoolTotalLiquiditySansBpt = 'pool__totalLiquiditySansBPT',\n PoolTotalProtocolFee = 'pool__totalProtocolFee',\n PoolTotalProtocolFeePaidInBpt = 'pool__totalProtocolFeePaidInBPT',\n PoolTotalShares = 'pool__totalShares',\n PoolTotalSwapFee = 'pool__totalSwapFee',\n PoolTotalSwapVolume = 'pool__totalSwapVolume',\n PoolTotalWeight = 'pool__totalWeight',\n PoolTx = 'pool__tx',\n PoolU = 'pool__u',\n PoolUnitSeconds = 'pool__unitSeconds',\n PoolUpperTarget = 'pool__upperTarget',\n PoolV = 'pool__v',\n PoolW = 'pool__w',\n PoolWrappedIndex = 'pool__wrappedIndex',\n PoolZ = 'pool__z',\n Symbol = 'symbol',\n TotalBalanceNotional = 'totalBalanceNotional',\n TotalBalanceUsd = 'totalBalanceUSD',\n TotalSwapCount = 'totalSwapCount',\n TotalVolumeNotional = 'totalVolumeNotional',\n TotalVolumeUsd = 'totalVolumeUSD'\n}\n\nexport type TradePair = {\n __typename?: 'TradePair';\n /** Token Address - Token Address */\n id: Scalars['ID'];\n token0: Token;\n token1: Token;\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n};\n\nexport type TradePairSnapshot = {\n __typename?: 'TradePairSnapshot';\n id: Scalars['ID'];\n pair: TradePair;\n timestamp: Scalars['Int'];\n totalSwapFee: Scalars['BigDecimal'];\n totalSwapVolume: Scalars['BigDecimal'];\n};\n\nexport type TradePairSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pair?: InputMaybe;\n pair_?: InputMaybe;\n pair_contains?: InputMaybe;\n pair_contains_nocase?: InputMaybe;\n pair_ends_with?: InputMaybe;\n pair_ends_with_nocase?: InputMaybe;\n pair_gt?: InputMaybe;\n pair_gte?: InputMaybe;\n pair_in?: InputMaybe>;\n pair_lt?: InputMaybe;\n pair_lte?: InputMaybe;\n pair_not?: InputMaybe;\n pair_not_contains?: InputMaybe;\n pair_not_contains_nocase?: InputMaybe;\n pair_not_ends_with?: InputMaybe;\n pair_not_ends_with_nocase?: InputMaybe;\n pair_not_in?: InputMaybe>;\n pair_not_starts_with?: InputMaybe;\n pair_not_starts_with_nocase?: InputMaybe;\n pair_starts_with?: InputMaybe;\n pair_starts_with_nocase?: InputMaybe;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n};\n\nexport enum TradePairSnapshot_OrderBy {\n Id = 'id',\n Pair = 'pair',\n PairId = 'pair__id',\n PairTotalSwapFee = 'pair__totalSwapFee',\n PairTotalSwapVolume = 'pair__totalSwapVolume',\n Timestamp = 'timestamp',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume'\n}\n\nexport type TradePair_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n token0?: InputMaybe;\n token0_?: InputMaybe;\n token0_contains?: InputMaybe;\n token0_contains_nocase?: InputMaybe;\n token0_ends_with?: InputMaybe;\n token0_ends_with_nocase?: InputMaybe;\n token0_gt?: InputMaybe;\n token0_gte?: InputMaybe;\n token0_in?: InputMaybe>;\n token0_lt?: InputMaybe;\n token0_lte?: InputMaybe;\n token0_not?: InputMaybe;\n token0_not_contains?: InputMaybe;\n token0_not_contains_nocase?: InputMaybe;\n token0_not_ends_with?: InputMaybe;\n token0_not_ends_with_nocase?: InputMaybe;\n token0_not_in?: InputMaybe>;\n token0_not_starts_with?: InputMaybe;\n token0_not_starts_with_nocase?: InputMaybe;\n token0_starts_with?: InputMaybe;\n token0_starts_with_nocase?: InputMaybe;\n token1?: InputMaybe;\n token1_?: InputMaybe;\n token1_contains?: InputMaybe;\n token1_contains_nocase?: InputMaybe;\n token1_ends_with?: InputMaybe;\n token1_ends_with_nocase?: InputMaybe;\n token1_gt?: InputMaybe;\n token1_gte?: InputMaybe;\n token1_in?: InputMaybe>;\n token1_lt?: InputMaybe;\n token1_lte?: InputMaybe;\n token1_not?: InputMaybe;\n token1_not_contains?: InputMaybe;\n token1_not_contains_nocase?: InputMaybe;\n token1_not_ends_with?: InputMaybe;\n token1_not_ends_with_nocase?: InputMaybe;\n token1_not_in?: InputMaybe>;\n token1_not_starts_with?: InputMaybe;\n token1_not_starts_with_nocase?: InputMaybe;\n token1_starts_with?: InputMaybe;\n token1_starts_with_nocase?: InputMaybe;\n totalSwapFee?: InputMaybe;\n totalSwapFee_gt?: InputMaybe;\n totalSwapFee_gte?: InputMaybe;\n totalSwapFee_in?: InputMaybe>;\n totalSwapFee_lt?: InputMaybe;\n totalSwapFee_lte?: InputMaybe;\n totalSwapFee_not?: InputMaybe;\n totalSwapFee_not_in?: InputMaybe>;\n totalSwapVolume?: InputMaybe;\n totalSwapVolume_gt?: InputMaybe;\n totalSwapVolume_gte?: InputMaybe;\n totalSwapVolume_in?: InputMaybe>;\n totalSwapVolume_lt?: InputMaybe;\n totalSwapVolume_lte?: InputMaybe;\n totalSwapVolume_not?: InputMaybe;\n totalSwapVolume_not_in?: InputMaybe>;\n};\n\nexport enum TradePair_OrderBy {\n Id = 'id',\n Token0 = 'token0',\n Token0Address = 'token0__address',\n Token0Decimals = 'token0__decimals',\n Token0FxOracleDecimals = 'token0__fxOracleDecimals',\n Token0Id = 'token0__id',\n Token0LatestFxPrice = 'token0__latestFXPrice',\n Token0LatestUsdPrice = 'token0__latestUSDPrice',\n Token0LatestUsdPriceTimestamp = 'token0__latestUSDPriceTimestamp',\n Token0Name = 'token0__name',\n Token0Symbol = 'token0__symbol',\n Token0TotalBalanceNotional = 'token0__totalBalanceNotional',\n Token0TotalBalanceUsd = 'token0__totalBalanceUSD',\n Token0TotalSwapCount = 'token0__totalSwapCount',\n Token0TotalVolumeNotional = 'token0__totalVolumeNotional',\n Token0TotalVolumeUsd = 'token0__totalVolumeUSD',\n Token1 = 'token1',\n Token1Address = 'token1__address',\n Token1Decimals = 'token1__decimals',\n Token1FxOracleDecimals = 'token1__fxOracleDecimals',\n Token1Id = 'token1__id',\n Token1LatestFxPrice = 'token1__latestFXPrice',\n Token1LatestUsdPrice = 'token1__latestUSDPrice',\n Token1LatestUsdPriceTimestamp = 'token1__latestUSDPriceTimestamp',\n Token1Name = 'token1__name',\n Token1Symbol = 'token1__symbol',\n Token1TotalBalanceNotional = 'token1__totalBalanceNotional',\n Token1TotalBalanceUsd = 'token1__totalBalanceUSD',\n Token1TotalSwapCount = 'token1__totalSwapCount',\n Token1TotalVolumeNotional = 'token1__totalVolumeNotional',\n Token1TotalVolumeUsd = 'token1__totalVolumeUSD',\n TotalSwapFee = 'totalSwapFee',\n TotalSwapVolume = 'totalSwapVolume'\n}\n\nexport type User = {\n __typename?: 'User';\n id: Scalars['ID'];\n sharesOwned?: Maybe>;\n swaps?: Maybe>;\n userInternalBalances?: Maybe>;\n};\n\n\nexport type UserSharesOwnedArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserSwapsArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserUserInternalBalancesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type UserInternalBalance = {\n __typename?: 'UserInternalBalance';\n balance: Scalars['BigDecimal'];\n id: Scalars['ID'];\n token: Scalars['Bytes'];\n tokenInfo?: Maybe;\n userAddress?: Maybe;\n};\n\nexport type UserInternalBalance_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n balance?: InputMaybe;\n balance_gt?: InputMaybe;\n balance_gte?: InputMaybe;\n balance_in?: InputMaybe>;\n balance_lt?: InputMaybe;\n balance_lte?: InputMaybe;\n balance_not?: InputMaybe;\n balance_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n token?: InputMaybe;\n tokenInfo?: InputMaybe;\n tokenInfo_?: InputMaybe;\n tokenInfo_contains?: InputMaybe;\n tokenInfo_contains_nocase?: InputMaybe;\n tokenInfo_ends_with?: InputMaybe;\n tokenInfo_ends_with_nocase?: InputMaybe;\n tokenInfo_gt?: InputMaybe;\n tokenInfo_gte?: InputMaybe;\n tokenInfo_in?: InputMaybe>;\n tokenInfo_lt?: InputMaybe;\n tokenInfo_lte?: InputMaybe;\n tokenInfo_not?: InputMaybe;\n tokenInfo_not_contains?: InputMaybe;\n tokenInfo_not_contains_nocase?: InputMaybe;\n tokenInfo_not_ends_with?: InputMaybe;\n tokenInfo_not_ends_with_nocase?: InputMaybe;\n tokenInfo_not_in?: InputMaybe>;\n tokenInfo_not_starts_with?: InputMaybe;\n tokenInfo_not_starts_with_nocase?: InputMaybe;\n tokenInfo_starts_with?: InputMaybe;\n tokenInfo_starts_with_nocase?: InputMaybe;\n token_contains?: InputMaybe;\n token_gt?: InputMaybe;\n token_gte?: InputMaybe;\n token_in?: InputMaybe>;\n token_lt?: InputMaybe;\n token_lte?: InputMaybe;\n token_not?: InputMaybe;\n token_not_contains?: InputMaybe;\n token_not_in?: InputMaybe>;\n userAddress?: InputMaybe;\n userAddress_?: InputMaybe;\n userAddress_contains?: InputMaybe;\n userAddress_contains_nocase?: InputMaybe;\n userAddress_ends_with?: InputMaybe;\n userAddress_ends_with_nocase?: InputMaybe;\n userAddress_gt?: InputMaybe;\n userAddress_gte?: InputMaybe;\n userAddress_in?: InputMaybe>;\n userAddress_lt?: InputMaybe;\n userAddress_lte?: InputMaybe;\n userAddress_not?: InputMaybe;\n userAddress_not_contains?: InputMaybe;\n userAddress_not_contains_nocase?: InputMaybe;\n userAddress_not_ends_with?: InputMaybe;\n userAddress_not_ends_with_nocase?: InputMaybe;\n userAddress_not_in?: InputMaybe>;\n userAddress_not_starts_with?: InputMaybe;\n userAddress_not_starts_with_nocase?: InputMaybe;\n userAddress_starts_with?: InputMaybe;\n userAddress_starts_with_nocase?: InputMaybe;\n};\n\nexport enum UserInternalBalance_OrderBy {\n Balance = 'balance',\n Id = 'id',\n Token = 'token',\n TokenInfo = 'tokenInfo',\n TokenInfoAddress = 'tokenInfo__address',\n TokenInfoDecimals = 'tokenInfo__decimals',\n TokenInfoFxOracleDecimals = 'tokenInfo__fxOracleDecimals',\n TokenInfoId = 'tokenInfo__id',\n TokenInfoLatestFxPrice = 'tokenInfo__latestFXPrice',\n TokenInfoLatestUsdPrice = 'tokenInfo__latestUSDPrice',\n TokenInfoLatestUsdPriceTimestamp = 'tokenInfo__latestUSDPriceTimestamp',\n TokenInfoName = 'tokenInfo__name',\n TokenInfoSymbol = 'tokenInfo__symbol',\n TokenInfoTotalBalanceNotional = 'tokenInfo__totalBalanceNotional',\n TokenInfoTotalBalanceUsd = 'tokenInfo__totalBalanceUSD',\n TokenInfoTotalSwapCount = 'tokenInfo__totalSwapCount',\n TokenInfoTotalVolumeNotional = 'tokenInfo__totalVolumeNotional',\n TokenInfoTotalVolumeUsd = 'tokenInfo__totalVolumeUSD',\n UserAddress = 'userAddress',\n UserAddressId = 'userAddress__id'\n}\n\nexport type User_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n sharesOwned_?: InputMaybe;\n swaps_?: InputMaybe;\n userInternalBalances_?: InputMaybe;\n};\n\nexport enum User_OrderBy {\n Id = 'id',\n SharesOwned = 'sharesOwned',\n Swaps = 'swaps',\n UserInternalBalances = 'userInternalBalances'\n}\n\nexport type _Block_ = {\n __typename?: '_Block_';\n /** The hash of the block */\n hash?: Maybe;\n /** The block number */\n number: Scalars['Int'];\n /** Integer representation of the timestamp stored in blocks for the chain */\n timestamp?: Maybe;\n};\n\n/** The type for the top-level _meta field */\nexport type _Meta_ = {\n __typename?: '_Meta_';\n /**\n * Information about a specific subgraph block. The hash of the block\n * will be null if the _meta field has a block constraint that asks for\n * a block number. It will be filled if the _meta field has no block constraint\n * and therefore asks for the latest block\n *\n */\n block: _Block_;\n /** The deployment ID */\n deployment: Scalars['String'];\n /** If `true`, the subgraph encountered indexing errors at some past block */\n hasIndexingErrors: Scalars['Boolean'];\n};\n\nexport enum _SubgraphErrorPolicy_ {\n /** Data will be returned even if the subgraph has indexing errors */\n Allow = 'allow',\n /** If the subgraph has indexing errors, data will be omitted. The default. */\n Deny = 'deny'\n}\n\nexport type PoolShareQueryVariables = Exact<{\n id: Scalars['ID'];\n block?: InputMaybe;\n}>;\n\n\nexport type PoolShareQuery = { __typename?: 'Query', poolShare?: { __typename?: 'PoolShare', id: string, balance: string, userAddress: { __typename?: 'User', id: string }, poolId: { __typename?: 'Pool', id: string, address: string } } | null };\n\nexport type PoolSharesQueryVariables = Exact<{\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolSharesQuery = { __typename?: 'Query', poolShares: Array<{ __typename?: 'PoolShare', id: string, balance: string, userAddress: { __typename?: 'User', id: string }, poolId: { __typename?: 'Pool', id: string, address: string } }> };\n\nexport type SubgraphPoolShareFragment = { __typename?: 'PoolShare', id: string, balance: string, userAddress: { __typename?: 'User', id: string }, poolId: { __typename?: 'Pool', id: string, address: string } };\n\nexport type PoolsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolsQuery = { __typename?: 'Query', pools: Array<{ __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null }> };\n\nexport type AllPoolsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type AllPoolsQuery = { __typename?: 'Query', pool0: Array<{ __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null }>, pool1000: Array<{ __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null }>, pool2000: Array<{ __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null }> };\n\nexport type PoolQueryVariables = Exact<{\n id: Scalars['ID'];\n block?: InputMaybe;\n}>;\n\n\nexport type PoolQuery = { __typename?: 'Query', pool?: { __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null } | null };\n\nexport type SubgraphPoolFragment = { __typename?: 'Pool', id: string, address: string, poolType?: string | null, poolTypeVersion?: number | null, factory?: string | null, strategyType: number, symbol?: string | null, name?: string | null, swapEnabled: boolean, swapFee: string, protocolYieldFeeCache?: string | null, protocolSwapFeeCache?: string | null, owner?: string | null, totalWeight?: string | null, totalSwapVolume: string, totalSwapFee: string, totalLiquidity: string, totalShares: string, swapsCount: string, holdersCount: string, tokensList: Array, amp?: string | null, expiryTime?: string | null, unitSeconds?: string | null, createTime: number, principalToken?: string | null, baseToken?: string | null, wrappedIndex?: number | null, mainIndex?: number | null, lowerTarget?: string | null, upperTarget?: string | null, sqrtAlpha?: string | null, sqrtBeta?: string | null, root3Alpha?: string | null, isInRecoveryMode?: boolean | null, isPaused?: boolean | null, alpha?: string | null, beta?: string | null, c?: string | null, s?: string | null, lambda?: string | null, tauAlphaX?: string | null, tauAlphaY?: string | null, tauBetaX?: string | null, tauBetaY?: string | null, u?: string | null, v?: string | null, w?: string | null, z?: string | null, dSq?: string | null, delta?: string | null, epsilon?: string | null, tokens?: Array<{ __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } }> | null, priceRateProviders?: Array<{ __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } }> | null };\n\nexport type SubgraphPoolTokenFragment = { __typename?: 'PoolToken', id: string, symbol: string, name: string, decimals: number, address: string, balance: string, managedBalance: string, weight?: string | null, priceRate: string, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null } };\n\nexport type SubgraphSubPoolTokenFragment = { __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null };\n\nexport type TokenAttrsFragment = { __typename?: 'Token', address: string, symbol?: string | null, decimals: number };\n\nexport type SubgraphSubPoolFragment = { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null };\n\nexport type TokenTreeFragment = { __typename?: 'Token', latestUSDPrice?: string | null, latestFXPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null, tokens?: Array<{ __typename?: 'PoolToken', address: string, balance: string, weight?: string | null, priceRate: string, symbol: string, decimals: number, isExemptFromYieldProtocolFee?: boolean | null, token: { __typename?: 'Token', latestUSDPrice?: string | null, pool?: { __typename?: 'Pool', id: string, totalShares: string, address: string, poolType?: string | null, mainIndex?: number | null } | null } }> | null } | null } }> | null } | null };\n\nexport type SubgraphPriceRateProviderFragment = { __typename?: 'PriceRateProvider', address: string, token: { __typename?: 'PoolToken', address: string } };\n\nexport type PoolHistoricalLiquiditiesQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolHistoricalLiquiditiesQuery = { __typename?: 'Query', poolHistoricalLiquidities: Array<{ __typename?: 'PoolHistoricalLiquidity', id: string, poolTotalShares: string, poolLiquidity: string, poolShareValue: string, pricingAsset: string, block: string, poolId: { __typename?: 'Pool', id: string } }> };\n\nexport type PoolSnapshotsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolSnapshotsQuery = { __typename?: 'Query', poolSnapshots: Array<{ __typename?: 'PoolSnapshot', id: string, totalShares: string, swapVolume: string, swapFees: string, timestamp: number, pool: { __typename?: 'Pool', id: string } }> };\n\nexport type SubgraphPoolSnapshotFragment = { __typename?: 'PoolSnapshot', id: string, totalShares: string, swapVolume: string, swapFees: string, timestamp: number, pool: { __typename?: 'Pool', id: string } };\n\nexport type JoinExitsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type JoinExitsQuery = { __typename?: 'Query', joinExits: Array<{ __typename?: 'JoinExit', amounts: Array, id: string, sender: string, timestamp: number, tx: string, type: InvestType, user: { __typename?: 'User', id: string }, pool: { __typename?: 'Pool', id: string, tokensList: Array } }> };\n\nexport type SubgraphJoinExitFragment = { __typename?: 'JoinExit', amounts: Array, id: string, sender: string, timestamp: number, tx: string, type: InvestType, user: { __typename?: 'User', id: string }, pool: { __typename?: 'Pool', id: string, tokensList: Array } };\n\nexport type BalancersQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type BalancersQuery = { __typename?: 'Query', balancers: Array<{ __typename?: 'Balancer', id: string, totalLiquidity: string, totalSwapVolume: string, totalSwapFee: string, totalSwapCount: string, poolCount: number }> };\n\nexport type SubgraphBalancerFragment = { __typename?: 'Balancer', id: string, totalLiquidity: string, totalSwapVolume: string, totalSwapFee: string, totalSwapCount: string, poolCount: number };\n\nexport type TokenPricesQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type TokenPricesQuery = { __typename?: 'Query', tokenPrices: Array<{ __typename?: 'TokenPrice', id: string, asset: string, amount: string, pricingAsset: string, price: string, block: string, timestamp: number, poolId: { __typename?: 'Pool', id: string } }> };\n\nexport type SubgraphTokenPriceFragment = { __typename?: 'TokenPrice', id: string, asset: string, amount: string, pricingAsset: string, price: string, block: string, timestamp: number, poolId: { __typename?: 'Pool', id: string } };\n\nexport type TokenLatestPricesQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type TokenLatestPricesQuery = { __typename?: 'Query', latestPrices: Array<{ __typename?: 'LatestPrice', id: string, asset: string, price: string, pricingAsset: string, poolId: { __typename?: 'Pool', id: string } }> };\n\nexport type TokenLatestPriceQueryVariables = Exact<{\n id: Scalars['ID'];\n}>;\n\n\nexport type TokenLatestPriceQuery = { __typename?: 'Query', latestPrice?: { __typename?: 'LatestPrice', id: string, asset: string, price: string, pricingAsset: string, poolId: { __typename?: 'Pool', id: string } } | null };\n\nexport type SubgraphTokenLatestPriceFragment = { __typename?: 'LatestPrice', id: string, asset: string, price: string, pricingAsset: string, poolId: { __typename?: 'Pool', id: string } };\n\nexport type UserQueryVariables = Exact<{\n id: Scalars['ID'];\n block?: InputMaybe;\n}>;\n\n\nexport type UserQuery = { __typename?: 'Query', user?: { __typename?: 'User', id: string, sharesOwned?: Array<{ __typename?: 'PoolShare', balance: string, poolId: { __typename?: 'Pool', id: string } }> | null } | null };\n\nexport type UsersQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type UsersQuery = { __typename?: 'Query', users: Array<{ __typename?: 'User', id: string, sharesOwned?: Array<{ __typename?: 'PoolShare', balance: string, poolId: { __typename?: 'Pool', id: string } }> | null }> };\n\nexport type SubgraphUserFragment = { __typename?: 'User', id: string, sharesOwned?: Array<{ __typename?: 'PoolShare', balance: string, poolId: { __typename?: 'Pool', id: string } }> | null };\n\nexport const SubgraphPoolShareFragmentDoc = gql`\n fragment SubgraphPoolShare on PoolShare {\n id\n balance\n userAddress {\n id\n }\n poolId {\n id\n address\n }\n}\n `;\nexport const SubgraphSubPoolFragmentDoc = gql`\n fragment SubgraphSubPool on Pool {\n id\n totalShares\n address\n poolType\n mainIndex\n}\n `;\nexport const SubgraphSubPoolTokenFragmentDoc = gql`\n fragment SubgraphSubPoolToken on PoolToken {\n address\n balance\n weight\n priceRate\n symbol\n decimals\n isExemptFromYieldProtocolFee\n}\n `;\nexport const TokenTreeFragmentDoc = gql`\n fragment TokenTree on Token {\n latestUSDPrice\n latestFXPrice\n pool {\n ...SubgraphSubPool\n tokens(first: 100, orderBy: index) {\n ...SubgraphSubPoolToken\n token {\n latestUSDPrice\n pool {\n ...SubgraphSubPool\n tokens(first: 100, orderBy: index) {\n ...SubgraphSubPoolToken\n token {\n latestUSDPrice\n pool {\n ...SubgraphSubPool\n }\n }\n }\n }\n }\n }\n }\n}\n ${SubgraphSubPoolFragmentDoc}\n${SubgraphSubPoolTokenFragmentDoc}`;\nexport const SubgraphPoolTokenFragmentDoc = gql`\n fragment SubgraphPoolToken on PoolToken {\n id\n symbol\n name\n decimals\n address\n balance\n managedBalance\n weight\n priceRate\n isExemptFromYieldProtocolFee\n token {\n ...TokenTree\n }\n}\n ${TokenTreeFragmentDoc}`;\nexport const SubgraphPriceRateProviderFragmentDoc = gql`\n fragment SubgraphPriceRateProvider on PriceRateProvider {\n address\n token {\n address\n }\n}\n `;\nexport const SubgraphPoolFragmentDoc = gql`\n fragment SubgraphPool on Pool {\n id\n address\n poolType\n poolTypeVersion\n factory\n strategyType\n symbol\n name\n swapEnabled\n swapFee\n protocolYieldFeeCache\n protocolSwapFeeCache\n owner\n totalWeight\n totalSwapVolume\n totalSwapFee\n totalLiquidity\n totalShares\n tokens(first: 100, orderBy: index) {\n ...SubgraphPoolToken\n }\n swapsCount\n holdersCount\n tokensList\n amp\n priceRateProviders(first: 100) {\n ...SubgraphPriceRateProvider\n }\n expiryTime\n unitSeconds\n createTime\n principalToken\n baseToken\n wrappedIndex\n mainIndex\n lowerTarget\n upperTarget\n sqrtAlpha\n sqrtBeta\n root3Alpha\n isInRecoveryMode\n isPaused\n alpha\n beta\n c\n s\n lambda\n tauAlphaX\n tauAlphaY\n tauBetaX\n tauBetaY\n u\n v\n w\n z\n dSq\n delta\n epsilon\n}\n ${SubgraphPoolTokenFragmentDoc}\n${SubgraphPriceRateProviderFragmentDoc}`;\nexport const TokenAttrsFragmentDoc = gql`\n fragment TokenAttrs on Token {\n address\n symbol\n decimals\n}\n `;\nexport const SubgraphPoolSnapshotFragmentDoc = gql`\n fragment SubgraphPoolSnapshot on PoolSnapshot {\n id\n pool {\n id\n }\n totalShares\n swapVolume\n swapFees\n timestamp\n}\n `;\nexport const SubgraphJoinExitFragmentDoc = gql`\n fragment SubgraphJoinExit on JoinExit {\n amounts\n id\n sender\n timestamp\n tx\n type\n user {\n id\n }\n pool {\n id\n tokensList\n }\n}\n `;\nexport const SubgraphBalancerFragmentDoc = gql`\n fragment SubgraphBalancer on Balancer {\n id\n totalLiquidity\n totalSwapVolume\n totalSwapFee\n totalSwapCount\n poolCount\n}\n `;\nexport const SubgraphTokenPriceFragmentDoc = gql`\n fragment SubgraphTokenPrice on TokenPrice {\n id\n poolId {\n id\n }\n asset\n amount\n pricingAsset\n price\n block\n timestamp\n}\n `;\nexport const SubgraphTokenLatestPriceFragmentDoc = gql`\n fragment SubgraphTokenLatestPrice on LatestPrice {\n id\n asset\n price\n poolId {\n id\n }\n pricingAsset\n}\n `;\nexport const SubgraphUserFragmentDoc = gql`\n fragment SubgraphUser on User {\n id\n sharesOwned(first: 1000) {\n balance\n poolId {\n id\n }\n }\n}\n `;\nexport const PoolShareDocument = gql`\n query PoolShare($id: ID!, $block: Block_height) {\n poolShare(id: $id, block: $block) {\n ...SubgraphPoolShare\n }\n}\n ${SubgraphPoolShareFragmentDoc}`;\nexport const PoolSharesDocument = gql`\n query PoolShares($first: Int, $orderBy: PoolShare_orderBy, $orderDirection: OrderDirection, $skip: Int, $where: PoolShare_filter, $block: Block_height) {\n poolShares(\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n skip: $skip\n where: $where\n block: $block\n ) {\n ...SubgraphPoolShare\n }\n}\n ${SubgraphPoolShareFragmentDoc}`;\nexport const PoolsDocument = gql`\n query Pools($skip: Int, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter, $block: Block_height) {\n pools(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPool\n }\n}\n ${SubgraphPoolFragmentDoc}`;\nexport const AllPoolsDocument = gql`\n query AllPools($skip: Int, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter, $block: Block_height) {\n pool0: pools(\n first: 1000\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPool\n }\n pool1000: pools(\n first: 1000\n skip: 1000\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPool\n }\n pool2000: pools(\n first: 1000\n skip: 2000\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPool\n }\n}\n ${SubgraphPoolFragmentDoc}`;\nexport const PoolDocument = gql`\n query Pool($id: ID!, $block: Block_height) {\n pool(id: $id, block: $block) {\n ...SubgraphPool\n }\n}\n ${SubgraphPoolFragmentDoc}`;\nexport const PoolHistoricalLiquiditiesDocument = gql`\n query PoolHistoricalLiquidities($skip: Int, $first: Int, $orderBy: PoolHistoricalLiquidity_orderBy, $orderDirection: OrderDirection, $where: PoolHistoricalLiquidity_filter, $block: Block_height) {\n poolHistoricalLiquidities(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n id\n poolId {\n id\n }\n poolTotalShares\n poolLiquidity\n poolShareValue\n pricingAsset\n block\n }\n}\n `;\nexport const PoolSnapshotsDocument = gql`\n query PoolSnapshots($skip: Int, $first: Int, $orderBy: PoolSnapshot_orderBy, $orderDirection: OrderDirection, $where: PoolSnapshot_filter, $block: Block_height) {\n poolSnapshots(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPoolSnapshot\n }\n}\n ${SubgraphPoolSnapshotFragmentDoc}`;\nexport const JoinExitsDocument = gql`\n query JoinExits($skip: Int, $first: Int, $orderBy: JoinExit_orderBy, $orderDirection: OrderDirection, $where: JoinExit_filter, $block: Block_height) {\n joinExits(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphJoinExit\n }\n}\n ${SubgraphJoinExitFragmentDoc}`;\nexport const BalancersDocument = gql`\n query Balancers($skip: Int, $first: Int, $orderBy: Balancer_orderBy, $orderDirection: OrderDirection, $where: Balancer_filter, $block: Block_height) {\n balancers(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphBalancer\n }\n}\n ${SubgraphBalancerFragmentDoc}`;\nexport const TokenPricesDocument = gql`\n query TokenPrices($skip: Int, $first: Int, $orderBy: TokenPrice_orderBy, $orderDirection: OrderDirection, $where: TokenPrice_filter, $block: Block_height) {\n tokenPrices(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphTokenPrice\n }\n}\n ${SubgraphTokenPriceFragmentDoc}`;\nexport const TokenLatestPricesDocument = gql`\n query TokenLatestPrices($skip: Int, $first: Int, $orderBy: LatestPrice_orderBy, $orderDirection: OrderDirection, $where: LatestPrice_filter, $block: Block_height) {\n latestPrices(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphTokenLatestPrice\n }\n}\n ${SubgraphTokenLatestPriceFragmentDoc}`;\nexport const TokenLatestPriceDocument = gql`\n query TokenLatestPrice($id: ID!) {\n latestPrice(id: $id) {\n ...SubgraphTokenLatestPrice\n }\n}\n ${SubgraphTokenLatestPriceFragmentDoc}`;\nexport const UserDocument = gql`\n query User($id: ID!, $block: Block_height) {\n user(id: $id, block: $block) {\n ...SubgraphUser\n }\n}\n ${SubgraphUserFragmentDoc}`;\nexport const UsersDocument = gql`\n query Users($skip: Int, $first: Int, $orderBy: User_orderBy, $orderDirection: OrderDirection, $where: User_filter, $block: Block_height) {\n users(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphUser\n }\n}\n ${SubgraphUserFragmentDoc}`;\n\nexport type SdkFunctionWrapper = (action: (requestHeaders?:Record) => Promise, operationName: string, operationType?: string) => Promise;\n\n\nconst defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action();\n\nexport function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) {\n return {\n PoolShare(variables: PoolShareQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolShareDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolShare', 'query');\n },\n PoolShares(variables?: PoolSharesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolSharesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolShares', 'query');\n },\n Pools(variables?: PoolsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Pools', 'query');\n },\n AllPools(variables?: AllPoolsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(AllPoolsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'AllPools', 'query');\n },\n Pool(variables: PoolQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Pool', 'query');\n },\n PoolHistoricalLiquidities(variables?: PoolHistoricalLiquiditiesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolHistoricalLiquiditiesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolHistoricalLiquidities', 'query');\n },\n PoolSnapshots(variables?: PoolSnapshotsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolSnapshotsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolSnapshots', 'query');\n },\n JoinExits(variables?: JoinExitsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(JoinExitsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'JoinExits', 'query');\n },\n Balancers(variables?: BalancersQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(BalancersDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Balancers', 'query');\n },\n TokenPrices(variables?: TokenPricesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(TokenPricesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'TokenPrices', 'query');\n },\n TokenLatestPrices(variables?: TokenLatestPricesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(TokenLatestPricesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'TokenLatestPrices', 'query');\n },\n TokenLatestPrice(variables: TokenLatestPriceQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(TokenLatestPriceDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'TokenLatestPrice', 'query');\n },\n User(variables: UserQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(UserDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'User', 'query');\n },\n Users(variables?: UsersQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(UsersDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Users', 'query');\n }\n };\n}\nexport type Sdk = ReturnType;","import { GraphQLClient } from 'graphql-request';\nimport * as Dom from 'graphql-request/dist/types.dom';\nimport gql from 'graphql-tag';\nexport type Maybe = T | null;\nexport type InputMaybe = Maybe;\nexport type Exact = { [K in keyof T]: T[K] };\nexport type MakeOptional = Omit & { [SubKey in K]?: Maybe };\nexport type MakeMaybe = Omit & { [SubKey in K]: Maybe };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: string;\n String: string;\n Boolean: boolean;\n Int: number;\n Float: number;\n BigDecimal: string;\n BigInt: string;\n Bytes: string;\n Int8: any;\n};\n\nexport type BlockChangedFilter = {\n number_gte: Scalars['Int'];\n};\n\nexport type Block_Height = {\n hash?: InputMaybe;\n number?: InputMaybe;\n number_gte?: InputMaybe;\n};\n\nexport enum Chain {\n Arbitrum = 'Arbitrum',\n Avalanche = 'Avalanche',\n Base = 'Base',\n Gnosis = 'Gnosis',\n Optimism = 'Optimism',\n Polygon = 'Polygon',\n PolygonZkEvm = 'PolygonZkEvm'\n}\n\nexport type Gauge = {\n __typename?: 'Gauge';\n /** Timestamp at which Balancer DAO added the gauge to GaugeController [seconds] */\n addedTimestamp: Scalars['Int'];\n /** Address of the gauge */\n address: Scalars['Bytes'];\n /** Equal to: - */\n id: Scalars['ID'];\n /** Reference to LiquidityGauge */\n liquidityGauge?: Maybe;\n /** Reference to RootGauge */\n rootGauge?: Maybe;\n /** Type of the gauge */\n type: GaugeType;\n};\n\nexport type GaugeFactory = {\n __typename?: 'GaugeFactory';\n /** List of gauges created through the factory */\n gauges?: Maybe>;\n /** Factory contract address */\n id: Scalars['ID'];\n /** Number of gauges created through the factory */\n numGauges: Scalars['Int'];\n};\n\n\nexport type GaugeFactoryGaugesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type GaugeFactory_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n gauges_?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n numGauges?: InputMaybe;\n numGauges_gt?: InputMaybe;\n numGauges_gte?: InputMaybe;\n numGauges_in?: InputMaybe>;\n numGauges_lt?: InputMaybe;\n numGauges_lte?: InputMaybe;\n numGauges_not?: InputMaybe;\n numGauges_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n};\n\nexport enum GaugeFactory_OrderBy {\n gauges = 'gauges',\n id = 'id',\n numGauges = 'numGauges'\n}\n\nexport type GaugeShare = {\n __typename?: 'GaugeShare';\n /** User's balance of gauge deposit tokens */\n balance: Scalars['BigDecimal'];\n /** Reference to LiquidityGauge entity */\n gauge: LiquidityGauge;\n /** Equal to: - */\n id: Scalars['ID'];\n /** Reference to User entity */\n user: User;\n};\n\nexport type GaugeShare_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n balance?: InputMaybe;\n balance_gt?: InputMaybe;\n balance_gte?: InputMaybe;\n balance_in?: InputMaybe>;\n balance_lt?: InputMaybe;\n balance_lte?: InputMaybe;\n balance_not?: InputMaybe;\n balance_not_in?: InputMaybe>;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n};\n\nexport enum GaugeShare_OrderBy {\n balance = 'balance',\n gauge = 'gauge',\n gauge__id = 'gauge__id',\n gauge__isKilled = 'gauge__isKilled',\n gauge__isPreferentialGauge = 'gauge__isPreferentialGauge',\n gauge__poolAddress = 'gauge__poolAddress',\n gauge__poolId = 'gauge__poolId',\n gauge__relativeWeightCap = 'gauge__relativeWeightCap',\n gauge__streamer = 'gauge__streamer',\n gauge__symbol = 'gauge__symbol',\n gauge__totalSupply = 'gauge__totalSupply',\n id = 'id',\n user = 'user',\n user__id = 'user__id'\n}\n\nexport type GaugeType = {\n __typename?: 'GaugeType';\n /** Type ID */\n id: Scalars['ID'];\n /** Name of the type - empty string if call reverts */\n name: Scalars['String'];\n};\n\nexport type GaugeType_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n name?: InputMaybe;\n name_contains?: InputMaybe;\n name_contains_nocase?: InputMaybe;\n name_ends_with?: InputMaybe;\n name_ends_with_nocase?: InputMaybe;\n name_gt?: InputMaybe;\n name_gte?: InputMaybe;\n name_in?: InputMaybe>;\n name_lt?: InputMaybe;\n name_lte?: InputMaybe;\n name_not?: InputMaybe;\n name_not_contains?: InputMaybe;\n name_not_contains_nocase?: InputMaybe;\n name_not_ends_with?: InputMaybe;\n name_not_ends_with_nocase?: InputMaybe;\n name_not_in?: InputMaybe>;\n name_not_starts_with?: InputMaybe;\n name_not_starts_with_nocase?: InputMaybe;\n name_starts_with?: InputMaybe;\n name_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n};\n\nexport enum GaugeType_OrderBy {\n id = 'id',\n name = 'name'\n}\n\nexport type GaugeVote = {\n __typename?: 'GaugeVote';\n /** Reference to Gauge entity */\n gauge: Gauge;\n /** Equal to: - */\n id: Scalars['ID'];\n /** Timestamp at which user voted [seconds] */\n timestamp?: Maybe;\n /** Reference to User entity */\n user: User;\n /** Weight of veBAL power user has used to vote */\n weight?: Maybe;\n};\n\nexport type GaugeVote_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n weight?: InputMaybe;\n weight_gt?: InputMaybe;\n weight_gte?: InputMaybe;\n weight_in?: InputMaybe>;\n weight_lt?: InputMaybe;\n weight_lte?: InputMaybe;\n weight_not?: InputMaybe;\n weight_not_in?: InputMaybe>;\n};\n\nexport enum GaugeVote_OrderBy {\n gauge = 'gauge',\n gauge__addedTimestamp = 'gauge__addedTimestamp',\n gauge__address = 'gauge__address',\n gauge__id = 'gauge__id',\n id = 'id',\n timestamp = 'timestamp',\n user = 'user',\n user__id = 'user__id',\n weight = 'weight'\n}\n\nexport type Gauge_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n addedTimestamp?: InputMaybe;\n addedTimestamp_gt?: InputMaybe;\n addedTimestamp_gte?: InputMaybe;\n addedTimestamp_in?: InputMaybe>;\n addedTimestamp_lt?: InputMaybe;\n addedTimestamp_lte?: InputMaybe;\n addedTimestamp_not?: InputMaybe;\n addedTimestamp_not_in?: InputMaybe>;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n liquidityGauge?: InputMaybe;\n liquidityGauge_?: InputMaybe;\n liquidityGauge_contains?: InputMaybe;\n liquidityGauge_contains_nocase?: InputMaybe;\n liquidityGauge_ends_with?: InputMaybe;\n liquidityGauge_ends_with_nocase?: InputMaybe;\n liquidityGauge_gt?: InputMaybe;\n liquidityGauge_gte?: InputMaybe;\n liquidityGauge_in?: InputMaybe>;\n liquidityGauge_lt?: InputMaybe;\n liquidityGauge_lte?: InputMaybe;\n liquidityGauge_not?: InputMaybe;\n liquidityGauge_not_contains?: InputMaybe;\n liquidityGauge_not_contains_nocase?: InputMaybe;\n liquidityGauge_not_ends_with?: InputMaybe;\n liquidityGauge_not_ends_with_nocase?: InputMaybe;\n liquidityGauge_not_in?: InputMaybe>;\n liquidityGauge_not_starts_with?: InputMaybe;\n liquidityGauge_not_starts_with_nocase?: InputMaybe;\n liquidityGauge_starts_with?: InputMaybe;\n liquidityGauge_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n rootGauge?: InputMaybe;\n rootGauge_?: InputMaybe;\n rootGauge_contains?: InputMaybe;\n rootGauge_contains_nocase?: InputMaybe;\n rootGauge_ends_with?: InputMaybe;\n rootGauge_ends_with_nocase?: InputMaybe;\n rootGauge_gt?: InputMaybe;\n rootGauge_gte?: InputMaybe;\n rootGauge_in?: InputMaybe>;\n rootGauge_lt?: InputMaybe;\n rootGauge_lte?: InputMaybe;\n rootGauge_not?: InputMaybe;\n rootGauge_not_contains?: InputMaybe;\n rootGauge_not_contains_nocase?: InputMaybe;\n rootGauge_not_ends_with?: InputMaybe;\n rootGauge_not_ends_with_nocase?: InputMaybe;\n rootGauge_not_in?: InputMaybe>;\n rootGauge_not_starts_with?: InputMaybe;\n rootGauge_not_starts_with_nocase?: InputMaybe;\n rootGauge_starts_with?: InputMaybe;\n rootGauge_starts_with_nocase?: InputMaybe;\n type?: InputMaybe;\n type_?: InputMaybe;\n type_contains?: InputMaybe;\n type_contains_nocase?: InputMaybe;\n type_ends_with?: InputMaybe;\n type_ends_with_nocase?: InputMaybe;\n type_gt?: InputMaybe;\n type_gte?: InputMaybe;\n type_in?: InputMaybe>;\n type_lt?: InputMaybe;\n type_lte?: InputMaybe;\n type_not?: InputMaybe;\n type_not_contains?: InputMaybe;\n type_not_contains_nocase?: InputMaybe;\n type_not_ends_with?: InputMaybe;\n type_not_ends_with_nocase?: InputMaybe;\n type_not_in?: InputMaybe>;\n type_not_starts_with?: InputMaybe;\n type_not_starts_with_nocase?: InputMaybe;\n type_starts_with?: InputMaybe;\n type_starts_with_nocase?: InputMaybe;\n};\n\nexport enum Gauge_OrderBy {\n addedTimestamp = 'addedTimestamp',\n address = 'address',\n id = 'id',\n liquidityGauge = 'liquidityGauge',\n liquidityGauge__id = 'liquidityGauge__id',\n liquidityGauge__isKilled = 'liquidityGauge__isKilled',\n liquidityGauge__isPreferentialGauge = 'liquidityGauge__isPreferentialGauge',\n liquidityGauge__poolAddress = 'liquidityGauge__poolAddress',\n liquidityGauge__poolId = 'liquidityGauge__poolId',\n liquidityGauge__relativeWeightCap = 'liquidityGauge__relativeWeightCap',\n liquidityGauge__streamer = 'liquidityGauge__streamer',\n liquidityGauge__symbol = 'liquidityGauge__symbol',\n liquidityGauge__totalSupply = 'liquidityGauge__totalSupply',\n rootGauge = 'rootGauge',\n rootGauge__chain = 'rootGauge__chain',\n rootGauge__id = 'rootGauge__id',\n rootGauge__isKilled = 'rootGauge__isKilled',\n rootGauge__recipient = 'rootGauge__recipient',\n rootGauge__relativeWeightCap = 'rootGauge__relativeWeightCap',\n type = 'type',\n type__id = 'type__id',\n type__name = 'type__name'\n}\n\nexport type LiquidityGauge = {\n __typename?: 'LiquidityGauge';\n /** Factory contract address */\n factory: GaugeFactory;\n /** Reference to Gauge entity - created when LiquidityGauge is added to GaugeController */\n gauge?: Maybe;\n /** LiquidityGauge contract address */\n id: Scalars['ID'];\n /** Whether Balancer DAO killed the gauge */\n isKilled: Scalars['Boolean'];\n /** Whether the LiquidityGauge is the most recent added to GaugeController */\n isPreferentialGauge: Scalars['Boolean'];\n /** Reference to Pool entity */\n pool?: Maybe;\n /** Address of the pool (lp_token of the gauge) */\n poolAddress: Scalars['Bytes'];\n /** Pool ID if lp_token is a Balancer pool; null otherwise */\n poolId?: Maybe;\n /** Relative weight cap of the gauge (0.01 = 1%) - V2 factories only */\n relativeWeightCap?: Maybe;\n /** List of reward tokens depositted in the gauge - ChildChainLiquidityGauge only */\n rewardTokensList?: Maybe>;\n /** List of user shares */\n shares?: Maybe>;\n /** Address of the contract that streams reward tokens to the gauge - ChildChainLiquidityGauge only */\n streamer?: Maybe;\n /** ERC20 token symbol */\n symbol: Scalars['String'];\n /** List of reward tokens depositted in the gauge */\n tokens?: Maybe>;\n /** Total of BPTs users have staked in the LiquidityGauge */\n totalSupply: Scalars['BigDecimal'];\n};\n\n\nexport type LiquidityGaugeSharesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type LiquidityGaugeTokensArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type LiquidityGauge_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n factory?: InputMaybe;\n factory_?: InputMaybe;\n factory_contains?: InputMaybe;\n factory_contains_nocase?: InputMaybe;\n factory_ends_with?: InputMaybe;\n factory_ends_with_nocase?: InputMaybe;\n factory_gt?: InputMaybe;\n factory_gte?: InputMaybe;\n factory_in?: InputMaybe>;\n factory_lt?: InputMaybe;\n factory_lte?: InputMaybe;\n factory_not?: InputMaybe;\n factory_not_contains?: InputMaybe;\n factory_not_contains_nocase?: InputMaybe;\n factory_not_ends_with?: InputMaybe;\n factory_not_ends_with_nocase?: InputMaybe;\n factory_not_in?: InputMaybe>;\n factory_not_starts_with?: InputMaybe;\n factory_not_starts_with_nocase?: InputMaybe;\n factory_starts_with?: InputMaybe;\n factory_starts_with_nocase?: InputMaybe;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n isKilled?: InputMaybe;\n isKilled_in?: InputMaybe>;\n isKilled_not?: InputMaybe;\n isKilled_not_in?: InputMaybe>;\n isPreferentialGauge?: InputMaybe;\n isPreferentialGauge_in?: InputMaybe>;\n isPreferentialGauge_not?: InputMaybe;\n isPreferentialGauge_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n pool?: InputMaybe;\n poolAddress?: InputMaybe;\n poolAddress_contains?: InputMaybe;\n poolAddress_gt?: InputMaybe;\n poolAddress_gte?: InputMaybe;\n poolAddress_in?: InputMaybe>;\n poolAddress_lt?: InputMaybe;\n poolAddress_lte?: InputMaybe;\n poolAddress_not?: InputMaybe;\n poolAddress_not_contains?: InputMaybe;\n poolAddress_not_in?: InputMaybe>;\n poolId?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n pool_?: InputMaybe;\n pool_contains?: InputMaybe;\n pool_contains_nocase?: InputMaybe;\n pool_ends_with?: InputMaybe;\n pool_ends_with_nocase?: InputMaybe;\n pool_gt?: InputMaybe;\n pool_gte?: InputMaybe;\n pool_in?: InputMaybe>;\n pool_lt?: InputMaybe;\n pool_lte?: InputMaybe;\n pool_not?: InputMaybe;\n pool_not_contains?: InputMaybe;\n pool_not_contains_nocase?: InputMaybe;\n pool_not_ends_with?: InputMaybe;\n pool_not_ends_with_nocase?: InputMaybe;\n pool_not_in?: InputMaybe>;\n pool_not_starts_with?: InputMaybe;\n pool_not_starts_with_nocase?: InputMaybe;\n pool_starts_with?: InputMaybe;\n pool_starts_with_nocase?: InputMaybe;\n relativeWeightCap?: InputMaybe;\n relativeWeightCap_gt?: InputMaybe;\n relativeWeightCap_gte?: InputMaybe;\n relativeWeightCap_in?: InputMaybe>;\n relativeWeightCap_lt?: InputMaybe;\n relativeWeightCap_lte?: InputMaybe;\n relativeWeightCap_not?: InputMaybe;\n relativeWeightCap_not_in?: InputMaybe>;\n rewardTokensList?: InputMaybe>;\n rewardTokensList_contains?: InputMaybe>;\n rewardTokensList_contains_nocase?: InputMaybe>;\n rewardTokensList_not?: InputMaybe>;\n rewardTokensList_not_contains?: InputMaybe>;\n rewardTokensList_not_contains_nocase?: InputMaybe>;\n shares_?: InputMaybe;\n streamer?: InputMaybe;\n streamer_contains?: InputMaybe;\n streamer_gt?: InputMaybe;\n streamer_gte?: InputMaybe;\n streamer_in?: InputMaybe>;\n streamer_lt?: InputMaybe;\n streamer_lte?: InputMaybe;\n streamer_not?: InputMaybe;\n streamer_not_contains?: InputMaybe;\n streamer_not_in?: InputMaybe>;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n tokens_?: InputMaybe;\n totalSupply?: InputMaybe;\n totalSupply_gt?: InputMaybe;\n totalSupply_gte?: InputMaybe;\n totalSupply_in?: InputMaybe>;\n totalSupply_lt?: InputMaybe;\n totalSupply_lte?: InputMaybe;\n totalSupply_not?: InputMaybe;\n totalSupply_not_in?: InputMaybe>;\n};\n\nexport enum LiquidityGauge_OrderBy {\n factory = 'factory',\n factory__id = 'factory__id',\n factory__numGauges = 'factory__numGauges',\n gauge = 'gauge',\n gauge__addedTimestamp = 'gauge__addedTimestamp',\n gauge__address = 'gauge__address',\n gauge__id = 'gauge__id',\n id = 'id',\n isKilled = 'isKilled',\n isPreferentialGauge = 'isPreferentialGauge',\n pool = 'pool',\n poolAddress = 'poolAddress',\n poolId = 'poolId',\n pool__address = 'pool__address',\n pool__id = 'pool__id',\n pool__poolId = 'pool__poolId',\n relativeWeightCap = 'relativeWeightCap',\n rewardTokensList = 'rewardTokensList',\n shares = 'shares',\n streamer = 'streamer',\n symbol = 'symbol',\n tokens = 'tokens',\n totalSupply = 'totalSupply'\n}\n\nexport type LockSnapshot = {\n __typename?: 'LockSnapshot';\n /** veBAL balance at the moment user locks */\n bias: Scalars['BigDecimal'];\n /** Equal to - */\n id: Scalars['ID'];\n /** veBAL decay rate (per second) */\n slope: Scalars['BigDecimal'];\n /** Timestamp at which the snapshot was taken [seconds] */\n timestamp: Scalars['Int'];\n /** Reference to User entity */\n user: User;\n};\n\nexport type LockSnapshot_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n bias?: InputMaybe;\n bias_gt?: InputMaybe;\n bias_gte?: InputMaybe;\n bias_in?: InputMaybe>;\n bias_lt?: InputMaybe;\n bias_lte?: InputMaybe;\n bias_not?: InputMaybe;\n bias_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n slope?: InputMaybe;\n slope_gt?: InputMaybe;\n slope_gte?: InputMaybe;\n slope_in?: InputMaybe>;\n slope_lt?: InputMaybe;\n slope_lte?: InputMaybe;\n slope_not?: InputMaybe;\n slope_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n};\n\nexport enum LockSnapshot_OrderBy {\n bias = 'bias',\n id = 'id',\n slope = 'slope',\n timestamp = 'timestamp',\n user = 'user',\n user__id = 'user__id'\n}\n\nexport type OmniVotingEscrowLock = {\n __typename?: 'OmniVotingEscrowLock';\n /** veBAL balance at the moment user locks */\n bias: Scalars['BigDecimal'];\n /** Chain where the lock was bridged to */\n dstChainId: Scalars['Int'];\n /** Equal to: - */\n id: Scalars['ID'];\n /** User on the local chain (reference to User entity) */\n localUser: User;\n /** User address on the remote chain */\n remoteUser: Scalars['Bytes'];\n /** veBAL decay rate (per second) */\n slope: Scalars['BigDecimal'];\n /** Timestamp the lock was created [seconds] */\n timestamp: Scalars['Int'];\n /** Reference to VotingEscrow entity */\n votingEscrowID: VotingEscrow;\n};\n\nexport type OmniVotingEscrowLock_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n bias?: InputMaybe;\n bias_gt?: InputMaybe;\n bias_gte?: InputMaybe;\n bias_in?: InputMaybe>;\n bias_lt?: InputMaybe;\n bias_lte?: InputMaybe;\n bias_not?: InputMaybe;\n bias_not_in?: InputMaybe>;\n dstChainId?: InputMaybe;\n dstChainId_gt?: InputMaybe;\n dstChainId_gte?: InputMaybe;\n dstChainId_in?: InputMaybe>;\n dstChainId_lt?: InputMaybe;\n dstChainId_lte?: InputMaybe;\n dstChainId_not?: InputMaybe;\n dstChainId_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n localUser?: InputMaybe;\n localUser_?: InputMaybe;\n localUser_contains?: InputMaybe;\n localUser_contains_nocase?: InputMaybe;\n localUser_ends_with?: InputMaybe;\n localUser_ends_with_nocase?: InputMaybe;\n localUser_gt?: InputMaybe;\n localUser_gte?: InputMaybe;\n localUser_in?: InputMaybe>;\n localUser_lt?: InputMaybe;\n localUser_lte?: InputMaybe;\n localUser_not?: InputMaybe;\n localUser_not_contains?: InputMaybe;\n localUser_not_contains_nocase?: InputMaybe;\n localUser_not_ends_with?: InputMaybe;\n localUser_not_ends_with_nocase?: InputMaybe;\n localUser_not_in?: InputMaybe>;\n localUser_not_starts_with?: InputMaybe;\n localUser_not_starts_with_nocase?: InputMaybe;\n localUser_starts_with?: InputMaybe;\n localUser_starts_with_nocase?: InputMaybe;\n or?: InputMaybe>>;\n remoteUser?: InputMaybe;\n remoteUser_contains?: InputMaybe;\n remoteUser_gt?: InputMaybe;\n remoteUser_gte?: InputMaybe;\n remoteUser_in?: InputMaybe>;\n remoteUser_lt?: InputMaybe;\n remoteUser_lte?: InputMaybe;\n remoteUser_not?: InputMaybe;\n remoteUser_not_contains?: InputMaybe;\n remoteUser_not_in?: InputMaybe>;\n slope?: InputMaybe;\n slope_gt?: InputMaybe;\n slope_gte?: InputMaybe;\n slope_in?: InputMaybe>;\n slope_lt?: InputMaybe;\n slope_lte?: InputMaybe;\n slope_not?: InputMaybe;\n slope_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n votingEscrowID?: InputMaybe;\n votingEscrowID_?: InputMaybe;\n votingEscrowID_contains?: InputMaybe;\n votingEscrowID_contains_nocase?: InputMaybe;\n votingEscrowID_ends_with?: InputMaybe;\n votingEscrowID_ends_with_nocase?: InputMaybe;\n votingEscrowID_gt?: InputMaybe;\n votingEscrowID_gte?: InputMaybe;\n votingEscrowID_in?: InputMaybe>;\n votingEscrowID_lt?: InputMaybe;\n votingEscrowID_lte?: InputMaybe;\n votingEscrowID_not?: InputMaybe;\n votingEscrowID_not_contains?: InputMaybe;\n votingEscrowID_not_contains_nocase?: InputMaybe;\n votingEscrowID_not_ends_with?: InputMaybe;\n votingEscrowID_not_ends_with_nocase?: InputMaybe;\n votingEscrowID_not_in?: InputMaybe>;\n votingEscrowID_not_starts_with?: InputMaybe;\n votingEscrowID_not_starts_with_nocase?: InputMaybe;\n votingEscrowID_starts_with?: InputMaybe;\n votingEscrowID_starts_with_nocase?: InputMaybe;\n};\n\nexport enum OmniVotingEscrowLock_OrderBy {\n bias = 'bias',\n dstChainId = 'dstChainId',\n id = 'id',\n localUser = 'localUser',\n localUser__id = 'localUser__id',\n remoteUser = 'remoteUser',\n slope = 'slope',\n timestamp = 'timestamp',\n votingEscrowID = 'votingEscrowID',\n votingEscrowID__id = 'votingEscrowID__id',\n votingEscrowID__stakedSupply = 'votingEscrowID__stakedSupply'\n}\n\n/** Defines the order direction, either ascending or descending */\nexport enum OrderDirection {\n asc = 'asc',\n desc = 'desc'\n}\n\nexport type Pool = {\n __typename?: 'Pool';\n /** Address of the pool (lp_token of the gauge) */\n address: Scalars['Bytes'];\n /** List of gauges created for the pool */\n gauges?: Maybe>;\n /** List of the pool's gauges addresses */\n gaugesList: Array;\n /** Address of the pool (lp_token of the gauge) */\n id: Scalars['ID'];\n /** Pool ID if lp_token is a Balancer pool; null otherwise */\n poolId?: Maybe;\n /** Most recent, unkilled gauge in the GaugeController */\n preferentialGauge?: Maybe;\n};\n\n\nexport type PoolGaugesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type Pool_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n address?: InputMaybe;\n address_contains?: InputMaybe;\n address_gt?: InputMaybe;\n address_gte?: InputMaybe;\n address_in?: InputMaybe>;\n address_lt?: InputMaybe;\n address_lte?: InputMaybe;\n address_not?: InputMaybe;\n address_not_contains?: InputMaybe;\n address_not_in?: InputMaybe>;\n and?: InputMaybe>>;\n gaugesList?: InputMaybe>;\n gaugesList_contains?: InputMaybe>;\n gaugesList_contains_nocase?: InputMaybe>;\n gaugesList_not?: InputMaybe>;\n gaugesList_not_contains?: InputMaybe>;\n gaugesList_not_contains_nocase?: InputMaybe>;\n gauges_?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n poolId?: InputMaybe;\n poolId_contains?: InputMaybe;\n poolId_gt?: InputMaybe;\n poolId_gte?: InputMaybe;\n poolId_in?: InputMaybe>;\n poolId_lt?: InputMaybe;\n poolId_lte?: InputMaybe;\n poolId_not?: InputMaybe;\n poolId_not_contains?: InputMaybe;\n poolId_not_in?: InputMaybe>;\n preferentialGauge?: InputMaybe;\n preferentialGauge_?: InputMaybe;\n preferentialGauge_contains?: InputMaybe;\n preferentialGauge_contains_nocase?: InputMaybe;\n preferentialGauge_ends_with?: InputMaybe;\n preferentialGauge_ends_with_nocase?: InputMaybe;\n preferentialGauge_gt?: InputMaybe;\n preferentialGauge_gte?: InputMaybe;\n preferentialGauge_in?: InputMaybe>;\n preferentialGauge_lt?: InputMaybe;\n preferentialGauge_lte?: InputMaybe;\n preferentialGauge_not?: InputMaybe;\n preferentialGauge_not_contains?: InputMaybe;\n preferentialGauge_not_contains_nocase?: InputMaybe;\n preferentialGauge_not_ends_with?: InputMaybe;\n preferentialGauge_not_ends_with_nocase?: InputMaybe;\n preferentialGauge_not_in?: InputMaybe>;\n preferentialGauge_not_starts_with?: InputMaybe;\n preferentialGauge_not_starts_with_nocase?: InputMaybe;\n preferentialGauge_starts_with?: InputMaybe;\n preferentialGauge_starts_with_nocase?: InputMaybe;\n};\n\nexport enum Pool_OrderBy {\n address = 'address',\n gauges = 'gauges',\n gaugesList = 'gaugesList',\n id = 'id',\n poolId = 'poolId',\n preferentialGauge = 'preferentialGauge',\n preferentialGauge__id = 'preferentialGauge__id',\n preferentialGauge__isKilled = 'preferentialGauge__isKilled',\n preferentialGauge__isPreferentialGauge = 'preferentialGauge__isPreferentialGauge',\n preferentialGauge__poolAddress = 'preferentialGauge__poolAddress',\n preferentialGauge__poolId = 'preferentialGauge__poolId',\n preferentialGauge__relativeWeightCap = 'preferentialGauge__relativeWeightCap',\n preferentialGauge__streamer = 'preferentialGauge__streamer',\n preferentialGauge__symbol = 'preferentialGauge__symbol',\n preferentialGauge__totalSupply = 'preferentialGauge__totalSupply'\n}\n\nexport type Query = {\n __typename?: 'Query';\n /** Access to subgraph metadata */\n _meta?: Maybe<_Meta_>;\n gauge?: Maybe;\n gaugeFactories: Array;\n gaugeFactory?: Maybe;\n gaugeShare?: Maybe;\n gaugeShares: Array;\n gaugeType?: Maybe;\n gaugeTypes: Array;\n gaugeVote?: Maybe;\n gaugeVotes: Array;\n gauges: Array;\n liquidityGauge?: Maybe;\n liquidityGauges: Array;\n lockSnapshot?: Maybe;\n lockSnapshots: Array;\n omniVotingEscrowLock?: Maybe;\n omniVotingEscrowLocks: Array;\n pool?: Maybe;\n pools: Array;\n rewardToken?: Maybe;\n rewardTokens: Array;\n rootGauge?: Maybe;\n rootGauges: Array;\n singleRecipientGauge?: Maybe;\n singleRecipientGauges: Array;\n user?: Maybe;\n users: Array;\n votingEscrow?: Maybe;\n votingEscrowLock?: Maybe;\n votingEscrowLocks: Array;\n votingEscrows: Array;\n};\n\n\nexport type Query_MetaArgs = {\n block?: InputMaybe;\n};\n\n\nexport type QueryGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeFactoriesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGaugeFactoryArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeShareArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeSharesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGaugeTypeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeTypesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGaugeVoteArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryGaugeVotesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryLiquidityGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryLiquidityGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryLockSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryLockSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryOmniVotingEscrowLockArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryOmniVotingEscrowLocksArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryPoolArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryPoolsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryRewardTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryRewardTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryRootGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryRootGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QuerySingleRecipientGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QuerySingleRecipientGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryUserArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryUsersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryVotingEscrowArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryVotingEscrowLockArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type QueryVotingEscrowLocksArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type QueryVotingEscrowsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\nexport type RewardToken = {\n __typename?: 'RewardToken';\n /** ERC20 token decimals - zero if call to decimals() reverts */\n decimals: Scalars['Int'];\n /** Reference to LiquidityGauge entity */\n gauge: LiquidityGauge;\n /** Equal to: - */\n id: Scalars['ID'];\n /** Timestamp at which finishes the period of rewards */\n periodFinish?: Maybe;\n /** Rate of reward tokens streamed per second */\n rate?: Maybe;\n /** ERC20 token symbol - empty string if call to symbol() reverts */\n symbol: Scalars['String'];\n /** Amount of reward tokens that has been deposited into the gauge */\n totalDeposited: Scalars['BigDecimal'];\n};\n\nexport type RewardToken_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n decimals?: InputMaybe;\n decimals_gt?: InputMaybe;\n decimals_gte?: InputMaybe;\n decimals_in?: InputMaybe>;\n decimals_lt?: InputMaybe;\n decimals_lte?: InputMaybe;\n decimals_not?: InputMaybe;\n decimals_not_in?: InputMaybe>;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n periodFinish?: InputMaybe;\n periodFinish_gt?: InputMaybe;\n periodFinish_gte?: InputMaybe;\n periodFinish_in?: InputMaybe>;\n periodFinish_lt?: InputMaybe;\n periodFinish_lte?: InputMaybe;\n periodFinish_not?: InputMaybe;\n periodFinish_not_in?: InputMaybe>;\n rate?: InputMaybe;\n rate_gt?: InputMaybe;\n rate_gte?: InputMaybe;\n rate_in?: InputMaybe>;\n rate_lt?: InputMaybe;\n rate_lte?: InputMaybe;\n rate_not?: InputMaybe;\n rate_not_in?: InputMaybe>;\n symbol?: InputMaybe;\n symbol_contains?: InputMaybe;\n symbol_contains_nocase?: InputMaybe;\n symbol_ends_with?: InputMaybe;\n symbol_ends_with_nocase?: InputMaybe;\n symbol_gt?: InputMaybe;\n symbol_gte?: InputMaybe;\n symbol_in?: InputMaybe>;\n symbol_lt?: InputMaybe;\n symbol_lte?: InputMaybe;\n symbol_not?: InputMaybe;\n symbol_not_contains?: InputMaybe;\n symbol_not_contains_nocase?: InputMaybe;\n symbol_not_ends_with?: InputMaybe;\n symbol_not_ends_with_nocase?: InputMaybe;\n symbol_not_in?: InputMaybe>;\n symbol_not_starts_with?: InputMaybe;\n symbol_not_starts_with_nocase?: InputMaybe;\n symbol_starts_with?: InputMaybe;\n symbol_starts_with_nocase?: InputMaybe;\n totalDeposited?: InputMaybe;\n totalDeposited_gt?: InputMaybe;\n totalDeposited_gte?: InputMaybe;\n totalDeposited_in?: InputMaybe>;\n totalDeposited_lt?: InputMaybe;\n totalDeposited_lte?: InputMaybe;\n totalDeposited_not?: InputMaybe;\n totalDeposited_not_in?: InputMaybe>;\n};\n\nexport enum RewardToken_OrderBy {\n decimals = 'decimals',\n gauge = 'gauge',\n gauge__id = 'gauge__id',\n gauge__isKilled = 'gauge__isKilled',\n gauge__isPreferentialGauge = 'gauge__isPreferentialGauge',\n gauge__poolAddress = 'gauge__poolAddress',\n gauge__poolId = 'gauge__poolId',\n gauge__relativeWeightCap = 'gauge__relativeWeightCap',\n gauge__streamer = 'gauge__streamer',\n gauge__symbol = 'gauge__symbol',\n gauge__totalSupply = 'gauge__totalSupply',\n id = 'id',\n periodFinish = 'periodFinish',\n rate = 'rate',\n symbol = 'symbol',\n totalDeposited = 'totalDeposited'\n}\n\nexport type RootGauge = {\n __typename?: 'RootGauge';\n /** Chain where emissions by this gauge will be bridged to */\n chain: Chain;\n /** Factory contract address */\n factory: GaugeFactory;\n /** Reference to Gauge entity - created when LiquidityGauge is added to GaugeController */\n gauge?: Maybe;\n /** RootGauge contract address */\n id: Scalars['ID'];\n /** Whether Balancer DAO killed the gauge */\n isKilled: Scalars['Boolean'];\n /** Address where emissions by this gauge will be bridged to */\n recipient: Scalars['Bytes'];\n /** Relative weight cap of the gauge (0.01 = 1%) - V2 factories only */\n relativeWeightCap?: Maybe;\n};\n\nexport type RootGauge_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n chain?: InputMaybe;\n chain_in?: InputMaybe>;\n chain_not?: InputMaybe;\n chain_not_in?: InputMaybe>;\n factory?: InputMaybe;\n factory_?: InputMaybe;\n factory_contains?: InputMaybe;\n factory_contains_nocase?: InputMaybe;\n factory_ends_with?: InputMaybe;\n factory_ends_with_nocase?: InputMaybe;\n factory_gt?: InputMaybe;\n factory_gte?: InputMaybe;\n factory_in?: InputMaybe>;\n factory_lt?: InputMaybe;\n factory_lte?: InputMaybe;\n factory_not?: InputMaybe;\n factory_not_contains?: InputMaybe;\n factory_not_contains_nocase?: InputMaybe;\n factory_not_ends_with?: InputMaybe;\n factory_not_ends_with_nocase?: InputMaybe;\n factory_not_in?: InputMaybe>;\n factory_not_starts_with?: InputMaybe;\n factory_not_starts_with_nocase?: InputMaybe;\n factory_starts_with?: InputMaybe;\n factory_starts_with_nocase?: InputMaybe;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n isKilled?: InputMaybe;\n isKilled_in?: InputMaybe>;\n isKilled_not?: InputMaybe;\n isKilled_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n recipient?: InputMaybe;\n recipient_contains?: InputMaybe;\n recipient_gt?: InputMaybe;\n recipient_gte?: InputMaybe;\n recipient_in?: InputMaybe>;\n recipient_lt?: InputMaybe;\n recipient_lte?: InputMaybe;\n recipient_not?: InputMaybe;\n recipient_not_contains?: InputMaybe;\n recipient_not_in?: InputMaybe>;\n relativeWeightCap?: InputMaybe;\n relativeWeightCap_gt?: InputMaybe;\n relativeWeightCap_gte?: InputMaybe;\n relativeWeightCap_in?: InputMaybe>;\n relativeWeightCap_lt?: InputMaybe;\n relativeWeightCap_lte?: InputMaybe;\n relativeWeightCap_not?: InputMaybe;\n relativeWeightCap_not_in?: InputMaybe>;\n};\n\nexport enum RootGauge_OrderBy {\n chain = 'chain',\n factory = 'factory',\n factory__id = 'factory__id',\n factory__numGauges = 'factory__numGauges',\n gauge = 'gauge',\n gauge__addedTimestamp = 'gauge__addedTimestamp',\n gauge__address = 'gauge__address',\n gauge__id = 'gauge__id',\n id = 'id',\n isKilled = 'isKilled',\n recipient = 'recipient',\n relativeWeightCap = 'relativeWeightCap'\n}\n\nexport type SingleRecipientGauge = {\n __typename?: 'SingleRecipientGauge';\n /** Factory contract address */\n factory: GaugeFactory;\n /** Reference to Gauge entity - created when SingleRecipientGauge is added to GaugeController */\n gauge?: Maybe;\n /** SingleRecipientGauge contract address */\n id: Scalars['ID'];\n /** Whether Balancer DAO killed the gauge */\n isKilled: Scalars['Boolean'];\n /** Address where emissions for this gauge will be sent to */\n recipient: Scalars['Bytes'];\n /** Relative weight cap of the gauge (0.01 = 1%) - V2 factories only */\n relativeWeightCap?: Maybe;\n};\n\nexport type SingleRecipientGauge_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n factory?: InputMaybe;\n factory_?: InputMaybe;\n factory_contains?: InputMaybe;\n factory_contains_nocase?: InputMaybe;\n factory_ends_with?: InputMaybe;\n factory_ends_with_nocase?: InputMaybe;\n factory_gt?: InputMaybe;\n factory_gte?: InputMaybe;\n factory_in?: InputMaybe>;\n factory_lt?: InputMaybe;\n factory_lte?: InputMaybe;\n factory_not?: InputMaybe;\n factory_not_contains?: InputMaybe;\n factory_not_contains_nocase?: InputMaybe;\n factory_not_ends_with?: InputMaybe;\n factory_not_ends_with_nocase?: InputMaybe;\n factory_not_in?: InputMaybe>;\n factory_not_starts_with?: InputMaybe;\n factory_not_starts_with_nocase?: InputMaybe;\n factory_starts_with?: InputMaybe;\n factory_starts_with_nocase?: InputMaybe;\n gauge?: InputMaybe;\n gauge_?: InputMaybe;\n gauge_contains?: InputMaybe;\n gauge_contains_nocase?: InputMaybe;\n gauge_ends_with?: InputMaybe;\n gauge_ends_with_nocase?: InputMaybe;\n gauge_gt?: InputMaybe;\n gauge_gte?: InputMaybe;\n gauge_in?: InputMaybe>;\n gauge_lt?: InputMaybe;\n gauge_lte?: InputMaybe;\n gauge_not?: InputMaybe;\n gauge_not_contains?: InputMaybe;\n gauge_not_contains_nocase?: InputMaybe;\n gauge_not_ends_with?: InputMaybe;\n gauge_not_ends_with_nocase?: InputMaybe;\n gauge_not_in?: InputMaybe>;\n gauge_not_starts_with?: InputMaybe;\n gauge_not_starts_with_nocase?: InputMaybe;\n gauge_starts_with?: InputMaybe;\n gauge_starts_with_nocase?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n isKilled?: InputMaybe;\n isKilled_in?: InputMaybe>;\n isKilled_not?: InputMaybe;\n isKilled_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n recipient?: InputMaybe;\n recipient_contains?: InputMaybe;\n recipient_gt?: InputMaybe;\n recipient_gte?: InputMaybe;\n recipient_in?: InputMaybe>;\n recipient_lt?: InputMaybe;\n recipient_lte?: InputMaybe;\n recipient_not?: InputMaybe;\n recipient_not_contains?: InputMaybe;\n recipient_not_in?: InputMaybe>;\n relativeWeightCap?: InputMaybe;\n relativeWeightCap_gt?: InputMaybe;\n relativeWeightCap_gte?: InputMaybe;\n relativeWeightCap_in?: InputMaybe>;\n relativeWeightCap_lt?: InputMaybe;\n relativeWeightCap_lte?: InputMaybe;\n relativeWeightCap_not?: InputMaybe;\n relativeWeightCap_not_in?: InputMaybe>;\n};\n\nexport enum SingleRecipientGauge_OrderBy {\n factory = 'factory',\n factory__id = 'factory__id',\n factory__numGauges = 'factory__numGauges',\n gauge = 'gauge',\n gauge__addedTimestamp = 'gauge__addedTimestamp',\n gauge__address = 'gauge__address',\n gauge__id = 'gauge__id',\n id = 'id',\n isKilled = 'isKilled',\n recipient = 'recipient',\n relativeWeightCap = 'relativeWeightCap'\n}\n\nexport type Subscription = {\n __typename?: 'Subscription';\n /** Access to subgraph metadata */\n _meta?: Maybe<_Meta_>;\n gauge?: Maybe;\n gaugeFactories: Array;\n gaugeFactory?: Maybe;\n gaugeShare?: Maybe;\n gaugeShares: Array;\n gaugeType?: Maybe;\n gaugeTypes: Array;\n gaugeVote?: Maybe;\n gaugeVotes: Array;\n gauges: Array;\n liquidityGauge?: Maybe;\n liquidityGauges: Array;\n lockSnapshot?: Maybe;\n lockSnapshots: Array;\n omniVotingEscrowLock?: Maybe;\n omniVotingEscrowLocks: Array;\n pool?: Maybe;\n pools: Array;\n rewardToken?: Maybe;\n rewardTokens: Array;\n rootGauge?: Maybe;\n rootGauges: Array;\n singleRecipientGauge?: Maybe;\n singleRecipientGauges: Array;\n user?: Maybe;\n users: Array;\n votingEscrow?: Maybe;\n votingEscrowLock?: Maybe;\n votingEscrowLocks: Array;\n votingEscrows: Array;\n};\n\n\nexport type Subscription_MetaArgs = {\n block?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeFactoriesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugeFactoryArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeShareArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeSharesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugeTypeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeTypesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugeVoteArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionGaugeVotesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionLiquidityGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionLiquidityGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionLockSnapshotArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionLockSnapshotsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionOmniVotingEscrowLockArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionOmniVotingEscrowLocksArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionPoolArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionPoolsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionRewardTokenArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionRewardTokensArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionRootGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionRootGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionSingleRecipientGaugeArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionSingleRecipientGaugesArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionUserArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionUsersArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionVotingEscrowArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionVotingEscrowLockArgs = {\n block?: InputMaybe;\n id: Scalars['ID'];\n subgraphError?: _SubgraphErrorPolicy_;\n};\n\n\nexport type SubscriptionVotingEscrowLocksArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\n\nexport type SubscriptionVotingEscrowsArgs = {\n block?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n subgraphError?: _SubgraphErrorPolicy_;\n where?: InputMaybe;\n};\n\nexport type User = {\n __typename?: 'User';\n /** List of gauge the user has shares */\n gaugeShares?: Maybe>;\n /** List of votes on gauges */\n gaugeVotes?: Maybe>;\n /** User address */\n id: Scalars['ID'];\n /** List of omni locks the user created */\n omniVotingLocks?: Maybe>;\n /** List of locks the user created */\n votingLocks?: Maybe>;\n};\n\n\nexport type UserGaugeSharesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserGaugeVotesArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserOmniVotingLocksArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type UserVotingLocksArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type User_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n gaugeShares_?: InputMaybe;\n gaugeVotes_?: InputMaybe;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n omniVotingLocks_?: InputMaybe;\n or?: InputMaybe>>;\n votingLocks_?: InputMaybe;\n};\n\nexport enum User_OrderBy {\n gaugeShares = 'gaugeShares',\n gaugeVotes = 'gaugeVotes',\n id = 'id',\n omniVotingLocks = 'omniVotingLocks',\n votingLocks = 'votingLocks'\n}\n\nexport type VotingEscrow = {\n __typename?: 'VotingEscrow';\n /** VotingEscrow contract address */\n id: Scalars['ID'];\n /** List of veBAL locks created */\n locks?: Maybe>;\n /** List of veBAL locks created */\n omniLocks?: Maybe>;\n /** Amount of B-80BAL-20WETH BPT locked, only applies on mainnet */\n stakedSupply?: Maybe;\n};\n\n\nexport type VotingEscrowLocksArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\n\nexport type VotingEscrowOmniLocksArgs = {\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n};\n\nexport type VotingEscrowLock = {\n __typename?: 'VotingEscrowLock';\n /** veBAL balance at the moment user locks */\n bias: Scalars['BigDecimal'];\n /** Equal to: - */\n id: Scalars['ID'];\n /** Amount of B-80BAL-20WETH BPT the user has locked */\n lockedBalance: Scalars['BigDecimal'];\n /** veBAL decay rate (per second) */\n slope: Scalars['BigDecimal'];\n /** Timestamp at which the lock was created [seconds] */\n timestamp: Scalars['Int'];\n /** Timestamp at which B-80BAL-20WETH BPT can be unlocked by user [seconds] */\n unlockTime: Scalars['BigInt'];\n /** Timestamp at which the lcok was created [seconds]. Same as timestamp */\n updatedAt: Scalars['Int'];\n /** Reference to User entity */\n user: User;\n /** Reference to VotingEscrow entity */\n votingEscrowID: VotingEscrow;\n};\n\nexport type VotingEscrowLock_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n bias?: InputMaybe;\n bias_gt?: InputMaybe;\n bias_gte?: InputMaybe;\n bias_in?: InputMaybe>;\n bias_lt?: InputMaybe;\n bias_lte?: InputMaybe;\n bias_not?: InputMaybe;\n bias_not_in?: InputMaybe>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n lockedBalance?: InputMaybe;\n lockedBalance_gt?: InputMaybe;\n lockedBalance_gte?: InputMaybe;\n lockedBalance_in?: InputMaybe>;\n lockedBalance_lt?: InputMaybe;\n lockedBalance_lte?: InputMaybe;\n lockedBalance_not?: InputMaybe;\n lockedBalance_not_in?: InputMaybe>;\n or?: InputMaybe>>;\n slope?: InputMaybe;\n slope_gt?: InputMaybe;\n slope_gte?: InputMaybe;\n slope_in?: InputMaybe>;\n slope_lt?: InputMaybe;\n slope_lte?: InputMaybe;\n slope_not?: InputMaybe;\n slope_not_in?: InputMaybe>;\n timestamp?: InputMaybe;\n timestamp_gt?: InputMaybe;\n timestamp_gte?: InputMaybe;\n timestamp_in?: InputMaybe>;\n timestamp_lt?: InputMaybe;\n timestamp_lte?: InputMaybe;\n timestamp_not?: InputMaybe;\n timestamp_not_in?: InputMaybe>;\n unlockTime?: InputMaybe;\n unlockTime_gt?: InputMaybe;\n unlockTime_gte?: InputMaybe;\n unlockTime_in?: InputMaybe>;\n unlockTime_lt?: InputMaybe;\n unlockTime_lte?: InputMaybe;\n unlockTime_not?: InputMaybe;\n unlockTime_not_in?: InputMaybe>;\n updatedAt?: InputMaybe;\n updatedAt_gt?: InputMaybe;\n updatedAt_gte?: InputMaybe;\n updatedAt_in?: InputMaybe>;\n updatedAt_lt?: InputMaybe;\n updatedAt_lte?: InputMaybe;\n updatedAt_not?: InputMaybe;\n updatedAt_not_in?: InputMaybe>;\n user?: InputMaybe;\n user_?: InputMaybe;\n user_contains?: InputMaybe;\n user_contains_nocase?: InputMaybe;\n user_ends_with?: InputMaybe;\n user_ends_with_nocase?: InputMaybe;\n user_gt?: InputMaybe;\n user_gte?: InputMaybe;\n user_in?: InputMaybe>;\n user_lt?: InputMaybe;\n user_lte?: InputMaybe;\n user_not?: InputMaybe;\n user_not_contains?: InputMaybe;\n user_not_contains_nocase?: InputMaybe;\n user_not_ends_with?: InputMaybe;\n user_not_ends_with_nocase?: InputMaybe;\n user_not_in?: InputMaybe>;\n user_not_starts_with?: InputMaybe;\n user_not_starts_with_nocase?: InputMaybe;\n user_starts_with?: InputMaybe;\n user_starts_with_nocase?: InputMaybe;\n votingEscrowID?: InputMaybe;\n votingEscrowID_?: InputMaybe;\n votingEscrowID_contains?: InputMaybe;\n votingEscrowID_contains_nocase?: InputMaybe;\n votingEscrowID_ends_with?: InputMaybe;\n votingEscrowID_ends_with_nocase?: InputMaybe;\n votingEscrowID_gt?: InputMaybe;\n votingEscrowID_gte?: InputMaybe;\n votingEscrowID_in?: InputMaybe>;\n votingEscrowID_lt?: InputMaybe;\n votingEscrowID_lte?: InputMaybe;\n votingEscrowID_not?: InputMaybe;\n votingEscrowID_not_contains?: InputMaybe;\n votingEscrowID_not_contains_nocase?: InputMaybe;\n votingEscrowID_not_ends_with?: InputMaybe;\n votingEscrowID_not_ends_with_nocase?: InputMaybe;\n votingEscrowID_not_in?: InputMaybe>;\n votingEscrowID_not_starts_with?: InputMaybe;\n votingEscrowID_not_starts_with_nocase?: InputMaybe;\n votingEscrowID_starts_with?: InputMaybe;\n votingEscrowID_starts_with_nocase?: InputMaybe;\n};\n\nexport enum VotingEscrowLock_OrderBy {\n bias = 'bias',\n id = 'id',\n lockedBalance = 'lockedBalance',\n slope = 'slope',\n timestamp = 'timestamp',\n unlockTime = 'unlockTime',\n updatedAt = 'updatedAt',\n user = 'user',\n user__id = 'user__id',\n votingEscrowID = 'votingEscrowID',\n votingEscrowID__id = 'votingEscrowID__id',\n votingEscrowID__stakedSupply = 'votingEscrowID__stakedSupply'\n}\n\nexport type VotingEscrow_Filter = {\n /** Filter for the block changed event. */\n _change_block?: InputMaybe;\n and?: InputMaybe>>;\n id?: InputMaybe;\n id_gt?: InputMaybe;\n id_gte?: InputMaybe;\n id_in?: InputMaybe>;\n id_lt?: InputMaybe;\n id_lte?: InputMaybe;\n id_not?: InputMaybe;\n id_not_in?: InputMaybe>;\n locks_?: InputMaybe;\n omniLocks_?: InputMaybe;\n or?: InputMaybe>>;\n stakedSupply?: InputMaybe;\n stakedSupply_gt?: InputMaybe;\n stakedSupply_gte?: InputMaybe;\n stakedSupply_in?: InputMaybe>;\n stakedSupply_lt?: InputMaybe;\n stakedSupply_lte?: InputMaybe;\n stakedSupply_not?: InputMaybe;\n stakedSupply_not_in?: InputMaybe>;\n};\n\nexport enum VotingEscrow_OrderBy {\n id = 'id',\n locks = 'locks',\n omniLocks = 'omniLocks',\n stakedSupply = 'stakedSupply'\n}\n\nexport type _Block_ = {\n __typename?: '_Block_';\n /** The hash of the block */\n hash?: Maybe;\n /** The block number */\n number: Scalars['Int'];\n /** Integer representation of the timestamp stored in blocks for the chain */\n timestamp?: Maybe;\n};\n\n/** The type for the top-level _meta field */\nexport type _Meta_ = {\n __typename?: '_Meta_';\n /**\n * Information about a specific subgraph block. The hash of the block\n * will be null if the _meta field has a block constraint that asks for\n * a block number. It will be filled if the _meta field has no block constraint\n * and therefore asks for the latest block\n *\n */\n block: _Block_;\n /** The deployment ID */\n deployment: Scalars['String'];\n /** If `true`, the subgraph encountered indexing errors at some past block */\n hasIndexingErrors: Scalars['Boolean'];\n};\n\nexport enum _SubgraphErrorPolicy_ {\n /** Data will be returned even if the subgraph has indexing errors */\n allow = 'allow',\n /** If the subgraph has indexing errors, data will be omitted. The default. */\n deny = 'deny'\n}\n\nexport type GaugeShareQueryVariables = Exact<{\n id: Scalars['ID'];\n block?: InputMaybe;\n}>;\n\n\nexport type GaugeShareQuery = { __typename?: 'Query', gaugeShare?: { __typename?: 'GaugeShare', id: string, balance: string, user: { __typename?: 'User', id: string }, gauge: { __typename?: 'LiquidityGauge', id: string, isKilled: boolean, poolId?: string | null, poolAddress: string, totalSupply: string } } | null };\n\nexport type GaugeSharesQueryVariables = Exact<{\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type GaugeSharesQuery = { __typename?: 'Query', gaugeShares: Array<{ __typename?: 'GaugeShare', id: string, balance: string, user: { __typename?: 'User', id: string }, gauge: { __typename?: 'LiquidityGauge', id: string, isKilled: boolean, poolId?: string | null, poolAddress: string, totalSupply: string } }> };\n\nexport type SubgraphGaugeShareFragment = { __typename?: 'GaugeShare', id: string, balance: string, user: { __typename?: 'User', id: string }, gauge: { __typename?: 'LiquidityGauge', id: string, isKilled: boolean, poolId?: string | null, poolAddress: string, totalSupply: string } };\n\nexport type LiquidityGaugesQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type LiquidityGaugesQuery = { __typename?: 'Query', liquidityGauges: Array<{ __typename?: 'LiquidityGauge', id: string, symbol: string, poolAddress: string, poolId?: string | null, streamer?: string | null, totalSupply: string, factory: { __typename?: 'GaugeFactory', id: string, numGauges: number }, tokens?: Array<{ __typename?: 'RewardToken', id: string, symbol: string, decimals: number, totalDeposited: string, rate?: string | null, periodFinish?: string | null }> | null }> };\n\nexport type SubgraphLiquidityGaugeFragment = { __typename?: 'LiquidityGauge', id: string, symbol: string, poolAddress: string, poolId?: string | null, streamer?: string | null, totalSupply: string, factory: { __typename?: 'GaugeFactory', id: string, numGauges: number }, tokens?: Array<{ __typename?: 'RewardToken', id: string, symbol: string, decimals: number, totalDeposited: string, rate?: string | null, periodFinish?: string | null }> | null };\n\nexport type PoolsQueryVariables = Exact<{\n skip?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n where?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolsQuery = { __typename?: 'Query', pools: Array<{ __typename?: 'Pool', id: string, poolId?: string | null, preferentialGauge?: { __typename?: 'LiquidityGauge', id: string, symbol: string, poolAddress: string, poolId?: string | null, streamer?: string | null, totalSupply: string, factory: { __typename?: 'GaugeFactory', id: string, numGauges: number }, tokens?: Array<{ __typename?: 'RewardToken', id: string, symbol: string, decimals: number, totalDeposited: string, rate?: string | null, periodFinish?: string | null }> | null } | null }> };\n\nexport type SubgraphPoolWithPreferentialGaugeFragment = { __typename?: 'Pool', id: string, poolId?: string | null, preferentialGauge?: { __typename?: 'LiquidityGauge', id: string, symbol: string, poolAddress: string, poolId?: string | null, streamer?: string | null, totalSupply: string, factory: { __typename?: 'GaugeFactory', id: string, numGauges: number }, tokens?: Array<{ __typename?: 'RewardToken', id: string, symbol: string, decimals: number, totalDeposited: string, rate?: string | null, periodFinish?: string | null }> | null } | null };\n\nexport type PoolGaugesQueryVariables = Exact<{\n where?: InputMaybe;\n first?: InputMaybe;\n orderBy?: InputMaybe;\n orderDirection?: InputMaybe;\n skip?: InputMaybe;\n block?: InputMaybe;\n}>;\n\n\nexport type PoolGaugesQuery = { __typename?: 'Query', pools: Array<{ __typename?: 'Pool', gauges?: Array<{ __typename?: 'LiquidityGauge', id: string, relativeWeightCap?: string | null }> | null, preferentialGauge?: { __typename?: 'LiquidityGauge', id: string } | null }> };\n\nexport const SubgraphGaugeShareFragmentDoc = gql`\n fragment SubgraphGaugeShare on GaugeShare {\n id\n balance\n user {\n id\n }\n gauge {\n id\n isKilled\n poolId\n poolAddress\n totalSupply\n }\n}\n `;\nexport const SubgraphLiquidityGaugeFragmentDoc = gql`\n fragment SubgraphLiquidityGauge on LiquidityGauge {\n id\n symbol\n poolAddress\n poolId\n streamer\n factory {\n id\n numGauges\n }\n totalSupply\n tokens {\n id\n symbol\n decimals\n totalDeposited\n rate\n periodFinish\n }\n}\n `;\nexport const SubgraphPoolWithPreferentialGaugeFragmentDoc = gql`\n fragment SubgraphPoolWithPreferentialGauge on Pool {\n id\n poolId\n preferentialGauge {\n ...SubgraphLiquidityGauge\n }\n}\n ${SubgraphLiquidityGaugeFragmentDoc}`;\nexport const GaugeShareDocument = gql`\n query GaugeShare($id: ID!, $block: Block_height) {\n gaugeShare(id: $id, block: $block) {\n ...SubgraphGaugeShare\n }\n}\n ${SubgraphGaugeShareFragmentDoc}`;\nexport const GaugeSharesDocument = gql`\n query GaugeShares($first: Int, $orderBy: GaugeShare_orderBy, $orderDirection: OrderDirection, $skip: Int, $where: GaugeShare_filter, $block: Block_height) {\n gaugeShares(\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n skip: $skip\n where: $where\n block: $block\n ) {\n ...SubgraphGaugeShare\n }\n}\n ${SubgraphGaugeShareFragmentDoc}`;\nexport const LiquidityGaugesDocument = gql`\n query LiquidityGauges($skip: Int, $first: Int, $orderBy: LiquidityGauge_orderBy, $orderDirection: OrderDirection, $where: LiquidityGauge_filter, $block: Block_height) {\n liquidityGauges(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphLiquidityGauge\n }\n}\n ${SubgraphLiquidityGaugeFragmentDoc}`;\nexport const PoolsDocument = gql`\n query Pools($skip: Int, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $where: Pool_filter, $block: Block_height) {\n pools(\n skip: $skip\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n where: $where\n block: $block\n ) {\n ...SubgraphPoolWithPreferentialGauge\n }\n}\n ${SubgraphPoolWithPreferentialGaugeFragmentDoc}`;\nexport const PoolGaugesDocument = gql`\n query PoolGauges($where: Pool_filter, $first: Int, $orderBy: Pool_orderBy, $orderDirection: OrderDirection, $skip: Int, $block: Block_height) {\n pools(\n where: $where\n first: $first\n orderBy: $orderBy\n orderDirection: $orderDirection\n skip: $skip\n block: $block\n ) {\n gauges {\n id\n relativeWeightCap\n }\n preferentialGauge {\n id\n }\n }\n}\n `;\n\nexport type SdkFunctionWrapper = (action: (requestHeaders?:Record) => Promise, operationName: string, operationType?: string) => Promise;\n\n\nconst defaultWrapper: SdkFunctionWrapper = (action, _operationName, _operationType) => action();\n\nexport function getSdk(client: GraphQLClient, withWrapper: SdkFunctionWrapper = defaultWrapper) {\n return {\n GaugeShare(variables: GaugeShareQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(GaugeShareDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'GaugeShare', 'query');\n },\n GaugeShares(variables?: GaugeSharesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(GaugeSharesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'GaugeShares', 'query');\n },\n LiquidityGauges(variables?: LiquidityGaugesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(LiquidityGaugesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'LiquidityGauges', 'query');\n },\n Pools(variables?: PoolsQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolsDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'Pools', 'query');\n },\n PoolGauges(variables?: PoolGaugesQueryVariables, requestHeaders?: Dom.RequestInit[\"headers\"]): Promise {\n return withWrapper((wrappedRequestHeaders) => client.request(PoolGaugesDocument, variables, {...requestHeaders, ...wrappedRequestHeaders}), 'PoolGauges', 'query');\n }\n };\n}\nexport type Sdk = ReturnType;","import { GraphQLClient } from 'graphql-request';\nimport { getSdk, Sdk } from './generated/balancer-subgraph-types';\nimport * as Gauges from './generated/balancer-gauges';\nimport * as V2 from './generated/balancer-subgraph-types';\n\nexport * from './generated/balancer-subgraph-types';\n\nexport type SubgraphClient = Sdk;\nexport type GaugesClient = Gauges.Sdk;\nexport type SubgraphLiquidityGauge = Gauges.LiquidityGauge;\nexport type SubgraphPool = V2.SubgraphPoolFragment;\n\nexport function createSubgraphClient(subgraphUrl: string): SubgraphClient {\n const client = new GraphQLClient(subgraphUrl);\n\n return getSdk(client);\n}\n\nexport function createGaugesClient(url: string): GaugesClient {\n const client = new GraphQLClient(url);\n\n return Gauges.getSdk(client);\n}\n","import { set } from 'lodash';\nimport { Fragment, JsonFragment, Interface, Result } from '@ethersproject/abi';\nimport { CallOverrides } from '@ethersproject/contracts';\nimport { Multicall3, Multicall3__factory } from '@/contracts';\nimport { Provider } from '@ethersproject/providers';\n\nexport class Multicaller3 {\n private interface: Interface;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private calls: [string, string, any][] = [];\n private paths: string[] = [];\n address = '0xcA11bde05977b3631167028862bE2a173976CA11';\n multicall: Multicall3;\n\n constructor(\n abi: string | Array,\n provider: Provider,\n private options: CallOverrides = {}\n ) {\n this.interface = new Interface(abi);\n this.multicall = Multicall3__factory.connect(this.address, provider);\n }\n\n call(\n path: string,\n address: string,\n functionName: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n params?: any[]\n ): Multicaller3 {\n this.calls.push([address, functionName, params]);\n this.paths.push(path);\n return this;\n }\n\n async execute(\n from: Record = {},\n batchSize = 1024 // Define the number of function calls in each batch\n ): Promise> {\n const obj = from;\n const results = await this.executeMulticall(batchSize);\n results.forEach((result, i) =>\n set(obj, this.paths[i], result.length > 1 ? result : result[0])\n );\n this.calls = [];\n this.paths = [];\n return obj;\n }\n\n private async executeMulticall(batchSize: number): Promise {\n const numBatches = Math.ceil(this.calls.length / batchSize);\n const results: Result[] = [];\n\n const batchPromises = [];\n\n for (let batchIndex = 0; batchIndex < numBatches; batchIndex++) {\n const batchCalls = this.calls.slice(\n batchIndex * batchSize,\n (batchIndex + 1) * batchSize\n );\n\n const batchRequests = batchCalls.map(\n ([address, functionName, params]) => ({\n target: address,\n allowFailure: true,\n callData: this.interface.encodeFunctionData(functionName, params),\n })\n );\n\n batchPromises.push(\n this.multicall.callStatic.aggregate3(batchRequests, this.options)\n );\n }\n\n const batchResults = await Promise.all(batchPromises);\n\n batchResults.forEach((res, batchIndex) => {\n const offset = batchIndex * batchSize;\n\n for (let i = 0; i < res.length; i++) {\n const callIndex = offset + i;\n const { success, returnData } = res[i];\n\n if (success) {\n try {\n const result = this.interface.decodeFunctionResult(\n this.calls[callIndex][1],\n returnData\n );\n results[callIndex] = result;\n } catch (e) {\n console.error('Multicall error', this.paths[callIndex]);\n results[callIndex] = [];\n }\n } else {\n console.error('Failed request in multicall', this.paths[callIndex]);\n results[callIndex] = [];\n }\n }\n });\n\n return results;\n }\n}\n","import { Multicaller3 } from '@/lib/utils/multiCaller3';\nimport { SubgraphPoolBase } from '@/.';\nimport { Provider } from '@ethersproject/providers';\nimport { formatFixed } from '@ethersproject/bignumber';\nimport { SubgraphToken } from '@balancer-labs/sor';\nimport { PoolToken, Pool } from '@/types';\n\nconst abi = [\n 'function getSwapFeePercentage() view returns (uint256)',\n 'function percentFee() view returns (uint256)',\n 'function protocolPercentFee() view returns (uint256)',\n 'function getNormalizedWeights() view returns (uint256[])',\n 'function totalSupply() view returns (uint256)',\n 'function getVirtualSupply() view returns (uint256)',\n 'function getActualSupply() view returns (uint256)',\n 'function getTargets() view returns (uint256 lowerTarget, uint256 upperTarget)',\n 'function getTokenRates() view returns (uint256, uint256)',\n 'function getWrappedTokenRate() view returns (uint256)',\n 'function getAmplificationParameter() view returns (uint256 value, bool isUpdating, uint256 precision)',\n 'function getPausedState() view returns (bool)',\n 'function inRecoveryMode() view returns (bool)',\n 'function getRate() view returns (uint256)',\n 'function getScalingFactors() view returns (uint256[] memory)', // do we need this here?\n 'function getPoolTokens(bytes32) view returns (address[], uint256[])',\n];\n\nconst getTotalSupplyFn = (poolType: string) => {\n if (poolType.includes('Linear') || ['StablePhantom'].includes(poolType)) {\n return 'getVirtualSupply';\n } else if (poolType === 'ComposableStable') {\n return 'getActualSupply';\n } else {\n return 'totalSupply';\n }\n};\n\nconst getSwapFeeFn = (poolType: string) => {\n if (poolType === 'Element') {\n return 'percentFee';\n } else if (poolType === 'FX') {\n return 'protocolPercentFee';\n } else {\n return 'getSwapFeePercentage';\n }\n};\n\ntype GenericToken = SubgraphToken | PoolToken;\ntype GenericPool = Omit & {\n tokens: GenericToken[];\n};\n\ninterface OnchainData {\n poolTokens: [string[], string[]];\n totalShares: string;\n swapFee: string;\n isPaused?: boolean;\n inRecoveryMode?: boolean;\n rate?: string;\n scalingFactors?: string[];\n weights?: string[];\n targets?: [string, string];\n wrappedTokenRate?: string;\n amp?: [string, boolean, string];\n tokenRates?: [string, string];\n}\n\nconst defaultCalls = (\n id: string,\n address: string,\n vaultAddress: string,\n poolType: string,\n multicaller: Multicaller3\n) => {\n multicaller.call(`${id}.poolTokens`, vaultAddress, 'getPoolTokens', [id]);\n multicaller.call(`${id}.totalShares`, address, getTotalSupplyFn(poolType));\n multicaller.call(`${id}.swapFee`, address, getSwapFeeFn(poolType));\n // Following where added to the pools query contract, however legacy onchain data didn't have them.\n // multicaller.call(`${id}.isPaused`, address, 'getPausedState');\n // multicaller.call(`${id}.inRecoveryMode`, address, 'inRecoveryMode');\n // multicaller.call(`${id}.rate`, address, 'getRate');\n // multicaller.call(`${id}.scalingFactors`, address, 'getScalingFactors');\n};\n\nconst weightedCalls = (\n id: string,\n address: string,\n multicaller: Multicaller3\n) => {\n multicaller.call(`${id}.weights`, address, 'getNormalizedWeights');\n};\n\nconst linearCalls = (\n id: string,\n address: string,\n multicaller: Multicaller3\n) => {\n multicaller.call(`${id}.targets`, address, 'getTargets');\n multicaller.call(`${id}.wrappedTokenRate`, address, 'getWrappedTokenRate');\n};\n\nconst stableCalls = (\n id: string,\n address: string,\n multicaller: Multicaller3\n) => {\n multicaller.call(`${id}.amp`, address, 'getAmplificationParameter');\n};\n\nconst gyroECalls = (id: string, address: string, multicaller: Multicaller3) => {\n multicaller.call(`${id}.tokenRates`, address, 'getTokenRates');\n};\n\nconst poolTypeCalls = (poolType: string, poolTypeVersion = 1) => {\n const do_nothing = () => ({});\n switch (poolType) {\n case 'Weighted':\n case 'LiquidityBootstrapping':\n case 'Investment':\n return weightedCalls;\n case 'Stable':\n case 'StablePhantom':\n case 'MetaStable':\n case 'ComposableStable':\n return stableCalls;\n case 'GyroE':\n if (poolTypeVersion === 2) {\n return gyroECalls;\n } else {\n return do_nothing;\n }\n case 'Gyro2':\n if (poolTypeVersion === 2) {\n // Gyro2 V2 has tokenRates same as GyroE V2\n return gyroECalls;\n } else {\n return do_nothing;\n }\n case 'AaveLinear':\n if (poolTypeVersion === 1) {\n return linearCalls;\n } else {\n return do_nothing;\n }\n default:\n return do_nothing;\n }\n};\n\nconst merge = (pool: T, result: OnchainData) => ({\n ...pool,\n tokens: result.poolTokens\n ? pool.tokens.map((token) => {\n const idx = result.poolTokens[0]\n .map((t) => t.toLowerCase())\n .indexOf(token.address);\n const wrappedToken =\n pool.wrappedIndex && pool.tokensList[pool.wrappedIndex];\n const tokenDecimals =\n token.decimals === undefined ? 18 : token.decimals;\n return {\n ...token,\n balance: formatFixed(result.poolTokens[1][idx], tokenDecimals),\n weight:\n (result.weights && formatFixed(result.weights[idx], 18)) ||\n token.weight,\n priceRate:\n (result.wrappedTokenRate &&\n wrappedToken &&\n wrappedToken.toLowerCase() === token.address.toLowerCase() &&\n formatFixed(result.wrappedTokenRate, 18)) ||\n token.priceRate,\n } as SubgraphToken;\n })\n : pool.tokens,\n totalShares: result.totalShares\n ? formatFixed(result.totalShares, 18)\n : pool.totalShares,\n swapFee: result.swapFee ? formatFixed(result.swapFee, 18) : pool.swapFee,\n amp:\n (result.amp &&\n result.amp[0] &&\n formatFixed(result.amp[0], String(result.amp[2]).length - 1)) ||\n pool.amp,\n lowerTarget:\n (result.targets && formatFixed(result.targets[0], 18)) || pool.lowerTarget,\n upperTarget:\n (result.targets && formatFixed(result.targets[1], 18)) || pool.upperTarget,\n tokenRates:\n (result.tokenRates &&\n result.tokenRates.map((rate) => formatFixed(rate, 18))) ||\n pool.tokenRates,\n // rate: result.rate,\n // isPaused: result.isPaused,\n // inRecoveryMode: result.inRecoveryMode,\n // scalingFactors: result.scalingFactors,\n});\n\nexport const fetchOnChainPoolData = async (\n pools: {\n id: string;\n address: string;\n poolType: string;\n poolTypeVersion?: number;\n }[],\n vaultAddress: string,\n provider: Provider,\n batchSize = 1024\n): Promise<{ [id: string]: OnchainData }> => {\n if (pools.length === 0) {\n return {};\n }\n\n const multicaller = new Multicaller3(abi, provider);\n\n pools.forEach(({ id, address, poolType, poolTypeVersion }) => {\n defaultCalls(id, address, vaultAddress, poolType, multicaller);\n poolTypeCalls(poolType, poolTypeVersion)(id, address, multicaller);\n });\n\n const results = (await multicaller.execute({}, batchSize)) as {\n [id: string]: OnchainData;\n };\n\n return results;\n};\n\nexport async function getOnChainBalances(\n subgraphPoolsOriginal: T[],\n _multiAddress: string,\n vaultAddress: string,\n provider: Provider,\n batchSize = 1024\n): Promise {\n if (subgraphPoolsOriginal.length === 0) return subgraphPoolsOriginal;\n\n const poolsWithOnchainData: T[] = [];\n\n const onchainData = (await fetchOnChainPoolData(\n subgraphPoolsOriginal,\n vaultAddress,\n provider,\n batchSize\n )) as { [id: string]: OnchainData };\n\n subgraphPoolsOriginal.forEach((pool) => {\n const data = onchainData[pool.id];\n poolsWithOnchainData.push(merge(pool, data));\n });\n\n return poolsWithOnchainData;\n}\n","import { PoolDataService, SubgraphPoolBase } from '@balancer-labs/sor';\nimport {\n OrderDirection,\n Pool_OrderBy,\n PoolsQueryVariables,\n SubgraphClient,\n} from '@/modules/subgraph/subgraph';\nimport { parseInt } from 'lodash';\nimport { getOnChainBalances } from './onChainData3';\nimport { Provider } from '@ethersproject/providers';\nimport {\n BalancerNetworkConfig,\n BalancerSdkSorConfig,\n GraphQLQuery,\n} from '@/types';\nimport { GraphQLArgs } from '@/lib/graphql/types';\nimport {\n GraphQLArgsBuilder,\n SubgraphArgsFormatter,\n} from '@/lib/graphql/args-builder';\n\nimport { Logger } from '@/lib/utils/logger';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function mapPools(pools: any[]): SubgraphPoolBase[] {\n return pools.map((pool) => ({\n ...pool,\n poolType: pool.poolType || '',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n tokens: (pool.tokens || []).map((token: any) => ({\n ...token,\n weight: token.weight || null,\n })),\n totalWeight: pool.totalWeight || undefined,\n amp: pool.amp || undefined,\n expiryTime: pool.expiryTime ? parseInt(pool.expiryTime) : undefined,\n unitSeconds: pool.unitSeconds ? parseInt(pool.unitSeconds) : undefined,\n principalToken: pool.principalToken || undefined,\n baseToken: pool.baseToken || undefined,\n }));\n}\n\nexport class SubgraphPoolDataService implements PoolDataService {\n private readonly defaultArgs: GraphQLArgs;\n constructor(\n private readonly client: SubgraphClient,\n private readonly provider: Provider,\n private readonly network: BalancerNetworkConfig,\n private readonly sorConfig?: BalancerSdkSorConfig,\n query?: GraphQLQuery\n ) {\n // Default args can be overwritten by passing in a queryArgs object to .getPools\n this.defaultArgs = query?.args || {\n orderBy: Pool_OrderBy.TotalLiquidity,\n orderDirection: OrderDirection.Desc,\n where: {\n swapEnabled: {\n eq: true,\n },\n totalShares: {\n gt: 0.000000000001,\n },\n },\n };\n }\n\n /**\n * Returns pools from the subgraph filtered by queryArgs with on-chain balances\n *\n * @param queryArgs\n * @returns SubgraphPoolBase[]\n */\n async getPools(queryArgs?: GraphQLArgs): Promise {\n const pools = await this.getSubgraphPools(queryArgs);\n\n const filteredPools = pools.filter((p) => {\n if (!this.network.poolsToIgnore) return true;\n const index = this.network.poolsToIgnore.findIndex(\n (id) => id.toLowerCase() === p.id.toLowerCase()\n );\n return index === -1;\n });\n\n const mapped = mapPools(filteredPools);\n\n if (this.sorConfig && this.sorConfig.fetchOnChainBalances === false) {\n return mapped;\n }\n\n const logger = Logger.getInstance();\n logger.time(`fetching on-chain balances for ${mapped.length} pools`);\n\n const onChainBalances = await getOnChainBalances(\n mapped,\n this.network.addresses.contracts.multicall,\n this.network.addresses.contracts.vault,\n this.provider,\n this.network.multicallBatchSize\n );\n\n logger.timeEnd(`fetching on-chain balances for ${mapped.length} pools`);\n\n return onChainBalances;\n }\n\n private async getSubgraphPools(queryArgs?: GraphQLArgs) {\n const formattedQuery = new GraphQLArgsBuilder(\n queryArgs || this.defaultArgs\n ).format(new SubgraphArgsFormatter()) as PoolsQueryVariables;\n\n if (formattedQuery.first) {\n const { pools } = await this.client.Pools(formattedQuery);\n return pools;\n }\n\n const { pool0, pool1000, pool2000 } = await this.client.AllPools(\n formattedQuery\n );\n\n const pools = [...pool0, ...pool1000, ...pool2000];\n\n return pools;\n }\n}\n","import { TokenPriceService } from '@balancer-labs/sor';\nimport { SubgraphClient } from '@/modules/subgraph/subgraph';\nimport { keyBy } from 'lodash';\n\nexport class SubgraphTokenPriceService implements TokenPriceService {\n private readonly weth: string;\n\n constructor(private readonly client: SubgraphClient, weth: string) {\n //the subgraph addresses are all toLowerCase\n this.weth = weth.toLowerCase();\n }\n\n public async getNativeAssetPriceInToken(\n tokenAddress: string\n ): Promise {\n const ethPerToken = await this.getLatestPriceInEthFromSubgraph(\n tokenAddress\n );\n\n if (!ethPerToken) {\n throw Error('No price found in the subgraph');\n }\n\n // We want the price of 1 ETH in terms of the token base units\n return `${1 / ethPerToken}`;\n }\n\n public async getLatestPriceInEthFromSubgraph(\n tokenAddress: string\n ): Promise {\n tokenAddress = tokenAddress.toLowerCase();\n\n const { latestPrices } = await this.client.TokenLatestPrices({\n where: { asset_in: [tokenAddress, this.weth] },\n });\n const pricesKeyedOnId = keyBy(latestPrices, 'id');\n\n //the ids are set as ${asset}-${pricingAsset}\n //first try to find an exact match\n if (pricesKeyedOnId[`${tokenAddress}-${this.weth}`]) {\n return parseFloat(pricesKeyedOnId[`${tokenAddress}-${this.weth}`].price);\n }\n\n //no exact match, try to traverse the path\n const matchingLatestPrices = latestPrices.filter(\n (price) => price.asset === tokenAddress\n );\n\n //pick the first one we match on.\n //There is no timestamp on latestPrice, should get introduced to allow for sorting by latest\n for (const tokenPrice of matchingLatestPrices) {\n const pricingAssetPricedInEth =\n pricesKeyedOnId[`${tokenPrice.pricingAsset}-${this.weth}`];\n\n //1 BAL = 20 USDC, 1 USDC = 0.00025 ETH, 1 BAL = 20 * 0.00025\n if (pricingAssetPricedInEth) {\n return (\n parseFloat(tokenPrice.price) *\n parseFloat(pricingAssetPricedInEth.price)\n );\n }\n }\n\n return null;\n }\n}\n","import { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { BalancerNetworkConfig, BalancerSdkConfig } from '@/types';\nexport function getNetworkConfig(\n config: BalancerSdkConfig\n): BalancerNetworkConfig {\n if (typeof config.network === 'number') {\n const networkConfig = BALANCER_NETWORK_CONFIG[config.network];\n\n return {\n ...networkConfig,\n urls: {\n ...networkConfig.urls,\n subgraph: config.customSubgraphUrl ?? networkConfig.urls.subgraph,\n },\n tenderly: config.tenderly,\n };\n }\n\n return {\n ...config.network,\n urls: {\n ...config.network.urls,\n subgraph: config.customSubgraphUrl ?? config.network.urls.subgraph,\n },\n tenderly: config.network.tenderly,\n };\n}\n","export const POOLS_TO_IGNORE = [\n '0x00c2a4be503869fa751c2dbcb7156cc970b5a8da000000000000000000000477',\n '0x02d928e68d8f10c0358566152677db51e1e2dc8c00000000000000000000051e',\n '0x04248aabca09e9a1a3d5129a7ba05b7f17de768400000000000000000000050e',\n '0x05513ca725b6ce035ca2641075474eb469f05f4c00020000000000000000041f',\n '0x0a0fb4ff697de5ac5b6770cd8ee1b72af80b57cf000000000000000000000496',\n '0x0afbd58beca09545e4fb67772faf3858e610bcd00000000000000000000004b9',\n '0x0d05aac44ac7dd3c7ba5d50be93eb884a057d23400000000000000000000051c',\n '0x11839d635e2f0270da37e8ef4324d4d5d54329570002000000000000000004d8',\n '0x126e7643235ec0ab9c103c507642dc3f4ca23c66000000000000000000000468',\n '0x133d241f225750d2c92948e464a5a80111920331000000000000000000000476',\n '0x159cb00338fb63f263fd6f621df619cef71da9540000000000000000000004d5',\n '0x173063a30e095313eee39411f07e95a8a806014e0002000000000000000003ab',\n '0x1bd2f176a812e312077bca87e37c08432bb09f3e0000000000000000000005a1',\n '0x20b156776114e8a801e9767d90c6ccccc8adf398000000000000000000000499',\n '0x246ffb4d928e394a02e45761fecdba6c2e79b8eb000000000000000000000541',\n '0x25accb7943fd73dda5e23ba6329085a3c24bfb6a000200000000000000000387',\n '0x26c2b83fc8535deead276f5cc3ad9c1a2192e02700020000000000000000056b',\n '0x2b218683178d029bab6c9789b1073aa6c96e517600000000000000000000058c',\n '0x2ba7aa2213fa2c909cd9e46fed5a0059542b36b00000000000000000000003a3',\n '0x2bbf681cc4eb09218bee85ea2a5d3d13fa40fc0c0000000000000000000000fd',\n '0x2e52c64fd319e380cdbcfc4577ea1fda558a32e40002000000000000000005ba',\n '0x2f4eb100552ef93840d5adc30560e5513dfffacb000000000000000000000334',\n '0x2ff1a9dbdacd55297452cfd8a4d94724bc22a5f7000000000000000000000484',\n '0x3035917be42af437cbdd774be26b9ec90a2bd677000200000000000000000543',\n '0x331d50e0b00fc1c32742f151e56b9b616227e23e00000000000000000000047c',\n '0x334c96d792e4b26b841d28f53235281cec1be1f200020000000000000000038a',\n '0x335d1709d4da9aca59d16328db5cd4ea66bfe06b0000000000000000000004d6',\n '0x395d8a1d9ad82b5abe558f8abbfe183b27138af40000000000000000000004e5',\n '0x3bb22fc9033b802f2ac47c18885f63476f158afc000000000000000000000483',\n '0x3c640f0d3036ad85afa2d5a9e32be651657b874f00000000000000000000046b',\n '0x3cdae4f12a67ba563499e102f309c73213cb241c000000000000000000000335',\n '0x3dbb8d974b82e82ce79c20c0f5995f4f1f533ede000000000000000000000470',\n '0x3f7a7fd7f214be45ec26820fd01ac3be4fc75aa70002000000000000000004c5',\n '0x3fcb7085b8f2f473f80bf6d879cae99ea4de934400000000000000000000056d',\n '0x41503c9d499ddbd1dcdf818a1b05e9774203bf46000000000000000000000594',\n '0x4228290ee9cab692938ff0b4ba303fbcdb68e9f200020000000000000000057d',\n '0x454ed96955d04d2f5cdd05e0fd1c77975bfe5307000000000000000000000410',\n '0x481c5fc05d63a58aa2f0f2aa417c021b5d419cb200000000000000000000056a',\n '0x483006684f422a9448023b2382615c57c5ecf18f000000000000000000000488',\n '0x4a82b580365cff9b146281ab72500957a849abdc000000000000000000000494',\n '0x4c81255cc9ed7062180ea99962fe05ac0d57350b0000000000000000000005a3',\n '0x4c8d2e60863e8d7e1033eda2b3d84e92a641802000000000000000000000040f',\n '0x4cbde5c4b4b53ebe4af4adb85404725985406163000000000000000000000595',\n '0x4ce0bd7debf13434d3ae127430e9bd4291bfb61f00020000000000000000038b',\n '0x4ce277df0feb5b4d07a0ca2adcf5326e4005239d000000000000000000000518',\n '0x4fd4687ec38220f805b6363c3c1e52d0df3b5023000200000000000000000473',\n '0x4fd63966879300cafafbb35d157dc5229278ed230000000000000000000000e9',\n '0x50cf90b954958480b8df7958a9e965752f62712400000000000000000000046f',\n '0x53bc3cba3832ebecbfa002c12023f8ab1aa3a3a0000000000000000000000411',\n '0x5a6a8cffb4347ff7fc484bf5f0f8a2e234d34255000200000000000000000275',\n '0x5b3240b6be3e7487d61cd1afdfc7fe4fa1d81e6400000000000000000000037b',\n '0x60683b05e9a39e3509d8fdb9c959f23170f8a0fa000000000000000000000489',\n '0x60d604890feaa0b5460b28a424407c24fe89374a0000000000000000000004fc',\n '0x639883476960a23b38579acfd7d71561a0f408cf000200000000000000000505',\n '0x652d486b80c461c397b0d95612a404da936f3db30000000000000000000000e7',\n '0x6667c6fa9f2b3fc1cc8d85320b62703d938e43850000000000000000000004fb',\n '0x6a1eb2e9b45e772f55bd9a34659a04b6f75da68700000000000000000000040d',\n '0x6c56e72c551b5ac4bf54a620a76077ca768c8fe40002000000000000000004da',\n '0x70b7d3b3209a59fb0400e17f67f3ee8c37363f4900020000000000000000018f',\n '0x7337224d59cb16c2dc6938cd45a7b2c60c865d6a0000000000000000000004d4',\n '0x74cbfaf94a3577c539a9dcee9870a6349a33b34f000000000000000000000534',\n '0x779d01f939d78a918a3de18cc236ee89221dfd4e0000000000000000000004c7',\n '0x7b50775383d3d6f0215a8f290f2c9e2eebbeceb20000000000000000000000fe',\n '0x804cdb9116a10bb78768d3252355a1b18067bf8f0000000000000000000000fb',\n '0x813e3fe1761f714c502d1d2d3a7cceb33f37f59d00000000000000000000040c',\n '0x82698aecc9e28e9bb27608bd52cf57f704bd1b83000000000000000000000336',\n '0x8a6b25e33b12d1bb6929a8793961076bd1f9d3eb0002000000000000000003e8',\n '0x8e6ec57a822c2f527f2df7c7d7d361df3e7530a1000000000000000000000498',\n '0x8f4063446f5011bc1c9f79a819efe87776f23704000000000000000000000197',\n '0x9001cbbd96f54a658ff4e6e65ab564ded76a543100000000000000000000050a',\n '0x9210f1204b5a24742eba12f710636d76240df3d00000000000000000000000fc',\n '0x9516a2d25958edb8da246a320f2c7d94a0dbe25d000000000000000000000519',\n '0x959216bb492b2efa72b15b7aacea5b5c984c3cca000200000000000000000472',\n '0x968024662b9566b42d78af23a0f441bc8723fa83000200000000000000000418',\n '0x99c88ad7dc566616548adde8ed3effa730eb6c3400000000000000000000049a',\n '0x9b1c8407a360443a9e5eca004713e4088fab8ac0000000000000000000000497',\n '0x9b692f571b256140a39a34676bffa30634c586e100000000000000000000059d',\n '0x9d7f992c900fbea0ec314bdd71b7cc1becf76a33000200000000000000000573',\n '0x9fb771d530b0ceba5160f7bfe2dd1e8b8aa1340300000000000000000000040e',\n '0xa13a9247ea42d743238089903570127dda72fe4400000000000000000000035d',\n '0xa1697f9af0875b63ddc472d6eebada8c1fab85680000000000000000000004f9',\n '0xa3823e50f20982656557a4a6a9c06ba5467ae9080000000000000000000000e6',\n '0xa718042e5622099e5f0ace4e7122058ab39e1bbe000200000000000000000475',\n '0xa8b103a10a94f4f2d7ed2fdcd5545e807557330700000000000000000000048e',\n '0xac5b4ef7ede2f2843a704e96dcaa637f4ba3dc3f00000000000000000000051d',\n '0xac976bb42cb0c85635644e8c7c74d0e0286aa61c0000000000000000000003cb',\n '0xae37d54ae477268b9997d4161b96b8200755935c000000000000000000000337',\n '0xae8535c23afedda9304b03c68a3563b75fc8f92b0000000000000000000005a0',\n '0xb0f75e97a114a4eb4a425edc48990e6760726709000000000000000000000198',\n '0xb5e3de837f869b0248825e0175da73d4e8c3db6b000200000000000000000474',\n '0xb841b062ea8ccf5c4cb78032e91de4ae875560420002000000000000000005b7',\n '0xb9bd68a77ccf8314c0dfe51bc291c77590c4e9e6000200000000000000000385',\n '0xbb6881874825e60e1160416d6c426eae65f2459e000000000000000000000592',\n '0xbc0f2372008005471874e426e86ccfae7b4de79d000000000000000000000485',\n '0xbf2ef8bdc2fc0f3203b3a01778e3ec5009aeef3300000000000000000000058d',\n '0xbfa413a2ff0f20456d57b643746133f54bfe0cd20000000000000000000004c3',\n '0xc2b021133d1b0cf07dba696fd5dd89338428225b000000000000000000000598',\n '0xc443c15033fcb6cf72cc24f1bda0db070ddd9786000000000000000000000593',\n '0xc50d4347209f285247bda8a09fc1c12ce42031c3000000000000000000000590',\n '0xc5dc1316ab670a2eed5716d7f19ced321191f38200000000000000000000056e',\n '0xc8c79fcd0e859e7ec81118e91ce8e4379a481ee6000000000000000000000196',\n '0xcaa052584b462198a5a9356c28bce0634d65f65c0000000000000000000004db',\n '0xcbfa4532d8b2ade2c261d3dd5ef2a2284f7926920000000000000000000004fa',\n '0xcfae6e251369467f465f13836ac8135bd42f8a56000000000000000000000591',\n '0xd4e7c1f3da1144c9e2cfd1b015eda7652b4a439900000000000000000000046a',\n '0xd6e355036f41dc261b3f1ed3bbc6003e87aadb4f000000000000000000000495',\n '0xd7edb56f63b2a0191742aea32df1f98ca81ed9c600000000000000000000058e',\n '0xd997f35c9b1281b82c8928039d14cddab5e13c2000000000000000000000019c',\n '0xdba274b4d04097b90a72b62467d828cefd708037000000000000000000000486',\n '0xdc063deafce952160ec112fa382ac206305657e60000000000000000000004c4',\n '0xdec02e6642e2c999af429f5ce944653cad15e093000000000000000000000469',\n '0xe03af00fabe8401560c1ff7d242d622a5b601573000000000000000000000493',\n '0xe0fcbf4d98f0ad982db260f86cf28b49845403c5000000000000000000000504',\n '0xe2d16b0a39f3fbb4389a0e8f1efcbecfb3d1e6e10000000000000000000005a7',\n '0xe4dc3c1998ac693d68f4c77476d7c815694c3e94000200000000000000000416',\n '0xe6bcc79f328eec93d4ec8f7ed35534d9ab549faa0000000000000000000000e8',\n '0xe8c56405bc405840154d9b572927f4197d110de10000000000000000000005a4',\n '0xeb486af868aeb3b6e53066abc9623b1041b42bc000000000000000000000046c',\n '0xeb567dde03f3da7fe185bdacd5ab495ab220769d000000000000000000000548',\n '0xec3626fee40ef95e7c0cbb1d495c8b67b34d398300000000000000000000053d',\n '0xf22ff21e17157340575158ad7394e068048dd98b0000000000000000000004b8',\n '0xf57c794f42da72b38c8f610ff3b5e8502e48cbde00000000000000000000055c',\n '0xf71d0774b214c4cf51e33eb3d30ef98132e4dbaa00000000000000000000046e',\n '0xfa24a90a3f2bbe5feea92b95cd0d14ce709649f900000000000000000000058f',\n '0xfd11ccdbdb7ab91cb9427a6d6bf570c95876d1950000000000000000000004c2',\n '0xfebb0bbf162e64fb9d0dfe186e517d84c395f016000000000000000000000502',\n '0xfef969638c52899f91781f1be594af6f40b99bad00000000000000000000047b',\n '0x02e139d53ebf4033bf78ab66c6a1e7f1f204487f0002000000000000000009f9',\n '0x03090a9811181a2afe830a3a0b467698ccf3a8b1000000000000000000000bf5',\n '0x0320c1c5b6df19a194d48882aaec1c72940081d9000000000000000000000a7d',\n '0x04b54ea92d73de2d62d651db7d9778f0c49157d8000200000000000000000ba2',\n '0x0503dd6b2d3dd463c9bef67fb5156870af63393e00000000000000000000042e',\n '0x0889b240a5876aae745ac19f1771853671dc5d36000000000000000000000b3f',\n '0x0bc54e914f53f98d16035f4f0d948f3e09c2fac0000200000000000000000bac',\n '0x0c06e87c7b88d998f645b91c1f53b51294b12bca000100000000000000000bb9',\n '0x10b040038f87219d9b42e025e3bd9b8095c87dd9000000000000000000000b11',\n '0x117a3d474976274b37b7b94af5dcade5c90c6e85000000000000000000000aca',\n '0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000a5f',\n '0x1379b816b9be611431d693290289c204720ca56d000100000000000000000b6f',\n '0x150e7b885bdfce974f2abe88a72fdbd692175c6f0002000000000000000009fd',\n '0x178e029173417b1f9c8bc16dcec6f697bc323746000000000000000000000758',\n '0x1aafc31091d93c3ff003cff5d2d8f7ba2e7284250000000000000000000003b3',\n '0x216690738aac4aa0c4770253ca26a28f0115c595000000000000000000000b2c',\n '0x216d6db0c28204014618482c369d7fbf0a8f3232000100000000000000000b60',\n '0x230ecdb2a7cee56d6889965a023aa0473d6da507000000000000000000000bf3',\n '0x252ff6a3a6fd7b5e8e999de8e3f5c3b306ed1401000200000000000000000bec',\n '0x25e57f4612912614e6c99616bd2abb9b5ae71e99000000000000000000000bf0',\n '0x2645b13fd2c5295296e94a76280b968bdcbbdfed000000000000000000000c11',\n '0x284eb68520c8fa83361c1a3a5910aec7f873c18b000000000000000000000ac9',\n '0x2c8dbe8eb86135d9f2f26d196748c088d47f73e7000200000000000000000a29',\n '0x31bccf9e28b94e5dacebaa67fe8bc1603cecd904000000000000000000000a01',\n '0x341068a547c3cde3c09e338714010dd01b32f93f000200000000000000000a34',\n '0x3db543faf7a92052de7860c5c9debabee59ed5bd000000000000000000000a62',\n '0x3dd0843a028c86e0b760b1a76929d1c5ef93a2dd00000000000000000000070d',\n '0x3efb91c4f9b103ee45885695c67794591916f34e000200000000000000000b43',\n '0x402cfdb7781fa85d52f425352661128250b79e12000000000000000000000be3',\n '0x43894de14462b421372bcfe445fa51b1b4a0ff3d000000000000000000000b36',\n '0x4739e50b59b552d490d3fdc60d200977a38510c0000000000000000000000b10',\n '0x48e6b98ef6329f8f0a30ebb8c7c960330d64808500000000000000000000075b',\n '0x4a0b73f0d13ff6d43e304a174697e3d5cfd310a400020000000000000000091c',\n '0x4a77ef015ddcd972fd9ba2c7d5d658689d090f1a000000000000000000000b38',\n '0x4ae3661afa119892f0cc8c43edaf6a94989ac171000000000000000000000c06',\n '0x4ccb966d8246240afb7a1a24628efb930870b1c40002000000000000000009fc',\n '0x52cc8389c6b93d740325729cc7c958066cee4262000000000000000000000b0f',\n '0x5b77107fcdf2b41903bab2bc555d4fc14cf7667d000000000000000000000b32',\n '0x5bae72b75caab1f260d21bc028c630140607d6e8000000000000000000000ac6',\n '0x600bd01b6526611079e12e1ff93aba7a3e34226f0000000000000000000009e4',\n '0x63ce19ccd39930725b8a3d2733627804718ab83d000000000000000000000bf2',\n '0x64efad69f099813021b41f4cac6e749fd55e188f000000000000000000000b39',\n '0x6933ec1ca55c06a894107860c92acdfd2dd8512f000000000000000000000428',\n '0x6abe4e7a497b8293c258389c1b00d177e4f257ed00010000000000000000080d',\n '0x6c8c7fc50247a47038015eb1fd5dc105d05dafba000200000000000000000ba0',\n '0x7079a25dec33be61bbd81b2fb69b468e80d3e72c0000000000000000000009ff',\n '0x71bd10c2a590b5858f5576550c163976a48af906000000000000000000000b27',\n '0x7c82a23b4c48d796dee36a9ca215b641c6a8709d000000000000000000000acd',\n '0x7f4f4942f2a14b6ab7b08b10ada1aacede4ee8d4000200000000000000000b44',\n '0x86aef31951e0a3a54333bd9e72f9a95587d058c5000200000000000000000912',\n '0x882c7a84231484b3e9f3fd45ac04b1eb5d35b076000200000000000000000a91',\n '0x894c82800526e0391e709c0983a5aea3718b7f6d000000000000000000000ac5',\n '0x89b28a9494589b09dbccb69911c189f74fdadc5a000000000000000000000b33',\n '0x89bb15076c9f2d86aa98ec6cffc1a71e31c38953000000000000000000000bf1',\n '0x89f1146fee52b5d9166e9c83cc388b6d8f69f1380001000000000000000009e7',\n '0x8a819a4cabd6efcb4e5504fe8679a1abd831dd8f00000000000000000000042d',\n '0x8b58a1e7fff52001c22386c2918d45938a6a9be30001000000000000000008d9',\n '0x8b8225bfedebaf1708c55743acb4ad43fd4d0f21000200000000000000000918',\n '0x8fbd0f8e490735cfc3abf4f29cbddd5c3289b9a7000000000000000000000b5b',\n '0x8fd39252d683fdb60bddd4df4b53c9380b496d59000200000000000000000b45',\n '0x9321e2250767d79bab5aa06daa8606a2b3b7b4c5000000000000000000000bf4',\n '0x949a12b95ec5b80c375b98963a5d6b33b0d0efff0002000000000000000009fe',\n '0x9a020bdc2faff5bd24c6acc2020d01ff9f2c627a000000000000000000000ae2',\n '0x9cf9358300e34bf9373d30129a1e718d8d058b54000200000000000000000913',\n '0x9e34631547adcf2f8cefa0f5f223955c7b137571000000000000000000000ad5',\n '0xa5a935833f6a5312715f182733eab088452335d7000100000000000000000bee',\n '0xa5fe91dde37d8bf2dacacc0168b115d28ed03f84000000000000000000000b35',\n '0xa8bf1c584519be0184311c48adbdc4c15cb2e8c1000000000000000000000bf6',\n '0xab269164a10fab22bc87c39946da06c870b172d6000000000000000000000bfc',\n '0xac2cae8d2f78a4a8f92f20dbe74042cd0a8d5af3000000000000000000000be2',\n '0xae646817e458c0be890b81e8d880206710e3c44e000000000000000000000acb',\n '0xaef2c171dbe64b0c18977e16e70bfd29d4ee0256000000000000000000000ac8',\n '0xb0c830dceb4ef55a60192472c20c8bf19df03488000000000000000000000be1',\n '0xb266ac3b7c98d7bcb28731dac0ef42dba1b276be000000000000000000000be4',\n '0xb371aa09f5a110ab69b39a84b5469d29f9b22b76000000000000000000000b37',\n '0xb3d658d5b95bf04e2932370dd1ff976fe18dd66a000000000000000000000ace',\n '0xb54b2125b711cd183edd3dd09433439d5396165200000000000000000000075e',\n '0xb59be8f3c85a9dd6e2899103b6fbf6ea405b99a4000000000000000000000b34',\n '0xb878ecce26838fbba4f78cb5b791a0e09152c067000000000000000000000427',\n '0xb973ca96a3f0d61045f53255e319aedb6ed4924000000000000000000000042f',\n '0xbd4e35784c832d0f9049b54cb3609e5907c5b495000100000000000000000b14',\n '0xc55ec796a4debe625d95436a3531f4950b11bdcf000000000000000000000b3e',\n '0xc7e6389e364f4275eb442ef215ed21877028e2af000000000000000000000ac7',\n '0xc83b55bbd005f1f84906545fcdb145dee53523e0000200000000000000000b30',\n '0xcb21a9e647c95127ed784626485b3104cb28d0e7000000000000000000000425',\n '0xd00f9ca46ce0e4a63067c4657986f0167b0de1e5000000000000000000000b42',\n '0xd2f3b9e67c69762dd1c88f1d3dadd1649a190761000200000000000000000bf7',\n '0xd4accb350f9cf59fe3cf7a5ee6ed9ace6a568ea9000200000000000000000b75',\n '0xda1cd1711743e57dd57102e9e61b75f3587703da000000000000000000000acc',\n '0xdae301690004946424e41051ace1791083be42a1000000000000000000000b40',\n '0xde0a77ab6689b980c30306b10f9131a007e1af81000200000000000000000ba1',\n '0xe051605a83deae38d26a7346b100ef1ac2ef8a0b0000000000000000000003ce',\n '0xe1fb90d0d3b47e551d494d7ebe8f209753526b01000000000000000000000ac4',\n '0xe2272cddb2cc408e79e02a73d1db9acc24a843d5000200000000000000000ba7',\n '0xe2dc0e0f2c358d6e31836dee69a558ab8d1390e70000000000000000000009fa',\n '0xe4885ed2818cc9e840a25f94f9b2a28169d1aea7000000000000000000000b29',\n '0xe6909c2f18a29d97217a6146f045e1780606991f000100000000000000000bfe',\n '0xe78b25c06db117fdf8f98583cdaaa6c92b79e917000000000000000000000b2b',\n '0xea11645ac7d8f2def94c9d8d86bd766296c9b6b6000000000000000000000b3a',\n '0xeb480dbbdd921cd6c359e4cc4c65ddea6395e2a1000200000000000000000946',\n '0xed35f28f837e96f81240ebb82e0e3f518c7e8a2f000100000000000000000bb5',\n '0xf0211cceebe6fcc45052b4e57ee95d233f5669d2000100000000000000000c01',\n '0xf22a66046b5307842f21b311ecb4c462c24c0635000000000000000000000b15',\n '0xf28f17be00f8ca3c9b7f66a4aad5513757fb3341000200000000000000000b5a',\n '0xf42ed61450458ee4620f5ef4f29adb25a6ef0fb6000000000000000000000bf8',\n '0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56000000000000000000000445',\n '0xf93579002dbe8046c43fefe86ec78b1112247bb8000000000000000000000759',\n '0xf984eb2b8a7ef780245a797a2fccd82f346409ca000000000000000000000a59',\n '0xfa2c0bd8327c99db5bde4c9e9e5cbf30946351bb000000000000000000000948',\n '0xff4ce5aaab5a627bf82f4a571ab1ce94aa365ea600000000000000000000075a',\n '0x1ac55c31dac78ca943cb8ebfca5945ce09e036e2000000000000000000000024',\n '0x225e0047671939a8d78e08ebd692788abe63f15c000000000000000000000009',\n '0x41211bba6d37f5a74b22e667533f080c7c7f3f1300000000000000000000000b',\n '0x4de21b365d6543661d0e105e579a34b963862497000200000000000000000045',\n '0x581ec1f5e7ced12b186deae32256adb53bdd5b08000000000000000000000001',\n '0x66f33ae36dd80327744207a48122f874634b3ada000100000000000000000013',\n '0xa3ed6f78edc29f69df8a0d16b1d1ccf9871f918c000000000000000000000032',\n '0xa611a551b95b205ccd9490657acf7899daee5db700000000000000000000002e',\n '0xb95829adbacd8af89e291dee78bc09e24de51d6b000000000000000000000043',\n '0xb973ca96a3f0d61045f53255e319aedb6ed49240000200000000000000000011',\n '0xba1a5b19d09a79dada039b1f974015c5a989d5fd000100000000000000000046',\n '0xbb9cd48d33033f5effbedec9dd700c7d7e1dcf5000000000000000000000000e',\n '0xd16f72b02da5f51231fde542a8b9e2777a478c8800000000000000000000000f',\n '0xd4015683b8153666190e0b2bec352580ebc4caca00000000000000000000000d',\n '0xe15cac1df3621e001f76210ab12a7f1a1691481f000000000000000000000044',\n '0xe7f88d7d4ef2eb18fcf9dd7216ba7da1c46f3dd600000000000000000000000a',\n '0xf48f01dcb2cbb3ee1f6aab0e742c2d3941039d56000200000000000000000012',\n '0xfedb19ec000d38d92af4b21436870f115db22725000000000000000000000010',\n '0xffff76a3280e95dc855696111c2562da09db2ac000000000000000000000000c',\n '0x00fcd3d55085e998e291a0005cedecf58ac14c4000020000000000000000047f',\n '0x077794c30afeccdf5ad2abc0588e8cee7197b71a000000000000000000000352',\n '0x117a3d474976274b37b7b94af5dcade5c90c6e85000000000000000000000381',\n '0x11884da90fb4221b3aa288a7741c51ec4fc43b2f000000000000000000000353',\n '0x19b1c92631405a0a9495ccba0becf4f2e8e908bd000000000000000000000410',\n '0x1e550b7764da9638fdd32c8a701364de31f45ee800000000000000000000047c',\n '0x1fa7f727934226aedab636d62a084931b97d366b000000000000000000000411',\n '0x23ca0306b21ea71552b148cf3c4db4fc85ae19290000000000000000000000c9',\n '0x284eb68520c8fa83361c1a3a5910aec7f873c18b000000000000000000000380',\n '0x2a96254ca32020b20ed3506f8f75318da24709f9000200000000000000000456',\n '0x36942963e3b6f37ecc45a4e72349558514233f0000000000000000000000048a',\n '0x3f53a862919ccfa023cb6ace91378a79fb0f6bf500000000000000000000040f',\n '0x40af308e3d07ec769d85eb80afb116525ff4ac99000000000000000000000485',\n '0x418de00ae109e6f874d872658767866d680eaa1900000000000000000000047d',\n '0x45c4d1376943ab28802b995acffc04903eb5223f000000000000000000000470',\n '0x4689122d360c4725d244c5cfea22861333d862e6000100000000000000000468',\n '0x4739e50b59b552d490d3fdc60d200977a38510c0000000000000000000000409',\n '0x49a0e3334496442a9706e481617724e7e37eaa080000000000000000000003ff',\n '0x519cce718fcd11ac09194cff4517f12d263be067000000000000000000000382',\n '0x52cc8389c6b93d740325729cc7c958066cee4262000000000000000000000408',\n '0x567ecfcb22205d279bb8eed3e066989902bf03d5000000000000000000000452',\n '0x585d95df0231fa08aeee35ff0c16b92fd0ecdc3300020000000000000000045f',\n '0x5a7f39435fd9c381e4932fa2047c9a5136a5e3e7000000000000000000000400',\n '0x5bae72b75caab1f260d21bc028c630140607d6e8000000000000000000000350',\n '0x6cb787a419c3e6ee2e9ff365856c29cd10659113000000000000000000000474',\n '0x7c82a23b4c48d796dee36a9ca215b641c6a8709d000000000000000000000406',\n '0x81fc12c60ee5b753cf5fd0adc342dfb5f3817e3200000000000000000000035d',\n '0x894c82800526e0391e709c0983a5aea3718b7f6d00000000000000000000034f',\n '0x970712708a08e8fb152be4d81b2dc586923f5369000200000000000000000479',\n '0x9bf7c3b63c77b4b4f2717776f15a4bec1b532a280000000000000000000000c8',\n '0x9cebf13bb702f253abf1579294694a1edad00eaa000000000000000000000486',\n '0x9e34631547adcf2f8cefa0f5f223955c7b137571000000000000000000000407',\n '0x9fb7d6dcac7b6aa20108bad226c35b85a9e31b63000200000000000000000412',\n '0xa1ea76c42b2938cfa9abea12357881006c52851300000000000000000000048f',\n '0xa50f89e9f439fde2a6fe05883721a00475da3c4500000000000000000000048b',\n '0xa612b6aed2e7ca1a3a4f23fbca9128461bbb7718000000000000000000000274',\n '0xa8af146d79ac0bb981e4e0d8b788ec5711b1d5d000000000000000000000047b',\n '0xad28940024117b442a9efb6d0f25c8b59e1c950b00000000000000000000046f',\n '0xae646817e458c0be890b81e8d880206710e3c44e00000000000000000000039d',\n '0xaef2c171dbe64b0c18977e16e70bfd29d4ee0256000000000000000000000351',\n '0xbbf9d705b75f408cfcaee91da32966124d2c6f7d00000000000000000000047e',\n '0xbd724eb087d4cc0f61a5fed1fffaf937937e14de000000000000000000000473',\n '0xbe0f30217be1e981add883848d0773a86d2d2cd4000000000000000000000471',\n '0xc46be4b8bb6b5a3d3120660efae9c5416318ed40000000000000000000000472',\n '0xc69771058481551261709d8db44977e9afde645000010000000000000000042a',\n '0xc6eee8cb7643ec2f05f46d569e9ec8ef8b41b389000000000000000000000475',\n '0xcba9ff45cfb9ce238afde32b0148eb82cbe635620000000000000000000003fd',\n '0xcf8b555b7754556cf2ac2165e77ee23ed8517d7900020000000000000000045e',\n '0xd0dc20e6342db2de82692b8dc842301ff9121805000200000000000000000454',\n '0xd3d5d45f4edf82ba0dfaf061d230766032a10e07000200000000000000000413',\n '0xd6d20527c7b0669989ee082b9d3a1c63af742290000000000000000000000483',\n '0xda1cd1711743e57dd57102e9e61b75f3587703da0000000000000000000003fc',\n '0xe1fb90d0d3b47e551d494d7ebe8f209753526b0100000000000000000000034e',\n '0xee02583596aee94cccb7e8ccd3921d955f17982a00000000000000000000040a',\n '0xf984eb2b8a7ef780245a797a2fccd82f346409ca00000000000000000000034d',\n '0xff8f84e8c87532af96aef5582ee451572233678b000200000000000000000478',\n '0x054e7b0c73e1ee5aed6864fa511658fc2b54bcaa000000000000000000000015',\n '0x3f1a2c4a3a751f6626bd90ef16e104f0772d4d6b00020000000000000000001b',\n '0x7275c131b1f67e8b53b4691f92b0e35a4c1c6e22000000000000000000000010',\n '0xa154009870e9b6431305f19b09f9cfd7284d4e7a000000000000000000000013',\n '0xa1d14d922a575232066520eda11e27760946c991000000000000000000000012',\n '0xa826a114b0c7db4d1ff4a4be845a78998c64564c000000000000000000000008',\n '0xea67626e1f0b59e0d172a04f5702ef90bcdf440c00000000000000000000000f',\n '0xeb496161099d45b3ea4892408ef745c6182eb56e00000000000000000000000e',\n '0xece571847897fd61e764d455dc15cf1cd9de8d6f000000000000000000000014',\n '0xed3e2f496cbcd8e212192fb8d1499842f04a0d19000000000000000000000009',\n '0x02c9dcb975262719a61f9b40bdf0987ead9add3a000000000000000000000006',\n '0x16c9a4d841e88e52b51936106010f27085a529ec00000000000000000000000c',\n '0x32be2d0ddeaf3333501b24a28668ce373ba8e763000200000000000000000014',\n '0x32f03464fdf909fdf3798f87ff3712b10c59bd86000000000000000000000005',\n '0x4b718e0e2fea1da68b763cd50c446fba03ceb2ea00000000000000000000000b',\n '0x68a69c596b3839023c0e08d09682314f582314e5000200000000000000000011',\n '0x6f34a44fce1506352a171232163e7716dd073ade000200000000000000000015',\n '0x9e2d87f904862671eb49cb358e74284762cc9f42000200000000000000000013',\n '0xac4b72c01072a52b73ca71105504f1372efcce0d000000000000000000000003',\n '0xbfd65c6160cfd638a85c645e6e6d8acac5dac935000000000000000000000004',\n '0xe274c9deb6ed34cfe4130f8d0a8a948dea5bb28600000000000000000000000d',\n];\n","import { TokenPriceService } from '@balancer-labs/sor';\nimport { gql, request } from 'graphql-request';\nimport { Network } from '@/types';\n\nexport class ApiTokenPriceService implements TokenPriceService {\n private chainKey: string;\n\n private balancerApiUrl = 'https://api-v3.balancer.fi/';\n\n private tokenPriceQuery = gql`\n query queryTokenPrices($chainKey: GqlChain!) {\n tokenGetCurrentPrices(chains: [$chainKey]) {\n address\n price\n }\n }\n `;\n\n constructor(private readonly chainId: number) {\n this.chainKey = Network[chainId];\n }\n async getNativeAssetPriceInToken(tokenAddress: string): Promise {\n const { tokenGetCurrentPrices: tokenPrices } = await request(\n this.balancerApiUrl,\n this.tokenPriceQuery,\n {\n chainKey: this.chainKey,\n }\n );\n const tokenPriceUsd = (\n tokenPrices as { address: string; price: number }[]\n ).find(\n ({ address }) => address.toLowerCase() === tokenAddress.toLowerCase()\n );\n if (!tokenPriceUsd) {\n throw new Error('Token Price not found in the API');\n }\n const nativeAssetPriceUsd = (\n tokenPrices as { address: string; price: number }[]\n ).find(\n ({ address }) =>\n address.toLowerCase() ===\n NativeAssetAddress[this.chainKey as keyof typeof NativeAssetAddress]\n );\n if (!nativeAssetPriceUsd) {\n throw new Error('Native Token Price not found in the API');\n }\n const tokenPriceInNativeAsset =\n tokenPriceUsd.price / nativeAssetPriceUsd.price;\n return String(tokenPriceInNativeAsset);\n }\n}\n\nenum NativeAssetAddress {\n MAINNET = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n POLYGON = '0x0000000000000000000000000000000000001010',\n ARBITRUM = '0x912ce59144191c1204e64559fe8253a0e49e6548',\n AVALANCHE = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n BASE = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n FANTOM = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n GNOSIS = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n OPTIMISM = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',\n ZKEVM = '0xa2036f0538221a77a3937f1379699f44945018d0',\n}\n","export function getCoingeckoApiBaseUrl(isDemoApi = true): string {\n if (isDemoApi) {\n return 'https://api.coingecko.com/api/v3/';\n }\n return 'https://pro-api.coingecko.com/api/v3/';\n}\n\nexport function getCoingeckoApiKeyHeaderName(isDemoApi = true): string {\n if (isDemoApi) {\n return 'x-cg-demo-api-key';\n }\n return 'x-cg-pro-api-key';\n}\n","import { TokenPriceService } from '@balancer-labs/sor';\nimport axios from 'axios';\nimport { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { Network, BalancerNetworkConfig, CoingeckoConfig } from '@/types';\nimport {\n getCoingeckoApiBaseUrl,\n getCoingeckoApiKeyHeaderName,\n} from '@/lib/utils/coingecko-api';\n\nexport class CoingeckoTokenPriceService implements TokenPriceService {\n private readonly urlBase: string;\n private readonly apiKey: string;\n private readonly coingeckoApiKeyHeaderName: string;\n constructor(private readonly chainId: number, coingecko: CoingeckoConfig) {\n this.urlBase = `${getCoingeckoApiBaseUrl(\n coingecko?.isDemoApiKey\n )}simple/token_price/${this.platformId}?vs_currencies=${\n this.nativeAssetId\n }`;\n this.coingeckoApiKeyHeaderName = getCoingeckoApiKeyHeaderName(\n coingecko?.isDemoApiKey\n );\n this.apiKey = coingecko.coingeckoApiKey;\n }\n\n public async getNativeAssetPriceInToken(\n tokenAddress: string\n ): Promise {\n const ethPerToken = await this.getTokenPriceInNativeAsset(tokenAddress);\n\n // We get the price of token in terms of ETH\n // We want the price of 1 ETH in terms of the token base units\n return `${1 / parseFloat(ethPerToken)}`;\n }\n\n /**\n * @dev Assumes that the native asset has 18 decimals\n * @param tokenAddress - the address of the token contract\n * @returns the price of 1 ETH in terms of the token base units\n */\n async getTokenPriceInNativeAsset(tokenAddress: string): Promise {\n const endpoint = `${this.urlBase}&contract_addresses=${tokenAddress}`;\n\n const { data } = await axios.get(endpoint, {\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n [this.coingeckoApiKeyHeaderName]: this.apiKey ?? '',\n },\n });\n\n if (\n data[tokenAddress.toLowerCase()] === undefined ||\n data[tokenAddress.toLowerCase()][this.nativeAssetId] === undefined\n ) {\n throw Error('No price returned from Coingecko');\n }\n\n return data[tokenAddress.toLowerCase()][this.nativeAssetId];\n }\n\n private get platformId(): string {\n const networkConfig: BalancerNetworkConfig =\n BALANCER_NETWORK_CONFIG[this.chainId as Network];\n return networkConfig.thirdParty.coingecko.platformId || '2';\n }\n\n private get nativeAssetId(): string {\n const networkConfig: BalancerNetworkConfig =\n BALANCER_NETWORK_CONFIG[this.chainId as Network];\n return networkConfig.thirdParty.coingecko.nativeAssetId || '';\n }\n}\n","import { SOR, SorConfig, TokenPriceService } from '@balancer-labs/sor';\nimport { Provider, JsonRpcProvider } from '@ethersproject/providers';\nimport { SubgraphPoolDataService } from './pool-data/subgraphPoolDataService';\nimport {\n SubgraphClient,\n createSubgraphClient,\n} from '@/modules/subgraph/subgraph';\nimport {\n BalancerNetworkConfig,\n BalancerSdkConfig,\n BalancerSdkSorConfig,\n CoingeckoConfig,\n} from '@/types';\nimport { SubgraphTokenPriceService } from './token-price/subgraphTokenPriceService';\nimport { getNetworkConfig } from '@/modules/sdk.helpers';\nimport { POOLS_TO_IGNORE } from '@/lib/constants/poolsToIgnore';\nimport { ApiTokenPriceService } from '@/modules/sor/token-price/apiTokenPriceService';\nimport { CoingeckoTokenPriceService } from '@/modules/sor/token-price/coingeckoTokenPriceService';\n\nexport class Sor extends SOR {\n constructor(sdkConfig: BalancerSdkConfig) {\n const network = getNetworkConfig(sdkConfig);\n const sorConfig = Sor.getSorConfig(sdkConfig);\n const sorNetworkConfig = Sor.getSorNetworkConfig(network);\n const provider = new JsonRpcProvider(\n sdkConfig.rpcUrl,\n sdkConfig.network as number\n );\n const subgraphClient = createSubgraphClient(network.urls.subgraph);\n\n const poolDataService = Sor.getPoolDataService(\n network,\n sorConfig,\n provider,\n subgraphClient\n );\n\n const tokenPriceService = Sor.getTokenPriceService(\n network,\n sorConfig,\n subgraphClient,\n sdkConfig.coingecko\n );\n\n super(provider, sorNetworkConfig, poolDataService, tokenPriceService);\n }\n\n private static getSorConfig(config: BalancerSdkConfig): BalancerSdkSorConfig {\n return {\n tokenPriceService: 'api',\n poolDataService: 'subgraph',\n fetchOnChainBalances: true,\n ...config.sor,\n };\n }\n\n private static getSorNetworkConfig(\n network: BalancerNetworkConfig\n ): SorConfig {\n return {\n ...network,\n vault: network.addresses.contracts.vault,\n weth: network.addresses.tokens.wrappedNativeAsset,\n lbpRaisingTokens: network.addresses.tokens?.lbpRaisingTokens,\n wETHwstETH: network.pools.wETHwstETH,\n connectingTokens: network.sorConnectingTokens,\n triPathMidPoolIds: network.sorTriPathMidPoolIds,\n };\n }\n\n private static getPoolDataService(\n network: BalancerNetworkConfig,\n sorConfig: BalancerSdkSorConfig,\n provider: Provider,\n subgraphClient: SubgraphClient\n ) {\n // For SOR we want to ignore all configured pools (for Vault/Simulation we don't)\n const allPoolsToIgnore = [\n ...(network.poolsToIgnore ?? []),\n ...POOLS_TO_IGNORE,\n ];\n return typeof sorConfig.poolDataService === 'object'\n ? sorConfig.poolDataService\n : new SubgraphPoolDataService(\n subgraphClient,\n provider,\n { ...network, poolsToIgnore: allPoolsToIgnore },\n sorConfig\n );\n }\n\n private static getTokenPriceService(\n network: BalancerNetworkConfig,\n sorConfig: BalancerSdkSorConfig,\n subgraphClient: SubgraphClient,\n coingeckoConfig?: CoingeckoConfig\n ): TokenPriceService {\n if (sorConfig.tokenPriceService === 'coingecko' && coingeckoConfig) {\n return new CoingeckoTokenPriceService(network.chainId, coingeckoConfig);\n }\n if (typeof sorConfig.tokenPriceService === 'object') {\n return sorConfig.tokenPriceService;\n } else if (sorConfig.tokenPriceService === 'subgraph') {\n return new SubgraphTokenPriceService(\n subgraphClient,\n network.addresses.tokens.wrappedNativeAsset\n );\n }\n return new ApiTokenPriceService(network.chainId);\n }\n}\n","import {\n QuerySimpleFlashSwapParameters,\n QuerySimpleFlashSwapResponse,\n SimpleFlashSwapParameters,\n SwapType,\n} from '../types';\nimport { queryBatchSwap } from '../queryBatchSwap';\nimport { BatchSwap } from '../types';\nimport { sum } from 'lodash';\n\nfunction checkSimpleFlashSwapParams(params: {\n poolIds: string[];\n assets: string[];\n}) {\n if (params.poolIds.length > 2) {\n throw new Error('Simple flash swap only supports a maximum of two pools');\n }\n\n if (params.assets.length > 2) {\n throw new Error(\n 'Simple flash swap only supports a maximum of to two assets (tokens)'\n );\n }\n}\n\nfunction createSwaps(\n poolIds: SimpleFlashSwapParameters['poolIds'],\n amount: string\n): BatchSwap['swaps'] {\n return [\n {\n poolId: poolIds[0],\n assetInIndex: 0,\n assetOutIndex: 1,\n amount,\n userData: '0x',\n },\n {\n poolId: poolIds[1],\n assetInIndex: 1,\n assetOutIndex: 0,\n amount: '0',\n userData: '0x',\n },\n ];\n}\n\nexport function convertSimpleFlashSwapToBatchSwapParameters({\n poolIds,\n assets,\n flashLoanAmount,\n walletAddress,\n}: SimpleFlashSwapParameters & {\n walletAddress: string;\n}): BatchSwap {\n checkSimpleFlashSwapParams({ poolIds, assets });\n\n const swaps = createSwaps(poolIds, flashLoanAmount);\n\n const funds = {\n sender: walletAddress,\n fromInternalBalance: false,\n recipient: walletAddress,\n toInternalBalance: false,\n };\n\n const limits = ['0', '0'];\n\n const deadline = '999999999999999999';\n\n return {\n kind: SwapType.SwapExactIn,\n swaps,\n assets,\n funds,\n limits,\n deadline,\n };\n}\n\nfunction deltaToExpectedProfit(delta: string) {\n return Number(delta) * -1;\n}\n\nfunction calcProfit(profits: string[]) {\n return sum(profits);\n}\n\n/**\n * Simple interface to test if a simple flash swap is valid and see potential profits.\n *\n * A \"simple\" flash swap is an arbitrage executed with only two tokens and two pools,\n * swapping in the first pool and then back in the second pool for a profit. For more\n * complex flash swaps, you will have to use the batch swap method.\n *\n * Learn more: A [Flash Swap](https://dev.balancer.fi/resources/swaps/flash-swaps).\n *\n * _NB: This method doesn't execute a flashSwap\n *\n * @param {SimpleFlashSwapParameters} params - BatchSwap information used for query.\n * @param {Contract} params.vaultContract - the ethersjs contract for the Balancer Vault.\n * @param {string} params.flashLoanAmount - initial input amount for the flash loan (first asset)\n * @param {string[]} params.poolIds - array of Balancer pool ids\n * @param {string[]} params.assets - array of token addresses\n * @returns {Promise} Returns an ethersjs transaction response\n */\nexport async function querySimpleFlashSwap(\n params: QuerySimpleFlashSwapParameters\n): Promise {\n checkSimpleFlashSwapParams(params);\n\n const [tokenAddress0, tokenAddress1] = params.assets;\n\n try {\n const deltas = await queryBatchSwap(\n params.vaultContract,\n SwapType.SwapExactIn,\n createSwaps(params.poolIds, params.flashLoanAmount),\n params.assets\n );\n\n const profits = {\n [tokenAddress0]: deltaToExpectedProfit(deltas[0]).toString(),\n [tokenAddress1]: deltaToExpectedProfit(deltas[1]).toString(),\n };\n\n return {\n profits,\n isProfitable:\n calcProfit([profits[tokenAddress0], profits[tokenAddress1]]) > 0,\n };\n } catch (err) {\n throw `Failed to querySimpleFlashSwap: ${err}`;\n }\n}\n","import { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { JsonFragment } from '@ethersproject/abi';\nimport { networkAddresses } from '@/lib/constants/config';\nimport { BatchRelayerLibrary__factory } from '@/contracts';\n\n/**\n * Maps SOR data to get the tokenIn used in swaps.\n * Logic related to a relayer wrapping and unwrapping tokens.\n * SOR returns list of already wrapped tokenAddresses used in the swap.\n * However tokenIn defined as an input is the unwrapped token.\n * Note: tokenAddresses are transformed in SOR lib wrapInfo.setWrappedInfo\n * TODO: Once PR is merged, this table can be removed.\n */\ntype WrappedList = {\n [key: string]: string;\n};\n\nconst underlyingToWrappedMap: WrappedList = {\n // stETH => wstETH\n '0xae7ab96520de3a18e5e111b5eaab095312d7fe84':\n '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',\n\n // AMPL => WAMPL\n '0xd46ba6d942050d489dbd938a2c909a5d5039a161':\n '0xedb171c18ce90b633db442f2a6f72874093b49ef',\n\n // aAMPL -> ubAAMPL\n '0x1e6bb68acec8fefbd87d192be09bb274170a0548':\n '0xF03387d8d0FF326ab586A58E0ab4121d106147DF',\n};\n\n/**\n * Vault swaps are operating on wrapped tokens. When user is sending an unwrapped token, it's wrapped in a relayer.\n * SOR is returning an array of tokens already wrapped.\n * Converts tokenIn to match tokenIn used in a swap.\n *\n * TODO: add tokenIn and tokenOut addressed used for swap in the SOR results as tokenInForSwap, tokenOutForSwap\n *\n * @param token token address\n * @returns wrapped token address\n */\nfunction tokenForSwaps(token: string): string {\n let wrapped = token;\n // eslint-disable-next-line no-prototype-builtins\n if (underlyingToWrappedMap.hasOwnProperty(token)) {\n wrapped = underlyingToWrappedMap[token as keyof WrappedList];\n }\n return wrapped;\n}\n\nexport enum Relayers {\n vault = 1,\n lido = 2,\n}\n\nexport interface SwapRelayer {\n id: Relayers;\n address: string;\n}\n\n/**\n * Resolves a contract address for sending swap transaction to.\n * Balancer is using relayers to automatically wrap / unwrap tokens not compatibile with ERC20.\n */\nfunction relayerResolver(\n assetIn: string,\n assetOut: string,\n chainId: number\n): SwapRelayer {\n const { tokens, contracts } = networkAddresses(chainId);\n\n let to = {\n id: Relayers.vault,\n address: contracts.vault,\n };\n\n if (tokens.stETH && contracts.lidoRelayer)\n if ([assetIn, assetOut].includes(tokens.stETH))\n to = {\n id: Relayers.lido,\n address: contracts.lidoRelayer,\n };\n\n return to;\n}\n\nfunction swapFragment(relayer: SwapRelayer): JsonFragment[] {\n if (relayer.id === Relayers.lido)\n return BatchRelayerLibrary__factory.abi.filter(\n (f) =>\n f.type === 'function' &&\n f.name &&\n ['swap', 'batchSwap'].includes(f.name)\n );\n else\n return Vault__factory.abi.filter(\n (f) =>\n f.type === 'function' &&\n f.name &&\n ['swap', 'batchSwap'].includes(f.name)\n );\n}\n\nfunction batchSwapFragment(\n assetIn: string,\n assetOut: string,\n chainId: number\n): JsonFragment[] {\n const { tokens, contracts } = networkAddresses(chainId);\n if (tokens.stETH && contracts.lidoRelayer) {\n if ([assetIn, assetOut].includes(tokens.stETH)) {\n const relayerSignaturesForSwaps = BatchRelayerLibrary__factory.abi.filter(\n (f) => f.type === 'function' && f.name === 'batchSwap'\n );\n return relayerSignaturesForSwaps;\n }\n }\n const vaultSignaturesForSwaps = Vault__factory.abi.filter(\n (f) => f.type === 'function' && f.name === 'batchSwap'\n );\n return vaultSignaturesForSwaps;\n}\n\nexport { tokenForSwaps, relayerResolver, swapFragment, batchSwapFragment };\n","import { SwapInfo } from '@balancer-labs/sor';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { tokenForSwaps } from './swap_utils';\nimport { SwapType } from '../types';\n\ninterface AmountForLimit {\n amount: BigNumber;\n max: (slippage: number) => BigNumber;\n min: (slippage: number) => BigNumber;\n}\n\ninterface SDKSwapInfo extends SwapInfo {\n /** Name mapping to improve readability. */\n amountIn: BigNumber;\n amountOut: BigNumber;\n /** Name mapping for amounts used specifically for limits calculations. */\n amountInForLimits: AmountForLimit;\n amountOutForLimits: AmountForLimit;\n /** Wrapped token addresses used in the swap. */\n tokenInForSwaps: string;\n tokenOutFromSwaps: string;\n}\n\n/** Applies slippage to a number */\nfunction amountForLimit(amount: BigNumber): AmountForLimit {\n return {\n amount,\n max: (maxSlippage: number): BigNumber => {\n return amount.mul(1e4 + maxSlippage).div(1e4);\n },\n min: (maxSlippage: number): BigNumber => {\n return amount.mul(1e4 - maxSlippage).div(1e4);\n },\n };\n}\n\nfunction decorateSorSwapInfo(\n swapInfo: SwapInfo,\n swapType: SwapType\n): SDKSwapInfo {\n const amountIn =\n swapType === SwapType.SwapExactIn\n ? swapInfo.swapAmount\n : swapInfo.returnAmount;\n const amountOut =\n swapType === SwapType.SwapExactIn\n ? swapInfo.returnAmount\n : swapInfo.swapAmount;\n const amountInForLimits =\n swapType === SwapType.SwapExactIn\n ? swapInfo.swapAmountForSwaps || swapInfo.swapAmount\n : swapInfo.returnAmountFromSwaps || swapInfo.returnAmount;\n const amountOutForLimits =\n swapType === SwapType.SwapExactIn\n ? swapInfo.returnAmountFromSwaps || swapInfo.returnAmount\n : swapInfo.swapAmountForSwaps || swapInfo.swapAmount;\n const tokenInForSwaps = tokenForSwaps(swapInfo.tokenIn);\n const tokenOutFromSwaps = tokenForSwaps(swapInfo.tokenOut);\n\n return {\n ...swapInfo,\n amountIn,\n amountOut,\n amountInForLimits: amountForLimit(amountInForLimits),\n amountOutForLimits: amountForLimit(amountOutForLimits),\n tokenInForSwaps,\n tokenOutFromSwaps,\n };\n}\n\nexport { SDKSwapInfo, tokenForSwaps, decorateSorSwapInfo };\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { FundManagement, SingleSwap, Swap, SwapType } from '../types';\nimport { Interface, JsonFragment } from '@ethersproject/abi';\nimport { SwapInfo } from '@balancer-labs/sor';\nimport { SDKSwapInfo, decorateSorSwapInfo } from './swap_info_decorator';\nimport { AddressZero } from '@ethersproject/constants';\nimport { swapFragment, relayerResolver, SwapRelayer } from './swap_utils';\n\nclass SingleSwapBuilder {\n private swapInfo: SDKSwapInfo;\n funds?: FundManagement;\n limit?: BigNumberish;\n deadline?: string;\n relayer: SwapRelayer;\n readonly functionName = 'swap';\n\n /**\n * Building swap transaction data\n *\n * @param swapInfo SOR result\n * @param kind\n * @param chainId used to resolve relayer addresses\n */\n constructor(\n swapInfo: SwapInfo,\n private readonly kind: SwapType,\n private readonly chainId: number\n ) {\n this.swapInfo = decorateSorSwapInfo(swapInfo, kind);\n this.relayer = relayerResolver(\n this.swapInfo.tokenIn,\n this.swapInfo.tokenOut,\n this.chainId\n );\n }\n\n setFunds(sender: string, recipient?: string): void {\n this.funds = {\n sender,\n recipient: recipient || sender,\n fromInternalBalance: false,\n toInternalBalance: false,\n };\n }\n\n /**\n * @param deadline block timestamp\n */\n setDeadline(deadline: string): void {\n this.deadline = deadline;\n }\n\n get amount(): BigNumber {\n return this.kind === SwapType.SwapExactOut\n ? this.swapInfo.amountOutForLimits.amount\n : this.swapInfo.amountInForLimits.amount;\n }\n\n /**\n * Calculates the limit for token amount.\n * https://dev.balancer.fi/guides/swaps/single-swaps\n * https://dev.balancer.fi/resources/swaps/single-swap\n *\n * For swap:\n * The meaning of limit depends on the value of kind\n * GIVEN_IN: The minimum amount of tokens we would accept to receive from the swap.\n * GIVEN_OUT: The maximum amount of tokens we would be sending to swap.\n *\n * @param maxSlippage [bps], eg: 1 === 0.01%, 100 === 1%\n */\n setLimits(maxSlippage: number): void {\n this.limit =\n this.kind === SwapType.SwapExactIn\n ? this.swapInfo.amountOutForLimits.min(maxSlippage).toString()\n : this.swapInfo.amountInForLimits.max(maxSlippage).toString();\n }\n\n get singleSwap(): SingleSwap {\n const poolId = this.swapInfo.swaps[0].poolId;\n const kind = this.kind;\n const assetIn = this.swapInfo.tokenInForSwaps;\n const assetOut = this.swapInfo.tokenOutFromSwaps;\n const amount = this.amount.toString();\n const userData = '0x';\n\n return {\n poolId,\n kind,\n assetIn,\n assetOut,\n amount,\n userData,\n };\n }\n\n attributes(): Swap {\n if (!this.funds || !this.limit || !this.deadline) {\n throw new Error('Uninitialized arguments');\n }\n\n // TODO: Raise errors when some parameters are missing\n let attrs: Swap = {\n request: this.singleSwap,\n funds: this.funds,\n limit: this.limit,\n deadline: this.deadline,\n };\n\n // TODO: Call this logic from a relayer module maybe? Do we actually need to do that?\n // additional parameters on a contract:\n // https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/standalone-utils/contracts/relayer/VaultActions.sol#L44\n const fragment = this.fragment();\n if (fragment[0].inputs && fragment[0].inputs?.length > 4) {\n attrs = {\n ...attrs,\n value: '0',\n outputReference: '0',\n };\n }\n\n return attrs;\n }\n\n data(): string {\n const contractInterface = new Interface(this.fragment());\n\n return contractInterface.encodeFunctionData(\n 'swap',\n Object.values(this.attributes())\n );\n }\n\n value(maxSlippage: number): BigNumber {\n let amount = BigNumber.from(0);\n if (this.swapInfo.tokenIn === AddressZero)\n amount =\n this.kind === SwapType.SwapExactIn\n ? this.swapInfo.amountIn\n : this.swapInfo.amountInForLimits.max(maxSlippage);\n return amount;\n }\n\n to(): string {\n return this.relayer.address;\n }\n\n private fragment(): JsonFragment[] {\n return swapFragment(this.relayer).filter(\n (f) => f.name === this.functionName\n );\n }\n}\n\nexport { SingleSwapBuilder };\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { BatchSwap, FundManagement, SwapType } from '../types';\nimport { Interface, JsonFragment } from '@ethersproject/abi';\nimport { SwapInfo } from '@balancer-labs/sor';\nimport { SDKSwapInfo, decorateSorSwapInfo } from './swap_info_decorator';\nimport { AddressZero } from '@ethersproject/constants';\nimport { swapFragment, relayerResolver, SwapRelayer } from './swap_utils';\n\nclass BatchSwapBuilder {\n private swapInfo: SDKSwapInfo;\n funds?: FundManagement;\n limits?: BigNumberish[];\n deadline?: string;\n relayer: SwapRelayer;\n readonly functionName = 'batchSwap';\n\n /**\n * Building swap transaction data\n *\n * @param swapInfo SOR result\n * @param kind\n */\n constructor(\n swapInfo: SwapInfo,\n private readonly kind: SwapType,\n private readonly chainId: number\n ) {\n this.swapInfo = decorateSorSwapInfo(swapInfo, kind);\n this.relayer = relayerResolver(\n this.swapInfo.tokenIn,\n this.swapInfo.tokenOut,\n this.chainId\n );\n }\n\n setFunds(sender: string, recipient?: string): void {\n this.funds = {\n sender,\n recipient: recipient || sender,\n fromInternalBalance: false,\n toInternalBalance: false,\n };\n }\n\n /**\n * @param deadline block timestamp\n */\n setDeadline(deadline: string): void {\n this.deadline = deadline;\n }\n\n /**\n * Given IN it's the minimum amount we are willing to accept.\n * Given OUT it's the fixed amount defined as output.\n */\n minAmountOut(maxSlippage: number): BigNumber {\n return this.kind === SwapType.SwapExactIn\n ? this.swapInfo.amountOutForLimits.min(maxSlippage)\n : this.swapInfo.amountOutForLimits.amount;\n }\n\n /**\n * Given IN it's the fixed amount we define as input.\n * Given OUT it's the maximum amount we are willing to pay for the request.\n */\n maxAmountIn(maxSlippage: number): BigNumber {\n return this.kind === SwapType.SwapExactOut\n ? this.swapInfo.amountInForLimits.max(maxSlippage)\n : this.swapInfo.amountInForLimits.amount;\n }\n\n /**\n * Calculates limits for token amount.\n * Maximum number of tokens to send is a positive number\n * Minimum amount of tokens to receive is a negative number\n * https://dev.balancer.fi/guides/swaps/batch-swaps\n * https://dev.balancer.fi/resources/swaps/batch-swaps#multi-hop-examples\n *\n * For batchSwap:\n * An array of of the maximum net amounts of each asset which can be taken to perform the swap.\n * Should the total trade require more than limits[i] tokens to be taken from sender for any i\n * then the transaction shall fail.\n *\n * @param maxSlippage [bps], eg: 1 === 0.01%, 100 === 1%\n */\n setLimits(maxSlippage: number): void {\n // TODO: This implementation handles only a single input. We might want to extend it for multiple token inputs\n this.limits = this.swapInfo.tokenAddresses\n .map((token) => {\n let amount = BigNumber.from(0);\n if (token === this.swapInfo.tokenInForSwaps) {\n amount = this.maxAmountIn(maxSlippage);\n }\n if (token === this.swapInfo.tokenOutFromSwaps) {\n amount = this.minAmountOut(maxSlippage).mul(-1);\n }\n return amount;\n })\n .map((limit) => limit.toString().split('.')[0]);\n }\n\n attributes(): BatchSwap {\n // TODO: Raise errors when some parameters are missing\n if (!this.funds || !this.limits || !this.deadline) {\n throw new Error('Uninitialized arguments');\n }\n\n let attrs: BatchSwap = {\n kind: this.kind,\n swaps: this.swapInfo.swaps,\n assets: this.swapInfo.tokenAddresses,\n funds: this.funds,\n limits: this.limits,\n deadline: this.deadline,\n };\n\n const fragment = this.fragment();\n\n // TODO: Call this logic from a relayer module maybe? Do we actually need to do that?\n // additional parameters on a contract:\n // https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/standalone-utils/contracts/relayer/VaultActions.sol#L67\n if (fragment[0].inputs && fragment[0].inputs?.length > 6) {\n attrs = {\n ...attrs,\n value: '0',\n outputReferences: [],\n };\n }\n\n return attrs;\n }\n\n data(): string {\n const contractInterface = new Interface(this.fragment());\n\n return contractInterface.encodeFunctionData(\n 'batchSwap',\n Object.values(this.attributes())\n );\n }\n\n value(maxSlippage: number): BigNumber {\n let amount = BigNumber.from(0);\n if (this.swapInfo.tokenIn === AddressZero)\n amount = this.maxAmountIn(maxSlippage);\n return amount;\n }\n\n to(): string {\n return this.relayer.address;\n }\n\n private fragment(): JsonFragment[] {\n return swapFragment(this.relayer).filter(\n (f) => f.name === this.functionName\n );\n }\n}\n\nexport { BatchSwapBuilder };\n","import { SOR, SubgraphPoolBase, SwapInfo, SwapTypes } from '@balancer-labs/sor';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { Vault } from '@/contracts/Vault';\nimport {\n BatchSwap,\n QuerySimpleFlashSwapParameters,\n QuerySimpleFlashSwapResponse,\n SimpleFlashSwapParameters,\n FindRouteParameters,\n BuildTransactionParameters,\n SwapAttributes,\n SwapType,\n TokenAmounts,\n SwapsOptions,\n} from './types';\nimport { queryBatchSwap, getSorSwapInfo } from './queryBatchSwap';\nimport { balancerVault } from '@/lib/constants/config';\nimport { getLimitsForSlippage } from './helpers';\nimport { BalancerSdkConfig } from '@/types';\nimport { SwapInput } from './types';\nimport { Sor } from '@/modules/sor/sor.module';\nimport {\n convertSimpleFlashSwapToBatchSwapParameters,\n querySimpleFlashSwap,\n} from './flashSwap';\nimport {\n SingleSwapBuilder,\n BatchSwapBuilder,\n} from '@/modules/swaps/swap_builder';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport { GraphQLArgs } from '@/lib/graphql';\n\nconst buildRouteDefaultOptions = {\n maxPools: 4,\n gasPrice: '1',\n deadline: '999999999999999999',\n maxSlippage: 10, // in bspt, eg: 10 = 0.1%\n};\n\nexport class Swaps {\n readonly sor: SOR;\n chainId: number;\n vaultContract: Vault;\n\n // TODO: sorOrConfig - let's make it more predictable and always pass configuration explicitly\n constructor(sorOrConfig: SOR | BalancerSdkConfig) {\n if (sorOrConfig instanceof SOR) {\n this.sor = sorOrConfig;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.chainId = (this.sor.provider)['_network']['chainId'];\n } else {\n this.sor = new Sor(sorOrConfig);\n if (typeof sorOrConfig.network === 'number')\n this.chainId = sorOrConfig.network as number;\n else this.chainId = sorOrConfig.network.chainId;\n }\n\n this.vaultContract = Vault__factory.connect(\n balancerVault,\n this.sor.provider\n );\n }\n\n static getLimitsForSlippage(\n tokensIn: string[],\n tokensOut: string[],\n swapType: SwapType,\n deltas: string[],\n assets: string[],\n slippage: string\n ): string[] {\n // TO DO - Check best way to do this?\n const limits = getLimitsForSlippage(\n tokensIn,\n tokensOut,\n swapType,\n deltas,\n assets,\n slippage\n );\n\n return limits.map((l) => l.toString());\n }\n\n /**\n * Uses SOR to find optimal route for a trading pair and amount\n *\n * @param FindRouteParameters\n * @param FindRouteParameters.tokenIn Address\n * @param FindRouteParameters.tokenOut Address\n * @param FindRouteParameters.amount BigNumber with a trade amount\n * @param FindRouteParameters.gasPrice BigNumber current gas price\n * @param FindRouteParameters.maxPools number of pool included in path, default 4\n * @returns Best trade route information\n */\n async findRouteGivenIn({\n tokenIn,\n tokenOut,\n amount,\n gasPrice,\n maxPools = 4,\n }: FindRouteParameters): Promise {\n return this.sor.getSwaps(tokenIn, tokenOut, SwapTypes.SwapExactIn, amount, {\n gasPrice,\n maxPools,\n });\n }\n\n /**\n * Uses SOR to find optimal route for a trading pair and amount\n *\n * @param FindRouteParameters\n * @param FindRouteParameters.tokenIn Address\n * @param FindRouteParameters.tokenOut Address\n * @param FindRouteParameters.amount BigNumber with a trade amount\n * @param FindRouteParameters.gasPrice BigNumber current gas price\n * @param FindRouteParameters.maxPools number of pool included in path, default 4\n * @returns Best trade route information\n */\n async findRouteGivenOut({\n tokenIn,\n tokenOut,\n amount,\n gasPrice,\n maxPools = 4,\n }: FindRouteParameters): Promise {\n return this.sor.getSwaps(\n tokenIn,\n tokenOut,\n SwapTypes.SwapExactOut,\n amount,\n {\n gasPrice,\n maxPools,\n }\n );\n }\n\n /**\n * Uses SOR to find optimal route for a trading pair and amount\n *\n * @param BuildTransactionParameters\n * @param BuildTransactionParameters.userAddress Address\n * @param BuildTransactionParameters.swapInfo result of route finding\n * @param BuildTransactionParameters.kind 0 - givenIn, 1 - givenOut\n * @param BuildTransactionParameters.deadline block linux timestamp as string\n * @param BuildTransactionParameters.maxSlippage [bps], eg: 1 === 0.01%, 100 === 1%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n buildSwap({\n userAddress,\n recipient,\n swapInfo,\n kind,\n deadline,\n maxSlippage,\n }: BuildTransactionParameters): SwapAttributes {\n if (!this.chainId) throw 'Missing network configuration';\n\n // one vs batch (gas cost optimisation when using single swap)\n const builder =\n swapInfo.swaps.length > 1\n ? new BatchSwapBuilder(swapInfo, kind, this.chainId)\n : new SingleSwapBuilder(swapInfo, kind, this.chainId);\n builder.setFunds(userAddress, recipient);\n builder.setDeadline(deadline);\n builder.setLimits(maxSlippage);\n\n const to = builder.to();\n const { functionName } = builder;\n const attributes = builder.attributes();\n const data = builder.data();\n const value = builder.value(maxSlippage);\n\n return { to, functionName, attributes, data, value };\n }\n\n /**\n * Uses SOR to find optimal route for a trading pair and amount\n * and builds a transaction request\n *\n * @param sender Sender of the swap\n * @param recipient Reciever of the swap\n * @param tokenIn Address of tokenIn\n * @param tokenOut Address of tokenOut\n * @param amount Amount of tokenIn to swap as a string with 18 decimals precision\n * @param options\n * @param options.maxPools number of pool included in path\n * @param options.gasPrice BigNumber current gas price\n * @param options.deadline BigNumber block timestamp\n * @param options.maxSlippage [bps], eg: 1 === 0.01%, 100 === 1%\n * @returns transaction request ready to send with signer.sendTransaction\n */\n async buildRouteExactIn(\n sender: string,\n recipient: string,\n tokenIn: string,\n tokenOut: string,\n amount: string,\n options: SwapsOptions = buildRouteDefaultOptions\n ): Promise {\n const opts = {\n ...buildRouteDefaultOptions,\n ...options,\n };\n\n const swapInfo = await this.findRouteGivenIn({\n tokenIn,\n tokenOut,\n amount: BigNumber.from(amount),\n gasPrice: BigNumber.from(opts.gasPrice),\n maxPools: opts.maxPools,\n });\n\n const tx = this.buildSwap({\n userAddress: sender, // sender account\n recipient, // recipient account\n swapInfo, // result from the previous step\n kind: SwapType.SwapExactIn, // or SwapExactOut\n deadline: opts.deadline, // BigNumber block timestamp\n maxSlippage: opts.maxSlippage, // [bps], eg: 1 == 0.01%, 100 == 1%\n });\n\n // TODO: add query support\n // query will be a function that returns the deltas for the swap in { [address: string]: string } format\n // const query = this.queryBatchSwap(tx);\n\n return tx;\n }\n\n /**\n * Encode batchSwap in an ABI byte string\n *\n * [See method for a batchSwap](https://dev.balancer.fi/references/contracts/apis/the-vault#batch-swaps).\n *\n * _NB: This method doesn't execute a batchSwap -- it returns an [ABI byte string](https://docs.soliditylang.org/en/latest/abi-spec.html)\n * containing the data of the function call on a contract, which can then be sent to the network to be executed.\n * (ex. [sendTransaction](https://web3js.readthedocs.io/en/v1.2.11/web3-eth.html#sendtransaction)).\n *\n * @param {BatchSwap} batchSwap - BatchSwap information used for query.\n * @param {SwapType} batchSwap.kind - either exactIn or exactOut\n * @param {BatchSwapSteps[]} batchSwap.swaps - sequence of swaps\n * @param {string[]} batchSwap.assets - array contains the addresses of all assets involved in the swaps\n * @param {FundManagement} batchSwap.funds - object containing information about where funds should be taken/sent\n * @param {number[]} batchSwap.limits - limits for each token involved in the swap, where either the maximum number of tokens to send (by passing a positive value) or the minimum amount of tokens to receive (by passing a negative value) is specified\n * @param {string} batchSwap.deadline - time (in Unix timestamp) after which it will no longer attempt to make a trade\n * @returns {string} encodedBatchSwapData - Returns an ABI byte string containing the data of the function call on a contract\n */\n static encodeBatchSwap(batchSwap: BatchSwap): string {\n const vaultInterface = Vault__factory.createInterface();\n\n return vaultInterface.encodeFunctionData('batchSwap', [\n batchSwap.kind,\n batchSwap.swaps,\n batchSwap.assets,\n batchSwap.funds,\n batchSwap.limits,\n batchSwap.deadline,\n ]);\n }\n\n /**\n * Encode simple flash swap into a ABI byte string\n *\n * A \"simple\" flash swap is an arbitrage executed with only two tokens and two pools,\n * swapping in the first pool and then back in the second pool for a profit. For more\n * complex flash swaps, you will have to use the batch swap method.\n *\n * Learn more: A [Flash Swap](https://dev.balancer.fi/resources/swaps/flash-swaps).\n *\n * @param {SimpleFlashSwapParameters} params - BatchSwap information used for query.\n * @param {string} params.flashLoanAmount - initial input amount for the flash loan (first asset)\n * @param {string[]} params.poolIds - array of Balancer pool ids\n * @param {string[]} params.assets - array of token addresses\n * @param {string} params.walletAddress - array of token addresses\n * @returns {string} encodedBatchSwapData - Returns an ABI byte string containing the data of the function call on a contract\n */\n static encodeSimpleFlashSwap(params: SimpleFlashSwapParameters): string {\n return this.encodeBatchSwap(\n convertSimpleFlashSwapToBatchSwapParameters(params)\n );\n }\n\n /**\n * fetchPools saves updated pools data to SOR internal onChainBalanceCache.\n *\n * @returns Boolean indicating whether pools data was fetched correctly (true) or not (false).\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async fetchPools(queryArgs?: GraphQLArgs): Promise {\n return this.sor.fetchPools(queryArgs);\n }\n\n public getPools(): SubgraphPoolBase[] {\n return this.sor.getPools();\n }\n\n /**\n * queryBatchSwap simulates a call to `batchSwap`, returning an array of Vault asset deltas.\n * @param batchSwap - BatchSwap information used for query.\n * @param {SwapType} batchSwap.kind - either exactIn or exactOut.\n * @param {BatchSwapStep[]} batchSwap.swaps - sequence of swaps.\n * @param {string[]} batchSwap.assets - array contains the addresses of all assets involved in the swaps.\n * @returns {Promise} Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the\n * Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at\n * the same index in the `assets` array.\n */\n async queryBatchSwap(\n batchSwap: Pick\n ): Promise {\n return await queryBatchSwap(\n this.vaultContract,\n batchSwap.kind,\n batchSwap.swaps,\n batchSwap.assets\n );\n }\n\n /**\n * Simple interface to test if a simple flash swap is valid and see potential profits.\n *\n * A \"simple\" flash swap is an arbitrage executed with only two tokens and two pools,\n * swapping in the first pool and then back in the second pool for a profit. For more\n * complex flash swaps, you will have to use the batch swap method.\n *\n * Learn more: A [Flash Swap](https://dev.balancer.fi/resources/swaps/flash-swaps).\n *\n * _NB: This method doesn't execute a flashSwap\n *\n * @param {SimpleFlashSwapParameters} params - BatchSwap information used for query.\n * @param {string} params.flashLoanAmount - initial input amount for the flash loan (first asset)\n * @param {string[]} params.poolIds - array of Balancer pool ids\n * @param {string[]} params.assets - array of token addresses\n * @returns {Promise<{profits: Record, isProfitable: boolean}>} Returns an ethersjs transaction response\n */\n async querySimpleFlashSwap(\n params: Omit\n ): Promise {\n return await querySimpleFlashSwap({\n ...params,\n vaultContract: this.vaultContract,\n });\n }\n\n /**\n * Use SOR to get swapInfo for tokenIn<>tokenOut.\n * @param {SwapInput} swapInput - Swap information used for querying using SOR.\n * @param {string} swapInput.tokenIn - Addresse of asset in.\n * @param {string} swapInput.tokenOut - Addresse of asset out.\n * @param {SwapType} swapInput.swapType - Type of Swap, ExactIn/Out.\n * @param {string} swapInput.amount - Amount used in swap.\n * @returns {Promise} SOR swap info.\n */\n async getSorSwap(swapInput: SwapInput): Promise {\n return await getSorSwapInfo(\n swapInput.tokenIn,\n swapInput.tokenOut,\n swapInput.swapType,\n swapInput.amount,\n this.sor\n );\n }\n\n async queryExactIn(swap: SwapInfo): Promise {\n const deltas = await this.query(swap, SwapType.SwapExactIn);\n return this.assetDeltas(deltas.map(String), swap.tokenAddresses);\n }\n\n async queryExactOut(swap: SwapInfo): Promise {\n const deltas = await this.query(swap, SwapType.SwapExactOut);\n return this.assetDeltas(deltas.map(String), swap.tokenAddresses);\n }\n\n private query(swap: SwapInfo, kind: SwapType): Promise {\n const { swaps, tokenAddresses: assets } = swap;\n\n const funds = {\n sender: AddressZero,\n recipient: AddressZero,\n fromInternalBalance: false,\n toInternalBalance: false,\n };\n\n return this.vaultContract.callStatic.queryBatchSwap(\n kind,\n swaps,\n assets,\n funds\n );\n }\n\n private assetDeltas(deltas: string[], assets: string[]): TokenAmounts {\n return Object.fromEntries(deltas.map((delta, idx) => [assets[idx], delta]));\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\n\nimport { ExitPoolRequest, JoinPoolRequest } from '@/types';\nimport { SwapType, BatchSwapStep, FundManagement } from '@/modules/swaps/types';\n\nexport enum PoolKind {\n WEIGHTED = 0,\n LEGACY_STABLE,\n COMPOSABLE_STABLE,\n COMPOSABLE_STABLE_V2,\n}\n\nexport type OutputReference = {\n index: number;\n key: BigNumber;\n};\n\nexport interface EncodeBatchSwapInput {\n swapType: SwapType;\n swaps: BatchSwapStep[];\n assets: string[];\n funds: FundManagement;\n limits: string[];\n deadline: BigNumberish;\n value: BigNumberish;\n outputReferences: OutputReference[];\n}\n\nexport interface EncodeExitPoolInput {\n poolId: string;\n poolKind: number;\n sender: string;\n recipient: string;\n outputReferences: OutputReference[];\n exitPoolRequest: ExitPoolRequest;\n}\n\nexport interface EncodeJoinPoolInput {\n poolId: string;\n kind: number;\n sender: string;\n recipient: string;\n joinPoolRequest: JoinPoolRequest;\n value: BigNumberish;\n outputReference: string;\n}\n\nexport interface EncodeWrapAaveDynamicTokenInput {\n staticToken: string;\n sender: string;\n recipient: string;\n amount: BigNumberish;\n fromUnderlying: boolean;\n outputReference: BigNumberish;\n}\n\nexport interface EncodeUnwrapAaveStaticTokenInput {\n staticToken: string;\n sender: string;\n recipient: string;\n amount: BigNumberish;\n toUnderlying: boolean;\n outputReference: BigNumberish;\n}\n\nexport interface EncodeUnwrapInput {\n wrappedToken: string;\n sender: string;\n recipient: string;\n amount: BigNumberish;\n outputReference: BigNumberish;\n}\n\nexport interface EncodeUnwrapWstETHInput {\n sender: string;\n recipient: string;\n amount: BigNumberish;\n outputReference: BigNumberish;\n}\n\nexport type ExitPoolData = ExitPoolRequest & EncodeExitPoolInput;\nexport type JoinPoolData = JoinPoolRequest & EncodeJoinPoolInput;\n","import { JsonRpcSigner } from '@ethersproject/providers';\nimport { BigNumberish, BigNumber } from '@ethersproject/bignumber';\nimport { MaxUint256 } from '@ethersproject/constants';\nimport { BatchRelayerLibrary__factory } from '@/contracts';\nimport { IVault, Vault } from '@/contracts/Vault';\nimport {\n EncodeBatchSwapInput,\n EncodeExitPoolInput,\n EncodeJoinPoolInput,\n EncodeUnwrapAaveStaticTokenInput,\n EncodeUnwrapInput,\n EncodeUnwrapWstETHInput,\n EncodeWrapAaveDynamicTokenInput,\n ExitPoolData,\n JoinPoolData,\n} from './types';\nimport { ExitPoolRequest, JoinPoolRequest } from '@/types';\nimport { Swap } from '../swaps/types';\nimport { RelayerAuthorization } from '@/lib/utils';\nimport FundManagementStruct = IVault.FundManagementStruct;\nimport SingleSwapStruct = IVault.SingleSwapStruct;\n\nexport * from './types';\n\nconst relayerLibrary = BatchRelayerLibrary__factory.createInterface();\n\nexport class Relayer {\n static CHAINED_REFERENCE_TEMP_PREFIX = 'ba10'; // Temporary reference: it is deleted after a read.\n static CHAINED_REFERENCE_READONLY_PREFIX = 'ba11'; // Read-only reference: it is not deleted after a read.\n\n static encodeApproveVault(tokenAddress: string, maxAmount: string): string {\n return relayerLibrary.encodeFunctionData('approveVault', [\n tokenAddress,\n maxAmount,\n ]);\n }\n\n static encodeSetRelayerApproval(\n relayerAdress: string,\n approved: boolean,\n authorisation: string\n ): string {\n return relayerLibrary.encodeFunctionData('setRelayerApproval', [\n relayerAdress,\n approved,\n authorisation,\n ]);\n }\n\n static encodeGaugeWithdraw(\n gaugeAddress: string,\n sender: string,\n recipient: string,\n amount: string\n ): string {\n return relayerLibrary.encodeFunctionData('gaugeWithdraw', [\n gaugeAddress,\n sender,\n recipient,\n amount,\n ]);\n }\n\n static encodeGaugeDeposit(\n gaugeAddress: string,\n sender: string,\n recipient: string,\n amount: string\n ): string {\n return relayerLibrary.encodeFunctionData('gaugeDeposit', [\n gaugeAddress,\n sender,\n recipient,\n amount,\n ]);\n }\n\n static encodeSwap(params: Swap): string {\n return relayerLibrary.encodeFunctionData('swap', [\n params.request as SingleSwapStruct,\n params.funds as FundManagementStruct,\n params.limit,\n params.deadline as BigNumberish,\n params.value as BigNumberish,\n params.outputReference as BigNumberish,\n ]);\n }\n\n static encodeBatchSwap(params: EncodeBatchSwapInput): string {\n return relayerLibrary.encodeFunctionData('batchSwap', [\n params.swapType,\n params.swaps,\n params.assets,\n params.funds,\n params.limits,\n params.deadline,\n params.value,\n params.outputReferences,\n ]);\n }\n\n static encodeExitPool(params: EncodeExitPoolInput): string {\n return relayerLibrary.encodeFunctionData('exitPool', [\n params.poolId,\n params.poolKind,\n params.sender,\n params.recipient,\n params.exitPoolRequest,\n params.outputReferences,\n ]);\n }\n\n static encodeJoinPool(params: EncodeJoinPoolInput): string {\n return relayerLibrary.encodeFunctionData('joinPool', [\n params.poolId,\n params.kind,\n params.sender,\n params.recipient,\n params.joinPoolRequest,\n params.value,\n params.outputReference,\n ]);\n }\n\n static encodeWrapAaveDynamicToken(\n params: EncodeWrapAaveDynamicTokenInput\n ): string {\n return relayerLibrary.encodeFunctionData('wrapAaveDynamicToken', [\n params.staticToken,\n params.sender,\n params.recipient,\n params.amount,\n params.fromUnderlying,\n params.outputReference,\n ]);\n }\n\n static encodeUnwrapAaveStaticToken(\n params: EncodeUnwrapAaveStaticTokenInput\n ): string {\n return relayerLibrary.encodeFunctionData('unwrapAaveStaticToken', [\n params.staticToken,\n params.sender,\n params.recipient,\n params.amount,\n params.toUnderlying,\n params.outputReference,\n ]);\n }\n\n static encodeUnwrapWstETH(params: EncodeUnwrapWstETHInput): string {\n return relayerLibrary.encodeFunctionData('unwrapWstETH', [\n params.sender,\n params.recipient,\n params.amount,\n params.outputReference,\n ]);\n }\n\n static encodeUnwrap(\n params: EncodeUnwrapInput,\n linearPoolType: string\n ): string {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let unwrapType: any;\n\n /**\n * Other unwrap types available on BatchRelayerLibrary that does not seem to\n * have a respective Linear pool type in the SDK:\n * - unwrapUnbuttonToken\n * - unwrapWstETH\n */\n\n switch (linearPoolType) {\n case 'AaveLinear':\n return this.encodeUnwrapAaveStaticToken({\n staticToken: params.wrappedToken,\n sender: params.sender,\n recipient: params.recipient,\n amount: params.amount,\n toUnderlying: true,\n outputReference: params.outputReference,\n });\n case 'BeefyLinear':\n case 'ERC4626Linear':\n unwrapType = 'unwrapERC4626';\n break;\n case 'EulerLinear':\n unwrapType = 'unwrapEuler';\n break;\n case 'GearboxLinear':\n unwrapType = 'unwrapGearbox';\n break;\n case 'ReaperLinear':\n unwrapType = 'unwrapReaperVaultToken';\n break;\n case 'TetuLinear':\n unwrapType = 'unwrapTetu';\n break;\n case 'YearnLinear':\n unwrapType = 'unwrapYearn';\n break;\n case 'MidasLinear':\n unwrapType = 'unwrapCompoundV2';\n break;\n case 'SiloLinear':\n unwrapType = 'unwrapShareToken';\n break;\n default:\n throw new Error(\n 'Unwrapping not supported for this pool type: ' + linearPoolType\n );\n }\n\n return relayerLibrary.encodeFunctionData(unwrapType, [\n params.wrappedToken,\n params.sender,\n params.recipient,\n params.amount,\n params.outputReference,\n ]);\n }\n\n static encodePeekChainedReferenceValue(reference: BigNumberish): string {\n return relayerLibrary.encodeFunctionData('peekChainedReferenceValue', [\n reference,\n ]);\n }\n\n static toChainedReference(key: BigNumberish, isTemporary = true): BigNumber {\n const prefix = isTemporary\n ? Relayer.CHAINED_REFERENCE_TEMP_PREFIX\n : Relayer.CHAINED_REFERENCE_READONLY_PREFIX;\n // The full padded prefix is 66 characters long, with 64 hex characters and the 0x prefix.\n const paddedPrefix = `0x${prefix}${'0'.repeat(64 - prefix.length)}`;\n return BigNumber.from(paddedPrefix).add(key);\n }\n\n static fromChainedReference(ref: string, isTemporary = true): BigNumber {\n const prefix = isTemporary\n ? Relayer.CHAINED_REFERENCE_TEMP_PREFIX\n : Relayer.CHAINED_REFERENCE_READONLY_PREFIX;\n // The full padded prefix is 66 characters long, with 64 hex characters and the 0x prefix.\n const paddedPrefix = `0x${prefix}${'0'.repeat(64 - prefix.length)}`;\n return BigNumber.from(ref).sub(BigNumber.from(paddedPrefix));\n }\n\n /**\n * Returns true if `amount` is not actually an amount, but rather a chained reference.\n */\n static isChainedReference(amount: string): boolean {\n const amountBn = BigNumber.from(amount);\n const mask = BigNumber.from(\n '0xfff0000000000000000000000000000000000000000000000000000000000000'\n );\n const readonly =\n '0xba10000000000000000000000000000000000000000000000000000000000000';\n const check = amountBn.toBigInt() & mask.toBigInt();\n return readonly === BigNumber.from(check)._hex.toString();\n }\n\n static formatExitPoolInput(params: ExitPoolData): EncodeExitPoolInput {\n const {\n assets,\n minAmountsOut,\n userData,\n toInternalBalance,\n poolId,\n poolKind,\n sender,\n recipient,\n outputReferences,\n } = params;\n\n const exitPoolRequest: ExitPoolRequest = {\n assets,\n minAmountsOut,\n userData,\n toInternalBalance,\n };\n\n const exitPoolInput: EncodeExitPoolInput = {\n poolId,\n poolKind,\n sender,\n recipient,\n outputReferences,\n exitPoolRequest,\n };\n return exitPoolInput;\n }\n\n static formatJoinPoolInput(params: JoinPoolData): EncodeJoinPoolInput {\n const {\n assets,\n maxAmountsIn,\n userData,\n fromInternalBalance,\n poolId,\n kind,\n sender,\n recipient,\n value,\n outputReference,\n } = params;\n\n const joinPoolRequest: JoinPoolRequest = {\n assets,\n maxAmountsIn,\n userData,\n fromInternalBalance,\n };\n\n const joinPoolInput: EncodeJoinPoolInput = {\n poolId,\n kind,\n sender,\n recipient,\n value,\n outputReference,\n joinPoolRequest,\n };\n\n return joinPoolInput;\n }\n\n static signRelayerApproval = async (\n relayerAddress: string,\n signerAddress: string,\n signer: JsonRpcSigner,\n vault: Vault\n ): Promise => {\n const approval = vault.interface.encodeFunctionData('setRelayerApproval', [\n signerAddress,\n relayerAddress,\n true,\n ]);\n\n const signature =\n await RelayerAuthorization.signSetRelayerApprovalAuthorization(\n vault,\n signer,\n relayerAddress,\n approval\n );\n\n const calldata = RelayerAuthorization.encodeCalldataAuthorization(\n '0x',\n MaxUint256,\n signature\n );\n\n return calldata;\n };\n}\n","import { BalancerSdkConfig } from '@/types';\nimport { GraphQLClient } from 'graphql-request';\nimport { getNetworkConfig } from '../sdk.helpers';\nimport { getSdk } from './generated/balancer-subgraph-types';\nimport { SubgraphClient } from './subgraph';\n\nexport class Subgraph {\n public readonly url: string;\n public readonly client: SubgraphClient;\n\n constructor(config: BalancerSdkConfig) {\n this.url = getNetworkConfig(config).urls.subgraph;\n this.client = this.initClient();\n }\n\n private initClient(): SubgraphClient {\n const client = new GraphQLClient(this.url);\n return getSdk(client);\n }\n}\n","import { Swaps } from '@/modules/swaps/swaps.module';\nimport { BalancerSdkConfig } from '@/types';\nimport {\n SubgraphPoolBase,\n ZERO,\n parseToPoolsDict,\n getSpotPriceAfterSwapForPath,\n} from '@balancer-labs/sor';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\n\nexport class Pricing {\n private readonly swaps: Swaps;\n\n constructor(config: BalancerSdkConfig, swaps?: Swaps) {\n if (swaps) {\n this.swaps = swaps;\n } else {\n this.swaps = new Swaps(config);\n }\n }\n\n /**\n * Retrieves pools using poolDataService.\n * @returns {boolean} Boolean indicating whether pools data was fetched correctly (true) or not (false).\n */\n async fetchPools(): Promise {\n return this.swaps.fetchPools();\n }\n\n /**\n * Get currently saved pools list (fetched using fetchPools()).\n * @returns {SubgraphPoolBase[]} pools list.\n */\n public getPools(): SubgraphPoolBase[] {\n return this.swaps.getPools();\n }\n\n /**\n * Calculates Spot Price for a token pair - finds most liquid path and uses this as reference SP.\n * @param { string } tokenIn Token in address.\n * @param { string } tokenOut Token out address.\n * @param { SubgraphPoolBase[] } pools Optional - Pool data. Will be fetched via dataProvider if not supplied.\n * @returns { string } Spot price.\n */\n async getSpotPrice(\n tokenIn: string,\n tokenOut: string,\n pools: SubgraphPoolBase[] = []\n ): Promise {\n // If pools list isn't supplied fetch it from swaps data provider\n if (pools.length === 0) {\n await this.fetchPools();\n pools = this.getPools();\n }\n\n // We find the path for the pair with the highest liquidity and use this as the ref SP\n const poolsDict = parseToPoolsDict(pools, 0);\n // This creates all paths for tokenIn>Out ordered by liquidity\n const paths = this.swaps.sor.routeProposer.getCandidatePathsFromDict(\n tokenIn,\n tokenOut,\n 0,\n poolsDict,\n 4\n );\n\n if (paths.length === 0)\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_PAIR);\n return getSpotPriceAfterSwapForPath(paths[0], 0, ZERO).toString();\n }\n}\n","import { Contract } from '@ethersproject/contracts';\nimport { Provider } from '@ethersproject/providers';\nimport { Signer } from '@ethersproject/abstract-signer';\n\nconst abi = [\n 'function getPoolId() view returns (bytes32)',\n 'function getSwapFeePercentage() view returns (uint256)',\n 'function getProtocolFeesCollector() view returns (address)',\n 'function inRecoveryMode() view returns (bool)',\n];\n\nexport const BasePool = (\n address: string,\n signerOrProvider: Signer | Provider\n): Contract => new Contract(address, abi, signerOrProvider);\n","import { set } from 'lodash';\nimport { Fragment, JsonFragment, Interface, Result } from '@ethersproject/abi';\nimport { CallOverrides } from '@ethersproject/contracts';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { Multicall } from '@/contracts';\n\nexport class Multicaller {\n private interface: Interface;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private calls: [string, string, any][] = [];\n private paths: string[] = [];\n\n constructor(\n private multicall: Multicall,\n abi: string | Array,\n private options: CallOverrides = {}\n ) {\n this.interface = new Interface(abi);\n }\n\n call(\n path: string,\n address: string,\n functionName: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n params?: any[]\n ): Multicaller {\n this.calls.push([address, functionName, params]);\n this.paths.push(path);\n return this;\n }\n\n async execute(\n from: Record = {}\n ): Promise> {\n const obj = from;\n const results = await this.executeMulticall();\n results.forEach((result, i) =>\n set(obj, this.paths[i], result.length > 1 ? result : result[0])\n );\n this.calls = [];\n this.paths = [];\n return obj;\n }\n\n private async executeMulticall(): Promise {\n const [, res] = await this.multicall.callStatic.aggregate(\n this.calls.map(([address, functionName, params]) => ({\n target: address,\n callData: this.interface.encodeFunctionData(functionName, params),\n })),\n this.options\n );\n\n return res.map((result: BytesLike, i: number) =>\n this.interface.decodeFunctionResult(this.calls[i][1], result)\n );\n }\n}\n","export const oneSecondInMs = 1000;\nexport const twentyFourHoursInSecs = 24 * 60 * 60;\n\nexport function toJsTimestamp(unixTimestamp: number): number {\n return unixTimestamp * oneSecondInMs;\n}\n\nexport function toUnixTimestamp(jsTimestamp: number): number {\n return Math.round(jsTimestamp / oneSecondInMs);\n}\n\nexport function isLessThan24Hours(incomingDateInSec: number): boolean {\n const now = Math.round(Date.now() / 1000);\n const difference = now - incomingDateInSec;\n\n return difference < twentyFourHoursInSecs;\n}\n","import { JsonFragment } from '@ethersproject/abi';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { formatUnits } from '@ethersproject/units';\nimport { Multicall, VeBal__factory } from '@/contracts';\nimport { Multicaller } from '@/lib/utils/multiCaller';\nimport { toJsTimestamp } from '@/lib/utils/time';\n\nexport type VeBalLockInfo = {\n lockedEndDate: number;\n lockedAmount: string;\n totalSupply: string;\n epoch: string;\n hasExistingLock: boolean;\n isExpired: boolean;\n};\n\ntype VeBalLockInfoResult = {\n locked: BigNumber[];\n epoch: BigNumber;\n totalSupply: BigNumber;\n};\n\nexport class VeBal {\n constructor(private veBalAddress: string, private multicall: Multicall) {}\n\n public async getLockInfo(\n account: string\n ): Promise {\n if (!this.veBalAddress) throw new Error('veBal address must be defined');\n\n const multicaller = new Multicaller(this.multicall, [\n ...(VeBal__factory.abi as readonly JsonFragment[]),\n ]);\n\n multicaller.call('locked', this.veBalAddress, 'locked', [account]);\n multicaller.call('epoch', this.veBalAddress, 'epoch');\n multicaller.call('totalSupply', this.veBalAddress, 'totalSupply()');\n\n const result = await multicaller.execute();\n\n return this.formatLockInfo(result);\n }\n\n public formatLockInfo(lockInfo: VeBalLockInfoResult): VeBalLockInfo {\n const [lockedAmount, lockedEndDate] = lockInfo.locked;\n\n const hasExistingLock = lockedAmount.gt(0);\n const lockedEndDateNormalised = toJsTimestamp(lockedEndDate.toNumber());\n const isExpired = hasExistingLock && Date.now() > lockedEndDateNormalised;\n\n return {\n lockedEndDate: lockedEndDateNormalised,\n lockedAmount: formatUnits(lockedAmount),\n totalSupply: formatUnits(lockInfo.totalSupply),\n epoch: formatUnits(lockInfo.epoch, 0),\n hasExistingLock,\n isExpired,\n };\n }\n}\n","import { Provider } from '@ethersproject/providers';\nimport { Contract } from '@ethersproject/contracts';\nimport { formatUnits } from '@ethersproject/units';\n\nimport { VeDelegationProxy__factory } from '@/contracts';\nimport { ContractAddresses } from '@/types';\n\nexport class VeBalProxy {\n instance: Contract;\n\n constructor(addresses: ContractAddresses, provider: Provider) {\n if (!addresses.veBalProxy)\n throw new Error('veBalProxy address must be defined');\n this.instance = VeDelegationProxy__factory.connect(\n addresses.veBalProxy,\n provider\n );\n }\n\n async getAdjustedBalance(account: string): Promise {\n const balance = await this.instance.adjustedBalanceOf(account);\n return formatUnits(balance);\n }\n}\n","import { Contract } from '@ethersproject/contracts';\nimport { Provider } from '@ethersproject/providers';\nimport { Signer } from '@ethersproject/abstract-signer';\n\nimport { BasePool } from './implementations/base-pool';\nimport { VeBal } from './implementations/veBAL';\nimport { VeBalProxy } from './implementations/veBAL-proxy';\nimport {\n AaveLinearPoolFactory,\n AaveLinearPoolFactory__factory,\n BalancerHelpers,\n BalancerHelpers__factory,\n BalancerRelayer__factory,\n ComposableStablePoolFactory,\n ComposableStablePoolFactory__factory,\n ERC20,\n ERC20__factory,\n ERC4626LinearPoolFactory,\n ERC4626LinearPoolFactory__factory,\n EulerLinearPoolFactory,\n EulerLinearPoolFactory__factory,\n GaugeClaimHelper,\n GaugeClaimHelper__factory,\n GearboxLinearPoolFactory,\n GearboxLinearPoolFactory__factory,\n GyroConfig,\n GyroConfig__factory,\n LidoRelayer,\n LidoRelayer__factory,\n LiquidityGaugeV5__factory,\n Multicall,\n Multicall__factory,\n Vault,\n Vault__factory,\n WeightedPoolFactory,\n WeightedPoolFactory__factory,\n YearnLinearPoolFactory,\n YearnLinearPoolFactory__factory,\n} from '@/contracts';\nimport { Network } from '@/lib/constants/network';\nimport { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { ContractAddresses } from '@/types';\n\ntype ContractFactory = (\n address: string,\n signerOrProvider: Signer | Provider\n) => Contract;\n\nexport interface ContractInstances {\n aaveLinearPoolFactory?: AaveLinearPoolFactory;\n balancerHelpers: BalancerHelpers;\n BasePool: ContractFactory;\n composableStablePoolFactory?: ComposableStablePoolFactory;\n ERC20: ContractFactory;\n erc4626LinearPoolFactory?: ERC4626LinearPoolFactory;\n eulerLinearPoolFactory?: EulerLinearPoolFactory;\n gaugeClaimHelper?: GaugeClaimHelper;\n gearboxLinearPoolFactory?: GearboxLinearPoolFactory;\n gyroConfig?: GyroConfig;\n lidoRelayer?: LidoRelayer;\n liquidityGauge: ContractFactory;\n multicall: Multicall;\n relayer: Contract;\n vault: Vault;\n veBal?: VeBal;\n veBalProxy?: VeBalProxy;\n weightedPoolFactory?: WeightedPoolFactory;\n yearnLinearPoolFactory?: YearnLinearPoolFactory;\n}\n\nexport class Contracts {\n contractAddresses: ContractAddresses;\n private instances: ContractInstances;\n\n /**\n * Create instances of Balancer contracts connected to passed provider.\n * @param { Network | ContractAddresses } networkOrAddresses\n * @param { Provider } provider\n */\n constructor(\n networkOrAddresses: Network | ContractAddresses,\n provider: Provider\n ) {\n // Access addresses using passed network if available\n if (typeof networkOrAddresses === 'number') {\n this.contractAddresses =\n BALANCER_NETWORK_CONFIG[networkOrAddresses].addresses.contracts;\n } else {\n this.contractAddresses = networkOrAddresses;\n }\n\n const vault: Vault = Vault__factory.connect(\n this.contractAddresses.vault,\n provider\n );\n const balancerHelpers: BalancerHelpers = BalancerHelpers__factory.connect(\n this.contractAddresses.balancerHelpers,\n provider\n );\n let lidoRelayer: undefined | LidoRelayer;\n if (this.contractAddresses.lidoRelayer)\n lidoRelayer = LidoRelayer__factory.connect(\n this.contractAddresses.lidoRelayer,\n provider\n );\n\n const multicall: Multicall = Multicall__factory.connect(\n this.contractAddresses.multicall,\n provider\n );\n const relayer = BalancerRelayer__factory.connect(\n this.contractAddresses.balancerRelayer,\n provider\n );\n let veBal: undefined | VeBal;\n if (this.contractAddresses.veBal) {\n veBal = new VeBal(this.contractAddresses.veBal, multicall);\n }\n let veBalProxy: undefined | VeBalProxy;\n if (this.contractAddresses.veBalProxy) {\n veBalProxy = new VeBalProxy(this.contractAddresses, provider);\n }\n let gaugeClaimHelper: undefined | GaugeClaimHelper;\n if (this.contractAddresses.gaugeClaimHelper)\n gaugeClaimHelper = GaugeClaimHelper__factory.connect(\n this.contractAddresses.gaugeClaimHelper,\n provider\n );\n let composableStablePoolFactory: undefined | ComposableStablePoolFactory;\n if (this.contractAddresses.composableStablePoolFactory) {\n composableStablePoolFactory =\n ComposableStablePoolFactory__factory.connect(\n this.contractAddresses.composableStablePoolFactory,\n provider\n );\n }\n let weightedPoolFactory: undefined | WeightedPoolFactory;\n if (this.contractAddresses.weightedPoolFactory) {\n weightedPoolFactory = WeightedPoolFactory__factory.connect(\n this.contractAddresses.weightedPoolFactory,\n provider\n );\n }\n let aaveLinearPoolFactory: undefined | AaveLinearPoolFactory;\n if (this.contractAddresses.aaveLinearPoolFactory) {\n aaveLinearPoolFactory = AaveLinearPoolFactory__factory.connect(\n this.contractAddresses.aaveLinearPoolFactory,\n provider\n );\n }\n let erc4626LinearPoolFactory: undefined | ERC4626LinearPoolFactory;\n if (this.contractAddresses.erc4626LinearPoolFactory) {\n erc4626LinearPoolFactory = ERC4626LinearPoolFactory__factory.connect(\n this.contractAddresses.erc4626LinearPoolFactory,\n provider\n );\n }\n let eulerLinearPoolFactory: undefined | EulerLinearPoolFactory;\n if (this.contractAddresses.eulerLinearPoolFactory) {\n eulerLinearPoolFactory = EulerLinearPoolFactory__factory.connect(\n this.contractAddresses.eulerLinearPoolFactory,\n provider\n );\n }\n let gearboxLinearPoolFactory: undefined | GearboxLinearPoolFactory;\n if (this.contractAddresses.gearboxLinearPoolFactory) {\n gearboxLinearPoolFactory = GearboxLinearPoolFactory__factory.connect(\n this.contractAddresses.gearboxLinearPoolFactory,\n provider\n );\n }\n let yearnLinearPoolFactory: undefined | YearnLinearPoolFactory;\n if (this.contractAddresses.yearnLinearPoolFactory) {\n yearnLinearPoolFactory = YearnLinearPoolFactory__factory.connect(\n this.contractAddresses.yearnLinearPoolFactory,\n provider\n );\n }\n let gyroConfig: undefined | GyroConfig;\n if (this.contractAddresses.gyroConfigProxy) {\n gyroConfig = GyroConfig__factory.connect(\n this.contractAddresses.gyroConfigProxy,\n provider\n );\n }\n\n this.instances = {\n aaveLinearPoolFactory,\n balancerHelpers,\n BasePool: this.getBasePool,\n composableStablePoolFactory,\n ERC20: this.getErc20,\n erc4626LinearPoolFactory,\n eulerLinearPoolFactory,\n gaugeClaimHelper,\n gearboxLinearPoolFactory,\n gyroConfig,\n liquidityGauge: this.getLiquidityGauge,\n lidoRelayer,\n multicall,\n relayer,\n veBal,\n veBalProxy,\n weightedPoolFactory,\n yearnLinearPoolFactory,\n vault,\n };\n }\n\n /**\n * Expose contract instances.\n */\n get contracts(): ContractInstances {\n return this.instances;\n }\n\n /**\n * Helper to create ERC20 contract.\n * @param { string } address ERC20 address.\n * @param { Signer | Provider } signerOrProvider Signer or Provider.\n * @returns Contract.\n */\n getErc20(address: string, signerOrProvider: Signer | Provider): ERC20 {\n return ERC20__factory.connect(address, signerOrProvider);\n }\n\n /**\n * Helper to create base pool contract.\n * @param { string } address pool address.\n * @param { Signer | Provider } signerOrProvider Signer or Provider.\n * @returns Contract.\n */\n getBasePool(address: string, signerOrProvider: Signer | Provider): Contract {\n return BasePool(address, signerOrProvider);\n }\n\n /**\n * Helper to create LiquidityGauge contract.\n * @param { string } address Gauge address.\n * @param { Signer | Provider} signerOrProvider Signer or Provider.\n * @returns Contract.\n */\n getLiquidityGauge = LiquidityGaugeV5__factory.connect;\n}\n","/**\n * Calculate the Impermanent Loss for a given pool and user.\n *\n * 1. Prepare the data:\n * a. get exit price for pools' tokens\n * b. get entry price for pools' tokens\n * 2. calculate delta values for tokens in pools\n * 3. calculate and return the impermanent loss as percentage rounded to 2 decimal places.\n *\n */\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Findable, Pool, PoolToken, Price } from '@/types';\nimport { Logger } from '@/lib/utils/logger';\n\ntype Asset = {\n priceDelta: number;\n weight: number;\n};\n\ntype TokenPrices = {\n [key: string]: number;\n};\n\nexport class ImpermanentLossService {\n constructor(\n private tokenPrices: Findable,\n private tokenHistoricalPrices: Findable\n ) {}\n\n /**\n * entry point to calculate impermanent loss.\n *\n * The function will\n * - retrieve the tokens' historical value at the desired time in the future\n * - calculate the relative variation between current and historical value\n * - return the IL in percentage rounded to 2 decimal places\n *\n * @param timestamp UNIX timestamp from which the IL is desired\n * @param pool the pool\n * @returns the impermanent loss as percentage rounded to 2 decimal places\n */\n async calcImpLoss(timestamp: number, pool: Pool): Promise {\n if (timestamp * 1000 >= Date.now()) {\n console.error(\n `[ImpermanentLossService][calcImpLoss]Error: ${BalancerError.getMessage(\n BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE\n )}`\n );\n throw new BalancerError(BalancerErrorCode.TIMESTAMP_IN_THE_FUTURE);\n }\n const assets = await this.prepareData(timestamp, pool);\n\n const poolValueDelta = this.getPoolValueDelta(assets);\n const holdValueDelta = this.getHoldValueDelta(assets);\n\n const impLoss = this.calculateImpermanentLoss(\n poolValueDelta,\n holdValueDelta\n );\n return impLoss;\n }\n\n calculateImpermanentLoss(\n poolValueDelta: number,\n holdValueDelta: number\n ): number {\n return (\n Math.floor(Math.abs(poolValueDelta / holdValueDelta - 1) * 100 * 100) /\n 100\n );\n }\n\n getPoolValueDelta(assets: Asset[]): number {\n return assets.reduce(\n (result, asset) =>\n result * Math.pow(Math.abs(asset.priceDelta + 1), asset.weight),\n 1\n );\n }\n\n getHoldValueDelta(assets: Asset[]): number {\n return assets.reduce(\n (result, asset) => result + Math.abs(asset.priceDelta + 1) * asset.weight,\n 0\n );\n }\n\n /**\n * prepare the data for calculating the impermanent loss\n *\n * @param entryTimestamp UNIX timestamp from which the IL is desired\n * @param pool the pool\n * @returns a list of pair weight/price delta for each token in the pool\n * @throws BalancerError if\n * 1. a token's price is unknown\n * 2. a token's weight is unknown\n * 3. the user has no liquidity invested in the pool\n */\n async prepareData(entryTimestamp: number, pool: Pool): Promise {\n const poolTokens = pool.tokens.filter(\n (token) => token.address !== pool.address\n );\n\n const weights = this.getWeights(poolTokens);\n\n const tokenAddresses = poolTokens.map((t) => t.address);\n\n const entryPrices = await this.getEntryPrices(\n entryTimestamp,\n tokenAddresses\n );\n const exitPrices: TokenPrices = await this.getExitPrices(poolTokens);\n\n return this.getAssets(poolTokens, exitPrices, entryPrices, weights);\n }\n\n getAssets(\n poolTokens: PoolToken[],\n exitPrices: TokenPrices,\n entryPrices: TokenPrices,\n weights: number[]\n ): Asset[] {\n return poolTokens.map((token, i) => ({\n priceDelta: this.getDelta(\n entryPrices[token.address],\n exitPrices[token.address]\n ),\n weight: weights[i],\n }));\n }\n\n getDelta(entryPrice: number, exitPrice: number): number {\n if (entryPrice === 0) {\n console.error(\n `[ImpermanentLossService][getDelta]Error: ${BalancerError.getMessage(\n BalancerErrorCode.ILLEGAL_PARAMETER\n )}: entry price is 0`\n );\n throw new BalancerError(BalancerErrorCode.ILLEGAL_PARAMETER);\n }\n return (exitPrice - entryPrice) / entryPrice;\n }\n\n /**\n * returns the list of token's weights.\n *\n * @param poolTokens the pools' tokens\n * @returns the list of token's weights\n * @throws BalancerError if a token's weight is missing\n *\n */\n getWeights(poolTokens: PoolToken[]): number[] {\n const noWeights = poolTokens.every((token) => !token.weight);\n const uniformWeight = Math.round((1 / poolTokens.length) * 100) / 100;\n const weights: number[] = noWeights\n ? poolTokens.map(() => uniformWeight) // if no weight is returned we assume the tokens are balanced uniformly in the pool\n : poolTokens.map((token) => Number(token.weight ?? 0));\n\n if (weights.some((w) => w === 0)) {\n console.error(\n `[ImpermanentLossService][getWeights]Error: ${BalancerError.getMessage(\n BalancerErrorCode.MISSING_WEIGHT\n )}`\n );\n throw new BalancerError(BalancerErrorCode.MISSING_WEIGHT);\n }\n return weights;\n }\n\n /**\n * get the current's tokens' prices\n * @param tokens the pools' tokens\n * @returns a list of tokens with prices\n */\n async getExitPrices(tokens: PoolToken[]): Promise {\n const prices = await Promise.all(\n tokens.map((token) => this.tokenPrices.find(token.address))\n ).catch(() => []);\n\n if (!prices.length || prices.some((price) => price?.usd === undefined)) {\n console.error(\n `[ImpermanentLossService][getExitPrices]Error: ${BalancerError.getMessage(\n BalancerErrorCode.MISSING_PRICE_RATE\n )}`\n );\n throw new BalancerError(BalancerErrorCode.MISSING_PRICE_RATE);\n }\n\n const tokensWithPrice = tokens.map((token, i) => ({\n ...token,\n price: prices[i],\n }));\n\n const tokenPrices: TokenPrices = {};\n for (const token of tokensWithPrice) {\n if (token.price?.usd) tokenPrices[token.address] = +token.price.usd; // price.usd is never undefined but JS complains\n }\n return tokenPrices;\n }\n\n /**\n * get the tokens' price at a given time\n *\n * @param timestamp the Unix timestamp\n * @param tokenAddresses the tokens' addresses\n * @returns a map of tokens' price\n */\n async getEntryPrices(\n timestamp: number,\n tokenAddresses: string[]\n ): Promise {\n const prices: TokenPrices = {};\n for (const address of tokenAddresses) {\n const price = await this.tokenHistoricalPrices\n .findBy(address, timestamp)\n .catch((reason) => {\n const logger = Logger.getInstance();\n logger.warn(\n `[ImpermanentLossService][getEntryPrices]Error: ${reason.message}`\n );\n return undefined;\n });\n if (!price?.usd) {\n const logger = Logger.getInstance();\n logger.warn(\n `[ImpermanentLossService][getEntryPrices]Error: ${BalancerError.getMessage(\n BalancerErrorCode.MISSING_PRICE_RATE\n )}`\n );\n throw new BalancerError(BalancerErrorCode.MISSING_PRICE_RATE);\n }\n prices[address] = +price.usd;\n }\n return prices;\n }\n}\n","/**\n * Weekly Bal emissions are fixed / year according to:\n * https://docs.google.com/spreadsheets/d/1FY0gi596YWBOTeu_mrxhWcdF74SwKMNhmu0qJVgs0KI/edit#gid=0\n *\n * Using regular numbers for simplicity assuming frontend use only.\n *\n * Calculation source\n * https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/liquidity-mining/contracts/BalancerTokenAdmin.sol\n */\n\nexport const INITIAL_RATE = 145000;\nexport const START_EPOCH_TIME = 1648465251;\nconst RATE_REDUCTION_TIME = 365 * 86400;\nconst RATE_REDUCTION_COEFFICIENT = 2 ** (1 / 4);\n\n/**\n * Weekly BAL emissions\n *\n * @param currentTimestamp used to get the epoch\n * @returns BAL emitted in a week\n */\nexport const weekly = (\n currentTimestamp: number = Math.round(new Date().getTime() / 1000)\n): number => {\n const miningEpoch = Math.floor(\n (currentTimestamp - START_EPOCH_TIME) / RATE_REDUCTION_TIME\n );\n\n const rate = INITIAL_RATE * RATE_REDUCTION_COEFFICIENT ** -miningEpoch;\n\n return rate;\n};\n\n/**\n * Total BAL emitted in epoch (1 year)\n *\n * @param epoch starting from 0 for the first year of emissions\n * @returns BAL emitted in epoch\n */\nexport const total = (epoch: number): number => {\n const weeklyRate = INITIAL_RATE * RATE_REDUCTION_COEFFICIENT ** -epoch;\n const dailyRate = weeklyRate / 7;\n\n return dailyRate * 365;\n};\n\n/**\n * Total BAL emitted between two timestamps\n *\n * @param start starting timestamp\n * @param end ending timestamp\n * @returns BAL emitted in period\n */\nexport const between = (start: number, end: number): number => {\n if (start < START_EPOCH_TIME) {\n throw 'start timestamp before emission schedule deployment';\n }\n if (end < start) {\n throw 'cannot finish before starting';\n }\n\n let totalEmissions = 0;\n\n const startingEpoch = Math.floor(\n (start - START_EPOCH_TIME) / RATE_REDUCTION_TIME\n );\n const endingEpoch = Math.floor(\n (end - START_EPOCH_TIME) / RATE_REDUCTION_TIME\n );\n\n for (\n let currentEpoch = startingEpoch;\n currentEpoch <= endingEpoch;\n currentEpoch++\n ) {\n totalEmissions += total(currentEpoch);\n }\n\n // Subtract what isn't emmited within the time range\n const startingEpochEnd =\n START_EPOCH_TIME + RATE_REDUCTION_TIME * (startingEpoch + 1);\n const endingEpochStart = START_EPOCH_TIME + RATE_REDUCTION_TIME * endingEpoch;\n\n const secondsInStartingEpoch = startingEpochEnd - start;\n const secondsInEndingEpoch = end - endingEpochStart;\n\n totalEmissions -=\n (total(startingEpoch) * (RATE_REDUCTION_TIME - secondsInStartingEpoch)) /\n RATE_REDUCTION_TIME;\n totalEmissions -=\n (total(endingEpoch) * (RATE_REDUCTION_TIME - secondsInEndingEpoch)) /\n RATE_REDUCTION_TIME;\n\n return totalEmissions;\n};\n","import { Findable, Price } from '@/types';\nimport { BaseFeeDistributor } from '@/modules/data';\n\nexport interface ProtocolRevenueData {\n lastWeekBalRevenue: number;\n lastWeekBBAUsdRevenue: number;\n veBalSupply: number;\n}\n\nexport class ProtocolRevenue {\n constructor(\n private repository: BaseFeeDistributor,\n private tokenPrices: Findable\n ) {}\n\n async data(now = Date.now()): Promise {\n const data = await this.repository.multicallData(now);\n const balPrice = await this.tokenPrices.find(data.balAddress);\n\n if (!balPrice || !balPrice.usd) {\n throw `No BAL USD price found`;\n }\n\n return {\n lastWeekBalRevenue: data.balAmount * parseFloat(balPrice.usd),\n lastWeekBBAUsdRevenue: data.bbAUsdAmount * data.bbAUsdPrice,\n veBalSupply: data.veBalSupply,\n };\n }\n}\n","/**\n * Calculates pool fees\n *\n * 1. Pool fees in last 24hrs\n */\nimport { isLessThan24Hours } from '@/lib/utils/time';\nimport { Pool, Findable, PoolAttribute } from '@/types';\n\nexport class PoolFees {\n constructor(\n private yesterdaysPools: Findable | undefined\n ) {}\n\n // 🚨 this is adding 1 call to get yesterday's block height and 2nd call to fetch yesterday's pools data from subgraph\n // TODO: find a better data source for that eg. add blocks to graph, replace with a database, or dune\n async last24h(pool: Pool): Promise {\n let yesterdaysPool;\n if (this.yesterdaysPools) {\n yesterdaysPool = await this.yesterdaysPools.find(pool.id);\n }\n if (!pool.totalSwapFee) {\n return 0;\n }\n\n if (!yesterdaysPool?.totalSwapFee) {\n // Process edge case when pool creation time is less that 24h\n if (pool.createTime && isLessThan24Hours(pool.createTime)) {\n return parseFloat(pool.totalSwapFee);\n }\n return 0;\n }\n\n return (\n parseFloat(pool.totalSwapFee) - parseFloat(yesterdaysPool.totalSwapFee)\n );\n }\n}\n","import { formatUnits } from '@ethersproject/units';\nimport * as emissions from '@/modules/data/bal/emissions';\nimport type {\n Findable,\n Pool,\n PoolAttribute,\n Price,\n Token,\n TokenAttribute,\n LiquidityGauge,\n Network,\n PoolToken,\n} from '@/types';\nimport { BaseFeeDistributor } from '@/modules/data';\nimport { ProtocolRevenue } from './protocol-revenue';\nimport { Liquidity } from '@/modules/liquidity/liquidity.module';\nimport { identity, zipObject, pickBy } from 'lodash';\nimport { PoolFees } from '../fees/fees';\nimport { BALANCER_NETWORK_CONFIG } from '@/lib/constants/config';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { Logger } from '@/lib/utils/logger';\nimport { GyroConfigRepository } from '@/modules/data/gyro-config/repository';\nimport { POOLS_TO_IGNORE } from '@/lib/constants/poolsToIgnore';\n\nexport interface AprBreakdown {\n swapFees: number;\n tokenAprs: {\n total: number;\n breakdown: { [address: string]: number };\n };\n stakingApr: {\n min: number;\n max: number;\n };\n rewardAprs: {\n total: number;\n breakdown: { [address: string]: number };\n };\n protocolApr: number;\n min: number;\n max: number;\n}\n\n/**\n * Calculates pool APR via summing up sources of APR:\n *\n * 1. Swap fees (pool level) data coming from subgraph\n * 2. Yield bearing pool tokens, with data from external sources eg: http endpoints, subgraph, onchain\n * * stETH\n * * aave\n * * usd+\n * map token: calculatorFn\n * 3. Staking rewards based from veBal gauges\n */\nexport class PoolApr {\n constructor(\n private pools: Findable,\n private tokenPrices: Findable,\n private tokenMeta: Findable,\n private tokenYields: Findable,\n private feeCollector: Findable,\n private yesterdaysPools?: Findable,\n private liquidityGauges?: Findable,\n private feeDistributor?: BaseFeeDistributor,\n private gyroConfigRepository?: GyroConfigRepository\n ) {}\n\n /**\n * Pool revenue via swap fees.\n * Fees and liquidity are takes from subgraph as USD floats.\n *\n * @returns APR [bsp] from fees accumulated over last 24h\n */\n async swapFees(pool: Pool): Promise {\n // 365 * dailyFees * (1 - protocolFees) / totalLiquidity\n const last24hFees = await this.last24hFees(pool);\n const totalLiquidity = await this.totalLiquidity(pool);\n // TODO: what to do when we are missing last24hFees or totalLiquidity?\n // eg: stable phantom returns 0\n if (!last24hFees || !totalLiquidity) {\n return 0;\n }\n const dailyFees =\n last24hFees * (1 - (await this.protocolSwapFeePercentage(pool)));\n const feesDailyBsp = 10000 * (dailyFees / parseFloat(totalLiquidity));\n\n return Math.round(365 * feesDailyBsp);\n }\n\n /**\n * Pool revenue from holding yield-bearing wrapped tokens.\n *\n * @returns APR [bsp] from tokens contained in the pool\n */\n async tokenAprs(pool: Pool): Promise {\n if (!pool.tokens) {\n return {\n total: 0,\n breakdown: {},\n };\n }\n\n const totalLiquidity = await this.totalLiquidity(pool);\n\n // Filter out BPT: token with the same address as the pool\n // TODO: move this to data layer\n const bptFreeTokens = pool.tokens.filter((token) => {\n return token.address !== pool.address;\n });\n\n // Get each token APRs\n const aprs = await Promise.all(\n bptFreeTokens.map(async (token) => {\n let apr = 0;\n const tokenYield = await this.tokenYields.find(token.address);\n if (tokenYield) {\n // metastable pools incorrectly apply the swap fee to the yield earned.\n // they don't have the concept of a yield fee like the newer pools do.\n if (\n pool.poolType === 'MetaStable' ||\n pool.poolType.includes('Gyro')\n ) {\n apr =\n tokenYield * (1 - (await this.protocolSwapFeePercentage(pool)));\n } else if (\n pool.poolType === 'ComposableStable' ||\n (pool.poolType === 'Weighted' && pool.poolTypeVersion >= 2)\n ) {\n if (token.isExemptFromYieldProtocolFee) {\n apr = tokenYield;\n } else {\n apr =\n tokenYield *\n (1 - parseFloat(pool.protocolYieldFeeCache || '0.5'));\n }\n } else {\n apr = tokenYield;\n }\n } else {\n // Handle subpool APRs with recursive call to get the subPool APR\n const subPool = await this.pools.findBy('address', token.address);\n\n if (subPool) {\n // INFO: Liquidity mining APR can't cascade to other pools\n const subSwapFees = await this.swapFees(subPool);\n const subtokenAprs = await this.tokenAprs(subPool);\n let subApr = subtokenAprs.total;\n if (\n pool.poolType === 'ComposableStable' ||\n (pool.poolType === 'Weighted' && pool.poolTypeVersion === 2)\n ) {\n if (!token.isExemptFromYieldProtocolFee) {\n subApr =\n subApr *\n (1 - parseFloat(pool.protocolYieldFeeCache || '0.5'));\n }\n }\n apr = subSwapFees + subApr;\n }\n }\n\n return apr;\n })\n );\n\n // Get token weights normalised by usd price\n const getWeight = async (token: PoolToken): Promise => {\n let tokenPrice: string | undefined;\n if (token.weight) {\n return parseFloat(token.weight);\n } else if (token.token?.pool?.poolType) {\n const poolToken = await this.pools.findBy('address', token.address);\n if (poolToken) {\n tokenPrice = (await this.bptPrice(poolToken)).toString();\n }\n } else {\n tokenPrice =\n token.price?.usd ||\n (await this.tokenPrices.find(token.address))?.usd ||\n token.token?.latestUSDPrice;\n }\n if (tokenPrice) {\n // using floats assuming frontend purposes with low precision needs\n const tokenValue = parseFloat(token.balance) * parseFloat(tokenPrice);\n return tokenValue / parseFloat(totalLiquidity);\n } else {\n throw `No price for ${token.address}`;\n }\n };\n\n // Normalise tokenAPRs according to weights\n const weightedAprs = await Promise.all(\n bptFreeTokens.map(async (token, idx) => {\n if (aprs[idx] === 0) {\n return 0;\n }\n\n // Handle missing token weights, usually due to missing token prices\n try {\n const weight = await getWeight(token);\n return Math.round(aprs[idx] * weight);\n } catch (e) {\n const logger = Logger.getInstance();\n logger.error(e as string);\n return 0;\n }\n })\n );\n\n // sum them up to get pool APRs\n const apr = weightedAprs.reduce((sum, apr) => sum + apr, 0);\n const breakdown = pickBy(\n zipObject(\n bptFreeTokens.map((t) => t.address),\n weightedAprs\n ),\n identity\n );\n\n return {\n total: apr,\n breakdown,\n };\n }\n\n /**\n * Calculates staking rewards based on veBal gauges deployed with Curve Finance contracts.\n * https://curve.readthedocs.io/dao-gauges.html\n *\n * Terminology:\n * - LP token of a gauge is a BPT of a pool\n * - Depositing into a gauge is called staking on the frontend\n * - gauge totalSupply - BPT tokens deposited to a gauge\n * - gauge workingSupply - effective BPT tokens participating in reward distribution. sum of 40% deposit + 60% boost from individual user's veBal\n * - gauge relative weight - weight of this gauge in bal inflation distribution [0..1] scaled to 1e18\n *\n * APR sources:\n * - gauge BAL emissions = min: 40% of totalSupply, max: 40% of totalSupply + 60% of totalSupply * gauge LPs voting power\n * https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/liquidity-mining/contracts/gauges/ethereum/LiquidityGaugeV5.vy#L338\n * - gauge reward tokens: Admin or designated depositor has an option to deposit additional reward with a weekly accruing cadence.\n * https://github.com/balancer-labs/balancer-v2-monorepo/blob/master/pkg/liquidity-mining/contracts/gauges/ethereum/LiquidityGaugeV5.vy#L641\n * rate: amount of token per second\n *\n * @param pool\n * @param boost range between 1 and 2.5\n * @returns APR [bsp] from protocol rewards.\n */\n async stakingApr(pool: Pool, boost = 1): Promise {\n if (!this.liquidityGauges) {\n return 0;\n }\n\n // Data resolving\n const gauge = await this.liquidityGauges.findBy('poolId', pool.id);\n if (\n !gauge ||\n (pool.chainId == 1 && gauge.workingSupply === 0) ||\n (pool.chainId > 1 && gauge.totalSupply === 0) ||\n (pool.chainId > 1 && gauge.balInflationRate === 0)\n ) {\n return 0;\n }\n\n const bal =\n BALANCER_NETWORK_CONFIG[pool.chainId as Network].addresses.tokens.bal;\n if (!bal) {\n return 0;\n }\n\n const [balPrice, bptPriceUsd] = await Promise.all([\n this.tokenPrices.find(bal), // BAL\n this.bptPrice(pool),\n ]);\n\n if (!balPrice?.usd) {\n throw 'Missing BAL price';\n }\n\n const gaugeSupply = (gauge.workingSupply + 0.4) / 0.4; // Only 40% of LP token staked accrue emissions, totalSupply = workingSupply * 2.5\n const gaugeSupplyUsd = gaugeSupply * bptPriceUsd;\n\n // Handle child chain gauges with inflation_rate\n // balInflationRate - amount of BAL tokens per second as a float\n if (gauge.balInflationRate) {\n const reward =\n gauge.balInflationRate * 86400 * 365 * parseFloat(balPrice.usd);\n return Math.round((boost * 10000 * reward) / gaugeSupplyUsd);\n } else if (pool.chainId > 1) {\n // TODO: remove after all gauges are migrated (around 01-07-2023), Subgraph is returning BAL staking rewards as reward tokens for L2 gauges.\n if (!gauge.rewardTokens) {\n return 0;\n }\n\n const balReward = bal && gauge.rewardTokens[bal];\n if (balReward) {\n let reward: { address: string; value: number };\n try {\n reward = await this.rewardTokenApr(bal, balReward);\n const totalSupplyUsd = gauge.totalSupply * bptPriceUsd;\n const rewardValue = reward.value / totalSupplyUsd;\n return Math.round(10000 * rewardValue);\n } catch (e) {\n return 0;\n }\n } else {\n return 0;\n }\n }\n\n // Handle mainnet gauges\n const balPriceUsd = parseFloat(balPrice.usd);\n const now = Math.round(new Date().getTime() / 1000);\n const totalBalEmissions = (emissions.weekly(now) / 7) * 365;\n const gaugeBalEmissions = totalBalEmissions * gauge.relativeWeight;\n const gaugeBalEmissionsUsd = gaugeBalEmissions * balPriceUsd;\n const gaugeBalAprBps = Math.round(\n (boost * 10000 * gaugeBalEmissionsUsd) / gaugeSupplyUsd\n );\n\n return gaugeBalAprBps;\n }\n\n /**\n * Some gauges are holding tokens distributed as rewards to LPs.\n *\n * @param pool\n * @returns APR [bsp] from token rewards.\n */\n async rewardAprs(pool: Pool): Promise {\n if (!this.liquidityGauges) {\n return { total: 0, breakdown: {} };\n }\n\n // Data resolving\n const gauge = await this.liquidityGauges.findBy('poolId', pool.id);\n if (\n !gauge ||\n !gauge.rewardTokens ||\n Object.keys(gauge.rewardTokens).length < 1\n ) {\n return { total: 0, breakdown: {} };\n }\n\n // BAL rewards already returned as stakingApr, so we can filter them out\n const bal =\n BALANCER_NETWORK_CONFIG[pool.chainId as Network].addresses.tokens.bal;\n const rewardTokenAddresses = Object.keys(gauge.rewardTokens).filter(\n (a) => a != bal\n );\n\n // Gets each tokens rate, extrapolate to a year and convert to USD\n const rewards = rewardTokenAddresses.map(async (tAddress) => {\n /* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */\n const data = gauge!.rewardTokens![tAddress];\n try {\n const reward = await this.rewardTokenApr(tAddress, data);\n return reward;\n } catch (e) {\n return { address: tAddress, value: 0 };\n }\n });\n\n // Get the gauge totalSupplyUsd\n const bptPriceUsd = await this.bptPrice(pool);\n const totalSupplyUsd = gauge.totalSupply * bptPriceUsd;\n\n if (totalSupplyUsd == 0) {\n return { total: 0, breakdown: {} };\n }\n\n const rewardTokensBreakdown: Record = {};\n\n let total = 0;\n for await (const reward of Object.values(rewards)) {\n const rewardValue = reward.value / totalSupplyUsd;\n const rewardValueScaled = Math.round(10000 * rewardValue);\n total += rewardValueScaled;\n rewardTokensBreakdown[reward.address] = rewardValueScaled;\n }\n\n return {\n total,\n breakdown: rewardTokensBreakdown,\n };\n }\n\n /**\n * 80BAL-20WETH pool is accruing protocol revenue.\n *\n * @param pool\n * @returns accrued protocol revenue as APR [bsp]\n */\n async protocolApr(pool: Pool): Promise {\n const veBalPoolId =\n '0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014';\n\n if (pool.id != veBalPoolId || !this.feeDistributor) {\n return 0;\n }\n\n const revenue = new ProtocolRevenue(this.feeDistributor, this.tokenPrices);\n\n const { lastWeekBalRevenue, lastWeekBBAUsdRevenue, veBalSupply } =\n await revenue.data();\n\n const bptPrice = await this.bptPrice(pool);\n if (!bptPrice) {\n throw 'bptPrice for veBal pool missing';\n }\n\n const dailyRevenue = (lastWeekBalRevenue + lastWeekBBAUsdRevenue) / 7;\n const apr = Math.round(\n (10000 * (365 * dailyRevenue)) / (bptPrice * veBalSupply)\n );\n\n return apr;\n }\n\n /**\n * Composes all sources for total pool APR.\n *\n * @returns pool APR split [bsp]\n */\n async apr(pool: Pool): Promise {\n if (POOLS_TO_IGNORE.includes(pool.id)) {\n return {\n swapFees: 0,\n tokenAprs: {\n total: 0,\n breakdown: {},\n },\n stakingApr: {\n min: 0,\n max: 0,\n },\n rewardAprs: {\n total: 0,\n breakdown: {},\n },\n protocolApr: 0,\n min: 0,\n max: 0,\n };\n }\n const [\n swapFees,\n tokenAprs,\n minStakingApr,\n maxStakingApr,\n rewardAprs,\n protocolApr,\n ] = await Promise.all([\n this.swapFees(pool), // pool snapshot for last 24h fees dependency\n this.tokenAprs(pool),\n this.stakingApr(pool),\n this.stakingApr(pool, 2.5),\n this.rewardAprs(pool),\n this.protocolApr(pool),\n ]);\n\n return {\n swapFees,\n tokenAprs,\n stakingApr: {\n min: minStakingApr,\n max: maxStakingApr,\n },\n rewardAprs,\n protocolApr,\n min: swapFees + tokenAprs.total + rewardAprs.total + minStakingApr,\n max:\n swapFees +\n tokenAprs.total +\n rewardAprs.total +\n protocolApr +\n maxStakingApr,\n };\n }\n\n private async last24hFees(pool: Pool): Promise {\n const poolFees = new PoolFees(this.yesterdaysPools);\n return poolFees.last24h(pool);\n }\n\n /**\n * Total Liquidity based on USD token prices taken from external price feed, eg: coingecko.\n *\n * @param pool\n * @returns Pool liquidity in USD\n */\n private async totalLiquidity(pool: Pool): Promise {\n try {\n const liquidityService = new Liquidity(this.pools, this.tokenPrices);\n const liquidity = await liquidityService.getLiquidity(pool);\n return liquidity;\n } catch (err) {\n const logger = Logger.getInstance();\n logger.warn('Liquidity calculcation failed, falling back to subgraph');\n return pool.totalLiquidity;\n }\n }\n\n /**\n * BPT price as pool totalLiquidity / pool total Shares\n * Total Liquidity is calculated based on USD token prices taken from external price feed, eg: coingecko.\n *\n * @param pool\n * @returns BPT price in USD\n */\n private async bptPrice(pool: Pool) {\n return (\n parseFloat(await this.totalLiquidity(pool)) / parseFloat(pool.totalShares)\n );\n }\n\n private async protocolSwapFeePercentage(pool: Pool) {\n let fee = 0.5;\n if (pool.poolType.includes('Gyro') && this.gyroConfigRepository) {\n fee = await this.gyroConfigRepository.getGyroProtocolFee(pool.address);\n } else if (pool.protocolSwapFeeCache) {\n fee = parseFloat(pool.protocolSwapFeeCache);\n } else {\n fee = (await this.feeCollector.find('')) || 0.5;\n }\n return fee;\n }\n\n private async rewardTokenApr(\n tokenAddress: string,\n rewardData: { rate: BigNumber; period_finish: BigNumber; decimals?: number }\n ) {\n if (rewardData.period_finish.toNumber() < Date.now() / 1000) {\n return {\n address: tokenAddress,\n value: 0,\n };\n } else {\n const yearlyReward = rewardData.rate.mul(86400).mul(365);\n const price = await this.tokenPrices.find(tokenAddress);\n if (price && price.usd) {\n let decimals = 18;\n if (rewardData.decimals) {\n decimals = rewardData.decimals;\n } else {\n const meta = await this.tokenMeta.find(tokenAddress);\n decimals = meta?.decimals || 18;\n }\n const yearlyRewardUsd =\n parseFloat(formatUnits(yearlyReward, decimals)) *\n parseFloat(price.usd);\n return {\n address: tokenAddress,\n value: yearlyRewardUsd,\n };\n } else {\n throw `No USD price for ${tokenAddress}`;\n }\n }\n }\n}\n","import { BigNumber, parseFixed } from '@ethersproject/bignumber';\nimport { Zero, WeiPerEther } from '@ethersproject/constants';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { isSameAddress, parsePoolInfo } from '@/lib/utils';\nimport { _downscaleDown } from '@/lib/utils/solidityMaths';\nimport { Pool, PoolAttribute, PoolType } from '@/types';\n\nimport { Findable } from '../data/types';\nimport { PoolTypeConcerns } from '../pools/pool-type-concerns';\n\ntype SpotPrices = { [tokenIn: string]: string };\n\nconst supportedPoolTypes: string[] = Object.values(PoolType);\nexport interface Node {\n address: string;\n id: string;\n joinAction: JoinAction;\n exitAction: ExitAction;\n isProportionalExit: boolean;\n type: string;\n children: Node[];\n marked: boolean;\n index: string;\n proportionOfParent: BigNumber;\n parent: Node | undefined;\n isLeaf: boolean;\n spotPrices: SpotPrices;\n decimals: number;\n balance: string;\n priceRate: string;\n}\n\ntype JoinAction = 'input' | 'batchSwap' | 'wrap' | 'joinPool';\nconst joinActions = new Map();\nsupportedPoolTypes.forEach((type) => {\n if (type.includes('Linear') && supportedPoolTypes.includes(type))\n joinActions.set(type as PoolType, 'batchSwap');\n});\njoinActions.set(PoolType.Element, 'batchSwap');\njoinActions.set(PoolType.Investment, 'joinPool');\njoinActions.set(PoolType.LiquidityBootstrapping, 'joinPool');\njoinActions.set(PoolType.MetaStable, 'joinPool');\njoinActions.set(PoolType.Stable, 'joinPool');\njoinActions.set(PoolType.StablePhantom, 'batchSwap');\njoinActions.set(PoolType.Weighted, 'joinPool');\njoinActions.set(PoolType.ComposableStable, 'joinPool');\n\ntype ExitAction = 'output' | 'batchSwap' | 'unwrap' | 'exitPool';\nconst exitActions = new Map();\nsupportedPoolTypes.forEach((type) => {\n if (type.includes('Linear') && supportedPoolTypes.includes(type))\n exitActions.set(type as PoolType, 'batchSwap');\n});\nexitActions.set(PoolType.Element, 'batchSwap');\nexitActions.set(PoolType.Investment, 'exitPool');\nexitActions.set(PoolType.LiquidityBootstrapping, 'exitPool');\nexitActions.set(PoolType.MetaStable, 'exitPool');\nexitActions.set(PoolType.Stable, 'exitPool');\nexitActions.set(PoolType.StablePhantom, 'batchSwap');\nexitActions.set(PoolType.Weighted, 'exitPool');\nexitActions.set(PoolType.ComposableStable, 'exitPool');\n\nexport class PoolGraph {\n constructor(private pools: Findable) {}\n\n async buildGraphFromRootPool(\n poolId: string,\n tokensToUnwrap: string[]\n ): Promise {\n const rootPool = await this.pools.find(poolId);\n if (!rootPool) throw new BalancerError(BalancerErrorCode.POOL_DOESNT_EXIST);\n const nodeIndex = 0;\n const rootNode = await this.buildGraphFromPool(\n rootPool.address,\n nodeIndex,\n undefined,\n WeiPerEther,\n tokensToUnwrap\n );\n return rootNode[0];\n }\n\n getTokenTotal(pool: Pool): BigNumber {\n const bptIndex = pool.tokensList.indexOf(pool.address);\n let total = Zero;\n const { balancesEvm } = parsePoolInfo(pool);\n balancesEvm.forEach((balance, i) => {\n // Ignore phantomBpt balance\n if (bptIndex !== i) {\n total = total.add(balance);\n }\n });\n return total;\n }\n\n async buildGraphFromPool(\n address: string,\n nodeIndex: number,\n parent: Node | undefined,\n proportionOfParent: BigNumber,\n tokensToUnwrap: string[]\n ): Promise<[Node, number]> {\n const pool = await this.pools.findBy('address', address);\n\n if (!pool) {\n if (!parent) {\n // If pool not found by address and is root pool (without parent), then throw error\n throw new BalancerError(BalancerErrorCode.POOL_DOESNT_EXIST);\n } else {\n // If pool not found by address, but it has parent, assume it's a leaf token and add a leafTokenNode\n const parentPool = (await this.pools.findBy(\n 'address',\n parent.address\n )) as Pool;\n const tokenIndex = parentPool.tokensList.indexOf(address);\n const leafTokenDecimals = parentPool.tokens[tokenIndex].decimals ?? 18;\n const { balancesEvm } = parsePoolInfo(parentPool);\n\n const nodeInfo = PoolGraph.createInputTokenNode(\n nodeIndex,\n address,\n leafTokenDecimals,\n parent,\n proportionOfParent,\n balancesEvm[tokenIndex].toString()\n );\n return nodeInfo;\n }\n }\n\n const joinAction = joinActions.get(pool.poolType);\n const exitAction = exitActions.get(pool.poolType);\n if (!joinAction || !exitAction)\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n\n const tokenTotal = this.getTokenTotal(pool);\n // Spot price service\n const { spotPriceCalculator } = PoolTypeConcerns.from(pool.poolType);\n const spotPrices: SpotPrices = {};\n let decimals = 18;\n // Spot price of a path is product of the sp of each pool in path. We calculate the sp for each pool token here to use as required later.\n pool.tokens.forEach((token) => {\n if (isSameAddress(token.address, pool.address)) {\n // Updated node with BPT token decimal\n decimals = token.decimals ? token.decimals : 18;\n return;\n }\n const sp = spotPriceCalculator.calcPoolSpotPrice(\n token.address,\n pool.address,\n pool\n );\n spotPrices[token.address] = sp;\n });\n\n let poolNode: Node = {\n address: pool.address,\n id: pool.id,\n type: pool.poolType,\n joinAction,\n exitAction,\n isProportionalExit: false,\n children: [],\n marked: false,\n index: nodeIndex.toString(),\n parent,\n proportionOfParent,\n isLeaf: false,\n spotPrices,\n decimals,\n balance: pool.totalShares,\n priceRate: WeiPerEther.toString(),\n };\n this.updateNodeIfProportionalExit(pool, poolNode);\n nodeIndex++;\n if (pool.poolType.toString().includes('Linear')) {\n [poolNode, nodeIndex] = this.createLinearNodeChildren(\n poolNode,\n nodeIndex,\n pool,\n tokensToUnwrap\n );\n } else {\n const { balancesEvm } = parsePoolInfo(pool);\n for (let i = 0; i < pool.tokens.length; i++) {\n // ignore any phantomBpt tokens\n if (isSameAddress(pool.tokens[i].address, pool.address)) continue;\n let proportion: BigNumber;\n // If the pool is a weighted pool we can use the actual tokenWeight as proportion\n if (pool.poolType === 'Weighted') {\n const tokenWeight = pool.tokens[i].weight as string;\n proportion = parseFixed(tokenWeight, 18);\n } else {\n proportion = BigNumber.from(balancesEvm[i])\n .mul((1e18).toString())\n .div(tokenTotal);\n }\n const finalProportion = proportion\n .mul(proportionOfParent)\n .div((1e18).toString());\n const childNode = await this.buildGraphFromPool(\n pool.tokens[i].address,\n nodeIndex,\n poolNode,\n finalProportion,\n tokensToUnwrap\n );\n nodeIndex = childNode[1];\n if (childNode[0]) poolNode.children.push(childNode[0]);\n }\n }\n return [poolNode, nodeIndex];\n }\n\n /**\n * Updates isProportionalExit for Node if the pool supports it\n * @param pool\n * @param node\n */\n updateNodeIfProportionalExit(pool: Pool, node: Node): void {\n if (pool.poolType === PoolType.Weighted) node.isProportionalExit = true;\n else if (\n pool.poolType === PoolType.ComposableStable &&\n pool.poolTypeVersion > 2\n )\n node.isProportionalExit = true;\n }\n\n createLinearNodeChildren(\n linearPoolNode: Node,\n nodeIndex: number,\n linearPool: Pool,\n tokensToUnwrap: string[]\n ): [Node, number] {\n // Main token\n if (linearPool.mainIndex === undefined)\n throw new Error('Issue With Linear Pool');\n\n if (\n tokensToUnwrap\n .map((t) => t.toLowerCase())\n .includes(linearPool.tokensList[linearPool.mainIndex].toLowerCase())\n ) {\n // Linear pool will be joined via wrapped token. This will be the child node.\n const wrappedNodeInfo = this.createWrappedTokenNode(\n linearPool,\n nodeIndex,\n linearPoolNode,\n linearPoolNode.proportionOfParent\n );\n linearPoolNode.children.push(wrappedNodeInfo[0]);\n return [linearPoolNode, wrappedNodeInfo[1]];\n } else {\n const { balancesEvm } = parsePoolInfo(linearPool);\n const mainTokenDecimals =\n linearPool.tokens[linearPool.mainIndex].decimals ?? 18;\n\n const nodeInfo = PoolGraph.createInputTokenNode(\n nodeIndex,\n linearPool.tokensList[linearPool.mainIndex],\n mainTokenDecimals,\n linearPoolNode,\n linearPoolNode.proportionOfParent,\n balancesEvm[linearPool.mainIndex].toString()\n );\n linearPoolNode.children.push(nodeInfo[0]);\n nodeIndex = nodeInfo[1];\n return [linearPoolNode, nodeIndex];\n }\n }\n\n createWrappedTokenNode(\n linearPool: Pool,\n nodeIndex: number,\n parent: Node | undefined,\n proportionOfParent: BigNumber\n ): [Node, number] {\n if (\n linearPool.wrappedIndex === undefined ||\n linearPool.mainIndex === undefined\n )\n throw new Error('Issue With Linear Pool');\n\n const { balancesEvm, upScaledBalances, scalingFactorsRaw, priceRates } =\n parsePoolInfo(linearPool);\n\n const wrappedTokenNode: Node = {\n type: 'WrappedToken',\n address: linearPool.tokensList[linearPool.wrappedIndex],\n id: 'N/A',\n children: [],\n marked: false,\n joinAction: 'wrap',\n exitAction: 'unwrap',\n isProportionalExit: false,\n index: nodeIndex.toString(),\n parent,\n proportionOfParent,\n isLeaf: false,\n spotPrices: {},\n decimals: 18,\n balance: balancesEvm[linearPool.wrappedIndex].toString(),\n priceRate: priceRates[linearPool.wrappedIndex].toString(),\n };\n nodeIndex++;\n\n const mainTokenDecimals =\n linearPool.tokens[linearPool.mainIndex].decimals ?? 18;\n\n /**\n * - upscaledBalances takes price rate into account, which is equivalent to unwrapping tokens\n * - downscaling with scalingFactorsRaw will downscale the unwrapped balance to the main token decimals\n */\n const unwrappedBalance = _downscaleDown(\n upScaledBalances[linearPool.wrappedIndex],\n scalingFactorsRaw[linearPool.mainIndex]\n ).toString();\n\n const inputNode = PoolGraph.createInputTokenNode(\n nodeIndex,\n linearPool.tokensList[linearPool.mainIndex],\n mainTokenDecimals,\n wrappedTokenNode,\n proportionOfParent,\n unwrappedBalance\n );\n wrappedTokenNode.children = [inputNode[0]];\n nodeIndex = inputNode[1];\n return [wrappedTokenNode, nodeIndex];\n }\n\n static createInputTokenNode(\n nodeIndex: number,\n address: string,\n decimals: number,\n parent: Node | undefined,\n proportionOfParent: BigNumber,\n balance: string\n ): [Node, number] {\n return [\n {\n address,\n id: 'N/A',\n type: 'Input',\n children: [],\n marked: false,\n joinAction: 'input',\n exitAction: 'output',\n isProportionalExit: false,\n index: nodeIndex.toString(), // This will be updated with real amounts in join construction.\n parent,\n proportionOfParent,\n isLeaf: true,\n spotPrices: {},\n decimals,\n balance,\n priceRate: WeiPerEther.toString(),\n },\n nodeIndex + 1,\n ];\n }\n\n static orderByBfs(root: Node): Node[] {\n // Breadth first traversal of graph\n const nodes: Node[] = [];\n const orderedNodes: Node[] = [];\n root.marked = true;\n nodes.push(root);\n while (nodes.length > 0) {\n const currentNode = nodes.shift(); // removes first\n if (currentNode) orderedNodes.push(currentNode);\n currentNode?.children.forEach((c) => {\n if (!c.marked) {\n c.marked = true;\n nodes.push(c);\n }\n });\n }\n return orderedNodes;\n }\n\n // Return a list of leaf token addresses\n static getLeafAddresses(nodes: Node[]): string[] {\n return nodes.filter((n) => n.isLeaf).map((n) => n.address);\n }\n\n /**\n * Checks if list of Nodes only contains pools that support proportional exits\n * @param nodes\n * @returns\n */\n static isProportionalPools(nodes: Node[]): boolean {\n return nodes.every((node) => {\n if (node.children.length > 1) return node.isProportionalExit;\n else return true;\n });\n }\n\n // Get full graph from root pool and return ordered nodes\n getGraphNodes = async (\n isJoin: boolean,\n poolId: string,\n tokensToUnwrap: string[]\n ): Promise => {\n const rootPool = await this.pools.find(poolId);\n if (!rootPool) throw new BalancerError(BalancerErrorCode.POOL_DOESNT_EXIST);\n\n const rootNode = await this.buildGraphFromRootPool(poolId, tokensToUnwrap);\n\n if (rootNode.id !== poolId) throw new Error('Error creating graph nodes');\n\n if (isJoin) return PoolGraph.orderByBfs(rootNode).reverse();\n else return PoolGraph.orderByBfs(rootNode);\n };\n}\n","import { defaultAbiCoder, Result } from '@ethersproject/abi';\n\nexport class WeightedPoolDecoder {\n /**\n * Cannot be constructed.\n */\n private constructor() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n }\n\n /**\n * Decodes the userData parameter for providing the initial liquidity to a WeightedPool\n * @param data - encoded data\n */\n static joinInit = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256[]'], data);\n\n /**\n * Decodes the userData parameter for joining a WeightedPool with exact token inputs\n * @param data - encoded data\n */\n static joinExactTokensInForBPTOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256[]', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for joining a WeightedPool with a single token to receive an exact amount of BPT\n * @param data - encoded data\n */\n static joinTokenInForExactBPTOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for joining a WeightedPool proportionally to receive an exact amount of BPT\n * @param data - encoded data\n */\n static joinAllTokensInForExactBPTOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for exiting a WeightedPool by removing a single token in return for an exact amount of BPT\n * @param data - encoded data\n */\n static exitExactBPTInForOneTokenOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for exiting a WeightedPool by removing tokens in return for an exact amount of BPT\n * @param data - encoded data\n *\n */\n static exitExactBPTInForTokensOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256'], data);\n\n /**\n * Decodes the userData parameter for exiting a WeightedPool by removing exact amounts of tokens\n * @param data - encoded data\n */\n static exitBPTInForExactTokensOut = (data: string): Result =>\n defaultAbiCoder.decode(['uint256', 'uint256[]', 'uint256'], data);\n}\n","import { parseFixed, BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { defaultAbiCoder } from '@ethersproject/abi';\nimport { Zero } from '@ethersproject/constants';\nimport { bnum } from '@balancer-labs/sor';\n\nimport { PoolDictionary, Pool } from '../poolSource';\nimport { WeightedPoolDecoder } from '@/pool-weighted/decoder';\nimport { WeightedPoolJoinKind } from '@/pool-weighted/encoder';\nimport { isSameAddress } from '@/lib/utils';\nimport { Relayer } from '@/modules/relayer/relayer.module';\nimport { RelayerModel } from '../relayer';\nimport { ActionType } from '../vaultModel.module';\nimport { PoolToken } from '@/types';\n\nexport interface JoinPoolRequest {\n actionType: ActionType.Join;\n poolId: string;\n encodedUserData: string;\n outputReference: string;\n}\n\nexport class JoinModel {\n constructor(private relayerModel: RelayerModel) {}\n\n /**\n * Finds join kind given encoded user data.\n * @param encodedUserData\n * @returns\n */\n joinKind(encodedUserData: string): WeightedPoolJoinKind {\n const decodedUserData = defaultAbiCoder.decode(\n ['uint256'],\n encodedUserData\n );\n const joinKind = decodedUserData[0] as BigNumber;\n if (!joinKind) throw new Error('No exit kind.');\n return joinKind.toNumber() as WeightedPoolJoinKind;\n }\n\n /**\n * Decodes user join data and returns token input amounts\n * @param encodedUserData\n * @param joinKind\n * @returns\n */\n decodeJoinData(\n encodedUserData: string,\n joinKind: WeightedPoolJoinKind\n ): string | string[] {\n // At the moment all pools have same structure so just use WeightedPoolDecoded for all\n if (joinKind === WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT) {\n const bptAmountOut =\n WeightedPoolDecoder.joinAllTokensInForExactBPTOut(encodedUserData);\n return bptAmountOut.toString();\n } else if (joinKind === WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\n const [, amountsIn] =\n WeightedPoolDecoder.joinExactTokensInForBPTOut(encodedUserData);\n return amountsIn;\n } else if (joinKind === WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\n const [, bptAmountOut, tokenIndex] =\n WeightedPoolDecoder.joinTokenInForExactBPTOut(encodedUserData);\n return [bptAmountOut.toString(), tokenIndex];\n } else throw new Error('Non supported join data');\n }\n\n allTokensInForExactBPTOut(): string {\n throw new Error('joinAllTokensInForExactBPTOut not supported');\n /*\n We need maths for _calcAllTokensInGivenExactBptOut\n From SC:\n uint256 bptAmountOut = userData.allTokensInForExactBptOut();\n // Note that there is no maximum amountsIn parameter: this is handled by `IVault.joinPool`.\n \n uint256[] memory amountsIn = WeightedMath._calcAllTokensInGivenExactBptOut(balances, bptAmountOut, totalSupply);\n \n return (bptAmountOut, amountsIn);\n \n const bptAmountOut = this.decodeJoinData(\n encodedUserData,\n PoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT\n );\n */\n }\n\n joinExactTokensInForBPTOut(\n encodedUserData: string,\n pool: Pool\n ): [string, string[], string[]] {\n // This does not include a value for pre-minted BPT\n const amountsInWithRef = this.decodeJoinData(\n encodedUserData,\n WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT\n ) as string[];\n\n const amountsIn =\n this.relayerModel.doChainedRefReplacements(amountsInWithRef);\n // Calculate amount of BPT out given exact amounts in\n const bptAmountOut = pool._calcBptOutGivenExactTokensIn(\n amountsIn.map((a) => BigNumber.from(a))\n );\n\n // Updates BPT/totalShares value for pool\n if (\n pool.SubgraphType == 'StablePhantom' ||\n pool.SubgraphType == 'ComposableStable'\n ) {\n // Update BPT balance\n // totalShares will be updated as a side effect within SOR\n const bptAsPoolToken = pool.tokens.find((t: PoolToken) =>\n isSameAddress(t.address, pool.address)\n );\n if (!bptAsPoolToken)\n throw new Error('Pool does not contain BPT as a token');\n const bptBalanceEVM = parseFixed(\n bptAsPoolToken.balance.toString(),\n bptAsPoolToken.decimals\n );\n // subtract value because joining pool reduces pre-minted BPT being held by the pool\n pool.updateTokenBalanceForPool(\n pool.address,\n bptBalanceEVM.sub(bptAmountOut)\n );\n } else {\n // For pools that do not contain BPT as a token, update totalShares directly\n pool.updateTokenBalanceForPool(\n pool.address,\n pool.totalShares.add(bptAmountOut)\n );\n }\n\n const tokensWithoutBpt = pool.tokens.filter(\n (t: PoolToken) => !isSameAddress(t.address, pool.address)\n );\n // Update each tokens balance\n amountsIn.forEach((amount, i) => {\n const balanceEvm = parseFixed(\n tokensWithoutBpt[i].balance.toString(),\n tokensWithoutBpt[i].decimals\n );\n pool.updateTokenBalanceForPool(\n tokensWithoutBpt[i].address,\n balanceEvm.add(amount)\n );\n });\n return [\n bptAmountOut.toString(),\n tokensWithoutBpt.map((t: PoolToken) => t.address),\n amountsIn,\n ];\n }\n\n joinTokenInForExactBPTOut(\n encodedUserData: string,\n pool: Pool\n ): [string, string, string] {\n const [bptAmountOutWithRef, tokenInIndex] = this.decodeJoinData(\n encodedUserData,\n WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT\n ) as string;\n\n const bptAmountOut =\n this.relayerModel.doChainedRefReplacement(bptAmountOutWithRef);\n // Uses an existing SOR functionality so need to deal with pairData and scaling\n const pairData = pool.parsePoolPairData(\n pool.tokensList[Number(tokenInIndex)],\n pool.address\n );\n\n const bptAmountOutHuman = formatFixed(bptAmountOut, 18);\n // Needs human scale\n const amountInHuman = pool\n ._tokenInForExactTokenOut(\n pairData as never,\n bnum(bptAmountOutHuman.toString())\n )\n .dp(pairData.decimalsIn);\n const amountInEvm = parseFixed(\n amountInHuman.toString(),\n pairData.decimalsIn\n );\n\n // Update balances of tokenIn and tokenOut - use EVM scale\n pool.updateTokenBalanceForPool(\n pairData.tokenIn,\n pairData.balanceIn.add(amountInEvm)\n );\n // For a join we have to add the extra BPT to the balance as this is equivalent to bptTotalSupply\n pool.updateTokenBalanceForPool(\n pairData.tokenOut,\n pairData.balanceOut.add(bptAmountOut)\n );\n\n return [amountInEvm.toString(), pairData.tokenIn, amountInEvm.toString()];\n }\n\n /**\n * Perform the specified exit type.\n * @param joinPoolRequest\n * @returns tokens out\n */\n async doJoinPool(\n joinPoolRequest: JoinPoolRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n const pool = pools[joinPoolRequest.poolId];\n const joinKind = this.joinKind(joinPoolRequest.encodedUserData);\n let bptOut = '0';\n let tokens: string[] = [];\n let amounts: string[] = [];\n if (joinKind === WeightedPoolJoinKind.ALL_TOKENS_IN_FOR_EXACT_BPT_OUT) {\n // Returns amount of tokens in - This isn't currently implemented\n bptOut = this.allTokensInForExactBPTOut();\n } else if (joinKind === WeightedPoolJoinKind.EXACT_TOKENS_IN_FOR_BPT_OUT) {\n // Returns amount of BPT out\n [bptOut, tokens, amounts] = this.joinExactTokensInForBPTOut(\n joinPoolRequest.encodedUserData,\n pool\n );\n } else if (joinKind === WeightedPoolJoinKind.TOKEN_IN_FOR_EXACT_BPT_OUT) {\n // Returns amount of tokenIn\n let tokenIn: string, amountIn: string;\n [bptOut, tokenIn, amountIn] = this.joinTokenInForExactBPTOut(\n joinPoolRequest.encodedUserData,\n pool\n );\n tokens.push(tokenIn);\n amounts.push(amountIn);\n } else throw new Error('Exit type not implemented');\n\n tokens.push(pool.address);\n // -ve because coming from Vault\n amounts.push(Zero.sub(bptOut).toString());\n\n if (\n joinPoolRequest.outputReference &&\n Relayer.isChainedReference(joinPoolRequest.outputReference)\n ) {\n this.relayerModel.setChainedReferenceValue(\n joinPoolRequest.outputReference,\n bptOut\n );\n }\n return [tokens, amounts];\n }\n}\n","import { parseFixed, BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { defaultAbiCoder } from '@ethersproject/abi';\nimport { Zero } from '@ethersproject/constants';\nimport { bnum } from '@balancer-labs/sor';\n\nimport { PoolDictionary, Pool } from '../poolSource';\nimport { ComposableStablePoolExitKind } from '@/pool-composable-stable';\nimport { WeightedPoolDecoder } from '@/pool-weighted/decoder';\nimport { WeightedPoolExitKind } from '@/pool-weighted/encoder';\nimport { isSameAddress } from '@/lib/utils';\nimport { RelayerModel } from '../relayer';\nimport { ActionType } from '../vaultModel.module';\nimport { OutputReference } from '@/modules/relayer/types';\nimport { PoolToken } from '@/types';\n\nexport interface ExitPoolRequest {\n actionType: ActionType.Exit;\n poolId: string;\n encodedUserData: string;\n outputReferences: OutputReference[];\n}\n\nfunction getBalancesForTokens(pool: Pool, tokens: string[]): string[] {\n const balances: string[] = [];\n tokens.forEach((t) => {\n const tokenIndex = pool.tokens.findIndex((pt: PoolToken) =>\n isSameAddress(pt.address, t)\n );\n if (tokenIndex < 0) throw 'Pool does not contain tokenIn';\n balances.push(\n parseFixed(\n pool.tokens[tokenIndex].balance,\n pool.tokens[tokenIndex].decimals\n ).toString()\n );\n });\n return balances;\n}\n\nexport class ExitModel {\n constructor(private relayerModel: RelayerModel) {}\n\n /**\n * Finds exit kind given encoded user data and pool type.\n * @param poolType\n * @param encodedUserData\n * @returns\n */\n exitKind(poolType: string, encodedUserData: string): WeightedPoolExitKind {\n const decodedUserData = defaultAbiCoder.decode(\n ['uint256'],\n encodedUserData\n );\n const exitKind = decodedUserData[0] as BigNumber;\n if (!exitKind) throw new Error('No exit kind.');\n if (poolType === 'ComposableStable') {\n if (\n exitKind.toNumber() ===\n ComposableStablePoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT\n )\n return WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT;\n if (\n exitKind.toNumber() ===\n ComposableStablePoolExitKind.EXACT_BPT_IN_FOR_ALL_TOKENS_OUT\n )\n return WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT;\n else {\n return WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT;\n }\n } else {\n return exitKind.toNumber() as WeightedPoolExitKind;\n }\n }\n\n /**\n * Decodes user exit data and returns token input amounts\n * @param encodedUserData\n * @param exitKind\n * @returns\n */\n decodeExitData(\n encodedUserData: string,\n exitKind: WeightedPoolExitKind\n ): string[] {\n // At the moment all pools have same structure so just use WeightedPoolDecoded for all\n if (exitKind === WeightedPoolExitKind.BPT_IN_FOR_EXACT_TOKENS_OUT) {\n const [, amountsOut, maxBPTAmountIn] =\n WeightedPoolDecoder.exitBPTInForExactTokensOut(encodedUserData);\n return [amountsOut.toString(), maxBPTAmountIn.toString()];\n } else if (\n exitKind === WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT\n ) {\n const [, bptIn, tokenIndex] =\n WeightedPoolDecoder.exitExactBPTInForOneTokenOut(encodedUserData);\n return [bptIn.toString(), tokenIndex.toString()];\n } else if (exitKind === WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\n const [, bptIn] =\n WeightedPoolDecoder.exitExactBPTInForTokensOut(encodedUserData);\n return [bptIn.toString()];\n } else throw new Error('Non supported exit data');\n }\n\n /**\n * Exit pool, BPT in to tokens out.\n * Updates pool balances.\n * @param encodedUserData\n * @param pool\n * @returns tokensOut\n */\n exactBptInForTokensOut(\n encodedUserData: string,\n pool: Pool\n ): [string, string[], string[]] {\n const [bptInWithRef] = this.decodeExitData(\n encodedUserData,\n WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT\n );\n\n const bptIn = this.relayerModel.doChainedRefReplacement(bptInWithRef);\n // Calculate amount of tokens out given an exact amount of BPT in\n const amountsOut = pool\n ._calcTokensOutGivenExactBptIn(BigNumber.from(bptIn))\n .map((a: BigNumber) => a.toString());\n\n // Updates BPT/totalShares value for pool\n if (\n pool.SubgraphType == 'StablePhantom' ||\n pool.SubgraphType == 'ComposableStable'\n ) {\n // Update BPT balance\n // totalShares will be updated as a side effect within SOR\n const bptAsPoolToken = pool.tokens.find((t: PoolToken) =>\n isSameAddress(t.address, pool.address)\n );\n if (!bptAsPoolToken)\n throw new Error('Pool does not contain BPT as a token');\n const bptBalanceEVM = parseFixed(\n bptAsPoolToken.balance.toString(),\n bptAsPoolToken.decimals\n );\n pool.updateTokenBalanceForPool(\n pool.address,\n bptBalanceEVM.add(bptIn) // add value because exiting pool increases pre-minted BPT being held by the pool\n );\n } else {\n // For pools that do not contain BPT as a token, update totalShares directly\n pool.updateTokenBalanceForPool(pool.address, pool.totalShares.sub(bptIn));\n }\n\n const tokensWithoutBpt = pool.tokens.filter(\n (t: PoolToken) => !isSameAddress(t.address, pool.address)\n );\n // Update each tokens balance\n amountsOut.forEach((amountOut: string, i: number) => {\n const balanceEvm = parseFixed(\n tokensWithoutBpt[i].balance.toString(),\n tokensWithoutBpt[i].decimals\n );\n pool.updateTokenBalanceForPool(\n tokensWithoutBpt[i].address,\n balanceEvm.sub(amountOut)\n );\n });\n return [\n bptIn,\n tokensWithoutBpt.map((t: PoolToken) => t.address),\n amountsOut,\n ];\n }\n\n /**\n * Exit pool, BPT in to single token out.\n * Updates pool balances.\n * @param encodedUserData\n * @param pool\n * @returns tokens out\n */\n exactBptInForOneTokenOut(\n encodedUserData: string,\n pool: Pool\n ): [string, string[], string[]] {\n const [bptInWithRef, tokenIndex] = this.decodeExitData(\n encodedUserData,\n WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT\n );\n const bptIn = this.relayerModel.doChainedRefReplacement(bptInWithRef);\n // Uses an existing SOR functionality so need to deal with pairData and scaling\n const pairData = pool.parsePoolPairData(\n pool.address,\n pool.tokensList[Number(tokenIndex)]\n );\n // Calculation requires floating point number input\n const amountInHuman: string = formatFixed(bptIn, pairData.decimalsIn);\n // Calculate amount of token out given an exact amount of BPT in\n const amountOutHuman = pool\n ._exactTokenInForTokenOut(pairData as never, bnum(amountInHuman))\n .dp(pairData.decimalsOut);\n const amountOutEvm = parseFixed(\n amountOutHuman.toString(),\n pairData.decimalsOut\n );\n\n // Update balances use EVM scaled\n const poolBalances = getBalancesForTokens(pool, [\n pool.address,\n pairData.tokenOut,\n ]);\n // Subtract token out amount from pool\n pool.updateTokenBalanceForPool(\n pairData.tokenOut,\n BigNumber.from(poolBalances[1]).sub(amountOutEvm)\n );\n\n if (\n pool.SubgraphType == 'StablePhantom' ||\n pool.SubgraphType == 'ComposableStable'\n ) {\n // Add value because exiting pool increases pre-minted BPT being held by the pool\n // totalShares is updated as a side effect on SOR\n pool.updateTokenBalanceForPool(\n pool.address,\n BigNumber.from(poolBalances[0]).add(bptIn)\n );\n } else {\n // Exiting a pool is equivalent to removing from totalSupply (totalShares) so must sub here\n pool.updateTokenBalanceForPool(pool.address, pool.totalShares.sub(bptIn));\n }\n\n const tokensWithoutBpt = pool.tokensList.filter(\n (t: string) => !isSameAddress(t, pool.address)\n );\n const amountsOut = new Array(tokensWithoutBpt.length).fill('0');\n amountsOut[Number(tokenIndex)] = amountOutEvm.toString();\n return [bptIn, tokensWithoutBpt, amountsOut];\n }\n\n /**\n * Perform the specified exit type.\n * @param exitPoolRequest\n * @returns tokens out\n */\n async doExitPool(\n exitPoolRequest: ExitPoolRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n const pool = pools[exitPoolRequest.poolId];\n const exitKind = this.exitKind(\n pool.SubgraphType,\n exitPoolRequest.encodedUserData\n );\n let amountsOut: string[] = [];\n let bptIn: string;\n let tokensOut: string[] = [];\n const tokens: string[] = [];\n const deltas: string[] = [];\n if (exitKind === WeightedPoolExitKind.EXACT_BPT_IN_FOR_TOKENS_OUT) {\n [bptIn, tokensOut, amountsOut] = this.exactBptInForTokensOut(\n exitPoolRequest.encodedUserData,\n pool\n );\n } else if (\n exitKind === WeightedPoolExitKind.EXACT_BPT_IN_FOR_ONE_TOKEN_OUT\n ) {\n [bptIn, tokensOut, amountsOut] = this.exactBptInForOneTokenOut(\n exitPoolRequest.encodedUserData,\n pool\n );\n } else throw new Error('Exit type not implemented');\n\n // Save any chained references\n for (let i = 0; i < exitPoolRequest.outputReferences.length; i++) {\n const tokenOut =\n pool.tokensList[exitPoolRequest.outputReferences[i].index];\n const tokenOutIndex = tokensOut.indexOf(tokenOut);\n if (tokenOutIndex === -1) throw new Error('Token out not found');\n this.relayerModel.setChainedReferenceValue(\n exitPoolRequest.outputReferences[i].key.toString(),\n amountsOut[tokenOutIndex]\n );\n }\n tokens.push(pool.address, ...tokensOut);\n deltas.push(bptIn, ...amountsOut.map((a) => Zero.sub(a).toString()));\n return [tokens, deltas];\n }\n}\n","import { parseFixed, BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { Zero } from '@ethersproject/constants';\nimport { bnum } from '@balancer-labs/sor';\n\nimport { PoolDictionary, Pool } from '../poolSource';\nimport { EncodeBatchSwapInput } from '@/modules/relayer/types';\nimport { Swap, SwapType } from '@/modules/swaps/types';\nimport { Relayer } from '@/modules/relayer/relayer.module';\nimport { RelayerModel } from '../relayer';\nimport { ActionType } from '../vaultModel.module';\n\nexport interface SwapRequest\n extends Pick {\n actionType: ActionType.Swap;\n}\n\nexport interface BatchSwapRequest\n extends Pick<\n EncodeBatchSwapInput,\n 'swaps' | 'assets' | 'funds' | 'swapType' | 'outputReferences'\n > {\n actionType: ActionType.BatchSwap;\n}\n\nexport class SwapModel {\n constructor(private relayerModel: RelayerModel) {}\n\n /**\n * Performs a single swap with one pool.\n * @param swapRequest\n * @returns Returns the net Vault asset balance delta. Positive amount represent token (or ETH) sent to the Vault, and negative amount represent token (or ETH) sent by the Vault. Delta corresponds to the asset out.\n */\n async doSingleSwap(\n swapRequest: SwapRequest,\n pools: PoolDictionary\n ): Promise {\n const amountIn = this.relayerModel.doChainedRefReplacement(\n swapRequest.request.amount.toString()\n );\n\n const pool = pools[swapRequest.request.poolId];\n const [, amountOutEvm] = this.doSwap(\n swapRequest.request.assetIn,\n swapRequest.request.assetOut,\n pool,\n swapRequest.request.kind,\n amountIn\n );\n\n const delta = Zero.sub(amountOutEvm);\n if (!swapRequest.outputReference)\n throw new Error('Missing outputReference');\n\n // Swap return values are signed, as they are Vault deltas (positive values correspond to assets sent\n // to the Vault, and negative values are assets received from the Vault). To simplify the chained reference\n // value model, we simply store the absolute value.\n this.relayerModel.setChainedReferenceValue(\n swapRequest.outputReference.toString(),\n delta.abs().toString()\n );\n return [delta.toString(), amountIn];\n }\n\n /**\n * Performs a series of swaps with one or multiple Pools.\n * @param batchSwapRequest\n * @returns Returns an array with the net Vault asset balance deltas. Positive amounts represent tokens (or ETH) sent to the Vault, and negative amounts represent tokens (or ETH) sent by the Vault. Each delta corresponds to the asset at the same index in the `assets` array.\n */\n async doBatchSwap(\n batchSwapRequest: BatchSwapRequest,\n pools: PoolDictionary\n ): Promise {\n const assets = batchSwapRequest.assets;\n const deltas = new Array(assets.length).fill(Zero);\n // Used for multihop swaps where previous swap return is used as input to next swap\n let previousAmount: string;\n\n for (let i = 0; i < batchSwapRequest.swaps.length; ++i) {\n const amount = batchSwapRequest.swaps[i].amount;\n if (Relayer.isChainedReference(amount)) {\n batchSwapRequest.swaps[i].amount =\n this.relayerModel.getChainedReferenceValue(amount);\n }\n }\n\n // Handle each swap in order\n batchSwapRequest.swaps.forEach((swap) => {\n const tokenIn = assets[swap.assetInIndex];\n const tokenOut = assets[swap.assetOutIndex];\n const pool = pools[swap.poolId];\n let amount = swap.amount;\n if (amount === '0') amount = previousAmount;\n const [amountInEvm, amountOutEvm] = this.doSwap(\n tokenIn,\n tokenOut,\n pool,\n batchSwapRequest.swapType,\n amount\n );\n\n previousAmount =\n batchSwapRequest.swapType === SwapType.SwapExactIn\n ? amountOutEvm.toString()\n : amountInEvm.toString();\n\n deltas[swap.assetInIndex] = deltas[swap.assetInIndex].add(amountInEvm);\n deltas[swap.assetOutIndex] = deltas[swap.assetOutIndex].sub(amountOutEvm);\n });\n\n for (let i = 0; i < batchSwapRequest.outputReferences.length; i++) {\n // Batch swap return values are signed, as they are Vault deltas (positive values correspond to assets sent\n // to the Vault, and negative values are assets received from the Vault). To simplify the chained reference\n // value model, we simply store the absolute value.\n this.relayerModel.setChainedReferenceValue(\n batchSwapRequest.outputReferences[i].key.toString(),\n deltas[batchSwapRequest.outputReferences[i].index].abs().toString()\n );\n }\n return deltas.map((d) => d.toString());\n }\n\n /**\n * Perform swap against a pool (and update balances)\n * @param tokenIn\n * @param tokenOut\n * @param pool\n * @param swapType\n * @param amount (EVM Scale)\n * @returns\n */\n doSwap(\n tokenIn: string,\n tokenOut: string,\n pool: Pool,\n swapType: SwapType,\n amount: string\n ): BigNumber[] {\n const pairData = pool.parsePoolPairData(tokenIn, tokenOut);\n const isExactIn = swapType === SwapType.SwapExactIn;\n let amountInEvm: string | BigNumber = isExactIn\n ? BigNumber.from(amount)\n : Zero;\n let amountOutEvm: string | BigNumber = isExactIn\n ? Zero\n : BigNumber.from(amount);\n const amountInHuman: string | BigNumber = formatFixed(\n amountInEvm,\n pairData.decimalsIn\n );\n const amountOutHuman: string | BigNumber = formatFixed(\n amountOutEvm,\n pairData.decimalsOut\n );\n\n if (isExactIn) {\n // Needs human scale\n const amountOutHuman = pool\n ._exactTokenInForTokenOut(\n pairData as never,\n bnum(amountInHuman.toString())\n )\n .dp(pairData.decimalsOut);\n amountOutEvm = parseFixed(\n amountOutHuman.toString(),\n pairData.decimalsOut\n );\n } else {\n // Needs human scale\n const amountInHuman = pool\n ._tokenInForExactTokenOut(\n pairData as never,\n bnum(amountOutHuman.toString())\n )\n .dp(pairData.decimalsIn);\n amountInEvm = parseFixed(amountInHuman.toString(), pairData.decimalsIn);\n }\n // Update balances of tokenIn and tokenOut - use EVM scale\n pool.updateTokenBalanceForPool(\n pairData.tokenIn,\n pairData.balanceIn.add(amountInEvm)\n );\n pool.updateTokenBalanceForPool(\n pairData.tokenOut,\n pairData.balanceOut.sub(amountOutEvm)\n );\n return [amountInEvm, amountOutEvm];\n }\n}\n","import { LinearPool } from '@balancer-labs/sor';\nimport { parseFixed } from '@ethersproject/bignumber';\n\nimport { EncodeUnwrapAaveStaticTokenInput } from '@/modules/relayer/types';\n\nimport { PoolDictionary } from '../poolSource';\nimport { RelayerModel } from '../relayer';\nimport { ActionType } from '../vaultModel.module';\nimport { WeiPerEther, Zero } from '@ethersproject/constants';\nimport { SolidityMaths } from '@/lib/utils/solidityMaths';\n\nexport interface UnwrapRequest\n extends Pick {\n poolId: string;\n actionType: ActionType.Unwrap;\n}\n\nexport class UnwrapModel {\n constructor(private relayerModel: RelayerModel) {}\n\n /**\n * Perform the specified unwrap type.\n * @param unwrapRequest\n * @param pools\n * @returns tokens out and their respective deltas\n */\n async doUnwrap(\n unwrapRequest: UnwrapRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n const pool = pools[unwrapRequest.poolId] as LinearPool;\n const wrappedToken = pool.tokens[pool.wrappedIndex];\n const underlyingToken = pool.tokens[pool.mainIndex];\n\n const amountIn = this.relayerModel.doChainedRefReplacement(\n unwrapRequest.amount.toString()\n );\n\n // must be negative because is leaving the vault\n const amountOut = SolidityMaths.divDownFixed(\n SolidityMaths.mulDownFixed(\n BigInt(amountIn),\n parseFixed(wrappedToken.priceRate, 18).toBigInt()\n ),\n WeiPerEther.toBigInt()\n ).toString();\n\n // Save chained references\n this.relayerModel.setChainedReferenceValue(\n unwrapRequest.outputReference.toString(),\n amountOut\n );\n\n const tokens = [wrappedToken.address, underlyingToken.address];\n const deltas = [amountIn, Zero.sub(amountOut).toString()];\n return [tokens, deltas];\n }\n}\n","import { PoolDictionary } from '../poolSource';\nimport { RelayerModel } from '../relayer';\nimport { JoinModel, JoinPoolRequest } from './join';\nimport { ExitModel, ExitPoolRequest } from './exit';\nimport { SwapModel, BatchSwapRequest, SwapRequest } from './swap';\nimport { UnwrapModel, UnwrapRequest } from './unwrap';\n\nexport class PoolModel {\n joinModel: JoinModel;\n exitModel: ExitModel;\n swapModel: SwapModel;\n unwrapModel: UnwrapModel;\n\n constructor(private relayerModel: RelayerModel) {\n this.joinModel = new JoinModel(relayerModel);\n this.exitModel = new ExitModel(relayerModel);\n this.swapModel = new SwapModel(relayerModel);\n this.unwrapModel = new UnwrapModel(relayerModel);\n }\n\n async doJoin(\n joinPoolRequest: JoinPoolRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n return this.joinModel.doJoinPool(joinPoolRequest, pools);\n }\n\n async doExit(\n exitPoolRequest: ExitPoolRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n return this.exitModel.doExitPool(exitPoolRequest, pools);\n }\n\n async doBatchSwap(\n batchSwapRequest: BatchSwapRequest,\n pools: PoolDictionary\n ): Promise {\n return this.swapModel.doBatchSwap(batchSwapRequest, pools);\n }\n\n async doSingleSwap(\n swapRequest: SwapRequest,\n pools: PoolDictionary\n ): Promise {\n return this.swapModel.doSingleSwap(swapRequest, pools);\n }\n\n async doUnwrap(\n unwrapRequest: UnwrapRequest,\n pools: PoolDictionary\n ): Promise<[string[], string[]]> {\n return this.unwrapModel.doUnwrap(unwrapRequest, pools);\n }\n}\n","import { Relayer } from '@/modules/relayer/relayer.module';\n\nexport class RelayerModel {\n chainedRefs: Record = {};\n\n /**\n * Stores `value` as the amount referenced by chained reference `ref`.\n * @param ref\n * @param value\n */\n setChainedReferenceValue(ref: string, value: string): void {\n this.chainedRefs[ref] = value;\n }\n\n /**\n * Returns the amount referenced by chained reference `ref`.\n * @param ref\n * @returns\n */\n getChainedReferenceValue(ref: string): string {\n return this.chainedRefs[ref];\n }\n\n doChainedRefReplacement(amount: string): string {\n if (Relayer.isChainedReference(amount.toString())) {\n return this.getChainedReferenceValue(amount.toString());\n } else return amount;\n }\n\n doChainedRefReplacements(amounts: string[]): string[] {\n return amounts.map((amount) =>\n this.doChainedRefReplacement(amount).toString()\n );\n }\n}\n","import { cloneDeep } from 'lodash';\nimport {\n SubgraphPoolBase,\n SubgraphToken,\n PoolDataService,\n WeightedPool,\n StablePool,\n MetaStablePool,\n LinearPool,\n PhantomStablePool,\n ComposableStablePool,\n} from '@balancer-labs/sor';\nimport { Logger } from '@/lib/utils/logger';\n\nexport interface PoolDictionary {\n [poolId: string]: Pool;\n}\n\nexport type Pool =\n | (\n | WeightedPool\n | StablePool\n | LinearPool\n | MetaStablePool\n | PhantomStablePool\n | ComposableStablePool\n ) & { SubgraphType: string };\n\nexport class PoolsSource {\n poolsArray: SubgraphPoolBase[] = [];\n poolsDict: PoolDictionary = {};\n constructor(\n private poolDataService: PoolDataService,\n private wrappedNativeAsset: string\n ) {}\n dataSource(): PoolDataService {\n return this.poolDataService;\n }\n\n async all(refresh = false): Promise {\n if (refresh || this.poolsArray.length === 0) {\n const list = cloneDeep(await this.dataSource().getPools());\n for (const pool of list) {\n // For non pre-minted BPT pools we add the BPT to the token list. This makes the SOR functions work for joins/exits\n if (\n [\n 'Weighted',\n 'Investment',\n 'Stable',\n 'LiquidityBootstrapping',\n ].includes(pool.poolType)\n ) {\n const BptAsToken: SubgraphToken = {\n address: pool.address,\n balance: pool.totalShares,\n decimals: 18,\n priceRate: '1',\n weight: '0',\n };\n pool.tokens.push(BptAsToken);\n pool.tokensList.push(pool.address);\n }\n }\n this.poolsArray = list;\n }\n return this.poolsArray;\n }\n\n parseToPoolsDict(pools: SubgraphPoolBase[]): PoolDictionary {\n return Object.fromEntries(\n cloneDeep(pools)\n .filter(\n (pool) => pool.tokensList.length > 0 && pool.tokens[0].balance !== '0'\n )\n .map((pool) => [pool.id, this.parseNewPool(pool)])\n .filter(([, pool]) => pool !== undefined)\n );\n }\n\n parseNewPool(subgraphPool: SubgraphPoolBase): Pool | undefined {\n // We're not interested in any pools which don't allow swapping\n if (!subgraphPool.swapEnabled) return undefined;\n\n let pool: Pool = {} as Pool;\n\n try {\n if (\n ['Weighted', 'Investment', 'LiquidityBootstrapping'].includes(\n subgraphPool.poolType\n )\n ) {\n const sorPool = WeightedPool.fromPool(subgraphPool, false);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType === 'Stable') {\n const sorPool = StablePool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType === 'MetaStable') {\n const sorPool = MetaStablePool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType.toString().includes('Linear')) {\n const sorPool = LinearPool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType === 'StablePhantom') {\n const sorPool = PhantomStablePool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else if (subgraphPool.poolType === 'ComposableStable') {\n const sorPool = ComposableStablePool.fromPool(subgraphPool);\n pool = sorPool as Pool;\n } else {\n const logger = Logger.getInstance();\n logger.warn(\n `Unknown pool type or type field missing: ${subgraphPool.poolType} ${subgraphPool.id}`\n );\n return undefined;\n }\n if (!pool) throw new Error('Issue with Pool');\n pool.SubgraphType = subgraphPool.poolType;\n } catch (err) {\n console.error(`Error parseNewPool`);\n return undefined;\n }\n return pool;\n }\n\n /**\n * Converts Subgraph array into PoolDictionary\n * @param refresh\n * @returns\n */\n async poolsDictionary(refresh = false): Promise {\n if (refresh || Object.keys(this.poolsDict).length === 0) {\n const poolsArray = await this.all(refresh);\n this.poolsDict = this.parseToPoolsDict(poolsArray);\n }\n return this.poolsDict;\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { Zero } from '@ethersproject/constants';\nimport { PoolDataService } from '@balancer-labs/sor';\n\nimport { PoolModel } from './poolModel/poolModel';\nimport { JoinPoolRequest } from './poolModel/join';\nimport { ExitPoolRequest } from './poolModel/exit';\nimport { BatchSwapRequest, SwapRequest } from './poolModel/swap';\nimport { UnwrapRequest } from './poolModel/unwrap';\nimport { RelayerModel } from './relayer';\nimport { PoolsSource } from './poolSource';\nimport {\n EncodeBatchSwapInput,\n EncodeJoinPoolInput,\n EncodeExitPoolInput,\n} from '../relayer/types';\nimport { Swap } from '../swaps/types';\n\nexport enum ActionType {\n BatchSwap,\n Join,\n Exit,\n Swap,\n Unwrap,\n}\n\nexport type Requests =\n | BatchSwapRequest\n | JoinPoolRequest\n | ExitPoolRequest\n | SwapRequest\n | UnwrapRequest;\n\n/**\n * Controller / use-case layer for interacting with pools data.\n */\nexport class VaultModel {\n poolsSource: PoolsSource;\n\n constructor(poolDataService: PoolDataService, wrappedNativeAsset: string) {\n this.poolsSource = new PoolsSource(poolDataService, wrappedNativeAsset);\n }\n\n updateDeltas(\n deltas: Record,\n assets: string[],\n amounts: string[]\n ): Record {\n assets.forEach((t, i) => {\n if (!deltas[t]) deltas[t] = Zero;\n deltas[t] = deltas[t].add(amounts[i]);\n });\n return deltas;\n }\n\n async multicall(\n rawCalls: Requests[],\n refresh = false\n ): Promise> {\n const relayerModel = new RelayerModel();\n const poolModel = new PoolModel(relayerModel);\n const pools = await this.poolsSource.poolsDictionary(refresh);\n const deltas: Record = {};\n for (const call of rawCalls) {\n let tokens: string[] = [];\n let amounts: string[] = [];\n switch (call.actionType) {\n case ActionType.Join: {\n [tokens, amounts] = await poolModel.doJoin(call, pools);\n break;\n }\n case ActionType.Exit: {\n [tokens, amounts] = await poolModel.doExit(call, pools);\n break;\n }\n case ActionType.BatchSwap: {\n tokens = call.assets;\n amounts = await poolModel.doBatchSwap(call, pools);\n break;\n }\n case ActionType.Swap: {\n tokens = [call.request.assetOut, call.request.assetIn];\n amounts = await poolModel.doSingleSwap(call, pools);\n break;\n }\n case ActionType.Unwrap: {\n [tokens, amounts] = await poolModel.doUnwrap(call, pools);\n break;\n }\n default:\n break;\n }\n this.updateDeltas(deltas, tokens, amounts);\n }\n return deltas;\n }\n\n static mapSwapRequest(call: Swap): SwapRequest {\n const swapRequest: SwapRequest = {\n actionType: ActionType.Swap,\n request: call.request,\n funds: call.funds,\n outputReference: call.outputReference,\n };\n return swapRequest;\n }\n\n static mapBatchSwapRequest(call: EncodeBatchSwapInput): BatchSwapRequest {\n const batchSwapRequest: BatchSwapRequest = {\n actionType: ActionType.BatchSwap,\n swaps: call.swaps,\n assets: call.assets,\n funds: call.funds,\n swapType: call.swapType,\n outputReferences: call.outputReferences,\n };\n return batchSwapRequest;\n }\n\n static mapJoinPoolRequest(call: EncodeJoinPoolInput): JoinPoolRequest {\n const joinPoolRequest: JoinPoolRequest = {\n actionType: ActionType.Join,\n poolId: call.poolId,\n encodedUserData: call.joinPoolRequest.userData,\n outputReference: call.outputReference,\n };\n return joinPoolRequest;\n }\n\n static mapExitPoolRequest(call: EncodeExitPoolInput): ExitPoolRequest {\n const exitPoolRequest: ExitPoolRequest = {\n actionType: ActionType.Exit,\n poolId: call.poolId,\n encodedUserData: call.exitPoolRequest.userData,\n outputReferences: call.outputReferences,\n };\n return exitPoolRequest;\n }\n\n static mapUnwrapRequest(\n amount: BigNumberish,\n outputReference: BigNumberish,\n poolId: string\n ): UnwrapRequest {\n const unwrapRequest: UnwrapRequest = {\n actionType: ActionType.Unwrap,\n poolId,\n amount,\n outputReference,\n };\n return unwrapRequest;\n }\n}\n","import { cloneDeep } from 'lodash';\nimport { BigNumber, BigNumberish, parseFixed } from '@ethersproject/bignumber';\nimport { AddressZero, WeiPerEther, Zero } from '@ethersproject/constants';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { EncodeJoinPoolInput, Relayer } from '@/modules/relayer/relayer.module';\nimport {\n FundManagement,\n SingleSwap,\n Swap,\n SwapType,\n} from '@/modules/swaps/types';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport { BalancerNetworkConfig, JoinPoolRequest, PoolType } from '@/types';\nimport { PoolGraph, Node } from '../graph/graph';\n\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { networkAddresses } from '@/lib/constants/config';\nimport { AssetHelpers, getEthValue, isSameAddress, replace } from '@/lib/utils';\nimport {\n SolidityMaths,\n _computeScalingFactor,\n _upscale,\n} from '@/lib/utils/solidityMaths';\nimport { calcPriceImpact } from '../pricing/priceImpact';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { getPoolAddress } from '@/pool-utils';\nimport { Simulation, SimulationType } from '../simulation/simulation.module';\nimport { Requests, VaultModel } from '../vaultModel/vaultModel.module';\nimport { SwapRequest } from '../vaultModel/poolModel/swap';\nimport { JoinPoolRequest as JoinPoolModelRequest } from '../vaultModel/poolModel/join';\nimport { JsonRpcSigner } from '@ethersproject/providers';\nimport { BalancerRelayer__factory } from '@/contracts/factories/BalancerRelayer__factory';\nimport { Logger } from '@/lib/utils/logger';\n\nconst balancerRelayerInterface = BalancerRelayer__factory.createInterface();\n\n// Quickly switch useful debug logs on/off\nconst DEBUG = false;\n\nfunction debugLog(log: string) {\n const logger = Logger.getInstance();\n if (DEBUG) logger.info(log);\n}\n\nexport class Join {\n private relayer: string;\n private wrappedNativeAsset;\n constructor(\n private poolGraph: PoolGraph,\n networkConfig: BalancerNetworkConfig,\n private simulationService: Simulation\n ) {\n const { tokens, contracts } = networkAddresses(networkConfig.chainId);\n this.relayer = contracts.balancerRelayer;\n this.wrappedNativeAsset = tokens.wrappedNativeAsset;\n }\n\n private checkInputs(tokensIn: string[], amountsIn: string[]) {\n if (tokensIn.length === 0)\n throw new BalancerError(BalancerErrorCode.MISSING_TOKENS);\n\n if (amountsIn.every((a) => a === '0'))\n throw new BalancerError(BalancerErrorCode.JOIN_WITH_ZERO_AMOUNT);\n\n if (tokensIn.length != amountsIn.length)\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n\n if (\n tokensIn.some((t) => t === AddressZero) &&\n tokensIn.some(\n (t) => t.toLowerCase() === this.wrappedNativeAsset.toLowerCase()\n )\n )\n throw new BalancerError(BalancerErrorCode.INPUT_TOKEN_INVALID);\n }\n\n async joinPool(\n poolId: string,\n tokensIn: string[],\n amountsIn: string[],\n userAddress: string,\n slippage: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType,\n authorisation?: string\n ): Promise<{\n to: string;\n encodedCall: string;\n expectedOut: string;\n minOut: string;\n priceImpact: string;\n value: BigNumberish;\n }> {\n this.checkInputs(tokensIn, amountsIn);\n\n // Create nodes for each pool/token interaction and order by breadth first\n const orderedNodes = await this.poolGraph.getGraphNodes(true, poolId, []);\n\n const nativeAssetIndex = tokensIn.findIndex((t) => t === AddressZero);\n const isNativeAssetJoin = nativeAssetIndex !== -1;\n const tokensInWithoutNativeAsset = replace(\n tokensIn,\n nativeAssetIndex,\n this.wrappedNativeAsset.toLowerCase()\n );\n\n const joinPaths = Join.getJoinPaths(\n orderedNodes,\n tokensInWithoutNativeAsset,\n amountsIn\n );\n\n const totalBptZeroPi = Join.totalBptZeroPriceImpact(joinPaths);\n /*\n - Create calls with 0 min bpt for each root join\n - static call (or V4 special call) to get actual amounts for each root join\n - Apply slippage to amounts\n - Recreate calls with minAmounts === actualAmountsWithSlippage\n - Return minAmoutOut (sum actualAmountsWithSlippage), UI would use this to display to user\n - Return updatedCalls, UI would use this to execute tx\n */\n // Create calls with 0 expected for each root join\n // Peek is enabled here so we can static call the returned amounts and use these to set limits\n debugLog(`\\n--- Simulation Calls ---`);\n const {\n multiRequests,\n encodedCall: queryData,\n outputIndexes,\n } = await this.createCalls(\n joinPaths,\n userAddress,\n isNativeAssetJoin,\n undefined,\n authorisation\n );\n\n // TODO: add this back once relayerV6 is released and we're able to peek while joining with ETH\n // const simulationValue = isNativeAssetJoin\n // ? simulationDeltas[this.wrappedNativeAsset.toLowerCase()]\n // : Zero;\n\n // static call (or V4 special call) to get actual amounts for each root join\n const { amountsOut, totalAmountOut } = await this.amountsOutByJoinPath(\n userAddress,\n multiRequests,\n queryData,\n tokensInWithoutNativeAsset,\n outputIndexes,\n signer,\n simulationType,\n '0' // TODO: change to simulationValue.tosString() once relayerV6 is released\n );\n\n const { minAmountsOut, totalMinAmountOut } = this.minAmountsOutByJoinPath(\n slippage,\n amountsOut,\n totalAmountOut\n );\n const priceImpact = calcPriceImpact(\n BigInt(totalAmountOut),\n totalBptZeroPi.toBigInt(),\n true\n ).toString();\n\n // Create calls with minAmountsOut\n debugLog(`\\n--- Final Calls ---`);\n const { encodedCall, deltas } = await this.createCalls(\n joinPaths,\n userAddress,\n isNativeAssetJoin,\n minAmountsOut,\n authorisation\n );\n\n const value = isNativeAssetJoin\n ? deltas[this.wrappedNativeAsset.toLowerCase()]\n : Zero;\n debugLog(`Total value: ${value.toString()}`);\n\n this.assertDeltas(\n poolId,\n deltas,\n tokensInWithoutNativeAsset,\n amountsIn,\n totalMinAmountOut\n );\n\n return {\n to: this.relayer,\n encodedCall,\n expectedOut: totalAmountOut,\n minOut: totalMinAmountOut,\n priceImpact,\n value,\n };\n }\n\n private assertDeltas(\n poolId: string,\n deltas: Record,\n tokensIn: string[],\n amountsIn: string[],\n minBptOut: string\n ): void {\n const poolAddress = getPoolAddress(poolId);\n const outDiff = deltas[poolAddress.toLowerCase()].add(minBptOut);\n\n if (outDiff.abs().gt(3)) {\n console.error(\n `join assertDeltas, bptOut: `,\n poolAddress,\n minBptOut,\n deltas[poolAddress.toLowerCase()]?.toString()\n );\n throw new BalancerError(BalancerErrorCode.JOIN_DELTA_AMOUNTS);\n }\n delete deltas[poolAddress.toLowerCase()];\n\n tokensIn.forEach((token, i) => {\n if (\n !BigNumber.from(amountsIn[i]).eq(0) &&\n deltas[token.toLowerCase()]?.toString() !== amountsIn[i]\n ) {\n console.error(\n `join assertDeltas, tokenIn: `,\n token,\n amountsIn[i],\n deltas[token.toLowerCase()]?.toString()\n );\n throw new BalancerError(BalancerErrorCode.JOIN_DELTA_AMOUNTS);\n }\n delete deltas[token.toLowerCase()];\n });\n\n for (const token in deltas) {\n if (deltas[token].toString() !== '0') {\n console.error(\n `join assertDeltas, non-input token should be 0: `,\n token,\n deltas[token].toString()\n );\n throw new BalancerError(BalancerErrorCode.JOIN_DELTA_AMOUNTS);\n }\n }\n }\n\n // Create join paths from tokensIn all the way to the root node.\n static getJoinPaths = (\n orderedNodes: Node[],\n tokensIn: string[],\n amountsIn: string[]\n ): Node[][] => {\n const joinPaths: Node[][] = [];\n\n // Filter all nodes that contain a token in the tokensIn array\n const inputNodes = orderedNodes.filter((node) =>\n tokensIn\n .filter((t, i) => BigNumber.from(amountsIn[i]).gt(0)) // Remove input tokens with 0 amounts\n .map((tokenIn) => tokenIn.toLowerCase())\n .includes(node.address.toLowerCase())\n );\n\n // If inputNodes contain at least one leaf token, then add path to join proportionally with all leaf tokens contained in tokensIn\n const containsLeafNode = inputNodes.some((node) => node.isLeaf);\n if (containsLeafNode) {\n joinPaths.push(orderedNodes);\n }\n\n // Add a join path for each non-leaf input node\n const nonLeafInputNodes = inputNodes.filter((node) => !node.isLeaf);\n nonLeafInputNodes.forEach((nonLeafInputNode) => {\n // Get amount in for current node\n const nonLeafAmountIn = amountsIn.find((amountIn, i) =>\n isSameAddress(tokensIn[i], nonLeafInputNode.address)\n ) as string;\n // Split amount in between nodes with same non-leaf input token based on proportionOfParent\n const totalProportions = nonLeafInputNodes\n .filter((node) => isSameAddress(node.address, nonLeafInputNode.address))\n .reduce(\n (total, node) => total.add(node.proportionOfParent),\n BigNumber.from(0)\n );\n const proportionalNonLeafAmountIn = BigNumber.from(nonLeafAmountIn)\n .mul(nonLeafInputNode.proportionOfParent)\n .div(totalProportions)\n .toString();\n // Create input node for current non-leaf input token\n const [inputTokenNode] = PoolGraph.createInputTokenNode(\n 0, // temp value that will be updated after creation\n nonLeafInputNode.address,\n nonLeafInputNode.decimals,\n nonLeafInputNode.parent,\n WeiPerEther,\n nonLeafInputNode.balance\n );\n // Update index to be actual amount in\n inputTokenNode.index = proportionalNonLeafAmountIn;\n inputTokenNode.isLeaf = false;\n // Start join path with input node\n const nonLeafJoinPath = [inputTokenNode];\n // Add each parent to the join path until we reach the root node\n let parent = inputTokenNode.parent;\n let currentChild = inputTokenNode;\n while (parent) {\n const parentCopy = cloneDeep(parent);\n parentCopy.children = parentCopy.children.map((child) => {\n if (child.address === currentChild.address) {\n // Replace original child with current child that was modified to handle the non-leaf join\n return currentChild;\n } else {\n // Update index of siblings that are not within the join path to be 0\n return { ...child, index: '0' };\n }\n });\n nonLeafJoinPath.push(parentCopy);\n currentChild = parentCopy;\n parent = parentCopy.parent;\n }\n // Add join path to list of join paths\n joinPaths.push(nonLeafJoinPath);\n });\n\n // After creating all join paths, update the index of each input node to be the amount in for that node\n // All other node indexes will be used as a reference to store the amounts out for that node\n this.updateInputAmounts(joinPaths, tokensIn, amountsIn);\n\n return joinPaths;\n };\n\n /*\n AmountsIn should be adjusted after being split between tokensIn to fix eventual rounding issues.\n This prevents the transaction to leave out dust amounts.\n */\n private static updateInputAmounts = (\n joinPaths: Node[][],\n tokensIn: string[],\n amountsIn: string[]\n ): void => {\n // Helper function to calculate and adjust amount difference for each token in\n const ajdustAmountInDiff = (\n tokenInInputNodes: Node[],\n amountIn: string\n ): void => {\n if (tokenInInputNodes.length > 1) {\n // Sum of amountsIn from each input node with same tokenIn\n const amountsInSumforTokenIn = tokenInInputNodes.reduce(\n (sum, currentNode) => sum.add(currentNode.index),\n BigNumber.from(0)\n );\n // Compare total amountIn with sum of amountIn split between each input node with same tokenIn\n const diff = BigNumber.from(amountIn).sub(amountsInSumforTokenIn);\n // Apply difference to first input node with same tokenIn\n tokenInInputNodes[0].index = diff\n .add(tokenInInputNodes[0].index)\n .toString();\n }\n };\n\n // Update amountsIn within leaf join path\n const leafJoinPath = joinPaths.find((joinPath) => joinPath[0].isLeaf);\n if (leafJoinPath) {\n // Update input proportions so inputs are shared correctly between leaf nodes with same tokenIn\n const totalProportions = this.updateTotalProportions(leafJoinPath);\n // Update input nodes to have correct input amount\n leafJoinPath.forEach((node) => {\n if (node.joinAction === 'input')\n node = this.updateNodeAmount(\n node,\n tokensIn,\n amountsIn,\n totalProportions\n );\n });\n // Adjust amountIn for each tokenIn to fix eventual rounding issues\n tokensIn.forEach((tokenIn, i) => {\n const tokenInInputNodes = leafJoinPath.filter(\n (inputNode) =>\n inputNode.isLeaf && isSameAddress(inputNode.address, tokenIn)\n );\n ajdustAmountInDiff(tokenInInputNodes, amountsIn[i]);\n });\n }\n\n // Adjust amountsIn shared between non-leaf join paths with same tokenIn\n const nonLeafJoinPaths = joinPaths.filter(\n (joinPath) => !joinPath[0].isLeaf\n );\n if (nonLeafJoinPaths.length > 1) {\n tokensIn.forEach((tokenIn, i) => {\n const tokenInInputNodes = nonLeafJoinPaths\n .map((path) => path[0])\n .filter((node) => isSameAddress(node.address, tokenIn));\n ajdustAmountInDiff(tokenInInputNodes, amountsIn[i]);\n });\n }\n };\n\n private createCalls = async (\n joinPaths: Node[][],\n userAddress: string,\n isNativeAssetJoin: boolean,\n minAmountsOut?: string[], // one for each joinPath\n authorisation?: string\n ): Promise<{\n multiRequests: Requests[][];\n encodedCall: string;\n outputIndexes: number[];\n deltas: Record;\n }> => {\n // Create calls for both leaf and non-leaf inputs\n const { multiRequests, encodedCalls, outputIndexes, deltas } =\n this.createActionCalls(\n joinPaths,\n userAddress,\n isNativeAssetJoin,\n minAmountsOut\n );\n\n if (authorisation) {\n encodedCalls.unshift(this.createSetRelayerApproval(authorisation));\n }\n const encodedCall = balancerRelayerInterface.encodeFunctionData(\n 'multicall',\n [encodedCalls]\n );\n\n return {\n multiRequests,\n encodedCall,\n outputIndexes: authorisation\n ? outputIndexes.map((i) => i + 1)\n : outputIndexes,\n deltas,\n };\n };\n\n /*\n 1. For each input token:\n 1. recursively find the spot price for each pool in the path of the join\n 2. take the product to get the spot price of the path\n 3. multiply the input amount of that token by the path spot price to get the \"zeroPriceImpact\" amount of BPT for that token\n 2. Sum each tokens zeroPriceImpact BPT amount to get total zeroPriceImpact BPT\n */\n static totalBptZeroPriceImpact = (joinPaths: Node[][]): BigNumber => {\n // Add bptZeroPriceImpact for all inputs\n let totalBptZeroPi = BigNumber.from('0');\n joinPaths.forEach((joinPath) => {\n const isLeafJoin = joinPath[0].isLeaf;\n if (isLeafJoin) {\n // Calculate bptZeroPriceImpact for leaf inputs\n const leafNodes = joinPath.filter((node) => node.isLeaf);\n leafNodes.forEach((leafNode) => {\n const bptOut = this.bptOutZeroPiForInputNode(leafNode);\n totalBptZeroPi = totalBptZeroPi.add(bptOut);\n });\n } else {\n // Calculate bptZeroPriceImpact for non-leaf inputs\n const bptOut = this.bptOutZeroPiForInputNode(joinPath[0]);\n totalBptZeroPi = totalBptZeroPi.add(bptOut);\n }\n });\n return totalBptZeroPi;\n };\n\n /*\n 1. recursively find the spot price for each pool in the path of the join\n 2. take the product to get the spot price of the path\n 3. multiply the input amount of that token by the path spot price to get the \"zeroPriceImpact\" amount of BPT for that token \n */\n static bptOutZeroPiForInputNode = (inputNode: Node): bigint => {\n if (inputNode.index === '0' || inputNode.joinAction !== 'input')\n return BigInt(0);\n let spProduct = 1;\n let parentNode: Node | undefined = inputNode.parent;\n let childAddress = inputNode.address;\n // Traverse up graph until we reach root adding each node\n while (parentNode !== undefined) {\n if (\n parentNode.joinAction === 'batchSwap' ||\n parentNode.joinAction === 'joinPool'\n ) {\n const sp = parentNode.spotPrices[childAddress.toLowerCase()];\n spProduct = spProduct * parseFloat(sp);\n childAddress = parentNode.address;\n }\n parentNode = parentNode.parent;\n }\n const spPriceScaled = parseFixed(spProduct.toFixed(18), 18);\n const scalingFactor = _computeScalingFactor(BigInt(inputNode.decimals));\n const inputAmountScaled = _upscale(BigInt(inputNode.index), scalingFactor);\n const bptOut = SolidityMaths.divDownFixed(\n inputAmountScaled,\n spPriceScaled.toBigInt()\n );\n return bptOut;\n };\n\n /*\n Simulate transaction and decodes each output of interest.\n */\n private amountsOutByJoinPath = async (\n userAddress: string,\n multiRequests: Requests[][],\n callData: string,\n tokensIn: string[],\n outputIndexes: number[],\n signer: JsonRpcSigner,\n simulationType: SimulationType,\n value: string\n ): Promise<{ amountsOut: string[]; totalAmountOut: string }> => {\n const amountsOut = await this.simulationService.simulateGeneralisedJoin(\n this.relayer,\n multiRequests,\n callData,\n outputIndexes,\n userAddress,\n tokensIn,\n signer,\n simulationType,\n value\n );\n\n const totalAmountOut = amountsOut\n .reduce((sum, amount) => sum.add(BigNumber.from(amount)), Zero)\n .toString();\n\n return {\n amountsOut,\n totalAmountOut,\n };\n };\n\n /*\n Apply slippage to amounts\n */\n private minAmountsOutByJoinPath = (\n slippage: string,\n amounts: string[],\n totalAmountOut: string\n ): { minAmountsOut: string[]; totalMinAmountOut: string } => {\n const minAmountsOut = amounts.map((amount) =>\n subSlippage(BigNumber.from(amount), BigNumber.from(slippage)).toString()\n );\n const totalMinAmountOut = subSlippage(\n BigNumber.from(totalAmountOut),\n BigNumber.from(slippage)\n ).toString();\n\n return {\n minAmountsOut,\n totalMinAmountOut,\n };\n };\n\n private updateDeltas(\n deltas: Record,\n assets: string[],\n amounts: string[]\n ): Record {\n assets.forEach((t, i) => {\n const asset = t.toLowerCase();\n if (!deltas[asset]) deltas[asset] = Zero;\n deltas[asset] = deltas[asset].add(amounts[i]);\n });\n return deltas;\n }\n\n // Create actions for each Node and return in multicall array\n // Create calls for each path, use value stored in minBptAmounts if available\n private createActionCalls = (\n joinPaths: Node[][],\n userAddress: string,\n isNativeAssetJoin: boolean,\n minAmountsOut?: string[]\n ): {\n multiRequests: Requests[][];\n encodedCalls: string[];\n outputIndexes: number[];\n deltas: Record;\n } => {\n const multiRequests: Requests[][] = [];\n const encodedCalls: string[] = [];\n const outputIndexes: number[] = [];\n const isSimulation = !minAmountsOut;\n const deltas: Record = {};\n\n joinPaths.forEach((joinPath, j) => {\n const isLeafJoin = joinPath[0].isLeaf;\n const modelRequests: Requests[] = [];\n\n joinPath.forEach((node, i) => {\n // Prevent adding action calls with input amounts equal 0\n if (\n node.children.length > 0 &&\n node.children.filter((c) => this.shouldBeConsidered(c)).length === 0\n ) {\n node.index = '0';\n return;\n }\n\n // Sender's rule\n // 1. If any child node is an input node, tokens are coming from the user\n const hasChildInput = node.children\n .filter((c) => this.shouldBeConsidered(c))\n .some((c) => c.joinAction === 'input');\n const sender = hasChildInput ? userAddress : this.relayer;\n\n // Recipient's rule\n // 1. Transactions with sibling input node must be sent to user because it will be the sender of the following transaction (per sender's rule above)\n // e.g. boostedMetaAlt - MAI/bbausd - joining with MAI from user and bbausd from earlier actions. MAI needs to come from user.\n // 2. Last transaction must be sent to the user\n // 3. Otherwise relayer\n // Note: scenario 1 usually happens with joinPool transactions that have both BPT and undelying tokens as tokensIn\n const isLastChainedCall = i === joinPath.length - 1;\n const hasSiblingInput =\n (isLeafJoin && // non-leaf joins don't have siblings that should be considered\n node.parent?.children\n .filter((s) => this.shouldBeConsidered(s))\n .some((s) => s.joinAction === 'input')) ??\n false;\n const recipient =\n isLastChainedCall || hasSiblingInput ? userAddress : this.relayer;\n\n // Last action will use minBptOut to protect user. Middle calls can safely have 0 minimum as tx will revert if last fails.\n const minOut =\n isLastChainedCall && minAmountsOut ? minAmountsOut[j] : '0';\n\n switch (node.joinAction) {\n case 'batchSwap':\n {\n const { modelRequest, encodedCall, assets, amounts } =\n this.createSwap(\n node,\n j,\n minOut,\n sender,\n recipient,\n isNativeAssetJoin,\n isSimulation\n );\n modelRequests.push(modelRequest);\n encodedCalls.push(encodedCall);\n this.updateDeltas(deltas, assets, amounts);\n }\n break;\n case 'joinPool':\n {\n const { modelRequest, encodedCall, assets, amounts, minBptOut } =\n this.createJoinPool(\n node,\n j,\n minOut,\n sender,\n recipient,\n isNativeAssetJoin,\n isSimulation\n );\n modelRequests.push(modelRequest);\n encodedCalls.push(encodedCall);\n this.updateDeltas(\n deltas,\n [node.address, ...assets],\n [minBptOut, ...amounts]\n );\n }\n break;\n default:\n return;\n }\n });\n if (isSimulation) {\n const outputRef = 100 * j;\n const encodedPeekCall = Relayer.encodePeekChainedReferenceValue(\n Relayer.toChainedReference(outputRef, false)\n );\n encodedCalls.push(encodedPeekCall);\n outputIndexes.push(encodedCalls.indexOf(encodedPeekCall));\n }\n multiRequests.push(modelRequests);\n });\n\n return { multiRequests, encodedCalls, outputIndexes, deltas };\n };\n\n /**\n * Creates a map of node address and total proportion. Used for the case where there may be multiple inputs using same token, e.g. DAI input to 2 pools.\n * @param nodes nodes to consider.\n */\n static updateTotalProportions = (\n nodes: Node[]\n ): Record => {\n const totalProportions: Record = {};\n nodes.forEach((node) => {\n if (!totalProportions[node.address])\n totalProportions[node.address] = node.proportionOfParent;\n else {\n totalProportions[node.address] = totalProportions[node.address].add(\n node.proportionOfParent\n );\n }\n });\n return totalProportions;\n };\n\n /**\n * Uses relayer to approve itself to act in behalf of the user\n *\n * @param authorisation Encoded authorisation call.\n * @returns relayer approval call\n */\n private createSetRelayerApproval = (authorisation: string): string => {\n return Relayer.encodeSetRelayerApproval(this.relayer, true, authorisation);\n };\n\n static updateNodeAmount = (\n node: Node,\n tokensIn: string[],\n amountsIn: string[],\n totalProportions: Record\n ): Node => {\n /*\n An input node requires a real amount (not an outputRef) as it is first node in chain.\n This amount will be used when chaining to parent.\n Amounts are split proportionally between all inputs with same token.\n */\n const tokenIndex = tokensIn\n .map((t) => t.toLowerCase())\n .indexOf(node.address.toLowerCase());\n if (tokenIndex === -1) {\n node.index = '0';\n return node;\n }\n\n // Calculate proportional split\n const totalProportion = totalProportions[node.address];\n const inputProportion = node.proportionOfParent\n .mul((1e18).toString())\n .div(totalProportion);\n const inputAmount = inputProportion\n .mul(amountsIn[tokenIndex])\n .div((1e18).toString());\n // Update index with actual value\n node.index = inputAmount.toString();\n // console.log(\n // `${node.type} ${node.address} prop: ${node.proportionOfParent.toString()}\n // ${node.joinAction} (\n // Inputs: ${inputAmount.toString()}\n // OutputRef: ${node.index}\n // )`\n // );\n return node;\n };\n\n private createSwap = (\n node: Node,\n joinPathIndex: number,\n expectedOut: string,\n sender: string,\n recipient: string,\n isNativeAssetJoin: boolean,\n isSimulation: boolean\n ): {\n modelRequest: SwapRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n } => {\n // We only need swaps for main > linearBpt so shouldn't be more than token > token\n if (node.children.length !== 1) throw new Error('Unsupported swap');\n const tokenIn = node.children[0].address;\n const amountIn = this.getOutputRefValue(joinPathIndex, node.children[0]);\n\n // Single swap limits are always positive\n // Swap within generalisedJoin is always exactIn, so use minAmountOut to set limit\n const limit: string = expectedOut;\n\n const assetIn =\n isNativeAssetJoin && !isSimulation\n ? this.replaceWrappedNativeAsset([tokenIn])[0]\n : tokenIn;\n\n const request: SingleSwap = {\n poolId: node.id,\n kind: SwapType.SwapExactIn,\n assetIn,\n assetOut: node.address,\n amount: amountIn.value,\n userData: '0x',\n };\n\n const fromInternalBalance = this.allImmediateChildrenSendToInternal(node);\n const toInternalBalance = this.allSiblingsSendToInternal(node);\n\n const funds: FundManagement = {\n sender,\n recipient,\n fromInternalBalance,\n toInternalBalance,\n };\n\n const outputReference = BigNumber.from(\n this.getOutputRefValue(joinPathIndex, node).value\n );\n\n const value =\n isNativeAssetJoin && !isSimulation\n ? getEthValue([assetIn], [amountIn.value])\n : Zero;\n\n const call: Swap = {\n request,\n funds,\n limit,\n deadline: BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value,\n outputReference,\n };\n\n const encodedCall = Relayer.encodeSwap(call);\n\n debugLog(`\\nSwap:`);\n debugLog(`${JSON.stringify(call)}`);\n debugLog(`Partial value: ${JSON.stringify(call.value?.toString())}`);\n\n const modelRequest = VaultModel.mapSwapRequest(call);\n\n const hasChildInput = node.children.some((c) => c.joinAction === 'input');\n // If node has no child input the swap is part of a chain and token in shouldn't be considered for user deltas\n const userTokenIn = !hasChildInput ? '0' : amountIn.value;\n // If node has parent the swap is part of a chain and BPT out shouldn't be considered for user deltas\n const userBptOut =\n node.parent != undefined\n ? '0'\n : BigNumber.from(expectedOut).mul(-1).toString(); // needs to be negative because it's handled by the vault model as an amount going out of the vault\n\n const assets = [node.address, tokenIn];\n const amounts = [userBptOut, userTokenIn];\n\n return { modelRequest, encodedCall, assets, amounts };\n };\n\n private createJoinPool = (\n node: Node,\n joinPathIndex: number,\n minAmountOut: string,\n sender: string,\n recipient: string,\n isNativeAssetJoin: boolean,\n isSimulation: boolean\n ): {\n modelRequest: JoinPoolModelRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n minBptOut: string;\n } => {\n const inputTokens: string[] = [];\n const inputAmts: string[] = [];\n\n // inputTokens needs to include each asset even if it has 0 amount\n node.children.forEach((child) => {\n inputTokens.push(child.address);\n // non-leaf joins should set input amounts only for children that are in their joinPath\n if (this.shouldBeConsidered(child)) {\n inputAmts.push(this.getOutputRefValue(joinPathIndex, child).value);\n } else {\n inputAmts.push('0');\n }\n });\n\n if (node.type === PoolType.ComposableStable) {\n // assets need to include the phantomPoolToken\n inputTokens.push(node.address);\n // need to add a placeholder so sorting works\n inputAmts.push('0');\n }\n\n // sort inputs\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [sortedTokens, sortedAmounts] = assetHelpers.sortTokens(\n inputTokens,\n inputAmts\n ) as [string[], string[]];\n\n // userData amounts should not include the BPT of the pool being joined\n let userDataAmounts = [];\n const bptIndex = sortedTokens\n .map((t) => t.toLowerCase())\n .indexOf(node.address.toLowerCase());\n if (bptIndex === -1) {\n userDataAmounts = sortedAmounts;\n } else {\n userDataAmounts = [\n ...sortedAmounts.slice(0, bptIndex),\n ...sortedAmounts.slice(bptIndex + 1),\n ];\n }\n\n let userData: string;\n if (node.type === PoolType.Weighted) {\n userData = WeightedPoolEncoder.joinExactTokensInForBPTOut(\n userDataAmounts,\n minAmountOut\n );\n } else {\n userData = StablePoolEncoder.joinExactTokensInForBPTOut(\n userDataAmounts,\n minAmountOut\n );\n }\n\n const value =\n isNativeAssetJoin && !isSimulation\n ? getEthValue(\n this.replaceWrappedNativeAsset(sortedTokens),\n sortedAmounts\n )\n : Zero;\n\n const fromInternalBalance = this.allImmediateChildrenSendToInternal(node);\n\n const call: EncodeJoinPoolInput = Relayer.formatJoinPoolInput({\n poolId: node.id,\n kind: 0,\n sender,\n recipient,\n value,\n outputReference: this.getOutputRefValue(joinPathIndex, node).value,\n joinPoolRequest: {} as JoinPoolRequest,\n assets:\n isNativeAssetJoin && !isSimulation\n ? this.replaceWrappedNativeAsset(sortedTokens)\n : sortedTokens, // Must include BPT token\n maxAmountsIn: sortedAmounts,\n userData,\n fromInternalBalance,\n });\n const encodedCall = Relayer.encodeJoinPool(call);\n\n debugLog(`\\nJoin:`);\n debugLog(JSON.stringify(call));\n debugLog(`Partial value: ${JSON.stringify(call.value?.toString())}`);\n const modelRequest = VaultModel.mapJoinPoolRequest(call);\n\n const userAmountsTokenIn = sortedAmounts.map((a) =>\n Relayer.isChainedReference(a) ? '0' : a\n );\n const userAmountOut = Relayer.isChainedReference(minAmountOut)\n ? '0'\n : minAmountOut;\n\n const hasChildInput = node.children\n .filter((c) => this.shouldBeConsidered(c))\n .some((c) => c.joinAction === 'input');\n // If node has no child input the join is part of a chain and amounts in shouldn't be considered for user deltas\n const assets = !hasChildInput ? [] : sortedTokens;\n const amounts = !hasChildInput ? [] : userAmountsTokenIn;\n // If node has parent the join is part of a chain and shouldn't be considered for user deltas\n const minBptOut =\n node.parent != undefined\n ? Zero.toString()\n : Zero.sub(userAmountOut).toString(); // -ve because coming from Vault\n\n return { modelRequest, encodedCall, assets, amounts, minBptOut };\n };\n\n private getOutputRefValue = (\n joinPathIndex: number,\n node: Node\n ): { value: string; isRef: boolean } => {\n if (node.joinAction === 'input') {\n // Input nodes have their indexes set as the actual input amount, instead of a chained reference\n return { value: node.index, isRef: false };\n } else if (node.index !== '0' || !node.parent) {\n // Root node (parent === undefined) has index zero, but should still pass chained reference as outputRef value\n return {\n value: Relayer.toChainedReference(\n BigNumber.from(node.index).add(joinPathIndex * 100)\n ).toString(),\n isRef: true,\n };\n } else {\n return {\n value: '0',\n isRef: true,\n };\n }\n };\n\n // Nodes with index 0 won't affect transactions so they shouldn't be considered\n private shouldBeConsidered = (node: Node): boolean => {\n return node.index !== '0';\n };\n\n // joinPool transaction always sends to non-internal balance\n // input always behave as sending to non-internal balance\n private sendsToInternalBalance = (node: Node): boolean => {\n return node.joinAction !== 'input' && node.joinAction !== 'joinPool';\n };\n\n private allImmediateChildrenSendToInternal = (node: Node): boolean => {\n const children = node.children.filter((c) => this.shouldBeConsidered(c));\n if (children.length === 0) return false;\n return (\n children.filter((c) => this.sendsToInternalBalance(c)).length ===\n children.length\n );\n };\n\n private allSiblingsSendToInternal = (node: Node): boolean => {\n if (!node.parent) return false;\n const siblings = node.parent.children.filter((s) =>\n this.shouldBeConsidered(s)\n );\n return (\n siblings.filter((s) => this.sendsToInternalBalance(s)).length ===\n siblings.length\n );\n };\n\n private replaceWrappedNativeAsset = (tokens: string[]): string[] => {\n const wrappedNativeAssetIndex = tokens.findIndex(\n (t) => t.toLowerCase() === this.wrappedNativeAsset.toLowerCase()\n );\n return replace(tokens, wrappedNativeAssetIndex, AddressZero);\n };\n}\n","import axios from 'axios';\nimport { AddressZero, MaxInt256 } from '@ethersproject/constants';\nimport { parseFixed } from '@ethersproject/bignumber';\n\nimport { networkAddresses } from '@/lib/constants/config';\nimport { BalancerTenderlyConfig } from '@/types';\n\ntype StateOverrides = {\n [address: string]: { value: { [key: string]: string } };\n};\n\nexport default class TenderlyHelper {\n private vaultAddress;\n private tenderlyUrl;\n private opts?;\n private blockNumber: number | undefined;\n\n constructor(private chainId: number, tenderlyConfig: BalancerTenderlyConfig) {\n const { contracts } = networkAddresses(this.chainId);\n this.vaultAddress = contracts.vault as string;\n this.tenderlyUrl = `https://api.tenderly.co/api/v1/account/${tenderlyConfig.user}/project/${tenderlyConfig.project}/`;\n this.opts = {\n headers: {\n 'X-Access-Key': tenderlyConfig.accessKey,\n },\n };\n\n this.blockNumber = tenderlyConfig.blockNumber;\n }\n\n simulateMulticall = async (\n to: string,\n data: string,\n userAddress: string,\n tokens: string[],\n value = '0'\n ): Promise => {\n const tokensOverrides = await this.encodeBalanceAndAllowanceOverrides(\n userAddress,\n tokens\n );\n const relayerApprovalOverride = await this.encodeRelayerApprovalOverride(\n userAddress,\n to\n );\n const encodedStateOverrides = {\n ...tokensOverrides,\n ...relayerApprovalOverride,\n };\n return this.simulateTransaction(\n to,\n data,\n userAddress,\n encodedStateOverrides,\n value\n );\n };\n\n simulateTransaction = async (\n to: string,\n data: string,\n userAddress: string,\n encodedStateOverrides: StateOverrides,\n value: string\n ): Promise => {\n // Map encoded-state response into simulate request body by replacing property names\n const stateOverrides = Object.fromEntries(\n Object.keys(encodedStateOverrides).map((address) => {\n // Object.fromEntries require format [key, value] instead of {key: value}\n return [address, { storage: encodedStateOverrides[address].value }];\n })\n );\n\n // Set user balance to 1000 ETH to make sure the simulation doesn't fail due to insufficient balance\n const state_objects = {\n ...stateOverrides,\n [userAddress]: {\n balance: parseFixed('100', 18).toHexString(),\n },\n };\n\n const body = {\n // -- Standard TX fields --\n network_id: this.chainId.toString(),\n block_number: this.blockNumber,\n from: userAddress,\n to,\n input: data,\n // gas: 8000000,\n // gas_price: '0',\n value,\n // -- Simulation config (tenderly specific) --\n save_if_fails: true,\n // save: true,\n simulation_type: 'quick', // remove this while developing/debugging\n state_objects,\n };\n\n const SIMULATE_URL = this.tenderlyUrl + 'simulate';\n\n const resp = await axios.post(SIMULATE_URL, body, this.opts);\n\n const simulatedTransactionOutput =\n resp.data.transaction.transaction_info.call_trace.output;\n\n return simulatedTransactionOutput;\n };\n\n // Encode relayer approval state override\n encodeRelayerApprovalOverride = async (\n userAddress: string,\n relayerAddress: string\n ): Promise => {\n const stateOverrides: StateOverrides = {\n [`${this.vaultAddress}`]: {\n value: {\n [`_approvedRelayers[${userAddress}][${relayerAddress}]`]:\n true.toString(),\n },\n },\n };\n\n const encodedStateOverrides = await this.requestStateOverrides(\n stateOverrides\n );\n\n return encodedStateOverrides;\n };\n\n // Encode token balances and allowances overrides to max value\n encodeBalanceAndAllowanceOverrides = async (\n userAddress: string,\n tokens: string[]\n ): Promise => {\n const tokensWithoutNativeAsset = tokens.filter(\n (token) => token !== AddressZero\n );\n\n if (tokensWithoutNativeAsset.length === 0) return {};\n\n // Create balances and allowances overrides for each token address provided\n let stateOverrides: StateOverrides = {};\n tokensWithoutNativeAsset.forEach(\n (token) =>\n (stateOverrides = {\n ...stateOverrides,\n [`${token}`]: {\n value: {\n [`_balances[${userAddress}]`]: MaxInt256.toString(),\n [`_allowances[${userAddress}][${this.vaultAddress}]`]:\n MaxInt256.toString(),\n [`balanceOf[${userAddress}]`]: MaxInt256.toString(),\n [`allowance[${userAddress}][${this.vaultAddress}]`]:\n MaxInt256.toString(),\n [`balances[${userAddress}]`]: MaxInt256.toString(),\n [`allowed[${userAddress}][${this.vaultAddress}]`]:\n MaxInt256.toString(),\n },\n },\n })\n );\n\n const encodedStateOverrides = await this.requestStateOverrides(\n stateOverrides\n );\n\n if (\n Object.keys(encodedStateOverrides).some((k) => {\n return Object.keys(encodedStateOverrides[k].value).length !== 2;\n })\n )\n throw new Error(\n \"Couldn't encode state overrides - states should match the ones in the contracts\"\n );\n\n return encodedStateOverrides;\n };\n\n private requestStateOverrides = async (\n stateOverrides: StateOverrides\n ): Promise => {\n const ENCODE_STATES_URL = this.tenderlyUrl + 'contracts/encode-states';\n const body = {\n networkID: this.chainId.toString(),\n stateOverrides,\n };\n\n const encodedStatesResponse = await axios.post(\n ENCODE_STATES_URL,\n body,\n this.opts\n );\n const encodedStateOverrides = encodedStatesResponse.data\n .stateOverrides as StateOverrides;\n\n if (\n !encodedStateOverrides ||\n Object.keys(encodedStateOverrides).length !==\n Object.keys(stateOverrides).length\n )\n throw new Error(\n \"Couldn't encode state overrides - contracts should be verified and whitelisted on Tenderly\"\n );\n\n return encodedStateOverrides;\n };\n}\n","import { PoolDataService } from '@balancer-labs/sor';\nimport { defaultAbiCoder } from '@ethersproject/abi';\nimport { JsonRpcSigner } from '@ethersproject/providers';\n\nimport TenderlyHelper from '@/lib/utils/tenderlyHelper';\nimport { BalancerNetworkConfig } from '@/types';\n\nimport { VaultModel, Requests } from '../vaultModel/vaultModel.module';\n\nexport enum SimulationType {\n Tenderly,\n VaultModel,\n Static,\n}\n\n/**\n * Simulation module is responsible for simulating the results of a generalised\n * join or exit using different types of simulation, such as:\n * - Tenderly: uses Tenderly Simulation API (third party service)\n * - VaultModel: uses TS math, which may be less accurate (min. 99% accuracy)\n * - Static: uses staticCall, which is 100% accurate but requires vault approval\n *\n * This module allows a user to perform a simulation and check for expected\n * amounts out in order to make an informed decision on whether to proceed with\n * the transaction. These expected amounts out can be used as limits to prevent\n * frontrunning and ensure that the transaction will return minimum amounts out.\n */\n\nexport class Simulation {\n private tenderlyHelper?: TenderlyHelper;\n private vaultModel: VaultModel | undefined;\n constructor(\n networkConfig: BalancerNetworkConfig,\n poolDataService?: PoolDataService\n ) {\n if (networkConfig.tenderly) {\n this.tenderlyHelper = new TenderlyHelper(\n networkConfig.chainId,\n networkConfig.tenderly\n );\n }\n if (!poolDataService) {\n this.vaultModel = undefined;\n } else {\n this.vaultModel = new VaultModel(\n poolDataService,\n networkConfig.addresses.tokens.wrappedNativeAsset\n );\n }\n }\n\n simulateGeneralisedJoin = async (\n to: string,\n multiRequests: Requests[][],\n encodedCall: string,\n outputIndexes: number[],\n userAddress: string,\n tokensIn: string[],\n signer: JsonRpcSigner,\n simulationType: SimulationType,\n value: string\n ): Promise => {\n const amountsOut: string[] = [];\n switch (simulationType) {\n case SimulationType.Tenderly: {\n if (!this.tenderlyHelper) {\n throw new Error('Missing Tenderly config');\n }\n const simulationResult = await this.tenderlyHelper.simulateMulticall(\n to,\n encodedCall,\n userAddress,\n tokensIn,\n value\n );\n amountsOut.push(...this.decodeResult(simulationResult, outputIndexes));\n break;\n }\n\n case SimulationType.VaultModel: {\n const requestResult = await this.simulateRequests(multiRequests);\n amountsOut.push(...requestResult);\n break;\n }\n case SimulationType.Static: {\n const staticResult = await signer.call({\n to,\n data: encodedCall,\n value,\n });\n\n try {\n amountsOut.push(...this.decodeResult(staticResult, outputIndexes));\n } catch (_) {\n // decoding output failed, so we assume the response contains an error message and try to decode it instead\n const decodedResponse = Buffer.from(\n staticResult.split('x')[1],\n 'hex'\n ).toString('utf8');\n throw new Error(\n `Transaction reverted with error: ${decodedResponse}`\n );\n }\n break;\n }\n default:\n throw new Error('Simulation type not supported');\n }\n return amountsOut;\n };\n\n simulateGeneralisedExit = async (\n to: string,\n multiRequests: Requests[][],\n encodedCall: string,\n outputIndexes: number[],\n userAddress: string,\n tokenIn: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType\n ): Promise => {\n const amountsOut: string[] = [];\n switch (simulationType) {\n case SimulationType.Tenderly: {\n if (!this.tenderlyHelper) {\n throw new Error('Missing Tenderly config');\n }\n const simulationResult = await this.tenderlyHelper.simulateMulticall(\n to,\n encodedCall,\n userAddress,\n [tokenIn]\n );\n amountsOut.push(...this.decodeResult(simulationResult, outputIndexes));\n break;\n }\n\n case SimulationType.VaultModel: {\n const requestResult = await this.simulateRequests(multiRequests);\n amountsOut.push(...requestResult);\n break;\n }\n case SimulationType.Static: {\n const staticResult = await signer.call({\n to,\n data: encodedCall,\n });\n try {\n amountsOut.push(...this.decodeResult(staticResult, outputIndexes));\n } catch (_) {\n // decoding output failed, so we assume the response contains an error message and try to decode it instead\n const decodedResponse = Buffer.from(\n staticResult.split('x')[1],\n 'hex'\n ).toString('utf8');\n throw new Error(\n `Transaction reverted with error: ${decodedResponse}`\n );\n }\n break;\n }\n default:\n throw new Error('Simulation type not supported');\n }\n return amountsOut;\n };\n\n private decodeResult = (result: string, outputIndexes: number[]) => {\n const multicallResult = defaultAbiCoder.decode(\n ['bytes[]'],\n result\n )[0] as string[];\n\n // Decode each root output\n const amountsOut = outputIndexes.map((outputIndex) => {\n const result = defaultAbiCoder.decode(\n ['uint256'],\n multicallResult[outputIndex]\n );\n return result.toString();\n });\n\n return amountsOut;\n };\n\n private simulateRequests = async (multiRequests: Requests[][]) => {\n if (this.vaultModel === undefined)\n throw new Error('Missing Vault Model Config.');\n // make one multicall for each exitPath\n // take only bptOut/tokenOut delta into account\n const amountsOut: string[] = [];\n for (const [i, requests] of multiRequests.entries()) {\n const deltas = await this.vaultModel.multicall(requests, i === 0);\n const tokenOutDeltas = Object.values(deltas).filter((d) => d.lt(0));\n if (tokenOutDeltas.length === 0)\n throw new Error('No delta found for token out.');\n amountsOut.push(...tokenOutDeltas.map((d) => d.mul(-1).toString()));\n }\n return amountsOut;\n };\n}\n","import { cloneDeep } from 'lodash';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { WeiPerEther, Zero } from '@ethersproject/constants';\nimport { JsonRpcSigner } from '@ethersproject/providers';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { BalancerRelayer__factory } from '@/contracts/factories/BalancerRelayer__factory';\nimport { networkAddresses } from '@/lib/constants/config';\nimport { AssetHelpers, subSlippage } from '@/lib/utils';\nimport { PoolGraph, Node } from '@/modules/graph/graph';\nimport { Join } from '@/modules/joins/joins.module';\nimport { calcPriceImpact } from '@/modules/pricing/priceImpact';\nimport {\n EncodeUnwrapInput,\n OutputReference,\n Relayer,\n EncodeBatchSwapInput,\n} from '@/modules/relayer/relayer.module';\nimport {\n Simulation,\n SimulationType,\n} from '@/modules/simulation/simulation.module';\nimport {\n FundManagement,\n SingleSwap,\n Swap,\n SwapType,\n BatchSwapStep,\n} from '@/modules/swaps/types';\nimport { ExitPoolRequest as ExitPoolModelRequest } from '@/modules/vaultModel/poolModel/exit';\nimport {\n BatchSwapRequest,\n SwapRequest,\n} from '@/modules/vaultModel/poolModel/swap';\nimport { UnwrapRequest } from '@/modules/vaultModel/poolModel/unwrap';\nimport { Requests, VaultModel } from '@/modules/vaultModel/vaultModel.module';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport { getPoolAddress } from '@/pool-utils';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { BalancerNetworkConfig, ExitPoolRequest, PoolType } from '@/types';\nimport { Logger } from '@/lib/utils/logger';\n\nconst balancerRelayerInterface = BalancerRelayer__factory.createInterface();\n\nexport interface GeneralisedExitOutput {\n to: string;\n encodedCall: string;\n tokensOut: string[];\n expectedAmountsOut: string[];\n minAmountsOut: string[];\n priceImpact: string;\n}\n\nexport interface ExitInfo {\n tokensOut: string[];\n estimatedAmountsOut: string[];\n priceImpact: string;\n tokensToUnwrap: string[];\n}\n\n// Quickly switch useful debug logs on/off\nconst DEBUG = false;\n\nfunction debugLog(log: string) {\n const logger = Logger.getInstance();\n if (DEBUG) logger.info(log);\n}\n\nexport class Exit {\n private wrappedNativeAsset: string;\n private relayer: string;\n\n constructor(\n private poolGraph: PoolGraph,\n networkConfig: BalancerNetworkConfig,\n private simulationService: Simulation\n ) {\n const { tokens, contracts } = networkAddresses(networkConfig.chainId);\n this.wrappedNativeAsset = tokens.wrappedNativeAsset;\n this.relayer = contracts.balancerRelayer;\n }\n\n async getExitInfo(\n poolId: string,\n amountBptIn: string,\n userAddress: string,\n signer: JsonRpcSigner\n ): Promise<{\n tokensOut: string[];\n estimatedAmountsOut: string[];\n priceImpact: string;\n tokensToUnwrap: string[];\n }> {\n debugLog(`\\n--- getExitInfo()`);\n /*\n Overall exit flow description:\n - Create calls with 0 expected min amount for each token out\n - static call (or V4 special call) to get actual amounts for each token out\n - Apply slippage to amountsOut\n - Recreate calls with minAmounts === actualAmountsWithSlippage\n - Return minAmoutsOut, UI would use this to display to user\n - Return updatedCalls, UI would use this to execute tx\n */\n const exit = await this.getExit(\n poolId,\n amountBptIn,\n userAddress,\n signer,\n [],\n SimulationType.VaultModel\n );\n\n return {\n tokensOut: exit.tokensOut,\n estimatedAmountsOut: exit.expectedAmountsOut,\n priceImpact: exit.priceImpact,\n tokensToUnwrap: exit.tokensToUnwrap,\n };\n }\n\n async buildExitCall(\n poolId: string,\n amountBptIn: string,\n userAddress: string,\n slippage: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType.Static | SimulationType.Tenderly,\n authorisation?: string,\n tokensToUnwrap?: string[]\n ): Promise<{\n to: string;\n encodedCall: string;\n tokensOut: string[];\n expectedAmountsOut: string[];\n minAmountsOut: string[];\n priceImpact: string;\n }> {\n debugLog(\n `\\n--- exitPool(): simulationType: ${simulationType} - tokensToUnwrap: ${tokensToUnwrap}`\n );\n /*\n Overall exit flow description:\n - Create calls with 0 expected min amount for each token out\n - static call (or V4 special call) to get actual amounts for each token out\n - Apply slippage to amountsOut\n - Recreate calls with minAmounts === actualAmountsWithSlippage\n - Return minAmoutsOut, UI would use this to display to user\n - Return updatedCalls, UI would use this to execute tx\n */\n\n const exit = await this.getExit(\n poolId,\n amountBptIn,\n userAddress,\n signer,\n tokensToUnwrap ?? [],\n simulationType,\n authorisation\n );\n\n const { minAmountsOutByExitPath, minAmountsOutByTokenOut } =\n this.minAmountsOut(\n exit.expectedAmountsOutByExitPath,\n exit.expectedAmountsOut,\n slippage\n );\n\n debugLog(`------------ Updating limits...`);\n // Create calls with minimum expected amount out for each exit path\n const { encodedCall, deltas } = await this.createCalls(\n exit.exitPaths,\n userAddress,\n exit.isProportional,\n minAmountsOutByExitPath,\n authorisation\n );\n\n this.assertDeltas(\n poolId,\n deltas,\n amountBptIn,\n exit.tokensOut,\n minAmountsOutByTokenOut\n );\n\n return {\n to: this.relayer,\n encodedCall,\n tokensOut: exit.tokensOut,\n expectedAmountsOut: exit.expectedAmountsOut,\n minAmountsOut: minAmountsOutByTokenOut,\n priceImpact: exit.priceImpact,\n };\n }\n\n private async getExit(\n poolId: string,\n amountBptIn: string,\n userAddress: string,\n signer: JsonRpcSigner,\n tokensToUnwrap: string[],\n simulationType: SimulationType,\n authorisation?: string\n ): Promise<{\n tokensToUnwrap: string[];\n tokensOut: string[];\n exitPaths: Node[][];\n isProportional: boolean;\n expectedAmountsOut: string[];\n expectedAmountsOutByExitPath: string[];\n priceImpact: string;\n }> {\n // Create nodes and order by breadth first - initially trys with no unwrapping\n const orderedNodes = await this.poolGraph.getGraphNodes(\n false,\n poolId,\n tokensToUnwrap\n );\n\n const isProportional = PoolGraph.isProportionalPools(orderedNodes);\n debugLog(`\\nisProportional = ${isProportional}`);\n\n let exitPaths: Node[][] = [];\n let tokensOutByExitPath: string[] = [];\n let tokensOut: string[] = [];\n\n const outputNodes = orderedNodes.filter((n) => n.exitAction === 'output');\n tokensOutByExitPath = outputNodes.map((n) => n.address.toLowerCase());\n\n tokensOut = [...new Set(tokensOutByExitPath)].sort();\n\n if (isProportional) {\n // All proportional will have single path from root node, exiting proportionally by ref all the way to leafs\n const path = orderedNodes.map((node, i) => {\n // First node should exit with full BPT amount in\n if (i === 0) node.index = amountBptIn;\n return node;\n });\n exitPaths[0] = path;\n } else {\n // Create exit paths for each output node and splits amount in proportionally between them\n exitPaths = this.getExitPaths(outputNodes, amountBptIn);\n }\n\n // Create calls with minimum expected amount out for each exit path\n const {\n multiRequests,\n encodedCall: queryData,\n outputIndexes,\n } = await this.createCalls(\n exitPaths,\n userAddress,\n isProportional,\n undefined,\n authorisation\n );\n\n const expectedAmountsOutByExitPath = await this.amountsOutByExitPath(\n userAddress,\n multiRequests,\n queryData,\n orderedNodes[0].address,\n outputIndexes,\n signer,\n simulationType\n );\n\n const tokensWithInsufficientBalance = outputNodes\n .filter((outputNode, i) =>\n BigNumber.from(expectedAmountsOutByExitPath[i]).gt(outputNode.balance)\n )\n .map((node) => node.address.toLowerCase());\n\n if (\n tokensToUnwrap.some((t) =>\n tokensWithInsufficientBalance.includes(t.toLowerCase())\n )\n ) {\n /**\n * This means there is not enough balance to exit to main or wrapped tokens only\n */\n throw new Error(\n 'Insufficient pool balance to perform generalised exit - try exitting with smaller amounts'\n );\n } else if (tokensWithInsufficientBalance.length > 0) {\n return await this.getExit(\n poolId,\n amountBptIn,\n userAddress,\n signer,\n [...new Set(tokensWithInsufficientBalance)].sort(),\n simulationType,\n authorisation\n );\n } else {\n const expectedAmountsOut = this.amountsOutByTokenOut(\n tokensOut,\n tokensOutByExitPath,\n expectedAmountsOutByExitPath\n );\n\n const priceImpact = await this.calculatePriceImpact(\n poolId,\n this.poolGraph,\n tokensOut,\n expectedAmountsOut,\n amountBptIn\n );\n\n return {\n tokensToUnwrap,\n tokensOut,\n exitPaths,\n isProportional,\n expectedAmountsOut,\n expectedAmountsOutByExitPath,\n priceImpact,\n };\n }\n }\n\n /*\n (From Fernando)\n 1. Given a bpt amount in find the expect token amounts out (proportionally)\n 2. Uses bptZeroPi = _bptForTokensZeroPriceImpact (the same is used for joins too)\n 3. PI = bptAmountIn / bptZeroPi - 1\n */\n private async calculatePriceImpact(\n poolId: string,\n poolGraph: PoolGraph,\n tokensOut: string[],\n amountsOut: string[],\n amountBptIn: string\n ): Promise {\n // Create nodes for each pool/token interaction and order by breadth first\n const orderedNodesForJoin = await poolGraph.getGraphNodes(true, poolId, []);\n const joinPaths = Join.getJoinPaths(\n orderedNodesForJoin,\n tokensOut,\n amountsOut\n );\n const totalBptZeroPi = Join.totalBptZeroPriceImpact(joinPaths);\n const priceImpact = calcPriceImpact(\n BigInt(amountBptIn),\n totalBptZeroPi.toBigInt(),\n false\n ).toString();\n return priceImpact;\n }\n\n private assertDeltas(\n poolId: string,\n deltas: Record,\n bptIn: string,\n tokensOut: string[],\n amountsOut: string[]\n ): void {\n const poolAddress = getPoolAddress(poolId);\n const outDiff = deltas[poolAddress.toLowerCase()].sub(bptIn);\n\n if (outDiff.abs().gt(3)) {\n console.error(\n `exit assertDeltas, bptIn: `,\n poolAddress,\n bptIn,\n deltas[poolAddress.toLowerCase()]?.toString()\n );\n throw new BalancerError(BalancerErrorCode.EXIT_DELTA_AMOUNTS);\n }\n delete deltas[poolAddress.toLowerCase()];\n\n tokensOut.forEach((token, i) => {\n const diff = deltas[token.toLowerCase()].add(amountsOut[i]);\n if (diff.abs().gt(1)) {\n console.error(\n `exit assertDeltas, tokenOut: `,\n token,\n amountsOut[i],\n deltas[token.toLowerCase()]?.toString()\n );\n throw new BalancerError(BalancerErrorCode.EXIT_DELTA_AMOUNTS);\n }\n delete deltas[token.toLowerCase()];\n });\n\n for (const token in deltas) {\n if (deltas[token].toString() !== '0') {\n console.error(\n `exit assertDeltas, non-input token should be 0: `,\n token,\n deltas[token].toString()\n );\n throw new BalancerError(BalancerErrorCode.EXIT_DELTA_AMOUNTS);\n }\n }\n }\n\n // Query amounts out through static call and return decoded result\n private amountsOutByExitPath = async (\n userAddress: string,\n multiRequests: Requests[][],\n callData: string,\n tokenIn: string,\n outputIndexes: number[],\n signer: JsonRpcSigner,\n simulationType: SimulationType\n ): Promise => {\n const amountsOutByExitPath =\n await this.simulationService.simulateGeneralisedExit(\n this.relayer,\n multiRequests,\n callData,\n outputIndexes,\n userAddress,\n tokenIn,\n signer,\n simulationType\n );\n\n return amountsOutByExitPath;\n };\n\n // Aggregate amounts out by exit path into amounts out by token out\n private amountsOutByTokenOut = (\n tokensOut: string[],\n tokensOutByExitPath: string[],\n expectedAmountsOutByExitPath: string[]\n ) => {\n // Aggregate amountsOutByExitPath into expectedAmountsOut\n const expectedAmountsOutMap: Record = {};\n tokensOutByExitPath.forEach(\n (tokenOut, i) =>\n (expectedAmountsOutMap[tokenOut] = (\n expectedAmountsOutMap[tokenOut] ?? Zero\n ).add(expectedAmountsOutByExitPath[i]))\n );\n const expectedAmountsOut = tokensOut.map((tokenOut) =>\n expectedAmountsOutMap[tokenOut].toString()\n );\n\n return expectedAmountsOut;\n };\n\n // Apply slippage tolerance to expected amounts out\n private minAmountsOut = (\n expectedAmountsOutByExitPath: string[],\n expectedAmountsOutByTokenOut: string[],\n slippage: string\n ) => {\n // Apply slippage tolerance on expected amount out for each exit path\n const minAmountsOutByExitPath = expectedAmountsOutByExitPath.map(\n (expectedAmountOut) =>\n subSlippage(\n BigNumber.from(expectedAmountOut),\n BigNumber.from(slippage)\n ).toString()\n );\n\n // Apply slippage tolerance on expected amount out for each token out\n const minAmountsOutByTokenOut = expectedAmountsOutByTokenOut.map(\n (expectedAmountOut) =>\n subSlippage(\n BigNumber.from(expectedAmountOut),\n BigNumber.from(slippage)\n ).toString()\n );\n\n return { minAmountsOutByExitPath, minAmountsOutByTokenOut };\n };\n\n // Create one exit path for each output node\n private getExitPaths = (outputNodes: Node[], amountIn: string): Node[][] => {\n const exitPaths = outputNodes.map((outputNode) => {\n const exitPath = [outputNode];\n while (exitPath[0].parent) {\n exitPath.unshift(cloneDeep(exitPath[0].parent));\n }\n /*\n The input/root node requires a real amount (not a reference/index) as it is first node in chain.\n This amount will be used when chaining to children.\n */\n exitPath[0].index = exitPath[exitPath.length - 1].proportionOfParent\n .mul(amountIn)\n .div(WeiPerEther)\n .toString();\n return exitPath;\n });\n\n /*\n Amounts in for exit paths should be adjusted after caculated to fix eventual rounding issues\n */\n // Sum amountIn for each exit path\n const amountsInSum = exitPaths.reduce((accumulator, currentExitPath) => {\n const amountInForCurrentExitPath = currentExitPath[0].index;\n return BigNumber.from(amountInForCurrentExitPath).add(accumulator);\n }, Zero);\n // Compare total amountIn with sum of calculated amountIn for each exit path\n const amountsInDiff = BigNumber.from(amountIn).sub(amountsInSum);\n // Add diff to last exit path amountIn\n exitPaths[exitPaths.length - 1][0].index = amountsInDiff\n .add(exitPaths[exitPaths.length - 1][0].index)\n .toString();\n\n return exitPaths;\n };\n\n private async createCalls(\n exitPaths: Node[][],\n userAddress: string,\n isProportional: boolean,\n minAmountsOut?: string[],\n authorisation?: string\n ): Promise<{\n multiRequests: Requests[][];\n encodedCall: string;\n outputIndexes: number[];\n deltas: Record;\n }> {\n const { multiRequests, calls, outputIndexes, deltas } =\n this.createActionCalls(\n cloneDeep(exitPaths),\n userAddress,\n isProportional,\n minAmountsOut\n );\n\n if (authorisation) {\n calls.unshift(\n Relayer.encodeSetRelayerApproval(this.relayer, true, authorisation)\n );\n }\n\n const encodedCall = balancerRelayerInterface.encodeFunctionData(\n 'multicall',\n [calls]\n );\n\n return {\n multiRequests,\n encodedCall,\n outputIndexes: authorisation\n ? outputIndexes.map((i) => i + 1)\n : outputIndexes,\n deltas,\n };\n }\n\n private updateDeltas(\n deltas: Record,\n assets: string[],\n amounts: string[]\n ): Record {\n assets.forEach((t, i) => {\n const asset = t.toLowerCase();\n if (!deltas[asset]) deltas[asset] = Zero;\n deltas[asset] = deltas[asset].add(amounts[i]);\n });\n return deltas;\n }\n\n private createActionCalls(\n exitPaths: Node[][],\n userAddress: string,\n isProportional: boolean,\n minAmountsOut?: string[]\n ): {\n multiRequests: Requests[][];\n calls: string[];\n outputIndexes: number[];\n deltas: Record;\n } {\n const multiRequests: Requests[][] = [];\n const calls: string[] = [];\n const outputIndexes: number[] = [];\n const isPeek = !minAmountsOut;\n const deltas: Record = {};\n\n const getSenderAddress = (exitPath: Node[], node: Node) => {\n // Calls from root node are sent by the user\n if (!node.parent) return userAddress;\n // Otherwise sent by the parent's recipient\n return getRecipientAddress(exitPath, node.parent);\n };\n\n const getRecipientAddress = (exitPath: Node[], node: Node) => {\n // Always send to user on calls that contain outputs, otherwise send to relayer\n const exitChildren = node.children.filter((child) =>\n exitPath.map((n) => n.index).includes(child.index)\n );\n const hasOutputChild = exitChildren.some(\n (c) => c.exitAction === 'output'\n );\n return hasOutputChild ? userAddress : this.relayer;\n };\n\n // Create actions for each Node and return in multicall array\n\n exitPaths.forEach((exitPath, i) => {\n const modelRequests: Requests[] = [];\n const outputNodes = exitPath.filter(\n (node) => node.exitAction === 'output'\n );\n exitPath.forEach((node) => {\n // Find the exit child node\n const exitChild = node.children.find((child) =>\n exitPath.map((n) => n.index).includes(child.index)\n );\n\n const sender = getSenderAddress(exitPath, node);\n const recipient = getRecipientAddress(exitPath, node);\n\n const exitChildren = node.children.filter((child) =>\n exitPath.map((n) => n.index).includes(child.index)\n );\n // An action that has either outputs or unwraps as child actions is the last action where we're able to set limits on expected output amounts\n const isLastActionWithLimits = exitChildren.some(\n (c) => c.exitAction === 'output' || c.exitAction === 'unwrap'\n );\n\n // Last calls will use minAmountsOut to protect user. Middle calls can safely have 0 minimum as tx will revert if last fails.\n let minAmountOut = '0';\n const minAmountsOutProportional = Array(node.children.length).fill('0');\n if (minAmountsOut && isLastActionWithLimits) {\n if (isProportional) {\n // Proportional exits have a minAmountOut for each output node within a single exit path\n\n /**\n * minAmountsOut is related to the whole multicall transaction, while\n * minAmountsOutProportional is related only to the current node/transaction\n * This section is responsible for mapping each minAmountOut to their\n * respective position on the minAmountsOutProportional array\n * TODO: extract to a function so it's easier to understand\n */\n node.children.forEach((child, i) => {\n let outputChildIndex: number;\n if (child.exitAction === 'unwrap') {\n outputChildIndex = outputNodes.indexOf(child.children[0]);\n minAmountOut = WeiPerEther.mul(minAmountsOut[outputChildIndex])\n .div(child.priceRate)\n .toString();\n } else if (child.exitAction === 'output') {\n outputChildIndex = outputNodes.indexOf(child);\n minAmountOut = minAmountsOut[outputChildIndex];\n } else {\n minAmountOut = '0'; // clears minAmountOut if it's not an output or unwrap\n }\n minAmountsOutProportional[i] = minAmountOut;\n });\n } else {\n // Non-proportional exits have a minAmountOut for each exit path\n if (exitChild?.exitAction === 'unwrap') {\n minAmountOut = WeiPerEther.mul(minAmountsOut[i])\n .div(exitChild.priceRate)\n .toString();\n } else {\n minAmountOut = minAmountsOut[i];\n }\n }\n }\n\n switch (node.exitAction) {\n case 'unwrap': {\n const { modelRequest, encodedCall, assets, amounts } =\n this.createUnwrap(\n node,\n exitChild as Node,\n i,\n minAmountOut,\n sender,\n recipient\n );\n modelRequests.push(modelRequest);\n calls.push(encodedCall);\n this.updateDeltas(deltas, assets, amounts);\n break;\n }\n case 'batchSwap': {\n const { modelRequest, encodedCall, assets, amounts } =\n this.createSwap(\n node,\n exitChild as Node,\n i,\n minAmountOut,\n sender,\n recipient\n );\n modelRequests.push(modelRequest);\n calls.push(encodedCall);\n this.updateDeltas(deltas, assets, amounts);\n break;\n }\n case 'exitPool': {\n let exit;\n if (isProportional) {\n exit = this.createExitPoolProportional(\n node,\n minAmountsOutProportional,\n sender,\n recipient\n );\n } else {\n exit = this.createExitPool(\n node,\n exitChild as Node,\n i,\n minAmountOut,\n sender,\n recipient\n );\n }\n const { modelRequest, encodedCall, bptIn, tokensOut, amountsOut } =\n exit;\n modelRequests.push(modelRequest);\n calls.push(encodedCall);\n this.updateDeltas(\n deltas,\n [node.address, ...tokensOut],\n [bptIn, ...amountsOut]\n );\n break;\n }\n case 'output':\n if (isPeek) {\n calls.push(\n Relayer.encodePeekChainedReferenceValue(\n Relayer.toChainedReference(\n this.getOutputRef(i, node.index),\n false\n )\n )\n );\n outputIndexes.push(calls.length - 1);\n }\n break;\n default:\n return;\n }\n });\n multiRequests.push(modelRequests);\n });\n\n return { multiRequests, calls, outputIndexes, deltas };\n }\n\n private createUnwrap = (\n node: Node,\n exitChild: Node,\n exitPathIndex: number,\n minAmountOut: string,\n sender: string,\n recipient: string\n ): {\n modelRequest: UnwrapRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n } => {\n const amount = Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, node.index)\n ).toString();\n const outputReference = Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, exitChild.index)\n );\n\n const linearPoolType = node.parent?.type as string;\n\n const call: EncodeUnwrapInput = {\n wrappedToken: node.address,\n sender,\n recipient,\n amount,\n outputReference,\n };\n\n const encodedCall = Relayer.encodeUnwrap(call, linearPoolType);\n\n debugLog(`linear type: , ${linearPoolType}`);\n debugLog('\\nUwrap:');\n debugLog(JSON.stringify(call));\n\n const modelRequest = VaultModel.mapUnwrapRequest(\n amount,\n outputReference,\n node.parent?.id as string // linear pool id\n );\n\n const assets = [exitChild.address];\n const amounts = [Zero.sub(minAmountOut).toString()]; // needs to be negative because it's handled by the vault model as an amount going out of the vault\n return { modelRequest, encodedCall, assets, amounts };\n };\n\n private createSwap(\n node: Node,\n exitChild: Node,\n exitPathIndex: number,\n minAmountOut: string,\n sender: string,\n recipient: string\n ): {\n modelRequest: SwapRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n } {\n const isRootNode = !node.parent;\n const amountIn = isRootNode\n ? node.index\n : Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, node.index)\n ).toString();\n\n const tokenOut = exitChild.address;\n const assets = [tokenOut, node.address];\n\n // Single swap limits are always positive\n // Swap within generalisedExit is always exactIn, so use minAmountOut to set limit\n const limit: string = minAmountOut;\n\n const request: SingleSwap = {\n poolId: node.id,\n kind: SwapType.SwapExactIn,\n assetIn: node.address,\n assetOut: tokenOut,\n amount: amountIn,\n userData: '0x',\n };\n\n const fromInternalBalance = this.receivesFromInternal(node);\n const toInternalBalance = this.receivesFromInternal(exitChild);\n\n const funds: FundManagement = {\n sender,\n recipient,\n fromInternalBalance,\n toInternalBalance,\n };\n\n const outputReference = Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, exitChild.index)\n );\n\n const call: Swap = {\n request,\n funds,\n limit,\n deadline: BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value: '0', // TODO: check if swap with ETH is possible in this case and handle it\n outputReference,\n };\n debugLog('\\nSwap:');\n debugLog(JSON.stringify(call));\n\n const encodedCall = Relayer.encodeSwap(call);\n\n const modelRequest = VaultModel.mapSwapRequest(call);\n\n // If node isn't rootNode, the swap is part of a chain and shouldn't be considered for user deltas\n const bptIn = !isRootNode ? '0' : amountIn;\n // If child exit action is not output, the swap is part of a chain and shouldn't be considered for user deltas\n const userTokenOutAmount =\n exitChild.exitAction !== 'output'\n ? '0'\n : BigNumber.from(minAmountOut).mul(-1).toString(); // needs to be negative because it's handled by the vault model as an amount going out of the vault\n const amounts = [userTokenOutAmount, bptIn];\n\n return { modelRequest, encodedCall, assets, amounts };\n }\n\n private createBatchSwap(\n node: Node,\n exitChildren: Node[],\n exitPathIndex: number,\n minAmountsOut: string[],\n sender: string,\n recipient: string\n ): {\n modelRequest: BatchSwapRequest;\n encodedCall: string;\n assets: string[];\n amounts: string[];\n } {\n const isRootNode = !node.parent;\n const amountIn = isRootNode\n ? node.index\n : Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, node.index)\n ).toString();\n\n const tokensOut = exitChildren.map((n) => n.address);\n const assets = [...tokensOut, node.address];\n // TODO - setting these right?\n const limits = [...minAmountsOut];\n limits.push(amountIn);\n const batchSwapSteps: BatchSwapStep[] = [];\n const outputReferences: OutputReference[] = [];\n exitChildren.forEach((child, i) => {\n // TODO - Is this correct?\n const amount = child.proportionOfParent\n .mul(amountIn)\n .div(WeiPerEther)\n .toString();\n const swapStep: BatchSwapStep = {\n poolId: node.id,\n assetInIndex: assets.length - 1,\n assetOutIndex: i,\n amount,\n userData: '0x',\n };\n batchSwapSteps.push(swapStep);\n // TODO - Is this right?\n outputReferences.push({\n index: i,\n key: Relayer.toChainedReference(this.getOutputRef(0, child.index)),\n });\n });\n\n const total = batchSwapSteps.reduce((acc, swap) => {\n return acc.add(swap.amount);\n }, BigNumber.from(0));\n const dust = BigNumber.from(amountIn).sub(total);\n batchSwapSteps[0].amount = dust.add(batchSwapSteps[0].amount).toString();\n\n const fromInternalBalance = this.receivesFromInternal(node);\n // TODO - This is assuming that all exit to same, is this right?\n const toInternalBalance = this.receivesFromInternal(exitChildren[0]);\n\n const funds: FundManagement = {\n sender,\n recipient,\n fromInternalBalance,\n toInternalBalance,\n };\n\n const call: EncodeBatchSwapInput = {\n swapType: SwapType.SwapExactIn,\n swaps: batchSwapSteps,\n assets,\n funds,\n limits,\n deadline: BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value: '0', // TODO: check if swap with ETH is possible in this case and handle it\n outputReferences,\n };\n debugLog('\\nBatchSwap:');\n debugLog(JSON.stringify(call));\n\n const encodedCall = Relayer.encodeBatchSwap(call);\n\n const modelRequest = VaultModel.mapBatchSwapRequest(call);\n\n // If node isn't rootNode, the swap is part of a chain and shouldn't be considered for user deltas\n const bptIn = !isRootNode ? '0' : amountIn;\n // If child exit action is not output, the swap is part of a chain and shouldn't be considered for user deltas\n const userTokensOut = exitChildren.map((child, i) => {\n const userTokenOutAmount =\n child.exitAction !== 'output'\n ? '0'\n : BigNumber.from(minAmountsOut[i]).mul(-1).toString(); // needs to be negative because it's handled by the vault model as an amount going out of the vault\n return userTokenOutAmount;\n });\n\n const amounts = [...userTokensOut, bptIn];\n\n return { modelRequest, encodedCall, assets, amounts };\n }\n\n private createExitPool(\n node: Node,\n exitChild: Node,\n exitPathIndex: number,\n minAmountOut: string,\n sender: string,\n recipient: string\n ): {\n modelRequest: ExitPoolModelRequest;\n encodedCall: string;\n bptIn: string;\n tokensOut: string[];\n amountsOut: string[];\n } {\n const tokenOut = exitChild.address;\n const isRootNode = !node.parent;\n const amountIn = isRootNode\n ? node.index\n : Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, node.index)\n ).toString();\n\n const tokensOut: string[] = [];\n const amountsOut: string[] = [];\n\n // tokensOut needs to include each asset even if it has 0 amount\n node.children.forEach((child) => {\n tokensOut.push(child.address);\n amountsOut.push(child.address === tokenOut ? minAmountOut : '0');\n });\n\n if (node.type === PoolType.ComposableStable) {\n // assets need to include the phantomPoolToken\n tokensOut.push(node.address);\n // need to add a placeholder so sorting works\n amountsOut.push('0');\n }\n\n // sort inputs\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [sortedTokens, sortedAmounts] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n // userData amounts should not include the BPT of the pool being joined\n let userDataTokens = [];\n const bptIndex = sortedTokens\n .map((t) => t.toLowerCase())\n .indexOf(node.address.toLowerCase());\n if (bptIndex === -1) {\n userDataTokens = sortedTokens;\n } else {\n userDataTokens = [\n ...sortedTokens.slice(0, bptIndex),\n ...sortedTokens.slice(bptIndex + 1),\n ];\n }\n\n let userData: string;\n if (node.type === PoolType.Weighted) {\n userData = WeightedPoolEncoder.exitExactBPTInForOneTokenOut(\n amountIn,\n userDataTokens.indexOf(tokenOut)\n );\n } else {\n userData = StablePoolEncoder.exitExactBPTInForOneTokenOut(\n amountIn,\n userDataTokens.indexOf(tokenOut)\n );\n }\n\n const outputReferences = [\n {\n index: sortedTokens\n .map((t) => t.toLowerCase())\n .indexOf(tokenOut.toLowerCase()),\n key: Relayer.toChainedReference(\n this.getOutputRef(exitPathIndex, exitChild.index)\n ),\n },\n ];\n\n const toInternalBalance = this.receivesFromInternal(exitChild);\n\n const call = Relayer.formatExitPoolInput({\n poolId: node.id,\n poolKind: 0,\n sender,\n recipient,\n outputReferences,\n exitPoolRequest: {} as ExitPoolRequest,\n assets: sortedTokens,\n minAmountsOut: sortedAmounts,\n userData,\n toInternalBalance,\n });\n debugLog('\\nExit:');\n debugLog(JSON.stringify(call));\n\n const encodedCall = Relayer.encodeExitPool(call);\n const modelRequest = VaultModel.mapExitPoolRequest(call);\n\n const userAmountTokensOut = sortedAmounts.map((a) =>\n Relayer.isChainedReference(a) ? '0' : Zero.sub(a).toString()\n );\n const userBptIn = Relayer.isChainedReference(amountIn) ? '0' : amountIn;\n // If node isn't rootNode, the exit is part of a chain and shouldn't be considered for user deltas\n const deltaBptIn = !isRootNode ? Zero.toString() : userBptIn;\n // // If child exit action is not output, the exit is part of a chain and shouldn't be considered for user deltas\n const deltaTokensOut =\n exitChild.exitAction !== 'output' ? [] : sortedTokens;\n const deltaAmountsOut =\n exitChild.exitAction !== 'output' ? [] : userAmountTokensOut;\n\n return {\n modelRequest,\n encodedCall,\n bptIn: deltaBptIn,\n tokensOut: deltaTokensOut,\n amountsOut: deltaAmountsOut,\n };\n }\n\n private createExitPoolProportional(\n node: Node,\n minAmountsOut: string[],\n sender: string,\n recipient: string\n ): {\n modelRequest: ExitPoolModelRequest;\n encodedCall: string;\n bptIn: string;\n tokensOut: string[];\n amountsOut: string[];\n } {\n const isRootNode = !node.parent;\n const amountIn = isRootNode\n ? node.index\n : Relayer.toChainedReference(this.getOutputRef(0, node.index)).toString();\n\n const tokensOut = node.children.map((child) => child.address);\n const amountsOut = [...minAmountsOut];\n\n if (node.type === PoolType.ComposableStable) {\n // assets need to include the phantomPoolToken\n tokensOut.push(node.address);\n // need to add a placeholder so sorting works\n amountsOut.push('0');\n }\n\n // TODO: we shoule consider let the graph handle sorting instead of manipulating\n // token order within actions - specially now that we have different sorting\n // cases and that the subgraph is already handling them properly\n\n // sort inputs\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [sortedTokens, sortedAmounts] = assetHelpers.sortTokens(\n tokensOut,\n amountsOut\n ) as [string[], string[]];\n\n let userData: string;\n if (node.type === PoolType.Weighted) {\n userData = WeightedPoolEncoder.exitExactBPTInForTokensOut(amountIn);\n } else if (node.type === PoolType.ComposableStable) {\n userData =\n ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut(amountIn);\n } else {\n // TODO: double check if it's ok to set the Stable Pool Encoder as the default/else case\n userData = StablePoolEncoder.exitExactBPTInForTokensOut(amountIn);\n }\n\n const outputReferences = node.children.map((child) => {\n return {\n index: sortedTokens\n .map((t) => t.toLowerCase())\n .indexOf(child.address.toLowerCase()),\n key: Relayer.toChainedReference(this.getOutputRef(0, child.index)),\n };\n });\n // We have to use correct pool type based off following from Relayer:\n // enum PoolKind { WEIGHTED, LEGACY_STABLE, COMPOSABLE_STABLE, COMPOSABLE_STABLE_V2 }\n // (note only Weighted and COMPOSABLE_STABLE_V2 will support proportional exits)\n let kind = 0;\n if (node.type === PoolType.ComposableStable) {\n kind = 3;\n }\n\n const allChildrenReceiveFromInternal = node.children.every((child) =>\n this.receivesFromInternal(child)\n );\n\n const call = Relayer.formatExitPoolInput({\n poolId: node.id,\n poolKind: kind,\n sender,\n recipient,\n outputReferences,\n exitPoolRequest: {} as ExitPoolRequest,\n assets: sortedTokens,\n minAmountsOut: sortedAmounts,\n userData,\n toInternalBalance: allChildrenReceiveFromInternal,\n });\n debugLog('\\nExitProportional:');\n debugLog(JSON.stringify(call));\n const encodedCall = Relayer.encodeExitPool(call);\n const modelRequest = VaultModel.mapExitPoolRequest(call);\n\n const userAmountTokensOut = sortedAmounts.map((a) =>\n Relayer.isChainedReference(a) ? '0' : Zero.sub(a).toString()\n );\n const userBptIn = Relayer.isChainedReference(amountIn) ? '0' : amountIn;\n // If current node is the root node the exit the delta BPT in should be considered for user deltas\n const deltaBptIn = isRootNode ? userBptIn : Zero.toString();\n // If the respective child node is an output, it should be considered for user deltas\n const deltaTokensOut = sortedTokens.filter((t) =>\n node.children\n .filter((c) => c.exitAction === 'output')\n .map((c) => c.address)\n .includes(t)\n );\n const deltaAmountsOut = userAmountTokensOut.filter((_, i) =>\n deltaTokensOut.includes(sortedTokens[i])\n );\n\n return {\n modelRequest,\n encodedCall,\n bptIn: deltaBptIn,\n tokensOut: deltaTokensOut,\n amountsOut: deltaAmountsOut,\n };\n }\n\n private getOutputRef = (exitPathIndex: number, nodeIndex: string): number => {\n return exitPathIndex * 100 + parseInt(nodeIndex);\n };\n\n // node without parent is the root node and it receives from non-internal balance\n // exitPool always expects amounts from non-internal balance\n // output always behave as receiving from non-internal balance\n // others should always receive from internal balance\n private receivesFromInternal = (node: Node): boolean => {\n if (!node.parent) return false;\n return (\n node.exitAction !== 'output' &&\n node.exitAction !== 'unwrap' &&\n node.exitAction !== 'exitPool'\n );\n };\n}\n","/**\n * Calculates pool fees\n *\n * 1. Pool fees in last 24hrs\n */\nimport { isLessThan24Hours } from '@/lib/utils/time';\nimport { Pool, Findable, PoolAttribute } from '@/types';\n\nexport class PoolVolume {\n constructor(\n private yesterdaysPools: Findable | undefined\n ) {}\n\n // 🚨 this is adding 1 call to get yesterday's block height and 2nd call to fetch yesterday's pools data from subgraph\n // TODO: find a better data source for that eg. add blocks to graph, replace with a database, or dune\n async last24h(pool: Pool): Promise {\n let yesterdaysPool;\n if (this.yesterdaysPools) {\n yesterdaysPool = await this.yesterdaysPools.find(pool.id);\n }\n\n if (!pool.totalSwapVolume) {\n return 0;\n }\n\n if (!yesterdaysPool?.totalSwapVolume) {\n // Process edge case when pool creation time is less that 24h\n if (pool.createTime && isLessThan24Hours(pool.createTime)) {\n return parseFloat(pool.totalSwapVolume);\n }\n return 0;\n }\n\n return (\n parseFloat(pool.totalSwapVolume) -\n parseFloat(yesterdaysPool.totalSwapVolume)\n );\n }\n}\n","import { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport {\n ComposableStableCreatePoolParameters,\n InitJoinPoolAttributes,\n InitJoinPoolParameters,\n JoinPoolDecodedAttributes,\n JoinPoolRequestDecodedAttributes,\n} from '@/modules/pools/factory/types';\nimport { balancerVault, networkAddresses } from '@/lib/constants/config';\nimport { AssetHelpers, getRandomBytes32 } from '@/lib/utils';\nimport { PoolFactory } from '@/modules/pools/factory/pool-factory';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { BalancerNetworkConfig } from '@/types';\nimport {\n ComposableStablePool__factory,\n ComposableStablePoolFactory__factory,\n} from '@/contracts';\nimport { JsonRpcProvider, TransactionReceipt } from '@ethersproject/providers';\nimport { LogDescription } from '@ethersproject/abi';\nimport { findEventInReceiptLogs } from '@/lib/utils';\nimport { Contract } from '@ethersproject/contracts';\nimport { ContractInstances } from '@/modules/contracts/contracts.module';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { ComposableStablePoolInterface } from '@/contracts/ComposableStablePool';\n\nexport class ComposableStableFactory implements PoolFactory {\n private wrappedNativeAsset: string;\n private contracts: ContractInstances;\n\n constructor(\n networkConfig: BalancerNetworkConfig,\n contracts: ContractInstances\n ) {\n const { tokens } = networkAddresses(networkConfig.chainId);\n this.wrappedNativeAsset = tokens.wrappedNativeAsset;\n this.contracts = contracts;\n }\n\n /**\n * Builds a transaction for a composable pool create operation.\n * @param name The name of the pool\n * @param symbol The symbol of the pool\n * @param tokenAddresses The token's addresses\n * @param amplificationParameter The amplification parameter(must be greater than 1)\n * @param rateProviders The addresses of the rate providers for each token, ordered\n * @param tokenRateCacheDurations the Token Rate Cache Duration of each token\n * @param exemptFromYieldProtocolFeeFlags Array containing boolean for each token exemption from yield protocol fee flags\n * @param swapFeeEvm The swapFee for the owner of the pool in string format parsed to evm(100% is 1e18, 10% is 1e17, 1% is 1e16)\n * @param owner The address of the owner of the pool\n * @returns A TransactionRequest object, which can be directly inserted in the transaction to create a composable stable pool\n */\n create({\n name,\n symbol,\n tokenAddresses,\n amplificationParameter,\n rateProviders,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n swapFeeEvm,\n owner,\n salt,\n }: ComposableStableCreatePoolParameters): { to?: string; data: BytesLike } {\n this.checkCreateInputs({\n rateProviders,\n tokenAddresses,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n swapFeeEvm,\n });\n const params = this.parseCreateParamsForEncoding({\n name,\n symbol,\n tokenAddresses,\n amplificationParameter,\n rateProviders,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n swapFeeEvm,\n owner,\n salt,\n });\n const encodedFunctionData = this.encodeCreateFunctionData(params);\n return {\n to: this.contracts.composableStablePoolFactory?.address,\n data: encodedFunctionData,\n };\n }\n\n checkCreateInputs = ({\n tokenAddresses,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n rateProviders,\n swapFeeEvm,\n }: Pick<\n ComposableStableCreatePoolParameters,\n | 'rateProviders'\n | 'tokenRateCacheDurations'\n | 'tokenAddresses'\n | 'exemptFromYieldProtocolFeeFlags'\n | 'swapFeeEvm'\n >): void => {\n if (\n tokenAddresses.length !== tokenRateCacheDurations.length ||\n tokenRateCacheDurations.length !==\n exemptFromYieldProtocolFeeFlags.length ||\n exemptFromYieldProtocolFeeFlags.length !== rateProviders.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n if (BigInt(swapFeeEvm) <= BigInt(0) || BigInt(swapFeeEvm) > BigInt(1e17)) {\n throw new BalancerError(BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE);\n }\n };\n parseCreateParamsForEncoding = ({\n name,\n symbol,\n tokenAddresses,\n amplificationParameter,\n rateProviders,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags,\n swapFeeEvm,\n owner,\n salt,\n }: ComposableStableCreatePoolParameters): [\n string,\n string,\n string[],\n string,\n string[],\n string[],\n boolean[],\n string,\n string,\n BytesLike\n ] => {\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [\n sortedTokens,\n sortedRateProviders,\n sortedTokenRateCacheDurations,\n sortedExemptFromYieldProtocols,\n ] = assetHelpers.sortTokens(\n tokenAddresses,\n rateProviders,\n tokenRateCacheDurations,\n exemptFromYieldProtocolFeeFlags\n ) as [string[], string[], string[], boolean[]];\n const params = [\n name,\n symbol,\n sortedTokens,\n amplificationParameter,\n sortedRateProviders,\n sortedTokenRateCacheDurations,\n sortedExemptFromYieldProtocols,\n swapFeeEvm.toString(),\n owner,\n salt || getRandomBytes32(),\n ] as [\n string,\n string,\n string[],\n string,\n string[],\n string[],\n boolean[],\n string,\n string,\n BytesLike\n ];\n return params;\n };\n\n encodeCreateFunctionData = (\n params: [\n string,\n string,\n string[],\n string,\n string[],\n string[],\n boolean[],\n string,\n string,\n BytesLike\n ]\n ): string => {\n const composablePoolFactoryInterface =\n ComposableStablePoolFactory__factory.createInterface();\n return composablePoolFactoryInterface.encodeFunctionData('create', params);\n };\n\n /**\n * Builds a transaction for a composable pool init join operation.\n * @param joiner The address of the joiner of the pool\n * @param poolId The id of the pool\n * @param poolAddress The address of the pool\n * @param tokensIn Array with the address of the tokens\n * @param amountsIn Array with the amount of each token\n * @returns A InitJoinPoolAttributes object, which can be directly inserted in the transaction to init join a composable stable pool\n */\n buildInitJoin({\n joiner,\n poolId,\n poolAddress,\n tokensIn,\n amountsIn,\n }: InitJoinPoolParameters): InitJoinPoolAttributes {\n this.checkInitJoinInputs({\n tokensIn,\n amountsIn,\n poolId,\n poolAddress,\n });\n const { attributes, params } = this.parseParamsForInitJoin({\n joiner,\n poolId,\n poolAddress,\n tokensIn,\n amountsIn,\n });\n const { functionName, data } = this.encodeInitJoinFunctionData(params);\n\n return {\n to: balancerVault,\n functionName,\n data,\n attributes,\n };\n }\n\n checkInitJoinInputs = ({\n poolId,\n poolAddress,\n tokensIn,\n amountsIn,\n }: Pick<\n InitJoinPoolParameters,\n 'tokensIn' | 'amountsIn' | 'poolId' | 'poolAddress'\n >): void => {\n if (!poolId || !poolAddress) {\n throw new BalancerError(BalancerErrorCode.NO_POOL_DATA);\n }\n if (tokensIn.length !== amountsIn.length) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n };\n\n parseParamsForInitJoin = ({\n joiner,\n poolId,\n poolAddress,\n tokensIn,\n amountsIn,\n }: InitJoinPoolParameters): {\n attributes: JoinPoolDecodedAttributes;\n params: [string, string, string, JoinPoolRequestDecodedAttributes];\n } => {\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n // sort inputs\n const tokensWithBpt = [...tokensIn, poolAddress];\n const amountsWithBpt = [...amountsIn, '0'];\n const maxAmountsWithBpt = [\n ...amountsIn,\n // this max amount needs to be >= PREMINT - bptAmountOut,\n // The vault returns BAL#506 if it's not,\n // PREMINT is around 2^111, but here we set the max amount of BPT as MAX_UINT_256-1 for safety\n BigInt.asUintN(256, BigInt(-1)).toString(),\n ];\n const [sortedTokens, sortedAmounts, sortedMaxAmounts] =\n assetHelpers.sortTokens(\n tokensWithBpt,\n amountsWithBpt,\n maxAmountsWithBpt\n ) as [string[], string[], string[]];\n\n const userData = ComposableStablePoolEncoder.joinInit(sortedAmounts);\n\n const attributes: JoinPoolDecodedAttributes = {\n poolId: poolId,\n sender: joiner,\n recipient: joiner,\n joinPoolRequest: {\n assets: sortedTokens,\n maxAmountsIn: sortedMaxAmounts,\n userData,\n fromInternalBalance: false,\n },\n };\n return {\n attributes,\n params: [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ],\n };\n };\n encodeInitJoinFunctionData = (\n params: [string, string, string, JoinPoolRequestDecodedAttributes]\n ): {\n functionName: string;\n data: string;\n } => {\n const functionName = 'joinPool';\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, params);\n\n return { functionName, data };\n };\n\n getPoolAddressAndIdWithReceipt = async (\n provider: JsonRpcProvider,\n receipt: TransactionReceipt\n ): Promise<{\n poolId: string;\n poolAddress: string;\n }> => {\n const poolCreationEvent: LogDescription = findEventInReceiptLogs({\n receipt,\n to: this.contracts.composableStablePoolFactory?.address || '',\n contractInterface: ComposableStablePoolFactory__factory.createInterface(),\n logName: 'PoolCreated',\n });\n\n const poolAddress = poolCreationEvent.args.pool;\n const composableStablePoolInterface = this.getPoolInterface();\n const pool = new Contract(\n poolAddress,\n composableStablePoolInterface,\n provider\n );\n const poolId = await pool.getPoolId();\n return {\n poolAddress,\n poolId,\n };\n };\n\n getPoolInterface(): ComposableStablePoolInterface {\n return ComposableStablePool__factory.createInterface();\n }\n}\n","import { LogDescription } from '@ethersproject/abi';\nimport { BigNumberish } from '@ethersproject/bignumber';\nimport { Contract } from '@ethersproject/contracts';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { JsonRpcProvider, TransactionReceipt } from '@ethersproject/providers';\n\nimport { Vault__factory } from '@/contracts/factories/Vault__factory';\nimport { WeightedPoolFactory__factory } from '@/contracts/factories/WeightedPoolFactory__factory';\nimport { balancerVault, networkAddresses } from '@/lib/constants/config';\nimport {\n AssetHelpers,\n findEventInReceiptLogs,\n getRandomBytes32,\n} from '@/lib/utils';\nimport { ContractInstances } from '@/modules/contracts/contracts.module';\nimport { PoolFactory } from '@/modules/pools/factory/pool-factory';\nimport {\n InitJoinPoolAttributes,\n InitJoinPoolParameters,\n JoinPoolDecodedAttributes,\n JoinPoolRequestDecodedAttributes,\n WeightedCreatePoolParameters,\n} from '@/modules/pools/factory/types';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { BalancerNetworkConfig } from '@/types';\nimport { WeightedPool__factory } from '@/contracts';\nimport { SolidityMaths } from '@/lib/utils/solidityMaths';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { WeightedPoolInterface } from '@/contracts/WeightedPool';\n\nexport class WeightedFactory implements PoolFactory {\n private wrappedNativeAsset: string;\n private contracts: ContractInstances;\n\n constructor(\n networkConfig: BalancerNetworkConfig,\n contracts: ContractInstances\n ) {\n const { tokens } = networkAddresses(networkConfig.chainId);\n this.wrappedNativeAsset = tokens.wrappedNativeAsset;\n this.contracts = contracts;\n }\n\n /**\n * Builds a transaction for a weighted pool create operation.\n * @param factoryAddress The address of the factory for weighted pool (contract address)\n * @param name The name of the pool\n * @param symbol The symbol of the pool\n * @param tokenAddresses The token's addresses\n * @param normalizedWeights The weights for each token, ordered\n * @param rateProviders The rate providers for each token, ordered\n * @param swapFeeEvm The swapFee for the owner of the pool in string or bigint formatted to evm(100% is 1e18, 10% is 1e17, 1% is 1e16)\n * @param owner The address of the owner of the pool\n * @param salt The salt of the pool (bytes32)\n * @returns TransactionRequest object, which can be directly inserted in the transaction to create a weighted pool\n */\n create({\n name,\n symbol,\n tokenAddresses,\n normalizedWeights,\n rateProviders,\n swapFeeEvm,\n owner,\n salt,\n }: WeightedCreatePoolParameters): {\n to?: string;\n data: BytesLike;\n } {\n this.checkCreateInputs({\n tokenAddresses,\n normalizedWeights,\n swapFeeEvm,\n rateProviders,\n });\n const params = this.parseCreateParamsForEncoding({\n name,\n symbol,\n tokenAddresses,\n normalizedWeights,\n rateProviders,\n swapFeeEvm,\n owner,\n salt,\n });\n const encodedFunctionData = this.encodeCreateFunctionData(params);\n return {\n to: this.contracts.weightedPoolFactory?.address,\n data: encodedFunctionData,\n };\n }\n\n checkCreateInputs({\n tokenAddresses,\n normalizedWeights,\n swapFeeEvm,\n rateProviders,\n }: Pick<\n WeightedCreatePoolParameters,\n 'tokenAddresses' | 'normalizedWeights' | 'swapFeeEvm' | 'rateProviders'\n >): void {\n if (\n tokenAddresses.length !== normalizedWeights.length ||\n normalizedWeights.length !== rateProviders.length\n ) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n if (tokenAddresses.length < 2) {\n throw new BalancerError(BalancerErrorCode.BELOW_MIN_TOKENS);\n }\n if (tokenAddresses.length > 8) {\n throw new BalancerError(BalancerErrorCode.ABOVE_MAX_TOKENS);\n }\n if (BigInt(swapFeeEvm) <= BigInt(0) || BigInt(swapFeeEvm) > BigInt(1e17)) {\n throw new BalancerError(BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE);\n }\n const normalizedWeightsSum = (normalizedWeights as string[]).reduce(\n (acc, cur) => SolidityMaths.add(acc, BigInt(cur)),\n BigInt(0)\n );\n if (normalizedWeightsSum !== BigInt(1e18)) {\n throw new BalancerError(BalancerErrorCode.INVALID_WEIGHTS);\n }\n }\n\n parseCreateParamsForEncoding = ({\n name,\n symbol,\n tokenAddresses,\n normalizedWeights,\n rateProviders,\n swapFeeEvm,\n owner,\n salt,\n }: WeightedCreatePoolParameters): [\n string,\n string,\n string[],\n BigNumberish[],\n string[],\n string,\n string,\n BytesLike\n ] => {\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n const [sortedTokens, sortedNormalizedWeights, sortedRateProviders] =\n assetHelpers.sortTokens(\n tokenAddresses,\n normalizedWeights,\n rateProviders\n ) as [string[], BigNumberish[], string[]];\n return [\n name,\n symbol,\n sortedTokens,\n sortedNormalizedWeights,\n sortedRateProviders,\n swapFeeEvm.toString(),\n owner,\n salt || getRandomBytes32(),\n ];\n };\n\n encodeCreateFunctionData = (\n params: [\n string,\n string,\n string[],\n BigNumberish[],\n string[],\n string,\n string,\n BytesLike\n ]\n ): string => {\n const weightedPoolInterface =\n WeightedPoolFactory__factory.createInterface();\n\n return weightedPoolInterface.encodeFunctionData('create', params);\n };\n\n /**\n * Returns a InitJoinPoolAttributes to make a init join transaction\n * @param joiner The address of the joiner of the pool\n * @param poolId The id of the pool\n * @param tokensIn Array with the address of the tokens\n * @param amountsIn Array with the amount of each token\n * @returns InitJoinPoolAttributes object, which can be directly inserted in the transaction to init join a weighted pool\n */\n buildInitJoin({\n joiner,\n poolId,\n tokensIn,\n amountsIn,\n }: InitJoinPoolParameters): InitJoinPoolAttributes {\n this.checkInitJoinInputs({\n poolId,\n tokensIn,\n amountsIn,\n });\n const { attributes, params } = this.parseParamsForInitJoin({\n joiner,\n poolId,\n tokensIn,\n amountsIn,\n });\n const { functionName, data } = this.encodeInitJoinFunctionData(params);\n\n return {\n to: balancerVault,\n functionName,\n data,\n attributes,\n };\n }\n\n parseParamsForInitJoin = ({\n joiner,\n poolId,\n tokensIn,\n amountsIn,\n }: Omit): {\n attributes: JoinPoolDecodedAttributes;\n params: [string, string, string, JoinPoolRequestDecodedAttributes];\n } => {\n const assetHelpers = new AssetHelpers(this.wrappedNativeAsset);\n\n const [sortedTokens, sortedAmounts] = assetHelpers.sortTokens(\n tokensIn,\n amountsIn\n ) as [string[], string[]];\n\n const userData = WeightedPoolEncoder.joinInit(sortedAmounts);\n\n const attributes = {\n poolId: poolId,\n sender: joiner,\n recipient: joiner,\n joinPoolRequest: {\n assets: sortedTokens,\n maxAmountsIn: sortedAmounts,\n userData,\n fromInternalBalance: false,\n },\n };\n\n return {\n attributes,\n params: [\n attributes.poolId,\n attributes.sender,\n attributes.recipient,\n attributes.joinPoolRequest,\n ],\n };\n };\n\n encodeInitJoinFunctionData = (\n params: [string, string, string, JoinPoolRequestDecodedAttributes]\n ): {\n functionName: string;\n data: string;\n } => {\n const functionName = 'joinPool';\n\n const vaultInterface = Vault__factory.createInterface();\n const data = vaultInterface.encodeFunctionData(functionName, params);\n return { functionName, data };\n };\n checkInitJoinInputs = ({\n poolId,\n tokensIn,\n amountsIn,\n }: Pick<\n InitJoinPoolParameters,\n 'tokensIn' | 'amountsIn' | 'poolId'\n >): void => {\n if (!poolId) {\n throw new BalancerError(BalancerErrorCode.NO_POOL_DATA);\n }\n if (tokensIn.length !== amountsIn.length) {\n throw new BalancerError(BalancerErrorCode.INPUT_LENGTH_MISMATCH);\n }\n };\n\n async getPoolAddressAndIdWithReceipt(\n provider: JsonRpcProvider,\n receipt: TransactionReceipt\n ): Promise<{ poolId: string; poolAddress: string }> {\n const poolCreationEvent: LogDescription = findEventInReceiptLogs({\n receipt,\n to: this.contracts.weightedPoolFactory?.address || '',\n contractInterface: WeightedPoolFactory__factory.createInterface(),\n logName: 'PoolCreated',\n });\n\n const poolAddress = poolCreationEvent.args.pool;\n const weightedPoolInterface = this.getPoolInterface();\n const pool = new Contract(poolAddress, weightedPoolInterface, provider);\n const poolId = await pool.getPoolId();\n return {\n poolAddress,\n poolId,\n };\n }\n\n getPoolInterface(): WeightedPoolInterface {\n return WeightedPool__factory.createInterface();\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { JoinPool } from '@/modules/pools/pool-types/concerns/types';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { ERC4626LinearPoolInterface } from '@/contracts/ERC4626LinearPool';\nimport { GearboxLinearPoolInterface } from '@/contracts/GearboxLinearPool';\nimport { EulerLinearPoolInterface } from '@/contracts/EulerLinearPool';\nimport { AaveLinearPoolInterface } from '@/contracts/AaveLinearPool';\nimport { YearnLinearPoolInterface } from '@/contracts/YearnLinearPool';\nimport { AaveLinearPoolFactoryInterface } from '@/contracts/AaveLinearPoolFactory';\nimport { ERC4626LinearPoolFactoryInterface } from '@/contracts/ERC4626LinearPoolFactory';\nimport { EulerLinearPoolFactoryInterface } from '@/contracts/EulerLinearPoolFactory';\nimport { GearboxLinearPoolFactoryInterface } from '@/contracts/GearboxLinearPoolFactory';\nimport { YearnLinearPoolFactoryInterface } from '@/contracts/YearnLinearPoolFactory';\n\nexport type CreatePoolParameters = {\n name: string;\n symbol: string;\n tokenAddresses: string[];\n swapFeeEvm: string;\n owner: string;\n salt?: BytesLike;\n};\n\nexport interface ComposableStableCreatePoolParameters\n extends CreatePoolParameters {\n amplificationParameter: string;\n rateProviders: string[];\n tokenRateCacheDurations: string[];\n exemptFromYieldProtocolFeeFlags: boolean[];\n\n salt?: BytesLike;\n}\n\nexport interface WeightedCreatePoolParameters extends CreatePoolParameters {\n rateProviders: string[];\n normalizedWeights: BigNumberish[];\n}\n\nexport type LinearCreatePoolParameters = Pick<\n CreatePoolParameters,\n 'name' | 'symbol' | 'swapFeeEvm' | 'owner' | 'salt'\n> & {\n mainToken: string;\n wrappedToken: string;\n upperTargetEvm: string;\n protocolId: ProtocolId;\n};\n\nexport interface InitJoinPoolParameters {\n joiner: string;\n poolId: string;\n poolAddress: string;\n tokensIn: string[];\n amountsIn: string[];\n}\n\nexport interface InitJoinPoolAttributes {\n to: string;\n functionName: string;\n attributes: JoinPool;\n data: string;\n value?: BigNumber;\n}\n\n// Source of the protocolId's: https://github.com/balancer/balancer-v2-monorepo/blob/647320a4a375c724276af8e1ae26948de8fa411b/pkg/interfaces/contracts/standalone-utils/IProtocolIdRegistry.sol#L54-L72\nexport enum ProtocolId {\n AAVE_V1 = 0,\n AAVE_V2 = 1,\n AAVE_V3 = 2,\n AMPLEFORTH = 3,\n BEEFY = 4,\n EULER = 5,\n GEARBOX = 6,\n IDLE = 7,\n MORPHO = 8,\n RADIANT = 9,\n REAPER = 10,\n SILO = 11,\n STARGATE = 12,\n STURDY = 13,\n TESSERA = 14,\n TETU = 15,\n YEARN = 16,\n MIDAS = 17,\n AGAVE = 18,\n}\n\nexport type JoinPoolDecodedAttributes = {\n poolId: string;\n sender: string;\n recipient: string;\n joinPoolRequest: JoinPoolRequestDecodedAttributes;\n};\n\nexport type JoinPoolRequestDecodedAttributes = {\n assets: string[];\n maxAmountsIn: string[];\n userData: string;\n fromInternalBalance: boolean;\n};\n\nexport type LinearPoolInterface =\n | ERC4626LinearPoolInterface\n | EulerLinearPoolInterface\n | AaveLinearPoolInterface\n | YearnLinearPoolInterface\n | GearboxLinearPoolInterface;\n\nexport type LinearPoolFactoryInterface =\n | AaveLinearPoolFactoryInterface\n | ERC4626LinearPoolFactoryInterface\n | EulerLinearPoolFactoryInterface\n | GearboxLinearPoolFactoryInterface\n | YearnLinearPoolFactoryInterface;\n","import { LogDescription } from '@ethersproject/abi';\nimport { BytesLike } from '@ethersproject/bytes';\nimport { Contract } from '@ethersproject/contracts';\nimport { JsonRpcProvider, TransactionReceipt } from '@ethersproject/providers';\n\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport {\n AaveLinearPool__factory,\n AaveLinearPoolFactory__factory,\n ERC4626LinearPool__factory,\n ERC4626LinearPoolFactory__factory,\n EulerLinearPool__factory,\n EulerLinearPoolFactory__factory,\n GearboxLinearPool__factory,\n GearboxLinearPoolFactory__factory,\n YearnLinearPool__factory,\n YearnLinearPoolFactory__factory,\n} from '@/contracts';\nimport { AaveLinearPoolInterface } from '@/contracts/AaveLinearPool';\nimport { ERC4626LinearPoolInterface } from '@/contracts/ERC4626LinearPool';\nimport { EulerLinearPoolInterface } from '@/contracts/EulerLinearPool';\nimport { EulerLinearPoolFactoryInterface } from '@/contracts/EulerLinearPoolFactory';\nimport { GearboxLinearPoolInterface } from '@/contracts/GearboxLinearPool';\nimport { YearnLinearPoolInterface } from '@/contracts/YearnLinearPool';\nimport { ContractInstances } from '@/modules/contracts/contracts.module';\nimport { PoolFactory } from '@/modules/pools/factory/pool-factory';\nimport {\n InitJoinPoolAttributes,\n LinearCreatePoolParameters,\n LinearPoolFactoryInterface,\n ProtocolId,\n} from '@/modules/pools/factory/types';\nimport { PoolType } from '@/types';\nimport { findEventInReceiptLogs, getRandomBytes32 } from '@/lib/utils';\n\ntype LinearPoolParamsToEncode = [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n BytesLike\n];\n\ntype EulerLinearPoolParamsToEncode = [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string\n];\n\nexport class LinearFactory implements PoolFactory {\n private contracts: ContractInstances;\n private readonly poolType: PoolType;\n\n constructor(contracts: ContractInstances, poolType: PoolType) {\n this.contracts = contracts;\n this.poolType = poolType;\n }\n\n getPoolFactoryInterface = (): LinearPoolFactoryInterface => {\n switch (this.poolType) {\n case PoolType.AaveLinear:\n return AaveLinearPoolFactory__factory.createInterface();\n case PoolType.Linear:\n case PoolType.ERC4626Linear:\n return ERC4626LinearPoolFactory__factory.createInterface();\n case PoolType.EulerLinear:\n return EulerLinearPoolFactory__factory.createInterface();\n case PoolType.GearboxLinear:\n return GearboxLinearPoolFactory__factory.createInterface();\n case PoolType.YearnLinear:\n return YearnLinearPoolFactory__factory.createInterface();\n default:\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n };\n\n getPoolInterface = ():\n | AaveLinearPoolInterface\n | ERC4626LinearPoolInterface\n | EulerLinearPoolInterface\n | GearboxLinearPoolInterface\n | YearnLinearPoolInterface => {\n switch (this.poolType) {\n case PoolType.AaveLinear:\n return AaveLinearPool__factory.createInterface();\n case PoolType.Linear:\n case PoolType.ERC4626Linear:\n return ERC4626LinearPool__factory.createInterface();\n case PoolType.EulerLinear:\n return EulerLinearPool__factory.createInterface();\n case PoolType.GearboxLinear:\n return GearboxLinearPool__factory.createInterface();\n case PoolType.YearnLinear:\n return YearnLinearPool__factory.createInterface();\n default:\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n };\n\n buildInitJoin(): InitJoinPoolAttributes {\n // Linear Pools doesn't need to be initialized, they are initialized on deploy\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n\n /**\n *\n * @param name The name of the pool\n * @param symbol The symbol of the pool (BPT name)\n * @param mainToken The main token\n * @param wrappedToken The wrapped token\n * @param upperTargetEvm The maximum balance of the main token\n * @param swapFeeEvm The swap fee of the pool\n * @param owner The address of the owner of the pool\n * @param protocolId The protocolId, to check the available value\n */\n create({\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId,\n salt,\n }: LinearCreatePoolParameters): {\n to?: string;\n data: BytesLike;\n } {\n this.checkCreateInputs({ swapFeeEvm, protocolId });\n const params = this.parseCreateParamsForEncoding({\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId,\n salt,\n });\n const data = this.encodeCreateFunctionData(params);\n return {\n to: this.getFactoryAddress(),\n data,\n };\n }\n\n checkCreateInputs = ({\n swapFeeEvm,\n protocolId,\n }: {\n swapFeeEvm: string;\n protocolId: ProtocolId;\n }): void => {\n if (!ProtocolId[protocolId]) {\n throw new BalancerError(BalancerErrorCode.INVALID_PROTOCOL_ID);\n }\n if (BigInt(swapFeeEvm) <= BigInt(0) || BigInt(swapFeeEvm) > BigInt(1e17)) {\n throw new BalancerError(BalancerErrorCode.INVALID_SWAP_FEE_PERCENTAGE);\n }\n this.getFactoryAddress();\n };\n\n parseCreateParamsForEncoding = ({\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId,\n salt,\n }: Omit):\n | LinearPoolParamsToEncode\n | EulerLinearPoolParamsToEncode => {\n if (this.poolType === PoolType.EulerLinear) {\n return [\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId.toString(),\n ] as [string, string, string, string, string, string, string, string];\n }\n return [\n name,\n symbol,\n mainToken,\n wrappedToken,\n upperTargetEvm,\n swapFeeEvm,\n owner,\n protocolId.toString(),\n salt || getRandomBytes32(),\n ] as [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n BytesLike\n ];\n };\n\n encodeCreateFunctionData = (\n params: LinearPoolParamsToEncode | EulerLinearPoolParamsToEncode\n ): string => {\n const linearPoolInterface: LinearPoolFactoryInterface =\n this.getPoolFactoryInterface();\n const encodedData =\n // YearnLinearPools doesn't have protocolId, the encoding of the params is different\n this.poolType === PoolType.EulerLinear\n ? (\n linearPoolInterface as EulerLinearPoolFactoryInterface\n ).encodeFunctionData(\n 'create',\n params as EulerLinearPoolParamsToEncode\n )\n : (\n linearPoolInterface as Exclude<\n LinearPoolFactoryInterface,\n EulerLinearPoolFactoryInterface\n >\n ).encodeFunctionData('create', params as LinearPoolParamsToEncode);\n return encodedData;\n };\n\n getFactoryAddress = (): string => {\n switch (this.poolType) {\n case PoolType.AaveLinear:\n if (this.contracts.aaveLinearPoolFactory) {\n return this.contracts.aaveLinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n case PoolType.Linear:\n case PoolType.ERC4626Linear:\n if (this.contracts.erc4626LinearPoolFactory) {\n return this.contracts.erc4626LinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n case PoolType.EulerLinear:\n if (this.contracts.eulerLinearPoolFactory) {\n return this.contracts.eulerLinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n case PoolType.GearboxLinear:\n if (this.contracts.gearboxLinearPoolFactory) {\n return this.contracts.gearboxLinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n case PoolType.YearnLinear:\n if (this.contracts.yearnLinearPoolFactory) {\n return this.contracts.yearnLinearPoolFactory.address;\n } else throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n default:\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n };\n\n getPoolAddressAndIdWithReceipt = async (\n provider: JsonRpcProvider,\n receipt: TransactionReceipt\n ): Promise<{ poolId: string; poolAddress: string }> => {\n const poolCreationEvent: LogDescription = findEventInReceiptLogs({\n receipt,\n to: this.getFactoryAddress() || '',\n contractInterface: this.getPoolFactoryInterface(),\n logName: 'PoolCreated',\n });\n\n const poolAddress = poolCreationEvent.args.pool;\n const linearPoolInterface = this.getPoolInterface();\n const pool = new Contract(poolAddress, linearPoolInterface, provider);\n const poolId = await pool.getPoolId();\n return {\n poolAddress,\n poolId,\n };\n };\n}\n","import { BalancerNetworkConfig, PoolType } from '@/types';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { PoolFactory } from '@/modules/pools/factory/pool-factory';\nimport { ComposableStableFactory } from '@/modules/pools/factory/composable-stable/composable-stable.factory';\nimport { WeightedFactory } from '@/modules/pools/factory/weighted/weighted.factory';\nimport {\n ContractInstances,\n Contracts,\n} from '@/modules/contracts/contracts.module';\nimport { LinearFactory } from '@/modules/pools/factory/linear/linear.factory';\n\n/**\n * Wrapper around pool type specific methods.\n *\n * Returns a class instance of a type specific factory.\n */\nexport class PoolFactory__factory {\n networkConfig: BalancerNetworkConfig;\n contracts: ContractInstances;\n\n constructor(\n networkConfig: BalancerNetworkConfig,\n balancerContracts: Contracts\n ) {\n this.networkConfig = networkConfig;\n this.contracts = balancerContracts.contracts;\n }\n\n of(poolType: PoolType): PoolFactory {\n switch (poolType) {\n case 'Weighted':\n return new WeightedFactory(this.networkConfig, this.contracts);\n case 'Investment':\n case 'LiquidityBootstrapping': {\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n case 'Stable': {\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n case 'ComposableStable': {\n return new ComposableStableFactory(this.networkConfig, this.contracts);\n }\n case 'MetaStable': {\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n case 'StablePhantom': {\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n case 'Linear':\n case 'AaveLinear':\n case 'ERC4626Linear':\n case 'EulerLinear':\n case 'GearboxLinear':\n case 'YearnLinear': {\n return new LinearFactory(this.contracts, poolType);\n }\n default:\n throw new BalancerError(BalancerErrorCode.UNSUPPORTED_POOL_TYPE);\n }\n }\n}\n","import * as PoolQueries from './types';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero, Zero, MaxUint256 } from '@ethersproject/constants';\nimport { getEncoder } from './get_encoder';\nimport { removeItem } from '@/lib/utils';\n\n/**\n * Builds parameters quering join / exit liquidity functions in the Balancer Helpers contract.\n */\nexport class ParamsBuilder implements PoolQueries.ParamsBuilder {\n private encoder: PoolQueries.Encoder;\n\n constructor(private pool: PoolQueries.Pool) {\n const encoder = getEncoder(pool.poolType);\n if (encoder) {\n this.encoder = encoder;\n } else {\n throw 'Pool type not supported';\n }\n }\n\n /**\n * Encodes the query to get expected amount of BPT when joining a Pool with exact token inputs\n * @param maxAmountsInByToken - The amounts each of token, mapped by token address, to deposit in the pool as liquidity,\n * doesn't need to have all tokens, only the ones that will be deposited\n * @param minimumBPT - the minimum acceptable BPT to receive in return for deposited tokens (optional)\n */\n buildQueryJoinExactIn({\n maxAmountsInByToken,\n minimumBPT = Zero,\n }: PoolQueries.JoinExactInParams): PoolQueries.queryJoinParams {\n const bptIndex = this.pool.tokensList.findIndex((token) =>\n this.pool.id.includes(token)\n );\n\n const assets = [...this.pool.tokensList];\n\n const maxAmountsIn = this.pool.tokensList.map(\n (tokenAddress) =>\n maxAmountsInByToken.get(tokenAddress) ?? BigNumber.from('0')\n );\n\n let maxInWithoutBpt;\n\n // Remove BPT token from amounts for user data\n if (bptIndex > -1) {\n maxInWithoutBpt = removeItem(maxAmountsIn, bptIndex);\n } else {\n maxInWithoutBpt = maxAmountsIn;\n }\n\n const userData = this.encoder.joinExactTokensInForBPTOut(\n maxInWithoutBpt,\n minimumBPT\n );\n\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets,\n maxAmountsIn,\n userData,\n fromInternalBalance: false, // from internal balance is ignored on query join, can be just false\n },\n ] as PoolQueries.queryJoinParams;\n\n return params;\n }\n\n /**\n * Encodes the query to get expected token amount when joining a Pool specifying fixed BPT out.\n *\n * @param maxAmountIn - The max expected amount for tokenIn (optional)\n * @param bptOut - the expected BPT for providing liquidity\n * @param tokenIn - address of a token joining the pool\n */\n buildQueryJoinExactOut({\n maxAmountIn,\n bptOut,\n tokenIn,\n }: PoolQueries.JoinExactOutParams): PoolQueries.queryJoinParams {\n const bptIndex = this.pool.tokensList.findIndex((token) =>\n this.pool.id.includes(token)\n );\n let tokensWithoutBpt = [...this.pool.tokensList];\n if (bptIndex > -1) {\n tokensWithoutBpt = removeItem(this.pool.tokensList, bptIndex);\n }\n const tokenIndex = tokensWithoutBpt.indexOf(tokenIn);\n\n const userData = this.encoder.joinTokenInForExactBPTOut(bptOut, tokenIndex);\n const maxAmountsIn = maxAmountIn\n ? this.pool.tokensList.map((tokenAddress) =>\n tokenAddress === tokenIn ? maxAmountIn : '0'\n )\n : [];\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets: this.pool.tokensList,\n maxAmountsIn,\n userData,\n fromInternalBalance: false, // from internal balance is ignored on query join, can be just false\n },\n ] as PoolQueries.queryJoinParams;\n\n return params;\n }\n\n /**\n * Encodes the query for exiting the pool to a single token\n *\n * @param minAmountOut - minimum expected amount for token out\n * @param bptIn - BPT, shares of the pool liquidity\n * @param tokenOut - address of an exit liquidity token\n */\n buildQueryExitToSingleToken({\n minAmountOut,\n bptIn,\n tokenOut,\n }: PoolQueries.ExitToSingleTokenParams): PoolQueries.queryExitParams {\n const bptIndex = this.pool.tokensList.findIndex((token) =>\n this.pool.id.includes(token)\n );\n let tokensWithoutBpt = [...this.pool.tokensList];\n if (bptIndex > -1) {\n tokensWithoutBpt = removeItem(this.pool.tokensList, bptIndex);\n }\n const tokenIndex = tokensWithoutBpt.indexOf(tokenOut);\n\n const userData = this.encoder.exitExactBPTInForOneTokenOut(\n bptIn,\n tokenIndex\n );\n const minAmountsOut = minAmountOut\n ? this.pool.tokensList.map((tokenAddress) =>\n tokenAddress === tokenOut ? minAmountOut : '0'\n )\n : [];\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets: this.pool.tokensList,\n minAmountsOut,\n userData,\n toInternalBalance: false, // to internal balance is ignored on query join, can be just false\n },\n ] as PoolQueries.queryExitParams;\n\n return params;\n }\n\n /**\n * Encodes the query for exiting the pool with all underlying tokens proportionally.\n * Not supported by ComposableStable\n *\n * @param minAmountsOut - minimum expected amounts, can be set to zero for a query, ordered same as pool.tokensList\n * @param bptIn - BPT, shares of the pool liquidity\n */\n buildQueryExitProportionally({\n minAmountsOut = [],\n bptIn,\n }: PoolQueries.ExitProportionallyParams): PoolQueries.queryExitParams {\n if (!this.encoder.exitExactBPTInForTokensOut) {\n throw 'Proportional exit not implemented';\n }\n\n const userData = this.encoder.exitExactBPTInForTokensOut(bptIn);\n\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets: this.pool.tokensList,\n minAmountsOut,\n userData,\n toInternalBalance: false,\n },\n ] as PoolQueries.queryExitParams;\n\n return params;\n }\n\n /**\n * Encodes calldata to query expected BPT for known amounts out.\n *\n * @param minAmountsOut - minimum expected amounts, ordered same as pool.tokensList\n * @param maxBptIn - BPT, shares of the pool liquidity, can be set to zero for a query\n */\n buildQueryExitExactOut({\n minAmountsOut,\n maxBptIn = MaxUint256,\n }: PoolQueries.ExitExactOutParams): PoolQueries.queryExitParams {\n const bptIndex = this.pool.tokensList.findIndex((token) =>\n this.pool.id.includes(token)\n );\n\n let minAmountsOutWithoutBpt = [...minAmountsOut];\n // Remove BPT token from amounts\n if (bptIndex > -1) {\n minAmountsOutWithoutBpt = removeItem(minAmountsOut, bptIndex);\n }\n\n const userData = this.encoder.exitBPTInForExactTokensOut(\n minAmountsOutWithoutBpt,\n maxBptIn\n );\n\n const params = [\n this.pool.id,\n AddressZero, // sender is ignored on query join, so it can be just address zero\n AddressZero, // same as sender\n {\n assets: this.pool.tokensList,\n minAmountsOut,\n userData,\n toInternalBalance: false, // to internal balance is ignored on query join, can be just false\n },\n ] as PoolQueries.queryExitParams;\n\n return params;\n }\n}\n","import { WeightedPoolEncoder } from '@/pool-weighted/encoder';\nimport { StablePoolEncoder } from '@/pool-stable/encoder';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\nimport { PoolType } from '@/types';\nimport { isLinearish } from '@/lib/utils';\n\nexport const getEncoder = (\n poolType: PoolType\n):\n | typeof WeightedPoolEncoder\n | typeof StablePoolEncoder\n | typeof ComposableStablePoolEncoder\n | undefined => {\n switch (poolType) {\n case PoolType.Weighted:\n return WeightedPoolEncoder;\n\n case PoolType.Stable:\n case PoolType.MetaStable:\n case PoolType.StablePhantom:\n case PoolType.Element:\n case PoolType.Gyro2:\n case PoolType.Gyro3:\n return StablePoolEncoder;\n\n case PoolType.ComposableStable:\n return ComposableStablePoolEncoder;\n\n default: {\n if (isLinearish(poolType)) return StablePoolEncoder;\n break;\n }\n }\n};\n","import * as emissions from '@/modules/data/bal/emissions';\nimport { Findable, LiquidityGauge } from '@/types';\n\n/**\n * Returns BAL emissions per pool\n */\nexport class EmissionsService {\n constructor(private liquidityGaugesRepository: Findable) {}\n\n async relativeWeight(poolId: string): Promise {\n const gauge = await this.liquidityGaugesRepository.findBy('poolId', poolId);\n\n if (gauge) {\n return gauge.relativeWeight;\n }\n\n return 0;\n }\n\n async weekly(poolId: string): Promise {\n const perWeek = emissions.weekly();\n const relativeWeight = await this.relativeWeight(poolId);\n\n return perWeek * relativeWeight;\n }\n}\n","import { parseUnits } from '@ethersproject/units';\nimport { BigNumber } from '@ethersproject/bignumber';\n\n/**\n * Calculates the proportional amounts of tokens in relation to a given token and amount.\n * Useful for calculating the amounts of tokens to be sent to a pool when joining or swapping.\n * When using proportional amounts to join a pool the price impact will be minimal.\n *\n * @param pool - Pool object\n * @param token - Token address in relation to which the amounts are calculated\n * @param amount - Amount of token\n * @returns Object with tokens and amounts\n * @example\n * const pool = {\n * id: '0x0000',\n * tokens: [\n * { address: '0x1234', balance: '10' },\n * { address: '0x5678', balance: '20' }\n * ]\n * }\n *\n * const { tokens, amounts } = proportionalAmounts(pool, '0x1234', '1000000000000000000')\n */\nexport const proportionalAmounts = (\n pool: {\n id: string;\n tokens: { address: string; balance: string; decimals?: number }[];\n },\n token: string,\n amount: string\n): {\n tokens: string[];\n amounts: string[];\n} => {\n const tokensWithoutBpt = pool.tokens.filter(\n (t) => !pool.id.toLowerCase().includes(t.address.toLowerCase())\n );\n const referenceTokenIndex = tokensWithoutBpt.findIndex(\n (t) => t.address.toLowerCase() === token.toLowerCase()\n );\n\n if (referenceTokenIndex == -1) {\n throw new Error('Token not found in pool');\n }\n\n const balances = tokensWithoutBpt.map((t) =>\n parseUnits(t.balance, t.decimals)\n );\n const amountBn = BigNumber.from(amount);\n const proportionalAmounts = balances.map((b) =>\n b.mul(amountBn).div(balances[referenceTokenIndex])\n );\n\n return {\n tokens: tokensWithoutBpt.map((t) => t.address),\n amounts: proportionalAmounts.map((a) => a.toString()),\n };\n};\n","import { BigNumberish } from '@ethersproject/bignumber';\nimport { JsonRpcSigner } from '@ethersproject/providers';\n\nimport { BalancerError } from '@/balancerErrors';\nimport { Contracts } from '@/modules/contracts/contracts.module';\nimport { ImpermanentLossService } from '@/modules/pools/impermanentLoss/impermanentLossService';\nimport type {\n BalancerNetworkConfig,\n BalancerDataRepositories,\n Findable,\n Searchable,\n Pool,\n PoolWithMethods,\n AprBreakdown,\n PoolAttribute,\n} from '@/types';\nimport { Logger } from '@/lib/utils/logger';\n\nimport {\n ExitExactBPTInAttributes,\n JoinPoolAttributes,\n} from './pool-types/concerns/types';\nimport { PoolTypeConcerns } from './pool-type-concerns';\nimport { PoolApr } from './apr/apr';\nimport { Liquidity } from '../liquidity/liquidity.module';\nimport { Join } from '../joins/joins.module';\nimport { Exit, GeneralisedExitOutput, ExitInfo } from '../exits/exits.module';\nimport { PoolVolume } from './volume/volume';\nimport { PoolFees } from './fees/fees';\nimport { Simulation, SimulationType } from '../simulation/simulation.module';\nimport { PoolGraph } from '../graph/graph';\nimport { PoolFactory__factory } from './pool-factory__factory';\nimport * as Queries from './queries';\nimport { EmissionsService } from './emissions';\nimport { proportionalAmounts } from './proportional-amounts';\n\nconst notImplemented = (poolType: string, name: string) => () => {\n throw `${name} for poolType ${poolType} not implemented`;\n};\n\n/**\n * Controller / use-case layer for interacting with pools data.\n */\nexport class Pools implements Findable {\n aprService;\n liquidityService;\n joinService;\n exitService;\n feesService;\n volumeService;\n simulationService;\n poolFactory;\n impermanentLossService;\n graphService;\n emissionsService;\n proportionalAmounts;\n\n constructor(\n private networkConfig: BalancerNetworkConfig,\n private repositories: BalancerDataRepositories,\n private balancerContracts: Contracts\n ) {\n this.aprService = new PoolApr(\n this.repositories.pools,\n this.repositories.tokenPrices,\n this.repositories.tokenMeta,\n this.repositories.tokenYields,\n this.repositories.feeCollector,\n this.repositories.yesterdaysPools,\n this.repositories.liquidityGauges,\n this.repositories.feeDistributor,\n this.repositories.gyroConfigRepository\n );\n this.liquidityService = new Liquidity(\n repositories.pools,\n repositories.tokenPrices\n );\n this.simulationService = new Simulation(\n networkConfig,\n this.repositories.poolsForSimulations\n );\n this.graphService = new PoolGraph(this.repositories.poolsOnChain);\n this.joinService = new Join(\n this.graphService,\n networkConfig,\n this.simulationService\n );\n this.exitService = new Exit(\n this.graphService,\n networkConfig,\n this.simulationService\n );\n this.feesService = new PoolFees(repositories.yesterdaysPools);\n this.volumeService = new PoolVolume(repositories.yesterdaysPools);\n this.poolFactory = new PoolFactory__factory(\n networkConfig,\n balancerContracts\n );\n this.impermanentLossService = new ImpermanentLossService(\n repositories.tokenPrices,\n repositories.tokenHistoricalPrices\n );\n if (repositories.liquidityGauges) {\n this.emissionsService = new EmissionsService(\n repositories.liquidityGauges\n );\n }\n this.proportionalAmounts = proportionalAmounts;\n }\n\n static wrap(\n pool: Pool,\n networkConfig: BalancerNetworkConfig\n ): PoolWithMethods {\n let concerns: ReturnType;\n let queries: Queries.ParamsBuilder;\n let methods;\n try {\n concerns = PoolTypeConcerns.from(pool.poolType);\n methods = {\n buildJoin: (\n joiner: string,\n tokensIn: string[],\n amountsIn: string[],\n slippage: string\n ): JoinPoolAttributes => {\n return concerns.join.buildJoin({\n joiner,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset,\n });\n },\n calcPriceImpact: async (\n tokenAmounts: string[],\n bptAmount: string,\n isJoin: boolean\n ) =>\n concerns.priceImpactCalculator.calcPriceImpact(\n pool,\n tokenAmounts.map(BigInt),\n BigInt(bptAmount),\n isJoin\n ),\n buildExitExactBPTIn: (\n exiter: string,\n bptIn: string,\n slippage: string,\n shouldUnwrapNativeAsset = false,\n singleTokenOut?: string,\n toInternalBalance = false\n ) => {\n if (concerns.exit.buildExitExactBPTIn) {\n return concerns.exit.buildExitExactBPTIn({\n exiter,\n pool,\n bptIn,\n slippage,\n shouldUnwrapNativeAsset,\n wrappedNativeAsset,\n singleTokenOut,\n toInternalBalance,\n });\n } else {\n throw 'ExitExactBPTIn not supported';\n }\n },\n buildExitExactTokensOut: (\n exiter: string,\n tokensOut: string[],\n amountsOut: string[],\n slippage: string,\n toInternalBalance = false\n ) =>\n concerns.exit.buildExitExactTokensOut({\n exiter,\n pool,\n tokensOut,\n amountsOut,\n slippage,\n wrappedNativeAsset,\n toInternalBalance,\n }),\n buildRecoveryExit: (\n exiter: string,\n bptIn: string,\n slippage: string,\n toInternalBalance = false\n ) =>\n concerns.exit.buildRecoveryExit({\n exiter,\n pool,\n bptIn,\n slippage,\n toInternalBalance,\n }),\n\n // TODO: spotPrice fails, because it needs a subgraphType,\n // either we refetch or it needs a type transformation from SDK internal to SOR (subgraph)\n // spotPrice: async (tokenIn: string, tokenOut: string) =>\n // methods.spotPriceCalculator.calcPoolSpotPrice(tokenIn, tokenOut, data),\n calcSpotPrice: (tokenIn: string, tokenOut: string) =>\n concerns.spotPriceCalculator.calcPoolSpotPrice(\n tokenIn,\n tokenOut,\n pool\n ),\n calcProportionalAmounts: (token: string, amount: string) => {\n return proportionalAmounts(pool, token, amount);\n },\n };\n } catch (error) {\n if ((error as BalancerError).code != 'UNSUPPORTED_POOL_TYPE') {\n const logger = Logger.getInstance();\n logger.warn(error as string);\n }\n\n methods = {\n buildJoin: notImplemented(pool.poolType, 'buildJoin'),\n calcPriceImpact: notImplemented(pool.poolType, 'calcPriceImpact'),\n buildExitExactBPTIn: notImplemented(\n pool.poolType,\n 'buildExitExactBPTIn'\n ),\n buildExitExactTokensOut: notImplemented(\n pool.poolType,\n 'buildExitExactTokensOut'\n ),\n calcSpotPrice: notImplemented(pool.poolType, 'calcSpotPrice'),\n buildRecoveryExit: notImplemented(pool.poolType, 'buildRecoveryExit'),\n };\n }\n\n try {\n queries = new Queries.ParamsBuilder(pool);\n methods = {\n ...methods,\n buildQueryJoinExactIn: queries.buildQueryJoinExactIn.bind(queries),\n buildQueryJoinExactOut: queries.buildQueryJoinExactOut.bind(queries),\n buildQueryExitExactOut: queries.buildQueryExitExactOut.bind(queries),\n buildQueryExitToSingleToken:\n queries.buildQueryExitToSingleToken.bind(queries),\n buildQueryExitProportionally:\n queries.buildQueryExitProportionally.bind(queries),\n };\n } catch (error) {\n methods = {\n ...methods,\n buildQueryJoinExactIn: notImplemented(\n pool.poolType,\n 'buildQueryJoinExactIn'\n ),\n buildQueryJoinExactOut: notImplemented(\n pool.poolType,\n 'buildQueryJoinExactOut'\n ),\n buildQueryExitExactOut: notImplemented(\n pool.poolType,\n 'buildQueryExitExactOut'\n ),\n buildQueryExitToSingleToken: notImplemented(\n pool.poolType,\n 'buildQueryExitToSingleToken'\n ),\n buildQueryExitProportionally: notImplemented(\n pool.poolType,\n 'buildQueryExitProportionally'\n ),\n };\n }\n const wrappedNativeAsset =\n networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase();\n const bptIndex = pool.tokensList.indexOf(pool.address);\n return {\n ...pool,\n ...methods,\n bptIndex,\n };\n }\n\n dataSource(): Findable & Searchable {\n // TODO: Add API data repository to data and use liveModelProvider as fallback\n return this.repositories.pools;\n }\n\n /**\n * Calculates APR on any pool data\n *\n * @param pool\n * @returns\n */\n async apr(pool: Pool): Promise {\n return this.aprService.apr(pool);\n }\n\n /**\n * Calculates Impermanent Loss on any pool data\n *\n * @param timestamp\n * @param pool\n * @returns\n */\n async impermanentLoss(timestamp: number, pool: Pool): Promise {\n return this.impermanentLossService.calcImpLoss(timestamp, pool);\n }\n\n /**\n * Calculates total pool liquidity in USD\n *\n * @param pool\n * @returns total pool liquidity in USD\n */\n async liquidity(pool: Pool): Promise {\n return this.liquidityService.getLiquidity(pool);\n }\n\n /**\n * Calculates pool's BPT price in USD\n *\n * @param pool\n * @returns pool's BPT price in USD\n */\n async bptPrice(pool: Pool): Promise {\n return this.liquidityService.getBptPrice(pool);\n }\n\n /**\n * Builds join transaction\n *\n * @param pool Pool\n * @param tokensIn Token addresses\n * @param amountsIn Token amounts in EVM scale\n * @param userAddress User address\n * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%.\n * @returns Transaction object\n * @throws Error if pool type is not implemented\n */\n buildJoin({\n pool,\n tokensIn,\n amountsIn,\n userAddress,\n slippage,\n }: {\n pool: Pool;\n tokensIn: string[];\n amountsIn: string[];\n userAddress: string;\n slippage: string;\n }): JoinPoolAttributes {\n const concerns = PoolTypeConcerns.from(pool.poolType);\n\n if (!concerns)\n throw `buildJoin for poolType ${pool.poolType} not implemented`;\n\n return concerns.join.buildJoin({\n joiner: userAddress,\n pool,\n tokensIn,\n amountsIn,\n slippage,\n wrappedNativeAsset:\n this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase(),\n });\n }\n\n buildExitExactBPTIn({\n pool,\n bptAmount,\n userAddress,\n slippage,\n shouldUnwrapNativeAsset,\n singleTokenOut,\n }: {\n pool: Pool;\n bptAmount: string;\n userAddress: string;\n slippage: string;\n shouldUnwrapNativeAsset?: boolean;\n singleTokenOut?: string;\n }): ExitExactBPTInAttributes {\n const concerns = PoolTypeConcerns.from(pool.poolType);\n if (!concerns || !concerns.exit.buildExitExactBPTIn)\n throw `buildExit for poolType ${pool.poolType} not implemented`;\n\n return concerns.exit.buildExitExactBPTIn({\n pool,\n exiter: userAddress,\n bptIn: bptAmount,\n slippage,\n wrappedNativeAsset:\n this.networkConfig.addresses.tokens.wrappedNativeAsset.toLowerCase(),\n shouldUnwrapNativeAsset: shouldUnwrapNativeAsset ?? false,\n singleTokenOut: singleTokenOut ?? undefined,\n toInternalBalance: false,\n });\n }\n\n buildRecoveryExit({\n pool,\n bptAmount,\n userAddress,\n slippage,\n toInternalBalance,\n }: {\n pool: Pool;\n bptAmount: string;\n userAddress: string;\n slippage: string;\n toInternalBalance?: boolean;\n }): ExitExactBPTInAttributes {\n const concerns = PoolTypeConcerns.from(pool.poolType);\n if (!concerns || !concerns.exit.buildRecoveryExit)\n throw `buildRecoveryExit for poolType ${pool.poolType} not implemented`;\n\n return concerns.exit.buildRecoveryExit({\n exiter: userAddress,\n pool,\n bptIn: bptAmount,\n slippage,\n toInternalBalance: !!toInternalBalance,\n });\n }\n\n /**\n * Builds generalised join transaction\n *\n * @param poolId Pool id\n * @param tokens Token addresses\n * @param amounts Token amounts in EVM scale\n * @param userAddress User address\n * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%.\n * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen\n * @param simulationType Simulation type (VaultModel, Tenderly or Static)\n * @param authorisation Optional auhtorisation call to be added to the chained transaction\n * @returns transaction data ready to be sent to the network along with min and expected BPT amounts out.\n */\n async generalisedJoin(\n poolId: string,\n tokens: string[],\n amounts: string[],\n userAddress: string,\n slippage: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType,\n authorisation?: string\n ): Promise<{\n to: string;\n encodedCall: string;\n minOut: string;\n expectedOut: string;\n priceImpact: string;\n value: BigNumberish;\n }> {\n return this.joinService.joinPool(\n poolId,\n tokens,\n amounts,\n userAddress,\n slippage,\n signer,\n simulationType,\n authorisation\n );\n }\n\n /**\n * Builds generalised exit transaction\n *\n * @param poolId Pool id\n * @param amount Token amount in EVM scale\n * @param userAddress User address\n * @param slippage Maximum slippage tolerance in bps i.e. 50 = 0.5%.\n * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen\n * @param simulationType Simulation type (Tenderly or Static) - VaultModel should not be used to build exit transaction\n * @param authorisation Optional auhtorisation call to be added to the chained transaction\n * @param tokensToUnwrap List all tokens that requires exit by unwrapping - info provided by getExitInfo\n * @returns transaction data ready to be sent to the network along with tokens, min and expected amounts out.\n */\n async generalisedExit(\n poolId: string,\n amount: string,\n userAddress: string,\n slippage: string,\n signer: JsonRpcSigner,\n simulationType: SimulationType.Static | SimulationType.Tenderly,\n authorisation?: string,\n tokensToUnwrap?: string[]\n ): Promise {\n return this.exitService.buildExitCall(\n poolId,\n amount,\n userAddress,\n slippage,\n signer,\n simulationType,\n authorisation,\n tokensToUnwrap\n );\n }\n\n /**\n * Calculates price impact for an action on a pool\n *\n * @param pool\n * @returns percentage as a string in EVM scale\n */\n calcPriceImpact({\n pool,\n tokenAmounts,\n bptAmount,\n isJoin,\n }: {\n pool: Pool;\n tokenAmounts: string[];\n bptAmount: string;\n isJoin: boolean;\n }): string {\n const concerns = PoolTypeConcerns.from(pool.poolType);\n return concerns.priceImpactCalculator.calcPriceImpact(\n pool,\n tokenAmounts.map(BigInt),\n BigInt(bptAmount),\n isJoin\n );\n }\n\n /**\n * Gets info required to build generalised exit transaction\n *\n * @param poolId Pool id\n * @param amountBptIn BPT amount in EVM scale\n * @param userAddress User address\n * @param signer JsonRpcSigner that will sign the staticCall transaction if Static simulation chosen\n * @returns info required to build a generalised exit transaction including whether tokens need to be unwrapped\n */\n async getExitInfo(\n poolId: string,\n amountBptIn: string,\n userAddress: string,\n signer: JsonRpcSigner\n ): Promise {\n return this.exitService.getExitInfo(\n poolId,\n amountBptIn,\n userAddress,\n signer\n );\n }\n\n /**\n * Calculates total fees for the pool in the last 24 hours\n *\n * @param pool\n * @returns\n */\n async fees(pool: Pool): Promise {\n return this.feesService.last24h(pool);\n }\n\n /**\n * Calculates total volume of the pool in the last 24 hours\n *\n * @param pool\n * @returns\n */\n async volume(pool: Pool): Promise {\n return this.volumeService.last24h(pool);\n }\n\n async find(id: string): Promise {\n const data = await this.dataSource().find(id);\n if (!data) return;\n\n return Pools.wrap(data, this.networkConfig);\n }\n\n async findBy(\n param: string,\n value: string\n ): Promise {\n if (param == 'id') {\n return this.find(value);\n } else if (param == 'address') {\n const data = await this.dataSource().findBy('address', value);\n if (!data) return;\n\n return Pools.wrap(data, this.networkConfig);\n } else {\n throw `search by ${param} not implemented`;\n }\n }\n\n async all(): Promise {\n const list = await this.dataSource().all();\n if (!list) return [];\n\n return list\n .map((data: Pool) => Pools.wrap(data, this.networkConfig))\n .filter((p) => p) as PoolWithMethods[];\n }\n\n async where(filter: (pool: Pool) => boolean): Promise {\n const list = await this.dataSource().where(filter);\n if (!list) return [];\n\n const wrapped = list.map((data: Pool) =>\n Pools.wrap(data, this.networkConfig)\n );\n\n return wrapped.filter((p) => p) as PoolWithMethods[];\n }\n}\n","export const version = \"strings/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { arrayify } from \"@ethersproject/bytes\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n///////////////////////////////\nexport var UnicodeNormalizationForm;\n(function (UnicodeNormalizationForm) {\n UnicodeNormalizationForm[\"current\"] = \"\";\n UnicodeNormalizationForm[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm[\"NFKD\"] = \"NFKD\";\n})(UnicodeNormalizationForm || (UnicodeNormalizationForm = {}));\n;\nexport var Utf8ErrorReason;\n(function (Utf8ErrorReason) {\n // A continuation byte was present where there was nothing to continue\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n // An invalid (non-continuation) byte to start a UTF-8 codepoint was found\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n // The string is too short to process the expected codepoint\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"OVERRUN\"] = \"string overrun\";\n // A missing continuation byte was expected but not found\n // - offset = the index the continuation byte was expected at\n Utf8ErrorReason[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\n // The computed code point is outside the range for UTF-8\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; outside the UTF-8 range\n Utf8ErrorReason[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\n // UTF-8 strings may not contain UTF-16 surrogate pairs\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range\n Utf8ErrorReason[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n // The string is an overlong representation\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; already bounds checked\n Utf8ErrorReason[\"OVERLONG\"] = \"overlong representation\";\n})(Utf8ErrorReason || (Utf8ErrorReason = {}));\n;\nfunction errorFunc(reason, offset, bytes, output, badCodepoint) {\n return logger.throwArgumentError(`invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n}\nfunction ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes\n if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {\n let i = 0;\n for (let o = offset + 1; o < bytes.length; o++) {\n if (bytes[o] >> 6 !== 0x02) {\n break;\n }\n i++;\n }\n return i;\n }\n // This byte runs us past the end of the string, so just jump to the end\n // (but the first byte was read already read and therefore skipped)\n if (reason === Utf8ErrorReason.OVERRUN) {\n return bytes.length - offset - 1;\n }\n // Nothing to skip\n return 0;\n}\nfunction replaceFunc(reason, offset, bytes, output, badCodepoint) {\n // Overlong representations are otherwise \"valid\" code points; just non-deistingtished\n if (reason === Utf8ErrorReason.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n // Put the replacement character into the output\n output.push(0xfffd);\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n// Common error handing strategies\nexport const Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(bytes, onError) {\n if (onError == null) {\n onError = Utf8ErrorFuncs.error;\n }\n bytes = arrayify(bytes);\n const result = [];\n let i = 0;\n // Invalid bytes are ignored\n while (i < bytes.length) {\n const c = bytes[i++];\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n // 1110 xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf8) === 0xf0) {\n extraLength = 3;\n overlongMask = 0xffff;\n }\n else {\n if ((c & 0xc0) === 0x80) {\n i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result);\n }\n else {\n i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result);\n }\n continue;\n }\n // Do we have enough bytes in our data?\n if (i - 1 + extraLength >= bytes.length) {\n i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result);\n continue;\n }\n // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\n // Invalid continuation byte\n if ((nextChar & 0xc0) != 0x80) {\n i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result);\n res = null;\n break;\n }\n ;\n res = (res << 6) | (nextChar & 0x3f);\n i++;\n }\n // See above loop for invalid continuation byte\n if (res === null) {\n continue;\n }\n // Maximum code point\n if (res > 0x10ffff) {\n i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Reserved for UTF-16 surrogate halves\n if (res >= 0xd800 && res <= 0xdfff) {\n i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Check for overlong sequences (more bytes than needed)\n if (res <= overlongMask) {\n i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n}\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\nexport function toUtf8Bytes(str, form = UnicodeNormalizationForm.current) {\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\n if (c < 0x80) {\n result.push(c);\n }\n else if (c < 0x800) {\n result.push((c >> 6) | 0xc0);\n result.push((c & 0x3f) | 0x80);\n }\n else if ((c & 0xfc00) == 0xd800) {\n i++;\n const c2 = str.charCodeAt(i);\n if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) {\n throw new Error(\"invalid utf-8 string\");\n }\n // Surrogate Pair\n const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n result.push((pair >> 18) | 0xf0);\n result.push(((pair >> 12) & 0x3f) | 0x80);\n result.push(((pair >> 6) & 0x3f) | 0x80);\n result.push((pair & 0x3f) | 0x80);\n }\n else {\n result.push((c >> 12) | 0xe0);\n result.push(((c >> 6) & 0x3f) | 0x80);\n result.push((c & 0x3f) | 0x80);\n }\n }\n return arrayify(result);\n}\n;\nfunction escapeChar(value) {\n const hex = (\"0000\" + value.toString(16));\n return \"\\\\u\" + hex.substring(hex.length - 4);\n}\nexport function _toEscapedUtf8String(bytes, onError) {\n return '\"' + getUtf8CodePoints(bytes, onError).map((codePoint) => {\n if (codePoint < 256) {\n switch (codePoint) {\n case 8: return \"\\\\b\";\n case 9: return \"\\\\t\";\n case 10: return \"\\\\n\";\n case 13: return \"\\\\r\";\n case 34: return \"\\\\\\\"\";\n case 92: return \"\\\\\\\\\";\n }\n if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n if (codePoint <= 0xffff) {\n return escapeChar(codePoint);\n }\n codePoint -= 0x10000;\n return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00);\n }).join(\"\") + '\"';\n}\nexport function _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00));\n }).join(\"\");\n}\nexport function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\nexport function toUtf8CodePoints(str, form = UnicodeNormalizationForm.current) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n//# sourceMappingURL=utf8.js.map","\"use strict\";\nimport { HashZero } from \"@ethersproject/constants\";\nimport { arrayify, concat, hexlify } from \"@ethersproject/bytes\";\nimport { toUtf8Bytes, toUtf8String } from \"./utf8\";\nexport function formatBytes32String(text) {\n // Get the bytes\n const bytes = toUtf8Bytes(text);\n // Check we have room for null-termination\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n // Zero-pad (implicitly null-terminates)\n return hexlify(concat([bytes, HashZero]).slice(0, 32));\n}\nexport function parseBytes32String(bytes) {\n const data = arrayify(bytes);\n // Must be 32 bytes with a null-termination\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n // Find the null termination\n let length = 31;\n while (data[length - 1] === 0) {\n length--;\n }\n // Determine the string value\n return toUtf8String(data.slice(0, length));\n}\n//# sourceMappingURL=bytes32.js.map","/**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var INPUT_ERROR = 'input is invalid type';\n var FINALIZE_ERROR = 'finalize already called';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,\n 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,\n 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,\n 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,\n 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest'];\n var CSHAKE_BYTEPAD = {\n '128': 168,\n '256': 136\n };\n\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (bits, padding, outputType) {\n return function (message) {\n return new Keccak(bits, padding, bits).update(message)[outputType]();\n };\n };\n\n var createShakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits) {\n return new Keccak(bits, padding, outputBits).update(message)[outputType]();\n };\n };\n\n var createCshakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits, n, s) {\n return methods['cshake' + bits].update(message, outputBits, n, s)[outputType]();\n };\n };\n\n var createKmacOutputMethod = function (bits, padding, outputType) {\n return function (key, message, outputBits, s) {\n return methods['kmac' + bits].update(key, message, outputBits, s)[outputType]();\n };\n };\n\n var createOutputMethods = function (method, createMethod, bits, padding) {\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createMethod(bits, padding, type);\n }\n return method;\n };\n\n var createMethod = function (bits, padding) {\n var method = createOutputMethod(bits, padding, 'hex');\n method.create = function () {\n return new Keccak(bits, padding, bits);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits, padding);\n };\n\n var createShakeMethod = function (bits, padding) {\n var method = createShakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits) {\n return new Keccak(bits, padding, outputBits);\n };\n method.update = function (message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits, padding);\n };\n\n var createCshakeMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createCshakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits, n, s) {\n if (!n && !s) {\n return methods['shake' + bits].create(outputBits);\n } else {\n return new Keccak(bits, padding, outputBits).bytepad([n, s], w);\n }\n };\n method.update = function (message, outputBits, n, s) {\n return method.create(outputBits, n, s).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits, padding);\n };\n\n var createKmacMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createKmacOutputMethod(bits, padding, 'hex');\n method.create = function (key, outputBits, s) {\n return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w);\n };\n method.update = function (key, message, outputBits, s) {\n return method.create(key, outputBits, s).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits, padding);\n };\n\n var algorithms = [\n { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod },\n { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod },\n { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n\n var methods = {}, methodNames = [];\n\n for (var i = 0; i < algorithms.length; ++i) {\n var algorithm = algorithms[i];\n var bits = algorithm.bits;\n for (var j = 0; j < bits.length; ++j) {\n var methodName = algorithm.name + '_' + bits[j];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding);\n if (algorithm.name !== 'sha3') {\n var newMethodName = algorithm.name + bits[j];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n\n function Keccak(bits, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = (1600 - (bits << 1)) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n\n for (var i = 0; i < 50; ++i) {\n this.s[i] = 0;\n }\n }\n\n Keccak.prototype.update = function (message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var blocks = this.blocks, byteCount = this.byteCount, length = message.length,\n blockCount = this.blockCount, index = 0, s = this.s, i, code;\n\n while (index < length) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n if (notString) {\n for (i = this.start; index < length && i < byteCount; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < byteCount; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n this.lastByteIndex = i;\n if (i >= byteCount) {\n this.start = i - byteCount;\n this.block = blocks[blockCount];\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n this.reset = true;\n } else {\n this.start = i;\n }\n }\n return this;\n };\n\n Keccak.prototype.encode = function (x, right) {\n var o = x & 255, n = 1;\n var bytes = [o];\n x = x >> 8;\n o = x & 255;\n while (o > 0) {\n bytes.unshift(o);\n x = x >> 8;\n o = x & 255;\n ++n;\n }\n if (right) {\n bytes.push(n);\n } else {\n bytes.unshift(n);\n }\n this.update(bytes);\n return bytes.length;\n };\n\n Keccak.prototype.encodeString = function (str) {\n var notString, type = typeof str;\n if (type !== 'string') {\n if (type === 'object') {\n if (str === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {\n str = new Uint8Array(str);\n } else if (!Array.isArray(str)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var bytes = 0, length = str.length;\n if (notString) {\n bytes = length;\n } else {\n for (var i = 0; i < str.length; ++i) {\n var code = str.charCodeAt(i);\n if (code < 0x80) {\n bytes += 1;\n } else if (code < 0x800) {\n bytes += 2;\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes += 3;\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));\n bytes += 4;\n }\n }\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n\n Keccak.prototype.bytepad = function (strs, w) {\n var bytes = this.encode(w);\n for (var i = 0; i < strs.length; ++i) {\n bytes += this.encodeString(strs[i]);\n }\n var paddingBytes = w - bytes % w;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n\n Keccak.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;\n blocks[i >> 2] |= this.padding[i & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n blocks[blockCount - 1] |= 0x80000000;\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n };\n\n Keccak.prototype.toString = Keccak.prototype.hex = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var hex = '', block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] +\n HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] +\n HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] +\n HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F];\n }\n if (j % blockCount === 0) {\n f(s);\n i = 0;\n }\n }\n if (extraBytes) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F];\n if (extraBytes > 1) {\n hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F];\n }\n }\n return hex;\n };\n\n Keccak.prototype.arrayBuffer = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var bytes = this.outputBits >> 3;\n var buffer;\n if (extraBytes) {\n buffer = new ArrayBuffer((outputBlocks + 1) << 2);\n } else {\n buffer = new ArrayBuffer(bytes);\n }\n var array = new Uint32Array(buffer);\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n array[j] = s[i];\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n array[i] = s[i];\n buffer = buffer.slice(0, bytes);\n }\n return buffer;\n };\n\n Keccak.prototype.buffer = Keccak.prototype.arrayBuffer;\n\n Keccak.prototype.digest = Keccak.prototype.array = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var array = [], offset, block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n array[offset + 1] = (block >> 8) & 0xFF;\n array[offset + 2] = (block >> 16) & 0xFF;\n array[offset + 3] = (block >> 24) & 0xFF;\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n if (extraBytes > 1) {\n array[offset + 1] = (block >> 8) & 0xFF;\n }\n if (extraBytes > 2) {\n array[offset + 2] = (block >> 16) & 0xFF;\n }\n }\n return array;\n };\n\n function Kmac(bits, padding, outputBits) {\n Keccak.call(this, bits, padding, outputBits);\n }\n\n Kmac.prototype = new Keccak();\n\n Kmac.prototype.finalize = function () {\n this.encode(this.outputBits, true);\n return Keccak.prototype.finalize.call(this);\n };\n\n var f = function (s) {\n var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9,\n b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17,\n b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33,\n b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n = 0; n < 48; n += 2) {\n c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40];\n c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41];\n c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42];\n c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43];\n c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44];\n c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45];\n c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46];\n c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47];\n c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48];\n c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49];\n\n h = c8 ^ ((c2 << 1) | (c3 >>> 31));\n l = c9 ^ ((c3 << 1) | (c2 >>> 31));\n s[0] ^= h;\n s[1] ^= l;\n s[10] ^= h;\n s[11] ^= l;\n s[20] ^= h;\n s[21] ^= l;\n s[30] ^= h;\n s[31] ^= l;\n s[40] ^= h;\n s[41] ^= l;\n h = c0 ^ ((c4 << 1) | (c5 >>> 31));\n l = c1 ^ ((c5 << 1) | (c4 >>> 31));\n s[2] ^= h;\n s[3] ^= l;\n s[12] ^= h;\n s[13] ^= l;\n s[22] ^= h;\n s[23] ^= l;\n s[32] ^= h;\n s[33] ^= l;\n s[42] ^= h;\n s[43] ^= l;\n h = c2 ^ ((c6 << 1) | (c7 >>> 31));\n l = c3 ^ ((c7 << 1) | (c6 >>> 31));\n s[4] ^= h;\n s[5] ^= l;\n s[14] ^= h;\n s[15] ^= l;\n s[24] ^= h;\n s[25] ^= l;\n s[34] ^= h;\n s[35] ^= l;\n s[44] ^= h;\n s[45] ^= l;\n h = c4 ^ ((c8 << 1) | (c9 >>> 31));\n l = c5 ^ ((c9 << 1) | (c8 >>> 31));\n s[6] ^= h;\n s[7] ^= l;\n s[16] ^= h;\n s[17] ^= l;\n s[26] ^= h;\n s[27] ^= l;\n s[36] ^= h;\n s[37] ^= l;\n s[46] ^= h;\n s[47] ^= l;\n h = c6 ^ ((c0 << 1) | (c1 >>> 31));\n l = c7 ^ ((c1 << 1) | (c0 >>> 31));\n s[8] ^= h;\n s[9] ^= l;\n s[18] ^= h;\n s[19] ^= l;\n s[28] ^= h;\n s[29] ^= l;\n s[38] ^= h;\n s[39] ^= l;\n s[48] ^= h;\n s[49] ^= l;\n\n b0 = s[0];\n b1 = s[1];\n b32 = (s[11] << 4) | (s[10] >>> 28);\n b33 = (s[10] << 4) | (s[11] >>> 28);\n b14 = (s[20] << 3) | (s[21] >>> 29);\n b15 = (s[21] << 3) | (s[20] >>> 29);\n b46 = (s[31] << 9) | (s[30] >>> 23);\n b47 = (s[30] << 9) | (s[31] >>> 23);\n b28 = (s[40] << 18) | (s[41] >>> 14);\n b29 = (s[41] << 18) | (s[40] >>> 14);\n b20 = (s[2] << 1) | (s[3] >>> 31);\n b21 = (s[3] << 1) | (s[2] >>> 31);\n b2 = (s[13] << 12) | (s[12] >>> 20);\n b3 = (s[12] << 12) | (s[13] >>> 20);\n b34 = (s[22] << 10) | (s[23] >>> 22);\n b35 = (s[23] << 10) | (s[22] >>> 22);\n b16 = (s[33] << 13) | (s[32] >>> 19);\n b17 = (s[32] << 13) | (s[33] >>> 19);\n b48 = (s[42] << 2) | (s[43] >>> 30);\n b49 = (s[43] << 2) | (s[42] >>> 30);\n b40 = (s[5] << 30) | (s[4] >>> 2);\n b41 = (s[4] << 30) | (s[5] >>> 2);\n b22 = (s[14] << 6) | (s[15] >>> 26);\n b23 = (s[15] << 6) | (s[14] >>> 26);\n b4 = (s[25] << 11) | (s[24] >>> 21);\n b5 = (s[24] << 11) | (s[25] >>> 21);\n b36 = (s[34] << 15) | (s[35] >>> 17);\n b37 = (s[35] << 15) | (s[34] >>> 17);\n b18 = (s[45] << 29) | (s[44] >>> 3);\n b19 = (s[44] << 29) | (s[45] >>> 3);\n b10 = (s[6] << 28) | (s[7] >>> 4);\n b11 = (s[7] << 28) | (s[6] >>> 4);\n b42 = (s[17] << 23) | (s[16] >>> 9);\n b43 = (s[16] << 23) | (s[17] >>> 9);\n b24 = (s[26] << 25) | (s[27] >>> 7);\n b25 = (s[27] << 25) | (s[26] >>> 7);\n b6 = (s[36] << 21) | (s[37] >>> 11);\n b7 = (s[37] << 21) | (s[36] >>> 11);\n b38 = (s[47] << 24) | (s[46] >>> 8);\n b39 = (s[46] << 24) | (s[47] >>> 8);\n b30 = (s[8] << 27) | (s[9] >>> 5);\n b31 = (s[9] << 27) | (s[8] >>> 5);\n b12 = (s[18] << 20) | (s[19] >>> 12);\n b13 = (s[19] << 20) | (s[18] >>> 12);\n b44 = (s[29] << 7) | (s[28] >>> 25);\n b45 = (s[28] << 7) | (s[29] >>> 25);\n b26 = (s[38] << 8) | (s[39] >>> 24);\n b27 = (s[39] << 8) | (s[38] >>> 24);\n b8 = (s[48] << 14) | (s[49] >>> 18);\n b9 = (s[49] << 14) | (s[48] >>> 18);\n\n s[0] = b0 ^ (~b2 & b4);\n s[1] = b1 ^ (~b3 & b5);\n s[10] = b10 ^ (~b12 & b14);\n s[11] = b11 ^ (~b13 & b15);\n s[20] = b20 ^ (~b22 & b24);\n s[21] = b21 ^ (~b23 & b25);\n s[30] = b30 ^ (~b32 & b34);\n s[31] = b31 ^ (~b33 & b35);\n s[40] = b40 ^ (~b42 & b44);\n s[41] = b41 ^ (~b43 & b45);\n s[2] = b2 ^ (~b4 & b6);\n s[3] = b3 ^ (~b5 & b7);\n s[12] = b12 ^ (~b14 & b16);\n s[13] = b13 ^ (~b15 & b17);\n s[22] = b22 ^ (~b24 & b26);\n s[23] = b23 ^ (~b25 & b27);\n s[32] = b32 ^ (~b34 & b36);\n s[33] = b33 ^ (~b35 & b37);\n s[42] = b42 ^ (~b44 & b46);\n s[43] = b43 ^ (~b45 & b47);\n s[4] = b4 ^ (~b6 & b8);\n s[5] = b5 ^ (~b7 & b9);\n s[14] = b14 ^ (~b16 & b18);\n s[15] = b15 ^ (~b17 & b19);\n s[24] = b24 ^ (~b26 & b28);\n s[25] = b25 ^ (~b27 & b29);\n s[34] = b34 ^ (~b36 & b38);\n s[35] = b35 ^ (~b37 & b39);\n s[44] = b44 ^ (~b46 & b48);\n s[45] = b45 ^ (~b47 & b49);\n s[6] = b6 ^ (~b8 & b0);\n s[7] = b7 ^ (~b9 & b1);\n s[16] = b16 ^ (~b18 & b10);\n s[17] = b17 ^ (~b19 & b11);\n s[26] = b26 ^ (~b28 & b20);\n s[27] = b27 ^ (~b29 & b21);\n s[36] = b36 ^ (~b38 & b30);\n s[37] = b37 ^ (~b39 & b31);\n s[46] = b46 ^ (~b48 & b40);\n s[47] = b47 ^ (~b49 & b41);\n s[8] = b8 ^ (~b0 & b2);\n s[9] = b9 ^ (~b1 & b3);\n s[18] = b18 ^ (~b10 & b12);\n s[19] = b19 ^ (~b11 & b13);\n s[28] = b28 ^ (~b20 & b22);\n s[29] = b29 ^ (~b21 & b23);\n s[38] = b38 ^ (~b30 & b32);\n s[39] = b39 ^ (~b31 & b33);\n s[48] = b48 ^ (~b40 & b42);\n s[49] = b49 ^ (~b41 & b43);\n\n s[0] ^= RC[n];\n s[1] ^= RC[n + 1];\n }\n };\n\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i = 0; i < methodNames.length; ++i) {\n root[methodNames[i]] = methods[methodNames[i]];\n }\n if (AMD) {\n define(function () {\n return methods;\n });\n }\n }\n})();\n","export const version = \"solidity/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexlify, zeroPad } from \"@ethersproject/bytes\";\nimport { keccak256 as hashKeccak256 } from \"@ethersproject/keccak256\";\nimport { sha256 as hashSha256 } from \"@ethersproject/sha2\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nconst regexBytes = new RegExp(\"^bytes([0-9]+)$\");\nconst regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\nconst regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\nconst Zeros = \"0000000000000000000000000000000000000000000000000000000000000000\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nfunction _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return zeroPad(value, 32);\n }\n return arrayify(value);\n case \"string\":\n return toUtf8Bytes(value);\n case \"bytes\":\n return arrayify(value);\n case \"bool\":\n value = (value ? \"0x01\" : \"0x00\");\n if (isArray) {\n return zeroPad(value, 32);\n }\n return arrayify(value);\n }\n let match = type.match(regexNumber);\n if (match) {\n //let signed = (match[1] === \"int\")\n let size = parseInt(match[2] || \"256\");\n if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) {\n logger.throwArgumentError(\"invalid number type\", \"type\", type);\n }\n if (isArray) {\n size = 256;\n }\n value = BigNumber.from(value).toTwos(size);\n return zeroPad(value, size / 8);\n }\n match = type.match(regexBytes);\n if (match) {\n const size = parseInt(match[1]);\n if (String(size) !== match[1] || size === 0 || size > 32) {\n logger.throwArgumentError(\"invalid bytes type\", \"type\", type);\n }\n if (arrayify(value).byteLength !== size) {\n logger.throwArgumentError(`invalid value for ${type}`, \"value\", value);\n }\n if (isArray) {\n return arrayify((value + Zeros).substring(0, 66));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n if (count != value.length) {\n logger.throwArgumentError(`invalid array length for ${type}`, \"value\", value);\n }\n const result = [];\n value.forEach(function (value) {\n result.push(_pack(baseType, value, true));\n });\n return concat(result);\n }\n return logger.throwArgumentError(\"invalid type\", \"type\", type);\n}\n// @TODO: Array Enum\nexport function pack(types, values) {\n if (types.length != values.length) {\n logger.throwArgumentError(\"wrong number of values; expected ${ types.length }\", \"values\", values);\n }\n const tight = [];\n types.forEach(function (type, index) {\n tight.push(_pack(type, values[index]));\n });\n return hexlify(concat(tight));\n}\nexport function keccak256(types, values) {\n return hashKeccak256(pack(types, values));\n}\nexport function sha256(types, values) {\n return hashSha256(pack(types, values));\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nimport sha3 from \"js-sha3\";\nimport { arrayify } from \"@ethersproject/bytes\";\nexport function keccak256(data) {\n return '0x' + sha3.keccak_256(arrayify(data));\n}\n//# sourceMappingURL=index.js.map","import { formatBytes32String } from '@ethersproject/strings';\nimport { keccak256 } from '@ethersproject/solidity';\nimport { defaultAbiCoder } from '@ethersproject/abi';\nimport { BigNumber, formatFixed } from '@ethersproject/bignumber';\nimport { Provider } from '@ethersproject/providers';\nimport { GyroConfig, GyroConfig__factory, Multicall } from '@/contracts';\nimport { GyroConfigInterface } from '@/contracts/GyroConfig';\n\nexport interface GyroConfigRepository {\n getGyroProtocolFee(poolAddress: string): Promise;\n}\n\nconst protocolFeePercKey = formatBytes32String('PROTOCOL_SWAP_FEE_PERC');\nconst gyroPoolTypeKey = formatBytes32String('E-CLP');\nconst encodedPoolTypeKey = keccak256(\n ['bytes'],\n [\n defaultAbiCoder.encode(\n ['bytes32', 'bytes32'],\n [protocolFeePercKey, gyroPoolTypeKey]\n ),\n ]\n);\n\nexport class GyroConfigRepositoryImpl implements GyroConfigRepository {\n gyroConfigInterface: GyroConfigInterface;\n gyroConfig: GyroConfig;\n\n constructor(\n private gyroConfigAddress: string,\n private multicall: Multicall,\n provider: Provider\n ) {\n this.gyroConfigInterface = GyroConfig__factory.createInterface();\n this.gyroConfig = GyroConfig__factory.connect(gyroConfigAddress, provider);\n }\n\n async getGyroProtocolFee(poolAddress: string): Promise {\n let fee;\n const encodedPoolSpecificKey = keccak256(\n ['bytes'],\n [\n defaultAbiCoder.encode(\n ['bytes32', 'uint256'],\n [protocolFeePercKey, poolAddress]\n ),\n ]\n );\n const payload = [\n {\n target: this.gyroConfigAddress,\n callData: this.gyroConfigInterface.encodeFunctionData('hasKey', [\n encodedPoolSpecificKey,\n ]),\n },\n {\n target: this.gyroConfigAddress,\n callData: this.gyroConfigInterface.encodeFunctionData('hasKey', [\n encodedPoolTypeKey,\n ]),\n },\n {\n target: this.gyroConfigAddress,\n callData: this.gyroConfigInterface.encodeFunctionData('hasKey', [\n protocolFeePercKey,\n ]),\n },\n ];\n const [, [hasSpecificKeyHex, hasPoolTypeKeyHex, hasDefaultKeyHex]] =\n await this.multicall.callStatic.aggregate(payload);\n const hasSpecificKey = BigNumber.from(hasSpecificKeyHex).eq(1);\n const hasPoolTypeKey = BigNumber.from(hasPoolTypeKeyHex).eq(1);\n const hasDefaultKey = BigNumber.from(hasDefaultKeyHex).eq(1);\n if (hasSpecificKey) {\n fee = parseFloat(\n formatFixed(await this.gyroConfig.getUint(encodedPoolSpecificKey), 18)\n );\n } else if (hasPoolTypeKey) {\n fee = parseFloat(\n formatFixed(await this.gyroConfig.getUint(encodedPoolTypeKey), 18)\n );\n } else if (hasDefaultKey) {\n fee = parseFloat(\n formatFixed(await this.gyroConfig.getUint(protocolFeePercKey), 18)\n );\n } else {\n fee = 0;\n }\n return fee;\n }\n}\n","import { Interface } from '@ethersproject/abi';\nimport { getAddress } from '@ethersproject/address';\nimport { formatUnits } from '@ethersproject/units';\nimport { Multicall } from '@/contracts';\n\nconst gaugeControllerInterface = new Interface([\n 'function gauge_relative_weight(address gauge, uint timestamp) view returns (uint)',\n]);\n\nconst gaugeControllerCheckpointerInterface = new Interface([\n 'function gauge_relative_weight(address gauge) view returns (uint)',\n]);\n\nexport class GaugeControllerMulticallRepository {\n constructor(\n private multicall: Multicall,\n private gaugeControllerAddress: string,\n private gaugeControllerCheckpointerAddress?: string\n ) {}\n\n async getRelativeWeights(\n gaugeAddresses: string[],\n timestamp?: number\n ): Promise<{ [gaugeAddress: string]: number }> {\n const payload = gaugeAddresses.map((gaugeAddress) => {\n // The checkpointer only exists for mainnet, if the network is a testnet, it'll use the regular gauge controller\n if (this.gaugeControllerCheckpointerAddress && !timestamp) {\n return {\n target: this.gaugeControllerCheckpointerAddress,\n callData: gaugeControllerCheckpointerInterface.encodeFunctionData(\n 'gauge_relative_weight',\n [getAddress(gaugeAddress)]\n ),\n };\n }\n return {\n target: this.gaugeControllerAddress,\n callData: gaugeControllerInterface.encodeFunctionData(\n 'gauge_relative_weight',\n [getAddress(gaugeAddress), timestamp || Math.floor(Date.now() / 1000)]\n ),\n };\n });\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const weights = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseFloat(formatUnits(res[i], 18));\n return p;\n },\n {}\n );\n\n return weights;\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { Findable } from '@/types';\n\nexport abstract class AbstractSubgraphRepository\n implements Findable\n{\n protected abstract mapType(subgraphFragment: any): T;\n\n abstract query(args: any): Promise;\n\n async get(args: any): Promise {\n const result = await this.query(args);\n return result?.length > 0 ? result[0] : undefined;\n }\n\n async find(id: string): Promise {\n return this.get({ where: { id: id } });\n }\n\n async findBy(attribute: A, value: string): Promise {\n return this.get({ where: { [String(attribute)]: value } });\n }\n\n async findAllBy(\n attribute: A,\n value: string,\n first = 1000,\n skip = 0\n ): Promise {\n const args = {\n where: { [String(attribute)]: value },\n first: first,\n skip: skip,\n };\n return this.query(args);\n }\n}\n","import { Network } from '@/lib/constants/network';\nimport { AbstractSubgraphRepository } from './abstract-subgraph-repository';\nimport { createSubgraphClient, SubgraphClient } from '../subgraph';\n\nexport abstract class BalancerSubgraphRepository<\n T,\n A\n> extends AbstractSubgraphRepository {\n protected client: SubgraphClient;\n\n constructor(\n url: string,\n protected chainId: Network,\n protected blockHeight?: () => Promise\n ) {\n super();\n this.client = createSubgraphClient(url);\n }\n}\n","import { Network } from '@/lib/constants/network';\nimport { AbstractSubgraphRepository } from './abstract-subgraph-repository';\nimport { createGaugesClient, GaugesClient } from '../subgraph';\n\nexport abstract class GaugesSubgraphRepository<\n T,\n A\n> extends AbstractSubgraphRepository {\n protected client: GaugesClient;\n\n constructor(\n url: string,\n protected chainId: Network,\n protected blockHeight?: () => Promise\n ) {\n super();\n this.client = createGaugesClient(url);\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { GaugeShare, GaugeShareAttributes } from './types';\nimport { GaugesSubgraphRepository } from '@/modules/subgraph/repository';\nimport {\n SubgraphGaugeShareFragment,\n GaugeShare_OrderBy,\n OrderDirection,\n} from '@/modules/subgraph/generated/balancer-gauges';\n\nexport class GaugeSharesRepository extends GaugesSubgraphRepository<\n GaugeShare,\n GaugeShareAttributes\n> {\n async query(args: any): Promise {\n if (!args.orderBy) args.orderBy = GaugeShare_OrderBy.balance;\n if (!args.orderDirection) args.orderDirection = OrderDirection.desc;\n if (!args.block && this.blockHeight)\n args.block = { number: await this.blockHeight() };\n\n const { gaugeShares } = await this.client.GaugeShares(args);\n return gaugeShares.map(this.mapType);\n }\n\n mapType(subgraphGaugeShare: SubgraphGaugeShareFragment): GaugeShare {\n return {\n id: subgraphGaugeShare.id,\n balance: subgraphGaugeShare.balance,\n userAddress: subgraphGaugeShare.user?.id,\n gauge: {\n id: subgraphGaugeShare.gauge.id,\n poolId: subgraphGaugeShare.gauge.poolId || undefined,\n isKilled: subgraphGaugeShare.gauge.isKilled,\n totalSupply: subgraphGaugeShare.gauge.totalSupply,\n },\n };\n }\n\n async findByUser(\n userAddress: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(\n GaugeShareAttributes.UserAddress,\n userAddress,\n first,\n skip\n );\n }\n\n async findByGauge(\n gaugeId: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(GaugeShareAttributes.GaugeId, gaugeId, first, skip);\n }\n}\n","import { Multicall } from '@/contracts';\nimport { Interface } from '@ethersproject/abi';\nimport { formatUnits } from '@ethersproject/units';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport type { Network } from '@/types';\n\nconst liquidityGaugeV5Interface = new Interface([\n 'function totalSupply() view returns (uint)',\n 'function working_supply() view returns (uint)',\n 'function reward_count() view returns (uint)',\n 'function reward_tokens(uint rewardIndex) view returns (address)',\n 'function reward_data(address rewardToken) view returns (tuple(address token, address distributor, uint period_finish, uint rate, uint last_update, uint integral) data)',\n]);\n\nconst childLiquidityGaugeInterface = new Interface([\n 'function inflation_rate(uint currentWeekTimestamp) view returns (uint)',\n]);\n\nexport interface RewardData {\n token: string; // Always 0x0\n distributor: string;\n period_finish: BigNumber;\n rate: BigNumber; // per second\n last_update: BigNumber;\n integral: BigNumber; // sum accrued to date\n decimals?: number; // Provided by subgraph\n}\n\n/**\n * A lot of code to get liquidity gauge state via RPC multicall.\n * TODO: reseach helper contracts or extend subgraph\n */\nexport class LiquidityGaugesMulticallRepository {\n constructor(private multicall: Multicall, private chainId: Network) {}\n\n async getTotalSupplies(\n gaugeAddresses: string[]\n ): Promise<{ [gaugeAddress: string]: number }> {\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData('totalSupply', []),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n // Handle 0x\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n\n const totalSupplies = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseFloat(formatUnits(res0x[i], 18));\n return p;\n },\n {}\n );\n\n return totalSupplies;\n }\n\n async getWorkingSupplies(\n gaugeAddresses: string[]\n ): Promise<{ [gaugeAddress: string]: number }> {\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'working_supply',\n []\n ),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n // Handle 0x\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n\n const workingSupplies = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseFloat(formatUnits(res0x[i], 18));\n return p;\n },\n {}\n );\n\n return workingSupplies;\n }\n\n async getInflationRates(\n gaugeAddresses: string[]\n ): Promise<{ [gaugeAddress: string]: number }> {\n const currentWeek = Math.floor(Date.now() / 1000 / 604800);\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: childLiquidityGaugeInterface.encodeFunctionData(\n 'inflation_rate',\n [currentWeek]\n ),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n // Handle 0x\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n\n const inflationRates = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseFloat(formatUnits(res0x[i], 18));\n return p;\n },\n {}\n );\n\n return inflationRates;\n }\n\n async getRewardCounts(\n gaugeAddresses: string[]\n ): Promise<{ [gaugeAddress: string]: number }> {\n let rewardCounts;\n if (this.chainId == 1) {\n const payload = gaugeAddresses.map((gaugeAddress) => ({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'reward_count',\n []\n ),\n }));\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n // Handle 0x return values\n const res0x = res.map((r: string) => (r == '0x' ? '0x0' : r));\n\n rewardCounts = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a, i) => {\n p[a] ||= parseInt(res0x[i]);\n return p;\n },\n {}\n );\n } else {\n rewardCounts = gaugeAddresses.reduce(\n (p: { [key: string]: number }, a) => {\n p[a] ||= 1;\n return p;\n },\n {}\n );\n }\n\n return rewardCounts;\n }\n\n async getRewardTokens(\n gaugeAddresses: string[],\n passingRewardCounts?: { [gaugeAddress: string]: number }\n ): Promise<{ [gaugeAddress: string]: string[] }> {\n const rewardCounts =\n passingRewardCounts || (await this.getRewardCounts(gaugeAddresses));\n const gaugesWithRewards = gaugeAddresses.filter(\n (gaugeAddress) => rewardCounts[gaugeAddress] > 0\n );\n const startIndexes = [0];\n const payload = gaugesWithRewards\n .map((gaugeAddress, gaugeIndex) => {\n const calls = [];\n for (let i = 0; i < rewardCounts[gaugeAddress]; i++) {\n calls.push({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'reward_tokens',\n [i]\n ),\n });\n }\n startIndexes[gaugeIndex + 1] =\n startIndexes[gaugeIndex] + rewardCounts[gaugeAddress];\n return calls;\n })\n .flat();\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const rewardTokens = gaugesWithRewards.reduce(\n (p: { [key: string]: string[] }, a, i) => {\n const start = startIndexes[i];\n const end = startIndexes[i + 1];\n const tokens: string[] = [];\n for (let i = start; i < end; i++) {\n tokens.push(\n liquidityGaugeV5Interface.decodeFunctionResult(\n 'reward_tokens',\n res[i]\n )[0]\n );\n }\n p[a] ||= tokens;\n return p;\n },\n {}\n );\n\n return rewardTokens;\n }\n\n async getRewardData(\n gaugeAddresses: string[],\n passingRewardTokens?: { [gaugeAddress: string]: string[] }\n ): Promise<{\n [gaugeAddress: string]: { [rewardTokenAddress: string]: RewardData };\n }> {\n const rewardTokens =\n passingRewardTokens || (await this.getRewardTokens(gaugeAddresses));\n\n const startIndexes = [0];\n const payload = Object.keys(rewardTokens)\n .map((gaugeAddress, gaugeIndex) => {\n const calls = [];\n for (let i = 0; i < rewardTokens[gaugeAddress].length; i++) {\n calls.push({\n target: gaugeAddress,\n callData: liquidityGaugeV5Interface.encodeFunctionData(\n 'reward_data',\n [rewardTokens[gaugeAddress][i]]\n ),\n });\n }\n startIndexes[gaugeIndex + 1] =\n startIndexes[gaugeIndex] + rewardTokens[gaugeAddress].length;\n return calls;\n })\n .flat();\n const [, res] = (await this.multicall.callStatic.aggregate(payload)) as [\n unknown,\n string[]\n ];\n const decoded = res.map(\n (r) => liquidityGaugeV5Interface.decodeFunctionResult('reward_data', r)[0]\n );\n\n const rewardData = Object.keys(rewardTokens).reduce(\n (p: { [key: string]: { [key: string]: RewardData } }, a, i) => {\n const start = startIndexes[i];\n const data = rewardTokens[a].reduce(\n (d: { [key: string]: RewardData }, t, x) => {\n d[t] ||= decoded[start + x] as RewardData;\n return d;\n },\n {}\n );\n p[a] ||= data;\n return p;\n },\n {}\n );\n\n return rewardData;\n }\n}\n","import { Findable } from '../types';\nimport {\n createGaugesClient,\n GaugesClient,\n SubgraphLiquidityGauge,\n} from '@/modules/subgraph/subgraph';\n\n/**\n * Access liquidity gauges indexed by subgraph.\n * Because we have ~100 gauges to save on repeated http calls we cache all results as `gauges` on an instance.\n * Balancer's subgraph URL: https://thegraph.com/hosted-service/subgraph/balancer-labs/balancer-gauges\n */\nexport class LiquidityGaugesSubgraphRepository\n implements Findable\n{\n private client: GaugesClient;\n public gauges: SubgraphLiquidityGauge[] = [];\n\n constructor(url: string) {\n this.client = createGaugesClient(url);\n }\n\n async fetch(): Promise {\n console.time('fetching liquidity gauges');\n const queryResult = await this.client.Pools({\n first: 1000,\n where: {\n preferentialGauge_not: null,\n },\n });\n const qauges = queryResult.pools.map((pool) => pool.preferentialGauge);\n // TODO: optionally convert subgraph type to sdk internal type\n this.gauges = qauges as SubgraphLiquidityGauge[];\n\n console.timeEnd('fetching liquidity gauges');\n return this.gauges;\n }\n\n async find(id: string): Promise {\n if (this.gauges.length == 0) {\n await this.fetch();\n }\n\n return this.gauges.find((gauge) => gauge.id == id);\n }\n\n async findBy(\n param: string,\n value: string\n ): Promise {\n if (this.gauges.length == 0) {\n await this.fetch();\n }\n\n if (param == 'id') {\n return this.find(value);\n } else if (param == 'poolId') {\n return this.gauges.find((gauge) => gauge.poolId == value);\n } else if (param == 'poolAddress') {\n return this.gauges.find((gauge) => gauge.poolAddress == value);\n } else {\n throw `search by ${param} not implemented`;\n }\n }\n}\n","import { GaugeControllerMulticallRepository } from '../gauge-controller/multicall';\nimport { LiquidityGaugesMulticallRepository, RewardData } from './multicall';\nimport { LiquidityGaugesSubgraphRepository } from './subgraph';\nimport { parseUnits } from '@ethersproject/units';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport type {\n Maybe,\n SubgraphLiquidityGauge,\n} from '@/modules/subgraph/subgraph';\nimport type { Findable } from '../types';\nimport type { Network } from '@/types';\nimport { Multicall } from '@/contracts';\n\nexport interface LiquidityGauge {\n id: string;\n address: string;\n name: string;\n poolId?: Maybe;\n poolAddress: string;\n totalSupply: number;\n workingSupply: number;\n relativeWeight: number;\n rewardTokens?: { [tokenAddress: string]: RewardData };\n claimableTokens?: { [tokenAddress: string]: BigNumber };\n balInflationRate?: number;\n}\n\nexport class LiquidityGaugeSubgraphRPCProvider\n implements Findable\n{\n gaugeController?: GaugeControllerMulticallRepository;\n multicall: LiquidityGaugesMulticallRepository;\n subgraph: LiquidityGaugesSubgraphRepository;\n workingSupplies: { [gaugeAddress: string]: number } = {};\n relativeWeights: { [gaugeAddress: string]: number } = {};\n inflationRates: { [gaugeAddress: string]: number } = {};\n rewardData: {\n [gaugeAddress: string]: { [tokenAddress: string]: RewardData };\n } = {};\n gauges?: Promise;\n\n constructor(\n subgraphUrl: string,\n multicall: Multicall,\n gaugeControllerAddress: string,\n private chainId: Network,\n gaugeControllerCheckpointerAddress?: string\n ) {\n if (gaugeControllerAddress) {\n this.gaugeController = new GaugeControllerMulticallRepository(\n multicall,\n gaugeControllerAddress,\n gaugeControllerCheckpointerAddress\n );\n }\n this.multicall = new LiquidityGaugesMulticallRepository(multicall, chainId);\n this.subgraph = new LiquidityGaugesSubgraphRepository(subgraphUrl);\n }\n\n async fetch(): Promise {\n const gauges: SubgraphLiquidityGauge[] = await this.subgraph.fetch();\n const gaugeAddresses = gauges.map((g) => g.id);\n if (this.chainId == 1) {\n console.time('Fetching multicall.getWorkingSupplies');\n this.workingSupplies = await this.multicall.getWorkingSupplies(\n gaugeAddresses\n );\n console.timeEnd('Fetching multicall.getWorkingSupplies');\n } else {\n // Filter out gauges that are not from the factory supporting inflation rate\n // Safe to remove this once all gauges are migrated to the new factory\n const oldFactories = [\n '0x3b8ca519122cdd8efb272b0d3085453404b25bd0', // Polygon\n '0xb08e16cfc07c684daa2f93c70323badb2a6cbfd2', // Arbitrum\n '0x2e96068b3d5b5bae3d7515da4a1d2e52d08a2647', // Optimism\n '0x809b79b53f18e9bc08a961ed4678b901ac93213a', // Gnosis\n ];\n\n const childGaugeAddresses = gauges\n .filter((g) => !oldFactories.includes(g.factory.id.toLowerCase()))\n .map((g) => g.id);\n\n if (childGaugeAddresses.length > 0) {\n console.time('Fetching multicall.inflationRates');\n this.inflationRates = await this.multicall.getInflationRates(\n childGaugeAddresses\n );\n console.timeEnd('Fetching multicall.inflationRates');\n console.time('Fetching multicall.getWorkingSupplies');\n this.workingSupplies = await this.multicall.getWorkingSupplies(\n childGaugeAddresses\n );\n console.timeEnd('Fetching multicall.getWorkingSupplies');\n }\n }\n if (this.gaugeController) {\n console.time('Fetching gaugeController.getRelativeWeights');\n this.relativeWeights = await this.gaugeController.getRelativeWeights(\n gaugeAddresses\n );\n console.timeEnd('Fetching gaugeController.getRelativeWeights');\n }\n\n // Kept as a potential fallback for getting rewardData from RPC\n // this.rewardData = await this.multicall.getRewardData(\n // gaugeAddresses //,\n // // rewardTokens\n // );\n\n // Reward data was made available from subgraph, keeping it separate for potential RPC fallback\n this.rewardData = gauges.reduce(\n (r: { [key: string]: { [key: string]: RewardData } }, g) => {\n r[g.id] ||= g.tokens\n ? Object.fromEntries(\n g.tokens.map((t) => [\n t.id.split('-')[0],\n {\n distributor: '',\n last_update: BigNumber.from(0),\n integral: BigNumber.from(0),\n token: t.id.split('-')[0],\n decimals: t.decimals,\n rate: parseUnits(t.rate || '0', t.decimals),\n period_finish: BigNumber.from(\n (t.periodFinish as unknown as string) || '0'\n ),\n },\n ])\n )\n : {};\n\n return r;\n },\n {}\n );\n\n return gauges.map(this.compose.bind(this));\n }\n\n async find(id: string): Promise {\n if (!this.gauges) {\n this.gauges = this.fetch();\n }\n\n return (await this.gauges).find((g) => g.id == id);\n }\n\n async findBy(\n attribute: string,\n value: string\n ): Promise {\n if (!this.gauges) {\n this.gauges = this.fetch();\n }\n\n let gauge: LiquidityGauge | undefined;\n if (attribute == 'id') {\n return this.find(value);\n } else if (attribute == 'address') {\n return this.find(value);\n } else if (attribute == 'poolId') {\n gauge = (await this.gauges).find((g) => g.poolId == value);\n } else if (attribute == 'poolAddress') {\n gauge = (await this.gauges).find((g) => g.poolAddress == value);\n } else {\n throw `search by ${attribute} not implemented`;\n }\n\n return gauge;\n }\n\n private compose(subgraphGauge: SubgraphLiquidityGauge) {\n return {\n id: subgraphGauge.id,\n address: subgraphGauge.id,\n name: subgraphGauge.symbol,\n poolId: subgraphGauge.poolId,\n poolAddress: subgraphGauge.poolAddress,\n totalSupply: parseFloat(subgraphGauge.totalSupply),\n workingSupply: this.workingSupplies[subgraphGauge.id],\n relativeWeight: this.relativeWeights[subgraphGauge.id],\n rewardTokens: this.rewardData[subgraphGauge.id],\n balInflationRate: this.inflationRates[subgraphGauge.id],\n };\n }\n}\n","import axios from 'axios';\nimport { jsonToGraphQLQuery } from 'json-to-graphql-query';\n\nexport default class BalancerAPIClient {\n constructor(private readonly url: string, private readonly apiKey: string) {}\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public async get(query: unknown): Promise {\n try {\n const payload = this.toPayload(query);\n const { data } = await axios.post(this.url, payload, {\n headers: {\n 'x-api-key': this.apiKey,\n },\n });\n if (data.errors) {\n throw new Error(\n data.errors.map((error: Error) => error.message).join(',')\n );\n }\n return data.data;\n } catch (error) {\n console.error(error);\n throw error;\n }\n\n return [];\n }\n\n public toPayload(query: unknown): unknown {\n return JSON.stringify({ query: jsonToGraphQLQuery({ query }) });\n }\n}\n","import { Findable } from '../types';\nimport { PoolAttribute, PoolsRepositoryFetchOptions } from './types';\nimport { GraphQLQuery, Pool } from '@/types';\nimport BalancerAPIClient from '@/modules/api/balancer-api.client';\nimport {\n GraphQLArgsBuilder,\n BalancerAPIArgsFormatter,\n} from '@/lib/graphql/args-builder';\nimport { GraphQLArgs } from '@/lib/graphql/types';\n\ninterface PoolsBalancerAPIOptions {\n url: string;\n apiKey: string;\n query?: GraphQLQuery;\n}\n\nconst MAX_POOLS_PER_REQUEST = 1000;\nconst DEFAULT_SKIP = 0;\nconst DEFAULT_FIRST = 10;\nconst CHECK_TIMEOUT_SECONDS = 10;\nconst CHECK_INTERVAL_MS = 10;\nconst MAX_CHECKS = (CHECK_TIMEOUT_SECONDS * 1000) / CHECK_INTERVAL_MS;\n\nfunction timeout(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Access pools using the Balancer GraphQL Api.\n *\n * Balancer's API URL: https://api.balancer.fi/query/\n */\nexport class PoolsBalancerAPIRepository\n implements Findable\n{\n private client: BalancerAPIClient;\n public pools: Pool[] = [];\n public skip = 0; // Keep track of how many pools to skip on next fetch, so this functions similar to subgraph repository.\n public nextToken: string | undefined | null; // A token to pass to the next query to retrieve the next page of results. Undefined initially, null when there are no more results.\n private query: GraphQLQuery;\n private hasFetched = false;\n private isFetching = false;\n\n constructor(options: PoolsBalancerAPIOptions) {\n this.client = new BalancerAPIClient(options.url, options.apiKey);\n\n const defaultArgs: GraphQLArgs = {\n chainId: 1,\n orderBy: 'totalLiquidity',\n orderDirection: 'desc',\n where: {\n swapEnabled: {\n eq: true,\n },\n totalShares: {\n gt: 0.05,\n },\n },\n };\n\n const defaultAttributes = {\n id: true,\n address: true,\n };\n\n this.query = {\n args: Object.assign({}, options.query?.args || defaultArgs),\n attrs: Object.assign({}, options.query?.attrs || defaultAttributes),\n };\n\n // skip is not a valid argument for the Balancer API, it uses nextToken\n delete this.query.args.skip;\n }\n\n private fetchFromCache(first: number, skip: number): Pool[] {\n const pools = this.pools.slice(skip, first + skip);\n return pools;\n }\n\n async fetch(options?: PoolsRepositoryFetchOptions): Promise {\n const first = options?.first || DEFAULT_FIRST;\n const skip = options?.skip || DEFAULT_SKIP;\n\n if (!this.hasFetched) {\n this.fetchAll(options);\n }\n await this.awaitEnoughPoolsFetched(first, skip);\n return this.fetchFromCache(first, skip);\n }\n\n // Fetches all pools from the API in a loop and saves them to the cache.\n async fetchAll(options?: PoolsRepositoryFetchOptions): Promise {\n this.isFetching = true;\n this.hasFetched = true;\n\n if (this.nextToken) {\n this.query.args.nextToken = this.nextToken;\n }\n\n this.query.args.first = MAX_POOLS_PER_REQUEST;\n const formattedArgs = new GraphQLArgsBuilder(this.query.args).format(\n new BalancerAPIArgsFormatter()\n );\n\n const attrs = this.query.attrs;\n attrs.nextToken = true;\n\n const formattedQuery = {\n pools: {\n __args: formattedArgs,\n ...attrs,\n },\n };\n\n const apiResponse = await this.client.get(formattedQuery);\n const apiResponseData = apiResponse.pools;\n\n this.nextToken = apiResponseData.nextToken;\n this.pools = this.pools.concat(apiResponseData.pools.map(this.format));\n\n if (this.nextToken) return await this.fetchAll(options);\n\n this.isFetching = false;\n }\n\n // A function that waits until enough pools have been loaded into the cache\n // or fetching has finished. Used so that all pools can be fetched in the\n // background, while fetch returns the first results to the user quickly.\n async awaitEnoughPoolsFetched(first: number, skip: number): Promise {\n for (let totalChecks = 0; totalChecks < MAX_CHECKS; totalChecks++) {\n if (this.pools.length > first + skip) {\n return;\n }\n if (!this.isFetching) {\n return;\n }\n await timeout(CHECK_INTERVAL_MS);\n }\n\n return;\n }\n\n async find(id: string): Promise {\n if (this.pools.length == 0) {\n await this.fetch();\n }\n\n return this.findBy('id', id);\n }\n\n async findBy(param: PoolAttribute, value: string): Promise {\n if (this.pools.length == 0) {\n await this.fetch();\n }\n\n const pool = this.pools.find((pool) => pool[param] == value);\n if (pool) {\n return this.format(pool);\n }\n }\n\n /** Fixes any formatting issues from the subgraph\n * - GraphQL can't store a map so pool.apr.[rewardAprs/tokenAprs].breakdown\n * is JSON data that needs to be parsed so they match the Pool type correctly.\n */\n private format(pool: Pool): Pool {\n if (pool.apr?.rewardAprs.breakdown) {\n // GraphQL can't store this as a map so it's JSON that we must parse\n const rewardsBreakdown = JSON.parse(\n pool.apr?.rewardAprs.breakdown as unknown as string\n );\n pool.apr.rewardAprs.breakdown = rewardsBreakdown;\n }\n if (pool.apr?.tokenAprs.breakdown) {\n // GraphQL can't store this as a map so it's JSON that we must parse\n const tokenAprsBreakdown = JSON.parse(\n pool.apr?.tokenAprs.breakdown as unknown as string\n );\n pool.apr.tokenAprs.breakdown = tokenAprsBreakdown;\n }\n\n return pool;\n }\n}\n","import { Pool, PoolType, PoolToken, SubPool } from '@/.';\nimport {\n SubgraphPool,\n SubgraphPoolTokenFragment,\n SubgraphSubPoolFragment,\n SubgraphSubPoolTokenFragment,\n} from '@/modules/subgraph/subgraph';\n\ninterface SubgraphSubPoolToken extends SubgraphSubPoolTokenFragment {\n token?: SubgraphSubPoolMeta | null;\n}\n\ninterface SubgraphSubPoolMeta {\n latestUSDPrice?: string | null;\n pool?: SubgraphSubPool | null;\n}\n\ninterface SubgraphSubPool extends SubgraphSubPoolFragment {\n tokens: SubgraphSubPoolToken[];\n}\n\nexport const mapType = (subgraphPool: SubgraphPool, chainId: number): Pool => {\n return {\n id: subgraphPool.id,\n name: subgraphPool.name || '',\n address: subgraphPool.address,\n chainId: chainId,\n poolType: subgraphPool.poolType as PoolType,\n poolTypeVersion: subgraphPool.poolTypeVersion || 1,\n swapFee: subgraphPool.swapFee,\n swapEnabled: subgraphPool.swapEnabled,\n protocolYieldFeeCache: subgraphPool.protocolYieldFeeCache || '0.5', // Default protocol yield fee\n protocolSwapFeeCache: subgraphPool.protocolSwapFeeCache || '0.5', // Default protocol swap fee\n amp: subgraphPool.amp ?? undefined,\n owner: subgraphPool.owner ?? undefined,\n factory: subgraphPool.factory ?? undefined,\n symbol: subgraphPool.symbol ?? undefined,\n tokens: (subgraphPool.tokens || []).map(mapToken),\n tokensList: subgraphPool.tokensList,\n tokenAddresses: (subgraphPool.tokens || []).map((t) => t.address),\n totalLiquidity: subgraphPool.totalLiquidity,\n totalShares: subgraphPool.totalShares,\n totalSwapFee: subgraphPool.totalSwapFee,\n totalSwapVolume: subgraphPool.totalSwapVolume,\n priceRateProviders: subgraphPool.priceRateProviders ?? undefined,\n // onchain: subgraphPool.onchain,\n createTime: subgraphPool.createTime,\n mainIndex: subgraphPool.mainIndex ?? undefined,\n wrappedIndex: subgraphPool.wrappedIndex ?? undefined,\n // mainTokens: subgraphPool.mainTokens,\n // wrappedTokens: subgraphPool.wrappedTokens,\n // unwrappedTokens: subgraphPool.unwrappedTokens,\n // isNew: subgraphPool.isNew,\n // volumeSnapshot: subgraphPool.volumeSnapshot,\n // feesSnapshot: subgraphPool.???, // Approximated last 24h fees\n // boost: subgraphPool.boost,\n totalWeight: subgraphPool.totalWeight || '1',\n lowerTarget: subgraphPool.lowerTarget ?? '0',\n upperTarget: subgraphPool.upperTarget ?? '0',\n isInRecoveryMode: subgraphPool.isInRecoveryMode ?? false,\n isPaused: subgraphPool.isPaused ?? false,\n };\n};\n\nconst mapToken = (subgraphToken: SubgraphPoolTokenFragment): PoolToken => {\n const subPoolInfo = mapSubPools(\n // need to typecast as the fragment is 3 layers deep while the type is infinite levels deep\n subgraphToken.token as SubgraphSubPoolMeta\n );\n return {\n ...subgraphToken,\n isExemptFromYieldProtocolFee:\n subgraphToken.isExemptFromYieldProtocolFee || false,\n token: subPoolInfo,\n };\n};\n\nconst mapSubPools = (metadata: SubgraphSubPoolMeta) => {\n let subPool: SubPool | null = null;\n\n if (metadata.pool) {\n subPool = {\n id: metadata.pool.id,\n address: metadata.pool.address,\n totalShares: metadata.pool.totalShares,\n poolType: metadata.pool.poolType as PoolType,\n mainIndex: metadata.pool.mainIndex || 0,\n };\n\n if (metadata?.pool.tokens) {\n subPool.tokens = metadata.pool.tokens.map(mapSubPoolToken);\n }\n }\n\n return {\n pool: subPool,\n latestUSDPrice: metadata.latestUSDPrice || undefined,\n };\n};\n\nconst mapSubPoolToken = (token: SubgraphSubPoolToken) => {\n return {\n address: token.address,\n decimals: token.decimals,\n symbol: token.symbol,\n balance: token.balance,\n priceRate: token.priceRate,\n weight: token.weight,\n isExemptFromYieldProtocolFee:\n token.isExemptFromYieldProtocolFee || undefined,\n token: token.token ? mapSubPools(token.token) : undefined,\n };\n};\n","import { Findable, Searchable } from '../types';\nimport {\n createSubgraphClient,\n SubgraphClient,\n Pool_OrderBy,\n OrderDirection,\n} from '@/modules/subgraph/subgraph';\nimport {\n GraphQLArgsBuilder,\n SubgraphArgsFormatter,\n} from '@/lib/graphql/args-builder';\nimport { GraphQLArgs } from '@/lib/graphql/types';\nimport { PoolAttribute, PoolsRepositoryFetchOptions } from './types';\nimport { GraphQLQuery, Pool } from '@/types';\nimport { Network } from '@/lib/constants/network';\nimport { PoolsQueryVariables } from '../../subgraph/subgraph';\nimport { mapType } from './subgraph-helpers';\nimport { Logger } from '@/lib/utils/logger';\n\ninterface PoolsSubgraphRepositoryOptions {\n url: string;\n chainId: Network;\n blockHeight?: () => Promise;\n query?: GraphQLQuery;\n}\n\n/**\n * Access pools using generated subgraph client.\n *\n * Balancer's subgraph URL: https://thegraph.com/hosted-service/subgraph/balancer-labs/balancer-v2\n */\nexport class PoolsSubgraphRepository\n implements Findable, Searchable\n{\n private client: SubgraphClient;\n private chainId: Network;\n private pools?: Promise;\n public skip = 0;\n private blockHeight: undefined | (() => Promise);\n private query: GraphQLQuery;\n\n /**\n * Repository with optional lazy loaded blockHeight\n *\n * @param url subgraph URL\n * @param chainId current network, needed for L2s logic\n * @param blockHeight lazy loading blockHeigh resolver\n */\n constructor(options: PoolsSubgraphRepositoryOptions) {\n this.client = createSubgraphClient(options.url);\n this.blockHeight = options.blockHeight;\n this.chainId = options.chainId;\n\n const defaultArgs: GraphQLArgs = {\n orderBy: Pool_OrderBy.TotalLiquidity,\n orderDirection: OrderDirection.Desc,\n where: {\n totalShares: {\n gt: 0.000000000001,\n },\n },\n };\n\n const args = Object.assign({}, options.query?.args || defaultArgs);\n const attrs = Object.assign({}, options.query?.attrs || {});\n\n this.query = {\n args,\n attrs,\n };\n }\n\n /**\n * We need a list of all the pools, for calculating APRs (nested pools), and for SOR (path finding).\n * All the pools are fetched on page load and cachced for speedy lookups.\n *\n * @returns Promise resolving to pools list\n */\n private async fetchAllPools(): Promise {\n const logger = Logger.getInstance();\n logger.time('fetching pools');\n\n if (this.blockHeight) {\n this.query.args.block = { number: await this.blockHeight() };\n }\n const formattedQuery = new GraphQLArgsBuilder(this.query.args).format(\n new SubgraphArgsFormatter()\n ) as PoolsQueryVariables;\n\n const { pool0, pool1000, pool2000 } = await this.client.AllPools(\n formattedQuery\n );\n logger.timeEnd('fetching pools');\n\n return [...pool0, ...pool1000, ...pool2000].map((pool) =>\n mapType(pool, this.chainId)\n );\n }\n\n async fetch(options?: PoolsRepositoryFetchOptions): Promise {\n const logger = Logger.getInstance();\n logger.time('fetching pools');\n if (options?.skip) {\n this.query.args.skip = options.skip;\n }\n if (this.blockHeight) {\n this.query.args.block = { number: await this.blockHeight() };\n }\n\n this.query.args.first = options?.first || this.query.args.first || 1000;\n\n const formattedQuery = new GraphQLArgsBuilder(this.query.args).format(\n new SubgraphArgsFormatter()\n ) as PoolsQueryVariables;\n\n const { pools } = await this.client.Pools(formattedQuery);\n\n this.skip = (options?.skip || 0) + pools.length;\n logger.timeEnd('fetching pools');\n\n return pools.map((pool) => mapType(pool, this.chainId));\n }\n\n async find(id: string): Promise {\n return await this.findBy('id', id);\n }\n\n async findBy(param: PoolAttribute, value: string): Promise {\n if (!this.pools) {\n this.pools = this.fetchAllPools();\n }\n\n return (await this.pools).find((pool) => pool[param] == value);\n\n // TODO: @Nma - Fetching pools outside of default query is causing a lot of requests\n // on a frontend, because results aren't cached anywhere.\n // For fetching pools directly from subgraph with custom queries please use the client not this repository.\n // Code below kept for reference, to be removed later.\n //\n // if (this.pools) {\n // return (await this.pools).find((p) => p[param] === value);\n // }\n // const { pools } = await this.client.Pools({\n // where: {\n // [param]: value,\n // swapEnabled: true,\n // totalShares_gt: '0.000000000001',\n // },\n // block: await this.block(),\n // });\n // const poolsTab: Pool[] = pools.map(this.mapType.bind(this));\n // return poolsTab.length > 0 ? poolsTab[0] : undefined;\n }\n\n async all(): Promise {\n if (!this.pools) {\n this.pools = this.fetchAllPools();\n }\n return this.pools;\n }\n\n async block(): Promise<{ number: number | undefined } | undefined> {\n return this.blockHeight ? { number: await this.blockHeight() } : undefined;\n }\n\n async where(filter: (pool: Pool) => boolean): Promise {\n if (!this.pools) {\n this.pools = this.fetchAllPools();\n }\n\n return (await this.pools).filter(filter);\n }\n}\n","import { Cacheable, Findable, Searchable } from '../types';\nimport { Provider } from '@ethersproject/providers';\nimport { PoolAttribute, PoolsRepositoryFetchOptions } from './types';\nimport { Pool } from '@/types';\nimport { getOnChainBalances } from '../../../modules/sor/pool-data/onChainData3';\nimport { PoolsSubgraphRepository } from './subgraph';\nimport { Logger } from '@/lib/utils/logger';\n\ninterface PoolsSubgraphOnChainRepositoryOptions {\n provider: Provider;\n multicall: string;\n vault: string;\n}\n\n/**\n * Access pools using generated subgraph client and multicall.\n */\nexport class PoolsSubgraphOnChainRepository\n implements Findable, Searchable, Cacheable\n{\n private provider: Provider;\n private pools?: Promise;\n private multicall: string;\n private vault: string;\n public skip = 0;\n\n /**\n * Repository using multicall to get onchain data.\n *\n * @param poolsSubgraph subgraph repository\n * @param options options containing provider, multicall and vault addresses\n */\n constructor(\n private poolsSubgraph: PoolsSubgraphRepository,\n options: PoolsSubgraphOnChainRepositoryOptions,\n private readonly poolsToIgnore: string[] | undefined,\n private batchSize?: number\n ) {\n this.provider = options.provider;\n this.multicall = options.multicall;\n this.vault = options.vault;\n }\n\n private filterPools(pools: Pool[]): Pool[] {\n const filteredPools = pools.filter((p) => {\n if (p.swapEnabled === false) return false;\n if (!this.poolsToIgnore) return true;\n const index = this.poolsToIgnore.findIndex(\n (id) => id.toLowerCase() === p.id.toLowerCase()\n );\n return index === -1;\n });\n return filteredPools;\n }\n\n /**\n * We need a list of all the pools, for calculating APRs (nested pools), and for SOR (path finding).\n * All the pools are fetched on page load and cachced for speedy lookups.\n *\n * @returns Promise resolving to pools list\n */\n private async fetchDefault(): Promise {\n const pools = await this.poolsSubgraph.all();\n const filteredPools = this.filterPools(pools);\n\n const logger = Logger.getInstance();\n logger.time(`fetching onchain ${filteredPools.length} pools`);\n\n const onchainPools = await getOnChainBalances(\n filteredPools,\n this.multicall,\n this.vault,\n this.provider,\n this.batchSize\n );\n\n logger.timeEnd(`fetching onchain ${filteredPools.length} pools`);\n\n return onchainPools;\n }\n\n async fetch(options?: PoolsRepositoryFetchOptions): Promise {\n const pools = await this.poolsSubgraph.fetch(options);\n const filteredPools = this.filterPools(pools);\n\n const logger = Logger.getInstance();\n logger.time(`fetching onchain ${filteredPools.length} pools`);\n\n const onchainPools = await getOnChainBalances(\n filteredPools,\n this.multicall,\n this.vault,\n this.provider,\n this.batchSize\n );\n\n logger.timeEnd(`fetching onchain ${filteredPools.length} pools`);\n\n return onchainPools;\n }\n\n async find(id: string, forceRefresh = false): Promise {\n return await this.findBy('id', id, forceRefresh);\n }\n\n async findBy(\n param: PoolAttribute,\n value: string,\n forceRefresh = false\n ): Promise {\n if (!this.pools || forceRefresh) {\n this.pools = this.fetchDefault();\n }\n\n return (await this.pools).find((pool) => pool[param] == value);\n }\n\n async all(): Promise {\n if (!this.pools) {\n this.pools = this.fetchDefault();\n }\n return this.pools;\n }\n\n async where(filter: (pool: Pool) => boolean): Promise {\n if (!this.pools) {\n this.pools = this.fetchDefault();\n }\n\n return (await this.pools).filter(filter);\n }\n\n async refresh(pool: Pool): Promise {\n const onchainPool = await getOnChainBalances(\n [pool],\n this.multicall,\n this.vault,\n this.provider\n );\n\n // If the pool is already cached, replace it with the new one\n if (this.pools) {\n const index = (await this.pools).findIndex(\n (p) => p.address === pool.address\n );\n if (index !== -1) {\n this.pools = Promise.resolve([\n ...(await this.pools).splice(index, 1),\n onchainPool[0],\n ]);\n }\n }\n\n return onchainPool[0];\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { GaugesSubgraphRepository } from '@/modules/subgraph/repository';\nimport { PoolGauges, PoolGaugesAttributes } from './types';\n\nexport class PoolGaugesRepository extends GaugesSubgraphRepository<\n PoolGauges,\n PoolGaugesAttributes\n> {\n async query(args: any): Promise {\n if (!args.block && this.blockHeight)\n args.block = { number: await this.blockHeight() };\n\n const { pools } = await this.client.PoolGauges(args);\n return pools.map(this.mapType);\n }\n\n mapType(fragment: any): PoolGauges {\n return fragment as PoolGauges;\n }\n}\n","export enum PoolJoinExitAttributes {\n Pool = 'pool',\n Sender = 'sender',\n}\n\nexport interface PoolJoinExit {\n id: string;\n userAddress: string;\n poolId: string;\n timestamp: number;\n type: string;\n amounts: string[];\n tokens: string[];\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { PoolJoinExit, PoolJoinExitAttributes } from './types';\nimport { BalancerSubgraphRepository } from '@/modules/subgraph/repository';\nimport {\n JoinExit_OrderBy,\n OrderDirection,\n SubgraphJoinExitFragment,\n} from '@/modules/subgraph/generated/balancer-subgraph-types';\n\nexport class PoolJoinExitRepository extends BalancerSubgraphRepository<\n PoolJoinExit,\n PoolJoinExitAttributes\n> {\n async query(args: any): Promise {\n if (!args.orderBy) args.orderBy = JoinExit_OrderBy.Timestamp;\n if (!args.orderDirection) args.orderDirection = OrderDirection.Asc;\n if (!args.block && this.blockHeight)\n args.block = { number: await this.blockHeight() };\n\n const { joinExits } = await this.client.JoinExits(args);\n return joinExits.map(this.mapType);\n }\n\n mapType(item: SubgraphJoinExitFragment): PoolJoinExit {\n return {\n id: item.id,\n userAddress: item.user.id,\n poolId: item.pool.id,\n timestamp: item.timestamp,\n type: item.type,\n amounts: item.amounts,\n tokens: item.pool.tokensList,\n };\n }\n\n async findByUser(\n sender: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(PoolJoinExitAttributes.Sender, sender, first, skip);\n }\n\n async findJoins(sender: string, pool: string): Promise {\n return this.query({ where: { sender, pool, type: 'Join' } });\n }\n\n async findExits(sender: string, pool: string): Promise {\n return this.query({ where: { sender, pool, type: 'Exit' } });\n }\n\n async findByPool(\n poolId: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(PoolJoinExitAttributes.Pool, poolId, first, skip);\n }\n}\n","/* eslint-disable @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any */\nimport { PoolShare, PoolShareAttributes } from './types';\nimport { BalancerSubgraphRepository } from '@/modules/subgraph/repository';\nimport {\n SubgraphPoolShareFragment,\n PoolShare_OrderBy,\n OrderDirection,\n} from '@/modules/subgraph/generated/balancer-subgraph-types';\n\nexport class PoolSharesRepository extends BalancerSubgraphRepository<\n PoolShare,\n PoolShareAttributes\n> {\n async query(args: any): Promise {\n if (!args.orderBy) args.orderBy = PoolShare_OrderBy.Balance;\n if (!args.orderDirection) args.orderDirection = OrderDirection.Desc;\n if (!args.block && this.blockHeight)\n args.block = { number: await this.blockHeight() };\n\n const { poolShares } = await this.client.PoolShares(args);\n return poolShares.map(this.mapType);\n }\n\n mapType(subgraphPoolShare: SubgraphPoolShareFragment): PoolShare {\n return {\n id: subgraphPoolShare.id,\n userAddress: subgraphPoolShare.userAddress.id,\n poolId: subgraphPoolShare.poolId.id,\n balance: subgraphPoolShare.balance,\n };\n }\n\n async findByUser(\n userAddress: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(\n PoolShareAttributes.UserAddress,\n userAddress,\n first,\n skip\n );\n }\n\n async findByPool(\n poolId: string,\n first?: number,\n skip?: number\n ): Promise {\n return this.findAllBy(PoolShareAttributes.PoolId, poolId, first, skip);\n }\n}\n","import type { Findable, Token } from '@/types';\nimport type { TokenAttribute } from './types';\n\nexport class StaticTokenProvider implements Findable {\n constructor(private tokens: Token[]) {}\n\n async find(address: string): Promise {\n return this.tokens.find((token) => {\n return token.address.toLowerCase() === address.toLowerCase();\n });\n }\n\n async findBy(\n attribute: TokenAttribute,\n value: string\n ): Promise {\n return this.tokens.find((token) => {\n return token[attribute] === value;\n });\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport {\n CoingeckoConfig,\n Findable,\n Network,\n Price,\n TokenPrices,\n} from '@/types';\nimport axios, { AxiosError } from 'axios';\nimport { TOKENS } from '@/lib/constants/tokens';\nimport { Debouncer, tokenAddressForPricing } from '@/lib/utils';\nimport {\n getCoingeckoApiBaseUrl,\n getCoingeckoApiKeyHeaderName,\n} from '@/lib/utils/coingecko-api';\n\n/**\n * Simple coingecko price source implementation. Configurable by network and token addresses.\n */\nexport class CoingeckoPriceRepository implements Findable {\n prices: { [key: string]: Promise } = {};\n nativePrice?: Promise;\n private readonly url: string;\n private readonly urlNative: string;\n private readonly coingeckoApiKeyHeaderName: string;\n baseTokenAddresses: string[];\n debouncer: Debouncer;\n apiKey?: string;\n\n constructor(\n tokenAddresses: string[],\n private chainId: Network = 1,\n coingecko?: CoingeckoConfig\n ) {\n this.baseTokenAddresses = tokenAddresses.map(tokenAddressForPricing);\n this.url = `${getCoingeckoApiBaseUrl(\n coingecko?.isDemoApiKey\n )}simple/token_price/${this.platform(chainId)}?vs_currencies=usd,eth`;\n this.urlNative = `${getCoingeckoApiBaseUrl(\n coingecko?.isDemoApiKey\n )}simple/price/?vs_currencies=eth,usd&ids=`;\n this.coingeckoApiKeyHeaderName = getCoingeckoApiKeyHeaderName(\n coingecko?.isDemoApiKey\n );\n this.apiKey = coingecko?.coingeckoApiKey;\n this.debouncer = new Debouncer(\n this.fetch.bind(this),\n 200,\n coingecko?.tokensPerPriceRequest ?? 10\n );\n }\n\n private async fetch(\n addresses: string[],\n { signal }: { signal?: AbortSignal } = {}\n ): Promise {\n try {\n const { data } = await axios.get(\n `${this.url}&contract_addresses=${addresses.join(',')}`,\n {\n signal,\n headers: {\n [this.coingeckoApiKeyHeaderName]: this.apiKey ?? '',\n },\n }\n );\n return data;\n } catch (error) {\n const message = ['Error fetching token prices from coingecko'];\n if ((error as AxiosError).isAxiosError) {\n if ((error as AxiosError).response?.status !== undefined) {\n message.push(`with status ${(error as AxiosError).response?.status}`);\n }\n } else {\n message.push(error as string);\n }\n return Promise.reject(message.join(' '));\n }\n }\n\n private fetchNative({\n signal,\n }: { signal?: AbortSignal } = {}): Promise {\n console.time(`fetching coingecko for native token`);\n enum Assets {\n ETH = 'ethereum',\n MATIC = 'matic-network',\n XDAI = 'xdai',\n }\n let assetId: Assets = Assets.ETH;\n if (this.chainId === 137) assetId = Assets.MATIC;\n if (this.chainId === 100) assetId = Assets.XDAI;\n return axios\n .get<{ [key in Assets]: Price }>(`${this.urlNative}${assetId}`, {\n signal,\n headers: {\n [this.coingeckoApiKeyHeaderName]: this.apiKey ?? '',\n },\n })\n .then(({ data }) => {\n return data[assetId];\n })\n .catch((error) => {\n const message = ['Error fetching native token from coingecko'];\n if (error.isAxiosError) {\n if (error.response?.status) {\n message.push(`with status ${error.response.status}`);\n }\n } else {\n message.push(error);\n }\n return Promise.reject(message.join(' '));\n })\n .finally(() => {\n console.timeEnd(`fetching coingecko for native token`);\n });\n }\n\n find(inputAddress: string): Promise {\n const address = tokenAddressForPricing(inputAddress, this.chainId);\n if (!this.prices[address]) {\n // Make initial call with all the tokens we want to preload\n if (Object.keys(this.prices).length === 0) {\n for (const baseAddress of this.baseTokenAddresses) {\n this.prices[baseAddress] = this.debouncer\n .fetch(baseAddress)\n .then((prices) => prices[baseAddress]);\n }\n }\n\n // Handle native asset special case\n if (\n address === TOKENS(this.chainId).Addresses.nativeAsset.toLowerCase()\n ) {\n if (!this.nativePrice) {\n this.prices[address] = this.fetchNative();\n }\n\n return this.prices[address];\n }\n\n this.prices[address] = this.debouncer\n .fetch(address)\n .then((prices) => prices[address]);\n }\n\n return this.prices[address];\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute != 'address') {\n return undefined;\n }\n\n return this.find(value);\n }\n\n private platform(chainId: number): string {\n switch (chainId) {\n case 1:\n case 5:\n case 42:\n case 31337:\n return 'ethereum';\n case 100:\n return 'xdai';\n case 137:\n return 'polygon-pos';\n case 250:\n return 'fantom';\n case 1101:\n return 'polygon-zkevm';\n case 8453:\n return 'base';\n case 42161:\n return 'arbitrum-one';\n case 43114:\n return 'avalanche';\n }\n\n return '2';\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport {\n Price,\n Findable,\n TokenPrices,\n Network,\n HistoricalPrices,\n CoingeckoConfig,\n} from '@/types';\nimport axios, { AxiosError } from 'axios';\nimport { tokenAddressForPricing } from '@/lib/utils';\nimport {\n getCoingeckoApiBaseUrl,\n getCoingeckoApiKeyHeaderName,\n} from '@/lib/utils/coingecko-api';\n\nconst HOUR = 60 * 60;\n\n/**\n * Simple coingecko price source implementation. Configurable by network and token addresses.\n */\nexport class CoingeckoHistoricalPriceRepository implements Findable {\n prices: TokenPrices = {};\n nativePrice?: Promise;\n private readonly urlBase: string;\n private readonly apiKey?: string;\n private readonly coingeckoApiKeyHeaderName: string;\n constructor(private chainId: Network = 1, coingecko?: CoingeckoConfig) {\n this.urlBase = `${getCoingeckoApiBaseUrl(\n coingecko?.isDemoApiKey\n )}coins/${this.platform(\n chainId\n )}/contract/%TOKEN_ADDRESS%/market_chart/range?vs_currency=usd`;\n this.apiKey = coingecko?.coingeckoApiKey;\n this.coingeckoApiKeyHeaderName = getCoingeckoApiKeyHeaderName(\n coingecko?.isDemoApiKey\n );\n }\n\n private async fetch(\n address: string,\n timestamp: number,\n { signal }: { signal?: AbortSignal } = {}\n ): Promise {\n const url = this.urlRange(address, timestamp);\n console.time(`fetching coingecko historical for ${address}`);\n try {\n const { data } = await axios.get(url, {\n signal,\n headers: { [this.coingeckoApiKeyHeaderName]: this.apiKey ?? '' },\n });\n console.timeEnd(`fetching coingecko historical for ${address}`);\n console.log(data);\n return data;\n } catch (error) {\n console.timeEnd(`fetching coingecko historical for ${address}`);\n if ((error as AxiosError).isAxiosError) {\n throw new Error(\n 'Error fetching historical token prices from coingecko - ' +\n (error as AxiosError).message +\n ' - ' +\n (error as AxiosError).response?.statusText\n );\n }\n throw new Error('Unknown Error: ' + error);\n }\n }\n\n /* eslint-disable @typescript-eslint/no-unused-vars */\n async find(address: string): Promise {\n throw `Historic price requires point-in-time timestamp, please use findBy(address, timestamp)`;\n }\n\n async findBy(\n inputAddress: string,\n timestamp: number\n ): Promise {\n const address = tokenAddressForPricing(inputAddress, this.chainId);\n const response = await this.fetch(address, timestamp);\n\n return {\n usd: `${response.prices[0][1]}`,\n };\n }\n\n private platform(chainId: number): string {\n switch (chainId) {\n case 1:\n case 5:\n case 42:\n case 31337:\n return 'ethereum';\n case 137:\n return 'polygon-pos';\n case 42161:\n return 'arbitrum-one';\n case 100:\n return 'xdai';\n }\n\n return '2';\n }\n\n private urlRange(address: string, timestamp: number): string {\n const range: { from: number; to: number } = {\n from: timestamp - HOUR,\n to: timestamp + HOUR,\n };\n return `${this.urlBase.replace('%TOKEN_ADDRESS%', address)}&from=${\n range.from\n }&to=${range.to}`;\n }\n}\n","/* eslint-disable @typescript-eslint/no-empty-function */\nimport { Price, Findable, TokenPrices, Network } from '@/types';\nimport axios from 'axios';\nimport { Debouncer, tokenAddressForPricing } from '@/lib/utils';\n\ninterface SubgraphPricesResponse {\n data: {\n tokens: [\n {\n address: string;\n latestUSDPrice?: string;\n }\n ];\n };\n}\n\nexport class SubgraphPriceRepository implements Findable {\n prices: { [key: string]: Promise } = {};\n debouncer: Debouncer;\n\n constructor(private subgraphUrl: string, private chainId: Network = 1) {\n this.debouncer = new Debouncer(\n this.fetch.bind(this),\n 200\n );\n }\n\n private async fetch(\n addresses: string[],\n { signal }: { signal?: AbortSignal } = {}\n ): Promise {\n console.time(`fetching subgraph prices for ${addresses.length} tokens`);\n return axios\n .post(\n this.subgraphUrl,\n {\n variables: { addresses },\n query: `query($addresses: [String!]) {\n tokens(\n where: {\n id_in: $addresses\n }\n ) {\n address\n latestUSDPrice\n }\n }`,\n },\n { signal }\n )\n .then((response) => response.data.data)\n .then(({ tokens }) =>\n Object.fromEntries(\n tokens.map((token) => [\n token.address,\n { usd: token.latestUSDPrice || undefined },\n ])\n )\n )\n .finally(() => {\n console.timeEnd(\n `fetching subgraph prices for ${addresses.length} tokens`\n );\n });\n }\n\n async find(inputAddress: string): Promise {\n const address = tokenAddressForPricing(inputAddress, this.chainId);\n if (!this.prices[address]) {\n this.prices[address] = this.debouncer\n .fetch(address)\n .then((prices) => prices[address]);\n }\n\n return this.prices[address];\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute != 'address') {\n return undefined;\n }\n\n return this.find(value);\n }\n}\n","import type { Findable, Price } from '@/types';\nimport { IAaveRates } from './aave-rates';\nimport { Logger } from '@/lib/utils/logger';\n\nexport class TokenPriceProvider implements Findable {\n constructor(\n private coingeckoRepository: Findable,\n private subgraphRepository: Findable,\n private aaveRates: IAaveRates\n ) {}\n\n async find(address: string): Promise {\n let price;\n try {\n price = await this.coingeckoRepository.find(address);\n if (!price?.usd) {\n throw new Error('Price not found');\n }\n } catch (err) {\n const logger = Logger.getInstance();\n logger.warn(err as string);\n price = await this.subgraphRepository.find(address);\n }\n const rate = (await this.aaveRates.getRate(address)) || 1;\n if (price && price.usd) {\n return {\n ...price,\n usd: (parseFloat(price.usd) * rate).toString(),\n };\n } else {\n return price;\n }\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute === 'address') {\n return this.find(value);\n }\n throw `Token price search by ${attribute} not implemented`;\n }\n}\n","import type { Findable, Price } from '@/types';\nimport { IAaveRates } from './aave-rates';\n\nexport class HistoricalPriceProvider implements Findable {\n constructor(\n private coingeckoRepository: Findable,\n private aaveRates: IAaveRates\n ) {}\n\n /**\n * get the historical price at time of call\n *\n * @param address the token address\n */\n async find(address: string): Promise {\n return this.findBy(address, Math.floor(Date.now() / 1000));\n }\n\n /**\n * get the historical price at the given timestamp.\n *\n * @param address the token address\n * @param timestamp the UNIX timestamp\n * @private\n */\n async findBy(address: string, timestamp: number): Promise {\n const price = await this.coingeckoRepository.findBy(address, timestamp);\n const rate = (await this.aaveRates.getRate(address)) || 1;\n if (price && price.usd) {\n return {\n ...price,\n usd: (parseFloat(price.usd) * rate).toString(),\n };\n } else {\n return price;\n }\n }\n}\n","import { Contract } from '@ethersproject/contracts';\nimport { Provider } from '@ethersproject/providers';\n\nconst FeeDistributorAbi = [\n 'function claimTokens(address user, address[] tokens) returns (uint256[])',\n 'function claimToken(address user, address token) returns (uint256)',\n];\n\nexport const FeeDistributor = (address: string, provider: Provider): Contract =>\n new Contract(address, FeeDistributorAbi, provider);\n","import { TokenBalance } from '@/modules/claims/ClaimService';\nimport { FeeDistributor } from '@/modules/contracts/implementations/feeDistributor';\nimport { Multicall } from '@/contracts';\nimport { Interface } from '@ethersproject/abi';\nimport { getAddress } from '@ethersproject/address';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { Contract } from '@ethersproject/contracts';\nimport { Provider } from '@ethersproject/providers';\nimport { formatUnits } from '@ethersproject/units';\n\nexport interface FeeDistributorData {\n balAmount: number;\n bbAUsdAmount: number;\n veBalSupply: number;\n bbAUsdPrice: number;\n balAddress: string;\n}\n\nexport interface BaseFeeDistributor {\n multicallData: (ts: number) => Promise;\n getClaimableBalances(\n userAddress: string,\n claimableTokens: string[]\n ): Promise;\n claimBalances(userAddress: string, claimableTokens: string[]): string;\n}\n\nconst feeDistributorInterface = new Interface([\n 'function getTokensDistributedInWeek(address token, uint timestamp) view returns (uint)',\n 'function claimTokens(address user, address[] tokens) returns (uint256[])',\n 'function claimToken(address user, address token) returns (uint256)',\n]);\n\nconst veBalInterface = new Interface([\n 'function totalSupply() view returns (uint)',\n]);\n\n// const bbAUsdInterface = new Interface([\n// 'function getRate() view returns (uint)',\n// ]);\n\nexport class FeeDistributorRepository implements BaseFeeDistributor {\n feeDistributor: Contract;\n data?: FeeDistributorData;\n\n constructor(\n private multicall: Multicall,\n private feeDistributorAddress: string,\n private balAddress: string,\n private veBalAddress: string,\n private bbAUsdAddress: string,\n provider: Provider\n ) {\n this.feeDistributor = FeeDistributor(feeDistributorAddress, provider);\n }\n\n async fetch(timestamp: number): Promise {\n const previousWeek = this.getPreviousWeek(timestamp);\n const payload = [\n {\n target: this.feeDistributorAddress,\n callData: feeDistributorInterface.encodeFunctionData(\n 'getTokensDistributedInWeek',\n [getAddress(this.balAddress), previousWeek]\n ),\n },\n {\n target: this.feeDistributorAddress,\n callData: feeDistributorInterface.encodeFunctionData(\n 'getTokensDistributedInWeek',\n [getAddress(this.bbAUsdAddress), previousWeek]\n ),\n },\n {\n target: this.veBalAddress,\n callData: veBalInterface.encodeFunctionData('totalSupply', []),\n },\n // Removed while wrappers are broken\n // {\n // target: this.bbAUsdAddress,\n // callData: bbAUsdInterface.encodeFunctionData('getRate', []),\n // },\n ];\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const data = {\n balAmount: parseFloat(formatUnits(res[0], 18)),\n bbAUsdAmount: parseFloat(formatUnits(res[1], 18)),\n veBalSupply: parseFloat(formatUnits(res[2], 18)),\n // bbAUsdPrice: parseFloat(formatUnits(res[3], 18)),\n bbAUsdPrice: parseFloat('1.0'),\n balAddress: this.balAddress,\n };\n\n return data;\n }\n\n async multicallData(timestamp: number): Promise {\n if (!this.data) {\n this.data = await this.fetch(timestamp);\n }\n\n return this.data;\n }\n\n getPreviousWeek(fromTimestamp: number): number {\n const weeksToGoBack = 1;\n const midnight = new Date(fromTimestamp);\n midnight.setUTCHours(0);\n midnight.setUTCMinutes(0);\n midnight.setUTCSeconds(0);\n midnight.setUTCMilliseconds(0);\n\n let daysSinceThursday = midnight.getUTCDay() - 4;\n if (daysSinceThursday < 0) daysSinceThursday += 7;\n\n daysSinceThursday = daysSinceThursday + weeksToGoBack * 7;\n\n return Math.floor(midnight.getTime() / 1000) - daysSinceThursday * 86400;\n }\n\n async getClaimableBalances(\n userAddress: string,\n claimableTokens: string[]\n ): Promise {\n try {\n const amounts: BigNumber[] =\n await this.feeDistributor.callStatic.claimTokens(\n userAddress,\n claimableTokens\n );\n return this.extractTokenBalance(claimableTokens, amounts);\n } catch (e) {\n return {};\n }\n }\n\n claimBalances(userAddress: string, claimableTokens: string[]): string {\n return feeDistributorInterface.encodeFunctionData('claimTokens', [\n userAddress,\n claimableTokens,\n ]);\n }\n\n extractTokenBalance(\n claimableTokens: string[],\n amounts: (BigNumber | undefined | null)[]\n ): TokenBalance {\n return claimableTokens.reduce((tokens: TokenBalance, token, index) => {\n tokens[token] = (amounts[index] as BigNumber) ?? BigNumber.from(0);\n return tokens;\n }, {});\n }\n}\n","import { Interface } from '@ethersproject/abi';\nimport { Provider } from '@ethersproject/providers';\nimport { Contract } from '@ethersproject/contracts';\nimport { formatUnits } from '@ethersproject/units';\nimport { Findable } from '../types';\n\nconst vaultInterface = new Interface([\n 'function getProtocolFeesCollector() view returns (address)',\n]);\n\nconst protocolFeesCollectorInterface = new Interface([\n 'function getSwapFeePercentage() view returns (uint)',\n]);\n\n// Using singleton here, so subsequent calls will return the same promise\nlet swapFeePercentagePromise: Promise;\n\nexport class FeeCollectorRepository implements Findable {\n vault: Contract;\n swapFeePercentage?: number;\n\n constructor(vaultAddress: string, private provider: Provider) {\n this.vault = new Contract(vaultAddress, vaultInterface, this.provider);\n }\n\n async fetch(): Promise {\n const address = (await this.vault.getProtocolFeesCollector()) as string;\n\n const collector = new Contract(\n address,\n protocolFeesCollectorInterface,\n this.provider\n );\n const fees = (await collector.getSwapFeePercentage()) as string;\n\n return parseFloat(formatUnits(fees, 18));\n }\n\n async find(): Promise {\n if (!swapFeePercentagePromise) {\n swapFeePercentagePromise = this.fetch();\n }\n this.swapFeePercentage = await swapFeePercentagePromise;\n\n return this.swapFeePercentage;\n }\n\n async findBy(): Promise {\n return this.find();\n }\n}\n","// 0x97207B095e4D5C9a6e4cfbfcd2C3358E03B90c4A\n\nimport { Interface } from '@ethersproject/abi';\nimport { formatUnits } from '@ethersproject/units';\nimport { Multicall } from '@/contracts';\n\nconst iProtocolFeePercentagesProvider = new Interface([\n 'function getSwapFeePercentage() view returns (uint)',\n]);\n\nexport interface ProtocolFees {\n swapFee: number;\n yieldFee: number;\n}\n\n// Using singleton here, so subsequent calls will return the same promise\nlet feesPromise: Promise;\n\nexport class ProtocolFeesProvider {\n protocolFees?: ProtocolFees;\n\n constructor(\n private multicall: Multicall,\n private protocolFeePercentagesProviderAddress: string\n ) {}\n\n private async fetch(): Promise {\n const payload = [\n {\n target: this.protocolFeePercentagesProviderAddress,\n callData: iProtocolFeePercentagesProvider.encodeFunctionData(\n 'getFeeTypePercentage',\n [0]\n ),\n },\n {\n target: this.protocolFeePercentagesProviderAddress,\n callData: iProtocolFeePercentagesProvider.encodeFunctionData(\n 'getFeeTypePercentage',\n [2]\n ),\n },\n ];\n const [, res] = await this.multicall.callStatic.aggregate(payload);\n\n const fees = {\n swapFee: parseFloat(formatUnits(res[0], 18)),\n yieldFee: parseFloat(formatUnits(res[2], 18)),\n };\n\n return fees;\n }\n\n async getFees(): Promise {\n if (!feesPromise) {\n feesPromise = this.fetch();\n }\n this.protocolFees = await feesPromise;\n\n return this.protocolFees;\n }\n}\n","import axios from 'axios';\nimport { Findable } from '@/types';\nimport { Logger } from '@/lib/utils/logger';\n\nexport class TokenYieldsRepository implements Findable {\n private yields?: Promise<{ [address: string]: number }>;\n\n constructor(private url = 'https://yield-tokens.balancer.workers.dev/') {}\n\n async fetch(): Promise<{ [address: string]: number }> {\n let aprs = {};\n\n try {\n console.time(`fetching token yields`);\n const response = await axios.get(this.url);\n console.timeEnd(`fetching token yields`);\n\n aprs = response.data as {\n [key: string]: number;\n };\n } catch (error) {\n const logger = Logger.getInstance();\n logger.warn(`Failed to fetch yield tokens: ${error}`);\n }\n\n return aprs;\n }\n\n async find(address: string): Promise {\n const lc = address.toLocaleLowerCase();\n if (!this.yields) {\n this.yields = this.fetch();\n }\n\n return this.yields.then((r) => (r[lc] && r[lc] > 0 ? r[lc] : 0));\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute != 'address') {\n return 0;\n }\n\n return this.find(value);\n }\n}\n","import { Findable } from '../types';\nimport axios from 'axios';\n\nconst query = (timestamp: string) => `{\n blocks(first: 1, orderBy: timestamp, orderDirection: asc, where: { timestamp_gt: ${timestamp} }) {\n number\n }\n}`;\n\ninterface BlockNumberResponse {\n data: {\n blocks: [\n {\n number: string;\n }\n ];\n };\n}\n\nconst fetchBlockByTime = async (\n endpoint: string,\n timestamp: string\n): Promise => {\n const payload = {\n query: query(timestamp),\n };\n\n const response = await axios.post(endpoint, payload);\n\n const {\n data: { blocks },\n } = response.data as BlockNumberResponse;\n\n return parseInt(blocks[0].number);\n};\n\nexport class BlockNumberRepository implements Findable {\n blocks: { [ts: string]: Promise } = {};\n\n constructor(private endpoint: string) {}\n\n async find(from: string): Promise {\n if (from == 'dayAgo') {\n const dayAgo = `${Math.floor(Date.now() / 1000) - 86400}`;\n if (!this.blocks[dayAgo]) {\n this.blocks = {\n ...this.blocks,\n [dayAgo]: fetchBlockByTime(this.endpoint, dayAgo),\n };\n }\n return this.blocks[dayAgo];\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async findBy(attribute = '', value = ''): Promise {\n return;\n }\n}\n","import { GyroConfigRepositoryImpl } from '@/modules/data/gyro-config/repository';\n\nexport * as balEmissions from './bal/emissions';\nexport * from './gauge-controller/multicall';\nexport * from './gauge-shares';\nexport * from './liquidity-gauges';\nexport * from './pool';\nexport * from './pool-gauges';\nexport * from './pool-joinExit';\nexport * from './pool-shares';\nexport * from './token';\nexport * from './token-prices';\nexport * from './fee-distributor/repository';\nexport * from './fee-collector/repository';\nexport * from './protocol-fees/provider';\nexport * from './token-yields/repository';\nexport * from './block-number';\n\nimport {\n BalancerNetworkConfig,\n BalancerDataRepositories,\n GraphQLQuery,\n CoingeckoConfig,\n} from '@/types';\nimport { PoolsSubgraphRepository } from './pool/subgraph';\nimport { SubgraphPoolDataService } from '../sor/pool-data/subgraphPoolDataService';\nimport { PoolsSubgraphOnChainRepository } from './pool/subgraphOnChain';\nimport { PoolSharesRepository } from './pool-shares/repository';\nimport { PoolJoinExitRepository } from './pool-joinExit/repository';\nimport { PoolGaugesRepository } from './pool-gauges/repository';\nimport { GaugeSharesRepository } from './gauge-shares/repository';\nimport { BlockNumberRepository } from './block-number';\nimport {\n CoingeckoPriceRepository,\n AaveRates,\n TokenPriceProvider,\n HistoricalPriceProvider,\n CoingeckoHistoricalPriceRepository,\n} from './token-prices';\nimport { StaticTokenProvider } from './token/static';\nimport { LiquidityGaugeSubgraphRPCProvider } from './liquidity-gauges/provider';\nimport { FeeDistributorRepository } from './fee-distributor/repository';\nimport { FeeCollectorRepository } from './fee-collector/repository';\nimport { TokenYieldsRepository } from './token-yields/repository';\nimport { ProtocolFeesProvider } from './protocol-fees/provider';\nimport { Provider } from '@ethersproject/providers';\n\n// initialCoingeckoList are used to get the initial token list for coingecko\n// TODO: we might want to replace that with what frontend is using\nimport initialCoingeckoList from '@/modules/data/token-prices/initial-list.json';\nimport { SubgraphPriceRepository } from './token-prices/subgraph';\nimport { createSubgraphClient } from '../subgraph/subgraph';\nimport { Contracts } from '../contracts/contracts.module';\n\nexport class Data implements BalancerDataRepositories {\n pools;\n poolsForSimulations;\n poolsOnChain;\n yesterdaysPools;\n poolShares;\n poolGauges;\n gaugeShares;\n tokenPrices;\n tokenHistoricalPrices;\n tokenMeta;\n liquidityGauges;\n feeDistributor;\n feeCollector;\n protocolFees;\n tokenYields;\n blockNumbers;\n poolJoinExits;\n gyroConfigRepository;\n\n constructor(\n networkConfig: BalancerNetworkConfig,\n provider: Provider,\n contracts: Contracts,\n subgraphQuery?: GraphQLQuery,\n coingecko?: CoingeckoConfig\n ) {\n this.pools = new PoolsSubgraphRepository({\n url: networkConfig.urls.subgraph,\n chainId: networkConfig.chainId,\n query: subgraphQuery,\n });\n\n // Used for VaultModel and Simulations\n this.poolsForSimulations = new SubgraphPoolDataService(\n createSubgraphClient(networkConfig.urls.subgraph),\n provider,\n networkConfig,\n undefined,\n subgraphQuery\n );\n\n this.poolsOnChain = new PoolsSubgraphOnChainRepository(\n this.pools,\n {\n provider: provider,\n multicall: networkConfig.addresses.contracts.multicall,\n vault: networkConfig.addresses.contracts.vault,\n },\n networkConfig.poolsToIgnore,\n networkConfig.multicallBatchSize\n );\n\n this.poolShares = new PoolSharesRepository(\n networkConfig.urls.subgraph,\n networkConfig.chainId\n );\n\n this.poolJoinExits = new PoolJoinExitRepository(\n networkConfig.urls.subgraph,\n networkConfig.chainId\n );\n\n if (networkConfig.urls.gaugesSubgraph) {\n this.poolGauges = new PoolGaugesRepository(\n networkConfig.urls.gaugesSubgraph,\n networkConfig.chainId\n );\n\n this.gaugeShares = new GaugeSharesRepository(\n networkConfig.urls.gaugesSubgraph,\n networkConfig.chainId\n );\n }\n\n // 🚨 yesterdaysPools is used to calculate swapFees accumulated over last 24 hours\n // TODO: find a better data source for that, eg: maybe DUNE once API is available\n if (networkConfig.urls.blockNumberSubgraph) {\n this.blockNumbers = new BlockNumberRepository(\n networkConfig.urls.blockNumberSubgraph\n );\n\n const blockDayAgo = async () => {\n if (this.blockNumbers) {\n return await this.blockNumbers.find('dayAgo');\n }\n };\n\n this.yesterdaysPools = new PoolsSubgraphRepository({\n url: networkConfig.urls.subgraph,\n chainId: networkConfig.chainId,\n blockHeight: blockDayAgo,\n query: subgraphQuery,\n });\n } else if (networkConfig.averageBlockTime) {\n const blockDayAgo = async () => {\n const blockNumber = await provider.getBlockNumber();\n const blocksPerDay = Math.round(\n 86400 / (networkConfig.averageBlockTime || 2)\n );\n return blockNumber - blocksPerDay;\n };\n\n this.yesterdaysPools = new PoolsSubgraphRepository({\n url: networkConfig.urls.subgraph,\n chainId: networkConfig.chainId,\n blockHeight: blockDayAgo,\n query: subgraphQuery,\n });\n }\n\n const tokenAddresses = initialCoingeckoList\n .filter((t) => t.chainId == networkConfig.chainId)\n .map((t) => t.address);\n\n const coingeckoRepository = new CoingeckoPriceRepository(\n tokenAddresses,\n networkConfig.chainId,\n coingecko\n );\n\n const subgraphPriceRepository = new SubgraphPriceRepository(\n networkConfig.urls.subgraph,\n networkConfig.chainId\n );\n\n const aaveRates = new AaveRates(\n contracts.contracts.multicall,\n networkConfig.chainId\n );\n\n this.tokenPrices = new TokenPriceProvider(\n coingeckoRepository,\n subgraphPriceRepository,\n aaveRates\n );\n\n const coingeckoHistoricalRepository =\n new CoingeckoHistoricalPriceRepository(networkConfig.chainId, coingecko);\n\n this.tokenHistoricalPrices = new HistoricalPriceProvider(\n coingeckoHistoricalRepository,\n aaveRates\n );\n\n this.tokenMeta = new StaticTokenProvider([]);\n\n if (networkConfig.urls.gaugesSubgraph) {\n this.liquidityGauges = new LiquidityGaugeSubgraphRPCProvider(\n networkConfig.urls.gaugesSubgraph,\n contracts.contracts.multicall,\n networkConfig.addresses.contracts.gaugeController || '',\n networkConfig.chainId,\n networkConfig.addresses.contracts.gaugeControllerCheckpointer\n );\n }\n\n if (\n networkConfig.addresses.contracts.feeDistributor &&\n networkConfig.addresses.tokens.bal &&\n networkConfig.addresses.tokens.veBal &&\n networkConfig.addresses.tokens.bbaUsd\n ) {\n this.feeDistributor = new FeeDistributorRepository(\n contracts.contracts.multicall,\n networkConfig.addresses.contracts.feeDistributor,\n networkConfig.addresses.tokens.bal,\n networkConfig.addresses.tokens.veBal,\n networkConfig.addresses.tokens.bbaUsd,\n provider\n );\n }\n\n this.feeCollector = new FeeCollectorRepository(\n networkConfig.addresses.contracts.vault,\n provider\n );\n\n if (networkConfig.addresses.contracts.protocolFeePercentagesProvider) {\n this.protocolFees = new ProtocolFeesProvider(\n contracts.contracts.multicall,\n networkConfig.addresses.contracts.protocolFeePercentagesProvider\n );\n }\n\n this.tokenYields = new TokenYieldsRepository();\n\n if (networkConfig.addresses.contracts.gyroConfigProxy) {\n this.gyroConfigRepository = new GyroConfigRepositoryImpl(\n networkConfig.addresses.contracts.gyroConfigProxy,\n contracts.contracts.multicall,\n provider\n );\n }\n }\n}\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { MaxInt256 } from '@ethersproject/constants';\nimport { BatchSwapStep, SwapType } from '../swaps/types';\nimport { Relayer } from './relayer.module';\nimport { OutputReference, PoolKind } from './types';\nimport { StablePoolEncoder } from '@/pool-stable';\nimport { ComposableStablePoolEncoder } from '@/pool-composable-stable';\n\n/**\n * Converts poolType and poolTypeVersion to PoolKind used by Relayer V5 defined in:\n * https://github.com/balancer/balancer-v2-monorepo/blob/9b78879ee3a0dcae57094bdfdae973873e4262cf/pkg/standalone-utils/contracts/relayer/VaultActions.sol#L105\n *\n * @internal\n * @param poolType\n * @param poolTypeVersion\n * @returns PoolKind\n */\nconst poolType2PoolKind = (\n poolType: string,\n poolTypeVersion: number\n): PoolKind => {\n if (poolType === 'Stable') {\n return PoolKind.LEGACY_STABLE;\n } else if (poolType === 'ComposableStable' && poolTypeVersion === 1) {\n return PoolKind.COMPOSABLE_STABLE;\n } else if (poolType === 'ComposableStable') {\n return PoolKind.COMPOSABLE_STABLE_V2;\n } else {\n return PoolKind.WEIGHTED;\n }\n};\n\nexport const setRelayerApproval = Relayer.encodeSetRelayerApproval;\nexport const gaugeWithdrawal = Relayer.encodeGaugeWithdraw;\nexport const gaugeDeposit = Relayer.encodeGaugeDeposit;\nexport const peekChainedReferenceValue =\n Relayer.encodePeekChainedReferenceValue;\n\n/**\n * Encodes exitPool callData.\n * Exit pool to underlying tokens and assigns output references to the exit amounts.\n *\n * @param poolId Pool ID.\n * @param poolType Pool type.\n * @param poolTypeVersion Pool type version.\n * @param assets Ordered pool tokens.\n * @param singleTokenExit When\n * @param outputReferences reference to exit amounts for the next transaction\n * @param amount Amount of BPT to exit with as a number with 18 digits of precision passed as a string.\n * @param sender Sender address.\n * @param recipient Recipient address.\n * @param isComposable Whether the poolType is ComposableStable or not.\n * @param toInternalBalance Use internal balance or not.\n * @returns Encoded exitPool call.\n */\nexport const exit = (\n poolId: string,\n poolType: string,\n poolTypeVersion: number,\n assets: string[],\n exitTokenIndex = -1,\n outputReferences: OutputReference[],\n amount: string,\n sender: string,\n recipient: string,\n toInternalBalance = true\n): string => {\n let userData: string;\n const isComposable = poolType === 'ComposableStable' && poolTypeVersion === 1;\n\n // Exit pool proportionally or to a singleToken\n if (exitTokenIndex > -1) {\n userData = StablePoolEncoder.exitExactBPTInForOneTokenOut(\n amount,\n exitTokenIndex\n );\n } else {\n const encoder = isComposable\n ? ComposableStablePoolEncoder.exitExactBPTInForAllTokensOut\n : StablePoolEncoder.exitExactBPTInForTokensOut;\n userData = encoder(amount);\n }\n\n // Relayer V5 introduces PoolKind\n const poolKind = poolType2PoolKind(poolType, poolTypeVersion);\n\n // Encode exit pool data\n const callData = Relayer.encodeExitPool({\n poolId,\n poolKind,\n sender,\n recipient,\n outputReferences,\n exitPoolRequest: {\n assets,\n minAmountsOut: new Array(assets.length).fill('0'),\n userData,\n toInternalBalance,\n },\n });\n\n return callData;\n};\n\n/**\n * Encodes joinPool callData.\n * Joins pool with underlying tokens and assigns output reference to the BPT amount.\n *\n * @param poolId Pool ID.\n * @param poolType Pool type.\n * @param poolTypeVersion Pool type version.\n * @param assets Ordered pool tokens.\n * @param amountsIn Amounts of tokens to join with as a number with 18 digits of precision passed as a string.\n * @param minimumBPT Minimum BPT amount to receive as a number with 18 digits of precision passed as a string.\n * @param outputReference reference to BPT amount for the next transaction\n * @param sender Sender address.\n * @param recipient Recipient address.\n * @param fromInternalBalance Use internal balance or not.\n * @returns Encoded joinPool call.\n */\nexport const join = (\n poolId: string,\n poolType: string,\n poolTypeVersion: number,\n assets: string[],\n amountsIn: string[],\n minimumBPT: string,\n outputReference: string,\n sender: string,\n recipient: string,\n fromInternalBalance = true\n): string => {\n const maxAmountsIn = assets.map(() => MaxInt256);\n\n // Encoding join pool data with the type exactTokensIn (1)\n // StablePoolEncoder.joinExactTokensInForBPTOut is the same for all pool types\n const userData = StablePoolEncoder.joinExactTokensInForBPTOut(\n amountsIn,\n minimumBPT\n );\n\n const kind = poolType2PoolKind(poolType, poolTypeVersion);\n\n const callData = Relayer.encodeJoinPool({\n poolId,\n kind,\n sender,\n recipient,\n joinPoolRequest: {\n assets,\n maxAmountsIn,\n userData,\n fromInternalBalance,\n },\n value: '0',\n outputReference,\n });\n\n return callData;\n};\n\n/**\n * Creates encoded batchSwap callData\n * outputReferences contain the output amount for swap's last token\n *\n * @param sender Sender address.\n * @param recipient Recipient address.\n * @param swaps List of swaps to execute.\n * @param deadline Deadline for the transaction.\n * @param toInternalBalance Use internal balance or not.\n * @returns Encoded batchSwap call\n */\nexport const swaps = (\n sender: string,\n recipient: string,\n swaps: {\n path: {\n poolId: string;\n assetIn: string;\n assetOut: string;\n }[];\n inputAmount: string;\n outputReference: BigNumber;\n }[],\n deadline?: string,\n toInternalBalance = true\n): string => {\n const assets: string[] = [];\n const limits: string[] = [];\n const outputReferences: { index: number; key: BigNumber }[] = [];\n const batchSwaps: BatchSwapStep[] = [];\n\n // Convert paths into batchSwap steps\n swaps.forEach((swap) => {\n const { path, inputAmount, outputReference } = swap;\n\n for (let i = 0; i < path.length; i++) {\n const { poolId, assetIn, assetOut } = path[i];\n\n assets.push(assetIn);\n assets.push(assetOut);\n\n limits.push(MaxInt256.toString());\n limits.push('0');\n\n const assetInIndex = i * 2;\n const assetOutIndex = i * 2 + 1;\n\n const swap: BatchSwapStep = {\n poolId,\n assetInIndex,\n assetOutIndex,\n amount: i === 0 ? inputAmount : '0',\n userData: '0x',\n };\n\n batchSwaps.push(swap);\n }\n\n // Add output reference for the last swap\n outputReferences.push({ index: path.length * 2 - 1, key: outputReference });\n });\n\n const funds = {\n sender,\n recipient,\n fromInternalBalance: true,\n toInternalBalance,\n };\n\n const encodedBatchSwap = Relayer.encodeBatchSwap({\n swapType: SwapType.SwapExactIn,\n swaps: batchSwaps,\n assets,\n funds,\n limits,\n deadline: deadline || BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value: '0',\n outputReferences,\n });\n\n return encodedBatchSwap;\n};\n","import { Findable, Pool, PoolAttribute } from '@/types';\nimport { BalancerRelayer__factory } from '@/contracts';\n\nexport const balancerRelayerInterface =\n BalancerRelayer__factory.createInterface();\n\n/**\n * Using array of objects to preserve the tokens order\n */\nexport interface MigrationPool {\n address: string;\n id?: string;\n poolType?: string;\n poolTypeVersion?: number;\n tokens?: MigrationPool[];\n mainIndex?: number;\n}\n\n/**\n * Foreach AaveLinear: AaveLinear > mainTokens > newAaveLinear\n *\n * @param fromTokens\n * @param toTokens\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const buildPaths = (\n fromTokens: MigrationPool[],\n toTokens: MigrationPool[],\n exitTokenIndex: number\n) => {\n // Get the main token address for each pool\n const getMainToken = ({ tokens, mainIndex }: MigrationPool) =>\n (tokens && mainIndex && tokens[mainIndex].address) || '';\n const mainFromTokens = fromTokens.flatMap(getMainToken);\n const mainToTokens = toTokens.flatMap(getMainToken);\n\n // Find the index of the main token in both from and to pools\n const pathIndexes = mainFromTokens.map(\n (token, idx) => (token && [idx, mainToTokens.indexOf(token)]) || [-1, -1]\n );\n\n // Build the paths from the indexes\n const exitSwaps = pathIndexes.map(([fromIdx, toIdx]) => {\n if (fromIdx === -1 || toIdx === -1) {\n return [];\n }\n const fromPool = fromTokens[fromIdx];\n const toPool = toTokens[toIdx];\n return buildPath(fromPool, toPool);\n });\n\n // If we want to exit a specific token, return only that path\n if (exitTokenIndex > -1) {\n return [exitSwaps[exitTokenIndex]];\n }\n\n return exitSwaps;\n};\n\nconst buildPath = (from: MigrationPool, to: MigrationPool) => {\n if (from.poolType?.match(/.*Linear.*/)) {\n return buildLinearPath(from, to);\n }\n\n return [];\n};\n\nconst buildLinearPath = (from: MigrationPool, to: MigrationPool) => {\n if (\n !from.id ||\n !to.id ||\n !from.tokens ||\n !to.tokens ||\n !from.mainIndex ||\n !to.mainIndex\n ) {\n throw 'Missing tokens';\n }\n const mainToken = from.tokens[from.mainIndex];\n\n const path = [\n {\n poolId: from.id,\n assetIn: from.address,\n assetOut: mainToken.address,\n },\n {\n poolId: to.id,\n assetIn: mainToken.address,\n assetOut: to.address,\n },\n ];\n\n return path;\n};\n\n/**\n * Converts Subgraph Pool to MigrationPool\n * Recursively builds tokens\n *\n * @param id\n * @param repository\n * @returns\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const buildMigrationPool = async (\n id: string,\n repository: Findable\n) => {\n const pool = await repository.find(id);\n if (!pool) throw `Pool ${id} not found`;\n\n const findTokens = async (token: string, parentPool: string) => {\n let tokens: Array = [{ address: token }];\n const pool = await repository.findBy('address', token);\n if (pool && token != parentPool) {\n const sortedTokens = pool.tokens.sort(cmpTokens);\n const nestedTokens = await Promise.all(\n sortedTokens.map(({ address }) => findTokens(address, pool.address))\n );\n tokens = [\n {\n address: token,\n id: pool.id,\n poolType: pool.poolType,\n poolTypeVersion: pool.poolTypeVersion,\n mainIndex: pool.mainIndex,\n tokens: nestedTokens.flat(),\n },\n ];\n }\n return tokens;\n };\n\n // Sorts amounts out into ascending order (referenced to token addresses) to match the format expected by the Vault.\n const sortedTokens = pool.tokens.sort(cmpTokens);\n\n return {\n id,\n address: pool.address,\n tokens: (\n await Promise.all(\n sortedTokens.map(({ address }) => findTokens(address, pool.address))\n )\n ).flat(),\n poolType: pool.poolType,\n poolTypeVersion: pool.poolTypeVersion,\n mainIndex: pool.mainIndex,\n };\n};\n\nconst cmpTokens = (tokenA: MigrationPool, tokenB: MigrationPool): number =>\n tokenA.address.toLowerCase() > tokenB.address.toLowerCase() ? 1 : -1;\n","import { OutputReference, Relayer } from '@/modules/relayer/relayer.module';\nimport * as actions from '@/modules/relayer/actions';\nimport { buildPaths, MigrationPool, balancerRelayerInterface } from './helpers';\nimport { BigNumber } from '@ethersproject/bignumber';\n\n/**\n * Builds migration call data.\n *\n * @param account Address of the migrating account\n * @param relayer Address of the relayer\n * @param bptAmount Amount of BPT to migrate\n * @param minBptOut Minimal amount of BPT to receive\n * @param from Pool to migrate from\n * @param to Pool to migrate to\n * @param peek Add a peek call for the expected BPT amount, decodable by the `decodePeak` function\n * @param fromGauge Unstake from gauge before migrating\n * @param toGauge Restake to gauge after migrating\n * @param authorisation User's authorisation to approve relayer in the vault\n * @returns call data\n */\nexport const migrationBuilder = (\n account: string,\n relayer: string,\n bptAmount: string,\n minBptOut: string,\n from: MigrationPool,\n to: MigrationPool,\n peek = false,\n fromGauge?: string,\n toGauge?: string,\n authorisation?: string\n): string => {\n if (\n !from.id ||\n !to.id ||\n !from.tokens ||\n !to.tokens ||\n !from.poolType ||\n !to.poolType\n ) {\n throw 'Pool data is missing';\n }\n\n // Define tokens\n const fromTokens = from.tokens.flatMap(({ address }) => address);\n const toTokens = to.tokens.flatMap(({ address }) => address);\n\n // Prefer proportional exit, except for ComposableStableV1\n // Choose 0 as the exit token index\n // TODO: make default exit token dynamic\n const exitTokenIndex =\n from.poolType == 'ComposableStable' && from.poolTypeVersion == 1 ? 0 : -1;\n\n // Define output references\n let exitOutputReferences: OutputReference[];\n let swapOutputReferences: BigNumber[] = [];\n if (exitTokenIndex > -1) {\n exitOutputReferences = [\n {\n index: exitTokenIndex,\n key: Relayer.toChainedReference(`10${exitTokenIndex}`),\n },\n ];\n swapOutputReferences = [Relayer.toChainedReference(`20${exitTokenIndex}`)];\n } else {\n exitOutputReferences = fromTokens.map((_, idx) => ({\n index: idx,\n key: Relayer.toChainedReference(`10${idx}`),\n }));\n swapOutputReferences = fromTokens.map((_, idx) =>\n Relayer.toChainedReference(`20${idx}`)\n );\n }\n\n const joinAmount = Relayer.toChainedReference('999');\n\n // Configure migration steps\n const migrationSteps = [];\n let needsSwap = false; // only if from is ComposableStable\n\n if (from.poolType === 'ComposableStable') {\n needsSwap = true;\n }\n\n // 0. Set relayer approval\n if (authorisation) {\n migrationSteps.push(\n actions.setRelayerApproval(relayer, true, authorisation)\n );\n }\n\n // 1. Withdraw from old gauge\n if (fromGauge) {\n migrationSteps.push(\n actions.gaugeWithdrawal(fromGauge, account, relayer, bptAmount)\n );\n }\n\n // 2. Exit old pool\n migrationSteps.push(\n actions.exit(\n from.id,\n from.poolType,\n from.poolTypeVersion || 1,\n fromTokens,\n exitTokenIndex,\n exitOutputReferences,\n bptAmount,\n fromGauge ? relayer : account,\n relayer\n )\n );\n\n // 3. Swap\n const swapPaths = buildPaths(from.tokens, to.tokens, exitTokenIndex);\n if (swapPaths.flat().length > 0) {\n // Match exit to swap amounts\n const swaps = swapPaths\n .map((path, idx) => ({\n path,\n inputAmount: String(exitOutputReferences[idx].key),\n outputReference: swapOutputReferences[idx],\n }))\n .filter(({ path }) => path.length > 0);\n\n migrationSteps.push(actions.swaps(relayer, relayer, swaps));\n }\n\n // 3. Join\n // Match swap or exit references to the positions of join tokens\n // In case no reference is defined, the default is 0\n const references = toTokens\n .filter((address) => to.address != address)\n .map((to) => {\n const fromIdx = fromTokens.indexOf(to);\n return String(\n (needsSwap && swapOutputReferences[fromIdx]) ||\n exitOutputReferences[fromIdx]?.key ||\n 0\n );\n });\n\n migrationSteps.push(\n actions.join(\n to.id,\n to.poolType,\n to.poolTypeVersion || 1,\n toTokens,\n references,\n minBptOut,\n String(joinAmount),\n relayer,\n toGauge ? relayer : account,\n true\n )\n );\n\n // Peek the last join amount\n if (peek === true) {\n migrationSteps.push(actions.peekChainedReferenceValue(String(joinAmount)));\n }\n\n // 4. Deposit to the new gauge\n if (toGauge) {\n migrationSteps.push(\n actions.gaugeDeposit(toGauge, relayer, account, String(joinAmount))\n );\n }\n\n const callData = balancerRelayerInterface.encodeFunctionData('multicall', [\n migrationSteps,\n ]);\n\n return callData;\n};\n","import { Findable, Pool, PoolAttribute } from '@/types';\nimport { JsonRpcProvider } from '@ethersproject/providers';\nimport { SubgraphLiquidityGauge } from '../subgraph/subgraph';\nimport { migrationBuilder } from './migrations/builder';\nimport {\n balancerRelayerInterface,\n buildMigrationPool,\n} from './migrations/helpers';\nimport * as actions from '@/modules/relayer/actions';\n\n/**\n * @param user - user address\n * @param from - pool ID\n * @param to - pool ID\n * @param balance - amount of liquidity to migrate in WAL (wei-ether)\n * @param minBptOut - minimum amount of BPT to receive, when 0 it will include a peek for the amount\n * @param authorisation - signed user's authorisation to approve relayer in the vault\n */\ninterface MigrationParams {\n user: string;\n from: string;\n to: string;\n balance: string;\n minBptOut?: string;\n authorisation?: string;\n}\n\n/**\n * Class responsible for building liquidity migration transactions.\n */\nexport class Migrations {\n public relayerAddress: string;\n public poolsRepository: Findable;\n public gaugesRepository: Findable;\n public provider: JsonRpcProvider;\n\n /**\n * Instance of a class responsible for building liquidity migration transactions.\n *\n * @param relayerAddress Address of the relayer contract.\n * @param poolsRepository Repository of pools.\n * @param liquidityGaugesRepository Repository of liquidity gauges.\n * @param provider Provider to use for RPC data fetching.\n *\n * Available methods:\n * - `pool2pool` - Migrates liquidity from one pool to another.\n * - `pool2poolWithGauges` - Migrates liquidity from a pool's gauge to another gauge.\n * - `gauge2gauge` - Migrates liquidity from one gauge to another of the same pool.\n *\n * @example\n * ```typescript\n * const sdk = new BalancerSDK({\n * network: 1,\n * rpcUrl: 'https://rpc.ankr.com/eth',\n * })\n *\n * const migrations = new Migrations({\n * relayerAddress: sdk.networkConfig.addresses.contracts.relayerV4 as string,\n * poolsRepository: sdk.data.pools,\n * gaugesRepository: sdk.data.liquidityGauges.subgraph,\n * provider: sdk.provider\n * })\n *\n * const user = '0xfacec29Ae158B26e234B1a81Db2431F6Bd8F8cE8'\n * const from = '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080'\n * const to = '0x32296969ef14eb0c6d29669c550d4a0449130230000200000000000000000080'\n * const balance = '1000000000000000000'\n * const { to, data } = await migrations.pool2pool({ user, from, to, balance })\n *\n * const tx = await sdk.provider.sendTransaction({ to, data })\n * ```\n */\n constructor({\n relayerAddress,\n poolsRepository,\n gaugesRepository,\n provider,\n }: {\n relayerAddress: string;\n poolsRepository: Findable;\n gaugesRepository: Findable;\n provider: JsonRpcProvider;\n }) {\n this.relayerAddress = relayerAddress;\n this.poolsRepository = poolsRepository;\n this.gaugesRepository = gaugesRepository;\n this.provider = provider;\n }\n\n /**\n * Takes user, from and to pool IDs as strings and returns the transaction data\n *\n * @returns transaction data\n */\n async pool2pool({\n user,\n from,\n to,\n balance,\n minBptOut = '0',\n authorisation,\n }: MigrationParams): Promise<{ to: string; data: string }> {\n const fromPool = await buildMigrationPool(from, this.poolsRepository);\n const toPool = await buildMigrationPool(to, this.poolsRepository);\n\n const data = migrationBuilder(\n user,\n this.relayerAddress,\n String(balance),\n minBptOut,\n fromPool,\n toPool,\n minBptOut == '0', // if minBptOut is 0, we peek for the join amount\n undefined,\n undefined,\n authorisation\n );\n\n return {\n to: this.relayerAddress,\n data,\n };\n }\n\n /**\n * Takes user, from and to pool IDs as strings and returns the transaction data\n * for a migration including unstaking and restaking\n *\n * @returns transaction data\n */\n async pool2poolWithGauges({\n user,\n from,\n to,\n balance,\n minBptOut = '0',\n authorisation,\n }: MigrationParams): Promise<{ to: string; data: string }> {\n const fromGauge = await this.gaugesRepository.findBy('poolId', from);\n const toGauge = await this.gaugesRepository.findBy('poolId', to);\n if (!fromGauge || !fromGauge.poolId || !toGauge || !toGauge.poolId) {\n throw new Error('Gauge not found');\n }\n const fromPool = await buildMigrationPool(\n fromGauge.poolId,\n this.poolsRepository\n );\n const toPool = await buildMigrationPool(\n toGauge.poolId,\n this.poolsRepository\n );\n\n const data = migrationBuilder(\n user,\n this.relayerAddress,\n String(balance),\n minBptOut,\n fromPool,\n toPool,\n minBptOut == '0', // if minBptOut is 0, we peek for the join amount\n fromGauge.id,\n toGauge.id,\n authorisation\n );\n\n return {\n to: this.relayerAddress,\n data,\n };\n }\n\n /**\n * Migrates staked liquidity for the same pool from one gauge to another.\n *\n * @returns transaction data\n */\n async gauge2gauge({\n user,\n from,\n to,\n balance,\n authorisation,\n }: MigrationParams): Promise<{ to: string; data: string }> {\n const steps = [\n actions.gaugeWithdrawal(from, user, this.relayerAddress, balance),\n actions.gaugeDeposit(to, this.relayerAddress, user, balance),\n ];\n\n if (authorisation) {\n steps.unshift(\n actions.setRelayerApproval(this.relayerAddress, true, authorisation)\n );\n }\n\n const data = balancerRelayerInterface.encodeFunctionData('multicall', [\n steps,\n ]);\n\n return {\n to: this.relayerAddress,\n data,\n };\n }\n\n /**\n * Decodes the relayer return value to get the expected BPT out.\n *\n * @param relayerReturnValue\n * @returns\n */\n static getExpectedBptOut = (relayerReturnValue: string): string => {\n // Get last two positions of the return value, bptOut is the last one or the second to last one in case there is a gauge deposit\n // join and gauge deposit are always 0x, so any other value means that's the bptOut\n const multicallResult = balancerRelayerInterface.decodeFunctionResult(\n 'multicall',\n relayerReturnValue\n );\n\n const expectedBptOut = multicallResult[0]\n .slice(-2)\n .filter((v: string) => v !== '0x');\n\n return String(BigInt(expectedBptOut));\n };\n\n getExpectedBptOut = Migrations.getExpectedBptOut;\n}\n","import { SubgraphPoolBase } from '@balancer-labs/sor';\nimport {\n EncodeJoinPoolInput,\n ExitPoolData,\n EncodeBatchSwapInput,\n} from '@/modules/relayer/relayer.module';\nimport { Join } from './join';\nimport { Exit } from './exit';\nimport { Swap } from './swap';\n\nexport enum ActionStep {\n Direct,\n TokenIn,\n TokenOut,\n Middle,\n}\n\nexport enum ActionType {\n BatchSwap,\n Join,\n Exit,\n}\n\nexport type Actions = Exit | Swap | Join;\n\nexport interface Action {\n type: ActionType.Join | ActionType.Exit | ActionType.BatchSwap;\n callData(pool: SubgraphPoolBase, wrappedNativeAsset: string): CallData;\n getAmountIn(): string;\n getAmountOut(): string;\n}\n\nexport interface CallData {\n params: EncodeJoinPoolInput | ExitPoolData | EncodeBatchSwapInput;\n encoded: string | string[];\n}\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { ActionStep, ActionType } from './types';\nimport { Relayer, OutputReference } from '@/modules/relayer/relayer.module';\n\nexport class BaseAction {\n nextOpRefKey;\n hasTokenOut;\n hasTokenIn;\n sender;\n receiver;\n opRefStart;\n minOut;\n amountIn;\n\n constructor(\n mainTokenInIndex: number,\n mainTokenOutIndex: number,\n swapAssetInIndex: number,\n swapAssetOutIndex: number,\n swapAmount: string,\n swapReturn: string,\n opRefKey: number,\n slippage: string,\n user: string,\n relayer: string\n ) {\n const actionStep = this.getActionStep(\n mainTokenInIndex,\n mainTokenOutIndex,\n swapAssetInIndex,\n swapAssetOutIndex\n );\n // Will get actual amount if input or chain amount if part of chain\n this.amountIn = this.getActionAmount(\n swapAmount,\n ActionType.BatchSwap,\n actionStep,\n opRefKey\n );\n this.hasTokenIn = this.actionHasTokenIn(actionStep);\n this.hasTokenOut = this.actionHasTokenOut(actionStep);\n // This will be 0 if not a mainTokenOut action otherwise amount using slippage\n const amountOut = this.hasTokenOut ? swapReturn : '0';\n this.minOut = this.getActionMinOut(amountOut, slippage);\n // This will set opRef for next chained action if required\n const [opRef, nextOpRefKey] = this.getActionOutputRef(\n actionStep,\n swapAssetOutIndex,\n opRefKey\n );\n this.nextOpRefKey = nextOpRefKey;\n this.opRefStart = opRef;\n this.sender = this.getSender(this.hasTokenIn, user, relayer);\n this.receiver = this.getReceiver(this.hasTokenOut, user, relayer);\n }\n\n /**\n * If its not the first action then the amount will come from the previous output ref\n * @param amount\n * @param actionType\n * @param actionStep\n * @param opRefKey\n * @returns\n */\n getActionAmount(\n amount: string,\n actionType: ActionType,\n actionStep: ActionStep,\n opRefKey: number\n ): string {\n let amountIn = amount;\n if (\n actionStep === ActionStep.TokenOut ||\n (actionStep === ActionStep.Middle && actionType === ActionType.Join) ||\n (actionStep === ActionStep.Middle && actionType === ActionType.Exit)\n ) {\n amountIn = Relayer.toChainedReference(opRefKey - 1).toString();\n }\n return amountIn;\n }\n\n /**\n * If its not the final action then we need an outputReferece to chain to next action as input\n * @param actionStep\n * @param tokenOutIndex\n * @param opRefKey\n * @returns\n */\n getActionOutputRef(\n actionStep: ActionStep,\n tokenOutIndex: number,\n opRefKey: number\n ): [OutputReference, number] {\n let opRef: OutputReference = {} as OutputReference;\n if (actionStep === ActionStep.TokenIn || actionStep === ActionStep.Middle) {\n opRef = this.getOutputRef(opRefKey, tokenOutIndex);\n opRefKey++;\n }\n return [opRef, opRefKey];\n }\n\n /**\n * Use slippage to set min amount out\n * @param amountOut\n * @param slippage\n * @returns\n */\n getActionMinOut(amountOut: string, slippage: string): string {\n // Currently only handle ExactIn swap. ExactOut would add slippage\n // We should apply slippage to each swaps amountOut\n return subSlippage(\n BigNumber.from(amountOut),\n BigNumber.from(slippage)\n ).toString();\n }\n\n /**\n * Find if the Action is:\n * Direct: tokenIn > tokenOut\n * TokenIn: tokenIn > chain...\n * TokenOut: ...chain > tokenOut\n * Middle: ...chain > action > chain...\n * @param tokenInIndex\n * @param tokenOutIndex\n * @param tokenInIndexAction\n * @param tokenOutIndexAction\n * @returns\n */\n getActionStep(\n tokenInIndex: number,\n tokenOutIndex: number,\n tokenInIndexAction: number,\n tokenOutIndexAction: number\n ): ActionStep {\n let actionStep: ActionStep;\n if (\n tokenInIndexAction === tokenInIndex &&\n tokenOutIndexAction === tokenOutIndex\n ) {\n actionStep = ActionStep.Direct;\n } else if (tokenInIndexAction === tokenInIndex) {\n actionStep = ActionStep.TokenIn;\n } else if (tokenOutIndexAction === tokenOutIndex) {\n actionStep = ActionStep.TokenOut;\n } else {\n actionStep = ActionStep.Middle;\n }\n return actionStep;\n }\n\n getOutputRef(key: number, index: number): OutputReference {\n const keyRef = Relayer.toChainedReference(key);\n return { index: index, key: keyRef };\n }\n\n getFromInternal(hasTokenIn: boolean, isBptIn?: boolean): boolean {\n if (hasTokenIn || isBptIn) return false;\n else return true;\n }\n\n getToInternal(hasTokenOut: boolean, isBptOut?: boolean): boolean {\n // exits - can't exit using BPT from internal balances\n // Because of ^ we can assume that any tokenOut BPT is going to external (either to user or exit)\n if (hasTokenOut || isBptOut) return false;\n else return true;\n }\n\n actionHasTokenIn(actionStep: ActionStep): boolean {\n return actionStep === ActionStep.Direct || actionStep === ActionStep.TokenIn\n ? true\n : false;\n }\n\n actionHasTokenOut(actionStep: ActionStep): boolean {\n return actionStep === ActionStep.Direct ||\n actionStep === ActionStep.TokenOut\n ? true\n : false;\n }\n\n getSender(hasTokenIn: boolean, user: string, relayer: string): string {\n // tokenIn/Out will come from/go to the user. Any other tokens are intermediate and will be from/to Relayer\n if (hasTokenIn) return user;\n else return relayer;\n }\n\n getReceiver(hasTokenOut: boolean, user: string, relayer: string): string {\n // tokenIn/Out will come from/go to the user. Any other tokens are intermediate and will be from/to Relayer\n if (hasTokenOut) return user;\n else return relayer;\n }\n\n getPoolKind(poolType: string): number {\n // We have to use correct pool type based off following from Relayer:\n // enum PoolKind { WEIGHTED, LEGACY_STABLE, COMPOSABLE_STABLE, COMPOSABLE_STABLE_V2 }\n // (note only Weighted and COMPOSABLE_STABLE_V2 will support proportional exits)\n let kind = 0;\n if ([`MetaStable`, `Stable`, `StablePhantom`].includes(poolType)) {\n kind = 1;\n } else if (poolType === `ComposableStable`) {\n // In this case we are only doing BPT <> singleToken, not BPT <> tokens, so encoding matches and avoids need to check version so default to 3\n kind = 3;\n }\n return kind;\n }\n}\n","import { SubgraphPoolBase, SwapV2 } from '@balancer-labs/sor';\nimport {\n Relayer,\n ExitPoolData,\n OutputReference,\n} from '@/modules/relayer/relayer.module';\nimport { ExitPoolRequest } from '@/types';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { AssetHelpers } from '@/lib/utils';\nimport { ActionType, Action, CallData } from './types';\nimport { BaseAction } from './baseAction';\n\nexport class Exit extends BaseAction implements Action {\n type: ActionType.Exit;\n poolId: string;\n tokenOut: string;\n toInternalBalance: boolean;\n opRef: OutputReference;\n\n constructor(\n swap: SwapV2,\n mainTokenInIndex: number,\n mainTokenOutIndex: number,\n public opRefKey: number,\n assets: string[],\n slippage: string,\n user: string,\n relayerAddress: string\n ) {\n super(\n mainTokenInIndex,\n mainTokenOutIndex,\n swap.assetInIndex,\n swap.assetOutIndex,\n swap.amount,\n swap.returnAmount ?? '0',\n opRefKey,\n slippage,\n user,\n relayerAddress\n );\n this.type = ActionType.Exit;\n this.poolId = swap.poolId;\n this.tokenOut = assets[swap.assetOutIndex];\n this.toInternalBalance = this.getToInternal(this.hasTokenOut);\n this.opRef = this.opRefStart;\n }\n\n public callData(\n pool: SubgraphPoolBase,\n wrappedNativeAsset: string\n ): CallData {\n const assets = pool.tokensList;\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // tokens must have same order as pool getTokens\n const [sortedTokens] = assetHelpers.sortTokens(assets) as [string[]];\n const exitToken = this.tokenOut;\n const exitTokenIndex = sortedTokens.findIndex(\n (t) => t.toLowerCase() === exitToken.toLowerCase()\n );\n const minAmountsOut = Array(assets.length).fill('0');\n // Variable amount of token out (this has slippage applied)\n minAmountsOut[exitTokenIndex] = this.minOut;\n // Uses exact amount in\n const bptAmtIn = this.amountIn;\n const userData = WeightedPoolEncoder.exitExactBPTInForOneTokenOut(\n bptAmtIn,\n exitTokenIndex\n );\n const params: ExitPoolData = {\n assets: sortedTokens,\n minAmountsOut,\n userData,\n toInternalBalance: this.toInternalBalance,\n poolId: this.poolId,\n poolKind: this.getPoolKind(pool.poolType),\n sender: this.sender,\n recipient: this.receiver,\n outputReferences: this.opRef.key ? [this.opRef] : [],\n exitPoolRequest: {} as ExitPoolRequest,\n };\n const exitPoolInput = Relayer.formatExitPoolInput(params);\n const callData = Relayer.encodeExitPool(exitPoolInput);\n return {\n params,\n encoded: callData,\n };\n }\n\n public getAmountIn(): string {\n return this.hasTokenIn ? this.amountIn : '0';\n }\n\n public getAmountOut(): string {\n return this.hasTokenOut ? this.minOut : '0';\n }\n}\n","import { SubgraphPoolBase, SwapV2 } from '@balancer-labs/sor';\nimport {\n Relayer,\n EncodeJoinPoolInput,\n OutputReference,\n} from '@/modules/relayer/relayer.module';\nimport { WeightedPoolEncoder } from '@/pool-weighted';\nimport { AssetHelpers } from '@/lib/utils';\nimport { ActionType, Action, CallData } from './types';\nimport { BaseAction } from './baseAction';\n\nexport class Join extends BaseAction implements Action {\n type: ActionType.Join;\n poolId: string;\n tokenIn: string;\n opRef: OutputReference;\n fromInternal;\n\n constructor(\n swap: SwapV2,\n mainTokenInIndex: number,\n mainTokenOutIndex: number,\n public opRefKey: number,\n assets: string[],\n slippage: string,\n user: string,\n relayerAddress: string\n ) {\n super(\n mainTokenInIndex,\n mainTokenOutIndex,\n swap.assetInIndex,\n swap.assetOutIndex,\n swap.amount,\n swap.returnAmount ?? '0',\n opRefKey,\n slippage,\n user,\n relayerAddress\n );\n this.type = ActionType.Join;\n this.poolId = swap.poolId;\n this.tokenIn = assets[swap.assetInIndex];\n this.fromInternal = this.getFromInternal(this.hasTokenIn);\n this.opRef = this.opRefStart;\n }\n\n public callData(\n pool: SubgraphPoolBase,\n wrappedNativeAsset: string\n ): CallData {\n const assets = pool.tokensList;\n const assetHelpers = new AssetHelpers(wrappedNativeAsset);\n // tokens must have same order as pool getTokens\n const [sortedTokens] = assetHelpers.sortTokens(assets) as [string[]];\n const joinToken = this.tokenIn;\n const joinTokenIndex = sortedTokens.findIndex(\n (t) => t.toLowerCase() === joinToken.toLowerCase()\n );\n const maxAmountsIn = Array(assets.length).fill('0');\n // Uses exact amounts of tokens in\n maxAmountsIn[joinTokenIndex] = this.amountIn;\n // Variable amount of BPT out (this has slippage applied)\n const bptAmountOut = this.minOut;\n const userData = WeightedPoolEncoder.joinExactTokensInForBPTOut(\n maxAmountsIn,\n bptAmountOut\n );\n const params: EncodeJoinPoolInput = {\n poolId: this.poolId,\n sender: this.sender,\n recipient: this.receiver,\n kind: this.getPoolKind(pool.poolType),\n joinPoolRequest: {\n assets: sortedTokens,\n maxAmountsIn,\n userData,\n fromInternalBalance: this.fromInternal,\n },\n value: '0',\n outputReference: this.opRef.key ? this.opRef.key.toString() : '0',\n };\n const callData = Relayer.encodeJoinPool(params);\n\n return {\n params,\n encoded: callData,\n };\n }\n\n public getAmountIn(): string {\n return this.hasTokenIn ? this.amountIn : '0';\n }\n\n public getAmountOut(): string {\n return this.hasTokenOut ? this.minOut : '0';\n }\n}\n","import { BigNumber } from '@ethersproject/bignumber';\nimport { MaxUint256, MaxInt256 } from '@ethersproject/constants';\nimport { SubgraphPoolBase, SwapV2 } from '@balancer-labs/sor';\nimport {\n Relayer,\n EncodeBatchSwapInput,\n OutputReference,\n} from '@/modules/relayer/relayer.module';\nimport { FundManagement, SwapType } from '../../types';\nimport { ActionType, Action, CallData } from './types';\nimport { BaseAction } from './baseAction';\n\nexport class Swap extends BaseAction implements Action {\n type: ActionType.BatchSwap;\n swaps: SwapV2[];\n limits: BigNumber[];\n private approveTokens: string[] = [];\n opRef: OutputReference[] = [];\n fromInternal;\n toInternal;\n\n constructor(\n swap: SwapV2,\n private mainTokenInIndex: number,\n private mainTokenOutIndex: number,\n public opRefKey: number,\n private assets: string[],\n private slippage: string,\n private pools: SubgraphPoolBase[],\n private user: string,\n private relayer: string\n ) {\n super(\n mainTokenInIndex,\n mainTokenOutIndex,\n swap.assetInIndex,\n swap.assetOutIndex,\n swap.amount,\n swap.returnAmount ?? '0',\n opRefKey,\n slippage,\n user,\n relayer\n );\n this.type = ActionType.BatchSwap;\n // Updates swap data to use chainedRef if required\n this.swaps = [{ ...swap, amount: this.amountIn }];\n const isBptIn = this.isBpt(pools, assets[swap.assetInIndex]);\n if (isBptIn) {\n // Older pools don't have pre-approval so need to add this as a step\n this.approveTokens.push(assets[swap.assetInIndex]);\n }\n this.fromInternal = this.getFromInternal(this.hasTokenIn, isBptIn);\n const isBptOut = this.isBpt(pools, assets[swap.assetOutIndex]);\n this.toInternal = this.getToInternal(this.hasTokenOut, isBptOut);\n this.limits = this.getLimits(\n assets,\n swap.assetInIndex,\n swap.assetOutIndex,\n swap.amount,\n this.hasTokenIn,\n this.hasTokenOut,\n this.minOut\n );\n if (this.opRefStart.index) {\n this.opRef.push(this.opRefStart);\n }\n }\n\n private getLimits(\n assets: string[],\n assetInIndex: number,\n assetOutIndex: number,\n swapAmount: string,\n hasTokenIn: boolean,\n hasTokenOut: boolean,\n minOut: string\n ): BigNumber[] {\n const limits = assets.map(() => BigNumber.from(0));\n // tokenIn/Out will come from/go to the user. Any other tokens are intermediate and will be from/to Relayer\n if (hasTokenIn) {\n limits[assetInIndex] = BigNumber.from(swapAmount);\n } else {\n // This will be a chained swap/input amount\n limits[assetInIndex] = MaxInt256;\n }\n if (hasTokenOut) {\n limits[assetOutIndex] = BigNumber.from(minOut).mul(-1);\n }\n return limits;\n }\n\n private updateLimits(limits: BigNumber[], newSwap: Swap): void {\n if (newSwap.hasTokenIn) {\n // We need to add amount for each swap that uses tokenIn to get correct total\n limits[newSwap.swaps[0].assetInIndex] = limits[\n newSwap.swaps[0].assetInIndex\n ].add(newSwap.amountIn);\n }\n if (newSwap.hasTokenOut) {\n // We need to add amount for each swap that uses tokenOut to get correct total (should be negative)\n limits[newSwap.swaps[0].assetOutIndex] = limits[\n newSwap.swaps[0].assetOutIndex\n ].sub(newSwap.minOut);\n }\n }\n\n isChainedSwap(swap: Swap): boolean {\n return (\n this.opRef[this.swaps.length - 1] &&\n this.toInternal === swap.fromInternal &&\n this.receiver === swap.sender &&\n this.opRef[this.swaps.length - 1].key.toString() === swap.amountIn\n );\n }\n\n // If swap has different send/receive params than previous then it will need to be done separately\n canAddSwap(newSwap: Swap): boolean {\n if (this.isChainedSwap(newSwap)) return true;\n return (\n newSwap.fromInternal === this.fromInternal &&\n newSwap.toInternal === this.toInternal &&\n newSwap.receiver === this.receiver &&\n newSwap.sender === this.sender\n );\n }\n\n callData(): CallData {\n const calls: string[] = [];\n\n for (const token of this.approveTokens) {\n // If swap tokenIn is a BPT then:\n // new pools have automatic infinite vault allowance, but not old ones\n // const key = Relayer.fromChainedReference(action.swaps[0].amount);\n // const readOnlyRef = Relayer.toChainedReference(key, false);\n // const approval = Relayer.encodeApproveVault(token, readOnlyRef.toString());\n // TODO fix approval amount\n // TODO only approve once\n const approval = Relayer.encodeApproveVault(token, MaxUint256.toString());\n calls.push(approval);\n }\n\n const funds: FundManagement = {\n sender: this.sender,\n recipient: this.receiver,\n fromInternalBalance: this.fromInternal,\n toInternalBalance: this.toInternal,\n };\n const batchSwapInput: EncodeBatchSwapInput = {\n swapType: SwapType.SwapExactIn,\n swaps: this.swaps,\n assets: this.assets,\n funds,\n limits: this.limits.map((l) => l.toString()),\n deadline: BigNumber.from(Math.ceil(Date.now() / 1000) + 3600), // 1 hour from now\n value: '0',\n outputReferences: this.opRef,\n };\n\n const encodedBatchSwap = Relayer.encodeBatchSwap(batchSwapInput);\n calls.push(encodedBatchSwap);\n return {\n params: batchSwapInput,\n encoded: calls,\n };\n }\n getAmountIn(): string {\n return this.limits[this.mainTokenInIndex].toString();\n }\n getAmountOut(): string {\n return this.limits[this.mainTokenOutIndex].abs().toString();\n }\n\n copy(): Swap {\n return new Swap(\n this.swaps[0],\n this.mainTokenInIndex,\n this.mainTokenOutIndex,\n this.opRefKey,\n this.assets,\n this.slippage,\n this.pools,\n this.user,\n this.relayer\n );\n }\n\n addSwap(swap: Swap): void {\n const isChainedSwap = this.isChainedSwap(swap);\n this.swaps.push(swap.swaps[0]);\n // Merge approveTokens without any duplicates\n this.approveTokens = [\n ...new Set([...this.approveTokens, ...swap.approveTokens]),\n ];\n this.toInternal = swap.toInternal;\n this.receiver = swap.receiver;\n this.hasTokenOut = swap.hasTokenOut;\n this.minOut = swap.minOut;\n this.opRef = [...this.opRef, ...swap.opRef];\n if (!isChainedSwap) {\n this.amountIn = BigNumber.from(this.amountIn)\n .add(swap.amountIn)\n .toString();\n }\n this.updateLimits(this.limits, swap);\n }\n\n isBpt(pools: SubgraphPoolBase[], token: string): boolean {\n return pools.some((p) => p.address.toLowerCase() === token.toLowerCase());\n }\n}\n","import { ActionType, Actions } from './types';\nimport { Swap } from './swap';\n\n/**\n * Categorize each action into a Join, Middle or Exit.\n * @param actions\n * @returns\n */\nexport function categorizeActions(actions: Actions[]): Actions[] {\n const enterActions: Actions[] = [];\n const exitActions: Actions[] = [];\n const middleActions: Actions[] = [];\n for (const a of actions) {\n if (a.type === ActionType.Exit || a.type === ActionType.Join) {\n // joins/exits with tokenIn can always be done first\n if (a.hasTokenIn) enterActions.push(a);\n // joins/exits with tokenOut (and not tokenIn) can always be done last\n else if (a.hasTokenOut) exitActions.push(a);\n else middleActions.push(a);\n }\n // All other actions will be chained inbetween\n else middleActions.push(a);\n }\n const allActions: Actions[] = [\n ...enterActions,\n ...middleActions,\n ...exitActions,\n ];\n return allActions;\n}\n\n/**\n * This aims to minimise the number of Actions the Relayer multicall needs to call by batching sequential swaps together.\n * @param actions\n * @param assets\n * @returns\n */\nexport function batchSwapActions(allActions: Actions[]): Actions[] {\n /*\n batchSwaps are a collection of swaps that can all be called in a single batchSwap\n Can batch all swaps with same source\n Any swap without tokenIn && not BPT should be coming from internal balances\n Any swap with tokenIn or BPT should be coming from external balances\n */\n const orderedActions: Actions[] = [];\n let batchedSwaps: Swap | undefined = undefined;\n\n for (const a of allActions) {\n if (a.type === ActionType.BatchSwap) {\n if (!batchedSwaps) {\n batchedSwaps = a.copy();\n } else {\n if (batchedSwaps.canAddSwap(a)) {\n batchedSwaps.addSwap(a);\n } else {\n orderedActions.push(batchedSwaps);\n batchedSwaps = a.copy();\n }\n }\n } else {\n // Non swap action\n if (batchedSwaps) {\n orderedActions.push(batchedSwaps);\n // new batchSwap collection as there is a chained join/exit inbetween\n batchedSwaps = undefined;\n }\n orderedActions.push(a);\n }\n }\n if (batchedSwaps) orderedActions.push(batchedSwaps);\n\n return orderedActions;\n}\n\n/**\n * Organise Actions into order with least amount of calls.\n * @param actions\n * @param assets\n * @returns\n */\nexport function orderActions(actions: Actions[]): Actions[] {\n const categorizedActions = categorizeActions(actions);\n const orderedActions = batchSwapActions(categorizedActions);\n return orderedActions;\n}\n","import { Interface } from '@ethersproject/abi';\nimport { BigNumber } from '@ethersproject/bignumber';\nimport { AddressZero } from '@ethersproject/constants';\nimport {\n SubgraphPoolBase,\n SwapInfo,\n SwapTypes,\n SwapV2,\n} from '@balancer-labs/sor';\nimport {\n Relayer,\n EncodeJoinPoolInput,\n EncodeBatchSwapInput,\n ExitPoolData,\n} from '@/modules/relayer/relayer.module';\nimport { getPoolAddress } from '@/pool-utils';\nimport { subSlippage } from '@/lib/utils/slippageHelper';\nimport { BalancerError, BalancerErrorCode } from '@/balancerErrors';\nimport { orderActions, ActionType, Actions } from './actions';\n\nimport balancerRelayerAbi from '@/lib/abi/BalancerRelayer.json';\nimport { Join } from './actions/join';\nimport { Exit } from './actions/exit';\nimport { Swap } from './actions/swap';\nimport { Logger } from '@/lib/utils/logger';\n\nconst balancerRelayerInterface = new Interface(balancerRelayerAbi);\n\n// Quickly switch useful debug logs on/off\nconst DEBUG = false;\n\nfunction debugLog(log: string) {\n const logger = Logger.getInstance();\n if (DEBUG) logger.info(log);\n}\n\nexport function canUseJoinExit(\n swapType: SwapTypes,\n tokenIn: string,\n tokenOut: string\n): boolean {\n if (\n swapType === SwapTypes.SwapExactOut ||\n tokenIn.toLowerCase() === AddressZero.toLowerCase() ||\n tokenOut.toLowerCase() === AddressZero.toLowerCase()\n )\n return false;\n else return true;\n}\n\n/**\n * Currently SOR only supports join/exit paths through Weighted pools.\n * Weighted pools should not have preminted BPT so can assume if a swap token is pool address it is a join or exit.\n * @param pools\n * @param swap\n * @param assets\n * @returns\n */\nexport function hasJoinExit(\n pools: SubgraphPoolBase[],\n swap: SwapV2,\n assets: string[]\n): boolean {\n const pool = pools.find((p) => p.id === swap.poolId);\n if (pool?.poolType !== 'Weighted') return false;\n const tokenIn = assets[swap.assetInIndex];\n const tokenOut = assets[swap.assetOutIndex];\n return [tokenIn, tokenOut].includes(pool.address);\n}\n\n/**\n * Finds if a swap returned by SOR is a join by checking if tokenOut === poolAddress\n * @param swap\n * @param assets\n * @returns\n */\nexport function isJoin(\n swap: SwapV2,\n assets: string[],\n poolType: string | undefined\n): boolean {\n if (poolType !== 'Weighted') return false;\n // token[join]bpt\n const tokenOut = assets[swap.assetOutIndex];\n const poolAddress = getPoolAddress(swap.poolId);\n return tokenOut.toLowerCase() === poolAddress.toLowerCase();\n}\n\n/**\n * Finds if a swap returned by SOR is an exit by checking if tokenIn === poolAddress\n * @param swap\n * @param assets\n * @returns\n */\nexport function isExit(\n swap: SwapV2,\n assets: string[],\n poolType: string | undefined\n): boolean {\n if (poolType !== 'Weighted') return false;\n // bpt[exit]token\n const tokenIn = assets[swap.assetInIndex];\n const poolAddress = getPoolAddress(swap.poolId);\n return tokenIn.toLowerCase() === poolAddress.toLowerCase();\n}\n\n/**\n * Find if any of the swaps are join/exits. If yes these swaps should be routed via Relayer.\n * @param pools\n * @param swaps\n * @param assets\n * @returns\n */\nexport function someJoinExit(\n pools: SubgraphPoolBase[],\n swaps: SwapV2[],\n assets: string[]\n): boolean {\n return swaps.some((swap) => {\n return hasJoinExit(pools, swap, assets);\n });\n}\n\n/**\n * Translate each swap into an Action. An Action is a join/exit/swap with the chained output refs.\n * @param swapType\n * @param tokenIn\n * @param tokenOut\n * @param swaps\n * @param assets\n * @param slippage\n * @param pools\n * @param user\n * @param relayer\n * @returns\n */\nexport function getActions(\n tokenIn: string,\n tokenOut: string,\n swaps: SwapV2[],\n assets: string[],\n slippage: string,\n pools: SubgraphPoolBase[],\n user: string,\n relayer: string\n): Actions[] {\n const tokenInIndex = assets.findIndex(\n (t) => t.toLowerCase() === tokenIn.toLowerCase()\n );\n const tokenOutIndex = assets.findIndex(\n (t) => t.toLowerCase() === tokenOut.toLowerCase()\n );\n const actions: Actions[] = [];\n let opRefKey = 0;\n for (const swap of swaps) {\n const poolType = pools.find((p) => p.id === swap.poolId)?.poolType;\n if (isJoin(swap, assets, poolType)) {\n const newJoin = new Join(\n swap,\n tokenInIndex,\n tokenOutIndex,\n opRefKey,\n assets,\n slippage,\n user,\n relayer\n );\n opRefKey = newJoin.nextOpRefKey;\n actions.push(newJoin);\n continue;\n } else if (isExit(swap, assets, poolType)) {\n const newExit = new Exit(\n swap,\n tokenInIndex,\n tokenOutIndex,\n opRefKey,\n assets,\n slippage,\n user,\n relayer\n );\n opRefKey = newExit.nextOpRefKey;\n actions.push(newExit);\n continue;\n } else {\n const newSwap = new Swap(\n swap,\n tokenInIndex,\n tokenOutIndex,\n opRefKey,\n assets,\n slippage,\n pools,\n user,\n relayer\n );\n opRefKey = newSwap.nextOpRefKey;\n actions.push(newSwap);\n continue;\n }\n }\n return actions;\n}\n\n/**\n * Given swapInfo from the SOR construct the Relayer multicall to execture swaps/joins/exits.\n * @param swapInfo Returned from SOR\n * @param swapType Only supports ExactIn\n * @param pools Pool info from SOR\n * @param user Address of user\n * @param relayerAddress Address of Relayer (>=V4)\n * @param wrappedNativeAsset Address of Native asset\n * @param slippage [bps], eg: 1 === 0.01%, 100 === 1%\n * @param authorisation Encoded authorisation call.\n * @returns\n */\nexport function buildRelayerCalls(\n swapInfo: SwapInfo,\n pools: SubgraphPoolBase[],\n user: string,\n relayerAddress: string,\n wrappedNativeAsset: string,\n slippage: string,\n authorisation: string | undefined\n): {\n to: string;\n data: string;\n rawCalls: string[];\n inputs: (EncodeBatchSwapInput | ExitPoolData | EncodeJoinPoolInput)[];\n} {\n // For each 'swap' create a swap/join/exit action\n const actions = getActions(\n swapInfo.tokenIn,\n swapInfo.tokenOut,\n swapInfo.swaps,\n swapInfo.tokenAddresses,\n slippage,\n pools,\n user,\n relayerAddress\n );\n // Arrange action into order that will create minimal amount of calls\n const orderedActions = orderActions(actions);\n\n const calls: string[] = [];\n const inputs: (EncodeBatchSwapInput | ExitPoolData | EncodeJoinPoolInput)[] =\n [];\n if (authorisation)\n // Uses relayer to approve itself to act in behalf of the user\n calls.push(\n Relayer.encodeSetRelayerApproval(relayerAddress, true, authorisation)\n );\n\n // Create encoded call for each action\n for (const action of orderedActions) {\n if (action.type === ActionType.Exit || action.type === ActionType.Join) {\n const pool = pools.find((p) => p.id === action.poolId);\n if (pool === undefined)\n throw new BalancerError(BalancerErrorCode.NO_POOL_DATA);\n const { params, encoded } = action.callData(pool, wrappedNativeAsset);\n calls.push(encoded as string);\n inputs.push(params);\n }\n if (action.type === ActionType.BatchSwap) {\n const { params, encoded } = action.callData();\n calls.push(...encoded);\n inputs.push(params);\n }\n }\n\n // Safety check to make sure amounts/limits from calls match expected\n checkAmounts(\n orderedActions.map((a) => BigNumber.from(a.getAmountIn())),\n orderedActions.map((a) => BigNumber.from(a.getAmountOut())),\n swapInfo,\n slippage\n );\n // encode relayer multicall\n const callData = balancerRelayerInterface.encodeFunctionData('multicall', [\n calls,\n ]);\n\n return {\n to: relayerAddress,\n data: callData,\n rawCalls: calls,\n inputs,\n };\n}\n\nfunction checkAmounts(\n amountsIn: BigNumber[],\n amountsOut: BigNumber[],\n swapInfo: SwapInfo,\n slippage: string\n): void {\n const totalIn = amountsIn.reduce(\n (total = BigNumber.from(0), amount) => (total = total.add(amount))\n );\n const totalOut = amountsOut.reduce(\n (total = BigNumber.from(0), amount) => (total = total.add(amount))\n );\n // totalIn should equal the original input swap amount\n // totalOut should equal the return amount from SOR minus any slippage allowance\n debugLog(`${totalIn.toString()} totalIn`);\n debugLog(`${swapInfo.swapAmount.toString()} swapInfo.swapAmount`);\n debugLog(`${totalOut.toString()} totalOut`);\n debugLog(\n `${subSlippage(\n swapInfo.returnAmount,\n BigNumber.from(slippage)\n ).toString()} slippage`\n );\n debugLog(`${swapInfo.returnAmount.toString()} swapInfo.returnAmount`);\n const diffOut = totalOut.sub(\n subSlippage(swapInfo.returnAmount, BigNumber.from(slippage))\n );\n if (!totalIn.eq(swapInfo.swapAmount) || !diffOut.lt(`3`))\n throw new BalancerError(BalancerErrorCode.RELAY_SWAP_AMOUNTS);\n /* ExactOut case\n // totalIn should equal the return amount from SOR (this is the amount in) plus any slippage allowance\n // totalOut should equal the original input swap amount (the exact amount out)\n if (\n !totalIn.eq(\n addSlippage(swapInfo.returnAmount, BigNumber.from(slippage))\n ) ||\n !totalOut.eq(swapInfo.swapAmount)\n )\n throw new BalancerError(BalancerErrorCode.RELAY_SWAP_AMOUNTS);\n */\n}\n","import { ClaimService, IClaimService } from '@/modules/claims/ClaimService';\nimport { BalancerSdkConfig, BalancerNetworkConfig } from '@/types';\nimport { Swaps } from './swaps/swaps.module';\nimport { Relayer } from './relayer/relayer.module';\nimport { Subgraph } from './subgraph/subgraph.module';\nimport { Sor } from './sor/sor.module';\nimport { getNetworkConfig } from './sdk.helpers';\nimport { Pricing } from './pricing/pricing.module';\nimport { ContractInstances, Contracts } from './contracts/contracts.module';\nimport { Pools } from './pools';\nimport { Data } from './data';\nimport { VaultModel } from './vaultModel/vaultModel.module';\nimport { JsonRpcProvider } from '@ethersproject/providers';\nimport { Migrations } from './liquidity-managment/migrations';\nimport { Logger } from '@/lib/utils/logger';\n\nexport interface BalancerSDKRoot {\n config: BalancerSdkConfig;\n sor: Sor;\n subgraph: Subgraph;\n pools: Pools;\n data: Data;\n swaps: Swaps;\n relayer: Relayer;\n networkConfig: BalancerNetworkConfig;\n provider: JsonRpcProvider;\n claimService?: IClaimService;\n}\n\nexport class BalancerSDK implements BalancerSDKRoot {\n readonly swaps: Swaps;\n readonly relayer: Relayer;\n readonly pricing: Pricing;\n readonly pools: Pools;\n readonly data: Data;\n balancerContracts: Contracts;\n vaultModel: VaultModel;\n readonly networkConfig: BalancerNetworkConfig;\n readonly provider: JsonRpcProvider;\n readonly claimService?: IClaimService;\n readonly migrationService?: Migrations;\n\n constructor(\n public config: BalancerSdkConfig,\n public sor = new Sor(config),\n public subgraph = new Subgraph(config)\n ) {\n const logger = Logger.getInstance();\n logger.setLoggingEnabled(!!config.enableLogging);\n this.networkConfig = getNetworkConfig(config);\n this.provider = sor.provider as JsonRpcProvider;\n\n this.balancerContracts = new Contracts(\n this.networkConfig.addresses.contracts,\n sor.provider\n );\n\n this.data = new Data(\n this.networkConfig,\n sor.provider,\n this.balancerContracts,\n config.subgraphQuery,\n config.coingecko\n );\n\n this.swaps = new Swaps(this.config);\n this.relayer = new Relayer();\n this.pricing = new Pricing(config, this.swaps);\n\n this.pools = new Pools(\n this.networkConfig,\n this.data,\n this.balancerContracts\n );\n\n if (this.data.liquidityGauges) {\n this.claimService = new ClaimService(\n this.data.liquidityGauges,\n this.data.feeDistributor,\n this.networkConfig.chainId,\n this.contracts.multicall,\n this.networkConfig.addresses.contracts.gaugeClaimHelper,\n this.networkConfig.addresses.contracts.balancerMinter\n );\n this.migrationService = new Migrations({\n relayerAddress: this.networkConfig.addresses.contracts.balancerRelayer,\n poolsRepository: this.data.pools,\n gaugesRepository: this.data.liquidityGauges.subgraph,\n provider: this.provider,\n });\n }\n this.vaultModel = new VaultModel(\n this.data.poolsForSimulations,\n this.networkConfig.addresses.tokens.wrappedNativeAsset\n );\n }\n\n /**\n * Expose balancer contracts, e.g. Vault, LidoRelayer.\n */\n get contracts(): ContractInstances {\n return this.balancerContracts.contracts;\n }\n}\n","import { Findable } from '../types';\nimport { Pool } from '@/types';\nimport {\n PoolAttribute,\n PoolRepository,\n PoolsFallbackRepositoryOptions,\n PoolsRepositoryFetchOptions,\n} from './types';\nimport { Logger } from '@/lib/utils/logger';\n\n/**\n * The fallback provider takes multiple PoolRepository's in an array and uses them in order\n * falling back to the next one if a request times out.\n *\n * This is useful for using the Balancer API while being able to fall back to the graph if it is down\n * to ensure Balancer is maximally decentralized.\n **/\nexport class PoolsFallbackRepository implements Findable {\n currentProviderIdx: number;\n timeout: number;\n\n constructor(\n private readonly providers: PoolRepository[],\n options: PoolsFallbackRepositoryOptions = {}\n ) {\n this.currentProviderIdx = 0;\n this.timeout = options.timeout || 10000;\n }\n\n async fetch(options?: PoolsRepositoryFetchOptions): Promise {\n return this.fallbackQuery('fetch', [options]);\n }\n\n get currentProvider(): PoolRepository | undefined {\n if (\n !this.providers.length ||\n this.currentProviderIdx >= this.providers.length\n ) {\n return;\n }\n\n return this.providers[this.currentProviderIdx];\n }\n\n async find(id: string): Promise {\n return this.fallbackQuery('find', [id]);\n }\n\n async findBy(\n attribute: PoolAttribute,\n value: string\n ): Promise {\n return this.fallbackQuery('findBy', [attribute, value]);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n async fallbackQuery(func: string, args: unknown[]): Promise {\n if (this.currentProviderIdx >= this.providers.length) {\n throw new Error('No working providers found');\n }\n\n let result;\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const currentProvider = this.providers[this.currentProviderIdx] as any;\n result = await Promise.race([\n // eslint-disable-next-line prefer-spread\n currentProvider[func].apply(currentProvider, args),\n new Promise((_, reject) =>\n setTimeout(() => reject(new Error('timeout')), this.timeout)\n ),\n ]);\n } catch (e: unknown) {\n const message = (e as Error).message;\n if (message === 'timeout') {\n const logger = Logger.getInstance();\n logger.warn(\n 'Provider ' +\n this.currentProviderIdx +\n ' timed out, falling back to next provider'\n );\n } else {\n const logger = Logger.getInstance();\n logger.warn(\n `Provider ${this.currentProviderIdx} failed with error, falling back to next provider.`\n );\n logger.warn(message);\n }\n this.currentProviderIdx++;\n result = await this.fallbackQuery.call(this, func, args);\n }\n\n return result;\n }\n}\n","import { Findable, Pool, Searchable } from '@/types';\nimport { PoolAttribute } from './types';\n\nexport class PoolsStaticRepository\n implements Findable, Searchable\n{\n constructor(private pools: Pool[]) {}\n\n async find(id: string): Promise {\n return this.pools.find((pool) => {\n return pool.id.toLowerCase() === id.toLowerCase();\n });\n }\n\n async findBy(\n attribute: PoolAttribute,\n value: string\n ): Promise {\n return this.pools.find((pool) => {\n return pool[attribute] === value;\n });\n }\n\n async all(): Promise {\n return this.pools;\n }\n\n async where(filter: (pool: Pool) => boolean): Promise {\n return (await this.all()).filter(filter);\n }\n}\n","import { Findable, Price, TokenPrices } from '@/types';\n\nexport class StaticTokenPriceProvider implements Findable {\n tokenPrices: TokenPrices;\n constructor(tokenPrices: TokenPrices) {\n this.tokenPrices = Object.fromEntries(\n Object.entries(tokenPrices).map(([address, price]) => {\n return [address.toLowerCase(), price];\n })\n );\n }\n\n async find(address: string): Promise {\n const lowercaseAddress = address.toLowerCase();\n const price = this.tokenPrices[lowercaseAddress];\n if (!price) return;\n return price;\n }\n\n async findBy(attribute: string, value: string): Promise {\n if (attribute != 'address') {\n return undefined;\n }\n\n return this.find(value);\n }\n}\n","import { BigNumber, BigNumberish } from '@ethersproject/bignumber';\nimport { Zero, WeiPerEther as ONE } from '@ethersproject/constants';\n\n// Should match MAX_WEIGHTED_TOKENS from v2-helpers/constants\n// Including would introduce a dependency\nconst MaxWeightedTokens = 100;\n\n/**\n * Normalize an array of token weights to ensure they sum to `1e18`\n * @param weights - an array of token weights to be normalized\n * @returns an equivalent set of normalized weights\n */\nexport function toNormalizedWeights(weights: BigNumber[]): BigNumber[] {\n // When the number is exactly equal to the max, normalizing with common inputs\n // leads to a value < 0.01, which reverts. In this case fill in the weights exactly.\n if (weights.length == MaxWeightedTokens) {\n return Array(MaxWeightedTokens).fill(ONE.div(MaxWeightedTokens));\n }\n\n const sum = weights.reduce((total, weight) => total.add(weight), Zero);\n if (sum.eq(ONE)) return weights;\n\n const normalizedWeights = [];\n let normalizedSum = Zero;\n for (let index = 0; index < weights.length; index++) {\n if (index < weights.length - 1) {\n normalizedWeights[index] = weights[index].mul(ONE).div(sum);\n normalizedSum = normalizedSum.add(normalizedWeights[index]);\n } else {\n normalizedWeights[index] = ONE.sub(normalizedSum);\n }\n }\n\n return normalizedWeights;\n}\n\n/**\n * Check whether a set of weights are normalized\n * @param weights - an array of potentially unnormalized weights\n * @returns a boolean of whether the weights are normalized\n */\nexport const isNormalizedWeights = (weights: BigNumberish[]): boolean => {\n const totalWeight = weights.reduce(\n (total: BigNumber, weight) => total.add(weight),\n Zero\n );\n return totalWeight.eq(ONE);\n};\n"],"names":["BasePoolExitKind","StablePoolJoinKind","StablePhantomPoolJoinKind","StablePoolExitKind","WeightedPoolJoinKind","WeightedPoolExitKind","BasePoolEncoder","recoveryModeExit","bptAmountIn","defaultAbiCoder","encode","RECOVERY_MODE","exports","StablePoolEncoder","constructor","joinInit","amountsIn","INIT","joinCollectProtocolFees","COLLECT_PROTOCOL_FEES","joinExactTokensInForBPTOut","minimumBPT","EXACT_TOKENS_IN_FOR_BPT_OUT","joinTokenInForExactBPTOut","bptAmountOut","enterTokenIndex","TOKEN_IN_FOR_EXACT_BPT_OUT","exitExactBPTInForOneTokenOut","exitTokenIndex","EXACT_BPT_IN_FOR_ONE_TOKEN_OUT","exitExactBPTInForTokensOut","EXACT_BPT_IN_FOR_TOKENS_OUT","exitBPTInForExactTokensOut","amountsOut","maxBPTAmountIn","BPT_IN_FOR_EXACT_TOKENS_OUT","WeightedPoolEncoder","joinAllTokensInForExactBPTOut","ALL_TOKENS_IN_FOR_EXACT_BPT_OUT","ManagedPoolEncoder","exitForManagementFees","MANAGEMENT_FEE_TOKENS_OUT","ComposableStablePoolJoinKind","ComposableStablePoolExitKind","ComposableStablePoolEncoder","exitExactBPTInForAllTokensOut","EXACT_BPT_IN_FOR_ALL_TOKENS_OUT","isProduction","process","env","NODE_ENV","prefix","invariant","condition","message","Error","provided","value","concat","getPoolAddress","poolId","length","slice","getPoolSpecialization","specializationCode","parseInt","getPoolNonce","BigNumber","from","Network","POOLS_GENERIC","IdsMap","Pagination","PerPage","PerPool","PerPoolInitial","DelegateOwner","ZeroAddress","DynamicFees","Gauntlet","BlockList","ExcludedPoolTypes","Stable","AllowList","Investment","Factories","Stakable","Metadata","name","hasIcon","POOLS_MAP","GOERLI","staBAL","bbAaveUSD","v1","v2","veBAL","MAINNET","POLYGON","xMatic","stMatic","mai4","maiBbaUsd","ARBITRUM","GNOSIS","PoolGaugesAttributes","PoolShareAttributes","GaugeShareAttributes","PoolSpecialization","UserBalanceOpKind","PoolBalanceOpKind","PoolType","Logger","this","enableLogging","static","instance","setLoggingEnabled","enabled","info","warn","console","error","time","timeEnd","transposeMatrix","matrix","map","_","columnIndex","row","AssetHelpers","wethAddress","ETH","AddressZero","isETH","token","isEqual","isWETH","WETH","translateToERC20","getAddress","sortTokens","tokens","others","forEach","array","erc20Tokens","sortedTranspose","sort","tokenA","tokenB","toLowerCase","cmpTokens","sortedErc20s","sortedOthers","includes","addressA","addressB","balancerErrorCodes","BalancerErrors","async","accountToAddress","account","Signer","isSigner","address","RelayerAction","isErrorCode","errorCode","replace","Object","keys","parseErrorCode","actualError","tryParseErrorCode","isBalancerError","values","encodeError","encodedError","entries","find","RelayerAuthorization","encodeCalldataAuthorization","calldata","deadline","signature","encodedDeadline","hexZeroPad","hexValue","v","r","s","splitSignature","signJoinAuthorization","validator","user","allowedSender","allowedCalldata","nonce","signAuthorizationFor","JoinPool","signExitAuthorization","ExitPool","signSwapAuthorization","Swap","signBatchSwapAuthorization","BatchSwap","signSetRelayerApprovalAuthorization","SetRelayerApproval","type","MAX_DEADLINE","MaxUint256","chainId","provider","getNetwork","userAddress","getNextNonce","domain","version","verifyingContract","types","sender","toString","_signTypedData","BalancerMinterAuthorization","signSetMinterApproval","minterContract","minter","approval","SetMinterApproval","BZERO","BigInt","BONE","ONE","_require","b","_computeScalingFactor","tokenDecimals","decimalsDifference","_upscale","amount","scalingFactor","SolidityMaths","mulDownFixed","_upscaleArray","amounts","scalingFactors","upscaledAmounts","Array","i","_downscaleDown","divDownFixed","_downscaleDownArray","downscaledAmounts","a","c","args","reduce","previous","current","roundUp","divUp","divDown","product","aInflated","x","y","raw","LogExpMath","pow","maxError","add","mulUpFixed","MAX_POW_RELATIVE_ERROR","ONE_18","x_int256","MILD_EXPONENT_BOUND","y_int256","logx_times_y","LN_36_LOWER_BOUND","LN_36_UPPER_BOUND","ln_36_x","_ln_36","_ln","MIN_NATURAL_EXPONENT","MAX_NATURAL_EXPONENT","exp","firstAN","x0","a0","x1","a1","ONE_20","x2","a2","x3","a3","x4","a4","x5","a5","x6","a6","x7","a7","x8","a8","x9","a9","term","seriesSum","z","ONE_36","z_squared","num","sum","a10","x10","a11","x11","AMP_PRECISION","parsePoolInfo","pool","wrappedNativeAsset","unwrapNativeAsset","poolTokens","decimals","_a","balancesEvm","parseFixed","balance","toBigInt","weights","weight","priceRates","priceRate","scalingFactorsRaw","d","sf","upScaledBalances","assetHelpers","ampWithPrecision","amp","higherBalanceTokenIndex","indexOf","max","scalingFactorsWithoutBpt","scalingFactorsRawWithoutBpt","poolTokensWithoutBpt","balancesEvmWithoutBpt","priceRatesWithoutBpt","upScaledBalancesWithoutBpt","bptIndex","splice","swapFeeEvm","swapFee","totalSharesEvm","totalShares","TOKENS_GENERIC","Popular","Symbols","Addresses","nativeAsset","wNativeAsset","BAL","TOKENS_MAP","bbaUSD","PriceChainMap","bbaUSDv2","TOKENS","networkId","_permanentCensorErrors","_censorErrors","LogLevels","debug","default","warning","off","_logLevel","_globalLogger","_normalizeError","missing","form","normalize","push","join","String","fromCharCode","_checkNormalize","LogLevel","ErrorCode","HEX","defineProperty","enumerable","writable","_log","logLevel","level","throwArgumentError","log","apply","levels","DEBUG","INFO","WARNING","makeError","code","params","errors","UNKNOWN_ERROR","messageDetails","key","Uint8Array","hex","JSON","stringify","reason","url","NUMERIC_FAULT","fault","CALL_EXCEPTION","INSUFFICIENT_FUNDS","MISSING_NEW","NONCE_EXPIRED","REPLACEMENT_UNDERPRICED","TRANSACTION_REPLACED","UNPREDICTABLE_GAS_LIMIT","throwError","INVALID_ARGUMENT","argument","assert","assertArgument","checkNormalize","UNSUPPORTED_OPERATION","operation","checkSafeUint53","checkArgumentCount","count","expectedCount","MISSING_ARGUMENT","UNEXPECTED_ARGUMENT","checkNew","target","kind","checkAbstract","censorship","permanent","globalLogger","logger","names","formatUnits","unitName","index","formatFixed","parseUnits","yieldTokens","waUSDT","waUSDC","waDAI","wamDAI","wamUSDC","wamUSDT","wrappedTokensMap","aToken","underlying","wrappedATokenInterface","Interface","AaveRates","multicall","network","addresses","payload","wrappedATokenAddress","callData","encodeFunctionData","res","callStatic","aggregate","p","parseFloat","wrappedAToken","tokenAddressForPricing","addressMapIn","unwrapToken","addressMap","wrappedAddress","lowercase","toLocaleLowerCase","aaveChain","undefined","aaveWrappedMap","getEthValue","filter","Debouncer","fn","wait","limit","requestSets","promisedCalls","promisedCount","debounceCancel","fetch","attr","_b","Set","size","execute","promise","timeout","resolve","reject","Promise","rej","makePromise","clearTimeout","call","requestAttrs","then","results","catch","response","data","setTimeout","bind","valueWithTrimmedDecimals","RegExp","result","match","parsedValue","_parseFixed","_formatFixed","bpsPerOne","mulSlippage","slippage","mul","div","subSlippage","delta","sub","addSlippage","isSameAddress","address1","address2","insert","arr","newItem","removeItem","newArray","reorderArrays","reference","original","some","indexesOfOriginal","othersResorted","indexOfOriginal","arrIndex","isLinearish","poolType","supportedPoolTypes","findEventInReceiptLogs","receipt","to","contractInterface","logName","event","logs","parseLog","getInstance","parsedLog","getRandomBytes32","fill","Math","random","BalancerAPIArgsFormatter","format","SubgraphArgsFormatter","operatorMap","gt","lt","eq","in","not_in","contains","whereQuery","where","operator","GraphQLArgsBuilder","merge","other","mergedArgs","mergeWith","objValue","srcValue","isArray","formatter","_abi","inputs","components","internalType","stateMutability","anonymous","indexed","outputs","AaveLinearPool__factory","utils","signerOrProvider","Contract","abi","AaveLinearPoolFactory__factory","AaveWrapping__factory","Authoriser__factory","BalancerHelpers__factory","BalancerMinter__factory","BalancerPoolDataQueries__factory","BalancerRelayer__factory","BatchRelayerLibrary__factory","ComposableStablePool__factory","ComposableStablePoolFactory__factory","ConvergentCurvePool__factory","constant","payable","ERC20__factory","ERC4626LinearPool__factory","ERC4626LinearPoolFactory__factory","EulerLinearPool__factory","EulerLinearPoolFactory__factory","FXPool__factory","GaugeClaimHelper__factory","GearboxLinearPool__factory","GearboxLinearPoolFactory__factory","GyroConfig__factory","LidoRelayer__factory","LinearPool__factory","LiquidityGaugeV5__factory","Multicall__factory","Multicall3__factory","StablePool__factory","StaticATokenRateProvider__factory","Vault__factory","WeightedPool__factory","WeightedPoolFactory__factory","YearnLinearPool__factory","YearnLinearPoolFactory__factory","GyroEV2__factory","VeBal__factory","VeDelegationProxy__factory","SwapType","getLimitsForSlippage","tokensIn","tokensOut","swapType","deltas","assets","limits","Zero","tokenIn","slippageAmount","WeiPerEther","SwapExactOut","tokenOut","SwapExactIn","balancerVault","BALANCER_NETWORK_CONFIG","contracts","poolDataQueries","lidoRelayer","veBal","gaugeControllerCheckpointer","veBalProxy","gyroConfigProxy","addressesByNetwork","bal","weth","bbaUsd","bb_a_usd","lbpRaisingTokens","stETH","wstETH","urls","subgraph","gaugesSubgraph","blockNumberSubgraph","thirdParty","coingecko","nativeAssetId","platformId","pools","wETHwstETH","id","poolsToIgnore","sorConnectingTokens","symbol","sorTriPathMidPoolIds","gaugeClaimHelper","erc4626LinearPoolFactory","aaveLinearPoolFactory","OPTIMISM","averageBlockTime","FANTOM","vault","balancerRelayer","balancerHelpers","weightedPoolFactory","composableStablePoolFactory","yearnLinearPoolFactory","SEPOLIA","ZKEVM","balancerMinter","multicallBatchSize","AVALANCHE","BASE","networkAddresses","BalancerErrorCode","BalancerError","super","getMessage","ABOVE_MAX_TOKENS","BELOW_MIN_TOKENS","EXIT_DELTA_AMOUNTS","FEE_PROVIDER_NOT_PROVIDED","GAUGES_HELPER_ADDRESS_NOT_PROVIDED","GAUGES_NOT_FOUND","GAUGES_REWARD_MINTER_ADDRESS_NOT_PROVIDED","GAUGES_REWARD_TOKEN_EMPTY","INPUT_LENGTH_MISMATCH","INPUT_OUT_OF_BOUNDS","INPUT_TOKEN_INVALID","INVALID_PROTOCOL_ID","INVALID_SWAP_FEE_PERCENTAGE","INVALID_WEIGHTS","JOIN_DELTA_AMOUNTS","JOIN_WITH_ZERO_AMOUNT","MISSING_AMP","MISSING_DECIMALS","MISSING_PRICE_RATE","MISSING_TOKENS","MISSING_WEIGHT","NO_POOL_DATA","NO_VALUE_PARAMETER","POOL_DOESNT_EXIST","RELAY_SWAP_AMOUNTS","REWARD_TOKEN_ZERO","TIMESTAMP_IN_THE_FUTURE","TOKEN_MISMATCH","UNSUPPORTED_PAIR","UNSUPPORTED_POOL_TYPE","calcPriceImpact","bptAmount","bptZeroPriceImpact","isJoin","pi","calcPriceImpactJoin","calcPriceImpactExit","bptSpotPrice","balances","bptSupply","tokenIndexIn","totalCoins","D","numTokens","prevInvariant","ampTimesTotal","P_D","j","_calculateInvariant","S","D_P","alpha","beta","gamma","partial_x","minus_partial_D","divUpFixed","StablePoolPriceImpact","tokenAmounts","StablePoolExit","buildExitExactBPTIn","exiter","bptIn","shouldUnwrapNativeAsset","singleTokenOut","toInternalBalance","checkInputsExactBPTIn","sortedValues","sortValuesExitExactBptIn","minAmountsOut","expectedAmountsOut","singleTokenOutIndex","calcTokenOutGivenExactBptIn","calcTokensOutGivenExactBptIn","userData","encodedData","encodeExitPool","priceImpact","buildExitExactTokensOut","checkInputsExactTokensOut","sortValuesExitExactTokensOut","expectedBPTIn","maxBPTIn","calcBptInGivenExactTokensOut","downScaledAmountsOut","buildRecoveryExit","isNegative","t","tokensList","parsedPoolInfo","upScaledAmountsOut","amountOut","SOR","StableMathBigInt","_calcTokenOutGivenExactBptIn","downscaledAmountOut","amountsOutScaledDown","_calcTokensOutGivenExactBptIn","_calcBptInGivenExactTokensOut","functionName","attributes","recipient","exitPoolRequest","createInterface","StablePoolJoin","buildJoin","joiner","checkInputs","sortValues","expectedBPTOut","minBPTOut","calcBptOutGivenExactTokensIn","encodeJoinPool","sortedAmountsIn","upScaledAmountsIn","_calcBptOutGivenExactTokensIn","joinPoolRequest","maxAmountsIn","fromInternalBalance","StablePoolLiquidity","calcTotal","sumBalance","sumValue","price","usd","avgPrice","SCALING_FACTOR","StablePoolSpotPrice","calcPoolSpotPrice","stablePool","StablePool","fromPool","poolPairData","parsePoolPairData","_spotPriceAfterSwapExactTokenInForTokenOut","ZERO","exit","liquidity","spotPriceCalculator","priceImpactCalculator","PhantomStablePoolSpotPrice","metaStablePool","PhantomStablePool","ComposableStablePoolJoin","sortValuesBasedOnPoolVersion","buildExactTokensInForBPTOut","sortV1","encodeUserDataExactTokensInForBPTOut","assetsWithBpt","encodedUserData","maxAmountsInWithBpt","sortV4","ComposableStablePoolExit","singleTokenOutIndexWithoutBpt","minAmountsOutWithBpt","downscaledAmountsOutWithoutBpt","downscaledAmountsOutWithBpt","checkInputsRecoveryExit","lte","poolTypeVersion","isInRecoveryMode","parsedValues","downscaledAmountsOutWithBptWithRounding","isZero","upScaledAmountsOutWithoutBpt","ComposableStable","WeightedPoolPriceImpact","WeightedPoolExit","WeightedMaths","WeightedPoolJoin","WeightedPoolLiquidity","sumWeight","toFixed","totalWeight","total","WeightedPoolSpotPrice","isBPTAsToken","bptAsToken","weightedPool","WeightedPool","spotPrice","pop","Weighted","MetaStablePoolLiquidity","MetaStablePoolSpotPrice","MetaStablePool","MetaStable","StablePhantomPoolExit","StablePhantomPoolJoin","StablePhantom","LinearPriceImpact","LinearPoolExit","LinearMaths","LinearPoolJoin","LinearPoolLiquidity","LinearPoolSpotPrice","linearPool","LinearPool","Linear","FXExitConcern","FXLiquidityConcern","FXSpotPriceConcern","FXPriceImpactConcern","FXJoinConcern","FX","GyroExitConcern","GyroLiquidityConcern","GyroSpotPriceConcern","GyroPriceImpactConcern","GyroJoinConcern","Gyro","PoolTypeConcerns","config","weighted","stable","composableStable","metaStable","stablePhantom","linear","Liquidity","tokenPrices","parsedTokens","subPoolLiquidity","all","findBy","getLiquidity","totalBPT","bptInParentPool","liquidityInParentPool","totalSubPoolLiquidity","totalLiquidity","subPool","nonPoolTokens","nonPoolTokensWithUpdatedPrice","tokenPrice","latestUSDPrice","parsedTokenLiquidity","filterTokens","obj","populateGauges","gauges","claimableRewards","claimableTokens","gauge","rewards","populateGauge","it","reduceRewardTokens","rewardTokens","liquidityGaugeV5Interface","balancerMinterInterface","gaugeClaimHelperInterface","ClaimService","liquidityGauges","feeDistributor","gaugeClaimHelperAddress","balancerMinterAddress","getGauges","gaugeAddresses","getRewardTokens","retrieveClaimableTokens","retrieveClaimableRewards","getClaimableRewardTokens","flatMap","expectedValues","tokenAddress","every","expectedTokensValue","getClaimableBalances","tokenBalance","claimBalances","paths","getPayload","res0x","path","reduceClaimableRewards","gaugeAddress","getArguments","balAddress","reduceClaimableTokens","queryBatchSwap","vaultContract","swaps","funds","err","__assign","assign","n","arguments","prototype","hasOwnProperty","docCache","Map","fragmentSourceMap","printFragmentWarnings","experimentalFragmentVariables","string","trim","processFragments","ast","seenKeys","definitions","fragmentDefinition","fragmentName","sourceKey","loc","source","body","substring","start","end","sourceKeySet","get","has","set","parseDocument","cacheKey","parsed","parse","allowLegacyFragmentVariables","doc","workSet","node","startToken","endToken","stripLoc","gql","literals","_i","arg","gql_1","extras","clear","resetCaches","disableFragmentWarnings","enableExperimentalFragmentVariables","disableExperimentalFragmentVariables","AmpUpdate_OrderBy","BalancerSnapshot_OrderBy","Balancer_OrderBy","CircuitBreaker_OrderBy","GradualWeightUpdate_OrderBy","InvestType","JoinExit_OrderBy","LatestPrice_OrderBy","ManagementOperation_OrderBy","OperationType","OrderDirection","PoolContract_OrderBy","PoolHistoricalLiquidity_OrderBy","PoolShare_OrderBy","PoolSnapshot_OrderBy","PoolToken_OrderBy","Pool_OrderBy","PriceRateProvider_OrderBy","ProtocolIdData_OrderBy","SwapFeeUpdate_OrderBy","Swap_OrderBy","TokenPrice_OrderBy","TokenSnapshot_OrderBy","Token_OrderBy","TradePairSnapshot_OrderBy","TradePair_OrderBy","UserInternalBalance_OrderBy","User_OrderBy","_SubgraphErrorPolicy_","gql$1","SubgraphPoolShareFragmentDoc","SubgraphPoolFragmentDoc","SubgraphPoolSnapshotFragmentDoc","SubgraphJoinExitFragmentDoc","SubgraphBalancerFragmentDoc","SubgraphTokenPriceFragmentDoc","SubgraphTokenLatestPriceFragmentDoc","SubgraphUserFragmentDoc","PoolShareDocument","PoolSharesDocument","PoolsDocument","AllPoolsDocument","PoolDocument","PoolHistoricalLiquiditiesDocument","PoolSnapshotsDocument","JoinExitsDocument","BalancersDocument","TokenPricesDocument","TokenLatestPricesDocument","TokenLatestPriceDocument","UserDocument","UsersDocument","defaultWrapper","action","_operationName","_operationType","getSdk","client","withWrapper","PoolShare","variables","requestHeaders","wrappedRequestHeaders","request","PoolShares","Pools","AllPools","Pool","PoolHistoricalLiquidities","PoolSnapshots","JoinExits","Balancers","TokenPrices","TokenLatestPrices","TokenLatestPrice","User","Users","Chain","GaugeFactory_OrderBy","GaugeShare_OrderBy","GaugeType_OrderBy","GaugeVote_OrderBy","Gauge_OrderBy","LiquidityGauge_OrderBy","LockSnapshot_OrderBy","OmniVotingEscrowLock_OrderBy","RewardToken_OrderBy","RootGauge_OrderBy","SingleRecipientGauge_OrderBy","VotingEscrowLock_OrderBy","VotingEscrow_OrderBy","SubgraphGaugeShareFragmentDoc","SubgraphLiquidityGaugeFragmentDoc","SubgraphPoolWithPreferentialGaugeFragmentDoc","GaugeShareDocument","GaugeSharesDocument","LiquidityGaugesDocument","PoolGaugesDocument","createSubgraphClient","subgraphUrl","GraphQLClient","createGaugesClient","GaugeShare","GaugeShares","LiquidityGauges","PoolGauges","Gauges.getSdk","Multicaller3","options","calls","interface","connect","batchSize","executeMulticall","numBatches","ceil","batchPromises","batchIndex","batchRequests","allowFailure","aggregate3","offset","callIndex","success","returnData","decodeFunctionResult","e","weightedCalls","multicaller","linearCalls","stableCalls","gyroECalls","fetchOnChainPoolData","vaultAddress","getTotalSupplyFn","getSwapFeeFn","defaultCalls","do_nothing","poolTypeCalls","getOnChainBalances","subgraphPoolsOriginal","_multiAddress","poolsWithOnchainData","onchainData","idx","wrappedToken","wrappedIndex","wrappedTokenRate","lowerTarget","targets","upperTarget","tokenRates","rate","SubgraphPoolDataService","sorConfig","query","defaultArgs","orderBy","TotalLiquidity","orderDirection","Desc","swapEnabled","queryArgs","mapped","expiryTime","unitSeconds","principalToken","baseToken","mapPools","getSubgraphPools","findIndex","fetchOnChainBalances","onChainBalances","formattedQuery","first","pool0","pool1000","pool2000","SubgraphTokenPriceService","ethPerToken","getLatestPriceInEthFromSubgraph","latestPrices","asset_in","pricesKeyedOnId","keyBy","matchingLatestPrices","asset","pricingAssetPricedInEth","pricingAsset","getNetworkConfig","networkConfig","customSubgraphUrl","tenderly","POOLS_TO_IGNORE","ApiTokenPriceService","balancerApiUrl","tokenPriceQuery","chainKey","tokenGetCurrentPrices","tokenPriceUsd","nativeAssetPriceUsd","NativeAssetAddress","tokenPriceInNativeAsset","getCoingeckoApiBaseUrl","isDemoApi","getCoingeckoApiKeyHeaderName","CoingeckoTokenPriceService","urlBase","isDemoApiKey","coingeckoApiKeyHeaderName","apiKey","coingeckoApiKey","getTokenPriceInNativeAsset","endpoint","axios","headers","Accept","Sor","sdkConfig","getSorConfig","sorNetworkConfig","getSorNetworkConfig","JsonRpcProvider","rpcUrl","subgraphClient","getPoolDataService","getTokenPriceService","tokenPriceService","poolDataService","sor","connectingTokens","triPathMidPoolIds","allPoolsToIgnore","coingeckoConfig","checkSimpleFlashSwapParams","poolIds","createSwaps","assetInIndex","assetOutIndex","deltaToExpectedProfit","Number","calcProfit","profits","underlyingToWrappedMap","tokenForSwaps","wrapped","Relayers","relayerResolver","assetIn","assetOut","lido","swapFragment","relayer","f","amountForLimit","maxSlippage","min","decorateSorSwapInfo","swapInfo","amountIn","swapAmount","returnAmount","amountInForLimits","swapAmountForSwaps","returnAmountFromSwaps","amountOutForLimits","tokenInForSwaps","tokenOutFromSwaps","SingleSwapBuilder","setFunds","setDeadline","setLimits","singleSwap","attrs","fragment","outputReference","BatchSwapBuilder","minAmountOut","maxAmountIn","tokenAddresses","split","outputReferences","buildRouteDefaultOptions","maxPools","gasPrice","Swaps","sorOrConfig","l","getSwaps","SwapTypes","buildSwap","builder","opts","findRouteGivenIn","batchSwap","encodeBatchSwap","flashLoanAmount","walletAddress","convertSimpleFlashSwapToBatchSwapParameters","fetchPools","getPools","tokenAddress0","tokenAddress1","isProfitable","querySimpleFlashSwap","swapInput","swapTypeSOR","getSorSwapInfo","swap","assetDeltas","fromEntries","PoolKind","relayerLibrary","Relayer","maxAmount","relayerAdress","approved","authorisation","poolKind","staticToken","fromUnderlying","toUnderlying","linearPoolType","unwrapType","encodeUnwrapAaveStaticToken","isTemporary","CHAINED_REFERENCE_TEMP_PREFIX","CHAINED_REFERENCE_READONLY_PREFIX","paddedPrefix","repeat","ref","amountBn","mask","check","_hex","signRelayerApproval","relayerAddress","signerAddress","signer","Subgraph","initClient","Pricing","poolsDict","parseToPoolsDict","routeProposer","getCandidatePathsFromDict","getSpotPriceAfterSwapForPath","Multicaller","isLessThan24Hours","incomingDateInSec","round","Date","now","VeBal","veBalAddress","formatLockInfo","lockInfo","lockedAmount","lockedEndDate","locked","hasExistingLock","lockedEndDateNormalised","toNumber","isExpired","totalSupply","epoch","VeBalProxy","adjustedBalanceOf","Contracts","networkOrAddresses","getLiquidityGauge","contractAddresses","eulerLinearPoolFactory","gearboxLinearPoolFactory","gyroConfig","instances","BasePool","getBasePool","ERC20","getErc20","liquidityGauge","ImpermanentLossService","tokenHistoricalPrices","timestamp","prepareData","poolValueDelta","getPoolValueDelta","holdValueDelta","getHoldValueDelta","calculateImpermanentLoss","floor","abs","priceDelta","entryTimestamp","getWeights","entryPrices","getEntryPrices","exitPrices","getExitPrices","getAssets","getDelta","entryPrice","exitPrice","ILLEGAL_PARAMETER","noWeights","uniformWeight","w","prices","tokensWithPrice","INITIAL_RATE","START_EPOCH_TIME","RATE_REDUCTION_TIME","RATE_REDUCTION_COEFFICIENT","weekly","currentTimestamp","getTime","miningEpoch","totalEmissions","startingEpoch","endingEpoch","currentEpoch","secondsInStartingEpoch","secondsInEndingEpoch","ProtocolRevenue","repository","multicallData","balPrice","lastWeekBalRevenue","balAmount","lastWeekBBAUsdRevenue","bbAUsdAmount","bbAUsdPrice","veBalSupply","PoolFees","yesterdaysPools","yesterdaysPool","totalSwapFee","createTime","PoolApr","tokenMeta","tokenYields","feeCollector","gyroConfigRepository","last24hFees","feesDailyBsp","protocolSwapFeePercentage","breakdown","bptFreeTokens","aprs","apr","tokenYield","isExemptFromYieldProtocolFee","protocolYieldFeeCache","subSwapFees","swapFees","subApr","tokenAprs","getWeight","poolToken","bptPrice","_c","_d","_e","weightedAprs","pickBy","zipObject","identity","boost","workingSupply","balInflationRate","bptPriceUsd","gaugeSupplyUsd","reward","balReward","rewardTokenApr","totalSupplyUsd","rewardValue","balPriceUsd","gaugeBalEmissionsUsd","emissions.weekly","relativeWeight","tAddress","rewardTokensBreakdown","rewardValueScaled","revenue","dailyRevenue","stakingApr","rewardAprs","protocolApr","minStakingApr","maxStakingApr","last24h","liquidityService","fee","getGyroProtocolFee","protocolSwapFeeCache","rewardData","period_finish","yearlyReward","meta","joinActions","Element","LiquidityBootstrapping","exitActions","PoolGraph","getGraphNodes","tokensToUnwrap","rootNode","buildGraphFromRootPool","orderByBfs","reverse","rootPool","buildGraphFromPool","getTokenTotal","nodeIndex","parent","proportionOfParent","parentPool","tokenIndex","leafTokenDecimals","createInputTokenNode","joinAction","exitAction","tokenTotal","spotPrices","sp","poolNode","isProportionalExit","children","marked","isLeaf","updateNodeIfProportionalExit","createLinearNodeChildren","proportion","tokenWeight","finalProportion","childNode","linearPoolNode","mainIndex","wrappedNodeInfo","createWrappedTokenNode","mainTokenDecimals","nodeInfo","wrappedTokenNode","unwrappedBalance","inputNode","root","nodes","orderedNodes","currentNode","shift","WeightedPoolDecoder","decode","JoinModel","relayerModel","joinKind","decodeJoinData","allTokensInForExactBPTOut","amountsInWithRef","doChainedRefReplacements","SubgraphType","bptAsPoolToken","bptBalanceEVM","updateTokenBalanceForPool","tokensWithoutBpt","balanceEvm","bptAmountOutWithRef","tokenInIndex","doChainedRefReplacement","pairData","bptAmountOutHuman","amountInHuman","_tokenInForExactTokenOut","bnum","dp","decimalsIn","amountInEvm","balanceIn","balanceOut","bptOut","isChainedReference","setChainedReferenceValue","ExitModel","exitKind","decodeExitData","exactBptInForTokensOut","bptInWithRef","exactBptInForOneTokenOut","amountOutHuman","_exactTokenInForTokenOut","decimalsOut","amountOutEvm","poolBalances","pt","getBalancesForTokens","tokenOutIndex","SwapModel","swapRequest","doSwap","batchSwapRequest","previousAmount","getChainedReferenceValue","isExactIn","UnwrapModel","unwrapRequest","underlyingToken","PoolModel","joinModel","exitModel","swapModel","unwrapModel","doJoinPool","doExitPool","doBatchSwap","doSingleSwap","doUnwrap","RelayerModel","chainedRefs","PoolsSource","poolsArray","dataSource","refresh","list","cloneDeep","BptAsToken","parseNewPool","subgraphPool","ComposableStablePool","ActionType","VaultModel","poolsSource","updateDeltas","rawCalls","poolModel","poolsDictionary","actionType","Join","doJoin","Exit","doExit","Unwrap","balancerRelayerInterface","debugLog","poolGraph","simulationService","createCalls","joinPaths","isNativeAssetJoin","multiRequests","encodedCalls","outputIndexes","createActionCalls","unshift","createSetRelayerApproval","encodedCall","amountsOutByJoinPath","simulationType","simulateGeneralisedJoin","totalAmountOut","minAmountsOutByJoinPath","totalMinAmountOut","isSimulation","joinPath","isLeafJoin","modelRequests","shouldBeConsidered","isLastChainedCall","hasSiblingInput","minOut","modelRequest","createSwap","minBptOut","createJoinPool","outputRef","encodedPeekCall","encodePeekChainedReferenceValue","toChainedReference","encodeSetRelayerApproval","joinPathIndex","expectedOut","getOutputRefValue","replaceWrappedNativeAsset","allImmediateChildrenSendToInternal","allSiblingsSendToInternal","encodeSwap","mapSwapRequest","userTokenIn","userBptOut","inputTokens","inputAmts","child","sortedTokens","sortedAmounts","userDataAmounts","formatJoinPoolInput","mapJoinPoolRequest","userAmountsTokenIn","userAmountOut","hasChildInput","isRef","sendsToInternalBalance","siblings","wrappedNativeAssetIndex","nativeAssetIndex","tokensInWithoutNativeAsset","getJoinPaths","totalBptZeroPi","totalBptZeroPriceImpact","queryData","assertDeltas","poolAddress","Join$1","inputNodes","nonLeafInputNodes","nonLeafInputNode","nonLeafAmountIn","totalProportions","proportionalNonLeafAmountIn","inputTokenNode","nonLeafJoinPath","currentChild","parentCopy","updateInputAmounts","ajdustAmountInDiff","tokenInInputNodes","amountsInSumforTokenIn","diff","leafJoinPath","updateTotalProportions","updateNodeAmount","nonLeafJoinPaths","leafNode","bptOutZeroPiForInputNode","spProduct","parentNode","childAddress","spPriceScaled","inputAmountScaled","totalProportion","inputAmount","TenderlyHelper","tenderlyConfig","simulateMulticall","encodedStateOverrides","encodeBalanceAndAllowanceOverrides","encodeRelayerApprovalOverride","simulateTransaction","stateOverrides","storage","state_objects","toHexString","network_id","block_number","blockNumber","input","save_if_fails","simulation_type","SIMULATE_URL","tenderlyUrl","post","transaction","transaction_info","call_trace","output","requestStateOverrides","tokensWithoutNativeAsset","MaxInt256","k","ENCODE_STATES_URL","networkID","project","accessKey","SimulationType","Simulation","Tenderly","tenderlyHelper","simulationResult","decodeResult","requestResult","simulateRequests","Static","staticResult","decodedResponse","Buffer","simulateGeneralisedExit","multicallResult","outputIndex","vaultModel","requests","tokenOutDeltas","amountsOutByExitPath","amountsOutByTokenOut","tokensOutByExitPath","expectedAmountsOutByExitPath","expectedAmountsOutMap","expectedAmountsOutByTokenOut","minAmountsOutByExitPath","expectedAmountOut","minAmountsOutByTokenOut","getExitPaths","outputNodes","exitPaths","outputNode","exitPath","amountsInSum","accumulator","currentExitPath","amountInForCurrentExitPath","amountsInDiff","createUnwrap","exitChild","exitPathIndex","getOutputRef","encodeUnwrap","mapUnwrapRequest","receivesFromInternal","amountBptIn","getExit","estimatedAmountsOut","isProportional","isProportionalPools","tokensWithInsufficientBalance","calculatePriceImpact","orderedNodesForJoin","isPeek","getRecipientAddress","getSenderAddress","isLastActionWithLimits","minAmountsOutProportional","outputChildIndex","createExitPoolProportional","createExitPool","isRootNode","createBatchSwap","exitChildren","batchSwapSteps","swapStep","acc","dust","mapBatchSwapRequest","userDataTokens","formatExitPoolInput","mapExitPoolRequest","userAmountTokensOut","userBptIn","allChildrenReceiveFromInternal","deltaBptIn","deltaTokensOut","deltaAmountsOut","PoolVolume","totalSwapVolume","ComposableStableFactory","checkCreateInputs","tokenRateCacheDurations","exemptFromYieldProtocolFeeFlags","rateProviders","parseCreateParamsForEncoding","amplificationParameter","owner","salt","sortedRateProviders","sortedTokenRateCacheDurations","sortedExemptFromYieldProtocols","encodeCreateFunctionData","checkInitJoinInputs","parseParamsForInitJoin","tokensWithBpt","amountsWithBpt","maxAmountsWithBpt","asUintN","sortedMaxAmounts","encodeInitJoinFunctionData","getPoolAddressAndIdWithReceipt","composableStablePoolInterface","getPoolInterface","getPoolId","create","encodedFunctionData","buildInitJoin","WeightedFactory","normalizedWeights","sortedNormalizedWeights","cur","weightedPoolInterface","ProtocolId","LinearFactory","getPoolFactoryInterface","AaveLinear","ERC4626Linear","EulerLinear","GearboxLinear","YearnLinear","protocolId","getFactoryAddress","mainToken","upperTargetEvm","linearPoolInterface","PoolFactory__factory","balancerContracts","of","ParamsBuilder","encoder","Gyro2","Gyro3","getEncoder","buildQueryJoinExactIn","maxAmountsInByToken","maxInWithoutBpt","buildQueryJoinExactOut","buildQueryExitToSingleToken","buildQueryExitProportionally","buildQueryExitExactOut","maxBptIn","minAmountsOutWithoutBpt","EmissionsService","liquidityGaugesRepository","proportionalAmounts","referenceTokenIndex","notImplemented","repositories","aprService","poolsForSimulations","graphService","poolsOnChain","joinService","exitService","feesService","volumeService","poolFactory","impermanentLossService","emissionsService","concerns","queries","methods","calcSpotPrice","calcProportionalAmounts","Queries.ParamsBuilder","calcImpLoss","getBptPrice","joinPool","buildExitCall","getExitInfo","wrap","param","UnicodeNormalizationForm","Utf8ErrorReason","ignoreFunc","bytes","badCodepoint","BAD_PREFIX","UNEXPECTED_CONTINUE","o","OVERRUN","toUtf8Bytes","str","charCodeAt","c2","pair","arrayify","formatBytes32String","text","hexlify","HashZero","freeze","ignore","OVERLONG","INPUT_ERROR","WINDOW","window","JS_SHA3_NO_WINDOW","WEB_WORKER","self","JS_SHA3_NO_NODE_JS","versions","global","COMMON_JS","JS_SHA3_NO_COMMON_JS","module","ARRAY_BUFFER","JS_SHA3_NO_ARRAY_BUFFER","ArrayBuffer","HEX_CHARS","CSHAKE_PADDING","SHIFT","RC","BITS","SHAKE_BITS","OUTPUT_TYPES","CSHAKE_BYTEPAD","JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW","isView","buffer","createOutputMethod","bits","padding","outputType","Keccak","update","createShakeOutputMethod","outputBits","createCshakeOutputMethod","createKmacOutputMethod","createOutputMethods","method","createMethod","algorithms","bytepad","Kmac","methodNames","algorithm","methodName","newMethodName","blocks","reset","finalized","block","blockCount","byteCount","outputBlocks","extraBytes","notString","lastByteIndex","right","encodeString","strs","paddingBytes","zeros","finalize","arrayBuffer","Uint32Array","digest","h","c0","c1","c3","c4","c5","c6","c7","c8","c9","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","b10","b11","b12","b13","b14","b15","b16","b17","b18","b19","b20","b21","b22","b23","b24","b25","b26","b27","b28","b29","b30","b31","b32","b33","b34","b35","b36","b37","b38","b39","b40","b41","b42","b43","b44","b45","b46","b47","b48","b49","regexBytes","regexNumber","regexArray","_pack","zeroPad","toTwos","byteLength","baseType","pack","tight","keccak256","sha3","keccak_256","protocolFeePercKey","gyroPoolTypeKey","encodedPoolTypeKey","GyroConfigRepositoryImpl","gyroConfigAddress","gyroConfigInterface","encodedPoolSpecificKey","hasSpecificKeyHex","hasPoolTypeKeyHex","hasDefaultKeyHex","hasSpecificKey","hasPoolTypeKey","hasDefaultKey","getUint","gaugeControllerInterface","gaugeControllerCheckpointerInterface","GaugeControllerMulticallRepository","gaugeControllerAddress","gaugeControllerCheckpointerAddress","AbstractSubgraphRepository","attribute","skip","BalancerSubgraphRepository","blockHeight","GaugesSubgraphRepository","GaugeSharesRepository","desc","number","gaugeShares","mapType","subgraphGaugeShare","isKilled","findAllBy","UserAddress","gaugeId","GaugeId","childLiquidityGaugeInterface","LiquidityGaugesMulticallRepository","currentWeek","rewardCounts","passingRewardCounts","getRewardCounts","gaugesWithRewards","startIndexes","gaugeIndex","flat","passingRewardTokens","decoded","LiquidityGaugesSubgraphRepository","qauges","preferentialGauge_not","preferentialGauge","LiquidityGaugeSubgraphRPCProvider","workingSupplies","relativeWeights","inflationRates","gaugeController","g","getWorkingSupplies","oldFactories","childGaugeAddresses","factory","getInflationRates","getRelativeWeights","distributor","last_update","integral","periodFinish","compose","subgraphGauge","BalancerAPIClient","toPayload","jsonToGraphQLQuery","ms","mapToken","priceRateProviders","_f","_g","_h","_j","_k","isPaused","_l","subgraphToken","subPoolInfo","mapSubPools","metadata","mapSubPoolToken","PoolsSubgraphRepository","fetchAllPools","PoolsSubgraphOnChainRepository","poolsSubgraph","filterPools","filteredPools","onchainPools","forceRefresh","fetchDefault","onchainPool","PoolGaugesRepository","PoolJoinExitAttributes","PoolJoinExitRepository","Timestamp","Asc","joinExits","item","Sender","PoolSharesRepository","Balance","poolShares","subgraphPoolShare","PoolId","StaticTokenProvider","CoingeckoPriceRepository","baseTokenAddresses","platform","urlNative","debouncer","tokensPerPriceRequest","signal","isAxiosError","status","fetchNative","Assets","assetId","MATIC","XDAI","finally","inputAddress","baseAddress","nativePrice","CoingeckoHistoricalPriceRepository","urlRange","statusText","range","SubgraphPriceRepository","TokenPriceProvider","coingeckoRepository","subgraphRepository","aaveRates","getRate","HistoricalPriceProvider","FeeDistributorAbi","feeDistributorInterface","veBalInterface","FeeDistributorRepository","feeDistributorAddress","bbAUsdAddress","FeeDistributor","previousWeek","getPreviousWeek","fromTimestamp","midnight","setUTCHours","setUTCMinutes","setUTCSeconds","setUTCMilliseconds","daysSinceThursday","getUTCDay","weeksToGoBack","claimTokens","extractTokenBalance","vaultInterface","protocolFeesCollectorInterface","swapFeePercentagePromise","FeeCollectorRepository","getProtocolFeesCollector","collector","fees","getSwapFeePercentage","swapFeePercentage","iProtocolFeePercentagesProvider","feesPromise","ProtocolFeesProvider","protocolFeePercentagesProviderAddress","yieldFee","protocolFees","TokenYieldsRepository","lc","yields","fetchBlockByTime","BlockNumberRepository","dayAgo","Data","subgraphQuery","poolJoinExits","poolGauges","blockNumbers","blockDayAgo","getBlockNumber","initialCoingeckoList","subgraphPriceRepository","coingeckoHistoricalRepository","protocolFeePercentagesProvider","poolType2PoolKind","LEGACY_STABLE","COMPOSABLE_STABLE","COMPOSABLE_STABLE_V2","WEIGHTED","setRelayerApproval","gaugeWithdrawal","encodeGaugeWithdraw","gaugeDeposit","encodeGaugeDeposit","peekChainedReferenceValue","buildPath","buildLinearPath","buildMigrationPool","findTokens","nestedTokens","migrationBuilder","peek","fromGauge","toGauge","fromTokens","toTokens","exitOutputReferences","swapOutputReferences","joinAmount","migrationSteps","needsSwap","actions.setRelayerApproval","actions.gaugeWithdrawal","isComposable","actions.exit","swapPaths","getMainToken","mainFromTokens","mainToTokens","exitSwaps","fromIdx","toIdx","toPool","buildPaths","batchSwaps","actions.swaps","references","actions.join","actions.peekChainedReferenceValue","actions.gaugeDeposit","Migrations","poolsRepository","gaugesRepository","getExpectedBptOut","steps","relayerReturnValue","expectedBptOut","ActionStep","BaseAction","mainTokenInIndex","mainTokenOutIndex","swapAssetInIndex","swapAssetOutIndex","swapReturn","opRefKey","actionStep","getActionStep","getActionAmount","hasTokenIn","actionHasTokenIn","hasTokenOut","actionHasTokenOut","getActionMinOut","opRef","nextOpRefKey","getActionOutputRef","opRefStart","getSender","receiver","getReceiver","TokenOut","Middle","TokenIn","tokenInIndexAction","tokenOutIndexAction","Direct","getFromInternal","isBptIn","getToInternal","isBptOut","getPoolKind","exitToken","bptAmtIn","exitPoolInput","encoded","getAmountIn","getAmountOut","fromInternal","joinToken","joinTokenIndex","approveTokens","isBpt","toInternal","getLimits","updateLimits","newSwap","isChainedSwap","canAddSwap","encodeApproveVault","batchSwapInput","encodedBatchSwap","copy","addSwap","orderActions","actions","categorizedActions","enterActions","middleActions","categorizeActions","allActions","orderedActions","batchedSwaps","batchSwapActions","isExit","pricing","claimService","migrationService","hasFetched","isFetching","fetchFromCache","fetchAll","awaitEnoughPoolsFetched","nextToken","formattedArgs","__args","apiResponseData","totalChecks","rewardsBreakdown","tokenAprsBreakdown","providers","currentProviderIdx","fallbackQuery","currentProvider","func","race","lowercaseAddress","newJoin","newExit","getActions","totalIn","totalOut","diffOut","checkAmounts","spender","ownerAddress","nonces","Permit","hasJoinExit","specialization","normalizedSum"],"mappings":"yhDAIKA,ECDOC,EAMAC,EAKAC,ECXAC,EAOAC,iBFNZ,SAAKL,GACHA,EAAAA,EAAA,cAAA,KAAA,eACD,CAFD,CAAKA,IAAAA,EAEJ,CAAA,UAEYM,GAMJA,EAAgBC,iBAAIC,GACzBC,EAAAA,gBAAgBC,OACd,CAAC,UAAW,WACZ,CAACV,EAAiBW,cAAeH,ICVtCI,EAAAX,wBAAA,GAJWA,EAAAA,uBAAAA,EAAAA,mBAIX,CAAA,IAHCA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,4BAAA,GAAA,8BACAA,EAAAA,EAAA,2BAAA,GAAA,6BAMDW,EAAAV,+BAAA,GAHWA,EAAAA,8BAAAA,EAAAA,0BAGX,CAAA,IAFCA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,sBAAA,GAAA,wBAODU,EAAAT,wBAAA,GAJWA,EAAAA,uBAAAA,EAAAA,mBAIX,CAAA,IAHCA,EAAA,+BAAA,GAAA,iCACAA,EAAAA,EAAA,4BAAA,GAAA,8BACAA,EAAAA,EAAA,4BAAA,GAAA,oCAGWU,EAIXC,cAEC,EAMMD,EAAQE,SAAIC,GACjBP,EAAeA,gBAACC,OACd,CAAC,UAAW,aACZ,CAACT,EAAkBA,mBAACgB,KAAMD,IAMvBH,EAAAK,wBAA0B,IAC/BT,EAAeA,gBAACC,OACd,CAAC,WACD,CAACR,EAAAA,0BAA0BiB,wBAQxBN,EAAAO,2BAA6B,CAClCJ,EACAK,IAEAZ,EAAeA,gBAAC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C,qBAC9C,6CAA8C,eAC9C,6CAA8C,aAC9C,6CAA8C,aAC9C,6CAA8C,6BAC9C,6CAA8C,6BAC9C,6CAA8C,cAC9C,6CAA8C,cAC9C,6CAA8C,aAC9C,6CAA8C,uBAC9C,6CAA8C,gBAEhDC,SAAU,CACRH,UAAW,CACT,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,uEAGJI,SAAU,CACR,qEAAsE,CACpEC,KAAM,4BACNC,SAAS,GAEX,qEAAsE,CACpED,KAAM,4BACNC,SAAS,GAEX,qEAAsE,CACpED,KAAM,sBACNC,SAAS,GAEX,qEAAsE,CACpED,KAAM,sBACNC,SAAS,KAkTb,CAACpB,EAAAA,QAAQ6B,SA7SkB,CAC3B3B,OAAQ,CACN4B,OAAQ,CACNL,GAAI,qEACJC,GAAI,sEAENK,QAAS,CACPN,GAAI,qEACJC,GAAI,sEAENM,KAAM,CACJA,KAAM,qEACNC,UACE,uEAGN9B,WAAY,CACVC,QAAS,GACTC,QAAS,GACTC,eAAgB,GAElBC,cAAe,6CACfC,YAAa,6CACbC,YAAa,CACXC,SAAU,IAEZC,UAAW,CAAC,IACZC,kBAAmB,CACjB,UACA,aACA,SACA,gBACA,QACA,QACA,QACA,MAEFC,OAAQ,CACNC,UAAW,CACT,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,uEAGJC,WAAY,CACVD,UAAW,CAAC,KA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AER,CACEmY,OAAQ,CACN,CACEE,aAAc,uBACd/f,KAAM,OACN0H,KAAM,SAER,CACEoY,WAAY,CACV,CACEC,aAAc,UACd/f,KAAM,SACN0H,KAAM,WAER,CACEqY,aAAc,UACd/f,KAAM,eACN0H,KAAM,WAER,CACEqY,aAAc,UACd/f,KAAM,gBACN0H,KAAM,WAER,CACEqY,aAAc,UACd/f,KAAM,SACN0H,KAAM,WAER,CACEqY,aAAc,QACd/f,KAAM,WACN0H,KAAM,UAGVqY,aAAc,gCACd/f,KAAM,QACN0H,KAAM,WAER,CACEqY,aAAc,oBACd/f,KAAM,SACN0H,KAAM,aAER,CACEoY,WAAY,CACV,CACEC,aAAc,UACd/f,KAAM,SACN0H,KAAM,WAER,CACEqY,aAAc,OACd/f,KAAM,sBACN0H,KAAM,QAER,CACEqY,aAAc,kBACd/f,KAAM,YACN0H,KAAM,WAER,CACEqY,aAAc,OACd/f,KAAM,oBACN0H,KAAM,SAGVqY,aAAc,+BACd/f,KAAM,QACN0H,KAAM,SAER,CACEqY,aAAc,WACd/f,KAAM,SACN0H,KAAM,YAER,CACEqY,aAAc,UACd/f,KAAM,WACN0H,KAAM,WAER,CACEqY,aAAc,UACd/f,KAAM,QACN0H,KAAM,WAER,CACEoY,WAAY,CACV,CACEC,aAAc,UACd/f,KAAM,QACN0H,KAAM,WAER,CACEqY,aAAc,UACd/f,KAAM,MACN0H,KAAM,YAGVqY,aAAc,wCACd/f,KAAM,mBACN0H,KAAM,YAGV1H,KAAM,YACNmgB,QAAS,GACTH,gBAAiB,UACjBtY,KAAM,YAER,CACEmY,OAAQ,CACN,CACEE,aAAc,UACd/f,KAAM,SACN0H,KAAM,WAER,CACEqY,aAAc,6BACd/f,KAAM,OACN0H,KAAM,SAER,CACEqY,aAAc,UACd/f,KAAM,SACN0H,KAAM,WAER,CACEqY,aAAc,kBACd/f,KAAM,YACN0H,KAAM,WAER,CACEoY,WAAY,CACV,CACEC,aAAc,oBACd/f,KAAM,SACN0H,KAAM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EACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,qEACA,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,CAFS+F,EAAOqsB,EAAKvE,cACX9nB,EAAOqsB,EAAKtE,gBACFhnC,SAASuK,EAAK7J,QAC3C,CAmDWkyE,CAAYzxD,EAAOmqB,EAAMrsB,IAEpC,gBjO/GEjlB,IAMO,CACL0G,QAAS3G,EAAeC,GACxB64E,eAAgB14E,EAAsBH,GACtC2I,MAAOrI,EAAaN,4CsOPlB,SAA8BiR,GAGlC,GAVwB,KAUpBA,EAAQhR,OACV,OAAO4L,MAXe,KAWUkU,KAAKjV,EAAAA,YAAI8S,IAXnB,MAcxB,MAAM5N,EAAMiB,EAAQ3E,QAAO,CAACynB,EAAO7iB,IAAW6iB,EAAM3mB,IAAI8D,IAASiU,EAAIA,MACrE,GAAInV,EAAIwQ,GAAG1V,eAAM,OAAOmG,EAExB,MAAMikD,EAAoB,GAC1B,IAAI4jB,EAAgB3zD,EAAAA,KACpB,IAAK,IAAI1M,EAAQ,EAAGA,EAAQxH,EAAQhR,OAAQwY,IACtCA,EAAQxH,EAAQhR,OAAS,GAC3Bi1D,EAAkBz8C,GAASxH,EAAQwH,GAAOkF,IAAI7S,eAAK8S,IAAI5N,GACvD8oE,EAAgBA,EAAc1rE,IAAI8nD,EAAkBz8C,KAEpDy8C,EAAkBz8C,GAAS3N,EAAGwa,YAACvH,IAAI+6D,GAIvC,OAAO5jB,CACT,oDlN5BM,SAA8B/vD,GAClC,MAAM0xB,EAA2B,CAAA,EAOjC,OANA1xB,EAAOE,SAAST,IACVA,EAAMgsB,QACRiG,EAAYjyB,EAAM8B,SAAW9B,EAAMgsB,MACpC,IAGIiG,CACT,sBIkGM,SAA4Bld,GAChC,OAAOA,EAAUxV,KAAKqqB,GAAM,GAAGA,EAAEtuB,MAAM,EAAG,QAAQsuB,EAAEtuB,MAAM,GAAI,OAChE"} \ No newline at end of file diff --git a/package/package.json b/package/package.json new file mode 100644 index 000000000..2435426fa --- /dev/null +++ b/package/package.json @@ -0,0 +1,107 @@ +{ + "name": "@balancer-labs/sdk", + "version": "1.1.6-beta.16", + "description": "JavaScript SDK for interacting with the Balancer Protocol V2", + "license": "GPL-3.0-only", + "homepage": "https://github.com/balancer-labs/balancer-sdk#readme", + "repository": { + "type": "git", + "url": "https://github.com/balancer-labs/balancer-sdk", + "directory": "balancer-js" + }, + "bugs": { + "url": "https://github.com/balancer-labs/balancer-sdk/issues" + }, + "main": "dist/index.js", + "module": "dist/index.esm.js", + "browser": "dist/index.umd.js", + "typings": "dist/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "address-book:generate": "npx ts-node -P tsconfig.testing.json -r tsconfig-paths/register ./src/lib/utils/generate-address-books.ts", + "build": "rimraf dist && rollup -c", + "dev": "rollup -c -w", + "test": "ts-mocha --paths --recursive -p tsconfig.testing.json 'src/**/*.spec.ts' --timeout 20000", + "test:only": "ts-mocha --paths --recursive -p tsconfig.testing.json --timeout 20000", + "lint": "eslint ./src --ext .ts --max-warnings 0", + "lint:fix": "eslint ./src --ext .ts --max-warnings 0 --fix", + "subgraph:generate": "graphql-codegen --config src/modules/subgraph/codegen.yml -r dotenv/config", + "example": "npx ts-node -P tsconfig.examples.json -r tsconfig-paths/register", + "node": "npx hardhat node --tsconfig tsconfig.testing.json --fork $(. ./.env && echo $ALCHEMY_URL)", + "node:goerli": "npx hardhat --tsconfig tsconfig.testing.json --config hardhat.config.goerli.ts node --fork $(. ./.env && echo $ALCHEMY_URL_GOERLI) --port 8000", + "node:polygon": "npx hardhat --tsconfig tsconfig.testing.json --config hardhat.config.polygon.ts node --fork $(. ./.env && echo $ALCHEMY_URL_POLYGON) --port 8137", + "node:arbitrum": "npx hardhat --tsconfig tsconfig.testing.json --config hardhat.config.arbitrum.ts node --fork $(. ./.env && echo $ALCHEMY_URL_ARBITRUM) --port 8161", + "node:gnosis": "npx hardhat --tsconfig tsconfig.testing.json --config hardhat.config.gnosis.ts node --fork $(. ./.env && echo $RPC_URL_GNOSIS) --port 8100", + "node:zkevm": "npx hardhat --tsconfig tsconfig.testing.json --config hardhat.config.zkevm.ts node --fork $(. ./.env && echo $ALCHEMY_URL_ZKEVM) --port 8101", + "node:avalanche": "npx hardhat --tsconfig tsconfig.testing.json --config hardhat.config.avalanche.ts node --fork $(. ./.env && echo $RPC_URL_AVALANCHE) --port 8114", + "typechain:generate": "npx typechain --target ethers-v5 --out-dir src/contracts './src/lib/abi/*.json'" + }, + "devDependencies": { + "@ethersproject/solidity": "^5.6.1", + "@ethersproject/units": "^5.7.0", + "@ethersproject/wallet": "^5.5.0", + "@graphql-codegen/add": "^3.1.0", + "@graphql-codegen/cli": "^2.3.0", + "@graphql-codegen/introspection": "^2.1.0", + "@graphql-codegen/schema-ast": "^2.4.0", + "@graphql-codegen/typescript": "2.4.0", + "@graphql-codegen/typescript-document-nodes": "^2.2.0", + "@graphql-codegen/typescript-graphql-request": "^4.3.0", + "@graphql-codegen/typescript-operations": "^2.2.0", + "@graphql-codegen/typescript-resolvers": "2.4.1", + "@nomicfoundation/hardhat-network-helpers": "^1.0.4", + "@nomiclabs/hardhat-ethers": "^2.0.5", + "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "^13.0.0", + "@rollup/plugin-typescript": "^8.2.1", + "@typechain/ethers-v5": "^10.2.0", + "@types/chai": "^4.2.12", + "@types/lodash": "^4.14.177", + "@types/mocha": "^8.0.3", + "@types/node": "^15.12.4", + "@typescript-eslint/eslint-plugin": "^4.1.1", + "@typescript-eslint/parser": "^4.1.1", + "axios-mock-adapter": "^1.21.2", + "chai": "^4.2.0", + "dotenv": "^10.0.0", + "eslint": "^7.9.0", + "eslint-plugin-mocha-no-only": "^1.1.1", + "eslint-plugin-prettier": "^3.1.4", + "fishery": "^2.2.2", + "hardhat": "^2.9.3", + "mocha": "^8.2.1", + "mockdate": "^3.0.5", + "prettier": "^2.1.2", + "rimraf": "^3.0.2", + "rollup": "^2.52.8", + "rollup-plugin-dts": "^3.0.2", + "rollup-plugin-terser": "^7.0.2", + "tiny-invariant": "^1.1.0", + "ts-mocha": "^9.0.2", + "ts-node": "^10.9.1", + "tsconfig-paths": "^3.14.1", + "typechain": "^8.1.1", + "typescript": "^4.0.2" + }, + "dependencies": { + "@balancer-labs/sor": "^4.1.1-beta.17", + "@ethersproject/abi": "^5.4.0", + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/base64": "5.5.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/contracts": "^5.4.0", + "@ethersproject/providers": "^5.4.5", + "axios": "^0.24.0", + "ethers": "^5", + "graphql": "^15.6.1", + "graphql-request": "^3.5.0", + "json-to-graphql-query": "^2.2.4", + "lodash": "^4.17.21" + } +}